chyz 2.0.0-rc.7 → 2.0.1-rc.0

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 (153) hide show
  1. package/BaseChyz.d.ts +73 -56
  2. package/BaseChyz.d.ts.map +1 -1
  3. package/BaseChyz.js +569 -398
  4. package/README.md +1 -1
  5. package/base/ActionFilter.d.ts +32 -32
  6. package/base/ActionFilter.d.ts.map +1 -1
  7. package/base/ActionFilter.js +82 -85
  8. package/base/BadRequestHttpException.d.ts +6 -0
  9. package/base/BadRequestHttpException.d.ts.map +1 -0
  10. package/base/BadRequestHttpException.js +17 -0
  11. package/base/BaseError.d.ts +43 -10
  12. package/base/BaseError.d.ts.map +1 -1
  13. package/base/BaseError.js +58 -29
  14. package/base/Behavior.d.ts +3 -3
  15. package/base/Behavior.js +7 -7
  16. package/base/CBaseObject.d.ts +4 -4
  17. package/base/CBaseObject.d.ts.map +1 -1
  18. package/base/CBaseObject.js +16 -16
  19. package/base/CEvents.d.ts +13 -0
  20. package/base/CEvents.d.ts.map +1 -0
  21. package/base/CEvents.js +24 -0
  22. package/base/CRequest.d.ts +1 -1
  23. package/base/CRequest.js +10 -10
  24. package/base/CWebController.d.ts +43 -43
  25. package/base/CWebController.d.ts.map +1 -1
  26. package/base/CWebController.js +81 -74
  27. package/base/Component.d.ts +20 -20
  28. package/base/Component.d.ts.map +1 -1
  29. package/base/Component.js +57 -60
  30. package/base/Configurable.d.ts +2 -2
  31. package/base/Configurable.js +8 -8
  32. package/base/DataErrorDbException.d.ts +5 -5
  33. package/base/DataErrorDbException.d.ts.map +1 -1
  34. package/base/DataErrorDbException.js +17 -17
  35. package/base/DbConnection.d.ts +12 -12
  36. package/base/DbConnection.js +53 -53
  37. package/base/ForbiddenHttpException.d.ts +4 -4
  38. package/base/ForbiddenHttpException.d.ts.map +1 -1
  39. package/base/ForbiddenHttpException.js +16 -16
  40. package/base/InvalidArgumentException.d.ts +5 -5
  41. package/base/InvalidArgumentException.d.ts.map +1 -1
  42. package/base/InvalidArgumentException.js +17 -17
  43. package/base/InvalidConfigException.d.ts +5 -5
  44. package/base/InvalidConfigException.d.ts.map +1 -1
  45. package/base/InvalidConfigException.js +17 -17
  46. package/base/Logs.d.ts +21 -21
  47. package/base/Logs.d.ts.map +1 -1
  48. package/base/Logs.js +57 -57
  49. package/base/Model.d.ts +301 -298
  50. package/base/Model.d.ts.map +1 -1
  51. package/base/Model.js +545 -507
  52. package/base/ModelManager.d.ts +1 -1
  53. package/base/ModelManager.js +19 -19
  54. package/base/NotFoundHttpException.d.ts +5 -5
  55. package/base/NotFoundHttpException.d.ts.map +1 -1
  56. package/base/NotFoundHttpException.js +17 -17
  57. package/base/RestClient.d.ts +6 -6
  58. package/base/RestClient.d.ts.map +1 -1
  59. package/base/RestClient.js +25 -25
  60. package/base/UnauthorizedHttpException.d.ts +5 -5
  61. package/base/UnauthorizedHttpException.d.ts.map +1 -1
  62. package/base/UnauthorizedHttpException.js +17 -17
  63. package/base/ValidationHttpException.d.ts +5 -5
  64. package/base/ValidationHttpException.d.ts.map +1 -1
  65. package/base/ValidationHttpException.js +17 -17
  66. package/base/db/Exception.d.ts +6 -6
  67. package/base/db/Exception.js +15 -15
  68. package/base/index.d.ts +19 -18
  69. package/base/index.d.ts.map +1 -1
  70. package/base/index.js +41 -39
  71. package/decorator/Middleware.d.ts +3 -3
  72. package/decorator/Middleware.js +11 -11
  73. package/decorator/controller.d.ts +2 -2
  74. package/decorator/controller.js +24 -24
  75. package/decorator/delete.d.ts +3 -0
  76. package/decorator/delete.d.ts.map +1 -0
  77. package/decorator/delete.js +36 -0
  78. package/decorator/enums/ControllerDecoratorParams.d.ts +5 -5
  79. package/decorator/enums/ControllerDecoratorParams.js +9 -9
  80. package/decorator/get.d.ts +2 -2
  81. package/decorator/get.js +36 -36
  82. package/decorator/index.d.ts +5 -3
  83. package/decorator/index.d.ts.map +1 -1
  84. package/decorator/index.js +13 -9
  85. package/decorator/post.d.ts +2 -2
  86. package/decorator/post.js +36 -36
  87. package/decorator/put.d.ts +3 -0
  88. package/decorator/put.d.ts.map +1 -0
  89. package/decorator/put.js +36 -0
  90. package/filters/AccessControl.d.ts +12 -12
  91. package/filters/AccessControl.d.ts.map +1 -1
  92. package/filters/AccessControl.js +83 -86
  93. package/filters/AccessRule.d.ts +82 -82
  94. package/filters/AccessRule.d.ts.map +1 -1
  95. package/filters/AccessRule.js +136 -140
  96. package/filters/auth/AuthInterface.d.ts +25 -25
  97. package/filters/auth/AuthInterface.js +2 -2
  98. package/filters/auth/AuthMethod.d.ts +37 -37
  99. package/filters/auth/AuthMethod.d.ts.map +1 -1
  100. package/filters/auth/AuthMethod.js +82 -82
  101. package/filters/auth/HttpBasicAuth.d.ts +23 -22
  102. package/filters/auth/HttpBasicAuth.d.ts.map +1 -1
  103. package/filters/auth/HttpBasicAuth.js +78 -72
  104. package/filters/auth/HttpBearerAuth.d.ts +17 -17
  105. package/filters/auth/HttpBearerAuth.d.ts.map +1 -1
  106. package/filters/auth/HttpBearerAuth.js +33 -32
  107. package/filters/auth/HttpHeaderAuth.d.ts +18 -14
  108. package/filters/auth/HttpHeaderAuth.d.ts.map +1 -1
  109. package/filters/auth/HttpHeaderAuth.js +64 -60
  110. package/filters/auth/JwtHttpBearerAuth.d.ts +20 -20
  111. package/filters/auth/JwtHttpBearerAuth.d.ts.map +1 -1
  112. package/filters/auth/JwtHttpBearerAuth.js +87 -81
  113. package/filters/auth/KeyCloakHttpBearerAuth.d.ts +22 -22
  114. package/filters/auth/KeyCloakHttpBearerAuth.js +116 -116
  115. package/filters/auth/index.d.ts +4 -4
  116. package/filters/auth/index.js +11 -11
  117. package/filters/index.d.ts +2 -2
  118. package/filters/index.js +7 -7
  119. package/index.d.ts +28 -21
  120. package/index.d.ts.map +1 -1
  121. package/index.js +71 -72
  122. package/model/RouteDefinition.d.ts +6 -6
  123. package/model/RouteDefinition.js +8 -8
  124. package/package.json +22 -24
  125. package/rbac/AuthAssignment.d.ts +18 -18
  126. package/rbac/AuthAssignment.js +44 -44
  127. package/rbac/AuthItem.d.ts +26 -26
  128. package/rbac/AuthItem.js +51 -51
  129. package/rbac/AuthItemChild.d.ts +18 -18
  130. package/rbac/AuthItemChild.js +43 -43
  131. package/rbac/AuthManager.d.ts +111 -111
  132. package/rbac/AuthManager.d.ts.map +1 -1
  133. package/rbac/AuthManager.js +356 -358
  134. package/rbac/index.d.ts +5 -0
  135. package/rbac/index.d.ts.map +1 -0
  136. package/rbac/index.js +28 -0
  137. package/requiments/Glob.d.ts +2 -2
  138. package/requiments/Glob.js +10 -10
  139. package/requiments/ReflectUtil.js +24 -24
  140. package/requiments/Utils.d.ts +1 -2
  141. package/requiments/Utils.d.ts.map +1 -1
  142. package/requiments/Utils.js +115 -110
  143. package/validators/BooleanValidator.js +1 -1
  144. package/validators/CompareValidator.js +1 -1
  145. package/validators/DateValidator.js +1 -1
  146. package/validators/EmailValidator.js +1 -1
  147. package/validators/Validator.d.ts +17 -17
  148. package/validators/Validator.js +27 -27
  149. package/web/IdentityInterface.d.ts +55 -54
  150. package/web/IdentityInterface.d.ts.map +1 -1
  151. package/web/IdentityInterface.js +8 -8
  152. package/web/WebUser.d.ts +71 -71
  153. package/web/WebUser.js +165 -165
