@intelact/gnosa 0.1.3 → 0.1.5

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 (44) hide show
  1. package/lib/book/book.dto.d.ts +9 -11
  2. package/lib/book/book.dto.js +16 -29
  3. package/lib/book/book.dto.js.map +1 -1
  4. package/lib/book/book.model.d.ts +0 -4
  5. package/lib/book/book.model.js +0 -8
  6. package/lib/book/book.model.js.map +1 -1
  7. package/lib/contact/contact.dto.d.ts +16 -0
  8. package/lib/contact/contact.dto.js +81 -0
  9. package/lib/contact/contact.dto.js.map +1 -0
  10. package/lib/discover/discover.dto.d.ts +9 -8
  11. package/lib/discover/discover.dto.js +20 -20
  12. package/lib/discover/discover.dto.js.map +1 -1
  13. package/lib/discover/discover.model.d.ts +15 -8
  14. package/lib/discover/discover.model.js +32 -12
  15. package/lib/discover/discover.model.js.map +1 -1
  16. package/lib/event/event.dto.d.ts +12 -24
  17. package/lib/event/event.dto.js +19 -45
  18. package/lib/event/event.dto.js.map +1 -1
  19. package/lib/foundation/history.dto.d.ts +51 -23
  20. package/lib/foundation/history.dto.js +103 -77
  21. package/lib/foundation/history.dto.js.map +1 -1
  22. package/lib/foundation/history.model.d.ts +4 -1
  23. package/lib/foundation/history.model.js +8 -1
  24. package/lib/foundation/history.model.js.map +1 -1
  25. package/lib/foundation/identity.model.d.ts +30 -0
  26. package/lib/foundation/identity.model.js +94 -0
  27. package/lib/foundation/identity.model.js.map +1 -0
  28. package/lib/foundation/partner.dto.d.ts +6 -2
  29. package/lib/foundation/partner.dto.js +6 -2
  30. package/lib/foundation/partner.dto.js.map +1 -1
  31. package/lib/foundation/person.dto.d.ts +6 -1
  32. package/lib/foundation/person.dto.js +12 -1
  33. package/lib/foundation/person.dto.js.map +1 -1
  34. package/lib/index.d.ts +2 -0
  35. package/lib/index.js +2 -0
  36. package/lib/index.js.map +1 -1
  37. package/lib/magazine/magazine.dto.d.ts +3 -2
  38. package/lib/magazine/magazine.dto.js +3 -2
  39. package/lib/magazine/magazine.dto.js.map +1 -1
  40. package/lib/order/order.dto.d.ts +0 -8
  41. package/lib/order/order.dto.js +0 -20
  42. package/lib/order/order.dto.js.map +1 -1
  43. package/lib/tsconfig.tsbuildinfo +1 -1
  44. package/package.json +1 -1
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.EventFilterDto = exports.EventCatalogueFilterDto = exports.EventSeoDescriptionDto = exports.EventSeoTitleDto = exports.EventLocationAddressDto = exports.EventLocationNameDto = exports.EventDescriptionDto = exports.EventShortDescriptionDto = exports.EventTitleDto = exports.EventLanguagesDto = exports.EventStartDateDto = exports.EventSpeakerDto = exports.EventSpeakerTranslationsDto = exports.EventSpeakerTranslationDto = void 0;
12
+ exports.EventFilterDto = exports.EventSeoDescriptionDto = exports.EventSeoTitleDto = exports.EventLocationAddressDto = exports.EventLocationNameDto = exports.EventDescriptionDto = exports.EventShortDescriptionDto = exports.EventTitleDto = exports.EventLanguagesDto = exports.EventStartDateDto = exports.EventSpeakerDto = exports.EventSpeakerTranslationsDto = exports.EventSpeakerTranslationDto = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
14
  const common_1 = require("@intelact/common");
15
15
  const class_transformer_1 = require("class-transformer");
@@ -25,12 +25,15 @@ class EventSpeakerTranslationDto {
25
25
  }
26
26
  exports.EventSpeakerTranslationDto = EventSpeakerTranslationDto;
