@nextage/omics-lib 1.0.2

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 (105) hide show
  1. package/build/constants.d.ts +57 -0
  2. package/build/constants.d.ts.map +1 -0
  3. package/build/constants.js +24 -0
  4. package/build/constants.js.map +1 -0
  5. package/build/enums.d.ts +26 -0
  6. package/build/enums.d.ts.map +1 -0
  7. package/build/enums.js +44 -0
  8. package/build/enums.js.map +1 -0
  9. package/build/errors/app-error.d.ts +13 -0
  10. package/build/errors/app-error.d.ts.map +1 -0
  11. package/build/errors/app-error.js +18 -0
  12. package/build/errors/app-error.js.map +1 -0
  13. package/build/errors/authentication-error.d.ts +6 -0
  14. package/build/errors/authentication-error.d.ts.map +1 -0
  15. package/build/errors/authentication-error.js +11 -0
  16. package/build/errors/authentication-error.js.map +1 -0
  17. package/build/errors/custom-error.d.ts +9 -0
  18. package/build/errors/custom-error.d.ts.map +1 -0
  19. package/build/errors/custom-error.js +11 -0
  20. package/build/errors/custom-error.js.map +1 -0
  21. package/build/errors/forbidden-error.d.ts +6 -0
  22. package/build/errors/forbidden-error.d.ts.map +1 -0
  23. package/build/errors/forbidden-error.js +11 -0
  24. package/build/errors/forbidden-error.js.map +1 -0
  25. package/build/errors/index.d.ts +5 -0
  26. package/build/errors/index.d.ts.map +1 -0
  27. package/build/errors/index.js +21 -0
  28. package/build/errors/index.js.map +1 -0
  29. package/build/index.d.ts +7 -0
  30. package/build/index.d.ts.map +1 -0
  31. package/build/index.js +23 -0
  32. package/build/index.js.map +1 -0
  33. package/build/interfaces.d.ts +54 -0
  34. package/build/interfaces.d.ts.map +1 -0
  35. package/build/interfaces.js +14 -0
  36. package/build/interfaces.js.map +1 -0
  37. package/build/models/genotype.d.ts +19 -0
  38. package/build/models/genotype.d.ts.map +1 -0
  39. package/build/models/genotype.js +34 -0
  40. package/build/models/genotype.js.map +1 -0
  41. package/build/models/index.d.ts +4 -0
  42. package/build/models/index.d.ts.map +1 -0
  43. package/build/models/index.js +20 -0
  44. package/build/models/index.js.map +1 -0
  45. package/build/models/sample.d.ts +19 -0
  46. package/build/models/sample.d.ts.map +1 -0
  47. package/build/models/sample.js +36 -0
  48. package/build/models/sample.js.map +1 -0
  49. package/build/models/variant.d.ts +19 -0
  50. package/build/models/variant.d.ts.map +1 -0
  51. package/build/models/variant.js +45 -0
  52. package/build/models/variant.js.map +1 -0
  53. package/build/routes/express.interfaces.d.ts +11 -0
  54. package/build/routes/express.interfaces.d.ts.map +1 -0
  55. package/build/routes/express.interfaces.js +10 -0
  56. package/build/routes/express.interfaces.js.map +1 -0
  57. package/build/routes/index.d.ts +3 -0
  58. package/build/routes/index.d.ts.map +1 -0
  59. package/build/routes/index.js +19 -0
  60. package/build/routes/index.js.map +1 -0
  61. package/build/routes/swagger.d.ts +13 -0
  62. package/build/routes/swagger.d.ts.map +1 -0
  63. package/build/routes/swagger.js +13 -0
  64. package/build/routes/swagger.js.map +1 -0
  65. package/build/routes/validators.d.ts +11 -0
  66. package/build/routes/validators.d.ts.map +1 -0
  67. package/build/routes/validators.js +17 -0
  68. package/build/routes/validators.js.map +1 -0
  69. package/build/services/index.d.ts +2 -0
  70. package/build/services/index.d.ts.map +1 -0
  71. package/build/services/index.js +18 -0
  72. package/build/services/index.js.map +1 -0
  73. package/build/services/password.d.ts +5 -0
  74. package/build/services/password.d.ts.map +1 -0
  75. package/build/services/password.js +20 -0
  76. package/build/services/password.js.map +1 -0
  77. package/build/types/genotype.d.ts +11 -0
  78. package/build/types/genotype.d.ts.map +1 -0
  79. package/build/types/genotype.js +3 -0
  80. package/build/types/genotype.js.map +1 -0
  81. package/build/types/index.d.ts +4 -0
  82. package/build/types/index.d.ts.map +1 -0
  83. package/build/types/index.js +20 -0
  84. package/build/types/index.js.map +1 -0
  85. package/build/types/sample.d.ts +13 -0
  86. package/build/types/sample.d.ts.map +1 -0
  87. package/build/types/sample.js +3 -0
  88. package/build/types/sample.js.map +1 -0
  89. package/build/types/variant.d.ts +22 -0
  90. package/build/types/variant.d.ts.map +1 -0
  91. package/build/types/variant.js +3 -0
  92. package/build/types/variant.js.map +1 -0
  93. package/build/utils/express.d.ts +37 -0
  94. package/build/utils/express.d.ts.map +1 -0
  95. package/build/utils/express.js +114 -0
  96. package/build/utils/express.js.map +1 -0
  97. package/build/utils/functs.d.ts +46 -0
  98. package/build/utils/functs.d.ts.map +1 -0
  99. package/build/utils/functs.js +128 -0
  100. package/build/utils/functs.js.map +1 -0
  101. package/build/utils/index.d.ts +3 -0
  102. package/build/utils/index.d.ts.map +1 -0
  103. package/build/utils/index.js +19 -0
  104. package/build/utils/index.js.map +1 -0
  105. package/package.json +66 -0