@@ -1 +1 @@
1
- {"version":3,"file":"ForbiddenHttpException.d.ts","sourceRoot":"","sources":["../../src/base/ForbiddenHttpException.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,qBAAa,sBAAuB,SAAQ,SAAS;gBACnC,OAAO,EAAE,MAAM;CAGhC"}
1
+ {"version":3,"file":"ForbiddenHttpException.d.ts","sourceRoot":"","sources":["../../src/base/ForbiddenHttpException.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,qBAAa,sBAAuB,SAAQ,SAAS;gBACnC,OAAO,EAAE,GAAG;CAG7B"}
@@ -1,16 +1,16 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2021. Chy Bilgisayar Bilisim
4
- * Author: Cihan Ozturk
5
- * E-mail: cihan@chy.com.tr
6
- * Github:https://github.com/cihan53/
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.ForbiddenHttpException = void 0;
10
- const BaseError_1 = require("./BaseError");
11
- class ForbiddenHttpException extends BaseError_1.BaseError {
12
- constructor(message) {
13
- super(message, 403);
14
- }
15
- }
16
- exports.ForbiddenHttpException = ForbiddenHttpException;
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2021. Chy Bilgisayar Bilisim
4
+ * Author: Cihan Ozturk
5
+ * E-mail: cihan@chy.com.tr
6
+ * Github:https://github.com/cihan53/
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.ForbiddenHttpException = void 0;
10
+ const BaseError_1 = require("./BaseError");
11
+ class ForbiddenHttpException extends BaseError_1.BaseError {
12
+ constructor(message) {
13
+ super(message, 403);
14
+ }
15
+ }
16
+ exports.ForbiddenHttpException = ForbiddenHttpException;
@@ -1,6 +1,6 @@
1
- import { BaseError } from "./BaseError";
2
- export declare class InvalidArgumentException extends BaseError {
3
- message: string;
4
- constructor(message: string);
5
- }
1
+ import { BaseError } from "./BaseError";
2
+ export declare class InvalidArgumentException extends BaseError {
3
+ message: any;
4
+ constructor(message: any);
5
+ }
6
6
  //# sourceMappingURL=InvalidArgumentException.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InvalidArgumentException.d.ts","sourceRoot":"","sources":["../../src/base/InvalidArgumentException.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,qBAAa,wBAAyB,SAAQ,SAAS;IAC9B,OAAO,EAAE,MAAM;gBAAf,OAAO,EAAE,MAAM;CAGvC"}
1
+ {"version":3,"file":"InvalidArgumentException.d.ts","sourceRoot":"","sources":["../../src/base/InvalidArgumentException.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,qBAAa,wBAAyB,SAAQ,SAAS;IAC9B,OAAO,EAAE,GAAG;gBAAZ,OAAO,EAAE,GAAG;CAGpC"}
@@ -1,17 +1,17 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2021. Chy Bilgisayar Bilisim
4
- * Author: Cihan Ozturk
5
- * E-mail: cihan@chy.com.tr
6
- * Github:https://github.com/cihan53/
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.InvalidArgumentException = void 0;
10
- const BaseError_1 = require("./BaseError");
11
- class InvalidArgumentException extends BaseError_1.BaseError {
12
- constructor(message) {
13
- super(message, 500);
14
- this.message = message;
15
- }
16
- }
17
- exports.InvalidArgumentException = InvalidArgumentException;
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2021. Chy Bilgisayar Bilisim
4
+ * Author: Cihan Ozturk
5
+ * E-mail: cihan@chy.com.tr
6
+ * Github:https://github.com/cihan53/
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.InvalidArgumentException = void 0;
10
+ const BaseError_1 = require("./BaseError");
11
+ class InvalidArgumentException extends BaseError_1.BaseError {
12
+ constructor(message) {
13
+ super(message, 500);
14
+ this.message = message;
15
+ }
16
+ }
17
+ exports.InvalidArgumentException = InvalidArgumentException;
@@ -1,6 +1,6 @@
1
- import { BaseError } from "./BaseError";
2
- export declare class InvalidConfigException extends BaseError {
3
- message: string;
4
- constructor(message: string);
5
- }
1
+ import { BaseError } from "./BaseError";
2
+ export declare class InvalidConfigException extends BaseError {
3
+ message: any;
4
+ constructor(message: any);
5
+ }
6
6
  //# sourceMappingURL=InvalidConfigException.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InvalidConfigException.d.ts","sourceRoot":"","sources":["../../src/base/InvalidConfigException.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,qBAAa,sBAAuB,SAAQ,SAAS;IAC5B,OAAO,EAAE,MAAM;gBAAf,OAAO,EAAE,MAAM;CAGvC"}
1
+ {"version":3,"file":"InvalidConfigException.d.ts","sourceRoot":"","sources":["../../src/base/InvalidConfigException.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,qBAAa,sBAAuB,SAAQ,SAAS;IAC5B,OAAO,EAAE,GAAG;gBAAZ,OAAO,EAAE,GAAG;CAGpC"}
@@ -1,17 +1,17 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2021. Chy Bilgisayar Bilisim
4
- * Author: Cihan Ozturk
5
- * E-mail: cihan@chy.com.tr
6
- * Github:https://github.com/cihan53/
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.InvalidConfigException = void 0;
10
- const BaseError_1 = require("./BaseError");
11
- class InvalidConfigException extends BaseError_1.BaseError {
12
- constructor(message) {
13
- super(message, 500);
14
- this.message = message;
15
- }
16
- }
17
- exports.InvalidConfigException = InvalidConfigException;
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2021. Chy Bilgisayar Bilisim
4
+ * Author: Cihan Ozturk
5
+ * E-mail: cihan@chy.com.tr
6
+ * Github:https://github.com/cihan53/
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.InvalidConfigException = void 0;
10
+ const BaseError_1 = require("./BaseError");
11
+ class InvalidConfigException extends BaseError_1.BaseError {
12
+ constructor(message) {
13
+ super(message, 500);
14
+ this.message = message;
15
+ }
16
+ }
17
+ exports.InvalidConfigException = InvalidConfigException;
package/base/Logs.d.ts CHANGED
@@ -1,22 +1,22 @@
1
- import { Configurable } from "./Configurable";
2
- export declare class Logs implements Configurable {
3
- name: string;
4
- configs: any;
5
- constructor(name?: string, configs?: any);
6
- init(): void;
7
- /**
8
- *
9
- * @constructor
10
- */
11
- Provider(): any;
12
- logs(...args: any[]): any;
13
- debug(...args: any[]): void;
14
- info(...args: any[]): void;
15
- warn(...args: any[]): void;
16
- error(...args: any[]): void;
17
- fatal(...args: any[]): void;
18
- warning(...args: any[]): void;
19
- }
20
- declare const _default: Logs;
21
- export default _default;
1
+ import { Configurable } from "./Configurable";
2
+ export declare class Logs implements Configurable {
3
+ name: string;
4
+ configs: any;
5
+ constructor(name?: string, configs?: any);
6
+ init(): void;
7
+ /**
8
+ *
9
+ * @constructor
10
+ */
11
+ Provider(): any;
12
+ logs(...args: any[]): any;
13
+ debug(...args: any[]): void;
14
+ info(...args: any[]): void;
15
+ warn(...args: any[]): void;
16
+ error(...args: any[]): void;
17
+ fatal(...args: any[]): void;
18
+ warning(...args: any[]): void;
19
+ }
20
+ declare const _default: Logs;
21
+ export default _default;
22
22
  //# sourceMappingURL=Logs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Logs.d.ts","sourceRoot":"","sources":["../../src/base/Logs.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAI5C,qBAAa,IAAK,YAAW,YAAY;IAE9B,IAAI,SAAyB;IAC7B,OAAO,EAAE,GAAG,CAA6C;gBAGpD,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG;IASxC,IAAI;IAKJ;;;OAGG;IACI,QAAQ;IAIR,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAInB,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAIpB,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAInB,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAInB,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAIpB,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAKpB,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;CAIhC;;AAED,wBAA0B"}
1
+ {"version":3,"file":"Logs.d.ts","sourceRoot":"","sources":["../../src/base/Logs.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAI5C,qBAAa,IAAK,YAAW,YAAY;IAE9B,IAAI,SAAyB;IAC7B,OAAO,EAAE,GAAG,CAA6C;gBAGpD,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG;IASxC,IAAI;IAIJ;;;OAGG;IACI,QAAQ;IAIR,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAInB,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAIpB,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAInB,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAInB,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAIpB,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAKpB,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;CAIhC;;AAED,wBAA0B"}
package/base/Logs.js CHANGED
@@ -1,57 +1,57 @@
1
- "use strict";
2
- /*
3
- *
4
- * Copyright (c) 2022.. Chy Bilgisayar Bilisim
5
- * Author: Cihan Ozturk
6
- * E-mail: cihan@chy.com.tr
7
- * Github:https://github.com/cihan53/
8
- *
9
- */
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.Logs = void 0;
12
- const log4js = require("log4js");
13
- class Logs {
14
- constructor(name, configs) {
15
- var _a;
16
- this.name = this.constructor.name;
17
- this.configs = (_a = require('../log/config/log4js.json')) !== null && _a !== void 0 ? _a : {};
18
- if (name)
19
- this.name = name;
20
- if (configs)
21
- this.configs = configs;
22
- this.Provider().configure(this.configs);
23
- }
24
- init() {
25
- this.Provider().configure(this.configs);
26
- }
27
- /**
28
- *
29
- * @constructor
30
- */
31
- Provider() {
32
- return log4js;
33
- }
34
- logs(...args) {
35
- return log4js.getLogger(this.name);
36
- }
37
- debug(...args) {
38
- this.logs().debug(...arguments);
39
- }
40
- info(...args) {
41
- this.logs().info(...arguments);
42
- }
43
- warn(...args) {
44
- this.logs().warn(...arguments);
45
- }
46
- error(...args) {
47
- this.logs().error(...arguments);
48
- }
49
- fatal(...args) {
50
- this.logs().fatal(...arguments);
51
- }
52
- warning(...args) {
53
- this.logs().warn(...arguments);
54
- }
55
- }
56
- exports.Logs = Logs;
57
- exports.default = new Logs();
1
+ "use strict";
2
+ /*
3
+ *
4
+ * Copyright (c) 2022.. Chy Bilgisayar Bilisim
5
+ * Author: Cihan Ozturk
6
+ * E-mail: cihan@chy.com.tr
7
+ * Github:https://github.com/cihan53/
8
+ *
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.Logs = void 0;
12
+ const log4js = require("log4js");
13
+ class Logs {
14
+ constructor(name, configs) {
15
+ var _a;
16
+ this.name = this.constructor.name;
17
+ this.configs = (_a = require('../log/config/log4js.json')) !== null && _a !== void 0 ? _a : {};
18
+ if (name)
19
+ this.name = name;
20
+ if (configs)
21
+ this.configs = configs;
22
+ this.Provider().configure(this.configs);
23
+ }
24
+ init() {
25
+ this.Provider().configure(this.configs);
26
+ }
27
+ /**
28
+ *
29
+ * @constructor
30
+ */
31
+ Provider() {
32
+ return log4js;
33
+ }
34
+ logs(...args) {
35
+ return log4js.getLogger(this.name);
36
+ }
37
+ debug(...args) {
38
+ this.logs().debug(...args);
39
+ }
40
+ info(...args) {
41
+ this.logs().info(...args);
42
+ }
43
+ warn(...args) {
44
+ this.logs().warn(...arguments);
45
+ }
46
+ error(...args) {
47
+ this.logs().error(...args);
48
+ }
49
+ fatal(...args) {
50
+ this.logs().fatal(...args);
51
+ }
52
+ warning(...args) {
53
+ this.logs().warn(...args);
54
+ }
55
+ }
56
+ exports.Logs = Logs;
57
+ exports.default = new Logs();