27
27
  __decorate([
28
- (0, class_validator_1.IsOptional)(),
29
- (0, class_validator_1.IsString)({ message: 'gnosa.validation.event.speakerDescription' }),
28
+ (0, class_validator_1.IsNotEmpty)({ message: 'gnosa.validation.shortDescription.required' }),
29
+ (0, class_validator_1.IsString)({ message: 'gnosa.validation.shortDescription.required' }),
30
30
  (0, class_validator_1.MaxLength)(1000, { message: 'gnosa.validation.event.speakerDescription' }),
31
31
  (0, common_1.Trim)(),
32
32
  __metadata("design:type", String)
33
33
  ], EventSpeakerTranslationDto.prototype, "description", void 0);
34
+ /**
35
+ * A speaker's short description is required in all three languages.
36
+ */
34
37
  class EventSpeakerTranslationsDto {
35
38
  sq;
36
39
  en;
@@ -41,60 +44,49 @@ class EventSpeakerTranslationsDto {
41
44
  }
42
45
  exports.EventSpeakerTranslationsDto = EventSpeakerTranslationsDto;
43
46
  __decorate([
44
- (0, class_validator_1.IsOptional)(),
45
- (0, class_validator_1.ValidateNested)(),
47
+ (0, class_validator_1.IsDefined)({ message: 'gnosa.validation.translations.sq' }),
48
+ (0, class_validator_1.ValidateNested)({ message: 'gnosa.validation.translations.sq' }),
46
49
  (0, class_transformer_1.Type)(() => EventSpeakerTranslationDto),
47
50
  __metadata("design:type", EventSpeakerTranslationDto)
48
51
  ], EventSpeakerTranslationsDto.prototype, "sq", void 0);
49
52
  __decorate([
50
- (0, class_validator_1.IsOptional)(),
51
- (0, class_validator_1.ValidateNested)(),
53
+ (0, class_validator_1.IsDefined)({ message: 'gnosa.validation.translations.en' }),
54
+ (0, class_validator_1.ValidateNested)({ message: 'gnosa.validation.translations.en' }),
52
55
  (0, class_transformer_1.Type)(() => EventSpeakerTranslationDto),
53
56
  __metadata("design:type", EventSpeakerTranslationDto)
54
57
  ], EventSpeakerTranslationsDto.prototype, "en", void 0);
55
58
  __decorate([
56
- (0, class_validator_1.IsOptional)(),
57
- (0, class_validator_1.ValidateNested)(),
59
+ (0, class_validator_1.IsDefined)({ message: 'gnosa.validation.translations.mk' }),
60
+ (0, class_validator_1.ValidateNested)({ message: 'gnosa.validation.translations.mk' }),
58
61
  (0, class_transformer_1.Type)(() => EventSpeakerTranslationDto),
59
62
  __metadata("design:type", EventSpeakerTranslationDto)
60
63
  ], EventSpeakerTranslationsDto.prototype, "mk", void 0);
61
64
  /**
62
- * A speaker or artist of the event, sent as a multipart form together with the optional `file`
63
- * image. Saving a speaker replaces its name and descriptions; either may be empty while the event is
64
- * a Draft, and publishing requires both.
65
+ * A speaker or artist of the event, sent as a multipart form together with the image `file`, which
66
+ * is required when the speaker is added. A speaker is always complete: the name, the image and the
67
+ * short description in all three languages.
65
68
  */
66
69
  class EventSpeakerDto {
67
70
  name;
68
71
  translations;
69
- /**
70
- * Removes the speaker's image when no new `file` is sent. Left out, the image is kept. Read from
71
- * the raw form value: the implicit conversion would turn the text `"false"` into `true`.
72
- */
73
- removeImage;
74
72
  constructor(props) {
75
73
  Object.assign(this, props);
76
74
  }
77
75
  }
78
76
  exports.EventSpeakerDto = EventSpeakerDto;
79
77
  __decorate([
80
- (0, class_validator_1.IsOptional)(),
81
- (0, class_validator_1.IsString)({ message: 'gnosa.validation.event.speakerName' }),
78
+ (0, class_validator_1.IsNotEmpty)({ message: 'gnosa.validation.name.required' }),
79
+ (0, class_validator_1.IsString)({ message: 'gnosa.validation.name.required' }),
82
80
  (0, class_validator_1.MaxLength)(255, { message: 'gnosa.validation.event.speakerName' }),
83
81
  (0, common_1.Trim)(),
84
82
  __metadata("design:type", String)
85
83
  ], EventSpeakerDto.prototype, "name", void 0);
86
84
  __decorate([
87
- (0, class_validator_1.IsOptional)(),
88
- (0, class_validator_1.ValidateNested)(),
85
+ (0, class_validator_1.IsDefined)({ message: 'gnosa.validation.translations.required' }),
86
+ (0, class_validator_1.ValidateNested)({ message: 'gnosa.validation.translations.required' }),
89
87
  (0, class_transformer_1.Type)(() => EventSpeakerTranslationsDto),
90
88
  __metadata("design:type", EventSpeakerTranslationsDto)
91
89
  ], EventSpeakerDto.prototype, "translations", void 0);
92
- __decorate([
93
- (0, class_validator_1.IsOptional)(),
94
- (0, class_validator_1.IsBoolean)(),
95
- (0, class_transformer_1.Transform)(({ obj, key }) => obj[key] === true || obj[key] === 'true'),
96
- __metadata("design:type", Boolean)
97
- ], EventSpeakerDto.prototype, "removeImage", void 0);
98
90
  /**
99
91
  * Saves the event's `startDate`. `null` clears it.
100
92
  *
@@ -259,24 +251,6 @@ __decorate([
259
251
  (0, common_1.Trim)(),
260
252
  __metadata("design:type", String)
261
253
  ], EventSeoDescriptionDto.prototype, "seoDescription", void 0);
262
- /**
263
- * The filters of the public Events Catalogue.
264
- */
265
- class EventCatalogueFilterDto {
266
- /**
267
- * Upcoming (the default) or past events.
268
- */
269
- period;
270
- constructor(props) {
271
- Object.assign(this, props);
272
- }
273
- }
274
- exports.EventCatalogueFilterDto = EventCatalogueFilterDto;
275
- __decorate([
276
- (0, class_validator_1.IsOptional)(),
277
- (0, class_validator_1.IsEnum)(event_enum_1.EventPeriod, { message: 'gnosa.validation.filter' }),
278
- __metadata("design:type", String)
279
- ], EventCatalogueFilterDto.prototype, "period", void 0);
280
254
  /**
281
255
  * The search and filters of the admin Events List.
282
256
  */
@@ -1 +1 @@
1
- {"version":3,"file":"event.dto.js","sourceRoot":"","sources":["../../src/event/event.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAsH;AACtH,6CAAwC;AACxC,yDAAoD;AAEpD,sEAAyD;AACzD,6CAAwD;AACxD,0DAAsD;AACtD,4DAAoD;AAEpD,MAAa,0BAA0B;IAKtC,WAAW,CAAU;IAErB,YAAY,KAA2C;QACtD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD;AAVD,gEAUC;AALA;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,2CAA2C,EAAE,CAAC;IAClE,IAAA,2BAAS,EAAC,IAAI,EAAE,EAAE,OAAO,EAAE,2CAA2C,EAAE,CAAC;IACzE,IAAA,aAAI,GAAE;;+DACc;AAOtB,MAAa,2BAA2B;IAIvC,EAAE,CAA8B;IAKhC,EAAE,CAA8B;IAKhC,EAAE,CAA8B;IAEhC,YAAY,KAA4C;QACvD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD;AAnBD,kEAmBC;AAfA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AAC;IAC9D,IAAA,2BAAS,EAAC,IAAI,EAAE,EAAE,OAAO,EAAE,uCAAuC,EAAE,CAAC;IACrE,IAAA,aAAI,GAAE;;8DACiB;AAQzB;;GAEG;AACH,MAAa,cAAc;IAC1B;;OAEG;IAIH,MAAM,CAAU;IAIhB,MAAM,CAAe;IAIrB,MAAM,CAAe;IAErB,YAAY,KAA+B;QAC1C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD;AApBD,wCAoBC;AAbA;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,yBAAyB,EAAE,CAAC;IAChD,IAAA,aAAI,GAAE;;8CACS;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,wBAAW,EAAE,EAAE,OAAO,EAAE,yBAAyB,EAAE,CAAC;;8CACvC;AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,wBAAW,EAAE,EAAE,OAAO,EAAE,yBAAyB,EAAE,CAAC;;8CACvC"}
@@ -1,32 +1,60 @@
1
- export declare class HistoryTranslationDto {
2
- title: string;
3
- shortDescription: string;
4
- /**
5
- * The full description.
6
- */
7
- description: string;
8
- seoTitle: string;
9
- seoDescription: string;
10
- constructor(props?: Partial<HistoryTranslationDto>);
1
+ import { PublishStatus } from '../general/publish-status.enum';
2
+ import { LanguageDto } from '../general/language.dto';
3
+ /**
4
+ * Saves the entry's `date`. `null` clears it.
5
+ *
6
+ * In UTC, as an ISO 8601 date.
7
+ */
8
+ export declare class HistoryDateDto {
9
+ date?: Date;
10
+ constructor(props?: Partial<HistoryDateDto>);
11
+ }
12
+ /**
13
+ * Saves the entry's `title` in one language, sent with its `language`. `null` clears it.
14
+ *
15
+ * A new Albanian title gives the entry a new slug.
16
+ */
17
+ export declare class HistoryTitleDto extends LanguageDto {
18
+ title?: string;
19
+ constructor(props?: Partial<HistoryTitleDto>);
20
+ }
21
+ /**
22
+ * Saves the entry's `shortDescription` in one language, sent with its `language`. `null` clears it.
23
+ */
24
+ export declare class HistoryShortDescriptionDto extends LanguageDto {
25
+ shortDescription?: string;
26
+ constructor(props?: Partial<HistoryShortDescriptionDto>);
27
+ }
28
+ /**
29
+ * Saves the entry's `description` (the full description) in one language, sent with its
30
+ * `language`. `null` clears it.
31
+ */
32
+ export declare class HistoryDescriptionDto extends LanguageDto {
33
+ description?: string;
34
+ constructor(props?: Partial<HistoryDescriptionDto>);
35
+ }
36
+ /**
37
+ * Saves the entry's `seoTitle` in one language, sent with its `language`. `null` clears it.
38
+ */
39
+ export declare class HistorySeoTitleDto extends LanguageDto {
40
+ seoTitle?: string;
41
+ constructor(props?: Partial<HistorySeoTitleDto>);
11
42
  }
12
43
  /**
13
- * A history entry is never a draft, so every localized field is required in all three languages.
44
+ * Saves the entry's `seoDescription` in one language, sent with its `language`. `null` clears it.
14
45
  */
15
- export declare class HistoryTranslationsDto {
16
- sq: HistoryTranslationDto;
17
- en: HistoryTranslationDto;
18
- mk: HistoryTranslationDto;
19
- constructor(props?: Partial<HistoryTranslationsDto>);
46
+ export declare class HistorySeoDescriptionDto extends LanguageDto {
47
+ seoDescription?: string;
48
+ constructor(props?: Partial<HistorySeoDescriptionDto>);
20
49
  }
21
50
  /**
22
- * The fields of a history entry, sent as a multipart form together with the image `file`, which is
23
- * required when the entry is created.
51
+ * The search and filter of the admin History List.
24
52
  */
25
- export declare class HistoryDto {
53
+ export declare class HistoryFilterDto {
26
54
  /**
27
- * In UTC, as an ISO 8601 date.
55
+ * Matches the title, in any language.
28
56
  */
29
- date: Date;
30
- translations: HistoryTranslationsDto;
31
- constructor(props?: Partial<HistoryDto>);
57
+ phrase?: string;
58
+ status?: PublishStatus;
59
+ constructor(props?: Partial<HistoryFilterDto>);
32
60
  }
@@ -9,120 +9,146 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.HistoryDto = exports.HistoryTranslationsDto = exports.HistoryTranslationDto = void 0;
12
+ exports.HistoryFilterDto = exports.HistorySeoDescriptionDto = exports.HistorySeoTitleDto = exports.HistoryDescriptionDto = exports.HistoryShortDescriptionDto = exports.HistoryTitleDto = exports.HistoryDateDto = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
14
  const common_1 = require("@intelact/common");
15
- const class_transformer_1 = require("class-transformer");
15
+ const publish_status_enum_1 = require("../general/publish-status.enum");
16
16
  const transformers_helper_1 = require("../utils/transformers.helper");
17
+ const language_dto_1 = require("../general/language.dto");
17
18
  /**
18
- * A missing date is asked for, and only a date that was given is called invalid.
19
+ * Saves the entry's `date`. `null` clears it.
20
+ *
21
+ * In UTC, as an ISO 8601 date.
19
22
  */
20
- const dateMessage = (args) => args.value === undefined || args.value === null || args.value === ''
21
- ? 'gnosa.validation.date.required'
22
- : 'gnosa.validation.date.invalid';
23
- class HistoryTranslationDto {
24
- title;
25
- shortDescription;
26
- /**
27
- * The full description.
28
- */
29
- description;
30
- seoTitle;
31
- seoDescription;
23
+ class HistoryDateDto {
24
+ date;
32
25
  constructor(props) {
33
26
  Object.assign(this, props);
34
27
  }
35
28
  }
36
- exports.HistoryTranslationDto = HistoryTranslationDto;
29
+ exports.HistoryDateDto = HistoryDateDto;
37
30
  __decorate([
38
- (0, class_validator_1.IsNotEmpty)({ message: 'gnosa.validation.title.required' }),
39
- (0, class_validator_1.IsString)({ message: 'gnosa.validation.title.required' }),
40
- (0, class_validator_1.MaxLength)(255, { message: 'gnosa.validation.title.invalid' }),
41
- (0, common_1.Trim)(),
42
- __metadata("design:type", String)
43
- ], HistoryTranslationDto.prototype, "title", void 0);
31
+ (0, class_validator_1.IsOptional)(),
32
+ (0, class_validator_1.IsDate)({ message: 'gnosa.validation.date.invalid' }),
33
+ (0, transformers_helper_1.ToUtcDate)(),
34
+ __metadata("design:type", Date)
35
+ ], HistoryDateDto.prototype, "date", void 0);
36
+ /**
37
+ * Saves the entry's `title` in one language, sent with its `language`. `null` clears it.
38
+ *
39
+ * A new Albanian title gives the entry a new slug.
40
+ */
41
+ class HistoryTitleDto extends language_dto_1.LanguageDto {
42
+ title;
43
+ constructor(props) {
44
+ super();
45
+ Object.assign(this, props);
46
+ }
47
+ }
48
+ exports.HistoryTitleDto = HistoryTitleDto;
44
49
  __decorate([
45
- (0, class_validator_1.IsNotEmpty)({ message: 'gnosa.validation.shortDescription.required' }),
46
- (0, class_validator_1.IsString)({ message: 'gnosa.validation.shortDescription.required' }),
47
- (0, class_validator_1.MaxLength)(1000, { message: 'gnosa.validation.shortDescription.invalid' }),
50
+ (0, class_validator_1.IsOptional)(),
51
+ (0, class_validator_1.IsString)({ message: 'gnosa.validation.history.title' }),
52
+ (0, class_validator_1.MaxLength)(255, { message: 'gnosa.validation.history.title' }),
48
53
  (0, common_1.Trim)(),
49
54
  __metadata("design:type", String)
50
- ], HistoryTranslationDto.prototype, "shortDescription", void 0);
55
+ ], HistoryTitleDto.prototype, "title", void 0);
56
+ /**
57
+ * Saves the entry's `shortDescription` in one language, sent with its `language`. `null` clears it.
58
+ */
59
+ class HistoryShortDescriptionDto extends language_dto_1.LanguageDto {
60
+ shortDescription;
61
+ constructor(props) {
62
+ super();
63
+ Object.assign(this, props);
64
+ }
65
+ }
66
+ exports.HistoryShortDescriptionDto = HistoryShortDescriptionDto;
51
67
  __decorate([
52
- (0, class_validator_1.IsNotEmpty)({ message: 'gnosa.validation.description.required' }),
53
- (0, class_validator_1.IsString)({ message: 'gnosa.validation.description.required' }),
54
- (0, class_validator_1.MaxLength)(10000, { message: 'gnosa.validation.description.invalid' }),
68
+ (0, class_validator_1.IsOptional)(),
69
+ (0, class_validator_1.IsString)({ message: 'gnosa.validation.history.shortDescription' }),
70
+ (0, class_validator_1.MaxLength)(1000, { message: 'gnosa.validation.history.shortDescription' }),
55
71
  (0, common_1.Trim)(),
56
72
  __metadata("design:type", String)
57
- ], HistoryTranslationDto.prototype, "description", void 0);
73
+ ], HistoryShortDescriptionDto.prototype, "shortDescription", void 0);
74
+ /**
75
+ * Saves the entry's `description` (the full description) in one language, sent with its
76
+ * `language`. `null` clears it.
77
+ */
78
+ class HistoryDescriptionDto extends language_dto_1.LanguageDto {
79
+ description;
80
+ constructor(props) {
81
+ super();
82
+ Object.assign(this, props);
83
+ }
84
+ }
85
+ exports.HistoryDescriptionDto = HistoryDescriptionDto;
58
86
  __decorate([
59
- (0, class_validator_1.IsNotEmpty)({ message: 'gnosa.validation.seoTitle.required' }),
60
- (0, class_validator_1.IsString)({ message: 'gnosa.validation.seoTitle.required' }),
61
- (0, class_validator_1.MaxLength)(255, { message: 'gnosa.validation.seoTitle.invalid' }),
87
+ (0, class_validator_1.IsOptional)(),
88
+ (0, class_validator_1.IsString)({ message: 'gnosa.validation.history.description' }),
89
+ (0, class_validator_1.MaxLength)(10000, { message: 'gnosa.validation.history.description' }),
62
90
  (0, common_1.Trim)(),
63
91
  __metadata("design:type", String)
64
- ], HistoryTranslationDto.prototype, "seoTitle", void 0);
92
+ ], HistoryDescriptionDto.prototype, "description", void 0);
93
+ /**
94
+ * Saves the entry's `seoTitle` in one language, sent with its `language`. `null` clears it.
95
+ */
96
+ class HistorySeoTitleDto extends language_dto_1.LanguageDto {
97
+ seoTitle;
98
+ constructor(props) {
99
+ super();
100
+ Object.assign(this, props);
101
+ }
102
+ }
103
+ exports.HistorySeoTitleDto = HistorySeoTitleDto;
65
104
  __decorate([
66
- (0, class_validator_1.IsNotEmpty)({ message: 'gnosa.validation.seoDescription.required' }),
67
- (0, class_validator_1.IsString)({ message: 'gnosa.validation.seoDescription.required' }),
68
- (0, class_validator_1.MaxLength)(1000, { message: 'gnosa.validation.seoDescription.invalid' }),
105
+ (0, class_validator_1.IsOptional)(),
106
+ (0, class_validator_1.IsString)({ message: 'gnosa.validation.history.seoTitle' }),
107
+ (0, class_validator_1.MaxLength)(255, { message: 'gnosa.validation.history.seoTitle' }),
69
108
  (0, common_1.Trim)(),
70
109
  __metadata("design:type", String)
71
- ], HistoryTranslationDto.prototype, "seoDescription", void 0);
110
+ ], HistorySeoTitleDto.prototype, "seoTitle", void 0);
72
111
  /**
73
- * A history entry is never a draft, so every localized field is required in all three languages.
112
+ * Saves the entry's `seoDescription` in one language, sent with its `language`. `null` clears it.
74
113
  */
