dl-commons 0.0.1-testing.1

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 (160) hide show
  1. package/.eslintrc.js +26 -0
  2. package/.prettierrc +6 -0
  3. package/README.md +93 -0
  4. package/devops.testing.md +16 -0
  5. package/dist/constraints/is-map-of-strings.constraint.d.ts +5 -0
  6. package/dist/constraints/is-map-of-strings.constraint.js +31 -0
  7. package/dist/constraints/is-map-of-strings.constraint.js.map +1 -0
  8. package/dist/decorators/is-map-of-strings.decorator.d.ts +1 -0
  9. package/dist/decorators/is-map-of-strings.decorator.js +13 -0
  10. package/dist/decorators/is-map-of-strings.decorator.js.map +1 -0
  11. package/dist/dl-commons.module.d.ts +2 -0
  12. package/dist/dl-commons.module.js +24 -0
  13. package/dist/dl-commons.module.js.map +1 -0
  14. package/dist/exceptions/custom.exception.d.ts +11 -0
  15. package/dist/exceptions/custom.exception.js +21 -0
  16. package/dist/exceptions/custom.exception.js.map +1 -0
  17. package/dist/factories/exception.factory.d.ts +4 -0
  18. package/dist/factories/exception.factory.js +14 -0
  19. package/dist/factories/exception.factory.js.map +1 -0
  20. package/dist/filters/base-exception.filter.d.ts +8 -0
  21. package/dist/filters/base-exception.filter.js +157 -0
  22. package/dist/filters/base-exception.filter.js.map +1 -0
  23. package/dist/guards/access-token.guard.d.ts +8 -0
  24. package/dist/guards/access-token.guard.js +35 -0
  25. package/dist/guards/access-token.guard.js.map +1 -0
  26. package/dist/guards/permission.guard.d.ts +16 -0
  27. package/dist/guards/permission.guard.js +52 -0
  28. package/dist/guards/permission.guard.js.map +1 -0
  29. package/dist/index.d.ts +36 -0
  30. package/dist/index.js +76 -0
  31. package/dist/index.js.map +1 -0
  32. package/dist/models/consts/env-vars.const.d.ts +6 -0
  33. package/dist/models/consts/env-vars.const.js +10 -0
  34. package/dist/models/consts/env-vars.const.js.map +1 -0
  35. package/dist/models/dtos/commons/i18n.dto.d.ts +5 -0
  36. package/dist/models/dtos/commons/i18n.dto.js +32 -0
  37. package/dist/models/dtos/commons/i18n.dto.js.map +1 -0
  38. package/dist/models/dtos/wrappers/rest-wrapper.class.d.ts +72 -0
  39. package/dist/models/dtos/wrappers/rest-wrapper.class.js +224 -0
  40. package/dist/models/dtos/wrappers/rest-wrapper.class.js.map +1 -0
  41. package/dist/models/enums/contact-type.enum.d.ts +4 -0
  42. package/dist/models/enums/contact-type.enum.js +9 -0
  43. package/dist/models/enums/contact-type.enum.js.map +1 -0
  44. package/dist/models/enums/record-state.enum.d.ts +5 -0
  45. package/dist/models/enums/record-state.enum.js +10 -0
  46. package/dist/models/enums/record-state.enum.js.map +1 -0
  47. package/dist/models/enums/user-verifiation-level.enum.d.ts +5 -0
  48. package/dist/models/enums/user-verifiation-level.enum.js +10 -0
  49. package/dist/models/enums/user-verifiation-level.enum.js.map +1 -0
  50. package/dist/models/interfaces/base.interface.d.ts +5 -0
  51. package/dist/models/interfaces/base.interface.js +3 -0
  52. package/dist/models/interfaces/base.interface.js.map +1 -0
  53. package/dist/models/interfaces/contact.interface.d.ts +8 -0
  54. package/dist/models/interfaces/contact.interface.js +3 -0
  55. package/dist/models/interfaces/contact.interface.js.map +1 -0
  56. package/dist/models/interfaces/dictionary.interface.d.ts +9 -0
  57. package/dist/models/interfaces/dictionary.interface.js +3 -0
  58. package/dist/models/interfaces/dictionary.interface.js.map +1 -0
  59. package/dist/models/interfaces/i18n.interface.d.ts +5 -0
  60. package/dist/models/interfaces/i18n.interface.js +3 -0
  61. package/dist/models/interfaces/i18n.interface.js.map +1 -0
  62. package/dist/models/interfaces/identifable.interface.d.ts +4 -0
  63. package/dist/models/interfaces/identifable.interface.js +3 -0
  64. package/dist/models/interfaces/identifable.interface.js.map +1 -0
  65. package/dist/models/interfaces/permission.interface.d.ts +7 -0
  66. package/dist/models/interfaces/permission.interface.js +3 -0
  67. package/dist/models/interfaces/permission.interface.js.map +1 -0
  68. package/dist/models/interfaces/person.interface.d.ts +8 -0
  69. package/dist/models/interfaces/person.interface.js +3 -0
  70. package/dist/models/interfaces/person.interface.js.map +1 -0
  71. package/dist/models/interfaces/record.interface.d.ts +8 -0
  72. package/dist/models/interfaces/record.interface.js +3 -0
  73. package/dist/models/interfaces/record.interface.js.map +1 -0
  74. package/dist/models/interfaces/residence.interface.d.ts +7 -0
  75. package/dist/models/interfaces/residence.interface.js +3 -0
  76. package/dist/models/interfaces/residence.interface.js.map +1 -0
  77. package/dist/models/interfaces/role.interface.d.ts +9 -0
  78. package/dist/models/interfaces/role.interface.js +3 -0
  79. package/dist/models/interfaces/role.interface.js.map +1 -0
  80. package/dist/models/schemas/base.schema.d.ts +17 -0
  81. package/dist/models/schemas/base.schema.js +30 -0
  82. package/dist/models/schemas/base.schema.js.map +1 -0
  83. package/dist/models/schemas/embedded/contact.schema.d.ts +20 -0
  84. package/dist/models/schemas/embedded/contact.schema.js +39 -0
  85. package/dist/models/schemas/embedded/contact.schema.js.map +1 -0
  86. package/dist/models/schemas/embedded/dictionary-embedded.schema.d.ts +20 -0
  87. package/dist/models/schemas/embedded/dictionary-embedded.schema.js +40 -0
  88. package/dist/models/schemas/embedded/dictionary-embedded.schema.js.map +1 -0
  89. package/dist/models/schemas/embedded/i18n.embedded.d.ts +17 -0
  90. package/dist/models/schemas/embedded/i18n.embedded.js +33 -0
  91. package/dist/models/schemas/embedded/i18n.embedded.js.map +1 -0
  92. package/dist/models/schemas/embedded/person.schema.d.ts +20 -0
  93. package/dist/models/schemas/embedded/person.schema.js +42 -0
  94. package/dist/models/schemas/embedded/person.schema.js.map +1 -0
  95. package/dist/models/schemas/embedded/record.embedded.d.ts +20 -0
  96. package/dist/models/schemas/embedded/record.embedded.js +42 -0
  97. package/dist/models/schemas/embedded/record.embedded.js.map +1 -0
  98. package/dist/models/schemas/embedded/residence.schema.d.ts +19 -0
  99. package/dist/models/schemas/embedded/residence.schema.js +38 -0
  100. package/dist/models/schemas/embedded/residence.schema.js.map +1 -0
  101. package/dist/models/schemas/identifable.schema.d.ts +15 -0
  102. package/dist/models/schemas/identifable.schema.js +23 -0
  103. package/dist/models/schemas/identifable.schema.js.map +1 -0
  104. package/dist/pipes/mongo-id.pipe.d.ts +5 -0
  105. package/dist/pipes/mongo-id.pipe.js +21 -0
  106. package/dist/pipes/mongo-id.pipe.js.map +1 -0
  107. package/dist/pipes/mongo-ids.pipe.d.ts +5 -0
  108. package/dist/pipes/mongo-ids.pipe.js +21 -0
  109. package/dist/pipes/mongo-ids.pipe.js.map +1 -0
  110. package/dist/services/sessions.service.d.ts +3 -0
  111. package/dist/services/sessions.service.js +22 -0
  112. package/dist/services/sessions.service.js.map +1 -0
  113. package/dist/transformers/common.transformer.d.ts +8 -0
  114. package/dist/transformers/common.transformer.js +24 -0
  115. package/dist/transformers/common.transformer.js.map +1 -0
  116. package/dist/tsconfig.tsbuildinfo +1 -0
  117. package/dist/utils/helper.utils.d.ts +6 -0
  118. package/dist/utils/helper.utils.js +32 -0
  119. package/dist/utils/helper.utils.js.map +1 -0
  120. package/package.json +33 -0
  121. package/src/constraints/is-map-of-strings.constraint.ts +22 -0
  122. package/src/decorators/is-map-of-strings.decorator.ts +10 -0
  123. package/src/dl-commons.module.ts +11 -0
  124. package/src/exceptions/custom.exception.ts +20 -0
  125. package/src/factories/exception.factory.ts +14 -0
  126. package/src/filters/base-exception.filter.ts +159 -0
  127. package/src/guards/access-token.guard.ts +20 -0
  128. package/src/guards/permission.guard.ts +69 -0
  129. package/src/index.ts +174 -0
  130. package/src/models/consts/env-vars.const.ts +7 -0
  131. package/src/models/dtos/commons/i18n.dto.ts +15 -0
  132. package/src/models/dtos/wrappers/rest-wrapper.class.ts +246 -0
  133. package/src/models/enums/contact-type.enum.ts +4 -0
  134. package/src/models/enums/record-state.enum.ts +5 -0
  135. package/src/models/enums/user-verifiation-level.enum.ts +5 -0
  136. package/src/models/interfaces/base.interface.ts +6 -0
  137. package/src/models/interfaces/contact.interface.ts +9 -0
  138. package/src/models/interfaces/dictionary.interface.ts +10 -0
  139. package/src/models/interfaces/i18n.interface.ts +5 -0
  140. package/src/models/interfaces/identifable.interface.ts +5 -0
  141. package/src/models/interfaces/permission.interface.ts +8 -0
  142. package/src/models/interfaces/person.interface.ts +9 -0
  143. package/src/models/interfaces/record.interface.ts +9 -0
  144. package/src/models/interfaces/residence.interface.ts +8 -0
  145. package/src/models/interfaces/role.interface.ts +10 -0
  146. package/src/models/schemas/base.schema.ts +20 -0
  147. package/src/models/schemas/embedded/contact.schema.ts +23 -0
  148. package/src/models/schemas/embedded/dictionary-embedded.schema.ts +24 -0
  149. package/src/models/schemas/embedded/i18n.embedded.ts +18 -0
  150. package/src/models/schemas/embedded/person.schema.ts +26 -0
  151. package/src/models/schemas/embedded/record.embedded.ts +25 -0
  152. package/src/models/schemas/embedded/residence.schema.ts +23 -0
  153. package/src/models/schemas/identifable.schema.ts +11 -0
  154. package/src/pipes/mongo-id.pipe.ts +10 -0
  155. package/src/pipes/mongo-ids.pipe.ts +10 -0
  156. package/src/services/sessions.service.ts +6 -0
  157. package/src/transformers/common.transformer.ts +27 -0
  158. package/src/utils/helper.utils.ts +30 -0
  159. package/tsconfig.build.json +9 -0
  160. package/tsconfig.json +30 -0
