@veruna/api-contracts 1.0.2 → 1.0.4
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/index.d.ts +3 -0
- package/build/index.js +3 -0
- package/build/locales/en.d.ts +31 -0
- package/build/locales/en.js +38 -0
- package/build/locales/index.d.ts +66 -0
- package/build/locales/index.js +22 -0
- package/build/locales/ru.d.ts +30 -0
- package/build/locales/ru.js +38 -0
- package/build/rest-api.d.ts +49 -0
- package/build/rest-api.js +61 -0
- package/build/shared/common-schemas.d.ts +12 -0
- package/build/shared/common-schemas.js +15 -0
- package/build/shared/http-method.d.ts +10 -0
- package/build/shared/http-method.js +14 -0
- package/build/shared/pagination.schema.d.ts +35 -0
- package/build/shared/pagination.schema.js +30 -0
- package/build/shared/regex.d.ts +8 -0
- package/build/shared/regex.js +16 -0
- package/build/v1/auth/auth.types.d.ts +2 -1
- package/build/v1/auth/auth.types.js +4 -1
- package/build/v1/auth/commands/delete-session.command.d.ts +13 -0
- package/build/v1/auth/commands/delete-session.command.js +14 -0
- package/build/v1/auth/commands/index.d.ts +5 -0
- package/build/v1/auth/commands/index.js +21 -0
- package/build/v1/auth/commands/login.command.d.ts +34 -0
- package/build/v1/auth/commands/login.command.js +16 -0
- package/build/v1/auth/commands/logout-all.command.d.ts +13 -0
- package/build/v1/auth/commands/logout-all.command.js +14 -0
- package/build/v1/auth/commands/logout.command.d.ts +13 -0
- package/build/v1/auth/commands/logout.command.js +14 -0
- package/build/v1/auth/commands/signup.command.d.ts +43 -0
- package/build/v1/auth/commands/signup.command.js +16 -0
- package/build/v1/auth/controllers.d.ts +4 -0
- package/build/v1/auth/controllers.js +7 -0
- package/build/v1/auth/index.d.ts +3 -1
- package/build/v1/auth/index.js +3 -1
- package/build/v1/auth/queries/get-sessions.query.d.ts +22 -0
- package/build/v1/auth/queries/get-sessions.query.js +15 -0
- package/build/v1/auth/queries/index.d.ts +1 -0
- package/build/v1/auth/queries/index.js +17 -0
- package/build/v1/auth/routes/auth.routes.d.ts +12 -0
- package/build/v1/auth/routes/auth.routes.js +15 -0
- package/build/v1/auth/schemas/auth-response.schema.d.ts +36 -0
- package/build/v1/auth/schemas/auth-response.schema.js +20 -0
- package/build/v1/auth/schemas/index.d.ts +5 -0
- package/build/v1/auth/schemas/index.js +21 -0
- package/build/v1/auth/schemas/login-request.schema.d.ts +9 -0
- package/build/v1/auth/schemas/login-request.schema.js +13 -0
- package/build/v1/auth/schemas/session-response.schema.d.ts +13 -0
- package/build/v1/auth/schemas/session-response.schema.js +17 -0
- package/build/v1/auth/schemas/signup-request.schema.d.ts +28 -0
- package/build/v1/auth/schemas/signup-request.schema.js +26 -0
- package/build/v1/auth/schemas/user-role.enum.d.ts +7 -0
- package/build/v1/auth/schemas/user-role.enum.js +11 -0
- package/build/v1/blog/admin/commands/create-category.command.d.ts +27 -0
- package/build/v1/blog/admin/commands/create-category.command.js +19 -0
- package/build/v1/blog/admin/commands/create-post.command.d.ts +46 -0
- package/build/v1/blog/admin/commands/create-post.command.js +19 -0
- package/build/v1/blog/admin/commands/delete-category.command.d.ts +14 -0
- package/build/v1/blog/admin/commands/delete-category.command.js +18 -0
- package/build/v1/blog/admin/commands/delete-post.command.d.ts +14 -0
- package/build/v1/blog/admin/commands/delete-post.command.js +18 -0
- package/build/v1/blog/admin/commands/index.d.ts +6 -0
- package/build/v1/blog/admin/commands/index.js +22 -0
- package/build/v1/blog/admin/commands/update-category.command.d.ts +27 -0
- package/build/v1/blog/admin/commands/update-category.command.js +19 -0
- package/build/v1/blog/admin/commands/update-post.command.d.ts +46 -0
- package/build/v1/blog/admin/commands/update-post.command.js +19 -0
- package/build/v1/blog/admin/queries/get-categories.query.d.ts +27 -0
- package/build/v1/blog/admin/queries/get-categories.query.js +25 -0
- package/build/v1/blog/admin/queries/get-category.query.d.ts +22 -0
- package/build/v1/blog/admin/queries/get-category.query.js +19 -0
- package/build/v1/blog/admin/queries/get-post.query.d.ts +36 -0
- package/build/v1/blog/admin/queries/get-post.query.js +19 -0
- package/build/v1/blog/admin/queries/get-posts.query.d.ts +84 -0
- package/build/v1/blog/admin/queries/get-posts.query.js +24 -0
- package/build/v1/blog/admin/queries/index.d.ts +4 -0
- package/build/v1/blog/admin/queries/index.js +20 -0
- package/build/v1/blog/blog.paths.d.ts +36 -0
- package/build/v1/blog/blog.paths.js +47 -0
- package/build/v1/blog/blog.types.d.ts +12 -0
- package/build/v1/blog/blog.types.js +7 -0
- package/build/v1/blog/controllers.d.ts +7 -0
- package/build/v1/blog/controllers.js +10 -0
- package/build/v1/blog/index.d.ts +6 -0
- package/build/v1/blog/index.js +22 -0
- package/build/v1/blog/public/queries/get-categories.query.d.ts +24 -0
- package/build/v1/blog/public/queries/get-categories.query.js +22 -0
- package/build/v1/blog/public/queries/get-post-by-alias.query.d.ts +36 -0
- package/build/v1/blog/public/queries/get-post-by-alias.query.js +19 -0
- package/build/v1/blog/public/queries/get-posts.query.d.ts +83 -0
- package/build/v1/blog/public/queries/get-posts.query.js +24 -0
- package/build/v1/blog/public/queries/index.d.ts +3 -0
- package/build/v1/blog/public/queries/index.js +19 -0
- package/build/v1/blog/routes/blog-admin-categories.routes.d.ts +11 -0
- package/build/v1/blog/routes/blog-admin-categories.routes.js +14 -0
- package/build/v1/blog/routes/blog-admin-posts.routes.d.ts +10 -0
- package/build/v1/blog/routes/blog-admin-posts.routes.js +13 -0
- package/build/v1/blog/routes/blog-public.routes.d.ts +10 -0
- package/build/v1/blog/routes/blog-public.routes.js +13 -0
- package/build/v1/blog/routes/index.d.ts +3 -0
- package/build/v1/blog/routes/index.js +19 -0
- package/build/v1/blog/schemas/blog-category-status.enum.d.ts +8 -0
- package/build/v1/blog/schemas/blog-category-status.enum.js +12 -0
- package/build/v1/blog/schemas/blog-post-status.enum.d.ts +8 -0
- package/build/v1/blog/schemas/blog-post-status.enum.js +12 -0
- package/build/v1/blog/schemas/category-response.schema.d.ts +14 -0
- package/build/v1/blog/schemas/category-response.schema.js +18 -0
- package/build/v1/blog/schemas/create-category-request.schema.d.ts +8 -0
- package/build/v1/blog/schemas/create-category-request.schema.js +12 -0
- package/build/v1/blog/schemas/create-post-request.schema.d.ts +13 -0
- package/build/v1/blog/schemas/create-post-request.schema.js +17 -0
- package/build/v1/blog/schemas/get-posts-query.schema.d.ts +13 -0
- package/build/v1/blog/schemas/get-posts-query.schema.js +13 -0
- package/build/v1/blog/schemas/index.d.ts +9 -0
- package/build/v1/blog/schemas/index.js +25 -0
- package/build/v1/blog/schemas/post-response.schema.d.ts +28 -0
- package/build/v1/blog/schemas/post-response.schema.js +25 -0
- package/build/v1/blog/schemas/update-category-request.schema.d.ts +8 -0
- package/build/v1/blog/schemas/update-category-request.schema.js +12 -0
- package/build/v1/blog/schemas/update-post-request.schema.d.ts +13 -0
- package/build/v1/blog/schemas/update-post-request.schema.js +17 -0
- package/build/v1/unregistered-users/commands/authenticate.command.d.ts +20 -0
- package/build/v1/unregistered-users/commands/authenticate.command.js +15 -0
- package/build/v1/unregistered-users/commands/index.d.ts +1 -0
- package/build/v1/unregistered-users/commands/index.js +17 -0
- package/build/v1/unregistered-users/index.d.ts +2 -1
- package/build/v1/unregistered-users/index.js +2 -1
- package/build/v1/unregistered-users/schemas/authenticate-request.schema.d.ts +7 -0
- package/build/v1/unregistered-users/schemas/authenticate-request.schema.js +10 -0
- package/build/v1/unregistered-users/schemas/authenticate-response.schema.d.ts +11 -0
- package/build/v1/unregistered-users/schemas/authenticate-response.schema.js +15 -0
- package/build/v1/unregistered-users/schemas/index.d.ts +3 -0
- package/build/v1/unregistered-users/schemas/index.js +19 -0
- package/build/v1/unregistered-users/schemas/unreg-user-status.enum.d.ts +8 -0
- package/build/v1/unregistered-users/schemas/unreg-user-status.enum.js +12 -0
- package/build/v1/unregistered-users/unregistered-users.types.d.ts +3 -1
- package/build/v1/unregistered-users/unregistered-users.types.js +6 -0
- package/build/v1/users/commands/change-password.command.d.ts +17 -0
- package/build/v1/users/commands/change-password.command.js +13 -0
- package/build/v1/users/commands/delete-account.command.d.ts +13 -0
- package/build/v1/users/commands/delete-account.command.js +13 -0
- package/build/v1/users/commands/index.d.ts +4 -0
- package/build/v1/users/commands/index.js +20 -0
- package/build/v1/users/commands/toggle-marketing-consent.command.d.ts +15 -0
- package/build/v1/users/commands/toggle-marketing-consent.command.js +13 -0
- package/build/v1/users/commands/update-profile.command.d.ts +15 -0
- package/build/v1/users/commands/update-profile.command.js +13 -0
- package/build/v1/users/controllers.d.ts +4 -0
- package/build/v1/users/controllers.js +7 -0
- package/build/v1/users/index.d.ts +3 -1
- package/build/v1/users/index.js +3 -1
- package/build/v1/users/queries/get-current-user.query.d.ts +20 -0
- package/build/v1/users/queries/get-current-user.query.js +14 -0
- package/build/v1/users/queries/index.d.ts +1 -0
- package/build/v1/users/queries/index.js +17 -0
- package/build/v1/users/routes/users.routes.d.ts +9 -0
- package/build/v1/users/routes/users.routes.js +12 -0
- package/build/v1/users/schemas/change-password-request.schema.d.ts +10 -0
- package/build/v1/users/schemas/change-password-request.schema.js +14 -0
- package/build/v1/users/schemas/delete-account-request.schema.d.ts +5 -0
- package/build/v1/users/schemas/delete-account-request.schema.js +8 -0
- package/build/v1/users/schemas/index.d.ts +6 -0
- package/build/v1/users/schemas/index.js +22 -0
- package/build/v1/users/{users.schemas.d.ts → schemas/response-unions.schema.d.ts} +0 -42
- package/build/v1/users/schemas/response-unions.schema.js +14 -0
- package/build/v1/users/schemas/toggle-marketing-consent-request.schema.d.ts +7 -0
- package/build/v1/users/schemas/toggle-marketing-consent-request.schema.js +10 -0
- package/build/v1/users/schemas/update-profile-request.schema.d.ts +8 -0
- package/build/v1/users/schemas/update-profile-request.schema.js +11 -0
- package/build/v1/users/schemas/user-response.schema.d.ts +12 -0
- package/build/v1/users/schemas/user-response.schema.js +16 -0
- package/build/v1/users/users.types.d.ts +2 -4
- package/package.json +1 -1
- package/build/v1/auth/auth.schemas.d.ts +0 -87
- package/build/v1/auth/auth.schemas.js +0 -69
- package/build/v1/unregistered-users/unregistered-users.schemas.d.ts +0 -24
- package/build/v1/unregistered-users/unregistered-users.schemas.js +0 -28
- package/build/v1/users/users.schemas.js +0 -58
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace AuthLogoutAllCommand {
|
|
4
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
const Response: z.ZodUnion<readonly [z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
6
|
+
code: z.ZodString;
|
|
7
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
8
|
+
}, z.core.$strip>]>;
|
|
9
|
+
const URL: "/api/v1/auth/logout-all";
|
|
10
|
+
const METHOD = HttpMethod.POST;
|
|
11
|
+
type RequestType = z.infer<typeof Request>;
|
|
12
|
+
type ResponseType = z.infer<typeof Response>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthLogoutAllCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const auth_paths_1 = require("../auth.paths");
|
|
6
|
+
const http_method_1 = require("../../../shared/http-method");
|
|
7
|
+
const common_schemas_1 = require("../../../shared/common-schemas");
|
|
8
|
+
var AuthLogoutAllCommand;
|
|
9
|
+
(function (AuthLogoutAllCommand) {
|
|
10
|
+
AuthLogoutAllCommand.Request = zod_1.z.object({}); // No request body
|
|
11
|
+
AuthLogoutAllCommand.Response = zod_1.z.union([common_schemas_1.EmptyResponseSchema, common_schemas_1.ErrorResponseSchema]);
|
|
12
|
+
AuthLogoutAllCommand.URL = auth_paths_1.AUTH_API_PATHS.LOGOUT_ALL;
|
|
13
|
+
AuthLogoutAllCommand.METHOD = http_method_1.HttpMethod.POST;
|
|
14
|
+
})(AuthLogoutAllCommand || (exports.AuthLogoutAllCommand = AuthLogoutAllCommand = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace AuthLogoutCommand {
|
|
4
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
const Response: z.ZodUnion<readonly [z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
6
|
+
code: z.ZodString;
|
|
7
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
8
|
+
}, z.core.$strip>]>;
|
|
9
|
+
const URL: "/api/v1/auth/logout";
|
|
10
|
+
const METHOD = HttpMethod.POST;
|
|
11
|
+
type RequestType = z.infer<typeof Request>;
|
|
12
|
+
type ResponseType = z.infer<typeof Response>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthLogoutCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const auth_paths_1 = require("../auth.paths");
|
|
6
|
+
const http_method_1 = require("../../../shared/http-method");
|
|
7
|
+
const common_schemas_1 = require("../../../shared/common-schemas");
|
|
8
|
+
var AuthLogoutCommand;
|
|
9
|
+
(function (AuthLogoutCommand) {
|
|
10
|
+
AuthLogoutCommand.Request = zod_1.z.object({}); // No request body
|
|
11
|
+
AuthLogoutCommand.Response = zod_1.z.union([common_schemas_1.EmptyResponseSchema, common_schemas_1.ErrorResponseSchema]);
|
|
12
|
+
AuthLogoutCommand.URL = auth_paths_1.AUTH_API_PATHS.LOGOUT;
|
|
13
|
+
AuthLogoutCommand.METHOD = http_method_1.HttpMethod.POST;
|
|
14
|
+
})(AuthLogoutCommand || (exports.AuthLogoutCommand = AuthLogoutCommand = {}));
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace AuthSignupCommand {
|
|
4
|
+
const Request: z.ZodObject<{
|
|
5
|
+
email: z.ZodString;
|
|
6
|
+
password: z.ZodString;
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
marketingConsent: z.ZodDefault<z.ZodBoolean>;
|
|
9
|
+
utm: z.ZodOptional<z.ZodObject<{
|
|
10
|
+
utmSource: z.ZodOptional<z.ZodString>;
|
|
11
|
+
utmMedium: z.ZodOptional<z.ZodString>;
|
|
12
|
+
utmCampaign: z.ZodOptional<z.ZodString>;
|
|
13
|
+
utmContent: z.ZodOptional<z.ZodString>;
|
|
14
|
+
utmTerm: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
const Response: z.ZodUnion<readonly [z.ZodObject<{
|
|
18
|
+
user: z.ZodObject<{
|
|
19
|
+
uuid: z.ZodString;
|
|
20
|
+
email: z.ZodString;
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
role: z.ZodString;
|
|
23
|
+
marketingConsent: z.ZodBoolean;
|
|
24
|
+
createdAt: z.ZodString;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
accessToken: z.ZodString;
|
|
27
|
+
session: z.ZodObject<{
|
|
28
|
+
uuid: z.ZodString;
|
|
29
|
+
deviceName: z.ZodString;
|
|
30
|
+
ip: z.ZodString;
|
|
31
|
+
isCurrent: z.ZodBoolean;
|
|
32
|
+
createdAt: z.ZodString;
|
|
33
|
+
lastUsedAt: z.ZodString;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
36
|
+
code: z.ZodString;
|
|
37
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
38
|
+
}, z.core.$strip>]>;
|
|
39
|
+
const URL: "/api/v1/auth/signup";
|
|
40
|
+
const METHOD = HttpMethod.POST;
|
|
41
|
+
type RequestType = z.infer<typeof Request>;
|
|
42
|
+
type ResponseType = z.infer<typeof Response>;
|
|
43
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthSignupCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const signup_request_schema_1 = require("../schemas/signup-request.schema");
|
|
6
|
+
const auth_response_schema_1 = require("../schemas/auth-response.schema");
|
|
7
|
+
const auth_paths_1 = require("../auth.paths");
|
|
8
|
+
const http_method_1 = require("../../../shared/http-method");
|
|
9
|
+
const common_schemas_1 = require("../../../shared/common-schemas");
|
|
10
|
+
var AuthSignupCommand;
|
|
11
|
+
(function (AuthSignupCommand) {
|
|
12
|
+
AuthSignupCommand.Request = signup_request_schema_1.SignUpRequestSchema;
|
|
13
|
+
AuthSignupCommand.Response = zod_1.z.union([auth_response_schema_1.AuthResponseSchema, common_schemas_1.ErrorResponseSchema]);
|
|
14
|
+
AuthSignupCommand.URL = auth_paths_1.AUTH_API_PATHS.SIGNUP;
|
|
15
|
+
AuthSignupCommand.METHOD = http_method_1.HttpMethod.POST;
|
|
16
|
+
})(AuthSignupCommand || (exports.AuthSignupCommand = AuthSignupCommand = {}));
|
package/build/v1/auth/index.d.ts
CHANGED
package/build/v1/auth/index.js
CHANGED
|
@@ -14,7 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./schemas"), exports);
|
|
18
18
|
__exportStar(require("./auth.types"), exports);
|
|
19
19
|
__exportStar(require("./auth.paths"), exports);
|
|
20
20
|
__exportStar(require("./auth.errors"), exports);
|
|
21
|
+
__exportStar(require("./commands"), exports);
|
|
22
|
+
__exportStar(require("./queries"), exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace AuthGetSessionsQuery {
|
|
4
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
const Response: z.ZodUnion<readonly [z.ZodObject<{
|
|
6
|
+
sessions: z.ZodArray<z.ZodObject<{
|
|
7
|
+
uuid: z.ZodString;
|
|
8
|
+
deviceName: z.ZodString;
|
|
9
|
+
ip: z.ZodString;
|
|
10
|
+
isCurrent: z.ZodBoolean;
|
|
11
|
+
createdAt: z.ZodString;
|
|
12
|
+
lastUsedAt: z.ZodString;
|
|
13
|
+
}, z.core.$strip>>;
|
|
14
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
15
|
+
code: z.ZodString;
|
|
16
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
17
|
+
}, z.core.$strip>]>;
|
|
18
|
+
const URL: "/api/v1/auth/sessions";
|
|
19
|
+
const METHOD = HttpMethod.GET;
|
|
20
|
+
type RequestType = z.infer<typeof Request>;
|
|
21
|
+
type ResponseType = z.infer<typeof Response>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthGetSessionsQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const auth_response_schema_1 = require("../schemas/auth-response.schema");
|
|
6
|
+
const auth_paths_1 = require("../auth.paths");
|
|
7
|
+
const http_method_1 = require("../../../shared/http-method");
|
|
8
|
+
const common_schemas_1 = require("../../../shared/common-schemas");
|
|
9
|
+
var AuthGetSessionsQuery;
|
|
10
|
+
(function (AuthGetSessionsQuery) {
|
|
11
|
+
AuthGetSessionsQuery.Request = zod_1.z.object({}); // No request body for GET
|
|
12
|
+
AuthGetSessionsQuery.Response = zod_1.z.union([auth_response_schema_1.SessionsListResponseSchema, common_schemas_1.ErrorResponseSchema]);
|
|
13
|
+
AuthGetSessionsQuery.URL = auth_paths_1.AUTH_API_PATHS.SESSIONS;
|
|
14
|
+
AuthGetSessionsQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
15
|
+
})(AuthGetSessionsQuery || (exports.AuthGetSessionsQuery = AuthGetSessionsQuery = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './get-sessions.query';
|
|
@@ -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("./get-sessions.query"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auth Routes
|
|
3
|
+
* For NestJS method decorators (@Get, @Post, etc.)
|
|
4
|
+
*/
|
|
5
|
+
export declare const AUTH_ROUTES: {
|
|
6
|
+
readonly SIGNUP: "signup";
|
|
7
|
+
readonly LOGIN: "login";
|
|
8
|
+
readonly LOGOUT: "logout";
|
|
9
|
+
readonly LOGOUT_ALL: "logout-all";
|
|
10
|
+
readonly SESSIONS: "sessions";
|
|
11
|
+
readonly SESSION_BY_ID: "sessions/:id";
|
|
12
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AUTH_ROUTES = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Auth Routes
|
|
6
|
+
* For NestJS method decorators (@Get, @Post, etc.)
|
|
7
|
+
*/
|
|
8
|
+
exports.AUTH_ROUTES = {
|
|
9
|
+
SIGNUP: 'signup',
|
|
10
|
+
LOGIN: 'login',
|
|
11
|
+
LOGOUT: 'logout',
|
|
12
|
+
LOGOUT_ALL: 'logout-all',
|
|
13
|
+
SESSIONS: 'sessions',
|
|
14
|
+
SESSION_BY_ID: 'sessions/:id',
|
|
15
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Auth Response Schema (signup/login)
|
|
4
|
+
*/
|
|
5
|
+
export declare const AuthResponseSchema: z.ZodObject<{
|
|
6
|
+
user: z.ZodObject<{
|
|
7
|
+
uuid: z.ZodString;
|
|
8
|
+
email: z.ZodString;
|
|
9
|
+
name: z.ZodString;
|
|
10
|
+
role: z.ZodString;
|
|
11
|
+
marketingConsent: z.ZodBoolean;
|
|
12
|
+
createdAt: z.ZodString;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
accessToken: z.ZodString;
|
|
15
|
+
session: z.ZodObject<{
|
|
16
|
+
uuid: z.ZodString;
|
|
17
|
+
deviceName: z.ZodString;
|
|
18
|
+
ip: z.ZodString;
|
|
19
|
+
isCurrent: z.ZodBoolean;
|
|
20
|
+
createdAt: z.ZodString;
|
|
21
|
+
lastUsedAt: z.ZodString;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
/**
|
|
25
|
+
* Sessions List Response Schema
|
|
26
|
+
*/
|
|
27
|
+
export declare const SessionsListResponseSchema: z.ZodObject<{
|
|
28
|
+
sessions: z.ZodArray<z.ZodObject<{
|
|
29
|
+
uuid: z.ZodString;
|
|
30
|
+
deviceName: z.ZodString;
|
|
31
|
+
ip: z.ZodString;
|
|
32
|
+
isCurrent: z.ZodBoolean;
|
|
33
|
+
createdAt: z.ZodString;
|
|
34
|
+
lastUsedAt: z.ZodString;
|
|
35
|
+
}, z.core.$strip>>;
|
|
36
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SessionsListResponseSchema = exports.AuthResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const user_response_schema_1 = require("../../users/schemas/user-response.schema");
|
|
6
|
+
const session_response_schema_1 = require("./session-response.schema");
|
|
7
|
+
/**
|
|
8
|
+
* Auth Response Schema (signup/login)
|
|
9
|
+
*/
|
|
10
|
+
exports.AuthResponseSchema = zod_1.z.object({
|
|
11
|
+
user: user_response_schema_1.UserResponseSchema,
|
|
12
|
+
accessToken: zod_1.z.string(),
|
|
13
|
+
session: session_response_schema_1.SessionResponseSchema,
|
|
14
|
+
});
|
|
15
|
+
/**
|
|
16
|
+
* Sessions List Response Schema
|
|
17
|
+
*/
|
|
18
|
+
exports.SessionsListResponseSchema = zod_1.z.object({
|
|
19
|
+
sessions: zod_1.z.array(session_response_schema_1.SessionResponseSchema),
|
|
20
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
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("./user-role.enum"), exports);
|
|
18
|
+
__exportStar(require("./signup-request.schema"), exports);
|
|
19
|
+
__exportStar(require("./login-request.schema"), exports);
|
|
20
|
+
__exportStar(require("./session-response.schema"), exports);
|
|
21
|
+
__exportStar(require("./auth-response.schema"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LoginRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const regex_1 = require("../../../shared/regex");
|
|
6
|
+
/**
|
|
7
|
+
* Login Request Schema
|
|
8
|
+
* Error messages are in locales (en.ts, ru.ts)
|
|
9
|
+
*/
|
|
10
|
+
exports.LoginRequestSchema = zod_1.z.object({
|
|
11
|
+
email: zod_1.z.string().regex(regex_1.EMAIL_REGEX),
|
|
12
|
+
password: zod_1.z.string().min(1),
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Session Response Schema
|
|
4
|
+
* Error messages are in locales (en.ts, ru.ts)
|
|
5
|
+
*/
|
|
6
|
+
export declare const SessionResponseSchema: z.ZodObject<{
|
|
7
|
+
uuid: z.ZodString;
|
|
8
|
+
deviceName: z.ZodString;
|
|
9
|
+
ip: z.ZodString;
|
|
10
|
+
isCurrent: z.ZodBoolean;
|
|
11
|
+
createdAt: z.ZodString;
|
|
12
|
+
lastUsedAt: z.ZodString;
|
|
13
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SessionResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const regex_1 = require("../../../shared/regex");
|
|
6
|
+
/**
|
|
7
|
+
* Session Response Schema
|
|
8
|
+
* Error messages are in locales (en.ts, ru.ts)
|
|
9
|
+
*/
|
|
10
|
+
exports.SessionResponseSchema = zod_1.z.object({
|
|
11
|
+
uuid: zod_1.z.string().regex(regex_1.UUID_REGEX),
|
|
12
|
+
deviceName: zod_1.z.string(),
|
|
13
|
+
ip: zod_1.z.string(),
|
|
14
|
+
isCurrent: zod_1.z.boolean(),
|
|
15
|
+
createdAt: zod_1.z.string().regex(regex_1.DATETIME_REGEX),
|
|
16
|
+
lastUsedAt: zod_1.z.string().regex(regex_1.DATETIME_REGEX),
|
|
17
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* UTM Schema
|
|
4
|
+
*/
|
|
5
|
+
export declare const UtmSchema: z.ZodObject<{
|
|
6
|
+
utmSource: z.ZodOptional<z.ZodString>;
|
|
7
|
+
utmMedium: z.ZodOptional<z.ZodString>;
|
|
8
|
+
utmCampaign: z.ZodOptional<z.ZodString>;
|
|
9
|
+
utmContent: z.ZodOptional<z.ZodString>;
|
|
10
|
+
utmTerm: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
/**
|
|
13
|
+
* Sign Up Request Schema
|
|
14
|
+
* Error messages are in locales (en.ts, ru.ts)
|
|
15
|
+
*/
|
|
16
|
+
export declare const SignUpRequestSchema: z.ZodObject<{
|
|
17
|
+
email: z.ZodString;
|
|
18
|
+
password: z.ZodString;
|
|
19
|
+
name: z.ZodString;
|
|
20
|
+
marketingConsent: z.ZodDefault<z.ZodBoolean>;
|
|
21
|
+
utm: z.ZodOptional<z.ZodObject<{
|
|
22
|
+
utmSource: z.ZodOptional<z.ZodString>;
|
|
23
|
+
utmMedium: z.ZodOptional<z.ZodString>;
|
|
24
|
+
utmCampaign: z.ZodOptional<z.ZodString>;
|
|
25
|
+
utmContent: z.ZodOptional<z.ZodString>;
|
|
26
|
+
utmTerm: z.ZodOptional<z.ZodString>;
|
|
27
|
+
}, z.core.$strip>>;
|
|
28
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SignUpRequestSchema = exports.UtmSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const regex_1 = require("../../../shared/regex");
|
|
6
|
+
/**
|
|
7
|
+
* UTM Schema
|
|
8
|
+
*/
|
|
9
|
+
exports.UtmSchema = zod_1.z.object({
|
|
10
|
+
utmSource: zod_1.z.string().optional(),
|
|
11
|
+
utmMedium: zod_1.z.string().optional(),
|
|
12
|
+
utmCampaign: zod_1.z.string().optional(),
|
|
13
|
+
utmContent: zod_1.z.string().optional(),
|
|
14
|
+
utmTerm: zod_1.z.string().optional(),
|
|
15
|
+
});
|
|
16
|
+
/**
|
|
17
|
+
* Sign Up Request Schema
|
|
18
|
+
* Error messages are in locales (en.ts, ru.ts)
|
|
19
|
+
*/
|
|
20
|
+
exports.SignUpRequestSchema = zod_1.z.object({
|
|
21
|
+
email: zod_1.z.string().regex(regex_1.EMAIL_REGEX),
|
|
22
|
+
password: zod_1.z.string().min(8).max(128).regex(regex_1.PASSWORD_STRENGTH_REGEX),
|
|
23
|
+
name: zod_1.z.string().min(2),
|
|
24
|
+
marketingConsent: zod_1.z.boolean().default(false),
|
|
25
|
+
utm: exports.UtmSchema.optional(),
|
|
26
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserRole = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* User Role enum
|
|
6
|
+
*/
|
|
7
|
+
var UserRole;
|
|
8
|
+
(function (UserRole) {
|
|
9
|
+
UserRole["USER"] = "user";
|
|
10
|
+
UserRole["ADMIN"] = "admin";
|
|
11
|
+
})(UserRole || (exports.UserRole = UserRole = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../../shared/http-method';
|
|
3
|
+
export declare namespace AdminBlogCreateCategoryCommand {
|
|
4
|
+
const Request: z.ZodObject<{
|
|
5
|
+
alias: z.ZodString;
|
|
6
|
+
title: z.ZodString;
|
|
7
|
+
order: z.ZodDefault<z.ZodNumber>;
|
|
8
|
+
status: z.ZodDefault<z.ZodEnum<typeof import("../../schemas").BlogCategoryStatus>>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
const Response: z.ZodUnion<readonly [z.ZodObject<{
|
|
11
|
+
uuid: z.ZodString;
|
|
12
|
+
alias: z.ZodString;
|
|
13
|
+
title: z.ZodString;
|
|
14
|
+
order: z.ZodNumber;
|
|
15
|
+
status: z.ZodEnum<typeof import("../../schemas").BlogCategoryStatus>;
|
|
16
|
+
createdAt: z.ZodString;
|
|
17
|
+
updatedAt: z.ZodString;
|
|
18
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
19
|
+
code: z.ZodString;
|
|
20
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
21
|
+
}, z.core.$strip>]>;
|
|
22
|
+
const PATH: "";
|
|
23
|
+
const URL: "/api/v1/admin/blog/categories/";
|
|
24
|
+
const METHOD = HttpMethod.POST;
|
|
25
|
+
type RequestType = z.infer<typeof Request>;
|
|
26
|
+
type ResponseType = z.infer<typeof Response>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminBlogCreateCategoryCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../../schemas");
|
|
6
|
+
const blog_admin_categories_routes_1 = require("../../routes/blog-admin-categories.routes");
|
|
7
|
+
const rest_api_1 = require("../../../../rest-api");
|
|
8
|
+
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
+
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
|
+
var AdminBlogCreateCategoryCommand;
|
|
11
|
+
(function (AdminBlogCreateCategoryCommand) {
|
|
12
|
+
// Request/Response
|
|
13
|
+
AdminBlogCreateCategoryCommand.Request = schemas_1.CreateCategoryRequestSchema;
|
|
14
|
+
AdminBlogCreateCategoryCommand.Response = zod_1.z.union([schemas_1.CategoryResponseSchema, common_schemas_1.ErrorResponseSchema]);
|
|
15
|
+
// Path/URL/Method
|
|
16
|
+
AdminBlogCreateCategoryCommand.PATH = blog_admin_categories_routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.CREATE;
|
|
17
|
+
AdminBlogCreateCategoryCommand.URL = rest_api_1.REST_API.V1.BLOG.ADMIN.CATEGORIES.CREATE;
|
|
18
|
+
AdminBlogCreateCategoryCommand.METHOD = http_method_1.HttpMethod.POST;
|
|
19
|
+
})(AdminBlogCreateCategoryCommand || (exports.AdminBlogCreateCategoryCommand = AdminBlogCreateCategoryCommand = {}));
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../../shared/http-method';
|
|
3
|
+
export declare namespace AdminBlogCreatePostCommand {
|
|
4
|
+
const Request: z.ZodObject<{
|
|
5
|
+
alias: z.ZodString;
|
|
6
|
+
title: z.ZodString;
|
|
7
|
+
metaTitle: z.ZodString;
|
|
8
|
+
metaDescription: z.ZodString;
|
|
9
|
+
content: z.ZodString;
|
|
10
|
+
image: z.ZodString;
|
|
11
|
+
author: z.ZodString;
|
|
12
|
+
categoryIds: z.ZodArray<z.ZodString>;
|
|
13
|
+
status: z.ZodDefault<z.ZodEnum<typeof import("../../schemas").BlogPostStatus>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
const Response: z.ZodUnion<readonly [z.ZodObject<{
|
|
16
|
+
uuid: z.ZodString;
|
|
17
|
+
alias: z.ZodString;
|
|
18
|
+
title: z.ZodString;
|
|
19
|
+
metaTitle: z.ZodString;
|
|
20
|
+
metaDescription: z.ZodString;
|
|
21
|
+
content: z.ZodString;
|
|
22
|
+
image: z.ZodString;
|
|
23
|
+
author: z.ZodString;
|
|
24
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
25
|
+
uuid: z.ZodString;
|
|
26
|
+
alias: z.ZodString;
|
|
27
|
+
title: z.ZodString;
|
|
28
|
+
order: z.ZodNumber;
|
|
29
|
+
status: z.ZodEnum<typeof import("../../schemas").BlogCategoryStatus>;
|
|
30
|
+
createdAt: z.ZodString;
|
|
31
|
+
updatedAt: z.ZodString;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
viewsCount: z.ZodNumber;
|
|
34
|
+
status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
|
|
35
|
+
createdAt: z.ZodString;
|
|
36
|
+
updatedAt: z.ZodString;
|
|
37
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
38
|
+
code: z.ZodString;
|
|
39
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
40
|
+
}, z.core.$strip>]>;
|
|
41
|
+
const PATH: "";
|
|
42
|
+
const URL: "/api/v1/admin/blog/posts/";
|
|
43
|
+
const METHOD = HttpMethod.POST;
|
|
44
|
+
type RequestType = z.infer<typeof Request>;
|
|
45
|
+
type ResponseType = z.infer<typeof Response>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminBlogCreatePostCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../../schemas");
|
|
6
|
+
const blog_admin_posts_routes_1 = require("../../routes/blog-admin-posts.routes");
|
|
7
|
+
const rest_api_1 = require("../../../../rest-api");
|
|
8
|
+
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
+
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
|
+
var AdminBlogCreatePostCommand;
|
|
11
|
+
(function (AdminBlogCreatePostCommand) {
|
|
12
|
+
// Request/Response
|
|
13
|
+
AdminBlogCreatePostCommand.Request = schemas_1.CreatePostRequestSchema;
|
|
14
|
+
AdminBlogCreatePostCommand.Response = zod_1.z.union([schemas_1.PostResponseSchema, common_schemas_1.ErrorResponseSchema]);
|
|
15
|
+
// Path/URL/Method
|
|
16
|
+
AdminBlogCreatePostCommand.PATH = blog_admin_posts_routes_1.BLOG_ADMIN_POSTS_ROUTES.CREATE;
|
|
17
|
+
AdminBlogCreatePostCommand.URL = rest_api_1.REST_API.V1.BLOG.ADMIN.POSTS.CREATE;
|
|
18
|
+
AdminBlogCreatePostCommand.METHOD = http_method_1.HttpMethod.POST;
|
|
19
|
+
})(AdminBlogCreatePostCommand || (exports.AdminBlogCreatePostCommand = AdminBlogCreatePostCommand = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../../shared/http-method';
|
|
3
|
+
export declare namespace AdminBlogDeleteCategoryCommand {
|
|
4
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
const Response: z.ZodUnion<readonly [z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
6
|
+
code: z.ZodString;
|
|
7
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
8
|
+
}, z.core.$strip>]>;
|
|
9
|
+
const PATH: ":uuid";
|
|
10
|
+
const URL: (uuid: string) => string;
|
|
11
|
+
const METHOD = HttpMethod.DELETE;
|
|
12
|
+
type RequestType = z.infer<typeof Request>;
|
|
13
|
+
type ResponseType = z.infer<typeof Response>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminBlogDeleteCategoryCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const blog_admin_categories_routes_1 = require("../../routes/blog-admin-categories.routes");
|
|
6
|
+
const rest_api_1 = require("../../../../rest-api");
|
|
7
|
+
const http_method_1 = require("../../../../shared/http-method");
|
|
8
|
+
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
9
|
+
var AdminBlogDeleteCategoryCommand;
|
|
10
|
+
(function (AdminBlogDeleteCategoryCommand) {
|
|
11
|
+
// Request/Response
|
|
12
|
+
AdminBlogDeleteCategoryCommand.Request = zod_1.z.object({});
|
|
13
|
+
AdminBlogDeleteCategoryCommand.Response = zod_1.z.union([common_schemas_1.EmptyResponseSchema, common_schemas_1.ErrorResponseSchema]);
|
|
14
|
+
// Path/URL/Method
|
|
15
|
+
AdminBlogDeleteCategoryCommand.PATH = blog_admin_categories_routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.DELETE;
|
|
16
|
+
AdminBlogDeleteCategoryCommand.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.CATEGORIES.DELETE(uuid);
|
|
17
|
+
AdminBlogDeleteCategoryCommand.METHOD = http_method_1.HttpMethod.DELETE;
|
|
18
|
+
})(AdminBlogDeleteCategoryCommand || (exports.AdminBlogDeleteCategoryCommand = AdminBlogDeleteCategoryCommand = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../../shared/http-method';
|
|
3
|
+
export declare namespace AdminBlogDeletePostCommand {
|
|
4
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
const Response: z.ZodUnion<readonly [z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
6
|
+
code: z.ZodString;
|
|
7
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
8
|
+
}, z.core.$strip>]>;
|
|
9
|
+
const PATH: ":uuid";
|
|
10
|
+
const URL: (uuid: string) => string;
|
|
11
|
+
const METHOD = HttpMethod.DELETE;
|
|
12
|
+
type RequestType = z.infer<typeof Request>;
|
|
13
|
+
type ResponseType = z.infer<typeof Response>;
|
|
14
|
+
}
|