75
- class HistoryTranslationsDto {
76
- sq;
77
- en;
78
- mk;
114
+ class HistorySeoDescriptionDto extends language_dto_1.LanguageDto {
115
+ seoDescription;
79
116
  constructor(props) {
117
+ super();
80
118
  Object.assign(this, props);
81
119
  }
82
120
  }
83
- exports.HistoryTranslationsDto = HistoryTranslationsDto;
84
- __decorate([
85
- (0, class_validator_1.IsDefined)({ message: 'gnosa.validation.translations.sq' }),
86
- (0, class_validator_1.ValidateNested)({ message: 'gnosa.validation.translations.sq' }),
87
- (0, class_transformer_1.Type)(() => HistoryTranslationDto),
88
- __metadata("design:type", HistoryTranslationDto)
89
- ], HistoryTranslationsDto.prototype, "sq", void 0);
121
+ exports.HistorySeoDescriptionDto = HistorySeoDescriptionDto;
90
122
  __decorate([
91
- (0, class_validator_1.IsDefined)({ message: 'gnosa.validation.translations.en' }),
92
- (0, class_validator_1.ValidateNested)({ message: 'gnosa.validation.translations.en' }),
93
- (0, class_transformer_1.Type)(() => HistoryTranslationDto),
94
- __metadata("design:type", HistoryTranslationDto)
95
- ], HistoryTranslationsDto.prototype, "en", void 0);
96
- __decorate([
97
- (0, class_validator_1.IsDefined)({ message: 'gnosa.validation.translations.mk' }),
98
- (0, class_validator_1.ValidateNested)({ message: 'gnosa.validation.translations.mk' }),
99
- (0, class_transformer_1.Type)(() => HistoryTranslationDto),
100
- __metadata("design:type", HistoryTranslationDto)
101
- ], HistoryTranslationsDto.prototype, "mk", void 0);
123
+ (0, class_validator_1.IsOptional)(),
124
+ (0, class_validator_1.IsString)({ message: 'gnosa.validation.history.seoDescription' }),
125
+ (0, class_validator_1.MaxLength)(1000, { message: 'gnosa.validation.history.seoDescription' }),
126
+ (0, common_1.Trim)(),
127
+ __metadata("design:type", String)
128
+ ], HistorySeoDescriptionDto.prototype, "seoDescription", void 0);
102
129
  /**
103
- * The fields of a history entry, sent as a multipart form together with the image `file`, which is
104
- * required when the entry is created.
130
+ * The search and filter of the admin History List.
105
131
  */
