@skroz/profile-api 1.0.7 → 1.0.8

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 (63) hide show
  1. package/dist/dto/ConfirmEmailInput.d.ts +1 -1
  2. package/dist/dto/ConfirmEmailInput.js +3 -3
  3. package/dist/dto/ForgotPasswordInput.d.ts +1 -1
  4. package/dist/dto/ForgotPasswordInput.js +3 -3
  5. package/dist/dto/LoginInput.d.ts +2 -2
  6. package/dist/dto/LoginInput.js +38 -5
  7. package/dist/dto/PasswordInput.d.ts +1 -1
  8. package/dist/dto/PasswordInput.js +3 -3
  9. package/dist/dto/RecoverPasswordInput.d.ts +2 -2
  10. package/dist/dto/RecoverPasswordInput.js +38 -5
  11. package/dist/dto/RegisterInput.d.ts +2 -2
  12. package/dist/dto/RegisterInput.js +38 -5
  13. package/dist/dto/SendTokenPayload.d.ts +2 -2
  14. package/dist/dto/SendTokenPayload.js +3 -4
  15. package/dist/dto/StatusPayload.d.ts +1 -1
  16. package/dist/dto/StatusPayload.js +2 -3
  17. package/dist/dto/UpdateEmailInput.d.ts +1 -1
  18. package/dist/dto/UpdateEmailInput.js +3 -3
  19. package/dist/dto/UpdatePasswordInput.d.ts +2 -2
  20. package/dist/dto/UpdatePasswordInput.js +38 -5
  21. package/dist/dto/UpdateProfileInput.d.ts +1 -1
  22. package/dist/dto/UpdateProfileInput.js +3 -3
  23. package/dist/dto/index.d.ts +11 -11
  24. package/dist/dto/index.js +42 -24
  25. package/dist/email-templates/base/content.pug +32 -0
  26. package/dist/email-templates/base/header.pug +28 -0
  27. package/dist/email-templates/base/layout.pug +34 -0
  28. package/dist/email-templates/base/mixins.pug +16 -0
  29. package/dist/email-templates/confirmEmail.pug +16 -0
  30. package/dist/email-templates/forgotPassword.pug +16 -0
  31. package/dist/email-templates/notification.pug +14 -0
  32. package/dist/email-templates/tempPassword.pug +14 -0
  33. package/dist/resolvers/AuthResolver.d.ts +1 -24
  34. package/dist/resolvers/AuthResolver.js +6 -3
  35. package/dist/resolvers/ProfileResolver.d.ts +1 -18
  36. package/dist/resolvers/ProfileResolver.js +8 -2
  37. package/dist/services/ProfileEmailService.js +2 -2
  38. package/dist/types/index.d.ts +1 -1
  39. package/package.json +3 -3
  40. package/src/dto/ConfirmEmailInput.ts +1 -1
  41. package/src/dto/ForgotPasswordInput.ts +1 -1
  42. package/src/dto/LoginInput.ts +2 -2
  43. package/src/dto/PasswordInput.ts +1 -1
  44. package/src/dto/RecoverPasswordInput.ts +2 -2
  45. package/src/dto/RegisterInput.ts +2 -2
  46. package/src/dto/SendTokenPayload.ts +2 -2
  47. package/src/dto/StatusPayload.ts +1 -1
  48. package/src/dto/UpdateEmailInput.ts +1 -1
  49. package/src/dto/UpdatePasswordInput.ts +2 -2
  50. package/src/dto/UpdateProfileInput.ts +1 -1
  51. package/src/dto/index.ts +11 -11
  52. package/src/email-templates/base/content.pug +32 -0
  53. package/src/email-templates/base/header.pug +28 -0
  54. package/src/email-templates/base/layout.pug +34 -0
  55. package/src/email-templates/base/mixins.pug +16 -0
  56. package/src/email-templates/confirmEmail.pug +16 -0
  57. package/src/email-templates/forgotPassword.pug +16 -0
  58. package/src/email-templates/notification.pug +14 -0
  59. package/src/email-templates/tempPassword.pug +14 -0
  60. package/src/resolvers/AuthResolver.ts +76 -30
  61. package/src/resolvers/ProfileResolver.ts +125 -98
  62. package/src/services/ProfileEmailService.ts +147 -147
  63. package/src/types/index.ts +1 -1
