@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.
Files changed (192) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +72 -0
  3. package/dist/contact/AbstractContactStore.d.ts +14 -0
  4. package/dist/contact/AbstractContactStore.d.ts.map +1 -0
  5. package/dist/contact/AbstractContactStore.js +7 -0
  6. package/dist/contact/AbstractContactStore.js.map +1 -0
  7. package/dist/contact/ContactStore.d.ts +29 -0
  8. package/dist/contact/ContactStore.d.ts.map +1 -0
  9. package/dist/contact/ContactStore.js +281 -0
  10. package/dist/contact/ContactStore.js.map +1 -0
  11. package/dist/entities/contact/BaseConfigEntity.d.ts +5 -0
  12. package/dist/entities/contact/BaseConfigEntity.d.ts.map +1 -0
  13. package/dist/entities/contact/BaseConfigEntity.js +26 -0
  14. package/dist/entities/contact/BaseConfigEntity.js.map +1 -0
  15. package/dist/entities/contact/ConnectionEntity.d.ts +12 -0
  16. package/dist/entities/contact/ConnectionEntity.d.ts.map +1 -0
  17. package/dist/entities/contact/ConnectionEntity.js +66 -0
  18. package/dist/entities/contact/ConnectionEntity.js.map +1 -0
  19. package/dist/entities/contact/ContactEntity.d.ts +16 -0
  20. package/dist/entities/contact/ContactEntity.d.ts.map +1 -0
  21. package/dist/entities/contact/ContactEntity.js +105 -0
  22. package/dist/entities/contact/ContactEntity.js.map +1 -0
  23. package/dist/entities/contact/CorrelationIdentifierEntity.d.ts +12 -0
  24. package/dist/entities/contact/CorrelationIdentifierEntity.d.ts.map +1 -0
  25. package/dist/entities/contact/CorrelationIdentifierEntity.js +75 -0
  26. package/dist/entities/contact/CorrelationIdentifierEntity.js.map +1 -0
  27. package/dist/entities/contact/DidAuthConfigEntity.d.ts +11 -0
  28. package/dist/entities/contact/DidAuthConfigEntity.d.ts.map +1 -0
  29. package/dist/entities/contact/DidAuthConfigEntity.js +49 -0
  30. package/dist/entities/contact/DidAuthConfigEntity.js.map +1 -0
  31. package/dist/entities/contact/IdentityEntity.d.ts +22 -0
  32. package/dist/entities/contact/IdentityEntity.d.ts.map +1 -0
  33. package/dist/entities/contact/IdentityEntity.js +134 -0
  34. package/dist/entities/contact/IdentityEntity.js.map +1 -0
  35. package/dist/entities/contact/IdentityMetadataItemEntity.d.ts +12 -0
  36. package/dist/entities/contact/IdentityMetadataItemEntity.d.ts.map +1 -0
  37. package/dist/entities/contact/IdentityMetadataItemEntity.js +72 -0
  38. package/dist/entities/contact/IdentityMetadataItemEntity.js.map +1 -0
  39. package/dist/entities/contact/OpenIdConfigEntity.d.ts +15 -0
  40. package/dist/entities/contact/OpenIdConfigEntity.d.ts.map +1 -0
  41. package/dist/entities/contact/OpenIdConfigEntity.js +70 -0
  42. package/dist/entities/contact/OpenIdConfigEntity.js.map +1 -0
  43. package/dist/entities/issuanceBranding/BackgroundAttributesEntity.d.ts +11 -0
  44. package/dist/entities/issuanceBranding/BackgroundAttributesEntity.d.ts.map +1 -0
  45. package/dist/entities/issuanceBranding/BackgroundAttributesEntity.js +74 -0
  46. package/dist/entities/issuanceBranding/BackgroundAttributesEntity.js.map +1 -0
  47. package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.d.ts +18 -0
  48. package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.d.ts.map +1 -0
  49. package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.js +120 -0
  50. package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.js.map +1 -0
  51. package/dist/entities/issuanceBranding/CredentialBrandingEntity.d.ts +15 -0
  52. package/dist/entities/issuanceBranding/CredentialBrandingEntity.d.ts.map +1 -0
  53. package/dist/entities/issuanceBranding/CredentialBrandingEntity.js +102 -0
  54. package/dist/entities/issuanceBranding/CredentialBrandingEntity.js.map +1 -0
  55. package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.d.ts +9 -0
  56. package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.d.ts.map +1 -0
  57. package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.js +49 -0
  58. package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.js.map +1 -0
  59. package/dist/entities/issuanceBranding/ImageAttributesEntity.d.ts +14 -0
  60. package/dist/entities/issuanceBranding/ImageAttributesEntity.d.ts.map +1 -0
  61. package/dist/entities/issuanceBranding/ImageAttributesEntity.js +92 -0
  62. package/dist/entities/issuanceBranding/ImageAttributesEntity.js.map +1 -0
  63. package/dist/entities/issuanceBranding/ImageDimensionsEntity.d.ts +9 -0
  64. package/dist/entities/issuanceBranding/ImageDimensionsEntity.d.ts.map +1 -0
  65. package/dist/entities/issuanceBranding/ImageDimensionsEntity.js +39 -0
  66. package/dist/entities/issuanceBranding/ImageDimensionsEntity.js.map +1 -0
  67. package/dist/entities/issuanceBranding/IssuerBrandingEntity.d.ts +14 -0
  68. package/dist/entities/issuanceBranding/IssuerBrandingEntity.d.ts.map +1 -0
  69. package/dist/entities/issuanceBranding/IssuerBrandingEntity.js +95 -0
  70. package/dist/entities/issuanceBranding/IssuerBrandingEntity.js.map +1 -0
  71. package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.d.ts +9 -0
  72. package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.d.ts.map +1 -0
  73. package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.js +49 -0
  74. package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.js.map +1 -0
  75. package/dist/entities/issuanceBranding/TextAttributesEntity.d.ts +9 -0
  76. package/dist/entities/issuanceBranding/TextAttributesEntity.d.ts.map +1 -0
  77. package/dist/entities/issuanceBranding/TextAttributesEntity.js +62 -0
  78. package/dist/entities/issuanceBranding/TextAttributesEntity.js.map +1 -0
  79. package/dist/entities/validators/index.d.ts +7 -0
  80. package/dist/entities/validators/index.d.ts.map +1 -0
  81. package/dist/entities/validators/index.js +27 -0
  82. package/dist/entities/validators/index.js.map +1 -0
  83. package/dist/index.d.ts +27 -0
  84. package/dist/index.d.ts.map +1 -0
  85. package/dist/index.js +99 -0
  86. package/dist/index.js.map +1 -0
  87. package/dist/issuanceBranding/AbstractIssuanceBrandingStore.d.ts +20 -0
  88. package/dist/issuanceBranding/AbstractIssuanceBrandingStore.d.ts.map +1 -0
  89. package/dist/issuanceBranding/AbstractIssuanceBrandingStore.js +7 -0
  90. package/dist/issuanceBranding/AbstractIssuanceBrandingStore.js.map +1 -0
  91. package/dist/issuanceBranding/IssuanceBrandingStore.d.ts +31 -0
  92. package/dist/issuanceBranding/IssuanceBrandingStore.d.ts.map +1 -0
  93. package/dist/issuanceBranding/IssuanceBrandingStore.js +375 -0
  94. package/dist/issuanceBranding/IssuanceBrandingStore.js.map +1 -0
  95. package/dist/migrations/generic/1-CreateContacts.d.ts +7 -0
  96. package/dist/migrations/generic/1-CreateContacts.d.ts.map +1 -0
  97. package/dist/migrations/generic/1-CreateContacts.js +72 -0
  98. package/dist/migrations/generic/1-CreateContacts.js.map +1 -0
  99. package/dist/migrations/generic/1-CreateIssuanceBranding.d.ts +7 -0
  100. package/dist/migrations/generic/1-CreateIssuanceBranding.d.ts.map +1 -0
  101. package/dist/migrations/generic/1-CreateIssuanceBranding.js +72 -0
  102. package/dist/migrations/generic/1-CreateIssuanceBranding.js.map +1 -0
  103. package/dist/migrations/generic/index.d.ts +10 -0
  104. package/dist/migrations/generic/index.d.ts.map +1 -0
  105. package/dist/migrations/generic/index.js +14 -0
  106. package/dist/migrations/generic/index.js.map +1 -0
  107. package/dist/migrations/index.d.ts +2 -0
  108. package/dist/migrations/index.d.ts.map +1 -0
  109. package/dist/migrations/index.js +6 -0
  110. package/dist/migrations/index.js.map +1 -0
  111. package/dist/migrations/internal-migrations-ormconfig.d.ts +6 -0
  112. package/dist/migrations/internal-migrations-ormconfig.d.ts.map +1 -0
  113. package/dist/migrations/internal-migrations-ormconfig.js +29 -0
  114. package/dist/migrations/internal-migrations-ormconfig.js.map +1 -0
  115. package/dist/migrations/postgres/1659463079428-CreateContacts.d.ts +7 -0
  116. package/dist/migrations/postgres/1659463079428-CreateContacts.d.ts.map +1 -0
  117. package/dist/migrations/postgres/1659463079428-CreateContacts.js +55 -0
  118. package/dist/migrations/postgres/1659463079428-CreateContacts.js.map +1 -0
  119. package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.d.ts +7 -0
  120. package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.d.ts.map +1 -0
  121. package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js +67 -0
  122. package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js.map +1 -0
  123. package/dist/migrations/sqlite/1659463069549-CreateContacts.d.ts +7 -0
  124. package/dist/migrations/sqlite/1659463069549-CreateContacts.d.ts.map +1 -0
  125. package/dist/migrations/sqlite/1659463069549-CreateContacts.js +79 -0
  126. package/dist/migrations/sqlite/1659463069549-CreateContacts.js.map +1 -0
  127. package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.d.ts +7 -0
  128. package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.d.ts.map +1 -0
  129. package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.js +89 -0
  130. package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.js.map +1 -0
  131. package/dist/types/contact/IAbstractContactStore.d.ts +41 -0
  132. package/dist/types/contact/IAbstractContactStore.d.ts.map +1 -0
  133. package/dist/types/contact/IAbstractContactStore.js +3 -0
  134. package/dist/types/contact/IAbstractContactStore.js.map +1 -0
  135. package/dist/types/contact/contact.d.ts +91 -0
  136. package/dist/types/contact/contact.d.ts.map +1 -0
  137. package/dist/types/contact/contact.js +21 -0
  138. package/dist/types/contact/contact.js.map +1 -0
  139. package/dist/types/index.d.ts +5 -0
  140. package/dist/types/index.d.ts.map +1 -0
  141. package/dist/types/index.js +21 -0
  142. package/dist/types/index.js.map +1 -0
  143. package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.d.ts +59 -0
  144. package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.d.ts.map +1 -0
  145. package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.js +3 -0
  146. package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.js.map +1 -0
  147. package/dist/types/issuanceBranding/issuanceBranding.d.ts +115 -0
  148. package/dist/types/issuanceBranding/issuanceBranding.d.ts.map +1 -0
  149. package/dist/types/issuanceBranding/issuanceBranding.js +3 -0
  150. package/dist/types/issuanceBranding/issuanceBranding.js.map +1 -0
  151. package/package.json +45 -0
  152. package/src/__tests__/contact.entities.test.ts +911 -0
  153. package/src/__tests__/contact.store.test.ts +743 -0
  154. package/src/__tests__/issuanceBranding.entities.test.ts +844 -0
  155. package/src/__tests__/issuanceBranding.store.test.ts +1884 -0
  156. package/src/contact/AbstractContactStore.ts +27 -0
  157. package/src/contact/ContactStore.ts +371 -0
  158. package/src/entities/contact/BaseConfigEntity.ts +8 -0
  159. package/src/entities/contact/ConnectionEntity.ts +48 -0
  160. package/src/entities/contact/ContactEntity.ts +74 -0
  161. package/src/entities/contact/CorrelationIdentifierEntity.ts +41 -0
  162. package/src/entities/contact/DidAuthConfigEntity.ts +31 -0
  163. package/src/entities/contact/IdentityEntity.ts +104 -0
  164. package/src/entities/contact/IdentityMetadataItemEntity.ts +39 -0
  165. package/src/entities/contact/OpenIdConfigEntity.ts +48 -0
  166. package/src/entities/issuanceBranding/BackgroundAttributesEntity.ts +42 -0
  167. package/src/entities/issuanceBranding/BaseLocaleBrandingEntity.ts +86 -0
  168. package/src/entities/issuanceBranding/CredentialBrandingEntity.ts +78 -0
  169. package/src/entities/issuanceBranding/CredentialLocaleBrandingEntity.ts +33 -0
  170. package/src/entities/issuanceBranding/ImageAttributesEntity.ts +57 -0
  171. package/src/entities/issuanceBranding/ImageDimensionsEntity.ts +22 -0
  172. package/src/entities/issuanceBranding/IssuerBrandingEntity.ts +72 -0
  173. package/src/entities/issuanceBranding/IssuerLocaleBrandingEntity.ts +33 -0
  174. package/src/entities/issuanceBranding/TextAttributesEntity.ts +31 -0
  175. package/src/entities/validators/index.ts +16 -0
  176. package/src/index.ts +82 -0
  177. package/src/issuanceBranding/AbstractIssuanceBrandingStore.ts +41 -0
  178. package/src/issuanceBranding/IssuanceBrandingStore.ts +544 -0
  179. package/src/migrations/generic/1-CreateContacts.ts +54 -0
  180. package/src/migrations/generic/1-CreateIssuanceBranding.ts +54 -0
  181. package/src/migrations/generic/index.ts +11 -0
  182. package/src/migrations/index.ts +1 -0
  183. package/src/migrations/internal-migrations-ormconfig.ts +28 -0
  184. package/src/migrations/postgres/1659463079428-CreateContacts.ts +61 -0
  185. package/src/migrations/postgres/1685628974232-CreateIssuanceBranding.ts +83 -0
  186. package/src/migrations/sqlite/1659463069549-CreateContacts.ts +110 -0
  187. package/src/migrations/sqlite/1685628973231-CreateIssuanceBranding.ts +119 -0
  188. package/src/types/contact/IAbstractContactStore.ts +52 -0
  189. package/src/types/contact/contact.ts +101 -0
  190. package/src/types/index.ts +4 -0
  191. package/src/types/issuanceBranding/IAbstractIssuanceBrandingStore.ts +85 -0
  192. package/src/types/issuanceBranding/issuanceBranding.ts +120 -0
