@veruna/api-contracts 1.0.29 → 1.0.31

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 (102) hide show
  1. package/build/controllers/index.d.ts +3 -2
  2. package/build/controllers/index.js +3 -1
  3. package/build/controllers/verification.controllers.d.ts +5 -0
  4. package/build/controllers/verification.controllers.js +8 -0
  5. package/build/rest-api.d.ts +21 -0
  6. package/build/rest-api.js +21 -0
  7. package/build/routes/index.d.ts +1 -0
  8. package/build/routes/index.js +3 -1
  9. package/build/routes/users.routes.d.ts +12 -0
  10. package/build/routes/users.routes.js +12 -0
  11. package/build/routes/verification.routes.d.ts +7 -0
  12. package/build/routes/verification.routes.js +10 -0
  13. package/build/v1/chat/commands/create-unreg-chat.command.d.ts +11 -0
  14. package/build/v1/chat/queries/get-unreg-chat.query.d.ts +11 -0
  15. package/build/v1/chat/schemas/chat-with-messages-response.schema.d.ts +11 -0
  16. package/build/v1/index.d.ts +1 -0
  17. package/build/v1/index.js +1 -0
  18. package/build/v1/message/schemas/index.d.ts +1 -0
  19. package/build/v1/message/schemas/index.js +5 -1
  20. package/build/v1/message/schemas/message-meta.schema.d.ts +36 -0
  21. package/build/v1/message/schemas/message-meta.schema.js +29 -0
  22. package/build/v1/message/schemas/message-response.schema.d.ts +11 -0
  23. package/build/v1/message/schemas/message-response.schema.js +2 -0
  24. package/build/v1/notifications/schemas/email-template.enum.d.ts +1 -0
  25. package/build/v1/notifications/schemas/email-template.enum.js +1 -0
  26. package/build/v1/users/commands/delete-account-complete.command.d.ts +15 -0
  27. package/build/v1/users/commands/delete-account-complete.command.js +13 -0
  28. package/build/v1/users/commands/delete-account-start.command.d.ts +22 -0
  29. package/build/v1/users/commands/delete-account-start.command.js +14 -0
  30. package/build/v1/users/commands/delete-account-verify.command.d.ts +19 -0
  31. package/build/v1/users/commands/delete-account-verify.command.js +13 -0
  32. package/build/v1/users/commands/email-change-complete.command.d.ts +15 -0
  33. package/build/v1/users/commands/email-change-complete.command.js +13 -0
  34. package/build/v1/users/commands/email-change-start.command.d.ts +22 -0
  35. package/build/v1/users/commands/email-change-start.command.js +14 -0
  36. package/build/v1/users/commands/email-change-verify.command.d.ts +19 -0
  37. package/build/v1/users/commands/email-change-verify.command.js +13 -0
  38. package/build/v1/users/commands/index.d.ts +9 -0
  39. package/build/v1/users/commands/index.js +9 -0
  40. package/build/v1/users/commands/password-change-complete.command.d.ts +17 -0
  41. package/build/v1/users/commands/password-change-complete.command.js +14 -0
  42. package/build/v1/users/commands/password-change-start.command.d.ts +22 -0
  43. package/build/v1/users/commands/password-change-start.command.js +14 -0
  44. package/build/v1/users/commands/password-change-verify.command.d.ts +19 -0
  45. package/build/v1/users/commands/password-change-verify.command.js +13 -0
  46. package/build/v1/users/queries/delete-account-status.query.d.ts +22 -0
  47. package/build/v1/users/queries/delete-account-status.query.js +16 -0
  48. package/build/v1/users/queries/email-change-status.query.d.ts +22 -0
  49. package/build/v1/users/queries/email-change-status.query.js +16 -0
  50. package/build/v1/users/queries/index.d.ts +3 -0
  51. package/build/v1/users/queries/index.js +3 -0
  52. package/build/v1/users/queries/password-change-status.query.d.ts +22 -0
  53. package/build/v1/users/queries/password-change-status.query.js +16 -0
  54. package/build/v1/users/schemas/delete-account-start-request.schema.d.ts +4 -0
  55. package/build/v1/users/schemas/delete-account-start-request.schema.js +7 -0
  56. package/build/v1/users/schemas/email-change-start-request.schema.d.ts +4 -0
  57. package/build/v1/users/schemas/email-change-start-request.schema.js +7 -0
  58. package/build/v1/users/schemas/index.d.ts +4 -0
  59. package/build/v1/users/schemas/index.js +4 -0
  60. package/build/v1/users/schemas/password-change-complete-request.schema.d.ts +6 -0
  61. package/build/v1/users/schemas/password-change-complete-request.schema.js +10 -0
  62. package/build/v1/users/schemas/password-change-start-request.schema.d.ts +4 -0
  63. package/build/v1/users/schemas/password-change-start-request.schema.js +7 -0
  64. package/build/v1/users/users.errors.d.ts +2 -0
  65. package/build/v1/users/users.errors.js +10 -0
  66. package/build/v1/verification/commands/index.d.ts +1 -0
  67. package/build/v1/verification/commands/index.js +17 -0
  68. package/build/v1/verification/commands/resend.command.d.ts +17 -0
  69. package/build/v1/verification/commands/resend.command.js +13 -0
  70. package/build/v1/verification/index.d.ts +3 -0
  71. package/build/v1/verification/index.js +19 -0
  72. package/build/v1/verification/schemas/index.d.ts +13 -0
  73. package/build/v1/verification/schemas/index.js +29 -0
  74. package/build/v1/verification/schemas/verification-channel.enum.d.ts +3 -0
  75. package/build/v1/verification/schemas/verification-channel.enum.js +7 -0
  76. package/build/v1/verification/schemas/verification-complete-request.schema.d.ts +4 -0
  77. package/build/v1/verification/schemas/verification-complete-request.schema.js +7 -0
  78. package/build/v1/verification/schemas/verification-complete-response.schema.d.ts +6 -0
  79. package/build/v1/verification/schemas/verification-complete-response.schema.js +9 -0
  80. package/build/v1/verification/schemas/verification-request-status.enum.d.ts +7 -0
  81. package/build/v1/verification/schemas/verification-request-status.enum.js +11 -0
  82. package/build/v1/verification/schemas/verification-resend-request.schema.d.ts +5 -0
  83. package/build/v1/verification/schemas/verification-resend-request.schema.js +8 -0
  84. package/build/v1/verification/schemas/verification-resend-response.schema.d.ts +7 -0
  85. package/build/v1/verification/schemas/verification-resend-response.schema.js +10 -0
  86. package/build/v1/verification/schemas/verification-start-response.schema.d.ts +14 -0
  87. package/build/v1/verification/schemas/verification-start-response.schema.js +13 -0
  88. package/build/v1/verification/schemas/verification-status-response.schema.d.ts +14 -0
  89. package/build/v1/verification/schemas/verification-status-response.schema.js +13 -0
  90. package/build/v1/verification/schemas/verification-step-status.enum.d.ts +6 -0
  91. package/build/v1/verification/schemas/verification-step-status.enum.js +10 -0
  92. package/build/v1/verification/schemas/verification-step.schema.d.ts +9 -0
  93. package/build/v1/verification/schemas/verification-step.schema.js +12 -0
  94. package/build/v1/verification/schemas/verification-type.enum.d.ts +5 -0
  95. package/build/v1/verification/schemas/verification-type.enum.js +9 -0
  96. package/build/v1/verification/schemas/verification-verify-request.schema.d.ts +6 -0
  97. package/build/v1/verification/schemas/verification-verify-request.schema.js +9 -0
  98. package/build/v1/verification/schemas/verification-verify-response.schema.d.ts +9 -0
  99. package/build/v1/verification/schemas/verification-verify-response.schema.js +12 -0
  100. package/build/v1/verification/verification.errors.d.ts +14 -0
  101. package/build/v1/verification/verification.errors.js +58 -0
  102. package/package.json +1 -1