@@ -1,4 +1,4 @@
1
- export declare class ConfirmEmailInput {
1
+ export default class ConfirmEmailInput {
2
2
  token: string;
3
3
  }
4
4
  export declare const confirmEmailValidators: {
@@ -9,19 +9,19 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.confirmEmailValidators = exports.ConfirmEmailInput = void 0;
12
+ exports.confirmEmailValidators = void 0;
13
13
  const type_graphql_1 = require("type-graphql");
14
14
  const graphql_validators_1 = require("@os-team/graphql-validators");
15
15
  let ConfirmEmailInput = class ConfirmEmailInput {
16
16
  };
17
- exports.ConfirmEmailInput = ConfirmEmailInput;
18
17
  __decorate([
19
18
  (0, type_graphql_1.Field)(),
20
19
  __metadata("design:type", String)
21
20
  ], ConfirmEmailInput.prototype, "token", void 0);
22
- exports.ConfirmEmailInput = ConfirmEmailInput = __decorate([
21
+ ConfirmEmailInput = __decorate([
23
22
  (0, type_graphql_1.InputType)()
24
23
  ], ConfirmEmailInput);
24
+ exports.default = ConfirmEmailInput;
25
25
  exports.confirmEmailValidators = {
26
26
  token: [graphql_validators_1.isNotEmpty],
27
27
  };
@@ -1,4 +1,4 @@
1
- export declare class ForgotPasswordInput {
1
+ export default class ForgotPasswordInput {
2
2
  email: string;
3
3
  }
4
4
  export declare const forgotPasswordValidators: {
@@ -9,20 +9,20 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.forgotPasswordTransformers = exports.forgotPasswordValidators = exports.ForgotPasswordInput = void 0;
12
+ exports.forgotPasswordTransformers = exports.forgotPasswordValidators = void 0;
13
13
  const type_graphql_1 = require("type-graphql");
14
14
  const graphql_validators_1 = require("@os-team/graphql-validators");
15
15
  const graphql_transformers_1 = require("@os-team/graphql-transformers");
16
16
  let ForgotPasswordInput = class ForgotPasswordInput {
17
17
  };
18
- exports.ForgotPasswordInput = ForgotPasswordInput;
19
18
  __decorate([
20
19
  (0, type_graphql_1.Field)(),
21
20
  __metadata("design:type", String)
22
21
  ], ForgotPasswordInput.prototype, "email", void 0);
23
- exports.ForgotPasswordInput = ForgotPasswordInput = __decorate([
22
+ ForgotPasswordInput = __decorate([
24
23
  (0, type_graphql_1.InputType)()
25
24
  ], ForgotPasswordInput);
25
+ exports.default = ForgotPasswordInput;
26
26
  exports.forgotPasswordValidators = {
27
27
  email: [graphql_validators_1.isEmail],
28
28
  };
@@ -1,5 +1,5 @@
1
- import { PasswordInput } from './PasswordInput';
2
- export declare class LoginInput extends PasswordInput {
1
+ import PasswordInput from './PasswordInput';
2
+ export default class LoginInput extends PasswordInput {
3
3
  email: string;
4
4
  }
5
5
  export declare const loginValidators: {
@@ -1,29 +1,62 @@
1
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
2
18
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
19
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
20
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
21
  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
22
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
23
  };
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
8
41
  var __metadata = (this && this.__metadata) || function (k, v) {
9
42
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
43
  };
11
44
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.loginTransformers = exports.loginValidators = exports.LoginInput = void 0;
45
+ exports.loginTransformers = exports.loginValidators = void 0;
13
46
  const type_graphql_1 = require("type-graphql");
14
47
  const graphql_validators_1 = require("@os-team/graphql-validators");
15
48
  const graphql_transformers_1 = require("@os-team/graphql-transformers");
16
- const PasswordInput_1 = require("./PasswordInput");
17
- let LoginInput = class LoginInput extends PasswordInput_1.PasswordInput {
49
+ const PasswordInput_1 = __importStar(require("./PasswordInput"));
50
+ let LoginInput = class LoginInput extends PasswordInput_1.default {
18
51
  };
19
- exports.LoginInput = LoginInput;
20
52
  __decorate([
21
53
  (0, type_graphql_1.Field)(),
22
54
  __metadata("design:type", String)
23
55
  ], LoginInput.prototype, "email", void 0);
24
- exports.LoginInput = LoginInput = __decorate([
56
+ LoginInput = __decorate([
25
57
  (0, type_graphql_1.InputType)()
26
58
  ], LoginInput);
59
+ exports.default = LoginInput;
27
60
  exports.loginValidators = {
28
61
  email: [graphql_validators_1.isEmail],
29
62
  password: [graphql_validators_1.isNotEmpty],
@@ -1,4 +1,4 @@
1
- export declare class PasswordInput {
1
+ export default class PasswordInput {
2
2
  password: string;
3
3
  }
4
4
  export declare const passwordValidators: {
@@ -9,20 +9,20 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.passwordTransformers = exports.passwordValidators = exports.PasswordInput = void 0;
12
+ exports.passwordTransformers = exports.passwordValidators = void 0;
13
13
  const type_graphql_1 = require("type-graphql");
14
14
  const graphql_validators_1 = require("@os-team/graphql-validators");
15
15
  const graphql_transformers_1 = require("@os-team/graphql-transformers");
16
16
  let PasswordInput = class PasswordInput {
17
17
  };
18
- exports.PasswordInput = PasswordInput;
19
18
  __decorate([
20
19
  (0, type_graphql_1.Field)(),
21
20
  __metadata("design:type", String)
22
21
  ], PasswordInput.prototype, "password", void 0);
23
- exports.PasswordInput = PasswordInput = __decorate([
22
+ PasswordInput = __decorate([
24
23
  (0, type_graphql_1.InputType)({ isAbstract: true })
25
24
  ], PasswordInput);
25
+ exports.default = PasswordInput;
26
26
  exports.passwordValidators = {
27
27
  password: [(0, graphql_validators_1.minLength)(6), (0, graphql_validators_1.maxLength)(64)],
28
28
  };
@@ -1,5 +1,5 @@
1
- import { PasswordInput } from './PasswordInput';
2
- export declare class RecoverPasswordInput extends PasswordInput {
1
+ import PasswordInput from './PasswordInput';
2
+ export default class RecoverPasswordInput extends PasswordInput {
3
3
  token: string;
4
4
  }
5
5
  export declare const recoverPasswordTransformers: {
@@ -1,28 +1,61 @@
1
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
2
18
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
19
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
20
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
21
  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
22
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
23
  };
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
8
41
  var __metadata = (this && this.__metadata) || function (k, v) {
9
42
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
43
  };
11
44
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.recoverPasswordValidators = exports.recoverPasswordTransformers = exports.RecoverPasswordInput = void 0;
45
+ exports.recoverPasswordValidators = exports.recoverPasswordTransformers = void 0;
13
46
  const type_graphql_1 = require("type-graphql");
14
47
  const graphql_validators_1 = require("@os-team/graphql-validators");
15
48
  const graphql_transformers_1 = require("@os-team/graphql-transformers");
16
- const PasswordInput_1 = require("./PasswordInput");
17
- let RecoverPasswordInput = class RecoverPasswordInput extends PasswordInput_1.PasswordInput {
49
+ const PasswordInput_1 = __importStar(require("./PasswordInput"));
50
+ let RecoverPasswordInput = class RecoverPasswordInput extends PasswordInput_1.default {
18
51
  };
19
- exports.RecoverPasswordInput = RecoverPasswordInput;
20
52
  __decorate([
21
53
  (0, type_graphql_1.Field)(),
22
54
  __metadata("design:type", String)
23
55
  ], RecoverPasswordInput.prototype, "token", void 0);
24
- exports.RecoverPasswordInput = RecoverPasswordInput = __decorate([
56
+ RecoverPasswordInput = __decorate([
25
57
  (0, type_graphql_1.InputType)()
26
58
  ], RecoverPasswordInput);
59
+ exports.default = RecoverPasswordInput;
27
60
  exports.recoverPasswordTransformers = Object.assign(Object.assign({}, PasswordInput_1.passwordTransformers), { token: [graphql_transformers_1.trim] });
28
61
  exports.recoverPasswordValidators = Object.assign(Object.assign({}, PasswordInput_1.passwordValidators), { token: [graphql_validators_1.isNotEmpty] });
@@ -1,5 +1,5 @@
1
- import { PasswordInput } from './PasswordInput';
2
- export declare class RegisterInput extends PasswordInput {
1
+ import PasswordInput from './PasswordInput';
2
+ export default class RegisterInput extends PasswordInput {
3
3
  email: string;
4
4
  isUserAgreementAgree?: boolean;
5
5
  isPrivacyPolicyAgree?: boolean;
@@ -1,10 +1,43 @@
1
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
2
18
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
19
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
20
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
21
  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
22
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
23
  };
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
8
41
  var __metadata = (this && this.__metadata) || function (k, v) {
9
42
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
43
  };
@@ -12,15 +45,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
45
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
46
  };
14
47
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.registerTransformers = exports.registerValidators = exports.RegisterInput = void 0;
48
+ exports.registerTransformers = exports.registerValidators = void 0;
16
49
  const type_graphql_1 = require("type-graphql");
17
50
  const graphql_validators_1 = require("@os-team/graphql-validators");
18
51
  const graphql_transformers_1 = require("@os-team/graphql-transformers");
19
- const PasswordInput_1 = require("./PasswordInput");
52
+ const PasswordInput_1 = __importStar(require("./PasswordInput"));
20
53
  const isTrue_1 = __importDefault(require("../validators/isTrue"));
21
- let RegisterInput = class RegisterInput extends PasswordInput_1.PasswordInput {
54
+ let RegisterInput = class RegisterInput extends PasswordInput_1.default {
22
55
  };
23
- exports.RegisterInput = RegisterInput;
24
56
  __decorate([
25
57
  (0, type_graphql_1.Field)(),
26
58
  __metadata("design:type", String)
@@ -33,8 +65,9 @@ __decorate([
33
65
  (0, type_graphql_1.Field)(() => Boolean, { nullable: true }),
34
66
  __metadata("design:type", Boolean)
35
67
  ], RegisterInput.prototype, "isPrivacyPolicyAgree", void 0);
36
- exports.RegisterInput = RegisterInput = __decorate([
68
+ RegisterInput = __decorate([
37
69
  (0, type_graphql_1.InputType)()
38
70
  ], RegisterInput);
71
+ exports.default = RegisterInput;
39
72
  exports.registerValidators = Object.assign({ email: [graphql_validators_1.isEmail], isUserAgreementAgree: [isTrue_1.default], isPrivacyPolicyAgree: [isTrue_1.default] }, PasswordInput_1.passwordValidators);
40
73
  exports.registerTransformers = Object.assign({ email: [graphql_transformers_1.trim, graphql_transformers_1.toLowerCase] }, PasswordInput_1.passwordTransformers);
@@ -1,4 +1,4 @@
1
- export declare class SendTokenPayload {
2
- confirmationLinkIsSent: boolean;
1
+ export default class SendTokenPayload {
2
+ recoveryLinkIsSent: boolean;
3
3
  limitExpiresAt?: number;
4
4
  }
@@ -9,19 +9,18 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.SendTokenPayload = void 0;
13
12
  const type_graphql_1 = require("type-graphql");
14
13
  let SendTokenPayload = class SendTokenPayload {
15
14
  };
16
- exports.SendTokenPayload = SendTokenPayload;
17
15
  __decorate([
18
16
  (0, type_graphql_1.Field)(),
19
17
  __metadata("design:type", Boolean)
20
- ], SendTokenPayload.prototype, "confirmationLinkIsSent", void 0);
18
+ ], SendTokenPayload.prototype, "recoveryLinkIsSent", void 0);
21
19
  __decorate([
22
20
  (0, type_graphql_1.Field)(() => Number, { nullable: true }),
23
21
  __metadata("design:type", Number)
24
22
  ], SendTokenPayload.prototype, "limitExpiresAt", void 0);
25
- exports.SendTokenPayload = SendTokenPayload = __decorate([
23
+ SendTokenPayload = __decorate([
26
24
  (0, type_graphql_1.ObjectType)()
27
25
  ], SendTokenPayload);
26
+ exports.default = SendTokenPayload;
@@ -1,3 +1,3 @@
1
- export declare class StatusPayload {
1
+ export default class StatusPayload {
2
2
  ok: boolean;
3
3
  }
@@ -9,15 +9,14 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.StatusPayload = void 0;
13
12
  const type_graphql_1 = require("type-graphql");
14
13
  let StatusPayload = class StatusPayload {
15
14
  };
16
- exports.StatusPayload = StatusPayload;
17
15
  __decorate([
18
16
  (0, type_graphql_1.Field)(),
19
17
  __metadata("design:type", Boolean)
20
18
  ], StatusPayload.prototype, "ok", void 0);
21
- exports.StatusPayload = StatusPayload = __decorate([
19
+ StatusPayload = __decorate([
22
20
  (0, type_graphql_1.ObjectType)()
23
21
  ], StatusPayload);
22
+ exports.default = StatusPayload;
@@ -1,4 +1,4 @@
1
- export declare class UpdateEmailInput {
1
+ export default class UpdateEmailInput {
2
2
  email: string;
3
3
  }
4
4
  export declare const updateEmailTransformers: {
@@ -9,20 +9,20 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.updateEmailValidators = exports.updateEmailTransformers = exports.UpdateEmailInput = void 0;
12
+ exports.updateEmailValidators = exports.updateEmailTransformers = void 0;
13
13
  const type_graphql_1 = require("type-graphql");
14
14
  const graphql_validators_1 = require("@os-team/graphql-validators");
15
15
  const graphql_transformers_1 = require("@os-team/graphql-transformers");
16
16
  let UpdateEmailInput = class UpdateEmailInput {
17
17
  };
18
- exports.UpdateEmailInput = UpdateEmailInput;
19
18
  __decorate([
20
19
  (0, type_graphql_1.Field)(),
21
20
  __metadata("design:type", String)
22
21
  ], UpdateEmailInput.prototype, "email", void 0);
23
- exports.UpdateEmailInput = UpdateEmailInput = __decorate([
22
+ UpdateEmailInput = __decorate([
24
23
  (0, type_graphql_1.InputType)()
25
24
  ], UpdateEmailInput);
25
+ exports.default = UpdateEmailInput;
26
26
  exports.updateEmailTransformers = {
27
27
  email: [graphql_transformers_1.trim, graphql_transformers_1.toLowerCase],
28
28
  };
@@ -1,5 +1,5 @@
1
- import { PasswordInput } from './PasswordInput';
2
- export declare class UpdatePasswordInput extends PasswordInput {
1
+ import PasswordInput from './PasswordInput';
2
+ export default class UpdatePasswordInput extends PasswordInput {
3
3
  oldPassword: string;
4
4
  }
5
5
  export declare const updatePasswordTransformers: {
@@ -1,28 +1,61 @@
1
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
2
18
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
19
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
20
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
21
  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
22
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
23
  };
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
8
41
  var __metadata = (this && this.__metadata) || function (k, v) {
9
42
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
43
  };
11
44
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.updatePasswordValidators = exports.updatePasswordTransformers = exports.UpdatePasswordInput = void 0;
45
+ exports.updatePasswordValidators = exports.updatePasswordTransformers = void 0;
13
46
  const type_graphql_1 = require("type-graphql");
14
47
  const graphql_validators_1 = require("@os-team/graphql-validators");
15
48
  const graphql_transformers_1 = require("@os-team/graphql-transformers");
16
- const PasswordInput_1 = require("./PasswordInput");
17
- let UpdatePasswordInput = class UpdatePasswordInput extends PasswordInput_1.PasswordInput {
49
+ const PasswordInput_1 = __importStar(require("./PasswordInput"));
50
+ let UpdatePasswordInput = class UpdatePasswordInput extends PasswordInput_1.default {
18
51
  };
19
- exports.UpdatePasswordInput = UpdatePasswordInput;
20
52
  __decorate([
21
53
  (0, type_graphql_1.Field)(),
22
54
  __metadata("design:type", String)
23
55
  ], UpdatePasswordInput.prototype, "oldPassword", void 0);
24
- exports.UpdatePasswordInput = UpdatePasswordInput = __decorate([
56
+ UpdatePasswordInput = __decorate([
25
57
  (0, type_graphql_1.InputType)()
26
58
  ], UpdatePasswordInput);
59
+ exports.default = UpdatePasswordInput;
27
60
  exports.updatePasswordTransformers = Object.assign(Object.assign({}, PasswordInput_1.passwordTransformers), { oldPassword: [graphql_transformers_1.trim] });
28
61
  exports.updatePasswordValidators = Object.assign(Object.assign({}, PasswordInput_1.passwordValidators), { oldPassword: [graphql_validators_1.isNotEmpty] });
@@ -1,4 +1,4 @@
1
- export declare class UpdateProfileInput {
1
+ export default class UpdateProfileInput {
2
2
  name: string;
3
3
  }
4
4
  export declare const updateProfileTransformers: {
@@ -9,20 +9,20 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.updateProfileValidators = exports.updateProfileTransformers = exports.UpdateProfileInput = void 0;
12
+ exports.updateProfileValidators = exports.updateProfileTransformers = void 0;
13
13
  const type_graphql_1 = require("type-graphql");
14
14
  const graphql_validators_1 = require("@os-team/graphql-validators");
15
15
  const graphql_transformers_1 = require("@os-team/graphql-transformers");
16
16
  let UpdateProfileInput = class UpdateProfileInput {
17
17
  };
18
- exports.UpdateProfileInput = UpdateProfileInput;
19
18
  __decorate([
20
19
  (0, type_graphql_1.Field)(),
21
20
  __metadata("design:type", String)
22
21
  ], UpdateProfileInput.prototype, "name", void 0);
23
- exports.UpdateProfileInput = UpdateProfileInput = __decorate([
22
+ UpdateProfileInput = __decorate([
24
23
  (0, type_graphql_1.InputType)()
25
24
  ], UpdateProfileInput);
25
+ exports.default = UpdateProfileInput;
26
26
  exports.updateProfileTransformers = {
27
27
  name: [graphql_transformers_1.trim],
28
28
  };
@@ -1,11 +1,11 @@
1
- export * from './PasswordInput';
2
- export * from './RegisterInput';
3
- export * from './LoginInput';
4
- export * from './ForgotPasswordInput';
5
- export * from './ConfirmEmailInput';
6
- export * from './StatusPayload';
7
- export * from './SendTokenPayload';
8
- export * from './UpdatePasswordInput';
9
- export * from './UpdateEmailInput';
10
- export * from './UpdateProfileInput';
11
- export * from './RecoverPasswordInput';
1
+ export { default as PasswordInput, passwordTransformers, passwordValidators } from './PasswordInput';
2
+ export { default as RegisterInput, registerTransformers, registerValidators } from './RegisterInput';
3
+ export { default as LoginInput, loginTransformers, loginValidators } from './LoginInput';
4
+ export { default as ForgotPasswordInput, forgotPasswordTransformers, forgotPasswordValidators } from './ForgotPasswordInput';
5
+ export { default as ConfirmEmailInput, confirmEmailValidators } from './ConfirmEmailInput';
6
+ export { default as StatusPayload } from './StatusPayload';
7
+ export { default as SendTokenPayload } from './SendTokenPayload';
8
+ export { default as UpdatePasswordInput, updatePasswordTransformers, updatePasswordValidators } from './UpdatePasswordInput';
9
+ export { default as UpdateEmailInput, updateEmailTransformers, updateEmailValidators } from './UpdateEmailInput';
10
+ export { default as UpdateProfileInput, updateProfileTransformers, updateProfileValidators } from './UpdateProfileInput';
11
+ export { default as RecoverPasswordInput, recoverPasswordTransformers, recoverPasswordValidators } from './RecoverPasswordInput';
package/dist/dto/index.js CHANGED
@@ -1,27 +1,45 @@
1
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);
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
4
  };
16
5
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./PasswordInput"), exports);
18
- __exportStar(require("./RegisterInput"), exports);
19
- __exportStar(require("./LoginInput"), exports);
20
- __exportStar(require("./ForgotPasswordInput"), exports);
21
- __exportStar(require("./ConfirmEmailInput"), exports);
22
- __exportStar(require("./StatusPayload"), exports);
23
- __exportStar(require("./SendTokenPayload"), exports);
24
- __exportStar(require("./UpdatePasswordInput"), exports);
25
- __exportStar(require("./UpdateEmailInput"), exports);
26
- __exportStar(require("./UpdateProfileInput"), exports);
27
- __exportStar(require("./RecoverPasswordInput"), exports);
6
+ exports.recoverPasswordValidators = exports.recoverPasswordTransformers = exports.RecoverPasswordInput = exports.updateProfileValidators = exports.updateProfileTransformers = exports.UpdateProfileInput = exports.updateEmailValidators = exports.updateEmailTransformers = exports.UpdateEmailInput = exports.updatePasswordValidators = exports.updatePasswordTransformers = exports.UpdatePasswordInput = exports.SendTokenPayload = exports.StatusPayload = exports.confirmEmailValidators = exports.ConfirmEmailInput = exports.forgotPasswordValidators = exports.forgotPasswordTransformers = exports.ForgotPasswordInput = exports.loginValidators = exports.loginTransformers = exports.LoginInput = exports.registerValidators = exports.registerTransformers = exports.RegisterInput = exports.passwordValidators = exports.passwordTransformers = exports.PasswordInput = void 0;
7
+ var PasswordInput_1 = require("./PasswordInput");
8
+ Object.defineProperty(exports, "PasswordInput", { enumerable: true, get: function () { return __importDefault(PasswordInput_1).default; } });
9
+ Object.defineProperty(exports, "passwordTransformers", { enumerable: true, get: function () { return PasswordInput_1.passwordTransformers; } });
10
+ Object.defineProperty(exports, "passwordValidators", { enumerable: true, get: function () { return PasswordInput_1.passwordValidators; } });
11
+ var RegisterInput_1 = require("./RegisterInput");
12
+ Object.defineProperty(exports, "RegisterInput", { enumerable: true, get: function () { return __importDefault(RegisterInput_1).default; } });
13
+ Object.defineProperty(exports, "registerTransformers", { enumerable: true, get: function () { return RegisterInput_1.registerTransformers; } });
14
+ Object.defineProperty(exports, "registerValidators", { enumerable: true, get: function () { return RegisterInput_1.registerValidators; } });
15
+ var LoginInput_1 = require("./LoginInput");
16
+ Object.defineProperty(exports, "LoginInput", { enumerable: true, get: function () { return __importDefault(LoginInput_1).default; } });
17
+ Object.defineProperty(exports, "loginTransformers", { enumerable: true, get: function () { return LoginInput_1.loginTransformers; } });
18
+ Object.defineProperty(exports, "loginValidators", { enumerable: true, get: function () { return LoginInput_1.loginValidators; } });
19
+ var ForgotPasswordInput_1 = require("./ForgotPasswordInput");
20
+ Object.defineProperty(exports, "ForgotPasswordInput", { enumerable: true, get: function () { return __importDefault(ForgotPasswordInput_1).default; } });
21
+ Object.defineProperty(exports, "forgotPasswordTransformers", { enumerable: true, get: function () { return ForgotPasswordInput_1.forgotPasswordTransformers; } });
22
+ Object.defineProperty(exports, "forgotPasswordValidators", { enumerable: true, get: function () { return ForgotPasswordInput_1.forgotPasswordValidators; } });
23
+ var ConfirmEmailInput_1 = require("./ConfirmEmailInput");
24
+ Object.defineProperty(exports, "ConfirmEmailInput", { enumerable: true, get: function () { return __importDefault(ConfirmEmailInput_1).default; } });
25
+ Object.defineProperty(exports, "confirmEmailValidators", { enumerable: true, get: function () { return ConfirmEmailInput_1.confirmEmailValidators; } });
26
+ var StatusPayload_1 = require("./StatusPayload");
27
+ Object.defineProperty(exports, "StatusPayload", { enumerable: true, get: function () { return __importDefault(StatusPayload_1).default; } });
28
+ var SendTokenPayload_1 = require("./SendTokenPayload");
29
+ Object.defineProperty(exports, "SendTokenPayload", { enumerable: true, get: function () { return __importDefault(SendTokenPayload_1).default; } });
30
+ var UpdatePasswordInput_1 = require("./UpdatePasswordInput");
31
+ Object.defineProperty(exports, "UpdatePasswordInput", { enumerable: true, get: function () { return __importDefault(UpdatePasswordInput_1).default; } });
32
+ Object.defineProperty(exports, "updatePasswordTransformers", { enumerable: true, get: function () { return UpdatePasswordInput_1.updatePasswordTransformers; } });
33
+ Object.defineProperty(exports, "updatePasswordValidators", { enumerable: true, get: function () { return UpdatePasswordInput_1.updatePasswordValidators; } });
34
+ var UpdateEmailInput_1 = require("./UpdateEmailInput");
35
+ Object.defineProperty(exports, "UpdateEmailInput", { enumerable: true, get: function () { return __importDefault(UpdateEmailInput_1).default; } });
36
+ Object.defineProperty(exports, "updateEmailTransformers", { enumerable: true, get: function () { return UpdateEmailInput_1.updateEmailTransformers; } });
37
+ Object.defineProperty(exports, "updateEmailValidators", { enumerable: true, get: function () { return UpdateEmailInput_1.updateEmailValidators; } });
38
+ var UpdateProfileInput_1 = require("./UpdateProfileInput");
39
+ Object.defineProperty(exports, "UpdateProfileInput", { enumerable: true, get: function () { return __importDefault(UpdateProfileInput_1).default; } });
40
+ Object.defineProperty(exports, "updateProfileTransformers", { enumerable: true, get: function () { return UpdateProfileInput_1.updateProfileTransformers; } });
41
+ Object.defineProperty(exports, "updateProfileValidators", { enumerable: true, get: function () { return UpdateProfileInput_1.updateProfileValidators; } });
42
+ var RecoverPasswordInput_1 = require("./RecoverPasswordInput");
43
+ Object.defineProperty(exports, "RecoverPasswordInput", { enumerable: true, get: function () { return __importDefault(RecoverPasswordInput_1).default; } });
44
+ Object.defineProperty(exports, "recoverPasswordTransformers", { enumerable: true, get: function () { return RecoverPasswordInput_1.recoverPasswordTransformers; } });
45
+ Object.defineProperty(exports, "recoverPasswordValidators", { enumerable: true, get: function () { return RecoverPasswordInput_1.recoverPasswordValidators; } });