@@ -0,0 +1,72 @@
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.metadataItemEntityFrom = exports.IdentityMetadataItemEntity = void 0;
22
+ const typeorm_1 = require("typeorm");
23
+ const IdentityEntity_1 = require("./IdentityEntity");
24
+ const class_validator_1 = require("class-validator");
25
+ let IdentityMetadataItemEntity = class IdentityMetadataItemEntity 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
+ ], IdentityMetadataItemEntity.prototype, "id", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ name: 'label', length: 255, nullable: false }),
42
+ (0, class_validator_1.IsNotEmpty)({ message: 'Blank metadata labels are not allowed' }),
43
+ __metadata("design:type", String)
44
+ ], IdentityMetadataItemEntity.prototype, "label", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ name: 'value', length: 255, nullable: false }),
47
+ (0, class_validator_1.IsNotEmpty)({ message: 'Blank metadata values are not allowed' }),
48
+ __metadata("design:type", String)
49
+ ], IdentityMetadataItemEntity.prototype, "value", void 0);
50
+ __decorate([
51
+ (0, typeorm_1.ManyToOne)(() => IdentityEntity_1.IdentityEntity, (identity) => identity.metadata, { cascade: ['insert', 'update'], onDelete: 'CASCADE' }),
52
+ __metadata("design:type", IdentityEntity_1.IdentityEntity)
53
+ ], IdentityMetadataItemEntity.prototype, "identity", void 0);
54
+ __decorate([
55
+ (0, typeorm_1.BeforeInsert)(),
56
+ (0, typeorm_1.BeforeUpdate)(),
57
+ __metadata("design:type", Function),
58
+ __metadata("design:paramtypes", []),
59
+ __metadata("design:returntype", Promise)
60
+ ], IdentityMetadataItemEntity.prototype, "validate", null);
61
+ IdentityMetadataItemEntity = __decorate([
62
+ (0, typeorm_1.Entity)('IdentityMetadata')
63
+ ], IdentityMetadataItemEntity);
64
+ exports.IdentityMetadataItemEntity = IdentityMetadataItemEntity;
65
+ const metadataItemEntityFrom = (item) => {
66
+ const metadataItem = new IdentityMetadataItemEntity();
67
+ metadataItem.label = item.label;
68
+ metadataItem.value = item.value;
69
+ return metadataItem;
70
+ };
71
+ exports.metadataItemEntityFrom = metadataItemEntityFrom;
72
+ //# sourceMappingURL=IdentityMetadataItemEntity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IdentityMetadataItemEntity.js","sourceRoot":"","sources":["../../../src/entities/contact/IdentityMetadataItemEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,qCAAmH;AAEnH,qDAAiD;AACjD,qDAAuE;AAGhE,IAAM,0BAA0B,GAAhC,MAAM,0BAA2B,SAAQ,oBAAU;IAiBlD,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;AAvBC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;sDACpB;AAEX;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACvD,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,uCAAuC,EAAE,CAAC;;yDACnD;AAEd;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACvD,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,uCAAuC,EAAE,CAAC;;yDACnD;AAEd;IAAC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,+BAAc,EAAE,CAAC,QAAwB,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;8BAC9H,+BAAc;4DAAA;AAInB;IAFL,IAAA,sBAAY,GAAE;IACd,IAAA,sBAAY,GAAE;;;;0DAOd;AAvBU,0BAA0B;IADtC,IAAA,gBAAM,EAAC,kBAAkB,CAAC;GACd,0BAA0B,CAwBtC;AAxBY,gEAA0B;AA0BhC,MAAM,sBAAsB,GAAG,CAAC,IAAuB,EAA8B,EAAE;IAC5F,MAAM,YAAY,GAAG,IAAI,0BAA0B,EAAE,CAAA;IACrD,YAAY,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;IAC/B,YAAY,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;IAE/B,OAAO,YAAY,CAAA;AACrB,CAAC,CAAA;AANY,QAAA,sBAAsB,0BAMlC"}
@@ -0,0 +1,15 @@
1
+ import { BaseConfigEntity } from './BaseConfigEntity';
2
+ import { BasicOpenIdConfig } from '../../types';
3
+ import { ConnectionEntity } from './ConnectionEntity';
4
+ export declare class OpenIdConfigEntity extends BaseConfigEntity {
5
+ clientId: string;
6
+ clientSecret: string;
7
+ scopes: Array<string>;
8
+ issuer: string;
9
+ redirectUrl: string;
10
+ dangerouslyAllowInsecureHttpRequests: boolean;
11
+ clientAuthMethod: 'basic' | 'post' | undefined;
12
+ connection?: ConnectionEntity;
13
+ }
14
+ export declare const openIdConfigEntityFrom: (config: BasicOpenIdConfig) => OpenIdConfigEntity;
15
+ //# sourceMappingURL=OpenIdConfigEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OpenIdConfigEntity.d.ts","sourceRoot":"","sources":["../../../src/entities/contact/OpenIdConfigEntity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,qBACa,kBAAmB,SAAQ,gBAAgB;IAEtD,QAAQ,EAAG,MAAM,CAAA;IAGjB,YAAY,EAAG,MAAM,CAAA;IAGrB,MAAM,EAAG,KAAK,CAAC,MAAM,CAAC,CAAA;IAGtB,MAAM,EAAG,MAAM,CAAA;IAGf,WAAW,EAAG,MAAM,CAAA;IAGpB,oCAAoC,EAAG,OAAO,CAAA;IAG9C,gBAAgB,EAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;IAO/C,UAAU,CAAC,EAAE,gBAAgB,CAAA;CAC9B;AAED,eAAO,MAAM,sBAAsB,WAAY,iBAAiB,KAAG,kBAWlE,CAAA"}
@@ -0,0 +1,70 @@
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.openIdConfigEntityFrom = exports.OpenIdConfigEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseConfigEntity_1 = require("./BaseConfigEntity");
15
+ const ConnectionEntity_1 = require("./ConnectionEntity");
16
+ let OpenIdConfigEntity = class OpenIdConfigEntity extends BaseConfigEntity_1.BaseConfigEntity {
17
+ };
18
+ __decorate([
19
+ (0, typeorm_1.Column)({ name: 'client_id', length: 255, nullable: false }),
20
+ __metadata("design:type", String)
21
+ ], OpenIdConfigEntity.prototype, "clientId", void 0);
22
+ __decorate([
23
+ (0, typeorm_1.Column)({ name: 'client_secret', length: 255, nullable: false }),
24
+ __metadata("design:type", String)
25
+ ], OpenIdConfigEntity.prototype, "clientSecret", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.Column)('simple-array', { name: 'scopes', nullable: false }),
28
+ __metadata("design:type", Array)
29
+ ], OpenIdConfigEntity.prototype, "scopes", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.Column)({ name: 'issuer', length: 255, nullable: false }),
32
+ __metadata("design:type", String)
33
+ ], OpenIdConfigEntity.prototype, "issuer", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)('text', { name: 'redirect_url', nullable: false }),
36
+ __metadata("design:type", String)
37
+ ], OpenIdConfigEntity.prototype, "redirectUrl", void 0);
38
+ __decorate([
39
+ (0, typeorm_1.Column)('boolean', { name: 'dangerously_allow_insecure_http_requests', nullable: false }),
40
+ __metadata("design:type", Boolean)
41
+ ], OpenIdConfigEntity.prototype, "dangerouslyAllowInsecureHttpRequests", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.Column)('text', { name: 'client_auth_method', nullable: false }),
44
+ __metadata("design:type", Object)
45
+ ], OpenIdConfigEntity.prototype, "clientAuthMethod", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.OneToOne)(() => ConnectionEntity_1.ConnectionEntity, (connection) => connection.config, {
48
+ cascade: ['insert', 'update'],
49
+ onDelete: 'CASCADE',
50
+ }),
51
+ (0, typeorm_1.JoinColumn)({ name: 'connectionId' }),
52
+ __metadata("design:type", ConnectionEntity_1.ConnectionEntity)
53
+ ], OpenIdConfigEntity.prototype, "connection", void 0);
54
+ OpenIdConfigEntity = __decorate([
55
+ (0, typeorm_1.ChildEntity)('OpenIdConfig')
56
+ ], OpenIdConfigEntity);
57
+ exports.OpenIdConfigEntity = OpenIdConfigEntity;
58
+ const openIdConfigEntityFrom = (config) => {
59
+ const openIdConfig = new OpenIdConfigEntity();
60
+ openIdConfig.clientId = config.clientId;
61
+ openIdConfig.clientSecret = config.clientSecret;
62
+ openIdConfig.scopes = config.scopes;
63
+ openIdConfig.issuer = config.issuer;
64
+ openIdConfig.redirectUrl = config.redirectUrl;
65
+ openIdConfig.dangerouslyAllowInsecureHttpRequests = config.dangerouslyAllowInsecureHttpRequests;
66
+ openIdConfig.clientAuthMethod = config.clientAuthMethod;
67
+ return openIdConfig;
68
+ };
69
+ exports.openIdConfigEntityFrom = openIdConfigEntityFrom;
70
+ //# sourceMappingURL=OpenIdConfigEntity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OpenIdConfigEntity.js","sourceRoot":"","sources":["../../../src/entities/contact/OpenIdConfigEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAmE;AACnE,yDAAqD;AAErD,yDAAqD;AAG9C,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,mCAAgB;CA4BvD,CAAA;AA3BC;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;oDAC3C;AAEjB;IAAC,IAAA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GAAG,MAAM,CAAC,QAAQ,CAAA;IACvC,YAAY,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAA;IAC/C,YAAY,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAA;IACnC,YAAY,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAA;IACnC,YAAY,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAA;IAC7C,YAAY,CAAC,oCAAoC,GAAG,MAAM,CAAC,oCAAoC,CAAA;IAC/F,YAAY,CAAC,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAA;IAEvD,OAAO,YAAY,CAAA;AACrB,CAAC,CAAA;AAXY,QAAA,sBAAsB,0BAWlC"}
@@ -0,0 +1,11 @@
1
+ import { BaseEntity } from 'typeorm';
2
+ import { IBasicBackgroundAttributes } from '../../types';
3
+ import { ImageAttributesEntity } from './ImageAttributesEntity';
4
+ export declare class BackgroundAttributesEntity extends BaseEntity {
5
+ id: string;
6
+ color?: string;
7
+ image?: ImageAttributesEntity;
8
+ validate(): Promise<undefined>;
9
+ }
10
+ export declare const backgroundAttributesEntityFrom: (args: IBasicBackgroundAttributes) => BackgroundAttributesEntity;
11
+ //# sourceMappingURL=BackgroundAttributesEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackgroundAttributesEntity.d.ts","sourceRoot":"","sources":["../../../src/entities/issuanceBranding/BackgroundAttributesEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA4F,MAAM,SAAS,CAAA;AAC9H,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EAAE,qBAAqB,EAA6B,MAAM,yBAAyB,CAAA;AAI1F,qBACa,0BAA2B,SAAQ,UAAU;IAExD,EAAE,EAAG,MAAM,CAAA;IAIX,KAAK,CAAC,EAAE,MAAM,CAAA;IASd,KAAK,CAAC,EAAE,qBAAqB,CAAA;IAIvB,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC;CAOrC;AAED,eAAO,MAAM,8BAA8B,SAAU,0BAA0B,KAAG,0BAMjF,CAAA"}
@@ -0,0 +1,74 @@
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.backgroundAttributesEntityFrom = exports.BackgroundAttributesEntity = void 0;
22
+ const typeorm_1 = require("typeorm");
23
+ const ImageAttributesEntity_1 = require("./ImageAttributesEntity");
24
+ const class_validator_1 = require("class-validator");
25
+ const validators_1 = require("../validators");
26
+ let BackgroundAttributesEntity = class BackgroundAttributesEntity 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
+ ], BackgroundAttributesEntity.prototype, "id", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ name: 'color', length: 255, nullable: true, unique: false }),
43
+ (0, class_validator_1.Validate)(validators_1.IsNonEmptyStringConstraint, { message: 'Blank background colors are not allowed' }),
44
+ __metadata("design:type", String)
45
+ ], BackgroundAttributesEntity.prototype, "color", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.OneToOne)(() => ImageAttributesEntity_1.ImageAttributesEntity, {
48
+ cascade: true,
49
+ onDelete: 'CASCADE',
50
+ eager: true,
51
+ nullable: true,
52
+ }),
53
+ (0, typeorm_1.JoinColumn)({ name: 'imageId' }),
54
+ __metadata("design:type", ImageAttributesEntity_1.ImageAttributesEntity)
55
+ ], BackgroundAttributesEntity.prototype, "image", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.BeforeInsert)(),
58
+ (0, typeorm_1.BeforeUpdate)(),
59
+ __metadata("design:type", Function),
60
+ __metadata("design:paramtypes", []),
61
+ __metadata("design:returntype", Promise)
62
+ ], BackgroundAttributesEntity.prototype, "validate", null);
63
+ BackgroundAttributesEntity = __decorate([
64
+ (0, typeorm_1.Entity)('BackgroundAttributes')
65
+ ], BackgroundAttributesEntity);
66
+ exports.BackgroundAttributesEntity = BackgroundAttributesEntity;
67
+ const backgroundAttributesEntityFrom = (args) => {
68
+ const backgroundAttributesEntity = new BackgroundAttributesEntity();
69
+ backgroundAttributesEntity.color = (0, validators_1.isEmptyString)(args.color) ? undefined : args.color;
70
+ backgroundAttributesEntity.image = args.image ? (0, ImageAttributesEntity_1.imageAttributesEntityFrom)(args.image) : undefined;
71
+ return backgroundAttributesEntity;
72
+ };
73
+ exports.backgroundAttributesEntityFrom = backgroundAttributesEntityFrom;
74
+ //# sourceMappingURL=BackgroundAttributesEntity.js.map
@@ -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;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IACrE,IAAA,0BAAQ,EAAC,uCAA0B,EAAE,EAAE,OAAO,EAAE,yCAAyC,EAAE,CAAC;;yDAC/E;AAEd;IAAC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,6CAAqB,EAAE;QACrC,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;8BACxB,6CAAqB;yDAAA;AAIvB;IAFL,IAAA,sBAAY,GAAE;IACd,IAAA,sBAAY,GAAE;;;;0DAOd;AAzBU,0BAA0B;IADtC,IAAA,gBAAM,EAAC,sBAAsB,CAAC;GAClB,0BAA0B,CA0BtC;AA1BY,gEAA0B;AA4BhC,MAAM,8BAA8B,GAAG,CAAC,IAAgC,EAA8B,EAAE;IAC7G,MAAM,0BAA0B,GAA+B,IAAI,0BAA0B,EAAE,CAAA;IAC/F,0BAA0B,CAAC,KAAK,GAAG,IAAA,0BAAa,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAA;IACrF,0BAA0B,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAA,iDAAyB,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAEjG,OAAO,0BAA0B,CAAA;AACnC,CAAC,CAAA;AANY,QAAA,8BAA8B,kCAM1C"}
@@ -0,0 +1,18 @@
1
+ import { BaseEntity } from 'typeorm';
2
+ import { ImageAttributesEntity } from './ImageAttributesEntity';
3
+ import { BackgroundAttributesEntity } 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,wBAAyB,SAAQ,oBAAU;IAgDtD,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,CAA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,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;8BACxB,uDAA0B;4DAAA;AAEvC;IAAC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,2CAAoB,EAAE;QACpC,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;8BACxB,2CAAoB;sDAAA;AAE3B;IAAC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;8BAC9C,IAAI;2DAAA;AAEhB;IAAC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;8BAC/C,IAAI;IAEpB,qHAAqH;;+DAFjG;AAGpB;IAAC,IAAA,sBAAY,GAAE;IACd,IAAA,sBAAY,GAAE;;;;iEAGd;AAIK;IAFL,IAAA,sBAAY,GAAE;IACd,IAAA,sBAAY,GAAE;;;;wDAOd;AA/DU,wBAAwB;IAFpC,IAAA,gBAAM,EAAC,oBAAoB,CAAC;IAC5B,IAAA,0BAAgB,EAAC,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;GACnD,wBAAwB,CAgEpC;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,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QAAQ,CAAC,CAAC;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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