106
- class HistoryDto {
132
+ class HistoryFilterDto {
107
133
  /**
108
- * In UTC, as an ISO 8601 date.
134
+ * Matches the title, in any language.
109
135
  */
110
- date;
111
- translations;
136
+ phrase;
137
+ status;
112
138
  constructor(props) {
113
139
  Object.assign(this, props);
114
140
  }
115
141
  }
116
- exports.HistoryDto = HistoryDto;
142
+ exports.HistoryFilterDto = HistoryFilterDto;
117
143
  __decorate([
118
- (0, class_validator_1.IsDate)({ message: dateMessage }),
119
- (0, transformers_helper_1.ToUtcDate)(),
120
- __metadata("design:type", Date)
121
- ], HistoryDto.prototype, "date", void 0);
144
+ (0, class_validator_1.IsOptional)(),
145
+ (0, class_validator_1.IsString)({ message: 'gnosa.validation.filter' }),
146
+ (0, common_1.Trim)(),
147
+ __metadata("design:type", String)
148
+ ], HistoryFilterDto.prototype, "phrase", void 0);
122
149
  __decorate([
123
- (0, class_validator_1.IsDefined)({ message: 'gnosa.validation.translations.required' }),
124
- (0, class_validator_1.ValidateNested)({ message: 'gnosa.validation.translations.required' }),
125
- (0, class_transformer_1.Type)(() => HistoryTranslationsDto),
126
- __metadata("design:type", HistoryTranslationsDto)
127
- ], HistoryDto.prototype, "translations", void 0);
150
+ (0, class_validator_1.IsOptional)(),
151
+ (0, class_validator_1.IsEnum)(publish_status_enum_1.PublishStatus, { message: 'gnosa.validation.filter' }),
152
+ __metadata("design:type", String)
153
+ ], HistoryFilterDto.prototype, "status", void 0);
128
154
  //# sourceMappingURL=history.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"history.dto.js","sourceRoot":"","sources":["../../src/foundation/history.dto.ts"],"names":[],"mappings":";;;;;;;;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ations } from '../general/translations';