@@ -0,0 +1,57 @@
1
+ import { BaseRoles } from './enums';
2
+ export declare const LICENSE_DATE_FORMAT = "YYYY-MM-DD";
3
+ export declare const ADMIN_ROLES: BaseRoles[];
4
+ export declare const CONFIG_ROLES: BaseRoles[];
5
+ export declare const CONFIG_ORG_ROLES: BaseRoles[];
6
+ export declare const MANAGER_ORG_ROLES: BaseRoles[];
7
+ export declare const RES_CODE: {
8
+ SUCCESS: {
9
+ code: number;
10
+ message: string;
11
+ };
12
+ MISSING_DATA: {
13
+ code: number;
14
+ message: string;
15
+ };
16
+ MISSING_CONFIG: {
17
+ code: number;
18
+ message: string;
19
+ };
20
+ INCORRECT_DATA: {
21
+ code: number;
22
+ message: string;
23
+ };
24
+ ALREADY_EXISTS: {
25
+ code: number;
26
+ message: string;
27
+ };
28
+ NOT_FOUND: {
29
+ code: number;
30
+ message: string;
31
+ };
32
+ FORBIDDEN: {
33
+ code: number;
34
+ message: string;
35
+ };
36
+ MISSING_MODULE: {
37
+ code: number;
38
+ message: string;
39
+ };
40
+ DECRYPT_ERR: {
41
+ code: number;
42
+ message: string;
43
+ };
44
+ GENERIC: {
45
+ code: number;
46
+ message: string;
47
+ };
48
+ AUTH_REQUIRED: {
49
+ code: number;
50
+ message: string;
51
+ };
52
+ LOGIN_ATTEMPTS: {
53
+ code: number;
54
+ message: string;
55
+ };
56
+ };
57
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAa,SAAS,CAAC;AAE3C,eAAO,MAAM,mBAAmB,eAAe,CAAC;AAEhD,eAAO,MAAM,WAAW,aAA+C,CAAC;AACxE,eAAO,MAAM,YAAY,aAA+C,CAAC;AACzE,eAAO,MAAM,gBAAgB,aAA4C,CAAC;AAC1E,eAAO,MAAM,iBAAiB,aAA+C,CAAC;AAE9E,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAapB,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RES_CODE = exports.MANAGER_ORG_ROLES = exports.CONFIG_ORG_ROLES = exports.CONFIG_ROLES = exports.ADMIN_ROLES = exports.LICENSE_DATE_FORMAT = void 0;
4
+ const enums_1 = require("./enums");
5
+ exports.LICENSE_DATE_FORMAT = 'YYYY-MM-DD';
6
+ exports.ADMIN_ROLES = [enums_1.BaseRoles.SADMIN, enums_1.BaseRoles.ADMIN];
7
+ exports.CONFIG_ROLES = [...exports.ADMIN_ROLES, enums_1.BaseRoles.CONFIG];
8
+ exports.CONFIG_ORG_ROLES = [...exports.CONFIG_ROLES, enums_1.BaseRoles.ORG_CFG];
9
+ exports.MANAGER_ORG_ROLES = [...exports.CONFIG_ORG_ROLES, enums_1.BaseRoles.ORG_MANAGER];
10
+ exports.RES_CODE = {
11
+ SUCCESS: { code: 10, message: 'success' },
12
+ MISSING_DATA: { code: 20, message: 'missing data' },
13
+ MISSING_CONFIG: { code: 21, message: 'missing config' },
14
+ INCORRECT_DATA: { code: 23, message: 'incorrect data' },
15
+ ALREADY_EXISTS: { code: 24, message: 'item already exists' },
16
+ NOT_FOUND: { code: 25, message: 'not found' },
17
+ FORBIDDEN: { code: 26, message: 'forbidden' },
18
+ MISSING_MODULE: { code: 30, message: 'module does not exist' },
19
+ DECRYPT_ERR: { code: 40, message: 'error decrypting data' },
20
+ GENERIC: { code: 99, message: 'internal error' },
21
+ AUTH_REQUIRED: { code: 27, message: 'authentication required' },
22
+ LOGIN_ATTEMPTS: { code: 27, message: 'too many login attempts' }
23
+ };
24
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAA,mCAA2C;AAE9B,QAAA,mBAAmB,GAAG,YAAY,CAAC;AAEnC,QAAA,WAAW,GAAS,CAAC,iBAAS,CAAC,MAAM,EAAK,iBAAS,CAAC,KAAK,CAAC,CAAC;AAC3D,QAAA,YAAY,GAAQ,CAAC,GAAG,mBAAW,EAAO,iBAAS,CAAC,MAAM,CAAC,CAAC;AAC5D,QAAA,gBAAgB,GAAI,CAAC,GAAG,oBAAY,EAAM,iBAAS,CAAC,OAAO,CAAC,CAAC;AAC7D,QAAA,iBAAiB,GAAG,CAAC,GAAG,wBAAgB,EAAE,iBAAS,CAAC,WAAW,CAAC,CAAC;AAEjE,QAAA,QAAQ,GAAG;IACtB,OAAO,EAAS,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;IAChD,YAAY,EAAI,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;IACrD,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;IACvD,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;IACvD,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE;IAC5D,SAAS,EAAO,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;IAClD,SAAS,EAAO,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;IAClD,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,uBAAuB,EAAE;IAC9D,WAAW,EAAK,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,uBAAuB,EAAE;IAC9D,OAAO,EAAS,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;IACvD,aAAa,EAAG,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,yBAAyB,EAAC;IAC/D,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,yBAAyB,EAAC;CAChE,CAAC"}
@@ -0,0 +1,26 @@
1
+ export declare enum SecurityLogs {
2
+ changePwdFailed = "changePwdFailed",
3
+ changePwdSuccess = "changePwdSuccess",
4
+ loginExpiredPwd = "loginExpiredPwd",
5
+ loginInvalidPwd = "loginInvalidPwd",
6
+ loginUnknownUser = "loginUnknownUser",
7
+ loginUserNotActive = "loginUserNotActive",
8
+ loginSuccess = "loginSuccess",
9
+ loginAttempts = "loginAttempts",
10
+ authRequired = "authRequired"
11
+ }
12
+ export declare enum SecurityLogLevel {
13
+ info = "info",
14
+ warning = "warn",
15
+ error = "error",
16
+ debug = "debug"
17
+ }
18
+ export declare enum BaseRoles {
19
+ SADMIN = "SUPERADMIN",
20
+ ADMIN = "ADMIN",
21
+ CONFIG = "CONFIG",
22
+ ORG_CFG = "ORG_CFG",
23
+ ORG_MANAGER = "ORG_MANAGER",
24
+ ORG_MEMBER = "ORG_MEMBER"
25
+ }
26
+ //# sourceMappingURL=enums.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,eAAe,oBAAsB;IACrC,gBAAgB,qBAAsB;IACtC,eAAe,oBAAsB;IACrC,eAAe,oBAAsB;IACrC,gBAAgB,qBAAsB;IACtC,kBAAkB,uBAAsB;IACxC,YAAY,iBAAsB;IAClC,aAAa,kBAAsB;IACnC,YAAY,iBAAsB;CACnC;AAED,oBAAY,gBAAgB;IAC1B,IAAI,SAAY;IAChB,OAAO,SAAS;IAChB,KAAK,UAAY;IACjB,KAAK,UAAY;CAClB;AAgBD,oBAAY,SAAS;IACnB,MAAM,eAAoB;IAC1B,KAAK,UAAgB;IACrB,MAAM,WAAgB;IACtB,OAAO,YAAgB;IACvB,WAAW,gBAAgB;IAC3B,UAAU,eAAgB;CAC3B"}
package/build/enums.js ADDED
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BaseRoles = exports.SecurityLogLevel = exports.SecurityLogs = void 0;
4
+ var SecurityLogs;
5
+ (function (SecurityLogs) {
6
+ SecurityLogs["changePwdFailed"] = "changePwdFailed";
7
+ SecurityLogs["changePwdSuccess"] = "changePwdSuccess";
8
+ SecurityLogs["loginExpiredPwd"] = "loginExpiredPwd";
9
+ SecurityLogs["loginInvalidPwd"] = "loginInvalidPwd";
10
+ SecurityLogs["loginUnknownUser"] = "loginUnknownUser";
11
+ SecurityLogs["loginUserNotActive"] = "loginUserNotActive";
12
+ SecurityLogs["loginSuccess"] = "loginSuccess";
13
+ SecurityLogs["loginAttempts"] = "loginAttempts";
14
+ SecurityLogs["authRequired"] = "authRequired";
15
+ })(SecurityLogs || (exports.SecurityLogs = SecurityLogs = {}));
16
+ var SecurityLogLevel;
17
+ (function (SecurityLogLevel) {
18
+ SecurityLogLevel["info"] = "info";
19
+ SecurityLogLevel["warning"] = "warn";
20
+ SecurityLogLevel["error"] = "error";
21
+ SecurityLogLevel["debug"] = "debug";
22
+ })(SecurityLogLevel || (exports.SecurityLogLevel = SecurityLogLevel = {}));
23
+ // export enum AuthIssuer {
24
+ // USER = 'user',
25
+ // DEVICE = 'device',
26
+ // INVITE = 'invite',
27
+ // OID = 'openid'
28
+ // }
29
+ // export enum LOGIN_ERRORS {
30
+ // USER_NOT_FOUND = 'userNotFound',
31
+ // USER_NOT_ACTIVE = 'userNotActive',
32
+ // LOGIN_FAILED = 'loginFailed',
33
+ // EXPIRED = 'expired'
34
+ // }
35
+ var BaseRoles;
36
+ (function (BaseRoles) {
37
+ BaseRoles["SADMIN"] = "SUPERADMIN";
38
+ BaseRoles["ADMIN"] = "ADMIN";
39
+ BaseRoles["CONFIG"] = "CONFIG";
40
+ BaseRoles["ORG_CFG"] = "ORG_CFG";
41
+ BaseRoles["ORG_MANAGER"] = "ORG_MANAGER";
42
+ BaseRoles["ORG_MEMBER"] = "ORG_MEMBER";
43
+ })(BaseRoles || (exports.BaseRoles = BaseRoles = {}));
44
+ //# sourceMappingURL=enums.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enums.js","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAUX;AAVD,WAAY,YAAY;IACtB,mDAAqC,CAAA;IACrC,qDAAsC,CAAA;IACtC,mDAAqC,CAAA;IACrC,mDAAqC,CAAA;IACrC,qDAAsC,CAAA;IACtC,yDAAwC,CAAA;IACxC,6CAAkC,CAAA;IAClC,+CAAmC,CAAA;IACnC,6CAAkC,CAAA;AACpC,CAAC,EAVW,YAAY,4BAAZ,YAAY,QAUvB;AAED,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,iCAAgB,CAAA;IAChB,oCAAgB,CAAA;IAChB,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;AACnB,CAAC,EALW,gBAAgB,gCAAhB,gBAAgB,QAK3B;AAED,2BAA2B;AAC3B,qBAAqB;AACrB,uBAAuB;AACvB,uBAAuB;AACvB,sBAAsB;AACtB,IAAI;AAEJ,6BAA6B;AAC7B,sCAAsC;AACtC,uCAAuC;AACvC,qCAAqC;AACrC,gCAAgC;AAChC,IAAI;AAEJ,IAAY,SAOX;AAPD,WAAY,SAAS;IACnB,kCAA0B,CAAA;IAC1B,4BAAqB,CAAA;IACrB,8BAAsB,CAAA;IACtB,gCAAuB,CAAA;IACvB,wCAA2B,CAAA;IAC3B,sCAA0B,CAAA;AAC5B,CAAC,EAPW,SAAS,yBAAT,SAAS,QAOpB"}
@@ -0,0 +1,13 @@
1
+ import { CustomError } from './custom-error';
2
+ export declare class AppError extends CustomError {
3
+ message: string;
4
+ statusCode: number;
5
+ extensions: {
6
+ code: string;
7
+ };
8
+ constructor(message: string);
9
+ serializeErrors(): {
10
+ message: string;
11
+ }[];
12
+ }
13
+ //# sourceMappingURL=app-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-error.d.ts","sourceRoot":"","sources":["../../src/errors/app-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,qBAAa,QAAS,SAAQ,WAAW;IAKpB,OAAO,EAAE,MAAM;IAHlC,UAAU,SAAO;IACjB,UAAU;;MAAyB;gBAEhB,OAAO,EAAE,MAAM;IAOlC,eAAe;;;CAGhB"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AppError = void 0;
4
+ const custom_error_1 = require("./custom-error");
5
+ class AppError extends custom_error_1.CustomError {
6
+ constructor(message) {
7
+ super(message || 'Application Error');
8
+ this.message = message;
9
+ this.statusCode = 400;
10
+ this.extensions = { code: 'APP_ERROR' };
11
+ Object.setPrototypeOf(this, AppError.prototype);
12
+ }
13
+ serializeErrors() {
14
+ return [{ message: this.message }];
15
+ }
16
+ }
17
+ exports.AppError = AppError;
18
+ //# sourceMappingURL=app-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-error.js","sourceRoot":"","sources":["../../src/errors/app-error.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAE7C,MAAa,QAAS,SAAQ,0BAAW;IAKvC,YAAmB,OAAe;QAEhC,KAAK,CAAC,OAAO,IAAI,mBAAmB,CAAC,CAAC;QAFrB,YAAO,GAAP,OAAO,CAAQ;QAHlC,eAAU,GAAG,GAAG,CAAC;QACjB,eAAU,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;QAMjC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;IAClD,CAAC;IAED,eAAe;QACb,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IACrC,CAAC;CACF;AAfD,4BAeC"}
@@ -0,0 +1,6 @@
1
+ import { AppObject } from '../interfaces';
2
+ export declare class AuthenticationError extends Error {
3
+ extensions: AppObject;
4
+ constructor(message?: string, i18n?: string);
5
+ }
6
+ //# sourceMappingURL=authentication-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authentication-error.d.ts","sourceRoot":"","sources":["../../src/errors/authentication-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,qBAAa,mBAAoB,SAAQ,KAAK;IAE5C,UAAU,EAAE,SAAS,CAAC;gBAEV,OAAO,GAAE,MAAkC,EAAE,IAAI,GAAE,MAA2C;CAK3G"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthenticationError = void 0;
4
+ class AuthenticationError extends Error {
5
+ constructor(message = 'Authentication required', i18n = 'messages.authentication.required') {
6
+ super(message);
7
+ this.extensions = { code: 401, i18n };
8
+ }
9
+ }
10
+ exports.AuthenticationError = AuthenticationError;
11
+ //# sourceMappingURL=authentication-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authentication-error.js","sourceRoot":"","sources":["../../src/errors/authentication-error.ts"],"names":[],"mappings":";;;AAEA,MAAa,mBAAoB,SAAQ,KAAK;IAI5C,YAAY,UAAkB,yBAAyB,EAAE,OAAe,kCAAkC;QAExG,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,UAAU,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;IACxC,CAAC;CACF;AATD,kDASC"}
@@ -0,0 +1,9 @@
1
+ export declare abstract class CustomError extends Error {
2
+ abstract statusCode: number;
3
+ constructor(message: string);
4
+ abstract serializeErrors(): {
5
+ message: string;
6
+ field?: string;
7
+ }[];
8
+ }
9
+ //# sourceMappingURL=custom-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-error.d.ts","sourceRoot":"","sources":["../../src/errors/custom-error.ts"],"names":[],"mappings":"AAAA,8BAAsB,WAAY,SAAQ,KAAK;IAE7C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBAEhB,OAAO,EAAE,MAAM;IAO3B,QAAQ,CAAC,eAAe,IAAI;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE;CAClE"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CustomError = void 0;
4
+ class CustomError extends Error {
5
+ constructor(message) {
6
+ super(message);
7
+ Object.setPrototypeOf(this, CustomError.prototype);
8
+ }
9
+ }
10
+ exports.CustomError = CustomError;
11
+ //# sourceMappingURL=custom-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-error.js","sourceRoot":"","sources":["../../src/errors/custom-error.ts"],"names":[],"mappings":";;;AAAA,MAAsB,WAAY,SAAQ,KAAK;IAI7C,YAAY,OAAe;QAEzB,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC;CAGF;AAZD,kCAYC"}
@@ -0,0 +1,6 @@
1
+ import { AppObject } from '../interfaces';
2
+ export declare class ForbiddenError extends Error {
3
+ extensions: AppObject;
4
+ constructor(message?: string, i18n?: string);
5
+ }
6
+ //# sourceMappingURL=forbidden-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forbidden-error.d.ts","sourceRoot":"","sources":["../../src/errors/forbidden-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,qBAAa,cAAe,SAAQ,KAAK;IAEvC,UAAU,EAAE,SAAS,CAAC;gBAEV,OAAO,GAAE,MAAoB,EAAE,IAAI,GAAE,MAA8C;CAKhG"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ForbiddenError = void 0;
4
+ class ForbiddenError extends Error {
5
+ constructor(message = 'Forbidden', i18n = 'messages.authorization.accessDenied') {
6
+ super(message);
7
+ this.extensions = { code: 403, i18n };
8
+ }
9
+ }
10
+ exports.ForbiddenError = ForbiddenError;
11
+ //# sourceMappingURL=forbidden-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forbidden-error.js","sourceRoot":"","sources":["../../src/errors/forbidden-error.ts"],"names":[],"mappings":";;;AAEA,MAAa,cAAe,SAAQ,KAAK;IAIvC,YAAY,UAAkB,WAAW,EAAE,OAAe,qCAAqC;QAE7F,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,UAAU,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;IACxC,CAAC;CACF;AATD,wCASC"}
@@ -0,0 +1,5 @@
1
+ export * from './app-error';
2
+ export * from './authentication-error';
3
+ export * from './forbidden-error';
4
+ export * from './custom-error';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./app-error"), exports);
18
+ __exportStar(require("./authentication-error"), exports);
19
+ __exportStar(require("./forbidden-error"), exports);
20
+ __exportStar(require("./custom-error"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,yDAAuC;AACvC,oDAAkC;AAClC,iDAA+B"}
@@ -0,0 +1,7 @@
1
+ export * from './constants';
2
+ export * from './enums';
3
+ export * from './models';
4
+ export * from './types';
5
+ export * from './interfaces';
6
+ export * from './utils';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
package/build/index.js ADDED
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./constants"), exports);
18
+ __exportStar(require("./enums"), exports);
19
+ __exportStar(require("./models"), exports);
20
+ __exportStar(require("./types"), exports);
21
+ __exportStar(require("./interfaces"), exports);
22
+ __exportStar(require("./utils"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,+CAA6B;AAC7B,0CAAwB"}
@@ -0,0 +1,54 @@
1
+ import { SecurityLogLevel } from './enums';
2
+ export type NxCallback<T> = (err: Error | null, res?: T) => void;
3
+ export interface SecurityLogData {
4
+ userId: string;
5
+ module: string;
6
+ method: string;
7
+ message?: string;
8
+ level?: SecurityLogLevel;
9
+ }
10
+ export interface EmailResult {
11
+ messageId?: string;
12
+ success: boolean;
13
+ statusCode?: number;
14
+ }
15
+ export type BaseDBItem = {
16
+ id?: string;
17
+ };
18
+ export interface BaseEntity extends BaseDBItem {
19
+ code?: string;
20
+ name?: string;
21
+ version?: number;
22
+ }
23
+ export interface Address {
24
+ street: string;
25
+ city: string;
26
+ postalCode: string;
27
+ country: string;
28
+ }
29
+ export interface ContactData {
30
+ email?: string;
31
+ secondaryEmail?: string;
32
+ pec?: string;
33
+ phone1?: string;
34
+ phone2?: string;
35
+ phone3?: string;
36
+ address?: Address;
37
+ }
38
+ export declare abstract class BaseUser {
39
+ id?: string;
40
+ username?: string;
41
+ roles?: string[];
42
+ active?: boolean;
43
+ }
44
+ export interface AppObject {
45
+ [key: string]: any;
46
+ }
47
+ export interface AppTypeObject<T> {
48
+ [key: string]: T;
49
+ }
50
+ export interface BankData {
51
+ iban?: string;
52
+ swift?: string;
53
+ }
54
+ //# sourceMappingURL=interfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,KAAK,IAAI,CAAA;AAEhE,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAI,MAAM,CAAC;IACjB,MAAM,EAAI,MAAM,CAAC;IACjB,MAAM,EAAI,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAI,gBAAgB,CAAC;CAC5B;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAG,MAAM,CAAC;IACpB,OAAO,EAAM,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAA;AAED,MAAM,WAAW,UAAW,SAAQ,UAAU;IAC5C,IAAI,CAAC,EAAK,MAAM,CAAC;IACjB,IAAI,CAAC,EAAK,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,OAAO;IACtB,MAAM,EAAM,MAAM,CAAC;IACnB,IAAI,EAAQ,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAK,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAW,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,GAAG,CAAC,EAAa,MAAM,CAAC;IACxB,MAAM,CAAC,EAAU,MAAM,CAAC;IACxB,MAAM,CAAC,EAAU,MAAM,CAAC;IACxB,MAAM,CAAC,EAAU,MAAM,CAAC;IACxB,OAAO,CAAC,EAAS,OAAO,CAAC;CAC1B;AAED,8BAAsB,QAAQ;IAC5B,EAAE,CAAC,EAAY,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAM,MAAM,CAAC;IACtB,KAAK,CAAC,EAAS,MAAM,EAAE,CAAC;IACxB,MAAM,CAAC,EAAQ,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,SAAS;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;CAClB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,CAAC,EAAG,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BaseUser = void 0;
4
+ class BaseUser {
5
+ }
6
+ exports.BaseUser = BaseUser;
7
+ // export interface NxUserContext {
8
+ // user? : BaseUser;
9
+ // evtItem? : any;
10
+ // evtType? : ModelCrudEventType | UserCrudEventType;
11
+ // userAgent? : string;
12
+ // remoteAddress?: string;
13
+ // }
14
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";;;AA8CA,MAAsB,QAAQ;CAK7B;AALD,4BAKC;AAoBD,mCAAmC;AACnC,8BAA8B;AAC9B,yBAAyB;AACzB,4DAA4D;AAC5D,4BAA4B;AAC5B,4BAA4B;AAC5B,IAAI"}
@@ -0,0 +1,19 @@
1
+ import mongoose from 'mongoose';
2
+ import { IGenotype } from '../types';
3
+ export interface GenotypeAttrs extends IGenotype {
4
+ createdAt?: Date;
5
+ updatedAt?: Date;
6
+ deletedAt?: Date;
7
+ version?: number;
8
+ }
9
+ export interface GenotypeDoc extends mongoose.Document {
10
+ createdAt?: Date;
11
+ updatedAt?: Date;
12
+ deletedAt?: Date;
13
+ version: number;
14
+ }
15
+ export interface GenotypeModel extends mongoose.Model<GenotypeDoc> {
16
+ build(attrs: GenotypeAttrs): GenotypeDoc;
17
+ }
18
+ export declare const Genotype: GenotypeModel;
19
+ //# sourceMappingURL=genotype.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"genotype.d.ts","sourceRoot":"","sources":["../../src/models/genotype.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAuB,UAAU,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAkB,UAAU,CAAC;AAEjD,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,CAAC,EAAI,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAY,SAAQ,QAAQ,CAAC,QAAQ;IACpD,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,EAAK,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAc,SAAQ,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC;IAChE,KAAK,CAAC,KAAK,EAAE,aAAa,GAAG,WAAW,CAAC;CAC1C;AAgCD,eAAO,MAAM,QAAQ,eAAiE,CAAC"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Genotype = void 0;
7
+ const mongoose_1 = __importDefault(require("mongoose"));
8
+ const mongoose_update_if_current_1 = require("mongoose-update-if-current");
9
+ const schema = new mongoose_1.default.Schema({
10
+ variantId: { type: String, required: true },
11
+ sampleId: { type: String, required: true },
12
+ sequencingSampleId: { type: String },
13
+ GT: { type: String },
14
+ VAF: { type: Number },
15
+ DP: { type: Number },
16
+ alleles: { type: [String] },
17
+ createdAt: { type: Date },
18
+ updatedAt: { type: Date },
19
+ deletedAt: { type: Date }
20
+ }, {
21
+ toJSON: {
22
+ transform(doc, ret) {
23
+ ret.id = ret._id;
24
+ delete ret._id;
25
+ },
26
+ },
27
+ });
28
+ schema.set('versionKey', 'version');
29
+ schema.plugin(mongoose_update_if_current_1.updateIfCurrentPlugin);
30
+ schema.statics.build = (attrs) => {
31
+ return new exports.Genotype(attrs);
32
+ };
33
+ exports.Genotype = mongoose_1.default.model('Genotype', schema);
34
+ //# sourceMappingURL=genotype.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"genotype.js","sourceRoot":"","sources":["../../src/models/genotype.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAiD;AACjD,2EAAmE;AAqBnE,MAAM,MAAM,GAAG,IAAI,kBAAQ,CAAC,MAAM,CAChC;IACE,SAAS,EAAW,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACpD,QAAQ,EAAY,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACpD,kBAAkB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;IACpC,EAAE,EAAkB,EAAE,IAAI,EAAE,MAAM,EAAE;IACpC,GAAG,EAAiB,EAAE,IAAI,EAAE,MAAM,EAAE;IACpC,EAAE,EAAkB,EAAE,IAAI,EAAE,MAAM,EAAE;IACpC,OAAO,EAAa,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE;IACtC,SAAS,EAAW,EAAE,IAAI,EAAE,IAAI,EAAE;IAClC,SAAS,EAAW,EAAE,IAAI,EAAE,IAAI,EAAE;IAClC,SAAS,EAAW,EAAE,IAAI,EAAE,IAAI,EAAE;CACnC,EACD;IACE,MAAM,EAAE;QACN,SAAS,CAAC,GAAG,EAAE,GAAQ;YACrB,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,GAAG,CAAC;YACjB,OAAO,GAAG,CAAC,GAAG,CAAC;QACjB,CAAC;KACF;CACF,CACF,CAAC;AAEF,MAAM,CAAC,GAAG,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;AACpC,MAAM,CAAC,MAAM,CAAC,kDAAqB,CAAC,CAAC;AAErC,MAAM,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,KAAoB,EAAE,EAAE;IAC9C,OAAO,IAAI,gBAAQ,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC,CAAC;AAEW,QAAA,QAAQ,GAAG,kBAAQ,CAAC,KAAK,CAA6B,UAAU,EAAE,MAAM,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './genotype';
2
+ export * from './sample';
3
+ export * from './variant';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./genotype"), exports);
18
+ __exportStar(require("./sample"), exports);
19
+ __exportStar(require("./variant"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,2CAAyB;AACzB,4CAA0B"}
@@ -0,0 +1,19 @@
1
+ import mongoose from 'mongoose';
2
+ import { ISample } from '../types';
3
+ export interface SampleAttrs extends ISample {
4
+ createdAt?: Date;
5
+ updatedAt?: Date;
6
+ deletedAt?: Date;
7
+ version?: number;
8
+ }
9
+ export interface SampleDoc extends mongoose.Document {
10
+ createdAt?: Date;
11
+ updatedAt?: Date;
12
+ deletedAt?: Date;
13
+ version: number;
14
+ }
15
+ export interface SampleModel extends mongoose.Model<SampleDoc> {
16
+ build(attrs: SampleAttrs): SampleDoc;
17
+ }
18
+ export declare const Sample: SampleModel;
19
+ //# sourceMappingURL=sample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sample.d.ts","sourceRoot":"","sources":["../../src/models/sample.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAuB,UAAU,CAAC;AAEjD,OAAO,EAAE,OAAO,EAAE,MAAoB,UAAU,CAAC;AAEjD,MAAM,WAAW,WAAY,SAAQ,OAAO;IAC1C,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,CAAC,EAAI,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,SAAU,SAAQ,QAAQ,CAAC,QAAQ;IAClD,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,EAAK,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAY,SAAQ,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC;IAC5D,KAAK,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;CACtC;AAmCD,eAAO,MAAM,MAAM,aAA2D,CAAC"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Sample = void 0;
7
+ const mongoose_1 = __importDefault(require("mongoose"));
8
+ const mongoose_update_if_current_1 = require("mongoose-update-if-current");
9
+ const ClinicalSchema = new mongoose_1.default.Schema({
10
+ diagnosis: { type: String },
11
+ snomedM: { type: String },
12
+ snomedT: { type: String },
13
+ tumorSite: { type: String }
14
+ }, { _id: false });
15
+ const schema = new mongoose_1.default.Schema({
16
+ biobankSampleId: { type: String, required: true, unique: true },
17
+ sequencingSampleId: { type: String, required: true, unique: true },
18
+ clinical: { type: ClinicalSchema },
19
+ createdAt: { type: Date },
20
+ updatedAt: { type: Date },
21
+ deletedAt: { type: Date }
22
+ }, {
23
+ toJSON: {
24
+ transform(doc, ret) {
25
+ ret.id = ret._id;
26
+ delete ret._id;
27
+ },
28
+ },
29
+ });
30
+ schema.set('versionKey', 'version');
31
+ schema.plugin(mongoose_update_if_current_1.updateIfCurrentPlugin);
32
+ schema.statics.build = (attrs) => {
33
+ return new exports.Sample(attrs);
34
+ };
35
+ exports.Sample = mongoose_1.default.model('Sample', schema);
36
+ //# sourceMappingURL=sample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sample.js","sourceRoot":"","sources":["../../src/models/sample.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAiD;AACjD,2EAAmE;AAqBnE,MAAM,cAAc,GAAG,IAAI,kBAAQ,CAAC,MAAM,CAAC;IACzC,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;IAC3B,OAAO,EAAI,EAAE,IAAI,EAAE,MAAM,EAAE;IAC3B,OAAO,EAAI,EAAE,IAAI,EAAE,MAAM,EAAE;IAC3B,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;CAC5B,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC;AAEnB,MAAM,MAAM,GAAG,IAAI,kBAAQ,CAAC,MAAM,CAChC;IACE,eAAe,EAAK,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IAClE,kBAAkB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IAClE,QAAQ,EAAY,EAAE,IAAI,EAAE,cAAc,EAAE;IAC5C,SAAS,EAAW,EAAE,IAAI,EAAE,IAAI,EAAE;IAClC,SAAS,EAAW,EAAE,IAAI,EAAE,IAAI,EAAE;IAClC,SAAS,EAAW,EAAE,IAAI,EAAE,IAAI,EAAE;CACnC,EACD;IACE,MAAM,EAAE;QACN,SAAS,CAAC,GAAG,EAAE,GAAQ;YACrB,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,GAAG,CAAC;YACjB,OAAO,GAAG,CAAC,GAAG,CAAC;QACjB,CAAC;KACF;CACF,CACF,CAAC;AAEF,MAAM,CAAC,GAAG,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;AACpC,MAAM,CAAC,MAAM,CAAC,kDAAqB,CAAC,CAAC;AAErC,MAAM,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,KAAkB,EAAE,EAAE;IAC5C,OAAO,IAAI,cAAM,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC,CAAC;AAEW,QAAA,MAAM,GAAG,kBAAQ,CAAC,KAAK,CAAyB,QAAQ,EAAE,MAAM,CAAC,CAAC"}