@veruna/api-contracts 1.0.27 → 1.0.30
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.
- package/build/controllers/index.d.ts +3 -2
- package/build/controllers/index.js +3 -1
- package/build/controllers/verification.controllers.d.ts +5 -0
- package/build/controllers/verification.controllers.js +8 -0
- package/build/rest-api.d.ts +21 -0
- package/build/rest-api.js +21 -0
- package/build/routes/index.d.ts +1 -0
- package/build/routes/index.js +3 -1
- package/build/routes/users.routes.d.ts +12 -0
- package/build/routes/users.routes.js +12 -0
- package/build/routes/verification.routes.d.ts +7 -0
- package/build/routes/verification.routes.js +10 -0
- package/build/v1/index.d.ts +1 -0
- package/build/v1/index.js +1 -0
- package/build/v1/message/commands/create-message.command.d.ts +12 -0
- package/build/v1/message/schemas/index.d.ts +1 -1
- package/build/v1/message/schemas/index.js +2 -1
- package/build/v1/message/schemas/stream-events.schema.d.ts +30 -0
- package/build/v1/message/schemas/stream-events.schema.js +20 -1
- package/build/v1/notifications/schemas/email-template.enum.d.ts +1 -0
- package/build/v1/notifications/schemas/email-template.enum.js +1 -0
- package/build/v1/users/commands/delete-account-complete.command.d.ts +15 -0
- package/build/v1/users/commands/delete-account-complete.command.js +13 -0
- package/build/v1/users/commands/delete-account-start.command.d.ts +22 -0
- package/build/v1/users/commands/delete-account-start.command.js +14 -0
- package/build/v1/users/commands/delete-account-verify.command.d.ts +19 -0
- package/build/v1/users/commands/delete-account-verify.command.js +13 -0
- package/build/v1/users/commands/email-change-complete.command.d.ts +15 -0
- package/build/v1/users/commands/email-change-complete.command.js +13 -0
- package/build/v1/users/commands/email-change-start.command.d.ts +22 -0
- package/build/v1/users/commands/email-change-start.command.js +14 -0
- package/build/v1/users/commands/email-change-verify.command.d.ts +19 -0
- package/build/v1/users/commands/email-change-verify.command.js +13 -0
- package/build/v1/users/commands/index.d.ts +9 -0
- package/build/v1/users/commands/index.js +9 -0
- package/build/v1/users/commands/password-change-complete.command.d.ts +17 -0
- package/build/v1/users/commands/password-change-complete.command.js +14 -0
- package/build/v1/users/commands/password-change-start.command.d.ts +22 -0
- package/build/v1/users/commands/password-change-start.command.js +14 -0
- package/build/v1/users/commands/password-change-verify.command.d.ts +19 -0
- package/build/v1/users/commands/password-change-verify.command.js +13 -0
- package/build/v1/users/queries/delete-account-status.query.d.ts +22 -0
- package/build/v1/users/queries/delete-account-status.query.js +16 -0
- package/build/v1/users/queries/email-change-status.query.d.ts +22 -0
- package/build/v1/users/queries/email-change-status.query.js +16 -0
- package/build/v1/users/queries/index.d.ts +3 -0
- package/build/v1/users/queries/index.js +3 -0
- package/build/v1/users/queries/password-change-status.query.d.ts +22 -0
- package/build/v1/users/queries/password-change-status.query.js +16 -0
- package/build/v1/users/schemas/delete-account-start-request.schema.d.ts +4 -0
- package/build/v1/users/schemas/delete-account-start-request.schema.js +7 -0
- package/build/v1/users/schemas/email-change-start-request.schema.d.ts +4 -0
- package/build/v1/users/schemas/email-change-start-request.schema.js +7 -0
- package/build/v1/users/schemas/index.d.ts +4 -0
- package/build/v1/users/schemas/index.js +4 -0
- package/build/v1/users/schemas/password-change-complete-request.schema.d.ts +6 -0
- package/build/v1/users/schemas/password-change-complete-request.schema.js +10 -0
- package/build/v1/users/schemas/password-change-start-request.schema.d.ts +4 -0
- package/build/v1/users/schemas/password-change-start-request.schema.js +7 -0
- package/build/v1/users/users.errors.d.ts +2 -0
- package/build/v1/users/users.errors.js +10 -0
- package/build/v1/verification/commands/index.d.ts +1 -0
- package/build/v1/verification/commands/index.js +17 -0
- package/build/v1/verification/commands/resend.command.d.ts +17 -0
- package/build/v1/verification/commands/resend.command.js +13 -0
- package/build/v1/verification/index.d.ts +3 -0
- package/build/v1/verification/index.js +19 -0
- package/build/v1/verification/schemas/index.d.ts +13 -0
- package/build/v1/verification/schemas/index.js +29 -0
- package/build/v1/verification/schemas/verification-channel.enum.d.ts +3 -0
- package/build/v1/verification/schemas/verification-channel.enum.js +7 -0
- package/build/v1/verification/schemas/verification-complete-request.schema.d.ts +4 -0
- package/build/v1/verification/schemas/verification-complete-request.schema.js +7 -0
- package/build/v1/verification/schemas/verification-complete-response.schema.d.ts +6 -0
- package/build/v1/verification/schemas/verification-complete-response.schema.js +9 -0
- package/build/v1/verification/schemas/verification-request-status.enum.d.ts +7 -0
- package/build/v1/verification/schemas/verification-request-status.enum.js +11 -0
- package/build/v1/verification/schemas/verification-resend-request.schema.d.ts +5 -0
- package/build/v1/verification/schemas/verification-resend-request.schema.js +8 -0
- package/build/v1/verification/schemas/verification-resend-response.schema.d.ts +7 -0
- package/build/v1/verification/schemas/verification-resend-response.schema.js +10 -0
- package/build/v1/verification/schemas/verification-start-response.schema.d.ts +14 -0
- package/build/v1/verification/schemas/verification-start-response.schema.js +13 -0
- package/build/v1/verification/schemas/verification-status-response.schema.d.ts +14 -0
- package/build/v1/verification/schemas/verification-status-response.schema.js +13 -0
- package/build/v1/verification/schemas/verification-step-status.enum.d.ts +6 -0
- package/build/v1/verification/schemas/verification-step-status.enum.js +10 -0
- package/build/v1/verification/schemas/verification-step.schema.d.ts +9 -0
- package/build/v1/verification/schemas/verification-step.schema.js +12 -0
- package/build/v1/verification/schemas/verification-type.enum.d.ts +5 -0
- package/build/v1/verification/schemas/verification-type.enum.js +9 -0
- package/build/v1/verification/schemas/verification-verify-request.schema.d.ts +6 -0
- package/build/v1/verification/schemas/verification-verify-request.schema.js +9 -0
- package/build/v1/verification/schemas/verification-verify-response.schema.d.ts +9 -0
- package/build/v1/verification/schemas/verification-verify-response.schema.js +12 -0
- package/build/v1/verification/verification.errors.d.ts +14 -0
- package/build/v1/verification/verification.errors.js +58 -0
- package/package.json +1 -1
|
@@ -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 = {}));
|
|
@@ -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 = {}));
|
|
@@ -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,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,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,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,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,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,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,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>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VerificationResendResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const verification_step_status_enum_1 = require("./verification-step-status.enum");
|
|
6
|
+
exports.VerificationResendResponseSchema = zod_1.z.object({
|
|
7
|
+
requestId: zod_1.z.string(),
|
|
8
|
+
stepId: zod_1.z.string(),
|
|
9
|
+
status: zod_1.z.enum(verification_step_status_enum_1.VerificationStepStatus),
|
|
10
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { VerificationType } from './verification-type.enum';
|
|
3
|
+
import { VerificationRequestStatus } from './verification-request-status.enum';
|
|
4
|
+
export declare const VerificationStartResponseSchema: z.ZodObject<{
|
|
5
|
+
requestId: z.ZodString;
|
|
6
|
+
type: z.ZodEnum<typeof VerificationType>;
|
|
7
|
+
status: z.ZodEnum<typeof VerificationRequestStatus>;
|
|
8
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
9
|
+
stepId: z.ZodString;
|
|
10
|
+
channel: z.ZodEnum<typeof import("./verification-channel.enum").VerificationChannel>;
|
|
11
|
+
address: z.ZodString;
|
|
12
|
+
status: z.ZodEnum<typeof import("./verification-step-status.enum").VerificationStepStatus>;
|
|
13
|
+
}, z.core.$strip>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VerificationStartResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const verification_type_enum_1 = require("./verification-type.enum");
|
|
6
|
+
const verification_request_status_enum_1 = require("./verification-request-status.enum");
|
|
7
|
+
const verification_step_schema_1 = require("./verification-step.schema");
|
|
8
|
+
exports.VerificationStartResponseSchema = zod_1.z.object({
|
|
9
|
+
requestId: zod_1.z.string(),
|
|
10
|
+
type: zod_1.z.enum(verification_type_enum_1.VerificationType),
|
|
11
|
+
status: zod_1.z.enum(verification_request_status_enum_1.VerificationRequestStatus),
|
|
12
|
+
steps: zod_1.z.array(verification_step_schema_1.VerificationStepSchema),
|
|
13
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { VerificationType } from './verification-type.enum';
|
|
3
|
+
import { VerificationRequestStatus } from './verification-request-status.enum';
|
|
4
|
+
export declare const VerificationStatusResponseSchema: z.ZodObject<{
|
|
5
|
+
requestId: z.ZodString;
|
|
6
|
+
type: z.ZodEnum<typeof VerificationType>;
|
|
7
|
+
status: z.ZodEnum<typeof VerificationRequestStatus>;
|
|
8
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
9
|
+
stepId: z.ZodString;
|
|
10
|
+
channel: z.ZodEnum<typeof import("./verification-channel.enum").VerificationChannel>;
|
|
11
|
+
address: z.ZodString;
|
|
12
|
+
status: z.ZodEnum<typeof import("./verification-step-status.enum").VerificationStepStatus>;
|
|
13
|
+
}, z.core.$strip>>;
|
|
14
|
+
}, z.core.$strip>;
|