chyz 2.0.0-rc.4 → 2.0.0-rc.40

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 +62 -60
  2. package/BaseChyz.d.ts.map +1 -1
  3. package/BaseChyz.js +507 -379
  4. package/base/ActionFilter.d.ts +32 -32
  5. package/base/ActionFilter.d.ts.map +1 -1
  6. package/base/ActionFilter.js +82 -85
  7. package/base/BadRequestHttpException.d.ts +6 -0
  8. package/base/BadRequestHttpException.d.ts.map +1 -0
  9. package/base/BadRequestHttpException.js +17 -0
  10. package/base/BaseError.d.ts +33 -10
  11. package/base/BaseError.d.ts.map +1 -1
  12. package/base/BaseError.js +48 -29
  13. package/base/Behavior.d.ts +3 -3
  14. package/base/Behavior.js +7 -7
  15. package/base/CBaseObject.d.ts +4 -4
  16. package/base/CBaseObject.d.ts.map +1 -1
  17. package/base/CBaseObject.js +16 -16
  18. package/base/CEvents.d.ts +13 -0
  19. package/base/CEvents.d.ts.map +1 -0
  20. package/base/CEvents.js +24 -0
  21. package/base/CRequest.d.ts +2 -0
  22. package/base/CRequest.d.ts.map +1 -0
  23. package/base/CRequest.js +10 -0
  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 +22 -0
  47. package/base/Logs.d.ts.map +1 -0
  48. package/base/Logs.js +57 -0
  49. package/base/Model.d.ts +301 -298
  50. package/base/Model.d.ts.map +1 -1
  51. package/base/Model.js +538 -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 -8
  58. package/base/RestClient.d.ts.map +1 -1
  59. package/base/RestClient.js +25 -26
  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 -17
  69. package/base/index.d.ts.map +1 -1
  70. package/base/index.js +41 -37
  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.js +82 -82
  100. package/filters/auth/HttpBasicAuth.d.ts +23 -22
  101. package/filters/auth/HttpBasicAuth.d.ts.map +1 -1
  102. package/filters/auth/HttpBasicAuth.js +78 -72
  103. package/filters/auth/HttpBearerAuth.d.ts +17 -17
  104. package/filters/auth/HttpBearerAuth.js +32 -32
  105. package/filters/auth/HttpHeaderAuth.d.ts +14 -14
  106. package/filters/auth/HttpHeaderAuth.js +57 -60
  107. package/filters/auth/JwtHttpBearerAuth.d.ts +20 -20
  108. package/filters/auth/JwtHttpBearerAuth.d.ts.map +1 -1
  109. package/filters/auth/JwtHttpBearerAuth.js +87 -81
  110. package/filters/auth/KeyCloakHttpBearerAuth.d.ts +22 -22
  111. package/filters/auth/KeyCloakHttpBearerAuth.js +116 -116
  112. package/filters/auth/index.d.ts +4 -4
  113. package/filters/auth/index.js +11 -11
  114. package/filters/index.d.ts +2 -2
  115. package/filters/index.js +7 -7
  116. package/index.d.ts +27 -16
  117. package/index.d.ts.map +1 -1
  118. package/index.js +70 -71
  119. package/model/RouteDefinition.d.ts +6 -6
  120. package/model/RouteDefinition.js +8 -8
  121. package/package.json +22 -26
  122. package/rbac/AuthAssignment.d.ts +18 -18
  123. package/rbac/AuthAssignment.js +44 -44
  124. package/rbac/AuthItem.d.ts +26 -26
  125. package/rbac/AuthItem.js +51 -51
  126. package/rbac/AuthItemChild.d.ts +18 -18
  127. package/rbac/AuthItemChild.js +43 -43
  128. package/rbac/AuthManager.d.ts +111 -111
  129. package/rbac/AuthManager.d.ts.map +1 -1
  130. package/rbac/AuthManager.js +357 -358
  131. package/rbac/index.d.ts +5 -0
  132. package/rbac/index.d.ts.map +1 -0
  133. package/rbac/index.js +28 -0
  134. package/requiments/Glob.d.ts +2 -2
  135. package/requiments/Glob.js +10 -10
  136. package/requiments/ReflectUtil.js +24 -24
  137. package/requiments/Utils.d.ts +1 -2
  138. package/requiments/Utils.d.ts.map +1 -1
  139. package/requiments/Utils.js +115 -110
  140. package/validators/BooleanValidator.js +1 -1
  141. package/validators/CompareValidator.js +1 -1
  142. package/validators/DateValidator.js +1 -1
  143. package/validators/EmailValidator.js +1 -1
  144. package/validators/Validator.d.ts +17 -17
  145. package/validators/Validator.js +27 -27
  146. package/web/IdentityInterface.d.ts +55 -54
  147. package/web/IdentityInterface.d.ts.map +1 -1
  148. package/web/IdentityInterface.js +8 -8
  149. package/web/WebUser.d.ts +71 -71
  150. package/web/WebUser.js +165 -165
  151. package/base/Logger.d.ts +0 -18
  152. package/base/Logger.d.ts.map +0 -1
  153. package/base/Logger.js +0 -49
@@ -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 ADDED
@@ -0,0 +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;
22
+ //# sourceMappingURL=Logs.d.ts.map
@@ -0,0 +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"}
package/base/Logs.js ADDED
@@ -0,0 +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(...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();