@veruna/api-contracts 1.0.13 → 1.0.15
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 +1 -0
- package/build/controllers/index.js +4 -1
- package/build/controllers/seo-pages.controllers.d.ts +5 -0
- package/build/controllers/seo-pages.controllers.js +8 -0
- package/build/index.d.ts +3 -1
- package/build/index.js +3 -1
- package/build/locales/en.d.ts +5 -0
- package/build/locales/en.js +6 -0
- package/build/locales/index.d.ts +10 -0
- package/build/locales/ru.d.ts +5 -0
- package/build/locales/ru.js +6 -0
- package/build/rest-api.d.ts +12 -0
- package/build/rest-api.js +13 -0
- package/build/routes/index.d.ts +2 -0
- package/build/routes/index.js +5 -1
- package/build/routes/seo-pages-admin.routes.d.ts +10 -0
- package/build/routes/seo-pages-admin.routes.js +13 -0
- package/build/routes/seo-pages-public.routes.d.ts +6 -0
- package/build/routes/seo-pages-public.routes.js +9 -0
- package/build/shared/common.errors.d.ts +8 -0
- package/build/shared/common.errors.js +28 -0
- package/build/shared/device-type.enum.d.ts +11 -0
- package/build/shared/device-type.enum.js +15 -0
- package/build/shared/error-metadata.d.ts +9 -0
- package/build/shared/index.d.ts +4 -0
- package/build/shared/index.js +4 -0
- package/build/v1/auth/auth.errors.d.ts +4 -1
- package/build/v1/auth/auth.errors.js +30 -1
- package/build/v1/auth/commands/signin.command.d.ts +2 -0
- package/build/v1/auth/commands/signup.command.d.ts +2 -0
- package/build/v1/auth/commands/signup.command.js +4 -4
- package/build/v1/auth/index.d.ts +0 -2
- package/build/v1/auth/index.js +0 -2
- package/build/v1/auth/queries/get-sessions.query.d.ts +2 -0
- package/build/v1/auth/schemas/auth-response.schema.d.ts +4 -0
- package/build/v1/auth/schemas/session-response.schema.d.ts +3 -0
- package/build/v1/auth/schemas/session-response.schema.js +6 -4
- package/build/v1/blog/blog.errors.d.ts +18 -0
- package/build/v1/blog/blog.errors.js +84 -0
- package/build/v1/blog/index.d.ts +1 -2
- package/build/v1/blog/index.js +1 -2
- package/build/v1/blog/schemas/create-category-request.schema.js +3 -3
- package/build/v1/blog/schemas/create-post-request.schema.js +4 -4
- package/build/v1/email/email.errors.d.ts +15 -0
- package/build/v1/email/email.errors.js +63 -0
- package/build/v1/email/index.d.ts +1 -0
- package/build/v1/email/index.js +17 -0
- package/build/v1/index.d.ts +3 -0
- package/build/v1/index.js +3 -0
- package/build/v1/notifications/index.d.ts +2 -0
- package/build/v1/notifications/index.js +18 -0
- package/build/v1/notifications/notifications.errors.d.ts +26 -0
- package/build/v1/notifications/notifications.errors.js +101 -0
- package/build/v1/notifications/schemas/email-template.enum.d.ts +12 -0
- package/build/v1/notifications/schemas/email-template.enum.js +20 -0
- package/build/v1/notifications/schemas/index.d.ts +3 -0
- package/build/v1/notifications/schemas/index.js +19 -0
- package/build/v1/notifications/schemas/notification-status.enum.d.ts +11 -0
- package/build/v1/notifications/schemas/notification-status.enum.js +15 -0
- package/build/v1/notifications/schemas/notification-type.enum.d.ts +8 -0
- package/build/v1/notifications/schemas/notification-type.enum.js +14 -0
- package/build/v1/seo-pages/admin/commands/create-page.command.d.ts +29 -0
- package/build/v1/seo-pages/admin/commands/create-page.command.js +13 -0
- package/build/v1/seo-pages/admin/commands/delete-page.command.d.ts +12 -0
- package/build/v1/seo-pages/admin/commands/delete-page.command.js +13 -0
- package/build/v1/seo-pages/admin/commands/index.d.ts +6 -0
- package/build/v1/seo-pages/admin/commands/index.js +12 -0
- package/build/v1/seo-pages/admin/commands/update-page.command.d.ts +29 -0
- package/build/v1/seo-pages/admin/commands/update-page.command.js +13 -0
- package/build/v1/seo-pages/admin/queries/get-page.query.d.ts +21 -0
- package/build/v1/seo-pages/admin/queries/get-page.query.js +14 -0
- package/build/v1/seo-pages/admin/queries/get-pages.query.d.ts +34 -0
- package/build/v1/seo-pages/admin/queries/get-pages.query.js +19 -0
- package/build/v1/seo-pages/admin/queries/index.d.ts +5 -0
- package/build/v1/seo-pages/admin/queries/index.js +10 -0
- package/build/v1/seo-pages/index.d.ts +8 -0
- package/build/v1/seo-pages/index.js +32 -0
- package/build/v1/seo-pages/public/queries/get-page-by-alias.query.d.ts +21 -0
- package/build/v1/seo-pages/public/queries/get-page-by-alias.query.js +14 -0
- package/build/v1/seo-pages/public/queries/index.d.ts +4 -0
- package/build/v1/seo-pages/public/queries/index.js +8 -0
- package/build/v1/seo-pages/schemas/create-page-request.schema.d.ts +14 -0
- package/build/v1/seo-pages/schemas/create-page-request.schema.js +18 -0
- package/build/v1/seo-pages/schemas/index.d.ts +7 -0
- package/build/v1/seo-pages/schemas/index.js +14 -0
- package/build/v1/seo-pages/schemas/page-response.schema.d.ts +17 -0
- package/build/v1/seo-pages/schemas/page-response.schema.js +21 -0
- package/build/v1/seo-pages/schemas/page-type.enum.d.ts +8 -0
- package/build/v1/seo-pages/schemas/page-type.enum.js +12 -0
- package/build/v1/seo-pages/schemas/update-page-request.schema.d.ts +14 -0
- package/build/v1/seo-pages/schemas/update-page-request.schema.js +18 -0
- package/build/v1/seo-pages/seo-pages.errors.d.ts +11 -0
- package/build/v1/seo-pages/seo-pages.errors.js +43 -0
- package/build/v1/unregistered-users/index.d.ts +1 -5
- package/build/v1/unregistered-users/index.js +1 -9
- package/build/v1/unregistered-users/unregistered-users.errors.d.ts +8 -9
- package/build/v1/unregistered-users/unregistered-users.errors.js +18 -9
- package/build/v1/users/index.d.ts +1 -2
- package/build/v1/users/index.js +1 -2
- package/build/v1/users/users.errors.d.ts +18 -0
- package/build/v1/users/users.errors.js +51 -0
- package/package.json +1 -1
- package/build/v1/auth/auth.paths.d.ts +0 -17
- package/build/v1/auth/auth.paths.js +0 -20
- package/build/v1/auth/auth.types.d.ts +0 -8
- package/build/v1/auth/auth.types.js +0 -6
- package/build/v1/blog/blog.paths.d.ts +0 -36
- package/build/v1/blog/blog.paths.js +0 -47
- package/build/v1/blog/blog.types.d.ts +0 -12
- package/build/v1/blog/blog.types.js +0 -7
- package/build/v1/unregistered-users/unregistered-users.paths.d.ts +0 -15
- package/build/v1/unregistered-users/unregistered-users.paths.js +0 -18
- package/build/v1/unregistered-users/unregistered-users.types.d.ts +0 -9
- package/build/v1/unregistered-users/unregistered-users.types.js +0 -8
- package/build/v1/users/users.paths.d.ts +0 -11
- package/build/v1/users/users.paths.js +0 -14
- package/build/v1/users/users.types.d.ts +0 -11
- /package/build/{v1/users/users.types.js → shared/error-metadata.js} +0 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BLOG_ERRORS = exports.BlogErrorCode = void 0;
|
|
4
|
+
var BlogErrorCode;
|
|
5
|
+
(function (BlogErrorCode) {
|
|
6
|
+
// Category errors
|
|
7
|
+
BlogErrorCode["CATEGORY_NOT_FOUND"] = "CATEGORY_NOT_FOUND";
|
|
8
|
+
BlogErrorCode["CATEGORY_ALIAS_ALREADY_EXISTS"] = "CATEGORY_ALIAS_ALREADY_EXISTS";
|
|
9
|
+
BlogErrorCode["CATEGORY_IN_USE"] = "CATEGORY_IN_USE";
|
|
10
|
+
BlogErrorCode["INVALID_CATEGORY_STATUS"] = "INVALID_CATEGORY_STATUS";
|
|
11
|
+
BlogErrorCode["CATEGORY_CREATION_FAILED"] = "CATEGORY_CREATION_FAILED";
|
|
12
|
+
BlogErrorCode["CATEGORY_UPDATE_FAILED"] = "CATEGORY_UPDATE_FAILED";
|
|
13
|
+
BlogErrorCode["CATEGORY_DELETE_FAILED"] = "CATEGORY_DELETE_FAILED";
|
|
14
|
+
// Post errors
|
|
15
|
+
BlogErrorCode["POST_NOT_FOUND"] = "POST_NOT_FOUND";
|
|
16
|
+
BlogErrorCode["POST_ALIAS_ALREADY_EXISTS"] = "POST_ALIAS_ALREADY_EXISTS";
|
|
17
|
+
BlogErrorCode["INVALID_POST_STATUS"] = "INVALID_POST_STATUS";
|
|
18
|
+
BlogErrorCode["POST_CREATION_FAILED"] = "POST_CREATION_FAILED";
|
|
19
|
+
BlogErrorCode["POST_UPDATE_FAILED"] = "POST_UPDATE_FAILED";
|
|
20
|
+
BlogErrorCode["POST_DELETE_FAILED"] = "POST_DELETE_FAILED";
|
|
21
|
+
// Validation errors
|
|
22
|
+
BlogErrorCode["INVALID_ALIAS_FORMAT"] = "INVALID_ALIAS_FORMAT";
|
|
23
|
+
})(BlogErrorCode || (exports.BlogErrorCode = BlogErrorCode = {}));
|
|
24
|
+
exports.BLOG_ERRORS = {
|
|
25
|
+
// Category errors
|
|
26
|
+
[BlogErrorCode.CATEGORY_NOT_FOUND]: {
|
|
27
|
+
code: BlogErrorCode.CATEGORY_NOT_FOUND,
|
|
28
|
+
statusCode: 404,
|
|
29
|
+
},
|
|
30
|
+
[BlogErrorCode.CATEGORY_ALIAS_ALREADY_EXISTS]: {
|
|
31
|
+
code: BlogErrorCode.CATEGORY_ALIAS_ALREADY_EXISTS,
|
|
32
|
+
statusCode: 409,
|
|
33
|
+
},
|
|
34
|
+
[BlogErrorCode.CATEGORY_IN_USE]: {
|
|
35
|
+
code: BlogErrorCode.CATEGORY_IN_USE,
|
|
36
|
+
statusCode: 400,
|
|
37
|
+
},
|
|
38
|
+
[BlogErrorCode.INVALID_CATEGORY_STATUS]: {
|
|
39
|
+
code: BlogErrorCode.INVALID_CATEGORY_STATUS,
|
|
40
|
+
statusCode: 400,
|
|
41
|
+
},
|
|
42
|
+
[BlogErrorCode.CATEGORY_CREATION_FAILED]: {
|
|
43
|
+
code: BlogErrorCode.CATEGORY_CREATION_FAILED,
|
|
44
|
+
statusCode: 500,
|
|
45
|
+
},
|
|
46
|
+
[BlogErrorCode.CATEGORY_UPDATE_FAILED]: {
|
|
47
|
+
code: BlogErrorCode.CATEGORY_UPDATE_FAILED,
|
|
48
|
+
statusCode: 500,
|
|
49
|
+
},
|
|
50
|
+
[BlogErrorCode.CATEGORY_DELETE_FAILED]: {
|
|
51
|
+
code: BlogErrorCode.CATEGORY_DELETE_FAILED,
|
|
52
|
+
statusCode: 500,
|
|
53
|
+
},
|
|
54
|
+
// Post errors
|
|
55
|
+
[BlogErrorCode.POST_NOT_FOUND]: {
|
|
56
|
+
code: BlogErrorCode.POST_NOT_FOUND,
|
|
57
|
+
statusCode: 404,
|
|
58
|
+
},
|
|
59
|
+
[BlogErrorCode.POST_ALIAS_ALREADY_EXISTS]: {
|
|
60
|
+
code: BlogErrorCode.POST_ALIAS_ALREADY_EXISTS,
|
|
61
|
+
statusCode: 409,
|
|
62
|
+
},
|
|
63
|
+
[BlogErrorCode.INVALID_POST_STATUS]: {
|
|
64
|
+
code: BlogErrorCode.INVALID_POST_STATUS,
|
|
65
|
+
statusCode: 400,
|
|
66
|
+
},
|
|
67
|
+
[BlogErrorCode.POST_CREATION_FAILED]: {
|
|
68
|
+
code: BlogErrorCode.POST_CREATION_FAILED,
|
|
69
|
+
statusCode: 500,
|
|
70
|
+
},
|
|
71
|
+
[BlogErrorCode.POST_UPDATE_FAILED]: {
|
|
72
|
+
code: BlogErrorCode.POST_UPDATE_FAILED,
|
|
73
|
+
statusCode: 500,
|
|
74
|
+
},
|
|
75
|
+
[BlogErrorCode.POST_DELETE_FAILED]: {
|
|
76
|
+
code: BlogErrorCode.POST_DELETE_FAILED,
|
|
77
|
+
statusCode: 500,
|
|
78
|
+
},
|
|
79
|
+
// Validation errors
|
|
80
|
+
[BlogErrorCode.INVALID_ALIAS_FORMAT]: {
|
|
81
|
+
code: BlogErrorCode.INVALID_ALIAS_FORMAT,
|
|
82
|
+
statusCode: 400,
|
|
83
|
+
},
|
|
84
|
+
};
|
package/build/v1/blog/index.d.ts
CHANGED
package/build/v1/blog/index.js
CHANGED
|
@@ -16,8 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.BLOG_PUBLIC_POSTS_ROUTES = exports.BLOG_PUBLIC_CATEGORIES_ROUTES = exports.BLOG_ADMIN_POSTS_ROUTES = exports.BLOG_ADMIN_CATEGORIES_ROUTES = exports.BLOG_PUBLIC_POSTS_CONTROLLER = exports.BLOG_PUBLIC_CATEGORIES_CONTROLLER = exports.BLOG_ADMIN_POSTS_CONTROLLER = exports.BLOG_ADMIN_CATEGORIES_CONTROLLER = void 0;
|
|
18
18
|
__exportStar(require("./schemas"), exports);
|
|
19
|
-
__exportStar(require("./blog.
|
|
20
|
-
__exportStar(require("./blog.paths"), exports);
|
|
19
|
+
__exportStar(require("./blog.errors"), exports);
|
|
21
20
|
__exportStar(require("./admin/commands"), exports);
|
|
22
21
|
__exportStar(require("./admin/queries"), exports);
|
|
23
22
|
__exportStar(require("./public/queries"), exports);
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CreateCategoryRequestSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
5
|
+
const shared_1 = require("../../../shared");
|
|
6
6
|
const blog_category_status_enum_1 = require("./blog-category-status.enum");
|
|
7
7
|
exports.CreateCategoryRequestSchema = zod_1.z.object({
|
|
8
|
-
alias: zod_1.z.string().min(1).max(100).regex(
|
|
8
|
+
alias: zod_1.z.string().min(1).max(100).regex(shared_1.SLUG_REGEX),
|
|
9
9
|
title: zod_1.z.string().min(1).max(200),
|
|
10
10
|
order: zod_1.z.number().int().nonnegative().default(0),
|
|
11
|
-
status: zod_1.z.
|
|
11
|
+
status: zod_1.z.enum(blog_category_status_enum_1.BlogCategoryStatus).default(blog_category_status_enum_1.BlogCategoryStatus.DRAFT),
|
|
12
12
|
});
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CreatePostRequestSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
5
|
+
const shared_1 = require("../../../shared");
|
|
6
6
|
const blog_post_status_enum_1 = require("./blog-post-status.enum");
|
|
7
7
|
exports.CreatePostRequestSchema = zod_1.z.object({
|
|
8
|
-
alias: zod_1.z.string().min(1).max(200).regex(
|
|
8
|
+
alias: zod_1.z.string().min(1).max(200).regex(shared_1.SLUG_REGEX),
|
|
9
9
|
title: zod_1.z.string().min(1).max(300),
|
|
10
10
|
metaTitle: zod_1.z.string().min(1).max(100),
|
|
11
11
|
metaDescription: zod_1.z.string().min(1).max(200),
|
|
12
12
|
content: zod_1.z.string().min(1),
|
|
13
13
|
image: zod_1.z.string().url(),
|
|
14
14
|
author: zod_1.z.string().min(1).max(100),
|
|
15
|
-
categoryIds: zod_1.z.array(zod_1.z.string().regex(
|
|
16
|
-
status: zod_1.z.
|
|
15
|
+
categoryIds: zod_1.z.array(zod_1.z.string().regex(shared_1.UUID_REGEX)).min(1),
|
|
16
|
+
status: zod_1.z.enum(blog_post_status_enum_1.BlogPostStatus).default(blog_post_status_enum_1.BlogPostStatus.DRAFT),
|
|
17
17
|
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ErrorMetadata } from '../../shared';
|
|
2
|
+
export declare enum EmailErrorCode {
|
|
3
|
+
EMAIL_SEND_FAILED = "EMAIL_SEND_FAILED",
|
|
4
|
+
EMAIL_PROVIDER_UNAUTHORIZED = "EMAIL_PROVIDER_UNAUTHORIZED",
|
|
5
|
+
EMAIL_PROVIDER_INSUFFICIENT_BALANCE = "EMAIL_PROVIDER_INSUFFICIENT_BALANCE",
|
|
6
|
+
EMAIL_PROVIDER_DOMAIN_NOT_VERIFIED = "EMAIL_PROVIDER_DOMAIN_NOT_VERIFIED",
|
|
7
|
+
EMAIL_PROVIDER_NOT_FOUND = "EMAIL_PROVIDER_NOT_FOUND",
|
|
8
|
+
EMAIL_RECIPIENT_UNSUBSCRIBED = "EMAIL_RECIPIENT_UNSUBSCRIBED",
|
|
9
|
+
EMAIL_RECIPIENT_COMPLAINED = "EMAIL_RECIPIENT_COMPLAINED",
|
|
10
|
+
EMAIL_RECIPIENT_INVALID = "EMAIL_RECIPIENT_INVALID",
|
|
11
|
+
EMAIL_RECIPIENT_UNAVAILABLE = "EMAIL_RECIPIENT_UNAVAILABLE",
|
|
12
|
+
EMAIL_PROVIDER_UNAVAILABLE = "EMAIL_PROVIDER_UNAVAILABLE",
|
|
13
|
+
EMAIL_INVALID_REQUEST = "EMAIL_INVALID_REQUEST"
|
|
14
|
+
}
|
|
15
|
+
export declare const EMAIL_ERRORS: Record<EmailErrorCode, ErrorMetadata>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EMAIL_ERRORS = exports.EmailErrorCode = void 0;
|
|
4
|
+
var EmailErrorCode;
|
|
5
|
+
(function (EmailErrorCode) {
|
|
6
|
+
EmailErrorCode["EMAIL_SEND_FAILED"] = "EMAIL_SEND_FAILED";
|
|
7
|
+
EmailErrorCode["EMAIL_PROVIDER_UNAUTHORIZED"] = "EMAIL_PROVIDER_UNAUTHORIZED";
|
|
8
|
+
EmailErrorCode["EMAIL_PROVIDER_INSUFFICIENT_BALANCE"] = "EMAIL_PROVIDER_INSUFFICIENT_BALANCE";
|
|
9
|
+
EmailErrorCode["EMAIL_PROVIDER_DOMAIN_NOT_VERIFIED"] = "EMAIL_PROVIDER_DOMAIN_NOT_VERIFIED";
|
|
10
|
+
EmailErrorCode["EMAIL_PROVIDER_NOT_FOUND"] = "EMAIL_PROVIDER_NOT_FOUND";
|
|
11
|
+
EmailErrorCode["EMAIL_RECIPIENT_UNSUBSCRIBED"] = "EMAIL_RECIPIENT_UNSUBSCRIBED";
|
|
12
|
+
EmailErrorCode["EMAIL_RECIPIENT_COMPLAINED"] = "EMAIL_RECIPIENT_COMPLAINED";
|
|
13
|
+
EmailErrorCode["EMAIL_RECIPIENT_INVALID"] = "EMAIL_RECIPIENT_INVALID";
|
|
14
|
+
EmailErrorCode["EMAIL_RECIPIENT_UNAVAILABLE"] = "EMAIL_RECIPIENT_UNAVAILABLE";
|
|
15
|
+
EmailErrorCode["EMAIL_PROVIDER_UNAVAILABLE"] = "EMAIL_PROVIDER_UNAVAILABLE";
|
|
16
|
+
EmailErrorCode["EMAIL_INVALID_REQUEST"] = "EMAIL_INVALID_REQUEST";
|
|
17
|
+
})(EmailErrorCode || (exports.EmailErrorCode = EmailErrorCode = {}));
|
|
18
|
+
exports.EMAIL_ERRORS = {
|
|
19
|
+
[EmailErrorCode.EMAIL_SEND_FAILED]: {
|
|
20
|
+
code: EmailErrorCode.EMAIL_SEND_FAILED,
|
|
21
|
+
statusCode: 500,
|
|
22
|
+
},
|
|
23
|
+
[EmailErrorCode.EMAIL_PROVIDER_UNAUTHORIZED]: {
|
|
24
|
+
code: EmailErrorCode.EMAIL_PROVIDER_UNAUTHORIZED,
|
|
25
|
+
statusCode: 500,
|
|
26
|
+
},
|
|
27
|
+
[EmailErrorCode.EMAIL_PROVIDER_INSUFFICIENT_BALANCE]: {
|
|
28
|
+
code: EmailErrorCode.EMAIL_PROVIDER_INSUFFICIENT_BALANCE,
|
|
29
|
+
statusCode: 500,
|
|
30
|
+
},
|
|
31
|
+
[EmailErrorCode.EMAIL_PROVIDER_DOMAIN_NOT_VERIFIED]: {
|
|
32
|
+
code: EmailErrorCode.EMAIL_PROVIDER_DOMAIN_NOT_VERIFIED,
|
|
33
|
+
statusCode: 500,
|
|
34
|
+
},
|
|
35
|
+
[EmailErrorCode.EMAIL_PROVIDER_NOT_FOUND]: {
|
|
36
|
+
code: EmailErrorCode.EMAIL_PROVIDER_NOT_FOUND,
|
|
37
|
+
statusCode: 500,
|
|
38
|
+
},
|
|
39
|
+
[EmailErrorCode.EMAIL_RECIPIENT_UNSUBSCRIBED]: {
|
|
40
|
+
code: EmailErrorCode.EMAIL_RECIPIENT_UNSUBSCRIBED,
|
|
41
|
+
statusCode: 422,
|
|
42
|
+
},
|
|
43
|
+
[EmailErrorCode.EMAIL_RECIPIENT_COMPLAINED]: {
|
|
44
|
+
code: EmailErrorCode.EMAIL_RECIPIENT_COMPLAINED,
|
|
45
|
+
statusCode: 422,
|
|
46
|
+
},
|
|
47
|
+
[EmailErrorCode.EMAIL_RECIPIENT_INVALID]: {
|
|
48
|
+
code: EmailErrorCode.EMAIL_RECIPIENT_INVALID,
|
|
49
|
+
statusCode: 422,
|
|
50
|
+
},
|
|
51
|
+
[EmailErrorCode.EMAIL_RECIPIENT_UNAVAILABLE]: {
|
|
52
|
+
code: EmailErrorCode.EMAIL_RECIPIENT_UNAVAILABLE,
|
|
53
|
+
statusCode: 422,
|
|
54
|
+
},
|
|
55
|
+
[EmailErrorCode.EMAIL_PROVIDER_UNAVAILABLE]: {
|
|
56
|
+
code: EmailErrorCode.EMAIL_PROVIDER_UNAVAILABLE,
|
|
57
|
+
statusCode: 503,
|
|
58
|
+
},
|
|
59
|
+
[EmailErrorCode.EMAIL_INVALID_REQUEST]: {
|
|
60
|
+
code: EmailErrorCode.EMAIL_INVALID_REQUEST,
|
|
61
|
+
statusCode: 400,
|
|
62
|
+
},
|
|
63
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './email.errors';
|
|
@@ -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("./email.errors"), exports);
|
package/build/v1/index.d.ts
CHANGED
package/build/v1/index.js
CHANGED
|
@@ -18,3 +18,6 @@ __exportStar(require("./auth"), exports);
|
|
|
18
18
|
__exportStar(require("./unregistered-users"), exports);
|
|
19
19
|
__exportStar(require("./blog"), exports);
|
|
20
20
|
__exportStar(require("./users"), exports);
|
|
21
|
+
__exportStar(require("./email"), exports);
|
|
22
|
+
__exportStar(require("./notifications"), exports);
|
|
23
|
+
__exportStar(require("./seo-pages"), exports);
|
|
@@ -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("./schemas"), exports);
|
|
18
|
+
__exportStar(require("./notifications.errors"), exports);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ErrorMetadata } from '../../shared';
|
|
2
|
+
/**
|
|
3
|
+
* Notification Error Codes
|
|
4
|
+
* Covers both general notification errors and specific provider errors
|
|
5
|
+
*/
|
|
6
|
+
export declare enum NotificationErrorCode {
|
|
7
|
+
NOTIFICATION_NOT_FOUND = "NOTIFICATION_NOT_FOUND",
|
|
8
|
+
NOTIFICATION_ALREADY_SENT = "NOTIFICATION_ALREADY_SENT",
|
|
9
|
+
NOTIFICATION_MAX_ATTEMPTS_REACHED = "NOTIFICATION_MAX_ATTEMPTS_REACHED",
|
|
10
|
+
NOTIFICATION_INVALID_USER = "NOTIFICATION_INVALID_USER",
|
|
11
|
+
NOTIFICATION_INVALID_TYPE = "NOTIFICATION_INVALID_TYPE",
|
|
12
|
+
NOTIFICATION_INVALID_TEMPLATE = "NOTIFICATION_INVALID_TEMPLATE",
|
|
13
|
+
NOTIFICATION_INVALID_STATE_TRANSITION = "NOTIFICATION_INVALID_STATE_TRANSITION",
|
|
14
|
+
NOTIFICATION_TEMPLATE_NOT_FOUND = "NOTIFICATION_TEMPLATE_NOT_FOUND",
|
|
15
|
+
NOTIFICATION_TEMPLATE_RENDER_FAILED = "NOTIFICATION_TEMPLATE_RENDER_FAILED",
|
|
16
|
+
NOTIFICATION_INVALID_TEMPLATE_DATA = "NOTIFICATION_INVALID_TEMPLATE_DATA",
|
|
17
|
+
NOTIFICATION_SEND_FAILED = "NOTIFICATION_SEND_FAILED",
|
|
18
|
+
NOTIFICATION_PROVIDER_ERROR = "NOTIFICATION_PROVIDER_ERROR",
|
|
19
|
+
NOTIFICATION_RATE_LIMIT_EXCEEDED = "NOTIFICATION_RATE_LIMIT_EXCEEDED",
|
|
20
|
+
NOTIFICATION_RECIPIENT_NOT_FOUND = "NOTIFICATION_RECIPIENT_NOT_FOUND",
|
|
21
|
+
NOTIFICATION_RECIPIENT_UNSUBSCRIBED = "NOTIFICATION_RECIPIENT_UNSUBSCRIBED"
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Error mappings for HTTP status codes
|
|
25
|
+
*/
|
|
26
|
+
export declare const NOTIFICATION_ERRORS: Record<NotificationErrorCode, ErrorMetadata>;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NOTIFICATION_ERRORS = exports.NotificationErrorCode = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Notification Error Codes
|
|
6
|
+
* Covers both general notification errors and specific provider errors
|
|
7
|
+
*/
|
|
8
|
+
var NotificationErrorCode;
|
|
9
|
+
(function (NotificationErrorCode) {
|
|
10
|
+
// General notification errors
|
|
11
|
+
NotificationErrorCode["NOTIFICATION_NOT_FOUND"] = "NOTIFICATION_NOT_FOUND";
|
|
12
|
+
NotificationErrorCode["NOTIFICATION_ALREADY_SENT"] = "NOTIFICATION_ALREADY_SENT";
|
|
13
|
+
NotificationErrorCode["NOTIFICATION_MAX_ATTEMPTS_REACHED"] = "NOTIFICATION_MAX_ATTEMPTS_REACHED";
|
|
14
|
+
NotificationErrorCode["NOTIFICATION_INVALID_USER"] = "NOTIFICATION_INVALID_USER";
|
|
15
|
+
NotificationErrorCode["NOTIFICATION_INVALID_TYPE"] = "NOTIFICATION_INVALID_TYPE";
|
|
16
|
+
NotificationErrorCode["NOTIFICATION_INVALID_TEMPLATE"] = "NOTIFICATION_INVALID_TEMPLATE";
|
|
17
|
+
NotificationErrorCode["NOTIFICATION_INVALID_STATE_TRANSITION"] = "NOTIFICATION_INVALID_STATE_TRANSITION";
|
|
18
|
+
// Template and rendering errors
|
|
19
|
+
NotificationErrorCode["NOTIFICATION_TEMPLATE_NOT_FOUND"] = "NOTIFICATION_TEMPLATE_NOT_FOUND";
|
|
20
|
+
NotificationErrorCode["NOTIFICATION_TEMPLATE_RENDER_FAILED"] = "NOTIFICATION_TEMPLATE_RENDER_FAILED";
|
|
21
|
+
NotificationErrorCode["NOTIFICATION_INVALID_TEMPLATE_DATA"] = "NOTIFICATION_INVALID_TEMPLATE_DATA";
|
|
22
|
+
// Sending errors
|
|
23
|
+
NotificationErrorCode["NOTIFICATION_SEND_FAILED"] = "NOTIFICATION_SEND_FAILED";
|
|
24
|
+
NotificationErrorCode["NOTIFICATION_PROVIDER_ERROR"] = "NOTIFICATION_PROVIDER_ERROR";
|
|
25
|
+
NotificationErrorCode["NOTIFICATION_RATE_LIMIT_EXCEEDED"] = "NOTIFICATION_RATE_LIMIT_EXCEEDED";
|
|
26
|
+
// Recipient errors
|
|
27
|
+
NotificationErrorCode["NOTIFICATION_RECIPIENT_NOT_FOUND"] = "NOTIFICATION_RECIPIENT_NOT_FOUND";
|
|
28
|
+
NotificationErrorCode["NOTIFICATION_RECIPIENT_UNSUBSCRIBED"] = "NOTIFICATION_RECIPIENT_UNSUBSCRIBED";
|
|
29
|
+
})(NotificationErrorCode || (exports.NotificationErrorCode = NotificationErrorCode = {}));
|
|
30
|
+
/**
|
|
31
|
+
* Error mappings for HTTP status codes
|
|
32
|
+
*/
|
|
33
|
+
exports.NOTIFICATION_ERRORS = {
|
|
34
|
+
// 404 - Not Found
|
|
35
|
+
[NotificationErrorCode.NOTIFICATION_NOT_FOUND]: {
|
|
36
|
+
code: NotificationErrorCode.NOTIFICATION_NOT_FOUND,
|
|
37
|
+
statusCode: 404,
|
|
38
|
+
},
|
|
39
|
+
[NotificationErrorCode.NOTIFICATION_TEMPLATE_NOT_FOUND]: {
|
|
40
|
+
code: NotificationErrorCode.NOTIFICATION_TEMPLATE_NOT_FOUND,
|
|
41
|
+
statusCode: 404,
|
|
42
|
+
},
|
|
43
|
+
[NotificationErrorCode.NOTIFICATION_RECIPIENT_NOT_FOUND]: {
|
|
44
|
+
code: NotificationErrorCode.NOTIFICATION_RECIPIENT_NOT_FOUND,
|
|
45
|
+
statusCode: 404,
|
|
46
|
+
},
|
|
47
|
+
// 400 - Bad Request
|
|
48
|
+
[NotificationErrorCode.NOTIFICATION_INVALID_USER]: {
|
|
49
|
+
code: NotificationErrorCode.NOTIFICATION_INVALID_USER,
|
|
50
|
+
statusCode: 400,
|
|
51
|
+
},
|
|
52
|
+
[NotificationErrorCode.NOTIFICATION_INVALID_TEMPLATE_DATA]: {
|
|
53
|
+
code: NotificationErrorCode.NOTIFICATION_INVALID_TEMPLATE_DATA,
|
|
54
|
+
statusCode: 400,
|
|
55
|
+
},
|
|
56
|
+
[NotificationErrorCode.NOTIFICATION_INVALID_TYPE]: {
|
|
57
|
+
code: NotificationErrorCode.NOTIFICATION_INVALID_TYPE,
|
|
58
|
+
statusCode: 400,
|
|
59
|
+
},
|
|
60
|
+
[NotificationErrorCode.NOTIFICATION_INVALID_TEMPLATE]: {
|
|
61
|
+
code: NotificationErrorCode.NOTIFICATION_INVALID_TEMPLATE,
|
|
62
|
+
statusCode: 400,
|
|
63
|
+
},
|
|
64
|
+
[NotificationErrorCode.NOTIFICATION_INVALID_STATE_TRANSITION]: {
|
|
65
|
+
code: NotificationErrorCode.NOTIFICATION_INVALID_STATE_TRANSITION,
|
|
66
|
+
statusCode: 400,
|
|
67
|
+
},
|
|
68
|
+
// 409 - Conflict
|
|
69
|
+
[NotificationErrorCode.NOTIFICATION_ALREADY_SENT]: {
|
|
70
|
+
code: NotificationErrorCode.NOTIFICATION_ALREADY_SENT,
|
|
71
|
+
statusCode: 409,
|
|
72
|
+
},
|
|
73
|
+
// 422 - Unprocessable Entity
|
|
74
|
+
[NotificationErrorCode.NOTIFICATION_MAX_ATTEMPTS_REACHED]: {
|
|
75
|
+
code: NotificationErrorCode.NOTIFICATION_MAX_ATTEMPTS_REACHED,
|
|
76
|
+
statusCode: 422,
|
|
77
|
+
},
|
|
78
|
+
[NotificationErrorCode.NOTIFICATION_RECIPIENT_UNSUBSCRIBED]: {
|
|
79
|
+
code: NotificationErrorCode.NOTIFICATION_RECIPIENT_UNSUBSCRIBED,
|
|
80
|
+
statusCode: 422,
|
|
81
|
+
},
|
|
82
|
+
// 429 - Too Many Requests
|
|
83
|
+
[NotificationErrorCode.NOTIFICATION_RATE_LIMIT_EXCEEDED]: {
|
|
84
|
+
code: NotificationErrorCode.NOTIFICATION_RATE_LIMIT_EXCEEDED,
|
|
85
|
+
statusCode: 429,
|
|
86
|
+
},
|
|
87
|
+
// 500 - Internal Server Error
|
|
88
|
+
[NotificationErrorCode.NOTIFICATION_TEMPLATE_RENDER_FAILED]: {
|
|
89
|
+
code: NotificationErrorCode.NOTIFICATION_TEMPLATE_RENDER_FAILED,
|
|
90
|
+
statusCode: 500,
|
|
91
|
+
},
|
|
92
|
+
[NotificationErrorCode.NOTIFICATION_SEND_FAILED]: {
|
|
93
|
+
code: NotificationErrorCode.NOTIFICATION_SEND_FAILED,
|
|
94
|
+
statusCode: 500,
|
|
95
|
+
},
|
|
96
|
+
// 503 - Service Unavailable
|
|
97
|
+
[NotificationErrorCode.NOTIFICATION_PROVIDER_ERROR]: {
|
|
98
|
+
code: NotificationErrorCode.NOTIFICATION_PROVIDER_ERROR,
|
|
99
|
+
statusCode: 503,
|
|
100
|
+
},
|
|
101
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Email Template enum
|
|
3
|
+
* Defines available email templates
|
|
4
|
+
*/
|
|
5
|
+
export declare enum EmailTemplate {
|
|
6
|
+
WELCOME = "WELCOME",
|
|
7
|
+
EMAIL_VERIFICATION = "EMAIL_VERIFICATION",
|
|
8
|
+
PASSWORD_RESET = "PASSWORD_RESET",
|
|
9
|
+
PASSWORD_CHANGED = "PASSWORD_CHANGED",
|
|
10
|
+
LOGIN_FROM_NEW_DEVICE = "LOGIN_FROM_NEW_DEVICE",
|
|
11
|
+
SUSPICIOUS_ACTIVITY = "SUSPICIOUS_ACTIVITY"
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmailTemplate = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Email Template enum
|
|
6
|
+
* Defines available email templates
|
|
7
|
+
*/
|
|
8
|
+
var EmailTemplate;
|
|
9
|
+
(function (EmailTemplate) {
|
|
10
|
+
// User lifecycle templates
|
|
11
|
+
EmailTemplate["WELCOME"] = "WELCOME";
|
|
12
|
+
EmailTemplate["EMAIL_VERIFICATION"] = "EMAIL_VERIFICATION";
|
|
13
|
+
EmailTemplate["PASSWORD_RESET"] = "PASSWORD_RESET";
|
|
14
|
+
EmailTemplate["PASSWORD_CHANGED"] = "PASSWORD_CHANGED";
|
|
15
|
+
// Account activity templates
|
|
16
|
+
EmailTemplate["LOGIN_FROM_NEW_DEVICE"] = "LOGIN_FROM_NEW_DEVICE";
|
|
17
|
+
EmailTemplate["SUSPICIOUS_ACTIVITY"] = "SUSPICIOUS_ACTIVITY";
|
|
18
|
+
// Notification templates
|
|
19
|
+
// Can be extended with marketing, transactional emails, etc.
|
|
20
|
+
})(EmailTemplate || (exports.EmailTemplate = EmailTemplate = {}));
|
|
@@ -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("./notification-type.enum"), exports);
|
|
18
|
+
__exportStar(require("./notification-status.enum"), exports);
|
|
19
|
+
__exportStar(require("./email-template.enum"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notification Status enum
|
|
3
|
+
* Defines the lifecycle states of a notification in the outbox pattern
|
|
4
|
+
*/
|
|
5
|
+
export declare enum NotificationStatus {
|
|
6
|
+
PENDING = "PENDING",// Created, waiting to be sent
|
|
7
|
+
PROCESSING = "PROCESSING",// Worker has picked it up
|
|
8
|
+
SENT = "SENT",// Successfully sent
|
|
9
|
+
ERROR = "ERROR",// Error occurred, but can retry (attempts < maxAttempts)
|
|
10
|
+
FAILED = "FAILED"
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationStatus = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Notification Status enum
|
|
6
|
+
* Defines the lifecycle states of a notification in the outbox pattern
|
|
7
|
+
*/
|
|
8
|
+
var NotificationStatus;
|
|
9
|
+
(function (NotificationStatus) {
|
|
10
|
+
NotificationStatus["PENDING"] = "PENDING";
|
|
11
|
+
NotificationStatus["PROCESSING"] = "PROCESSING";
|
|
12
|
+
NotificationStatus["SENT"] = "SENT";
|
|
13
|
+
NotificationStatus["ERROR"] = "ERROR";
|
|
14
|
+
NotificationStatus["FAILED"] = "FAILED";
|
|
15
|
+
})(NotificationStatus || (exports.NotificationStatus = NotificationStatus = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Notification Type enum
|
|
6
|
+
* Defines supported notification channels
|
|
7
|
+
*/
|
|
8
|
+
var NotificationType;
|
|
9
|
+
(function (NotificationType) {
|
|
10
|
+
NotificationType["EMAIL"] = "EMAIL";
|
|
11
|
+
NotificationType["TELEGRAM"] = "TELEGRAM";
|
|
12
|
+
// PUSH = 'PUSH', // can be added later
|
|
13
|
+
// SMS = 'SMS', // can be added later
|
|
14
|
+
})(NotificationType || (exports.NotificationType = NotificationType = {}));
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../../shared/http-method';
|
|
3
|
+
export declare namespace AdminSeoPageCreatePageCommand {
|
|
4
|
+
const Request: z.ZodObject<{
|
|
5
|
+
metaTitle: z.ZodString;
|
|
6
|
+
metaDescription: z.ZodString;
|
|
7
|
+
title: z.ZodString;
|
|
8
|
+
description: z.ZodString;
|
|
9
|
+
content: z.ZodString;
|
|
10
|
+
alias: z.ZodString;
|
|
11
|
+
type: z.ZodEnum<typeof import("../../schemas").PageType>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
const Response: z.ZodObject<{
|
|
14
|
+
uuid: z.ZodString;
|
|
15
|
+
metaTitle: z.ZodString;
|
|
16
|
+
metaDescription: z.ZodString;
|
|
17
|
+
title: z.ZodString;
|
|
18
|
+
description: z.ZodString;
|
|
19
|
+
content: z.ZodString;
|
|
20
|
+
alias: z.ZodString;
|
|
21
|
+
type: z.ZodEnum<typeof import("../../schemas").PageType>;
|
|
22
|
+
createdAt: z.ZodString;
|
|
23
|
+
updatedAt: z.ZodString;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
const URL: "/api/v1/admin/seo-pages/";
|
|
26
|
+
const METHOD = HttpMethod.POST;
|
|
27
|
+
type RequestType = z.infer<typeof Request>;
|
|
28
|
+
type ResponseType = z.infer<typeof Response>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminSeoPageCreatePageCommand = void 0;
|
|
4
|
+
const schemas_1 = require("../../schemas");
|
|
5
|
+
const rest_api_1 = require("../../../../rest-api");
|
|
6
|
+
const http_method_1 = require("../../../../shared/http-method");
|
|
7
|
+
var AdminSeoPageCreatePageCommand;
|
|
8
|
+
(function (AdminSeoPageCreatePageCommand) {
|
|
9
|
+
AdminSeoPageCreatePageCommand.Request = schemas_1.CreatePageRequestSchema;
|
|
10
|
+
AdminSeoPageCreatePageCommand.Response = schemas_1.PageResponseSchema;
|
|
11
|
+
AdminSeoPageCreatePageCommand.URL = rest_api_1.REST_API.V1.SEO_PAGES.ADMIN.CREATE;
|
|
12
|
+
AdminSeoPageCreatePageCommand.METHOD = http_method_1.HttpMethod.POST;
|
|
13
|
+
})(AdminSeoPageCreatePageCommand || (exports.AdminSeoPageCreatePageCommand = AdminSeoPageCreatePageCommand = {}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../../shared/http-method';
|
|
3
|
+
export declare namespace AdminSeoPageDeletePageCommand {
|
|
4
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
const Response: z.ZodObject<{
|
|
6
|
+
success: z.ZodBoolean;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
const URL: (uuid: string) => string;
|
|
9
|
+
const METHOD = HttpMethod.DELETE;
|
|
10
|
+
type RequestType = z.infer<typeof Request>;
|
|
11
|
+
type ResponseType = z.infer<typeof Response>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminSeoPageDeletePageCommand = 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
|
+
var AdminSeoPageDeletePageCommand;
|
|
8
|
+
(function (AdminSeoPageDeletePageCommand) {
|
|
9
|
+
AdminSeoPageDeletePageCommand.Request = zod_1.z.object({});
|
|
10
|
+
AdminSeoPageDeletePageCommand.Response = zod_1.z.object({ success: zod_1.z.boolean() });
|
|
11
|
+
AdminSeoPageDeletePageCommand.URL = (uuid) => rest_api_1.REST_API.V1.SEO_PAGES.ADMIN.DELETE(uuid);
|
|
12
|
+
AdminSeoPageDeletePageCommand.METHOD = http_method_1.HttpMethod.DELETE;
|
|
13
|
+
})(AdminSeoPageDeletePageCommand || (exports.AdminSeoPageDeletePageCommand = AdminSeoPageDeletePageCommand = {}));
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized exports for SEO Pages admin commands
|
|
3
|
+
*/
|
|
4
|
+
export { AdminSeoPageCreatePageCommand } from './create-page.command';
|
|
5
|
+
export { AdminSeoPageUpdatePageCommand } from './update-page.command';
|
|
6
|
+
export { AdminSeoPageDeletePageCommand } from './delete-page.command';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminSeoPageDeletePageCommand = exports.AdminSeoPageUpdatePageCommand = exports.AdminSeoPageCreatePageCommand = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Centralized exports for SEO Pages admin commands
|
|
6
|
+
*/
|
|
7
|
+
var create_page_command_1 = require("./create-page.command");
|
|
8
|
+
Object.defineProperty(exports, "AdminSeoPageCreatePageCommand", { enumerable: true, get: function () { return create_page_command_1.AdminSeoPageCreatePageCommand; } });
|
|
9
|
+
var update_page_command_1 = require("./update-page.command");
|
|
10
|
+
Object.defineProperty(exports, "AdminSeoPageUpdatePageCommand", { enumerable: true, get: function () { return update_page_command_1.AdminSeoPageUpdatePageCommand; } });
|
|
11
|
+
var delete_page_command_1 = require("./delete-page.command");
|
|
12
|
+
Object.defineProperty(exports, "AdminSeoPageDeletePageCommand", { enumerable: true, get: function () { return delete_page_command_1.AdminSeoPageDeletePageCommand; } });
|