@nauth-toolkit/core 0.1.112 → 0.1.114

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.
@@ -25,6 +25,7 @@ export declare class LogoutDTO {
25
25
  * Validation:
26
26
  * - Must be a boolean if present
27
27
  * - Default: false
28
+ * - Automatically converts string query parameters ('true'/'false', '1'/'0') to boolean
28
29
  *
29
30
  * @example false
30
31
  */
@@ -1 +1 @@
1
- {"version":3,"file":"logout.dto.d.ts","sourceRoot":"","sources":["../../src/dto/logout.dto.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH;;GAEG;AACH,qBAAa,SAAS;IACpB;;;;;;;;OAQG;IAGH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
1
+ {"version":3,"file":"logout.dto.d.ts","sourceRoot":"","sources":["../../src/dto/logout.dto.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH;;GAEG;AACH,qBAAa,SAAS;IACpB;;;;;;;;;OASG;IAQH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
@@ -28,6 +28,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.LogoutDTO = void 0;
30
30
  const class_validator_1 = require("class-validator");
31
+ const class_transformer_1 = require("class-transformer");
31
32
  /**
32
33
  * Request DTO for logout
33
34
  */
@@ -38,6 +39,7 @@ class LogoutDTO {
38
39
  * Validation:
39
40
  * - Must be a boolean if present
40
41
  * - Default: false
42
+ * - Automatically converts string query parameters ('true'/'false', '1'/'0') to boolean
41
43
  *
42
44
  * @example false
43
45
  */
@@ -47,6 +49,13 @@ exports.LogoutDTO = LogoutDTO;
47
49
  __decorate([
48
50
  (0, class_validator_1.IsOptional)(),
49
51
  (0, class_validator_1.IsBoolean)({ message: 'forgetMe must be a boolean' }),
52
+ (0, class_transformer_1.Transform)(({ value }) => {
53
+ if (value === 'true' || value === '1')
54
+ return true;
55
+ if (value === 'false' || value === '0')
56
+ return false;
57
+ return value;
58
+ }),
50
59
  __metadata("design:type", Boolean)
51
60
  ], LogoutDTO.prototype, "forgetMe", void 0);
52
61
  //# sourceMappingURL=logout.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logout.dto.js","sourceRoot":"","sources":["../../src/dto/logout.dto.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;;;;;AAEH,qDAAwD;AAExD;;GAEG;AACH,MAAa,SAAS;IACpB;;;;;;;;OAQG;IAGH,QAAQ,CAAW;CACpB;AAbD,8BAaC;AADC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;;2CAClC"}
1
+ {"version":3,"file":"logout.dto.js","sourceRoot":"","sources":["../../src/dto/logout.dto.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;;;;;AAEH,qDAAwD;AACxD,yDAA8C;AAE9C;;GAEG;AACH,MAAa,SAAS;IACpB;;;;;;;;;OASG;IAQH,QAAQ,CAAW;CACpB;AAnBD,8BAmBC;AADC;IAPC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;IACpD,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;QACvB,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,GAAG;YAAE,OAAO,IAAI,CAAC;QACnD,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,GAAG;YAAE,OAAO,KAAK,CAAC;QACrD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;;2CACiB"}
@@ -2868,7 +2868,7 @@
2868
2868
  "properties": {
2869
2869
  "forgetMe": {
2870
2870
  "type": "boolean",
2871
- "description": "If true, also removes trusted device\n\nValidation:\n- Must be a boolean if present\n- Default: false",
2871
+ "description": "If true, also removes trusted device\n\nValidation:\n- Must be a boolean if present\n- Default: false\n- Automatically converts string query parameters ('true'/'false', '1'/'0') to boolean",
2872
2872
  "examples": [
2873
2873
  false
2874
2874
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nauth-toolkit/core",
3
- "version": "0.1.112",
3
+ "version": "0.1.114",
4
4
  "description": "Core authentication toolkit for Node JS",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "peerDependencies": {
51
51
  "@maxmind/geoip2-node": "^4.0.0 || ^5.0.0 || ^6.0.0",
52
- "@nauth-toolkit/recaptcha": "^0.1.112",
52
+ "@nauth-toolkit/recaptcha": "^0.1.114",
53
53
  "typeorm": "^0.3.0"
54
54
  },
55
55
  "peerDependenciesMeta": {