@@ -0,0 +1,36 @@
1
+ import { IsMapOfStrings } from './decorators/is-map-of-strings.decorator';
2
+ import { DLCommonsModule } from './dl-commons.module';
3
+ import { HandledException } from './exceptions/custom.exception';
4
+ import { validationExceptionFactory } from './factories/exception.factory';
5
+ import { BaseExceptionsFilter } from './filters/base-exception.filter';
6
+ import { AccessTokenGuard } from './guards/access-token.guard';
7
+ import { AllowPermissions, PermissionGuard } from './guards/permission.guard';
8
+ import { APP__PORT, APP__DEBUG, APP__ACCESS_TOKEN, MONGO__CS, REDIS__CS, KAFKA__BROKERS } from './models/consts/env-vars.const';
9
+ import { I18nDTO } from './models/dtos/commons/i18n.dto';
10
+ import { IMongoPage, RESTError, RESTPage, RESTPaging, RESTQueryParams, RESTRequestBody, RESTResponseBody, RESTResult, RESTSort, SortDirection } from './models/dtos/wrappers/rest-wrapper.class';
11
+ import { ContactType } from './models/enums/contact-type.enum';
12
+ import { RecordState } from './models/enums/record-state.enum';
13
+ import { UserVerificationLevel } from './models/enums/user-verifiation-level.enum';
14
+ import { IBase } from './models/interfaces/base.interface';
15
+ import { IContact } from './models/interfaces/contact.interface';
16
+ import { IDictionary } from './models/interfaces/dictionary.interface';
17
+ import { II18n } from './models/interfaces/i18n.interface';
18
+ import { IIdentifable } from './models/interfaces/identifable.interface';
19
+ import { IPermission } from './models/interfaces/permission.interface';
20
+ import { IPerson } from './models/interfaces/person.interface';
21
+ import { IRecord } from './models/interfaces/record.interface';
22
+ import { IResidence } from './models/interfaces/residence.interface';
23
+ import { IRole } from './models/interfaces/role.interface';
24
+ import { Base, BaseDocument, BaseSchema } from './models/schemas/base.schema';
25
+ import { Contact, ContactDocument, ContactSchema } from './models/schemas/embedded/contact.schema';
26
+ import { DictionaryEmbedded, DictionaryEmbeddedDocument, DictionaryEmbeddedSchema } from './models/schemas/embedded/dictionary-embedded.schema';
27
+ import { I18n, I18nSchema, I18nDocument } from './models/schemas/embedded/i18n.embedded';
28
+ import { Person, PersonSchema, PersonDocument } from './models/schemas/embedded/person.schema';
29
+ import { Record, RecordSchema, RecordDocument } from './models/schemas/embedded/record.embedded';
30
+ import { Residence, ResidenceDocument, ResidenceSchema } from './models/schemas/embedded/residence.schema';
31
+ import { Identifable, IdentifableDocument, IdentifableSchema } from './models/schemas/identifable.schema';
32
+ import { MongoIdPipe } from './pipes/mongo-id.pipe';
33
+ import { MongoIdsPipe } from './pipes/mongo-ids.pipe';
34
+ import { SessionsService } from './services/sessions.service';
35
+ import { transformers } from './transformers/common.transformer';
36
+ export { SessionsService, RESTError, RESTPage, RESTPaging, RESTQueryParams, RESTRequestBody, RESTResponseBody, RESTResult, RESTSort, SortDirection, IMongoPage, AccessTokenGuard, PermissionGuard, AllowPermissions, APP__PORT, APP__DEBUG, APP__ACCESS_TOKEN, MONGO__CS, REDIS__CS, KAFKA__BROKERS, RecordState, ContactType, UserVerificationLevel, I18nDTO, IIdentifable, IBase, IRecord, II18n, IDictionary, IPermission, IRole, IContact, IPerson, IResidence, Identifable, IdentifableSchema, IdentifableDocument, Base, BaseSchema, BaseDocument, Record, RecordSchema, RecordDocument, I18n, I18nSchema, I18nDocument, Residence, ResidenceSchema, ResidenceDocument, Contact, ContactSchema, ContactDocument, Person, PersonSchema, PersonDocument, DictionaryEmbedded, DictionaryEmbeddedSchema, DictionaryEmbeddedDocument, BaseExceptionsFilter, validationExceptionFactory, HandledException, IsMapOfStrings, transformers, MongoIdPipe, MongoIdsPipe, DLCommonsModule, };
package/dist/index.js ADDED
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DLCommonsModule = exports.MongoIdsPipe = exports.MongoIdPipe = exports.transformers = exports.IsMapOfStrings = exports.HandledException = exports.validationExceptionFactory = exports.BaseExceptionsFilter = exports.DictionaryEmbeddedSchema = exports.DictionaryEmbedded = exports.PersonSchema = exports.Person = exports.ContactSchema = exports.Contact = exports.ResidenceSchema = exports.Residence = exports.I18nSchema = exports.I18n = exports.RecordSchema = exports.Record = exports.BaseSchema = exports.Base = exports.IdentifableSchema = exports.Identifable = exports.I18nDTO = exports.UserVerificationLevel = exports.ContactType = exports.RecordState = exports.KAFKA__BROKERS = exports.REDIS__CS = exports.MONGO__CS = exports.APP__ACCESS_TOKEN = exports.APP__DEBUG = exports.APP__PORT = exports.AllowPermissions = exports.PermissionGuard = exports.AccessTokenGuard = exports.SortDirection = exports.RESTSort = exports.RESTResult = exports.RESTResponseBody = exports.RESTRequestBody = exports.RESTQueryParams = exports.RESTPaging = exports.RESTPage = exports.RESTError = exports.SessionsService = void 0;
4
+ const is_map_of_strings_decorator_1 = require("./decorators/is-map-of-strings.decorator");
5
+ Object.defineProperty(exports, "IsMapOfStrings", { enumerable: true, get: function () { return is_map_of_strings_decorator_1.IsMapOfStrings; } });
6
+ const dl_commons_module_1 = require("./dl-commons.module");
7
+ Object.defineProperty(exports, "DLCommonsModule", { enumerable: true, get: function () { return dl_commons_module_1.DLCommonsModule; } });
8
+ const custom_exception_1 = require("./exceptions/custom.exception");
9
+ Object.defineProperty(exports, "HandledException", { enumerable: true, get: function () { return custom_exception_1.HandledException; } });
10
+ const exception_factory_1 = require("./factories/exception.factory");
11
+ Object.defineProperty(exports, "validationExceptionFactory", { enumerable: true, get: function () { return exception_factory_1.validationExceptionFactory; } });
12
+ const base_exception_filter_1 = require("./filters/base-exception.filter");
13
+ Object.defineProperty(exports, "BaseExceptionsFilter", { enumerable: true, get: function () { return base_exception_filter_1.BaseExceptionsFilter; } });
14
+ const access_token_guard_1 = require("./guards/access-token.guard");
15
+ Object.defineProperty(exports, "AccessTokenGuard", { enumerable: true, get: function () { return access_token_guard_1.AccessTokenGuard; } });
16
+ const permission_guard_1 = require("./guards/permission.guard");
17
+ Object.defineProperty(exports, "AllowPermissions", { enumerable: true, get: function () { return permission_guard_1.AllowPermissions; } });
18
+ Object.defineProperty(exports, "PermissionGuard", { enumerable: true, get: function () { return permission_guard_1.PermissionGuard; } });
19
+ const env_vars_const_1 = require("./models/consts/env-vars.const");
20
+ Object.defineProperty(exports, "APP__PORT", { enumerable: true, get: function () { return env_vars_const_1.APP__PORT; } });
21
+ Object.defineProperty(exports, "APP__DEBUG", { enumerable: true, get: function () { return env_vars_const_1.APP__DEBUG; } });
22
+ Object.defineProperty(exports, "APP__ACCESS_TOKEN", { enumerable: true, get: function () { return env_vars_const_1.APP__ACCESS_TOKEN; } });
23
+ Object.defineProperty(exports, "MONGO__CS", { enumerable: true, get: function () { return env_vars_const_1.MONGO__CS; } });
24
+ Object.defineProperty(exports, "REDIS__CS", { enumerable: true, get: function () { return env_vars_const_1.REDIS__CS; } });
25
+ Object.defineProperty(exports, "KAFKA__BROKERS", { enumerable: true, get: function () { return env_vars_const_1.KAFKA__BROKERS; } });
26
+ const i18n_dto_1 = require("./models/dtos/commons/i18n.dto");
27
+ Object.defineProperty(exports, "I18nDTO", { enumerable: true, get: function () { return i18n_dto_1.I18nDTO; } });
28
+ const rest_wrapper_class_1 = require("./models/dtos/wrappers/rest-wrapper.class");
29
+ Object.defineProperty(exports, "RESTError", { enumerable: true, get: function () { return rest_wrapper_class_1.RESTError; } });
30
+ Object.defineProperty(exports, "RESTPage", { enumerable: true, get: function () { return rest_wrapper_class_1.RESTPage; } });
31
+ Object.defineProperty(exports, "RESTPaging", { enumerable: true, get: function () { return rest_wrapper_class_1.RESTPaging; } });
32
+ Object.defineProperty(exports, "RESTQueryParams", { enumerable: true, get: function () { return rest_wrapper_class_1.RESTQueryParams; } });
33
+ Object.defineProperty(exports, "RESTRequestBody", { enumerable: true, get: function () { return rest_wrapper_class_1.RESTRequestBody; } });
34
+ Object.defineProperty(exports, "RESTResponseBody", { enumerable: true, get: function () { return rest_wrapper_class_1.RESTResponseBody; } });
35
+ Object.defineProperty(exports, "RESTResult", { enumerable: true, get: function () { return rest_wrapper_class_1.RESTResult; } });
36
+ Object.defineProperty(exports, "RESTSort", { enumerable: true, get: function () { return rest_wrapper_class_1.RESTSort; } });
37
+ Object.defineProperty(exports, "SortDirection", { enumerable: true, get: function () { return rest_wrapper_class_1.SortDirection; } });
38
+ const contact_type_enum_1 = require("./models/enums/contact-type.enum");
39
+ Object.defineProperty(exports, "ContactType", { enumerable: true, get: function () { return contact_type_enum_1.ContactType; } });
40
+ const record_state_enum_1 = require("./models/enums/record-state.enum");
41
+ Object.defineProperty(exports, "RecordState", { enumerable: true, get: function () { return record_state_enum_1.RecordState; } });
42
+ const user_verifiation_level_enum_1 = require("./models/enums/user-verifiation-level.enum");
43
+ Object.defineProperty(exports, "UserVerificationLevel", { enumerable: true, get: function () { return user_verifiation_level_enum_1.UserVerificationLevel; } });
44
+ const base_schema_1 = require("./models/schemas/base.schema");
45
+ Object.defineProperty(exports, "Base", { enumerable: true, get: function () { return base_schema_1.Base; } });
46
+ Object.defineProperty(exports, "BaseSchema", { enumerable: true, get: function () { return base_schema_1.BaseSchema; } });
47
+ const contact_schema_1 = require("./models/schemas/embedded/contact.schema");
48
+ Object.defineProperty(exports, "Contact", { enumerable: true, get: function () { return contact_schema_1.Contact; } });
49
+ Object.defineProperty(exports, "ContactSchema", { enumerable: true, get: function () { return contact_schema_1.ContactSchema; } });
50
+ const dictionary_embedded_schema_1 = require("./models/schemas/embedded/dictionary-embedded.schema");
51
+ Object.defineProperty(exports, "DictionaryEmbedded", { enumerable: true, get: function () { return dictionary_embedded_schema_1.DictionaryEmbedded; } });
52
+ Object.defineProperty(exports, "DictionaryEmbeddedSchema", { enumerable: true, get: function () { return dictionary_embedded_schema_1.DictionaryEmbeddedSchema; } });
53
+ const i18n_embedded_1 = require("./models/schemas/embedded/i18n.embedded");
54
+ Object.defineProperty(exports, "I18n", { enumerable: true, get: function () { return i18n_embedded_1.I18n; } });
55
+ Object.defineProperty(exports, "I18nSchema", { enumerable: true, get: function () { return i18n_embedded_1.I18nSchema; } });
56
+ const person_schema_1 = require("./models/schemas/embedded/person.schema");
57
+ Object.defineProperty(exports, "Person", { enumerable: true, get: function () { return person_schema_1.Person; } });
58
+ Object.defineProperty(exports, "PersonSchema", { enumerable: true, get: function () { return person_schema_1.PersonSchema; } });
59
+ const record_embedded_1 = require("./models/schemas/embedded/record.embedded");
60
+ Object.defineProperty(exports, "Record", { enumerable: true, get: function () { return record_embedded_1.Record; } });
61
+ Object.defineProperty(exports, "RecordSchema", { enumerable: true, get: function () { return record_embedded_1.RecordSchema; } });
62
+ const residence_schema_1 = require("./models/schemas/embedded/residence.schema");
63
+ Object.defineProperty(exports, "Residence", { enumerable: true, get: function () { return residence_schema_1.Residence; } });
64
+ Object.defineProperty(exports, "ResidenceSchema", { enumerable: true, get: function () { return residence_schema_1.ResidenceSchema; } });
65
+ const identifable_schema_1 = require("./models/schemas/identifable.schema");
66
+ Object.defineProperty(exports, "Identifable", { enumerable: true, get: function () { return identifable_schema_1.Identifable; } });
67
+ Object.defineProperty(exports, "IdentifableSchema", { enumerable: true, get: function () { return identifable_schema_1.IdentifableSchema; } });
68
+ const mongo_id_pipe_1 = require("./pipes/mongo-id.pipe");
69
+ Object.defineProperty(exports, "MongoIdPipe", { enumerable: true, get: function () { return mongo_id_pipe_1.MongoIdPipe; } });
70
+ const mongo_ids_pipe_1 = require("./pipes/mongo-ids.pipe");
71
+ Object.defineProperty(exports, "MongoIdsPipe", { enumerable: true, get: function () { return mongo_ids_pipe_1.MongoIdsPipe; } });
72
+ const sessions_service_1 = require("./services/sessions.service");
73
+ Object.defineProperty(exports, "SessionsService", { enumerable: true, get: function () { return sessions_service_1.SessionsService; } });
74
+ const common_transformer_1 = require("./transformers/common.transformer");
75
+ Object.defineProperty(exports, "transformers", { enumerable: true, get: function () { return common_transformer_1.transformers; } });
76
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,0FAA0E;AA4JtE,+FA5JK,4CAAc,OA4JL;AA3JlB,2DAAsD;AA2KlD,gGA3KK,mCAAe,OA2KL;AA1KnB,oEAAiE;AAqJ7D,iGArJK,mCAAgB,OAqJL;AApJpB,qEAA2E;AA+IvE,2GA/IK,8CAA0B,OA+IL;AA9I9B,2EAAuE;AAyInE,qGAzIK,4CAAoB,OAyIL;AAxIxB,oEAA+D;AAiE3D,iGAjEK,qCAAgB,OAiEL;AAhEpB,gEAA8E;AAkE1E,iGAlEK,mCAAgB,OAkEL;AADhB,gGAjEuB,kCAAe,OAiEvB;AAhEnB,mEAAgI;AAsE5H,0FAtEK,0BAAS,OAsEL;AACT,2FAvEgB,2BAAU,OAuEhB;AACV,kGAxE4B,kCAAiB,OAwE5B;AACjB,0FAzE+C,0BAAS,OAyE/C;AACT,0FA1E0D,0BAAS,OA0E1D;AACT,+FA3EqE,+BAAc,OA2ErE;AA1ElB,6DAAyD;AAsFrD,wFAtFK,kBAAO,OAsFL;AArFX,kFAWmD;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 export declare const APP__PORT = "APP__PORT";
2
+ export declare const APP__DEBUG = "APP__DEBUG";
3
+ export declare const APP__ACCESS_TOKEN = "APP__ACCESS_TOKEN";
4
+ export declare const MONGO__CS = "MONGO__CS";
5
+ export declare const REDIS__CS = "REDIS__CS";
6
+ export declare const KAFKA__BROKERS = "KAFKA__BROKERS";
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KAFKA__BROKERS = exports.REDIS__CS = exports.MONGO__CS = exports.APP__ACCESS_TOKEN = exports.APP__DEBUG = exports.APP__PORT = void 0;
4
+ exports.APP__PORT = 'APP__PORT';
5
+ exports.APP__DEBUG = 'APP__DEBUG';
6
+ exports.APP__ACCESS_TOKEN = 'APP__ACCESS_TOKEN';
7
+ exports.MONGO__CS = 'MONGO__CS';
8
+ exports.REDIS__CS = 'REDIS__CS';
9
+ exports.KAFKA__BROKERS = 'KAFKA__BROKERS';
10
+ //# sourceMappingURL=env-vars.const.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env-vars.const.js","sourceRoot":"","sources":["../../../src/models/consts/env-vars.const.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG,WAAW,CAAC;AACxB,QAAA,UAAU,GAAG,YAAY,CAAC;AAC1B,QAAA,iBAAiB,GAAG,mBAAmB,CAAC;AAExC,QAAA,SAAS,GAAG,WAAW,CAAC;AACxB,QAAA,SAAS,GAAG,WAAW,CAAC;AACxB,QAAA,cAAc,GAAG,gBAAgB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare class I18nDTO {
2
+ ge: string;
3
+ en?: string;
4
+ ua?: string;
5
+ }
@@ -0,0 +1,32 @@
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.I18nDTO = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class I18nDTO {
15
+ }
16
+ exports.I18nDTO = I18nDTO;
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ (0, class_validator_1.IsNotEmpty)(),
20
+ __metadata("design:type", String)
21
+ ], I18nDTO.prototype, "ge", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.IsOptional)(),
25
+ __metadata("design:type", String)
26
+ ], I18nDTO.prototype, "en", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsString)(),
29
+ (0, class_validator_1.IsOptional)(),
30
+ __metadata("design:type", String)
31
+ ], I18nDTO.prototype, "ua", void 0);
32
+ //# sourceMappingURL=i18n.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.dto.js","sourceRoot":"","sources":["../../../../src/models/dtos/commons/i18n.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmE;AAEnE,MAAa,OAAO;CAYnB;AAZD,0BAYC;AATG;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mCACF;AAIX;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mCACD;AAIZ;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mCACD"}
@@ -0,0 +1,72 @@
1
+ import { HttpStatus } from '@nestjs/common';
2
+ export declare enum SortDirection {
3
+ asc = 1,
4
+ desc = -1
5
+ }
6
+ export declare class RESTSort {
7
+ property: string;
8
+ direction: SortDirection;
9
+ }
10
+ export interface IMongoPage {
11
+ skip: number;
12
+ limit: number;
13
+ }
14
+ export declare class RESTPaging {
15
+ page: number;
16
+ size: number;
17
+ extract(): {
18
+ skip: number;
19
+ limit: number;
20
+ };
21
+ static generate(page: number, size: number): IMongoPage;
22
+ }
23
+ export declare abstract class RESTRequestBody {
24
+ abstract data: any;
25
+ paging: RESTPaging;
26
+ sort: RESTSort[];
27
+ isPagingPresent(): boolean;
28
+ isSortPresent(): boolean;
29
+ extractPaging(): {
30
+ skip: number;
31
+ limit: number;
32
+ };
33
+ extractSort(): {};
34
+ }
35
+ export declare class RESTPage {
36
+ page: number;
37
+ size: number;
38
+ number: number;
39
+ total: number;
40
+ static create(count: number, paging: RESTPaging): RESTPage;
41
+ }
42
+ export declare class RESTResult<T> {
43
+ data: T;
44
+ page: RESTPage;
45
+ sort: RESTSort[];
46
+ }
47
+ export declare class RESTError {
48
+ keyword: string;
49
+ debug?: any;
50
+ validation?: any;
51
+ statusCode?: HttpStatus;
52
+ constructor(keyword: string, debug?: any, statusCode?: HttpStatus);
53
+ static dataValidation(validation: any): RESTError;
54
+ static createFromCatch(e: any, fallback: {
55
+ keyword: string;
56
+ debug?: any;
57
+ statusCode?: HttpStatus;
58
+ }): RESTError;
59
+ }
60
+ export declare class RESTResponseBody<T> {
61
+ statusCode: number;
62
+ result: RESTResult<T>;
63
+ errors: RESTError[];
64
+ addError(error: RESTError): void;
65
+ static success<T>(data: T, page?: RESTPage, sort?: RESTSort[]): RESTResponseBody<T>;
66
+ static fail(errors: RESTError[], statusCode?: number): RESTResponseBody<any>;
67
+ }
68
+ export declare class RESTQueryParams extends RESTPaging {
69
+ sort: string[];
70
+ getRESTSort(): RESTSort[];
71
+ extractSort(): {};
72
+ }
@@ -0,0 +1,224 @@
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.RESTQueryParams = exports.RESTResponseBody = exports.RESTError = exports.RESTResult = exports.RESTPage = exports.RESTRequestBody = exports.RESTPaging = exports.RESTSort = exports.SortDirection = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const class_transformer_1 = require("class-transformer");
15
+ const class_validator_1 = require("class-validator");
16
+ var SortDirection;
17
+ (function (SortDirection) {
18
+ SortDirection[SortDirection["asc"] = 1] = "asc";
19
+ SortDirection[SortDirection["desc"] = -1] = "desc";
20
+ })(SortDirection || (exports.SortDirection = SortDirection = {}));
21
+ class RESTSort {
22
+ }
23
+ exports.RESTSort = RESTSort;
24
+ __decorate([
25
+ (0, class_validator_1.IsNotEmpty)(),
26
+ (0, class_validator_1.IsString)(),
27
+ __metadata("design:type", String)
28
+ ], RESTSort.prototype, "property", void 0);
29
+ __decorate([
30
+ (0, class_validator_1.IsNotEmpty)(),
31
+ (0, class_validator_1.IsNumber)(),
32
+ (0, class_validator_1.IsEnum)(SortDirection),
33
+ __metadata("design:type", Number)
34
+ ], RESTSort.prototype, "direction", void 0);
35
+ class RESTPaging {
36
+ extract() {
37
+ const skip = (this.page - 1) * this.size;
38
+ return { skip, limit: this.size };
39
+ }
40
+ static generate(page, size) {
41
+ const skip = (page - 1) * size;
42
+ return { skip, limit: size };
43
+ }
44
+ }
45
+ exports.RESTPaging = RESTPaging;
46
+ __decorate([
47
+ (0, class_validator_1.IsNotEmpty)(),
48
+ (0, class_validator_1.IsInt)(),
49
+ (0, class_transformer_1.Type)(() => Number),
50
+ (0, class_validator_1.Min)(1),
51
+ __metadata("design:type", Number)
52
+ ], RESTPaging.prototype, "page", void 0);
53
+ __decorate([
54
+ (0, class_validator_1.IsNotEmpty)(),
55
+ (0, class_validator_1.IsInt)(),
56
+ (0, class_transformer_1.Type)(() => Number),
57
+ (0, class_validator_1.Min)(1),
58
+ (0, class_validator_1.Max)(100),
59
+ __metadata("design:type", Number)
60
+ ], RESTPaging.prototype, "size", void 0);
61
+ class RESTRequestBody {
62
+ isPagingPresent() {
63
+ if (this.paging && this.paging.page) {
64
+ return true;
65
+ }
66
+ else {
67
+ return false;
68
+ }
69
+ }
70
+ isSortPresent() {
71
+ if (this.sort && this.sort.length) {
72
+ return true;
73
+ }
74
+ else {
75
+ return false;
76
+ }
77
+ }
78
+ extractPaging() {
79
+ if (this.isPagingPresent()) {
80
+ return this.paging.extract();
81
+ }
82
+ return null;
83
+ }
84
+ extractSort() {
85
+ const sort = {};
86
+ if (this.isSortPresent()) {
87
+ for (let item of this.sort) {
88
+ sort[item.property] = item.direction;
89
+ }
90
+ }
91
+ return sort;
92
+ }
93
+ }
94
+ exports.RESTRequestBody = RESTRequestBody;
95
+ __decorate([
96
+ (0, class_validator_1.IsNotEmpty)(),
97
+ (0, class_validator_1.ValidateNested)(),
98
+ __metadata("design:type", Object)
99
+ ], RESTRequestBody.prototype, "data", void 0);
100
+ __decorate([
101
+ (0, class_validator_1.IsOptional)(),
102
+ (0, class_validator_1.ValidateNested)(),
103
+ (0, class_transformer_1.Type)(() => RESTPaging),
104
+ __metadata("design:type", RESTPaging)
105
+ ], RESTRequestBody.prototype, "paging", void 0);
106
+ __decorate([
107
+ (0, class_validator_1.IsOptional)(),
108
+ (0, class_validator_1.IsArray)(),
109
+ (0, class_validator_1.ValidateNested)(),
110
+ (0, class_transformer_1.Type)(() => RESTSort),
111
+ __metadata("design:type", Array)
112
+ ], RESTRequestBody.prototype, "sort", void 0);
113
+ class RESTPage {
114
+ static create(count, paging) {
115
+ const page = new RESTPage();
116
+ page.page = paging.page;
117
+ page.size = paging.size;
118
+ page.number = (count - (count % paging.size)) / paging.size;
119
+ if (count % paging.size > 0) {
120
+ page.number += 1;
121
+ }
122
+ page.total = count;
123
+ return page;
124
+ }
125
+ }
126
+ exports.RESTPage = RESTPage;
127
+ class RESTResult {
128
+ }
129
+ exports.RESTResult = RESTResult;
130
+ class RESTError {
131
+ constructor(keyword, debug, statusCode) {
132
+ this.keyword = keyword;
133
+ this.debug = debug;
134
+ if (!statusCode) {
135
+ this.statusCode = common_1.HttpStatus.BAD_REQUEST;
136
+ }
137
+ this.statusCode = statusCode;
138
+ }
139
+ static dataValidation(validation) {
140
+ const error = new RESTError('body_validation_error', null, 422);
141
+ error.validation = validation;
142
+ return error;
143
+ }
144
+ static createFromCatch(e, fallback) {
145
+ if (e instanceof RESTError) {
146
+ return e;
147
+ }
148
+ if (e.response && e.response.data && e.response.data.errors) {
149
+ return new RESTError(e.response.data.errors[0].keyword, e.response.data.errors[0].debug, e.response.data.statusCode);
150
+ }
151
+ if (!fallback.statusCode) {
152
+ fallback.statusCode = common_1.HttpStatus.BAD_REQUEST;
153
+ }
154
+ return new RESTError(fallback.keyword, fallback.debug, fallback.statusCode);
155
+ }
156
+ }
157
+ exports.RESTError = RESTError;
158
+ class RESTResponseBody {
159
+ addError(error) {
160
+ if (!this.errors) {
161
+ this.errors = [];
162
+ }
163
+ this.errors.push(error);
164
+ }
165
+ static success(data, page, sort) {
166
+ const response = new RESTResponseBody();
167
+ response.statusCode = 200;
168
+ response.result = new RESTResult();
169
+ response.result.data = data;
170
+ response.result.page = page;
171
+ response.result.sort = sort;
172
+ return response;
173
+ }
174
+ static fail(errors, statusCode) {
175
+ const response = new RESTResponseBody();
176
+ response.statusCode = statusCode;
177
+ response.errors = errors;
178
+ return response;
179
+ }
180
+ }
181
+ exports.RESTResponseBody = RESTResponseBody;
182
+ class RESTQueryParams extends RESTPaging {
183
+ getRESTSort() {
184
+ const result = [];
185
+ const items = [];
186
+ if (this.sort) {
187
+ if (this.sort instanceof Array) {
188
+ items.push(...this.sort);
189
+ }
190
+ else {
191
+ items.push(this.sort);
192
+ }
193
+ }
194
+ for (let item of items) {
195
+ const pair = item.split(':');
196
+ if (pair.length != 2) {
197
+ throw new RESTError('invalid_sorting_pair', pair, 422);
198
+ }
199
+ if (['asc', 'desc'].indexOf(pair[1]) === -1) {
200
+ throw new RESTError('invalid_sorting_direction', pair[1], 422);
201
+ }
202
+ result.push({
203
+ property: pair[0],
204
+ direction: pair[1] === 'asc' ? 1 : -1,
205
+ });
206
+ }
207
+ return result;
208
+ }
209
+ extractSort() {
210
+ const sorts = this.getRESTSort();
211
+ const result = {};
212
+ for (let item of sorts) {
213
+ result[item.property] = item.direction;
214
+ }
215
+ return result;
216
+ }
217
+ }
218
+ exports.RESTQueryParams = RESTQueryParams;
219
+ __decorate([
220
+ (0, class_validator_1.IsOptional)(),
221
+ (0, class_validator_1.IsString)({ each: true }),
222
+ __metadata("design:type", Array)
223
+ ], RESTQueryParams.prototype, "sort", void 0);
224
+ //# sourceMappingURL=rest-wrapper.class.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rest-wrapper.class.js","sourceRoot":"","sources":["../../../../src/models/dtos/wrappers/rest-wrapper.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,yDAAyC;AACzC,qDAA+H;AAE/H,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,+CAAO,CAAA;IACP,kDAAS,CAAA;AACb,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAED,MAAa,QAAQ;CASpB;AATD,4BASC;AANG;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;0CACM;AAKjB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,wBAAM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,MAAM,CAAC;IAClB,CAAC;CACJ;AA3CD,0CA2CC;AAxCG;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;6CACV"}
@@ -0,0 +1,4 @@
1
+ export declare enum ContactType {
2
+ Phone = "phone",
3
+ Email = "email"
4
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ContactType = void 0;
4
+ var ContactType;
5
+ (function (ContactType) {
6
+ ContactType["Phone"] = "phone";
7
+ ContactType["Email"] = "email";
8
+ })(ContactType || (exports.ContactType = ContactType = {}));
9
+ //# sourceMappingURL=contact-type.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact-type.enum.js","sourceRoot":"","sources":["../../../src/models/enums/contact-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,8BAAe,CAAA;IACf,8BAAe,CAAA;AACnB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB"}
@@ -0,0 +1,5 @@
1
+ export declare enum RecordState {
2
+ DRAFT = "draft",
3
+ ACTIVE = "active",
4
+ INACTIVE = "inactive"
5
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RecordState = void 0;
4
+ var RecordState;
5
+ (function (RecordState) {
6
+ RecordState["DRAFT"] = "draft";
7
+ RecordState["ACTIVE"] = "active";
8
+ RecordState["INACTIVE"] = "inactive";
9
+ })(RecordState || (exports.RecordState = RecordState = {}));
10
+ //# sourceMappingURL=record-state.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"record-state.enum.js","sourceRoot":"","sources":["../../../src/models/enums/record-state.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAIX;AAJD,WAAY,WAAW;IACnB,8BAAe,CAAA;IACf,gCAAiB,CAAA;IACjB,oCAAqB,CAAA;AACzB,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB"}
@@ -0,0 +1,5 @@
1
+ export declare enum UserVerificationLevel {
2
+ None = "none",
3
+ Level1 = "level-1",
4
+ Level2 = "level-2"
5
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserVerificationLevel = void 0;
4
+ var UserVerificationLevel;
5
+ (function (UserVerificationLevel) {
6
+ UserVerificationLevel["None"] = "none";
7
+ UserVerificationLevel["Level1"] = "level-1";
8
+ UserVerificationLevel["Level2"] = "level-2";
9
+ })(UserVerificationLevel || (exports.UserVerificationLevel = UserVerificationLevel = {}));
10
+ //# sourceMappingURL=user-verifiation-level.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-verifiation-level.enum.js","sourceRoot":"","sources":["../../../src/models/enums/user-verifiation-level.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC7B,sCAAa,CAAA;IACb,2CAAkB,CAAA;IAClB,2CAAkB,CAAA;AACtB,CAAC,EAJW,qBAAqB,qCAArB,qBAAqB,QAIhC"}
@@ -0,0 +1,5 @@
1
+ import { IRecord } from './record.interface';
2
+ import { IIdentifable } from './identifable.interface';
3
+ export interface IBase extends IIdentifable {
4
+ record?: IRecord;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=base.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.interface.js","sourceRoot":"","sources":["../../../src/models/interfaces/base.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import { ContactType } from '../enums/contact-type.enum';
2
+ import { IIdentifable } from './identifable.interface';
3
+ export interface IContact extends IIdentifable {
4
+ type: ContactType;
5
+ value: string;
6
+ primary: boolean;
7
+ verified: boolean;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=contact.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact.interface.js","sourceRoot":"","sources":["../../../src/models/interfaces/contact.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { Types } from 'mongoose';
2
+ import { IBase } from './base.interface';
3
+ import { II18n } from './i18n.interface';
4
+ export interface IDictionary extends IBase {
5
+ keyword: string;
6
+ parentIds: Types.ObjectId[];
7
+ title: II18n;
8
+ metas: Map<string, string>;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=dictionary.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dictionary.interface.js","sourceRoot":"","sources":["../../../src/models/interfaces/dictionary.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface II18n {
2
+ ge: string;
3
+ en?: string | null | undefined;
4
+ ua?: string | null | undefined;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=i18n.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.interface.js","sourceRoot":"","sources":["../../../src/models/interfaces/i18n.interface.ts"],"names":[],"mappings":""}