2
3
  export declare class HistoryTranslation {
3
4
  title: string;
@@ -11,10 +12,12 @@ export declare class HistoryTranslation {
11
12
  constructor(props?: Partial<HistoryTranslation>);
12
13
  }
13
14
  /**
14
- * An entry of the foundation's history timeline.
15
+ * An entry of the foundation's history timeline. Like the other content records it is a Draft
16
+ * until it is published, and only Published entries are on the website.
15
17
  */
16
18
  export declare class History {
17
19
  slug: string;
20
+ status: PublishStatus;
18
21
  imageUrl: string;
19
22
  /**
20
23
  * The image file name as it was uploaded, and its size in bytes.
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.History = exports.HistoryTranslation = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
+ const publish_status_enum_1 = require("../general/publish-status.enum");
14
15
  class HistoryTranslation {
15
16
  title;
16
17
  shortDescription;
@@ -46,10 +47,12 @@ __decorate([
46
47
  __metadata("design:type", String)
47
48
  ], HistoryTranslation.prototype, "seoDescription", void 0);
48
49
  /**
49
- * An entry of the foundation's history timeline.
50
+ * An entry of the foundation's history timeline. Like the other content records it is a Draft
51
+ * until it is published, and only Published entries are on the website.
50
52
  */
51
53
  class History {
52
54
  slug;
55
+ status;
53
56
  imageUrl;
54
57
  /**
55
58
  * The image file name as it was uploaded, and its size in bytes.
@@ -81,6 +84,10 @@ __decorate([
81
84
  (0, class_transformer_1.Expose)(),
82
85
  __metadata("design:type", String)
83
86
  ], History.prototype, "slug", void 0);
87
+ __decorate([
88
+ (0, class_transformer_1.Expose)(),
89
+ __metadata("design:type", String)
90
+ ], History.prototype, "status", void 0);
84
91
  __decorate([
85
92
  (0, class_transformer_1.Expose)(),
86
93
  __metadata("design:type", String)
@@ -1 +1 @@
1
- {"version":3,"file":"history.model.js","sourceRoot":"","sources":["../../src/foundation/history.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AAIjD,MAAa,kBAAkB;IAE9B,KAAK,CA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AA,0BAAM,GAAE;;0CACS;AAOlB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACX,IAAI;qCAAC;AAMX;IADC,IAAA,0BAAM,GAAE;;sCACM;AAGf;IADC,IAAA,0BAAM,GAAE;;iDACiB;AAG1B;IADC,IAAA,0BAAM,GAAE;;4CACY;AAGrB;IADC,IAAA,0BAAM,GAAE;;yCACS;AAGlB;IADC,IAAA,0BAAM,GAAE;;+CACe;AAMxB;IADC,IAAA,0BAAM,GAAE;;6CACuC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * The foundation's identity as it is configured: its legal name, address, email and phone, for the
3
+ * website's footer.
4
+ */
5
+ export declare class FoundationIdentity {
6
+ name: string;
7
+ address: string;
8
+ email: string;
9
+ phone: string;
10
+ constructor(props?: Partial<FoundationIdentity>);
11
+ }
12
+ /**
13
+ * The account E-Banking payments and donations go to.
14
+ */
15
+ export declare class BankDetails {
16
+ accountHolder: string;
17
+ bankName: string;
18
+ iban: string;
19
+ swift: string;
20
+ constructor(props?: Partial<BankDetails>);
21
+ }
22
+ /**
23
+ * What the Support and Donate page shows from the configuration: the bank details, and the address a
24
+ * donor may email the payment confirmation to.
25
+ */
26
+ export declare class SupportDetails {
27
+ bankDetails: BankDetails;
28
+ confirmationEmail: string;
29
+ constructor(props?: Partial<SupportDetails>);
30
+ }