@veruna/api-contracts 1.0.4 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +3 -5
- package/build/rest-api.js +6 -0
- package/build/shared/error-response.schema.js +22 -0
- package/build/shared/index.js +18 -0
- package/build/utils/index.js +17 -0
- package/build/utils/path-builder.js +46 -0
- package/build/v1/auth/commands/delete-session.command.js +10 -5
- package/build/v1/auth/commands/login.command.js +7 -5
- package/build/v1/auth/commands/logout-all.command.js +10 -5
- package/build/v1/auth/commands/logout.command.js +10 -5
- package/build/v1/auth/commands/signup.command.js +7 -5
- package/build/v1/auth/index.js +2 -0
- package/build/v1/auth/queries/get-sessions.query.js +8 -5
- package/build/v1/blog/admin/commands/create-category.command.js +1 -5
- package/build/v1/blog/admin/commands/create-post.command.js +1 -5
- package/build/v1/blog/admin/commands/delete-category.command.js +1 -3
- package/build/v1/blog/admin/commands/delete-post.command.js +1 -3
- package/build/v1/blog/admin/commands/update-category.command.js +1 -5
- package/build/v1/blog/admin/commands/update-post.command.js +1 -5
- package/build/v1/blog/admin/queries/get-categories.query.js +1 -4
- package/build/v1/blog/admin/queries/get-category.query.js +1 -4
- package/build/v1/blog/admin/queries/get-post.query.js +1 -4
- package/build/v1/blog/admin/queries/get-posts.query.js +3 -6
- package/build/v1/blog/index.js +2 -0
- package/build/v1/blog/public/queries/get-categories.query.js +1 -4
- package/build/v1/blog/public/queries/get-post-by-alias.query.js +1 -4
- package/build/v1/blog/public/queries/get-posts.query.js +3 -6
- package/build/v1/unregistered-users/commands/authenticate.command.js +5 -5
- package/build/v1/unregistered-users/controllers.js +7 -0
- package/build/v1/unregistered-users/routes/unreg-users.routes.js +9 -0
- package/build/v1/users/commands/change-password.command.js +8 -5
- package/build/v1/users/commands/delete-account.command.js +8 -5
- package/build/v1/users/commands/toggle-marketing-consent.command.js +8 -5
- package/build/v1/users/commands/update-profile.command.js +8 -5
- package/build/v1/users/index.js +2 -0
- package/build/v1/users/queries/get-current-user.query.js +7 -5
- package/package.json +2 -1
- package/build/index.d.ts +0 -6
- package/build/locales/en.d.ts +0 -31
- package/build/locales/index.d.ts +0 -66
- package/build/locales/ru.d.ts +0 -30
- package/build/rest-api.d.ts +0 -49
- package/build/shared/common-schemas.d.ts +0 -12
- package/build/shared/http-method.d.ts +0 -10
- package/build/shared/pagination.schema.d.ts +0 -35
- package/build/shared/regex.d.ts +0 -8
- package/build/v1/auth/auth.errors.d.ts +0 -12
- package/build/v1/auth/auth.paths.d.ts +0 -17
- package/build/v1/auth/auth.types.d.ts +0 -9
- package/build/v1/auth/commands/delete-session.command.d.ts +0 -13
- package/build/v1/auth/commands/index.d.ts +0 -5
- package/build/v1/auth/commands/login.command.d.ts +0 -34
- package/build/v1/auth/commands/logout-all.command.d.ts +0 -13
- package/build/v1/auth/commands/logout.command.d.ts +0 -13
- package/build/v1/auth/commands/signup.command.d.ts +0 -43
- package/build/v1/auth/controllers.d.ts +0 -4
- package/build/v1/auth/index.d.ts +0 -6
- package/build/v1/auth/queries/get-sessions.query.d.ts +0 -22
- package/build/v1/auth/queries/index.d.ts +0 -1
- package/build/v1/auth/routes/auth.routes.d.ts +0 -12
- package/build/v1/auth/schemas/auth-response.schema.d.ts +0 -36
- package/build/v1/auth/schemas/index.d.ts +0 -5
- package/build/v1/auth/schemas/login-request.schema.d.ts +0 -9
- package/build/v1/auth/schemas/session-response.schema.d.ts +0 -13
- package/build/v1/auth/schemas/signup-request.schema.d.ts +0 -28
- package/build/v1/auth/schemas/user-role.enum.d.ts +0 -7
- package/build/v1/blog/admin/commands/create-category.command.d.ts +0 -27
- package/build/v1/blog/admin/commands/create-post.command.d.ts +0 -46
- package/build/v1/blog/admin/commands/delete-category.command.d.ts +0 -14
- package/build/v1/blog/admin/commands/delete-post.command.d.ts +0 -14
- package/build/v1/blog/admin/commands/index.d.ts +0 -6
- package/build/v1/blog/admin/commands/update-category.command.d.ts +0 -27
- package/build/v1/blog/admin/commands/update-post.command.d.ts +0 -46
- package/build/v1/blog/admin/queries/get-categories.query.d.ts +0 -27
- package/build/v1/blog/admin/queries/get-category.query.d.ts +0 -22
- package/build/v1/blog/admin/queries/get-post.query.d.ts +0 -36
- package/build/v1/blog/admin/queries/get-posts.query.d.ts +0 -84
- package/build/v1/blog/admin/queries/index.d.ts +0 -4
- package/build/v1/blog/blog.paths.d.ts +0 -36
- package/build/v1/blog/blog.types.d.ts +0 -12
- package/build/v1/blog/controllers.d.ts +0 -7
- package/build/v1/blog/index.d.ts +0 -6
- package/build/v1/blog/public/queries/get-categories.query.d.ts +0 -24
- package/build/v1/blog/public/queries/get-post-by-alias.query.d.ts +0 -36
- package/build/v1/blog/public/queries/get-posts.query.d.ts +0 -83
- package/build/v1/blog/public/queries/index.d.ts +0 -3
- package/build/v1/blog/routes/blog-admin-categories.routes.d.ts +0 -11
- package/build/v1/blog/routes/blog-admin-posts.routes.d.ts +0 -10
- package/build/v1/blog/routes/blog-public.routes.d.ts +0 -10
- package/build/v1/blog/routes/index.d.ts +0 -3
- package/build/v1/blog/schemas/blog-category-status.enum.d.ts +0 -8
- package/build/v1/blog/schemas/blog-post-status.enum.d.ts +0 -8
- package/build/v1/blog/schemas/category-response.schema.d.ts +0 -14
- package/build/v1/blog/schemas/create-category-request.schema.d.ts +0 -8
- package/build/v1/blog/schemas/create-post-request.schema.d.ts +0 -13
- package/build/v1/blog/schemas/get-posts-query.schema.d.ts +0 -13
- package/build/v1/blog/schemas/index.d.ts +0 -9
- package/build/v1/blog/schemas/post-response.schema.d.ts +0 -28
- package/build/v1/blog/schemas/update-category-request.schema.d.ts +0 -8
- package/build/v1/blog/schemas/update-post-request.schema.d.ts +0 -13
- package/build/v1/index.d.ts +0 -2
- package/build/v1/unregistered-users/commands/authenticate.command.d.ts +0 -20
- package/build/v1/unregistered-users/commands/index.d.ts +0 -1
- package/build/v1/unregistered-users/index.d.ts +0 -5
- package/build/v1/unregistered-users/schemas/authenticate-request.schema.d.ts +0 -7
- package/build/v1/unregistered-users/schemas/authenticate-response.schema.d.ts +0 -11
- package/build/v1/unregistered-users/schemas/index.d.ts +0 -3
- package/build/v1/unregistered-users/schemas/unreg-user-status.enum.d.ts +0 -8
- package/build/v1/unregistered-users/unregistered-users.errors.d.ts +0 -15
- package/build/v1/unregistered-users/unregistered-users.paths.d.ts +0 -15
- package/build/v1/unregistered-users/unregistered-users.types.d.ts +0 -9
- package/build/v1/users/commands/change-password.command.d.ts +0 -17
- package/build/v1/users/commands/delete-account.command.d.ts +0 -13
- package/build/v1/users/commands/index.d.ts +0 -4
- package/build/v1/users/commands/toggle-marketing-consent.command.d.ts +0 -15
- package/build/v1/users/commands/update-profile.command.d.ts +0 -15
- package/build/v1/users/controllers.d.ts +0 -4
- package/build/v1/users/index.d.ts +0 -5
- package/build/v1/users/queries/get-current-user.query.d.ts +0 -20
- package/build/v1/users/queries/index.d.ts +0 -1
- package/build/v1/users/routes/users.routes.d.ts +0 -9
- package/build/v1/users/schemas/change-password-request.schema.d.ts +0 -10
- package/build/v1/users/schemas/delete-account-request.schema.d.ts +0 -5
- package/build/v1/users/schemas/index.d.ts +0 -6
- package/build/v1/users/schemas/response-unions.schema.d.ts +0 -31
- package/build/v1/users/schemas/toggle-marketing-consent-request.schema.d.ts +0 -7
- package/build/v1/users/schemas/update-profile-request.schema.d.ts +0 -8
- package/build/v1/users/schemas/user-response.schema.d.ts +0 -12
- package/build/v1/users/users.paths.d.ts +0 -11
- package/build/v1/users/users.types.d.ts +0 -11
package/build/index.js
CHANGED
|
@@ -15,9 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
// Export all contracts
|
|
18
|
-
__exportStar(require("./shared
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./v1/auth"), exports);
|
|
21
|
-
__exportStar(require("./v1/users"), exports);
|
|
22
|
-
__exportStar(require("./v1/unregistered-users"), exports);
|
|
18
|
+
__exportStar(require("./shared"), exports);
|
|
19
|
+
__exportStar(require("./v1"), exports);
|
|
23
20
|
__exportStar(require("./locales"), exports);
|
|
21
|
+
__exportStar(require("./utils"), exports);
|
package/build/rest-api.js
CHANGED
|
@@ -11,6 +11,8 @@ const controllers_2 = require("./v1/auth/controllers");
|
|
|
11
11
|
const auth_routes_1 = require("./v1/auth/routes/auth.routes");
|
|
12
12
|
const controllers_3 = require("./v1/users/controllers");
|
|
13
13
|
const users_routes_1 = require("./v1/users/routes/users.routes");
|
|
14
|
+
const controllers_4 = require("./v1/unregistered-users/controllers");
|
|
15
|
+
const unreg_users_routes_1 = require("./v1/unregistered-users/routes/unreg-users.routes");
|
|
14
16
|
exports.ROOT = '/api';
|
|
15
17
|
exports.REST_API = {
|
|
16
18
|
V1: {
|
|
@@ -29,6 +31,10 @@ exports.REST_API = {
|
|
|
29
31
|
ME_MARKETING_CONSENT: `${exports.ROOT}/${controllers_3.USERS_CONTROLLER}/${users_routes_1.USERS_ROUTES.ME_MARKETING_CONSENT}`,
|
|
30
32
|
ME_PASSWORD: `${exports.ROOT}/${controllers_3.USERS_CONTROLLER}/${users_routes_1.USERS_ROUTES.ME_PASSWORD}`,
|
|
31
33
|
},
|
|
34
|
+
// Unregistered Users
|
|
35
|
+
UNREG: {
|
|
36
|
+
AUTHENTICATE: `${exports.ROOT}/${controllers_4.UNREG_USERS_CONTROLLER}/${unreg_users_routes_1.UNREG_USERS_ROUTES.AUTHENTICATE}`,
|
|
37
|
+
},
|
|
32
38
|
// Blog module
|
|
33
39
|
BLOG: {
|
|
34
40
|
ADMIN: {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValidationErrorResponseSchema = exports.ErrorResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Base error response schema
|
|
7
|
+
*/
|
|
8
|
+
exports.ErrorResponseSchema = zod_1.z.object({
|
|
9
|
+
statusCode: zod_1.z.number(),
|
|
10
|
+
message: zod_1.z.string(),
|
|
11
|
+
error: zod_1.z.string(),
|
|
12
|
+
code: zod_1.z.string().optional(),
|
|
13
|
+
details: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
14
|
+
timestamp: zod_1.z.string(),
|
|
15
|
+
});
|
|
16
|
+
/**
|
|
17
|
+
* Validation error response schema
|
|
18
|
+
*/
|
|
19
|
+
exports.ValidationErrorResponseSchema = exports.ErrorResponseSchema.extend({
|
|
20
|
+
code: zod_1.z.literal('VALIDATION_ERROR'),
|
|
21
|
+
details: zod_1.z.record(zod_1.z.string(), zod_1.z.array(zod_1.z.string())),
|
|
22
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./error-response.schema"), exports);
|
|
18
|
+
__exportStar(require("./pagination.schema"), exports);
|
|
@@ -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("./path-builder"), exports);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildPath = buildPath;
|
|
4
|
+
exports.buildUrl = buildUrl;
|
|
5
|
+
exports.buildFullUrl = buildFullUrl;
|
|
6
|
+
/**
|
|
7
|
+
* Build URL path with parameters
|
|
8
|
+
* @example
|
|
9
|
+
* buildPath('/users/:id', { id: '123' }) // '/users/123'
|
|
10
|
+
* buildPath('/users/:id/posts/:postId', { id: '1', postId: '2' }) // '/users/1/posts/2'
|
|
11
|
+
*/
|
|
12
|
+
function buildPath(pattern, params) {
|
|
13
|
+
if (!params) {
|
|
14
|
+
return pattern;
|
|
15
|
+
}
|
|
16
|
+
let path = pattern;
|
|
17
|
+
for (const [key, value] of Object.entries(params)) {
|
|
18
|
+
path = path.replace(`:${key}`, String(value));
|
|
19
|
+
}
|
|
20
|
+
return path;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Build URL with query parameters
|
|
24
|
+
* @example
|
|
25
|
+
* buildUrl('/users', { page: 1, limit: 10 }) // '/users?page=1&limit=10'
|
|
26
|
+
*/
|
|
27
|
+
function buildUrl(path, queryParams) {
|
|
28
|
+
if (!queryParams || Object.keys(queryParams).length === 0) {
|
|
29
|
+
return path;
|
|
30
|
+
}
|
|
31
|
+
const query = Object.entries(queryParams)
|
|
32
|
+
.filter(([_, value]) => value !== undefined && value !== null)
|
|
33
|
+
.map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`)
|
|
34
|
+
.join('&');
|
|
35
|
+
return query ? `${path}?${query}` : path;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Build full URL with path params and query params
|
|
39
|
+
* @example
|
|
40
|
+
* buildFullUrl('/users/:id', { id: '123' }, { include: 'posts' })
|
|
41
|
+
* // '/users/123?include=posts'
|
|
42
|
+
*/
|
|
43
|
+
function buildFullUrl(pattern, pathParams, queryParams) {
|
|
44
|
+
const path = buildPath(pattern, pathParams);
|
|
45
|
+
return buildUrl(path, queryParams);
|
|
46
|
+
}
|
|
@@ -2,13 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AuthDeleteSessionCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
5
|
+
const auth_routes_1 = require("../routes/auth.routes");
|
|
6
|
+
const rest_api_1 = require("../../../rest-api");
|
|
6
7
|
const http_method_1 = require("../../../shared/http-method");
|
|
7
|
-
const common_schemas_1 = require("../../../shared/common-schemas");
|
|
8
8
|
var AuthDeleteSessionCommand;
|
|
9
9
|
(function (AuthDeleteSessionCommand) {
|
|
10
|
-
|
|
11
|
-
AuthDeleteSessionCommand.
|
|
12
|
-
AuthDeleteSessionCommand.
|
|
10
|
+
// Request/Response
|
|
11
|
+
AuthDeleteSessionCommand.Request = zod_1.z.object({});
|
|
12
|
+
AuthDeleteSessionCommand.Response = zod_1.z.object({
|
|
13
|
+
sessionId: zod_1.z.string().uuid(),
|
|
14
|
+
});
|
|
15
|
+
// Path/URL/Method
|
|
16
|
+
AuthDeleteSessionCommand.PATH = auth_routes_1.AUTH_ROUTES.SESSION_BY_ID;
|
|
17
|
+
AuthDeleteSessionCommand.URL = (id) => rest_api_1.REST_API.V1.AUTH.SESSION_BY_ID(id);
|
|
13
18
|
AuthDeleteSessionCommand.METHOD = http_method_1.HttpMethod.DELETE;
|
|
14
19
|
})(AuthDeleteSessionCommand || (exports.AuthDeleteSessionCommand = AuthDeleteSessionCommand = {}));
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AuthLoginCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
4
|
const login_request_schema_1 = require("../schemas/login-request.schema");
|
|
6
5
|
const auth_response_schema_1 = require("../schemas/auth-response.schema");
|
|
7
|
-
const
|
|
6
|
+
const auth_routes_1 = require("../routes/auth.routes");
|
|
7
|
+
const rest_api_1 = require("../../../rest-api");
|
|
8
8
|
const http_method_1 = require("../../../shared/http-method");
|
|
9
|
-
const common_schemas_1 = require("../../../shared/common-schemas");
|
|
10
9
|
var AuthLoginCommand;
|
|
11
10
|
(function (AuthLoginCommand) {
|
|
11
|
+
// Request/Response
|
|
12
12
|
AuthLoginCommand.Request = login_request_schema_1.LoginRequestSchema;
|
|
13
|
-
AuthLoginCommand.Response =
|
|
14
|
-
|
|
13
|
+
AuthLoginCommand.Response = auth_response_schema_1.AuthResponseSchema;
|
|
14
|
+
// Path/URL/Method
|
|
15
|
+
AuthLoginCommand.PATH = auth_routes_1.AUTH_ROUTES.LOGIN;
|
|
16
|
+
AuthLoginCommand.URL = rest_api_1.REST_API.V1.AUTH.LOGIN;
|
|
15
17
|
AuthLoginCommand.METHOD = http_method_1.HttpMethod.POST;
|
|
16
18
|
})(AuthLoginCommand || (exports.AuthLoginCommand = AuthLoginCommand = {}));
|
|
@@ -2,13 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AuthLogoutAllCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
5
|
+
const auth_routes_1 = require("../routes/auth.routes");
|
|
6
|
+
const rest_api_1 = require("../../../rest-api");
|
|
6
7
|
const http_method_1 = require("../../../shared/http-method");
|
|
7
|
-
const common_schemas_1 = require("../../../shared/common-schemas");
|
|
8
8
|
var AuthLogoutAllCommand;
|
|
9
9
|
(function (AuthLogoutAllCommand) {
|
|
10
|
-
|
|
11
|
-
AuthLogoutAllCommand.
|
|
12
|
-
AuthLogoutAllCommand.
|
|
10
|
+
// Request/Response
|
|
11
|
+
AuthLogoutAllCommand.Request = zod_1.z.object({});
|
|
12
|
+
AuthLogoutAllCommand.Response = zod_1.z.object({
|
|
13
|
+
sessionIds: zod_1.z.array(zod_1.z.string().uuid()),
|
|
14
|
+
});
|
|
15
|
+
// Path/URL/Method
|
|
16
|
+
AuthLogoutAllCommand.PATH = auth_routes_1.AUTH_ROUTES.LOGOUT_ALL;
|
|
17
|
+
AuthLogoutAllCommand.URL = rest_api_1.REST_API.V1.AUTH.LOGOUT_ALL;
|
|
13
18
|
AuthLogoutAllCommand.METHOD = http_method_1.HttpMethod.POST;
|
|
14
19
|
})(AuthLogoutAllCommand || (exports.AuthLogoutAllCommand = AuthLogoutAllCommand = {}));
|
|
@@ -2,13 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AuthLogoutCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
5
|
+
const auth_routes_1 = require("../routes/auth.routes");
|
|
6
|
+
const rest_api_1 = require("../../../rest-api");
|
|
6
7
|
const http_method_1 = require("../../../shared/http-method");
|
|
7
|
-
const common_schemas_1 = require("../../../shared/common-schemas");
|
|
8
8
|
var AuthLogoutCommand;
|
|
9
9
|
(function (AuthLogoutCommand) {
|
|
10
|
-
|
|
11
|
-
AuthLogoutCommand.
|
|
12
|
-
AuthLogoutCommand.
|
|
10
|
+
// Request/Response
|
|
11
|
+
AuthLogoutCommand.Request = zod_1.z.object({});
|
|
12
|
+
AuthLogoutCommand.Response = zod_1.z.object({
|
|
13
|
+
sessionId: zod_1.z.string().uuid(),
|
|
14
|
+
});
|
|
15
|
+
// Path/URL/Method
|
|
16
|
+
AuthLogoutCommand.PATH = auth_routes_1.AUTH_ROUTES.LOGOUT;
|
|
17
|
+
AuthLogoutCommand.URL = rest_api_1.REST_API.V1.AUTH.LOGOUT;
|
|
13
18
|
AuthLogoutCommand.METHOD = http_method_1.HttpMethod.POST;
|
|
14
19
|
})(AuthLogoutCommand || (exports.AuthLogoutCommand = AuthLogoutCommand = {}));
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AuthSignupCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
4
|
const signup_request_schema_1 = require("../schemas/signup-request.schema");
|
|
6
5
|
const auth_response_schema_1 = require("../schemas/auth-response.schema");
|
|
7
|
-
const
|
|
6
|
+
const auth_routes_1 = require("../routes/auth.routes");
|
|
7
|
+
const rest_api_1 = require("../../../rest-api");
|
|
8
8
|
const http_method_1 = require("../../../shared/http-method");
|
|
9
|
-
const common_schemas_1 = require("../../../shared/common-schemas");
|
|
10
9
|
var AuthSignupCommand;
|
|
11
10
|
(function (AuthSignupCommand) {
|
|
11
|
+
// Request/Response
|
|
12
12
|
AuthSignupCommand.Request = signup_request_schema_1.SignUpRequestSchema;
|
|
13
|
-
AuthSignupCommand.Response =
|
|
14
|
-
|
|
13
|
+
AuthSignupCommand.Response = auth_response_schema_1.AuthResponseSchema;
|
|
14
|
+
// Path/URL/Method
|
|
15
|
+
AuthSignupCommand.PATH = auth_routes_1.AUTH_ROUTES.SIGNUP;
|
|
16
|
+
AuthSignupCommand.URL = rest_api_1.REST_API.V1.AUTH.SIGNUP;
|
|
15
17
|
AuthSignupCommand.METHOD = http_method_1.HttpMethod.POST;
|
|
16
18
|
})(AuthSignupCommand || (exports.AuthSignupCommand = AuthSignupCommand = {}));
|
package/build/v1/auth/index.js
CHANGED
|
@@ -18,5 +18,7 @@ __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("./controllers"), exports);
|
|
22
|
+
__exportStar(require("./routes/auth.routes"), exports);
|
|
21
23
|
__exportStar(require("./commands"), exports);
|
|
22
24
|
__exportStar(require("./queries"), exports);
|
|
@@ -3,13 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AuthGetSessionsQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const auth_response_schema_1 = require("../schemas/auth-response.schema");
|
|
6
|
-
const
|
|
6
|
+
const auth_routes_1 = require("../routes/auth.routes");
|
|
7
|
+
const rest_api_1 = require("../../../rest-api");
|
|
7
8
|
const http_method_1 = require("../../../shared/http-method");
|
|
8
|
-
const common_schemas_1 = require("../../../shared/common-schemas");
|
|
9
9
|
var AuthGetSessionsQuery;
|
|
10
10
|
(function (AuthGetSessionsQuery) {
|
|
11
|
-
|
|
12
|
-
AuthGetSessionsQuery.
|
|
13
|
-
AuthGetSessionsQuery.
|
|
11
|
+
// Request/Response
|
|
12
|
+
AuthGetSessionsQuery.Request = zod_1.z.object({});
|
|
13
|
+
AuthGetSessionsQuery.Response = auth_response_schema_1.SessionsListResponseSchema;
|
|
14
|
+
// Path/URL/Method
|
|
15
|
+
AuthGetSessionsQuery.PATH = auth_routes_1.AUTH_ROUTES.SESSIONS;
|
|
16
|
+
AuthGetSessionsQuery.URL = rest_api_1.REST_API.V1.AUTH.SESSIONS;
|
|
14
17
|
AuthGetSessionsQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
15
18
|
})(AuthGetSessionsQuery || (exports.AuthGetSessionsQuery = AuthGetSessionsQuery = {}));
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AdminBlogCreateCategoryCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
4
|
const schemas_1 = require("../../schemas");
|
|
6
5
|
const blog_admin_categories_routes_1 = require("../../routes/blog-admin-categories.routes");
|
|
7
6
|
const rest_api_1 = require("../../../../rest-api");
|
|
8
7
|
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
-
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
8
|
var AdminBlogCreateCategoryCommand;
|
|
11
9
|
(function (AdminBlogCreateCategoryCommand) {
|
|
12
|
-
// Request/Response
|
|
13
10
|
AdminBlogCreateCategoryCommand.Request = schemas_1.CreateCategoryRequestSchema;
|
|
14
|
-
AdminBlogCreateCategoryCommand.Response =
|
|
15
|
-
// Path/URL/Method
|
|
11
|
+
AdminBlogCreateCategoryCommand.Response = schemas_1.CategoryResponseSchema;
|
|
16
12
|
AdminBlogCreateCategoryCommand.PATH = blog_admin_categories_routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.CREATE;
|
|
17
13
|
AdminBlogCreateCategoryCommand.URL = rest_api_1.REST_API.V1.BLOG.ADMIN.CATEGORIES.CREATE;
|
|
18
14
|
AdminBlogCreateCategoryCommand.METHOD = http_method_1.HttpMethod.POST;
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AdminBlogCreatePostCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
4
|
const schemas_1 = require("../../schemas");
|
|
6
5
|
const blog_admin_posts_routes_1 = require("../../routes/blog-admin-posts.routes");
|
|
7
6
|
const rest_api_1 = require("../../../../rest-api");
|
|
8
7
|
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
-
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
8
|
var AdminBlogCreatePostCommand;
|
|
11
9
|
(function (AdminBlogCreatePostCommand) {
|
|
12
|
-
// Request/Response
|
|
13
10
|
AdminBlogCreatePostCommand.Request = schemas_1.CreatePostRequestSchema;
|
|
14
|
-
AdminBlogCreatePostCommand.Response =
|
|
15
|
-
// Path/URL/Method
|
|
11
|
+
AdminBlogCreatePostCommand.Response = schemas_1.PostResponseSchema;
|
|
16
12
|
AdminBlogCreatePostCommand.PATH = blog_admin_posts_routes_1.BLOG_ADMIN_POSTS_ROUTES.CREATE;
|
|
17
13
|
AdminBlogCreatePostCommand.URL = rest_api_1.REST_API.V1.BLOG.ADMIN.POSTS.CREATE;
|
|
18
14
|
AdminBlogCreatePostCommand.METHOD = http_method_1.HttpMethod.POST;
|
|
@@ -8,10 +8,8 @@ const http_method_1 = require("../../../../shared/http-method");
|
|
|
8
8
|
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
9
9
|
var AdminBlogDeleteCategoryCommand;
|
|
10
10
|
(function (AdminBlogDeleteCategoryCommand) {
|
|
11
|
-
// Request/Response
|
|
12
11
|
AdminBlogDeleteCategoryCommand.Request = zod_1.z.object({});
|
|
13
|
-
AdminBlogDeleteCategoryCommand.Response =
|
|
14
|
-
// Path/URL/Method
|
|
12
|
+
AdminBlogDeleteCategoryCommand.Response = common_schemas_1.EmptyResponseSchema;
|
|
15
13
|
AdminBlogDeleteCategoryCommand.PATH = blog_admin_categories_routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.DELETE;
|
|
16
14
|
AdminBlogDeleteCategoryCommand.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.CATEGORIES.DELETE(uuid);
|
|
17
15
|
AdminBlogDeleteCategoryCommand.METHOD = http_method_1.HttpMethod.DELETE;
|
|
@@ -8,10 +8,8 @@ const http_method_1 = require("../../../../shared/http-method");
|
|
|
8
8
|
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
9
9
|
var AdminBlogDeletePostCommand;
|
|
10
10
|
(function (AdminBlogDeletePostCommand) {
|
|
11
|
-
// Request/Response
|
|
12
11
|
AdminBlogDeletePostCommand.Request = zod_1.z.object({});
|
|
13
|
-
AdminBlogDeletePostCommand.Response =
|
|
14
|
-
// Path/URL/Method
|
|
12
|
+
AdminBlogDeletePostCommand.Response = common_schemas_1.EmptyResponseSchema;
|
|
15
13
|
AdminBlogDeletePostCommand.PATH = blog_admin_posts_routes_1.BLOG_ADMIN_POSTS_ROUTES.DELETE;
|
|
16
14
|
AdminBlogDeletePostCommand.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.POSTS.DELETE(uuid);
|
|
17
15
|
AdminBlogDeletePostCommand.METHOD = http_method_1.HttpMethod.DELETE;
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AdminBlogUpdateCategoryCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
4
|
const schemas_1 = require("../../schemas");
|
|
6
5
|
const blog_admin_categories_routes_1 = require("../../routes/blog-admin-categories.routes");
|
|
7
6
|
const rest_api_1 = require("../../../../rest-api");
|
|
8
7
|
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
-
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
8
|
var AdminBlogUpdateCategoryCommand;
|
|
11
9
|
(function (AdminBlogUpdateCategoryCommand) {
|
|
12
|
-
// Request/Response
|
|
13
10
|
AdminBlogUpdateCategoryCommand.Request = schemas_1.UpdateCategoryRequestSchema;
|
|
14
|
-
AdminBlogUpdateCategoryCommand.Response =
|
|
15
|
-
// Path/URL/Method
|
|
11
|
+
AdminBlogUpdateCategoryCommand.Response = schemas_1.CategoryResponseSchema;
|
|
16
12
|
AdminBlogUpdateCategoryCommand.PATH = blog_admin_categories_routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.UPDATE;
|
|
17
13
|
AdminBlogUpdateCategoryCommand.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.CATEGORIES.UPDATE(uuid);
|
|
18
14
|
AdminBlogUpdateCategoryCommand.METHOD = http_method_1.HttpMethod.PATCH;
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AdminBlogUpdatePostCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
4
|
const schemas_1 = require("../../schemas");
|
|
6
5
|
const blog_admin_posts_routes_1 = require("../../routes/blog-admin-posts.routes");
|
|
7
6
|
const rest_api_1 = require("../../../../rest-api");
|
|
8
7
|
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
-
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
8
|
var AdminBlogUpdatePostCommand;
|
|
11
9
|
(function (AdminBlogUpdatePostCommand) {
|
|
12
|
-
// Request/Response
|
|
13
10
|
AdminBlogUpdatePostCommand.Request = schemas_1.UpdatePostRequestSchema;
|
|
14
|
-
AdminBlogUpdatePostCommand.Response =
|
|
15
|
-
// Path/URL/Method
|
|
11
|
+
AdminBlogUpdatePostCommand.Response = schemas_1.PostResponseSchema;
|
|
16
12
|
AdminBlogUpdatePostCommand.PATH = blog_admin_posts_routes_1.BLOG_ADMIN_POSTS_ROUTES.UPDATE;
|
|
17
13
|
AdminBlogUpdatePostCommand.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.POSTS.UPDATE(uuid);
|
|
18
14
|
AdminBlogUpdatePostCommand.METHOD = http_method_1.HttpMethod.PATCH;
|
|
@@ -6,7 +6,6 @@ const schemas_1 = require("../../schemas");
|
|
|
6
6
|
const blog_admin_categories_routes_1 = require("../../routes/blog-admin-categories.routes");
|
|
7
7
|
const rest_api_1 = require("../../../../rest-api");
|
|
8
8
|
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
-
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
9
|
const CategoriesListAdminResponseSchema = zod_1.z.object({
|
|
11
10
|
categories: zod_1.z.array(schemas_1.CategoryResponseSchema),
|
|
12
11
|
});
|
|
@@ -15,10 +14,8 @@ const GetCategoriesQueryAdminSchema = zod_1.z.object({
|
|
|
15
14
|
});
|
|
16
15
|
var AdminBlogGetCategoriesQuery;
|
|
17
16
|
(function (AdminBlogGetCategoriesQuery) {
|
|
18
|
-
// Request/Response
|
|
19
17
|
AdminBlogGetCategoriesQuery.Request = GetCategoriesQueryAdminSchema;
|
|
20
|
-
AdminBlogGetCategoriesQuery.Response =
|
|
21
|
-
// Path/URL/Method
|
|
18
|
+
AdminBlogGetCategoriesQuery.Response = CategoriesListAdminResponseSchema;
|
|
22
19
|
AdminBlogGetCategoriesQuery.PATH = blog_admin_categories_routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.GET_ALL;
|
|
23
20
|
AdminBlogGetCategoriesQuery.URL = rest_api_1.REST_API.V1.BLOG.ADMIN.CATEGORIES.GET_ALL;
|
|
24
21
|
AdminBlogGetCategoriesQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
@@ -6,13 +6,10 @@ const schemas_1 = require("../../schemas");
|
|
|
6
6
|
const blog_admin_categories_routes_1 = require("../../routes/blog-admin-categories.routes");
|
|
7
7
|
const rest_api_1 = require("../../../../rest-api");
|
|
8
8
|
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
-
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
9
|
var AdminBlogGetCategoryQuery;
|
|
11
10
|
(function (AdminBlogGetCategoryQuery) {
|
|
12
|
-
// Request/Response
|
|
13
11
|
AdminBlogGetCategoryQuery.Request = zod_1.z.object({});
|
|
14
|
-
AdminBlogGetCategoryQuery.Response =
|
|
15
|
-
// Path/URL/Method
|
|
12
|
+
AdminBlogGetCategoryQuery.Response = schemas_1.CategoryResponseSchema;
|
|
16
13
|
AdminBlogGetCategoryQuery.PATH = blog_admin_categories_routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.GET_BY_UUID;
|
|
17
14
|
AdminBlogGetCategoryQuery.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.CATEGORIES.GET_BY_UUID(uuid);
|
|
18
15
|
AdminBlogGetCategoryQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
@@ -6,13 +6,10 @@ const schemas_1 = require("../../schemas");
|
|
|
6
6
|
const blog_admin_posts_routes_1 = require("../../routes/blog-admin-posts.routes");
|
|
7
7
|
const rest_api_1 = require("../../../../rest-api");
|
|
8
8
|
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
-
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
9
|
var AdminBlogGetPostQuery;
|
|
11
10
|
(function (AdminBlogGetPostQuery) {
|
|
12
|
-
// Request/Response
|
|
13
11
|
AdminBlogGetPostQuery.Request = zod_1.z.object({});
|
|
14
|
-
AdminBlogGetPostQuery.Response =
|
|
15
|
-
// Path/URL/Method
|
|
12
|
+
AdminBlogGetPostQuery.Response = schemas_1.PostResponseSchema;
|
|
16
13
|
AdminBlogGetPostQuery.PATH = blog_admin_posts_routes_1.BLOG_ADMIN_POSTS_ROUTES.GET_BY_UUID;
|
|
17
14
|
AdminBlogGetPostQuery.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.POSTS.GET_BY_UUID(uuid);
|
|
18
15
|
AdminBlogGetPostQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AdminBlogGetPostsQuery =
|
|
3
|
+
exports.AdminBlogGetPostsQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const schemas_1 = require("../../schemas");
|
|
6
6
|
const pagination_schema_1 = require("../../../../shared/pagination.schema");
|
|
7
7
|
const blog_admin_posts_routes_1 = require("../../routes/blog-admin-posts.routes");
|
|
8
8
|
const rest_api_1 = require("../../../../rest-api");
|
|
9
9
|
const http_method_1 = require("../../../../shared/http-method");
|
|
10
|
-
const
|
|
11
|
-
exports.PostsListAdminResponseSchema = zod_1.z.object({
|
|
10
|
+
const PostsListAdminResponseSchema = zod_1.z.object({
|
|
12
11
|
data: zod_1.z.array(schemas_1.PostResponseSchema),
|
|
13
12
|
meta: pagination_schema_1.PaginationMetaSchema,
|
|
14
13
|
});
|
|
15
14
|
var AdminBlogGetPostsQuery;
|
|
16
15
|
(function (AdminBlogGetPostsQuery) {
|
|
17
|
-
// Request/Response
|
|
18
16
|
AdminBlogGetPostsQuery.Request = schemas_1.GetPostsQueryAdminSchema;
|
|
19
|
-
AdminBlogGetPostsQuery.Response =
|
|
20
|
-
// Path/URL/Method
|
|
17
|
+
AdminBlogGetPostsQuery.Response = PostsListAdminResponseSchema;
|
|
21
18
|
AdminBlogGetPostsQuery.PATH = blog_admin_posts_routes_1.BLOG_ADMIN_POSTS_ROUTES.GET_ALL;
|
|
22
19
|
AdminBlogGetPostsQuery.URL = rest_api_1.REST_API.V1.BLOG.ADMIN.POSTS.GET_ALL;
|
|
23
20
|
AdminBlogGetPostsQuery.METHOD = http_method_1.HttpMethod.GET;
|
package/build/v1/blog/index.js
CHANGED
|
@@ -17,6 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./schemas"), exports);
|
|
18
18
|
__exportStar(require("./blog.types"), exports);
|
|
19
19
|
__exportStar(require("./blog.paths"), exports);
|
|
20
|
+
__exportStar(require("./controllers"), exports);
|
|
21
|
+
__exportStar(require("./routes"), exports);
|
|
20
22
|
__exportStar(require("./admin/commands"), exports);
|
|
21
23
|
__exportStar(require("./admin/queries"), exports);
|
|
22
24
|
__exportStar(require("./public/queries"), exports);
|
|
@@ -6,16 +6,13 @@ const schemas_1 = require("../../schemas");
|
|
|
6
6
|
const blog_public_routes_1 = require("../../routes/blog-public.routes");
|
|
7
7
|
const rest_api_1 = require("../../../../rest-api");
|
|
8
8
|
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
-
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
9
|
const CategoriesListPublicResponseSchema = zod_1.z.object({
|
|
11
10
|
categories: zod_1.z.array(schemas_1.CategoryResponseSchema),
|
|
12
11
|
});
|
|
13
12
|
var BlogGetCategoriesQuery;
|
|
14
13
|
(function (BlogGetCategoriesQuery) {
|
|
15
|
-
// Request/Response
|
|
16
14
|
BlogGetCategoriesQuery.Request = zod_1.z.object({});
|
|
17
|
-
BlogGetCategoriesQuery.Response =
|
|
18
|
-
// Path/URL/Method
|
|
15
|
+
BlogGetCategoriesQuery.Response = CategoriesListPublicResponseSchema;
|
|
19
16
|
BlogGetCategoriesQuery.PATH = blog_public_routes_1.BLOG_PUBLIC_CATEGORIES_ROUTES.GET_ALL;
|
|
20
17
|
BlogGetCategoriesQuery.URL = rest_api_1.REST_API.V1.BLOG.PUBLIC.CATEGORIES.GET_ALL;
|
|
21
18
|
BlogGetCategoriesQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
@@ -6,13 +6,10 @@ const schemas_1 = require("../../schemas");
|
|
|
6
6
|
const blog_public_routes_1 = require("../../routes/blog-public.routes");
|
|
7
7
|
const rest_api_1 = require("../../../../rest-api");
|
|
8
8
|
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
-
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
9
|
var BlogGetPostByAliasQuery;
|
|
11
10
|
(function (BlogGetPostByAliasQuery) {
|
|
12
|
-
// Request/Response
|
|
13
11
|
BlogGetPostByAliasQuery.Request = zod_1.z.object({});
|
|
14
|
-
BlogGetPostByAliasQuery.Response =
|
|
15
|
-
// Path/URL/Method
|
|
12
|
+
BlogGetPostByAliasQuery.Response = schemas_1.PostResponseSchema;
|
|
16
13
|
BlogGetPostByAliasQuery.PATH = blog_public_routes_1.BLOG_PUBLIC_POSTS_ROUTES.GET_BY_ALIAS;
|
|
17
14
|
BlogGetPostByAliasQuery.URL = (alias) => rest_api_1.REST_API.V1.BLOG.PUBLIC.POSTS.GET_BY_ALIAS(alias);
|
|
18
15
|
BlogGetPostByAliasQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BlogGetPostsQuery =
|
|
3
|
+
exports.BlogGetPostsQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const schemas_1 = require("../../schemas");
|
|
6
6
|
const pagination_schema_1 = require("../../../../shared/pagination.schema");
|
|
7
7
|
const blog_public_routes_1 = require("../../routes/blog-public.routes");
|
|
8
8
|
const rest_api_1 = require("../../../../rest-api");
|
|
9
9
|
const http_method_1 = require("../../../../shared/http-method");
|
|
10
|
-
const
|
|
11
|
-
exports.PostsListResponseSchema = zod_1.z.object({
|
|
10
|
+
const PostsListResponseSchema = zod_1.z.object({
|
|
12
11
|
data: zod_1.z.array(schemas_1.PostResponseSchema),
|
|
13
12
|
meta: pagination_schema_1.PaginationMetaSchema,
|
|
14
13
|
});
|
|
15
14
|
var BlogGetPostsQuery;
|
|
16
15
|
(function (BlogGetPostsQuery) {
|
|
17
|
-
// Request/Response
|
|
18
16
|
BlogGetPostsQuery.Request = schemas_1.GetPostsQueryPublicSchema;
|
|
19
|
-
BlogGetPostsQuery.Response =
|
|
20
|
-
// Path/URL/Method
|
|
17
|
+
BlogGetPostsQuery.Response = PostsListResponseSchema;
|
|
21
18
|
BlogGetPostsQuery.PATH = blog_public_routes_1.BLOG_PUBLIC_POSTS_ROUTES.GET_ALL;
|
|
22
19
|
BlogGetPostsQuery.URL = rest_api_1.REST_API.V1.BLOG.PUBLIC.POSTS.GET_ALL;
|
|
23
20
|
BlogGetPostsQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UnregAuthenticateCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
4
|
const schemas_1 = require("../schemas");
|
|
6
|
-
const
|
|
5
|
+
const unreg_users_routes_1 = require("../routes/unreg-users.routes");
|
|
6
|
+
const rest_api_1 = require("../../../rest-api");
|
|
7
7
|
const http_method_1 = require("../../../shared/http-method");
|
|
8
|
-
const common_schemas_1 = require("../../../shared/common-schemas");
|
|
9
8
|
var UnregAuthenticateCommand;
|
|
10
9
|
(function (UnregAuthenticateCommand) {
|
|
11
10
|
UnregAuthenticateCommand.Request = schemas_1.AuthenticateUnregUserRequestSchema;
|
|
12
|
-
UnregAuthenticateCommand.Response =
|
|
13
|
-
UnregAuthenticateCommand.
|
|
11
|
+
UnregAuthenticateCommand.Response = schemas_1.AuthenticateUnregUserResponseSchema;
|
|
12
|
+
UnregAuthenticateCommand.PATH = unreg_users_routes_1.UNREG_USERS_ROUTES.AUTHENTICATE;
|
|
13
|
+
UnregAuthenticateCommand.URL = rest_api_1.REST_API.V1.UNREG.AUTHENTICATE;
|
|
14
14
|
UnregAuthenticateCommand.METHOD = http_method_1.HttpMethod.PUT;
|
|
15
15
|
})(UnregAuthenticateCommand || (exports.UnregAuthenticateCommand = UnregAuthenticateCommand = {}));
|