@@ -2,3 +2,12 @@ export * from './update-profile.command';
2
2
  export * from './change-password.command';
3
3
  export * from './toggle-marketing-consent.command';
4
4
  export * from './delete-account.command';
5
+ export * from './email-change-start.command';
6
+ export * from './email-change-verify.command';
7
+ export * from './email-change-complete.command';
8
+ export * from './delete-account-start.command';
9
+ export * from './delete-account-verify.command';
10
+ export * from './delete-account-complete.command';
11
+ export * from './password-change-start.command';
12
+ export * from './password-change-verify.command';
13
+ export * from './password-change-complete.command';
@@ -18,3 +18,12 @@ __exportStar(require("./update-profile.command"), exports);
18
18
  __exportStar(require("./change-password.command"), exports);
19
19
  __exportStar(require("./toggle-marketing-consent.command"), exports);
20
20
  __exportStar(require("./delete-account.command"), exports);
21
+ __exportStar(require("./email-change-start.command"), exports);
22
+ __exportStar(require("./email-change-verify.command"), exports);
23
+ __exportStar(require("./email-change-complete.command"), exports);
24
+ __exportStar(require("./delete-account-start.command"), exports);
25
+ __exportStar(require("./delete-account-verify.command"), exports);
26
+ __exportStar(require("./delete-account-complete.command"), exports);
27
+ __exportStar(require("./password-change-start.command"), exports);
28
+ __exportStar(require("./password-change-verify.command"), exports);
29
+ __exportStar(require("./password-change-complete.command"), exports);
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../shared/http-method';
3
+ export declare namespace UserPasswordChangeCompleteCommand {
4
+ const Request: z.ZodObject<{
5
+ requestId: z.ZodString;
6
+ newPassword: z.ZodString;
7
+ logoutOtherSessions: z.ZodDefault<z.ZodBoolean>;
8
+ }, z.core.$strip>;
9
+ const Response: z.ZodObject<{
10
+ requestId: z.ZodString;
11
+ requestStatus: z.ZodEnum<typeof import("../../verification/schemas").VerificationRequestStatus>;
12
+ }, z.core.$strip>;
13
+ const URL: "/api/v1/users/me/password/change/complete";
14
+ const METHOD = HttpMethod.POST;
15
+ type RequestType = z.infer<typeof Request>;
16
+ type ResponseType = z.infer<typeof Response>;
17
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserPasswordChangeCompleteCommand = void 0;
4
+ const rest_api_1 = require("../../../rest-api");
5
+ const http_method_1 = require("../../../shared/http-method");
6
+ const schemas_1 = require("../../verification/schemas");
7
+ const schemas_2 = require("../schemas");
8
+ var UserPasswordChangeCompleteCommand;
9
+ (function (UserPasswordChangeCompleteCommand) {
10
+ UserPasswordChangeCompleteCommand.Request = schemas_2.PasswordChangeCompleteRequestSchema;
11
+ UserPasswordChangeCompleteCommand.Response = schemas_1.VerificationCompleteResponseSchema;
12
+ UserPasswordChangeCompleteCommand.URL = rest_api_1.REST_API.V1.USERS.PASSWORD_CHANGE.COMPLETE;
13
+ UserPasswordChangeCompleteCommand.METHOD = http_method_1.HttpMethod.POST;
14
+ })(UserPasswordChangeCompleteCommand || (exports.UserPasswordChangeCompleteCommand = UserPasswordChangeCompleteCommand = {}));
@@ -0,0 +1,22 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../shared/http-method';
3
+ export declare namespace UserPasswordChangeStartCommand {
4
+ const Request: z.ZodObject<{
5
+ oldPassword: z.ZodString;
6
+ }, z.core.$strip>;
7
+ const Response: z.ZodObject<{
8
+ requestId: z.ZodString;
9
+ type: z.ZodEnum<typeof import("../../verification/schemas").VerificationType>;
10
+ status: z.ZodEnum<typeof import("../../verification/schemas").VerificationRequestStatus>;
11
+ steps: z.ZodArray<z.ZodObject<{
12
+ stepId: z.ZodString;
13
+ channel: z.ZodEnum<typeof import("../../verification/schemas").VerificationChannel>;
14
+ address: z.ZodString;
15
+ status: z.ZodEnum<typeof import("../../verification/schemas").VerificationStepStatus>;
16
+ }, z.core.$strip>>;
17
+ }, z.core.$strip>;
18
+ const URL: "/api/v1/users/me/password/change/start";
19
+ const METHOD = HttpMethod.POST;
20
+ type RequestType = z.infer<typeof Request>;
21
+ type ResponseType = z.infer<typeof Response>;
22
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserPasswordChangeStartCommand = void 0;
4
+ const rest_api_1 = require("../../../rest-api");
5
+ const http_method_1 = require("../../../shared/http-method");
6
+ const schemas_1 = require("../schemas");
7
+ const schemas_2 = require("../../verification/schemas");
8
+ var UserPasswordChangeStartCommand;
9
+ (function (UserPasswordChangeStartCommand) {
10
+ UserPasswordChangeStartCommand.Request = schemas_1.PasswordChangeStartRequestSchema;
11
+ UserPasswordChangeStartCommand.Response = schemas_2.VerificationStartResponseSchema;
12
+ UserPasswordChangeStartCommand.URL = rest_api_1.REST_API.V1.USERS.PASSWORD_CHANGE.START;
13
+ UserPasswordChangeStartCommand.METHOD = http_method_1.HttpMethod.POST;
14
+ })(UserPasswordChangeStartCommand || (exports.UserPasswordChangeStartCommand = UserPasswordChangeStartCommand = {}));
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../shared/http-method';
3
+ export declare namespace UserPasswordChangeVerifyCommand {
4
+ const Request: z.ZodObject<{
5
+ requestId: z.ZodString;
6
+ stepId: z.ZodString;
7
+ code: z.ZodString;
8
+ }, z.core.$strip>;
9
+ const Response: z.ZodObject<{
10
+ requestId: z.ZodString;
11
+ stepId: z.ZodString;
12
+ stepStatus: z.ZodEnum<typeof import("../../verification/schemas").VerificationStepStatus>;
13
+ requestStatus: z.ZodEnum<typeof import("../../verification/schemas").VerificationRequestStatus>;
14
+ }, z.core.$strip>;
15
+ const URL: "/api/v1/users/me/password/change/verify";
16
+ const METHOD = HttpMethod.POST;
17
+ type RequestType = z.infer<typeof Request>;
18
+ type ResponseType = z.infer<typeof Response>;
19
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserPasswordChangeVerifyCommand = void 0;
4
+ const rest_api_1 = require("../../../rest-api");
5
+ const http_method_1 = require("../../../shared/http-method");
6
+ const schemas_1 = require("../../verification/schemas");
7
+ var UserPasswordChangeVerifyCommand;
8
+ (function (UserPasswordChangeVerifyCommand) {
9
+ UserPasswordChangeVerifyCommand.Request = schemas_1.VerificationVerifyRequestSchema;
10
+ UserPasswordChangeVerifyCommand.Response = schemas_1.VerificationVerifyResponseSchema;
11
+ UserPasswordChangeVerifyCommand.URL = rest_api_1.REST_API.V1.USERS.PASSWORD_CHANGE.VERIFY;
12
+ UserPasswordChangeVerifyCommand.METHOD = http_method_1.HttpMethod.POST;
13
+ })(UserPasswordChangeVerifyCommand || (exports.UserPasswordChangeVerifyCommand = UserPasswordChangeVerifyCommand = {}));
@@ -0,0 +1,22 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../shared/http-method';
3
+ export declare namespace UserDeleteAccountStatusQuery {
4
+ const Request: z.ZodObject<{
5
+ requestId: z.ZodString;
6
+ }, z.core.$strip>;
7
+ const Response: z.ZodObject<{
8
+ requestId: z.ZodString;
9
+ type: z.ZodEnum<typeof import("../../verification/schemas").VerificationType>;
10
+ status: z.ZodEnum<typeof import("../../verification/schemas").VerificationRequestStatus>;
11
+ steps: z.ZodArray<z.ZodObject<{
12
+ stepId: z.ZodString;
13
+ channel: z.ZodEnum<typeof import("../../verification/schemas").VerificationChannel>;
14
+ address: z.ZodString;
15
+ status: z.ZodEnum<typeof import("../../verification/schemas").VerificationStepStatus>;
16
+ }, z.core.$strip>>;
17
+ }, z.core.$strip>;
18
+ const URL: "/api/v1/users/me/delete-account/status";
19
+ const METHOD = HttpMethod.GET;
20
+ type RequestType = z.infer<typeof Request>;
21
+ type ResponseType = z.infer<typeof Response>;
22
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserDeleteAccountStatusQuery = void 0;
4
+ const zod_1 = require("zod");
5
+ const rest_api_1 = require("../../../rest-api");
6
+ const http_method_1 = require("../../../shared/http-method");
7
+ const schemas_1 = require("../../verification/schemas");
8
+ var UserDeleteAccountStatusQuery;
9
+ (function (UserDeleteAccountStatusQuery) {
10
+ UserDeleteAccountStatusQuery.Request = zod_1.z.object({
11
+ requestId: zod_1.z.string(),
12
+ });
13
+ UserDeleteAccountStatusQuery.Response = schemas_1.VerificationStatusResponseSchema;
14
+ UserDeleteAccountStatusQuery.URL = rest_api_1.REST_API.V1.USERS.DELETE_ACCOUNT.STATUS;
15
+ UserDeleteAccountStatusQuery.METHOD = http_method_1.HttpMethod.GET;
16
+ })(UserDeleteAccountStatusQuery || (exports.UserDeleteAccountStatusQuery = UserDeleteAccountStatusQuery = {}));
@@ -0,0 +1,22 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../shared/http-method';
3
+ export declare namespace UserEmailChangeStatusQuery {
4
+ const Request: z.ZodObject<{
5
+ requestId: z.ZodString;
6
+ }, z.core.$strip>;
7
+ const Response: z.ZodObject<{
8
+ requestId: z.ZodString;
9
+ type: z.ZodEnum<typeof import("../../verification/schemas").VerificationType>;
10
+ status: z.ZodEnum<typeof import("../../verification/schemas").VerificationRequestStatus>;
11
+ steps: z.ZodArray<z.ZodObject<{
12
+ stepId: z.ZodString;
13
+ channel: z.ZodEnum<typeof import("../../verification/schemas").VerificationChannel>;
14
+ address: z.ZodString;
15
+ status: z.ZodEnum<typeof import("../../verification/schemas").VerificationStepStatus>;
16
+ }, z.core.$strip>>;
17
+ }, z.core.$strip>;
18
+ const URL: "/api/v1/users/me/email-change/status";
19
+ const METHOD = HttpMethod.GET;
20
+ type RequestType = z.infer<typeof Request>;
21
+ type ResponseType = z.infer<typeof Response>;
22
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserEmailChangeStatusQuery = void 0;
4
+ const zod_1 = require("zod");
5
+ const rest_api_1 = require("../../../rest-api");
6
+ const http_method_1 = require("../../../shared/http-method");
7
+ const schemas_1 = require("../../verification/schemas");
8
+ var UserEmailChangeStatusQuery;
9
+ (function (UserEmailChangeStatusQuery) {
10
+ UserEmailChangeStatusQuery.Request = zod_1.z.object({
11
+ requestId: zod_1.z.string(),
12
+ });
13
+ UserEmailChangeStatusQuery.Response = schemas_1.VerificationStatusResponseSchema;
14
+ UserEmailChangeStatusQuery.URL = rest_api_1.REST_API.V1.USERS.EMAIL_CHANGE.STATUS;
15
+ UserEmailChangeStatusQuery.METHOD = http_method_1.HttpMethod.GET;
16
+ })(UserEmailChangeStatusQuery || (exports.UserEmailChangeStatusQuery = UserEmailChangeStatusQuery = {}));
@@ -1 +1,4 @@
1
1
  export * from './get-current-user.query';
2
+ export * from './email-change-status.query';
3
+ export * from './delete-account-status.query';
4
+ export * from './password-change-status.query';
@@ -15,3 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./get-current-user.query"), exports);
18
+ __exportStar(require("./email-change-status.query"), exports);
19
+ __exportStar(require("./delete-account-status.query"), exports);
20
+ __exportStar(require("./password-change-status.query"), exports);
@@ -0,0 +1,22 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../shared/http-method';
3
+ export declare namespace UserPasswordChangeStatusQuery {
4
+ const Request: z.ZodObject<{
5
+ requestId: z.ZodString;
6
+ }, z.core.$strip>;
7
+ const Response: z.ZodObject<{
8
+ requestId: z.ZodString;
9
+ type: z.ZodEnum<typeof import("../../verification/schemas").VerificationType>;
10
+ status: z.ZodEnum<typeof import("../../verification/schemas").VerificationRequestStatus>;
11
+ steps: z.ZodArray<z.ZodObject<{
12
+ stepId: z.ZodString;
13
+ channel: z.ZodEnum<typeof import("../../verification/schemas").VerificationChannel>;
14
+ address: z.ZodString;
15
+ status: z.ZodEnum<typeof import("../../verification/schemas").VerificationStepStatus>;
16
+ }, z.core.$strip>>;
17
+ }, z.core.$strip>;
18
+ const URL: "/api/v1/users/me/password/change/status";
19
+ const METHOD = HttpMethod.GET;
20
+ type RequestType = z.infer<typeof Request>;
21
+ type ResponseType = z.infer<typeof Response>;
22
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserPasswordChangeStatusQuery = void 0;
4
+ const zod_1 = require("zod");
5
+ const rest_api_1 = require("../../../rest-api");
6
+ const http_method_1 = require("../../../shared/http-method");
7
+ const schemas_1 = require("../../verification/schemas");
8
+ var UserPasswordChangeStatusQuery;
9
+ (function (UserPasswordChangeStatusQuery) {
10
+ UserPasswordChangeStatusQuery.Request = zod_1.z.object({
11
+ requestId: zod_1.z.string(),
12
+ });
13
+ UserPasswordChangeStatusQuery.Response = schemas_1.VerificationStatusResponseSchema;
14
+ UserPasswordChangeStatusQuery.URL = rest_api_1.REST_API.V1.USERS.PASSWORD_CHANGE.STATUS;
15
+ UserPasswordChangeStatusQuery.METHOD = http_method_1.HttpMethod.GET;
16
+ })(UserPasswordChangeStatusQuery || (exports.UserPasswordChangeStatusQuery = UserPasswordChangeStatusQuery = {}));
@@ -0,0 +1,4 @@
1
+ import { z } from 'zod';
2
+ export declare const DeleteAccountStartRequestSchema: z.ZodObject<{
3
+ password: z.ZodString;
4
+ }, z.core.$strip>;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteAccountStartRequestSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.DeleteAccountStartRequestSchema = zod_1.z.object({
6
+ password: zod_1.z.string().min(1),
7
+ });
@@ -0,0 +1,4 @@
1
+ import { z } from 'zod';
2
+ export declare const EmailChangeStartRequestSchema: z.ZodObject<{
3
+ newEmail: z.ZodEmail;
4
+ }, z.core.$strip>;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EmailChangeStartRequestSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.EmailChangeStartRequestSchema = zod_1.z.object({
6
+ newEmail: zod_1.z.email(),
7
+ });
@@ -4,3 +4,7 @@ export * from './change-password-request.schema';
4
4
  export * from './toggle-marketing-consent-request.schema';
5
5
  export * from './delete-account-request.schema';
6
6
  export * from './response-unions.schema';
7
+ export * from './email-change-start-request.schema';
8
+ export * from './delete-account-start-request.schema';
9
+ export * from './password-change-start-request.schema';
10
+ export * from './password-change-complete-request.schema';
@@ -20,3 +20,7 @@ __exportStar(require("./change-password-request.schema"), exports);
20
20
  __exportStar(require("./toggle-marketing-consent-request.schema"), exports);
21
21
  __exportStar(require("./delete-account-request.schema"), exports);
22
22
  __exportStar(require("./response-unions.schema"), exports);
23
+ __exportStar(require("./email-change-start-request.schema"), exports);
24
+ __exportStar(require("./delete-account-start-request.schema"), exports);
25
+ __exportStar(require("./password-change-start-request.schema"), exports);
26
+ __exportStar(require("./password-change-complete-request.schema"), exports);
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ export declare const PasswordChangeCompleteRequestSchema: z.ZodObject<{
3
+ requestId: z.ZodString;
4
+ newPassword: z.ZodString;
5
+ logoutOtherSessions: z.ZodDefault<z.ZodBoolean>;
6
+ }, z.core.$strip>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PasswordChangeCompleteRequestSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const regex_1 = require("../../../shared/regex");
6
+ exports.PasswordChangeCompleteRequestSchema = zod_1.z.object({
7
+ requestId: zod_1.z.string(),
8
+ newPassword: zod_1.z.string().min(8).max(128).regex(regex_1.PASSWORD_STRENGTH_REGEX),
9
+ logoutOtherSessions: zod_1.z.boolean().default(true),
10
+ });
@@ -0,0 +1,4 @@
1
+ import { z } from 'zod';
2
+ export declare const PasswordChangeStartRequestSchema: z.ZodObject<{
3
+ oldPassword: z.ZodString;
4
+ }, z.core.$strip>;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PasswordChangeStartRequestSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.PasswordChangeStartRequestSchema = zod_1.z.object({
6
+ oldPassword: zod_1.z.string().min(1),
7
+ });
@@ -4,6 +4,8 @@ export declare enum UserErrorCode {
4
4
  INCORRECT_PASSWORD = "INCORRECT_PASSWORD",
5
5
  USER_DELETED = "USER_DELETED",
6
6
  EMAIL_ALREADY_EXISTS = "EMAIL_ALREADY_EXISTS",
7
+ EMAIL_RESERVATION_CONFLICT = "EMAIL_RESERVATION_CONFLICT",
8
+ REQUEST_ALREADY_ACTIVE = "REQUEST_ALREADY_ACTIVE",
7
9
  INVALID_EMAIL_FORMAT = "INVALID_EMAIL_FORMAT",
8
10
  INVALID_PASSWORD_FORMAT = "INVALID_PASSWORD_FORMAT",
9
11
  WEAK_PASSWORD = "WEAK_PASSWORD",
@@ -7,6 +7,8 @@ var UserErrorCode;
7
7
  UserErrorCode["INCORRECT_PASSWORD"] = "INCORRECT_PASSWORD";
8
8
  UserErrorCode["USER_DELETED"] = "USER_DELETED";
9
9
  UserErrorCode["EMAIL_ALREADY_EXISTS"] = "EMAIL_ALREADY_EXISTS";
10
+ UserErrorCode["EMAIL_RESERVATION_CONFLICT"] = "EMAIL_RESERVATION_CONFLICT";
11
+ UserErrorCode["REQUEST_ALREADY_ACTIVE"] = "REQUEST_ALREADY_ACTIVE";
10
12
  UserErrorCode["INVALID_EMAIL_FORMAT"] = "INVALID_EMAIL_FORMAT";
11
13
  UserErrorCode["INVALID_PASSWORD_FORMAT"] = "INVALID_PASSWORD_FORMAT";
12
14
  UserErrorCode["WEAK_PASSWORD"] = "WEAK_PASSWORD";
@@ -26,6 +28,14 @@ exports.USER_ERRORS = {
26
28
  code: UserErrorCode.EMAIL_ALREADY_EXISTS,
27
29
  statusCode: 409,
28
30
  },
31
+ [UserErrorCode.EMAIL_RESERVATION_CONFLICT]: {
32
+ code: UserErrorCode.EMAIL_RESERVATION_CONFLICT,
33
+ statusCode: 409,
34
+ },
35
+ [UserErrorCode.REQUEST_ALREADY_ACTIVE]: {
36
+ code: UserErrorCode.REQUEST_ALREADY_ACTIVE,
37
+ statusCode: 400,
38
+ },
29
39
  [UserErrorCode.INVALID_EMAIL_FORMAT]: {
30
40
  code: UserErrorCode.INVALID_EMAIL_FORMAT,
31
41
  statusCode: 400,
@@ -0,0 +1 @@
1
+ export * from './resend.command';
@@ -0,0 +1,17 @@
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("./resend.command"), exports);
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../shared/http-method';
3
+ export declare namespace VerificationResendCommand {
4
+ const Request: z.ZodObject<{
5
+ requestId: z.ZodString;
6
+ stepId: z.ZodString;
7
+ }, z.core.$strip>;
8
+ const Response: z.ZodObject<{
9
+ requestId: z.ZodString;
10
+ stepId: z.ZodString;
11
+ status: z.ZodEnum<typeof import("../schemas").VerificationStepStatus>;
12
+ }, z.core.$strip>;
13
+ const URL: "/api/v1/verification/resend";
14
+ const METHOD = HttpMethod.POST;
15
+ type RequestType = z.infer<typeof Request>;
16
+ type ResponseType = z.infer<typeof Response>;
17
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VerificationResendCommand = void 0;
4
+ const rest_api_1 = require("../../../rest-api");
5
+ const http_method_1 = require("../../../shared/http-method");
6
+ const schemas_1 = require("../schemas");
7
+ var VerificationResendCommand;
8
+ (function (VerificationResendCommand) {
9
+ VerificationResendCommand.Request = schemas_1.VerificationResendRequestSchema;
10
+ VerificationResendCommand.Response = schemas_1.VerificationResendResponseSchema;
11
+ VerificationResendCommand.URL = rest_api_1.REST_API.V1.VERIFICATION.RESEND;
12
+ VerificationResendCommand.METHOD = http_method_1.HttpMethod.POST;
13
+ })(VerificationResendCommand || (exports.VerificationResendCommand = VerificationResendCommand = {}));
@@ -0,0 +1,3 @@
1
+ export * from './verification.errors';
2
+ export * from './commands';
3
+ export * from './schemas';
@@ -0,0 +1,19 @@
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("./verification.errors"), exports);
18
+ __exportStar(require("./commands"), exports);
19
+ __exportStar(require("./schemas"), exports);
@@ -0,0 +1,13 @@
1
+ export * from './verification-channel.enum';
2
+ export * from './verification-step-status.enum';
3
+ export * from './verification-request-status.enum';
4
+ export * from './verification-type.enum';
5
+ export * from './verification-step.schema';
6
+ export * from './verification-start-response.schema';
7
+ export * from './verification-verify-request.schema';
8
+ export * from './verification-verify-response.schema';
9
+ export * from './verification-status-response.schema';
10
+ export * from './verification-complete-request.schema';
11
+ export * from './verification-complete-response.schema';
12
+ export * from './verification-resend-request.schema';
13
+ export * from './verification-resend-response.schema';
@@ -0,0 +1,29 @@
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("./verification-channel.enum"), exports);
18
+ __exportStar(require("./verification-step-status.enum"), exports);
19
+ __exportStar(require("./verification-request-status.enum"), exports);
20
+ __exportStar(require("./verification-type.enum"), exports);
21
+ __exportStar(require("./verification-step.schema"), exports);
22
+ __exportStar(require("./verification-start-response.schema"), exports);
23
+ __exportStar(require("./verification-verify-request.schema"), exports);
24
+ __exportStar(require("./verification-verify-response.schema"), exports);
25
+ __exportStar(require("./verification-status-response.schema"), exports);
26
+ __exportStar(require("./verification-complete-request.schema"), exports);
27
+ __exportStar(require("./verification-complete-response.schema"), exports);
28
+ __exportStar(require("./verification-resend-request.schema"), exports);
29
+ __exportStar(require("./verification-resend-response.schema"), exports);
@@ -0,0 +1,3 @@
1
+ export declare enum VerificationChannel {
2
+ EMAIL = "EMAIL"
3
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VerificationChannel = void 0;
4
+ var VerificationChannel;
5
+ (function (VerificationChannel) {
6
+ VerificationChannel["EMAIL"] = "EMAIL";
7
+ })(VerificationChannel || (exports.VerificationChannel = VerificationChannel = {}));
@@ -0,0 +1,4 @@
1
+ import { z } from 'zod';
2
+ export declare const VerificationCompleteRequestSchema: z.ZodObject<{
3
+ requestId: z.ZodString;
4
+ }, z.core.$strip>;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VerificationCompleteRequestSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.VerificationCompleteRequestSchema = zod_1.z.object({
6
+ requestId: zod_1.z.string().uuid(),
7
+ });
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ import { VerificationRequestStatus } from './verification-request-status.enum';
3
+ export declare const VerificationCompleteResponseSchema: z.ZodObject<{
4
+ requestId: z.ZodString;
5
+ requestStatus: z.ZodEnum<typeof VerificationRequestStatus>;
6
+ }, z.core.$strip>;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VerificationCompleteResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const verification_request_status_enum_1 = require("./verification-request-status.enum");
6
+ exports.VerificationCompleteResponseSchema = zod_1.z.object({
7
+ requestId: zod_1.z.string(),
8
+ requestStatus: zod_1.z.enum(verification_request_status_enum_1.VerificationRequestStatus),
9
+ });
@@ -0,0 +1,7 @@
1
+ export declare enum VerificationRequestStatus {
2
+ ACTIVE = "ACTIVE",
3
+ READY_FOR_COMPLETION = "READY_FOR_COMPLETION",
4
+ COMPLETED = "COMPLETED",
5
+ EXPIRED = "EXPIRED",
6
+ CANCELLED = "CANCELLED"
7
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VerificationRequestStatus = void 0;
4
+ var VerificationRequestStatus;
5
+ (function (VerificationRequestStatus) {
6
+ VerificationRequestStatus["ACTIVE"] = "ACTIVE";
7
+ VerificationRequestStatus["READY_FOR_COMPLETION"] = "READY_FOR_COMPLETION";
8
+ VerificationRequestStatus["COMPLETED"] = "COMPLETED";
9
+ VerificationRequestStatus["EXPIRED"] = "EXPIRED";
10
+ VerificationRequestStatus["CANCELLED"] = "CANCELLED";
11
+ })(VerificationRequestStatus || (exports.VerificationRequestStatus = VerificationRequestStatus = {}));
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+ export declare const VerificationResendRequestSchema: z.ZodObject<{
3
+ requestId: z.ZodString;
4
+ stepId: z.ZodString;
5
+ }, z.core.$strip>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VerificationResendRequestSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.VerificationResendRequestSchema = zod_1.z.object({
6
+ requestId: zod_1.z.string().uuid(),
7
+ stepId: zod_1.z.string().uuid(),
8
+ });
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ import { VerificationStepStatus } from './verification-step-status.enum';
3
+ export declare const VerificationResendResponseSchema: z.ZodObject<{
4
+ requestId: z.ZodString;
5
+ stepId: z.ZodString;
6
+ status: z.ZodEnum<typeof VerificationStepStatus>;
7
+ }, z.core.$strip>;