sitero-server 0.2.0 → 0.4.0
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/README.md +15 -0
- package/dist/export/index.js +4 -2
- package/dist/src/application/features/authentication/admin/operations/sign-in/admin-sign-in.js +1 -1
- package/dist/src/application/features/inquiry/operations/submit/inquiry-submit.js +13 -15
- package/dist/src/application/features/uploads/constraints/create-storage-file-schema.js +1 -1
- package/dist/src/application/features/uploads/operations/upload-files/upload-files.js +33 -15
- package/dist/src/application/resources/admin/errors/operation-errors.js +1 -0
- package/dist/src/application/resources/admin-refresh-token/operations/commands/delete/admin-refresh-token-delete-command.js +3 -0
- package/dist/src/application/resources/config/operations/commands/update/cache.js +0 -1
- package/dist/src/application/resources/config/operations/commands/update/validation/schema.js +1 -1
- package/dist/src/application/resources/config/operations/queries/find-detail/cache.js +0 -1
- package/dist/src/application/resources/config/operations/queries/find-detail/config-find-detail-query.js +1 -3
- package/dist/src/application/resources/config/operations/queries/find-many/cache.js +0 -1
- package/dist/src/application/resources/file/constraints/assert-file-exists.js +1 -1
- package/dist/src/application/resources/file/errors/codes.js +1 -0
- package/dist/src/application/resources/file/operations/commands/create/file-create-command.js +1 -1
- package/dist/src/application/resources/file/operations/commands/create/validation/schema.js +3 -9
- package/dist/src/application/resources/file/operations/commands/create-many/file-create-many-command.js +10 -1
- package/dist/src/application/resources/file/operations/commands/create-many/validation/schema.js +1 -1
- package/dist/src/application/resources/file/operations/commands/purge-many/cache.js +7 -3
- package/dist/src/application/resources/file/operations/commands/purge-many/file-purge-many-command.js +14 -34
- package/dist/src/application/resources/file/operations/commands/restore-many/file-restore-many-command.js +21 -4
- package/dist/src/application/resources/file/operations/commands/update/validation/schema.js +3 -9
- package/dist/src/application/resources/file/operations/queries/find-list-cards/cache.js +1 -1
- package/dist/src/application/resources/file/operations/queries/find-list-cards/validation/schema.js +1 -1
- package/dist/src/application/resources/file/operations/queries/find-relations/cache.js +7 -0
- package/dist/src/application/resources/file/operations/queries/find-relations/file-find-relations-query.js +36 -0
- package/dist/src/application/resources/file/operations/queries/validate-create/file-validate-create-query.js +17 -0
- package/dist/src/application/resources/file/operations/queries/validate-create/validation/schema.js +6 -0
- package/dist/src/application/resources/file/operations/queries/validate-create/validation/validate-input.js +7 -0
- package/dist/src/application/resources/file/operations/queries/validate-update/file-validate-update-query.js +17 -0
- package/dist/src/application/resources/file/validation/file-translations-schema.js +13 -0
- package/dist/src/application/resources/inquiry/operations/queries/find/inquiry-find-query.js +1 -3
- package/dist/src/application/resources/post/operations/commands/create/validation/schema.js +16 -3
- package/dist/src/application/resources/post/operations/commands/update/validation/validate-input.js +1 -2
- package/dist/src/application/resources/post/operations/queries/find-list-cards/cache.js +1 -0
- package/dist/src/application/resources/post/operations/queries/find-list-cards/validation/schema.js +1 -0
- package/dist/src/application/resources/post/operations/queries/find-relations/cache.js +12 -0
- package/dist/src/application/resources/post/operations/queries/find-relations/post-find-relations-query.js +32 -0
- package/dist/src/application/resources/seo-metadata/operations/commands/upsert/validation/schema.js +3 -3
- package/dist/src/application/sessions/admin/authenticate/admin-session-authenticate.js +43 -19
- package/dist/src/composition/create-sitero-server.js +20 -2
- package/dist/src/kernel/executor/executor.js +1 -1
- package/dist/src/kernel/operation/error/normalize-operation-error.js +25 -0
- package/dist/src/kernel/operation/error/zod.js +56 -0
- package/dist/src/kernel/operation/result.js +1 -1
- package/dist/types/src/application/conventions/cache/constants.d.ts +1 -1
- package/dist/types/src/application/conventions/cache/constants.d.ts.map +1 -1
- package/dist/types/src/application/features/authentication/admin/operations/change-password/types.d.ts +1 -1
- package/dist/types/src/application/features/authentication/admin/operations/change-password/types.d.ts.map +1 -1
- package/dist/types/src/application/features/authentication/admin/operations/me/types.d.ts +1 -1
- package/dist/types/src/application/features/authentication/admin/operations/me/types.d.ts.map +1 -1
- package/dist/types/src/application/features/authentication/admin/operations/reset-password/types.d.ts +1 -1
- package/dist/types/src/application/features/authentication/admin/operations/reset-password/types.d.ts.map +1 -1
- package/dist/types/src/application/features/authentication/admin/operations/verify-email/types.d.ts +1 -1
- package/dist/types/src/application/features/authentication/admin/operations/verify-email/types.d.ts.map +1 -1
- package/dist/types/src/application/features/email-preview/operations/render-template/types.d.ts +1 -1
- package/dist/types/src/application/features/email-preview/operations/render-template/types.d.ts.map +1 -1
- package/dist/types/src/application/features/inquiry/operations/submit/inquiry-submit.d.ts.map +1 -1
- package/dist/types/src/application/features/uploads/constraints/create-storage-file-schema.d.ts.map +1 -1
- package/dist/types/src/application/features/uploads/operations/upload-file/upload-file.d.ts +1 -1
- package/dist/types/src/application/features/uploads/operations/upload-file/upload-file.d.ts.map +1 -1
- package/dist/types/src/application/features/uploads/operations/upload-files/types.d.ts +7 -1
- package/dist/types/src/application/features/uploads/operations/upload-files/types.d.ts.map +1 -1
- package/dist/types/src/application/features/uploads/operations/upload-files/upload-files.d.ts +1 -1
- package/dist/types/src/application/features/uploads/operations/upload-files/upload-files.d.ts.map +1 -1
- package/dist/types/src/application/resources/admin/errors/operation-errors.d.ts.map +1 -1
- package/dist/types/src/application/resources/admin-refresh-token/operations/commands/delete/admin-refresh-token-delete-command.d.ts.map +1 -1
- package/dist/types/src/application/resources/admin-refresh-token/ports.d.ts +17 -0
- package/dist/types/src/application/resources/admin-refresh-token/ports.d.ts.map +1 -1
- package/dist/types/src/application/resources/config/index.d.ts +1 -1
- package/dist/types/src/application/resources/config/index.d.ts.map +1 -1
- package/dist/types/src/application/resources/config/operations/commands/update/cache.d.ts.map +1 -1
- package/dist/types/src/application/resources/config/operations/commands/update/validation/schema.d.ts +20 -20
- package/dist/types/src/application/resources/config/operations/queries/find-detail/cache.d.ts.map +1 -1
- package/dist/types/src/application/resources/config/operations/queries/find-detail/config-find-detail-query.d.ts.map +1 -1
- package/dist/types/src/application/resources/config/operations/queries/find-many/cache.d.ts.map +1 -1
- package/dist/types/src/application/resources/config/operations/queries/find-many/types.d.ts.map +1 -1
- package/dist/types/src/application/resources/file/errors/codes.d.ts +1 -0
- package/dist/types/src/application/resources/file/errors/codes.d.ts.map +1 -1
- package/dist/types/src/application/resources/file/index.d.ts +3 -3
- package/dist/types/src/application/resources/file/index.d.ts.map +1 -1
- package/dist/types/src/application/resources/file/operations/commands/create/file-create-command.d.ts +1 -1
- package/dist/types/src/application/resources/file/operations/commands/create/file-create-command.d.ts.map +1 -1
- package/dist/types/src/application/resources/file/operations/commands/create/validation/schema.d.ts.map +1 -1
- package/dist/types/src/application/resources/file/operations/commands/create-many/file-create-many-command.d.ts +1 -1
- package/dist/types/src/application/resources/file/operations/commands/create-many/file-create-many-command.d.ts.map +1 -1
- package/dist/types/src/application/resources/file/operations/commands/create-many/types.d.ts +2 -0
- package/dist/types/src/application/resources/file/operations/commands/create-many/types.d.ts.map +1 -1
- package/dist/types/src/application/resources/file/operations/commands/purge-many/cache.d.ts.map +1 -1
- package/dist/types/src/application/resources/file/operations/commands/purge-many/file-purge-many-command.d.ts +3 -3
- package/dist/types/src/application/resources/file/operations/commands/purge-many/file-purge-many-command.d.ts.map +1 -1
- package/dist/types/src/application/resources/file/operations/commands/replace-content/file-replace-content-command.d.ts +1 -1
- package/dist/types/src/application/resources/file/operations/commands/replace-content/file-replace-content-command.d.ts.map +1 -1
- package/dist/types/src/application/resources/file/operations/commands/replace-content/validation/validate-input.d.ts +1 -1
- package/dist/types/src/application/resources/file/operations/commands/replace-content/validation/validate-input.d.ts.map +1 -1
- package/dist/types/src/application/resources/file/operations/commands/restore-many/file-restore-many-command.d.ts.map +1 -1
- package/dist/types/src/application/resources/file/operations/commands/restore-many/types.d.ts +1 -1
- package/dist/types/src/application/resources/file/operations/commands/restore-many/types.d.ts.map +1 -1
- package/dist/types/src/application/resources/file/operations/commands/update/validation/schema.d.ts.map +1 -1
- package/dist/types/src/application/resources/file/operations/index.d.ts +1 -1
- package/dist/types/src/application/resources/file/operations/index.d.ts.map +1 -1
- package/dist/types/src/application/resources/file/operations/queries/find-list-cards/types.d.ts +2 -1
- package/dist/types/src/application/resources/file/operations/queries/find-list-cards/types.d.ts.map +1 -1
- package/dist/types/src/application/resources/file/operations/queries/find-list-cards/validation/schema.d.ts +1 -1
- package/dist/types/src/application/resources/file/operations/queries/find-relations/cache.d.ts +4 -0
- package/dist/types/src/application/resources/file/operations/queries/find-relations/cache.d.ts.map +1 -0
- package/dist/types/src/application/resources/file/operations/queries/find-relations/file-find-relations-query.d.ts +8 -0
- package/dist/types/src/application/resources/file/operations/queries/find-relations/file-find-relations-query.d.ts.map +1 -0
- package/dist/types/src/application/resources/file/operations/queries/find-relations/index.d.ts +3 -0
- package/dist/types/src/application/resources/file/operations/queries/find-relations/index.d.ts.map +1 -0
- package/dist/types/src/application/resources/file/operations/queries/find-relations/types.d.ts +11 -0
- package/dist/types/src/application/resources/file/operations/queries/find-relations/types.d.ts.map +1 -0
- package/dist/types/src/application/resources/file/operations/queries/index.d.ts +3 -0
- package/dist/types/src/application/resources/file/operations/queries/index.d.ts.map +1 -1
- package/dist/types/src/application/resources/file/operations/queries/validate-create/file-validate-create-query.d.ts +12 -0
- package/dist/types/src/application/resources/file/operations/queries/validate-create/file-validate-create-query.d.ts.map +1 -0
- package/dist/types/src/application/resources/file/operations/queries/validate-create/index.d.ts +3 -0
- package/dist/types/src/application/resources/file/operations/queries/validate-create/index.d.ts.map +1 -0
- package/dist/types/src/application/resources/file/operations/queries/validate-create/types.d.ts +16 -0
- package/dist/types/src/application/resources/file/operations/queries/validate-create/types.d.ts.map +1 -0
- package/dist/types/src/application/resources/file/operations/queries/validate-create/validation/schema.d.ts +9 -0
- package/dist/types/src/application/resources/file/operations/queries/validate-create/validation/schema.d.ts.map +1 -0
- package/dist/types/src/application/resources/file/operations/queries/validate-create/validation/validate-input.d.ts +3 -0
- package/dist/types/src/application/resources/file/operations/queries/validate-create/validation/validate-input.d.ts.map +1 -0
- package/dist/types/src/application/resources/file/operations/queries/validate-update/file-validate-update-query.d.ts +14 -0
- package/dist/types/src/application/resources/file/operations/queries/validate-update/file-validate-update-query.d.ts.map +1 -0
- package/dist/types/src/application/resources/file/operations/queries/validate-update/index.d.ts +3 -0
- package/dist/types/src/application/resources/file/operations/queries/validate-update/index.d.ts.map +1 -0
- package/dist/types/src/application/resources/file/operations/queries/validate-update/types.d.ts +9 -0
- package/dist/types/src/application/resources/file/operations/queries/validate-update/types.d.ts.map +1 -0
- package/dist/types/src/application/resources/file/ports.d.ts +38 -8
- package/dist/types/src/application/resources/file/ports.d.ts.map +1 -1
- package/dist/types/src/application/resources/file/projections/detail.d.ts +1 -1
- package/dist/types/src/application/resources/file/projections/detail.d.ts.map +1 -1
- package/dist/types/src/application/resources/file/projections/index.d.ts +1 -0
- package/dist/types/src/application/resources/file/projections/index.d.ts.map +1 -1
- package/dist/types/src/application/resources/file/projections/relations.d.ts +12 -0
- package/dist/types/src/application/resources/file/projections/relations.d.ts.map +1 -0
- package/dist/types/src/application/resources/file/validation/file-translations-schema.d.ts +8 -0
- package/dist/types/src/application/resources/file/validation/file-translations-schema.d.ts.map +1 -0
- package/dist/types/src/application/resources/inquiry/operations/queries/find/inquiry-find-query.d.ts.map +1 -1
- package/dist/types/src/application/resources/inquiry/operations/queries/find-list-cards/types.d.ts +2 -2
- package/dist/types/src/application/resources/inquiry/operations/queries/find-list-cards/types.d.ts.map +1 -1
- package/dist/types/src/application/resources/post/index.d.ts +3 -3
- package/dist/types/src/application/resources/post/index.d.ts.map +1 -1
- package/dist/types/src/application/resources/post/operations/commands/create/validation/schema.d.ts +8 -2
- package/dist/types/src/application/resources/post/operations/commands/create/validation/schema.d.ts.map +1 -1
- package/dist/types/src/application/resources/post/operations/commands/delete/cache.d.ts +1 -1
- package/dist/types/src/application/resources/post/operations/commands/delete/cache.d.ts.map +1 -1
- package/dist/types/src/application/resources/post/operations/commands/delete/types.d.ts +1 -1
- package/dist/types/src/application/resources/post/operations/commands/delete/types.d.ts.map +1 -1
- package/dist/types/src/application/resources/post/operations/commands/update/post-update-command.d.ts +1 -1
- package/dist/types/src/application/resources/post/operations/commands/update/post-update-command.d.ts.map +1 -1
- package/dist/types/src/application/resources/post/operations/commands/update/validation/schema.d.ts +8 -2
- package/dist/types/src/application/resources/post/operations/commands/update/validation/schema.d.ts.map +1 -1
- package/dist/types/src/application/resources/post/operations/commands/update/validation/validate-input.d.ts.map +1 -1
- package/dist/types/src/application/resources/post/operations/index.d.ts +1 -1
- package/dist/types/src/application/resources/post/operations/index.d.ts.map +1 -1
- package/dist/types/src/application/resources/post/operations/queries/find-detail/validation/validate-input.d.ts.map +1 -1
- package/dist/types/src/application/resources/post/operations/queries/find-list-cards/cache.d.ts.map +1 -1
- package/dist/types/src/application/resources/post/operations/queries/find-list-cards/validation/schema.d.ts +1 -0
- package/dist/types/src/application/resources/post/operations/queries/find-list-cards/validation/schema.d.ts.map +1 -1
- package/dist/types/src/application/resources/post/operations/queries/find-relations/cache.d.ts +4 -0
- package/dist/types/src/application/resources/post/operations/queries/find-relations/cache.d.ts.map +1 -0
- package/dist/types/src/application/resources/post/operations/queries/find-relations/index.d.ts +3 -0
- package/dist/types/src/application/resources/post/operations/queries/find-relations/index.d.ts.map +1 -0
- package/dist/types/src/application/resources/post/operations/queries/find-relations/post-find-relations-query.d.ts +6 -0
- package/dist/types/src/application/resources/post/operations/queries/find-relations/post-find-relations-query.d.ts.map +1 -0
- package/dist/types/src/application/resources/post/operations/queries/find-relations/types.d.ts +11 -0
- package/dist/types/src/application/resources/post/operations/queries/find-relations/types.d.ts.map +1 -0
- package/dist/types/src/application/resources/post/operations/queries/index.d.ts +1 -0
- package/dist/types/src/application/resources/post/operations/queries/index.d.ts.map +1 -1
- package/dist/types/src/application/resources/post/ports.d.ts +8 -1
- package/dist/types/src/application/resources/post/ports.d.ts.map +1 -1
- package/dist/types/src/application/resources/post/projections/index.d.ts +1 -0
- package/dist/types/src/application/resources/post/projections/index.d.ts.map +1 -1
- package/dist/types/src/application/resources/post/projections/relations.d.ts +10 -0
- package/dist/types/src/application/resources/post/projections/relations.d.ts.map +1 -0
- package/dist/types/src/application/resources/seo-metadata/operations/commands/upsert/validation/schema.d.ts.map +1 -1
- package/dist/types/src/application/sessions/admin/authenticate/admin-session-authenticate.d.ts.map +1 -1
- package/dist/types/src/composition/create-sitero-server.d.ts.map +1 -1
- package/dist/types/src/composition/policies.d.ts +1 -0
- package/dist/types/src/composition/policies.d.ts.map +1 -1
- package/dist/types/src/composition/types.d.ts +9 -2
- package/dist/types/src/composition/types.d.ts.map +1 -1
- package/dist/types/src/contracts/email/template.d.ts +2 -0
- package/dist/types/src/contracts/email/template.d.ts.map +1 -1
- package/dist/types/src/contracts/operation/index.d.ts +1 -1
- package/dist/types/src/contracts/operation/index.d.ts.map +1 -1
- package/dist/types/src/contracts/operation/result.d.ts +11 -1
- package/dist/types/src/contracts/operation/result.d.ts.map +1 -1
- package/dist/types/src/contracts/storage/port.d.ts +1 -1
- package/dist/types/src/contracts/storage/port.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +6 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/kernel/index.d.ts +1 -1
- package/dist/types/src/kernel/index.d.ts.map +1 -1
- package/dist/types/src/kernel/operation/error/index.d.ts +2 -0
- package/dist/types/src/kernel/operation/error/index.d.ts.map +1 -0
- package/dist/types/src/kernel/operation/{error.d.ts → error/normalize-operation-error.d.ts} +2 -2
- package/dist/types/src/kernel/operation/error/normalize-operation-error.d.ts.map +1 -0
- package/dist/types/src/kernel/operation/error/zod.d.ts +17 -0
- package/dist/types/src/kernel/operation/error/zod.d.ts.map +1 -0
- package/dist/types/src/kernel/operation/index.d.ts +1 -1
- package/dist/types/src/kernel/operation/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/src/kernel/operation/error.js +0 -33
- package/dist/types/src/kernel/operation/error.d.ts.map +0 -1
|
@@ -6,7 +6,20 @@ import { textSchema, requiredTextSchema, singleItemSchema, multiItemsSchema } fr
|
|
|
6
6
|
const nullableText = textSchema().nullable();
|
|
7
7
|
const nullableNumber = z.number().nullable();
|
|
8
8
|
const nullableInteger = z.number().int().nullable();
|
|
9
|
+
const nullableReadTime = z.number().nonnegative().max(2147483647).multipleOf(1).nullable();
|
|
9
10
|
const data = z.array(z.any());
|
|
11
|
+
const externalLinks = z.array(
|
|
12
|
+
z.object({
|
|
13
|
+
name: textSchema(),
|
|
14
|
+
href: textSchema()
|
|
15
|
+
}).strict()
|
|
16
|
+
);
|
|
17
|
+
const faq = z.array(
|
|
18
|
+
z.object({
|
|
19
|
+
question: textSchema(),
|
|
20
|
+
answer: textSchema()
|
|
21
|
+
}).strict()
|
|
22
|
+
);
|
|
10
23
|
const postCreateInputSchema = () => z.object({
|
|
11
24
|
type: z.enum(POST_TYPES),
|
|
12
25
|
isActive: z.boolean(),
|
|
@@ -69,10 +82,10 @@ const postCreateInputSchema = () => z.object({
|
|
|
69
82
|
summary: nullableText,
|
|
70
83
|
description: nullableText,
|
|
71
84
|
content: nullableText,
|
|
72
|
-
externalLinks
|
|
73
|
-
faq
|
|
85
|
+
externalLinks,
|
|
86
|
+
faq,
|
|
74
87
|
toc: data,
|
|
75
|
-
readTime:
|
|
88
|
+
readTime: nullableReadTime,
|
|
76
89
|
wordCount: z.number().int().nonnegative(),
|
|
77
90
|
text1: nullableText,
|
|
78
91
|
text2: nullableText,
|
package/dist/src/application/resources/post/operations/commands/update/validation/validate-input.js
CHANGED
|
@@ -14,8 +14,7 @@ async function validateInput(input) {
|
|
|
14
14
|
const previousResult = await postQueryPort.findDetail({
|
|
15
15
|
id: validatedInput.id
|
|
16
16
|
});
|
|
17
|
-
if (!previousResult.post)
|
|
18
|
-
throw new PostNotFoundError();
|
|
17
|
+
if (!previousResult.post) throw new PostNotFoundError();
|
|
19
18
|
const normalizeItems = (items) => normalizeStringSelection(items.map((item) => item.id)).map((id2) => ({
|
|
20
19
|
id: id2
|
|
21
20
|
}));
|
|
@@ -24,6 +24,7 @@ const createPostFindListCardsCacheKey = (input) => createCacheKey("post", "find-
|
|
|
24
24
|
topicSlug: input.topicSlug,
|
|
25
25
|
parentId: input.parentId,
|
|
26
26
|
parentSlug: input.parentSlug,
|
|
27
|
+
authorId: input.authorId,
|
|
27
28
|
postIds: normalizeSelection(input.postIds),
|
|
28
29
|
excludeIds: normalizeSelection(input.excludeIds),
|
|
29
30
|
page: input.page,
|
package/dist/src/application/resources/post/operations/queries/find-list-cards/validation/schema.js
CHANGED
|
@@ -25,6 +25,7 @@ const postFindListCardsInputSchema = () => z.object({
|
|
|
25
25
|
topicSlug: textSchema().optional(),
|
|
26
26
|
parentId: idSchema().optional(),
|
|
27
27
|
parentSlug: textSchema().optional(),
|
|
28
|
+
authorId: idSchema().optional(),
|
|
28
29
|
postIds: z.array(idSchema()).optional(),
|
|
29
30
|
excludeIds: z.array(idSchema()).optional(),
|
|
30
31
|
page: z.number().int().positive().optional(),
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createCacheKey } from '../../../../../conventions/cache/cache-key.js';
|
|
2
|
+
import { createResourceTag, createRelationTag } from '../../../../../conventions/cache/cache-tag.js';
|
|
3
|
+
|
|
4
|
+
const createPostFindRelationsCacheKey = (input) => createCacheKey("post", "find-relations", { id: input.id });
|
|
5
|
+
const createPostFindRelationsCacheTags = (input) => [
|
|
6
|
+
createResourceTag("post", { id: input.id }),
|
|
7
|
+
createRelationTag("post", "child", { id: input.id }),
|
|
8
|
+
createRelationTag("post", "tagged-post", { id: input.id }),
|
|
9
|
+
createRelationTag("post", "referencing-post", { id: input.id })
|
|
10
|
+
].flat();
|
|
11
|
+
|
|
12
|
+
export { createPostFindRelationsCacheKey, createPostFindRelationsCacheTags };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { createOperation } from '../../../../../../kernel/operation/operation.js';
|
|
3
|
+
import { operationResult } from '../../../../../../contracts/operation/result.js';
|
|
4
|
+
import { idSchema } from '../../../../../conventions/validation/schema.js';
|
|
5
|
+
import { PostNotFoundError } from '../../../errors/operation-errors.js';
|
|
6
|
+
import { createPostFindRelationsCacheTags, createPostFindRelationsCacheKey } from './cache.js';
|
|
7
|
+
|
|
8
|
+
function createPostFindRelationsQuery(input) {
|
|
9
|
+
const { postRelationsQueryPort } = input;
|
|
10
|
+
return createOperation(
|
|
11
|
+
{
|
|
12
|
+
behavior: {
|
|
13
|
+
kind: "query",
|
|
14
|
+
cache: {
|
|
15
|
+
key: createPostFindRelationsCacheKey,
|
|
16
|
+
tags: createPostFindRelationsCacheTags
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
validate(input2) {
|
|
20
|
+
return z.object({ id: idSchema() }).parse(input2);
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
async (input2) => {
|
|
24
|
+
const relations = await postRelationsQueryPort.findRelations({
|
|
25
|
+
id: input2.id
|
|
26
|
+
});
|
|
27
|
+
return relations ? operationResult.success({ relations }) : operationResult.failure(new PostNotFoundError());
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { createPostFindRelationsQuery };
|
package/dist/src/application/resources/seo-metadata/operations/commands/upsert/validation/schema.js
CHANGED
|
@@ -27,7 +27,7 @@ const bcp47Schema = () => requiredTextSchema().regex(
|
|
|
27
27
|
);
|
|
28
28
|
const ogLocaleSchema = () => requiredTextSchema().regex(/^[a-z]{2}_[A-Z]{2}$/);
|
|
29
29
|
const nullableText = textSchema().nullable();
|
|
30
|
-
const
|
|
30
|
+
const nullableNonNegativeInt = z.number().nonnegative().max(2147483647).multipleOf(1).nullable();
|
|
31
31
|
const nullableDatetime = z.iso.datetime().nullable();
|
|
32
32
|
const jsonLd = z.array(z.object({}).passthrough());
|
|
33
33
|
const seoMetadataUpsertInputSchema = () => z.object({
|
|
@@ -51,8 +51,8 @@ const seoMetadataUpsertInputSchema = () => z.object({
|
|
|
51
51
|
ogImage: nullableText,
|
|
52
52
|
ogImageAlt: nullableText,
|
|
53
53
|
ogImageType: nullableText,
|
|
54
|
-
ogImageWidth:
|
|
55
|
-
ogImageHeight:
|
|
54
|
+
ogImageWidth: nullableNonNegativeInt,
|
|
55
|
+
ogImageHeight: nullableNonNegativeInt,
|
|
56
56
|
ogLocale: ogLocaleSchema().nullable(),
|
|
57
57
|
ogLocaleAlternate: z.array(ogLocaleSchema()),
|
|
58
58
|
ogArticlePublishedTime: nullableDatetime,
|
|
@@ -9,7 +9,7 @@ function createAdminSessionAuthenticate(params) {
|
|
|
9
9
|
adminRefreshTokenCommandPort
|
|
10
10
|
} = params;
|
|
11
11
|
return async function adminSessionAuthenticate(input) {
|
|
12
|
-
const { accessToken, refreshToken, ip
|
|
12
|
+
const { accessToken, refreshToken, ip } = input;
|
|
13
13
|
if (accessToken) {
|
|
14
14
|
try {
|
|
15
15
|
const { actorId, role, sessionId } = authenticationTokenPort.verifyAccessToken(accessToken);
|
|
@@ -33,6 +33,10 @@ function createAdminSessionAuthenticate(params) {
|
|
|
33
33
|
tokenHash
|
|
34
34
|
});
|
|
35
35
|
if (!storedRefreshToken) {
|
|
36
|
+
const replay = await adminRefreshTokenQueryPort.findReplay({ tokenHash });
|
|
37
|
+
if (replay) {
|
|
38
|
+
await adminRefreshTokenCommandPort.delete({ id: replay.sessionId });
|
|
39
|
+
}
|
|
36
40
|
return {
|
|
37
41
|
status: "unauthenticated",
|
|
38
42
|
shouldClearSession: true
|
|
@@ -45,7 +49,6 @@ function createAdminSessionAuthenticate(params) {
|
|
|
45
49
|
shouldClearSession: true
|
|
46
50
|
};
|
|
47
51
|
}
|
|
48
|
-
await adminRefreshTokenCommandPort.delete({ id: storedRefreshToken.id });
|
|
49
52
|
const admin = await adminQueryPort.find({ id: storedRefreshToken.adminId });
|
|
50
53
|
if (!admin) {
|
|
51
54
|
return {
|
|
@@ -53,25 +56,46 @@ function createAdminSessionAuthenticate(params) {
|
|
|
53
56
|
shouldClearSession: true
|
|
54
57
|
};
|
|
55
58
|
}
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
deviceInfo: deviceInfo ?? null,
|
|
59
|
+
const rotationRejected = new Error("Admin refresh-token rotation rejected");
|
|
60
|
+
let tokens;
|
|
61
|
+
let session;
|
|
62
|
+
try {
|
|
63
|
+
({ tokens, session } = await createAuthenticationTokens({
|
|
64
|
+
actor: {
|
|
65
|
+
type: "admin",
|
|
66
|
+
id: storedRefreshToken.adminId,
|
|
67
|
+
role: admin.role
|
|
68
|
+
},
|
|
69
|
+
refreshTokenTtlSeconds,
|
|
70
|
+
authenticationTokenPort,
|
|
71
|
+
createActorRefreshToken: async ({
|
|
70
72
|
expiresAt,
|
|
71
|
-
|
|
72
|
-
})
|
|
73
|
+
tokenHash: nextTokenHash
|
|
74
|
+
}) => {
|
|
75
|
+
const rotatedSession = await adminRefreshTokenCommandPort.rotate({
|
|
76
|
+
id: storedRefreshToken.id,
|
|
77
|
+
currentTokenHash: tokenHash,
|
|
78
|
+
nextTokenHash,
|
|
79
|
+
expiresAt,
|
|
80
|
+
lastIp: ip,
|
|
81
|
+
lastUsedAt: /* @__PURE__ */ new Date()
|
|
82
|
+
});
|
|
83
|
+
if (!rotatedSession) {
|
|
84
|
+
throw rotationRejected;
|
|
85
|
+
}
|
|
86
|
+
return rotatedSession;
|
|
87
|
+
}
|
|
88
|
+
}));
|
|
89
|
+
} catch (error) {
|
|
90
|
+
if (error !== rotationRejected) {
|
|
91
|
+
throw error;
|
|
73
92
|
}
|
|
74
|
-
|
|
93
|
+
await adminRefreshTokenCommandPort.delete({ id: storedRefreshToken.id });
|
|
94
|
+
return {
|
|
95
|
+
status: "unauthenticated",
|
|
96
|
+
shouldClearSession: true
|
|
97
|
+
};
|
|
98
|
+
}
|
|
75
99
|
return {
|
|
76
100
|
status: "authenticated",
|
|
77
101
|
actor: {
|
|
@@ -24,7 +24,10 @@ import { createConfigFindDetailQuery } from '../application/resources/config/ope
|
|
|
24
24
|
import { createConfigFindManyQuery } from '../application/resources/config/operations/queries/find-many/config-find-many-query.js';
|
|
25
25
|
import { createConfigUpdateCommand } from '../application/resources/config/operations/commands/update/config-update-command.js';
|
|
26
26
|
import { createFileFindDetailQuery } from '../application/resources/file/operations/queries/find-detail/file-find-detail-query.js';
|
|
27
|
+
import { createFileFindRelationsQuery } from '../application/resources/file/operations/queries/find-relations/file-find-relations-query.js';
|
|
27
28
|
import { createFileFindListCardsQuery } from '../application/resources/file/operations/queries/find-list-cards/file-find-list-cards-query.js';
|
|
29
|
+
import { createFileValidateCreateQuery } from '../application/resources/file/operations/queries/validate-create/file-validate-create-query.js';
|
|
30
|
+
import { createFileValidateUpdateQuery } from '../application/resources/file/operations/queries/validate-update/file-validate-update-query.js';
|
|
28
31
|
import { createFileCreateCommand } from '../application/resources/file/operations/commands/create/file-create-command.js';
|
|
29
32
|
import { createFileCreateManyCommand } from '../application/resources/file/operations/commands/create-many/file-create-many-command.js';
|
|
30
33
|
import { createFileReplaceContentCommand } from '../application/resources/file/operations/commands/replace-content/file-replace-content-command.js';
|
|
@@ -37,6 +40,7 @@ import { createInquiryDeleteCommand } from '../application/resources/inquiry/ope
|
|
|
37
40
|
import { createInquiryFindQuery } from '../application/resources/inquiry/operations/queries/find/inquiry-find-query.js';
|
|
38
41
|
import { createInquiryFindListCardsQuery } from '../application/resources/inquiry/operations/queries/find-list-cards/inquiry-find-list-cards-query.js';
|
|
39
42
|
import { createPostFindDetailQuery } from '../application/resources/post/operations/queries/find-detail/post-find-detail-query.js';
|
|
43
|
+
import { createPostFindRelationsQuery } from '../application/resources/post/operations/queries/find-relations/post-find-relations-query.js';
|
|
40
44
|
import { createPostFindManyQuery } from '../application/resources/post/operations/queries/find-many/post-find-many-query.js';
|
|
41
45
|
import { createPostFindListCardsQuery } from '../application/resources/post/operations/queries/find-list-cards/post-find-list-cards-query.js';
|
|
42
46
|
import { createPostCreateCommand } from '../application/resources/post/operations/commands/create/post-create-command.js';
|
|
@@ -70,12 +74,14 @@ function createSiteroServer(input) {
|
|
|
70
74
|
config: { configCommandPort, configQueryPort },
|
|
71
75
|
file: {
|
|
72
76
|
fileCommandPort,
|
|
77
|
+
filePurgePort,
|
|
73
78
|
fileQueryPort,
|
|
79
|
+
fileRelationsQueryPort,
|
|
74
80
|
fileReplaceContentPort,
|
|
75
81
|
storageRemovePort
|
|
76
82
|
},
|
|
77
83
|
inquiry: { inquiryCommandPort, inquiryQueryPort },
|
|
78
|
-
post: { postCommandPort, postQueryPort },
|
|
84
|
+
post: { postCommandPort, postQueryPort, postRelationsQueryPort },
|
|
79
85
|
seoMetadata: { seoMetadataCommandPort }
|
|
80
86
|
},
|
|
81
87
|
authentication: {
|
|
@@ -284,6 +290,13 @@ function createSiteroServer(input) {
|
|
|
284
290
|
})
|
|
285
291
|
},
|
|
286
292
|
file: {
|
|
293
|
+
validateCreate: createFileValidateCreateQuery({
|
|
294
|
+
authorization: resolveCmsAuthorization(filePolicies?.create)
|
|
295
|
+
}),
|
|
296
|
+
validateUpdate: createFileValidateUpdateQuery({
|
|
297
|
+
fileQueryPort,
|
|
298
|
+
authorization: resolveCmsAuthorization(filePolicies?.update)
|
|
299
|
+
}),
|
|
287
300
|
create: createFileCreateCommand({
|
|
288
301
|
fileCommandPort,
|
|
289
302
|
fileLookupPort: fileQueryPort,
|
|
@@ -319,7 +332,7 @@ function createSiteroServer(input) {
|
|
|
319
332
|
}),
|
|
320
333
|
purgeMany: createFilePurgeManyCommand({
|
|
321
334
|
authorization: resolveCmsAuthorization(filePolicies?.purgeMany),
|
|
322
|
-
|
|
335
|
+
filePurgePort,
|
|
323
336
|
fileQueryPort,
|
|
324
337
|
storageRemovePort,
|
|
325
338
|
observer
|
|
@@ -328,6 +341,10 @@ function createSiteroServer(input) {
|
|
|
328
341
|
fileQueryPort,
|
|
329
342
|
authorization: resolveCmsAuthorization(filePolicies?.findDetail)
|
|
330
343
|
}),
|
|
344
|
+
findRelations: createFileFindRelationsQuery({
|
|
345
|
+
fileRelationsQueryPort,
|
|
346
|
+
authorization: resolveCmsAuthorization(filePolicies?.findRelations)
|
|
347
|
+
}),
|
|
331
348
|
findListCards: createFileFindListCardsQuery({
|
|
332
349
|
fileQueryPort,
|
|
333
350
|
authorization: resolveCmsAuthorization(filePolicies?.findListCards)
|
|
@@ -384,6 +401,7 @@ function createSiteroServer(input) {
|
|
|
384
401
|
findDetail: createPostFindDetailQuery({
|
|
385
402
|
postQueryPort
|
|
386
403
|
}),
|
|
404
|
+
findRelations: createPostFindRelationsQuery({ postRelationsQueryPort }),
|
|
387
405
|
findListCards: createPostFindListCardsQuery({
|
|
388
406
|
postQueryPort
|
|
389
407
|
}),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { operationResult } from '../../contracts/operation/result.js';
|
|
2
2
|
import { createNoopRateLimiterPort } from '../../contracts/rate-limiter/port.js';
|
|
3
3
|
import { notifyObserverSafely } from '../observer/notify-observer-safely.js';
|
|
4
|
-
import { normalizeOperationError } from '../operation/error.js';
|
|
4
|
+
import { normalizeOperationError } from '../operation/error/normalize-operation-error.js';
|
|
5
5
|
import { normalizeOperationResult } from '../operation/result.js';
|
|
6
6
|
import { ensureAuthentication } from './authentication/ensure-authentication.js';
|
|
7
7
|
import { ensureAuthorization } from './authorization/ensure-authorization.js';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ZodError } from 'zod';
|
|
2
|
+
import { OperationError } from '../../../contracts/operation/error.js';
|
|
3
|
+
import { normalizeZodFieldError } from './zod.js';
|
|
4
|
+
|
|
5
|
+
function isOperationError(error) {
|
|
6
|
+
return error instanceof OperationError;
|
|
7
|
+
}
|
|
8
|
+
function normalizeOperationError(error) {
|
|
9
|
+
if (error instanceof ZodError) {
|
|
10
|
+
return {
|
|
11
|
+
code: "VALIDATION_FAILED",
|
|
12
|
+
fields: error.issues.map(normalizeZodFieldError)
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
if (isOperationError(error)) {
|
|
16
|
+
return {
|
|
17
|
+
code: error.code,
|
|
18
|
+
...error.details ? { details: error.details } : {},
|
|
19
|
+
...error.fields ? { fields: error.fields } : {}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
return { code: "INTERNAL_ERROR" };
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { normalizeOperationError };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
function normalizeZodIssueMeta(issue) {
|
|
2
|
+
if (issue.code === "too_small" && typeof issue.minimum === "number") {
|
|
3
|
+
return {
|
|
4
|
+
...typeof issue.origin === "string" ? { origin: issue.origin } : {},
|
|
5
|
+
minimum: issue.minimum,
|
|
6
|
+
...typeof issue.inclusive === "boolean" ? { inclusive: issue.inclusive } : {}
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
if (issue.code === "too_big" && typeof issue.maximum === "number") {
|
|
10
|
+
return {
|
|
11
|
+
...typeof issue.origin === "string" ? { origin: issue.origin } : {},
|
|
12
|
+
maximum: issue.maximum,
|
|
13
|
+
...typeof issue.inclusive === "boolean" ? { inclusive: issue.inclusive } : {}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
if (issue.code === "invalid_format" && typeof issue.format === "string") {
|
|
17
|
+
return {
|
|
18
|
+
format: issue.format,
|
|
19
|
+
...issue.format === "regex" && typeof issue.pattern === "string" ? { pattern: issue.pattern } : {}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
if (issue.code === "invalid_value" && Array.isArray(issue.values) && issue.values.every(
|
|
23
|
+
(value) => typeof value === "string" || typeof value === "number" || typeof value === "boolean"
|
|
24
|
+
)) {
|
|
25
|
+
return { values: issue.values };
|
|
26
|
+
}
|
|
27
|
+
if (issue.code === "invalid_type" && typeof issue.expected === "string") {
|
|
28
|
+
return {
|
|
29
|
+
expected: issue.expected,
|
|
30
|
+
...Object.hasOwn(issue, "input") ? {
|
|
31
|
+
received: issue.input === null ? "null" : Array.isArray(issue.input) ? "array" : typeof issue.input
|
|
32
|
+
} : {}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
return void 0;
|
|
36
|
+
}
|
|
37
|
+
function isStableCustomFieldErrorCode(message) {
|
|
38
|
+
return /^[A-Z][A-Z0-9_]+$/.test(message) || /^validation\.[a-z0-9._]+$/.test(message);
|
|
39
|
+
}
|
|
40
|
+
function normalizeZodFieldError(issue) {
|
|
41
|
+
const path = issue.path.map(
|
|
42
|
+
(segment) => typeof segment === "string" || typeof segment === "number" ? segment : String(segment)
|
|
43
|
+
);
|
|
44
|
+
if (issue.code === "custom" && isStableCustomFieldErrorCode(issue.message)) {
|
|
45
|
+
return { path, kind: "custom", code: issue.message };
|
|
46
|
+
}
|
|
47
|
+
const meta = normalizeZodIssueMeta(issue);
|
|
48
|
+
return {
|
|
49
|
+
path,
|
|
50
|
+
kind: "zod",
|
|
51
|
+
code: issue.code,
|
|
52
|
+
...meta ? { meta } : {}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export { normalizeZodFieldError };
|
|
@@ -19,6 +19,6 @@ export interface ResourceRelationMap {
|
|
|
19
19
|
"seo-metadata": never;
|
|
20
20
|
}
|
|
21
21
|
export type Relation<ResourceName extends Resource = Resource> = ResourceRelationMap[ResourceName];
|
|
22
|
-
export declare const QUERIES: readonly ["find", "find-detail", "find-many", "find-list-cards"];
|
|
22
|
+
export declare const QUERIES: readonly ["find", "find-detail", "find-relations", "find-many", "find-list-cards"];
|
|
23
23
|
export type Query = (typeof QUERIES)[number];
|
|
24
24
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/application/conventions/cache/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,eAAO,MAAM,KAAK;;;;;;CAMR,CAAC;AAKX,eAAO,MAAM,SAAS,gGAQZ,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAKlD,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,MAAM,SAAS,GAAG,cAAc,CAAC,CAAC;IACjE,qBAAqB,EAAE,KAAK,CAAC;IAC7B,MAAM,EAAE,aAAa,GAAG,MAAM,CAAC;IAC/B,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,KAAK,CAAC;IACf,IAAI,EACA,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,OAAO,GACP,KAAK,GACL,aAAa,GACb,cAAc,GACd,kBAAkB,GAClB,gBAAgB,GAChB,aAAa,GACb,eAAe,GACf,MAAM,GACN,cAAc,CAAC;IACnB,cAAc,EAAE,KAAK,CAAC;CACvB;AAED,MAAM,MAAM,QAAQ,CAAC,YAAY,SAAS,QAAQ,GAAG,QAAQ,IAC3D,mBAAmB,CAAC,YAAY,CAAC,CAAC;AAKpC,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/application/conventions/cache/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,eAAO,MAAM,KAAK;;;;;;CAMR,CAAC;AAKX,eAAO,MAAM,SAAS,gGAQZ,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAKlD,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,MAAM,SAAS,GAAG,cAAc,CAAC,CAAC;IACjE,qBAAqB,EAAE,KAAK,CAAC;IAC7B,MAAM,EAAE,aAAa,GAAG,MAAM,CAAC;IAC/B,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,KAAK,CAAC;IACf,IAAI,EACA,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,OAAO,GACP,KAAK,GACL,aAAa,GACb,cAAc,GACd,kBAAkB,GAClB,gBAAgB,GAChB,aAAa,GACb,eAAe,GACf,MAAM,GACN,cAAc,CAAC;IACnB,cAAc,EAAE,KAAK,CAAC;CACvB;AAED,MAAM,MAAM,QAAQ,CAAC,YAAY,SAAS,QAAQ,GAAG,QAAQ,IAC3D,mBAAmB,CAAC,YAAY,CAAC,CAAC;AAKpC,eAAO,MAAM,OAAO,oFAMV,CAAC;AAEX,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { AdminChangePasswordOperationFailure } from "./errors";
|
|
1
2
|
import type { adminChangePasswordInputSchema } from "./validation";
|
|
2
3
|
import type { Operation, OperationResult } from "../../../../../../kernel";
|
|
3
4
|
import type { AdminNotFoundError } from "../../../../../resources/admin";
|
|
4
|
-
import type { AdminChangePasswordOperationFailure } from "./errors";
|
|
5
5
|
import type z from "zod";
|
|
6
6
|
export interface AdminChangePasswordInput {
|
|
7
7
|
password: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/application/features/authentication/admin/operations/change-password/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/application/features/authentication/admin/operations/change-password/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC;AAED,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAClD,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG,eAAe,CAC9D,MAAM,EACN,mCAAmC,GAAG,kBAAkB,CACzD,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,SAAS,CAClD,wBAAwB,EACxB,iCAAiC,EACjC,kCAAkC,CACnC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { AdminMeOperationFailure } from "./errors";
|
|
1
2
|
import type { Operation, OperationResult } from "../../../../../../kernel";
|
|
2
3
|
import type { AdminNotFoundError } from "../../../../../resources/admin";
|
|
3
4
|
import type { AdminDetail } from "../../../../../resources/admin";
|
|
4
|
-
import type { AdminMeOperationFailure } from "./errors";
|
|
5
5
|
export interface AdminMeInput {
|
|
6
6
|
adminId: string | undefined;
|
|
7
7
|
}
|
package/dist/types/src/application/features/authentication/admin/operations/me/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/application/features/authentication/admin/operations/me/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/application/features/authentication/admin/operations/me/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAElE,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AAED,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAClD;IAAE,KAAK,EAAE,WAAW,CAAA;CAAE,EACtB,kBAAkB,GAAG,uBAAuB,CAC7C,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,SAAS,CACtC,YAAY,EACZ,YAAY,EACZ,sBAAsB,CACvB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { AdminResetPasswordOperationFailure } from "./errors";
|
|
1
2
|
import type { adminResetPasswordInputSchema } from "./validation";
|
|
2
3
|
import type { Operation, OperationResult } from "../../../../../../kernel";
|
|
3
|
-
import type { AdminResetPasswordOperationFailure } from "./errors";
|
|
4
4
|
import type z from "zod";
|
|
5
5
|
export interface AdminResetPasswordInput {
|
|
6
6
|
passwordResetToken: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/application/features/authentication/admin/operations/reset-password/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/application/features/authentication/admin/operations/reset-password/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,WAAW,uBAAuB;IACtC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,UAAU,CAAC,OAAO,6BAA6B,CAAC,CACjD,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG,eAAe,CAC7D,MAAM,EACN,kCAAkC,CACnC,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,SAAS,CACjD,uBAAuB,EACvB,gCAAgC,EAChC,iCAAiC,CAClC,CAAC"}
|
package/dist/types/src/application/features/authentication/admin/operations/verify-email/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { AdminVerifyEmailOperationFailure } from "./errors";
|
|
1
2
|
import type { adminVerifyEmailInputSchema } from "./validation";
|
|
2
3
|
import type { Operation, OperationResult } from "../../../../../../kernel";
|
|
3
|
-
import type { AdminVerifyEmailOperationFailure } from "./errors";
|
|
4
4
|
import type { AdminSafe } from "sitero-domain";
|
|
5
5
|
import type z from "zod";
|
|
6
6
|
export interface AdminVerifyEmailInput {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/application/features/authentication/admin/operations/verify-email/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/application/features/authentication/admin/operations/verify-email/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,sBAAsB,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAC/C,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG,eAAe,CAC3D;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,EACpB,gCAAgC,CACjC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,SAAS,CAC/C,qBAAqB,EACrB,8BAA8B,EAC9B,+BAA+B,CAChC,CAAC"}
|
package/dist/types/src/application/features/email-preview/operations/render-template/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Operation, OperationSuccess } from "../../../../../kernel";
|
|
2
1
|
import type { EmailTemplatePreview } from "../../../../../contracts/email";
|
|
2
|
+
import type { Operation, OperationSuccess } from "../../../../../kernel";
|
|
3
3
|
export interface EmailPreviewRenderTemplateInput {
|
|
4
4
|
key: string;
|
|
5
5
|
locale?: string | undefined;
|
package/dist/types/src/application/features/email-preview/operations/render-template/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../src/application/features/email-preview/operations/render-template/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../src/application/features/email-preview/operations/render-template/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzE,MAAM,WAAW,+BAA+B;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AAED,MAAM,MAAM,gCAAgC,GAC1C,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;AAEzC,MAAM,MAAM,mCAAmC,GAAG,SAAS,CACzD,+BAA+B,EAC/B,+BAA+B,EAC/B,gCAAgC,CACjC,CAAC"}
|
package/dist/types/src/application/features/inquiry/operations/submit/inquiry-submit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inquiry-submit.d.ts","sourceRoot":"","sources":["../../../../../../../../src/application/features/inquiry/operations/submit/inquiry-submit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,0CAA0C,EAAE,MAAM,6BAA6B,CAAC;AAC9F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AASxE,wBAAgB,4BAA4B,CAAC,KAAK,EAAE;IAClD,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,0CAA0C,EAAE,0CAA0C,CAAC;IACvF,eAAe,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;IACpD,QAAQ,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IACpC,SAAS,CAAC,EAAE,kBAAkB,CAAC,kBAAkB,CAAC,GAAG,SAAS,CAAC;CAChE,GAAG,sBAAsB,
|
|
1
|
+
{"version":3,"file":"inquiry-submit.d.ts","sourceRoot":"","sources":["../../../../../../../../src/application/features/inquiry/operations/submit/inquiry-submit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,0CAA0C,EAAE,MAAM,6BAA6B,CAAC;AAC9F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AASxE,wBAAgB,4BAA4B,CAAC,KAAK,EAAE;IAClD,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,0CAA0C,EAAE,0CAA0C,CAAC;IACvF,eAAe,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;IACpD,QAAQ,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IACpC,SAAS,CAAC,EAAE,kBAAkB,CAAC,kBAAkB,CAAC,GAAG,SAAS,CAAC;CAChE,GAAG,sBAAsB,CAqDzB"}
|
package/dist/types/src/application/features/uploads/constraints/create-storage-file-schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-storage-file-schema.d.ts","sourceRoot":"","sources":["../../../../../../../src/application/features/uploads/constraints/create-storage-file-schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,0EAA0E;AAC1E,wBAAgB,uBAAuB,CAAC,MAAM,CAAC,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"create-storage-file-schema.d.ts","sourceRoot":"","sources":["../../../../../../../src/application/features/uploads/constraints/create-storage-file-schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,0EAA0E;AAC1E,wBAAgB,uBAAuB,CAAC,MAAM,CAAC,EAAE,YAAY,yCAgB5D"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { UploadPolicy } from "../../types";
|
|
2
1
|
import type { UploadFileInput, UploadFileOperation } from "./types";
|
|
3
2
|
import type { StorageUploadPort } from "../../../../../contracts/storage";
|
|
4
3
|
import type { OperationAuthorization, OperationRateLimit } from "../../../../../kernel";
|
|
4
|
+
import type { UploadPolicy } from "../../types";
|
|
5
5
|
export declare function createUploadFileOperation(input: {
|
|
6
6
|
authorization: OperationAuthorization;
|
|
7
7
|
rateLimit?: OperationRateLimit<UploadFileInput> | undefined;
|
package/dist/types/src/application/features/uploads/operations/upload-file/upload-file.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-file.d.ts","sourceRoot":"","sources":["../../../../../../../../src/application/features/uploads/operations/upload-file/upload-file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"upload-file.d.ts","sourceRoot":"","sources":["../../../../../../../../src/application/features/uploads/operations/upload-file/upload-file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EACV,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE;IAC/C,aAAa,EAAE,sBAAsB,CAAC;IACtC,SAAS,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,GAAG,SAAS,CAAC;IAC5D,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,MAAM,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CACnC,GAAG,mBAAmB,CA6BtB"}
|
|
@@ -5,7 +5,13 @@ export interface UploadFilesInput {
|
|
|
5
5
|
files: StorageFile[];
|
|
6
6
|
}
|
|
7
7
|
export type UploadFilesResult = OperationSuccess<{
|
|
8
|
-
uploadedFiles: UploadedFile
|
|
8
|
+
uploadedFiles: (UploadedFile & {
|
|
9
|
+
index: number;
|
|
10
|
+
})[];
|
|
11
|
+
failed: {
|
|
12
|
+
index: number;
|
|
13
|
+
code: "INTERNAL_ERROR";
|
|
14
|
+
}[];
|
|
9
15
|
}>;
|
|
10
16
|
export type UploadFilesOperation = Operation<UploadFilesInput, UploadFilesInput, UploadFilesResult>;
|
|
11
17
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../src/application/features/uploads/operations/upload-files/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB;AAED,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,CAAC;IAC/C,aAAa,EAAE,YAAY,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../src/application/features/uploads/operations/upload-files/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB;AAED,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,CAAC;IAC/C,aAAa,EAAE,CAAC,YAAY,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;IACpD,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,gBAAgB,CAAA;KAAE,EAAE,CAAC;CACrD,CAAC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAC1C,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,CAClB,CAAC"}
|
package/dist/types/src/application/features/uploads/operations/upload-files/upload-files.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { UploadPolicy } from "../../types";
|
|
2
1
|
import type { UploadFilesInput, UploadFilesOperation } from "./types";
|
|
3
2
|
import type { StorageUploadPort } from "../../../../../contracts/storage";
|
|
4
3
|
import type { OperationAuthorization, OperationRateLimit } from "../../../../../kernel";
|
|
4
|
+
import type { UploadPolicy } from "../../types";
|
|
5
5
|
export declare function createUploadFilesOperation(input: {
|
|
6
6
|
authorization: OperationAuthorization;
|
|
7
7
|
rateLimit?: OperationRateLimit<UploadFilesInput> | undefined;
|
package/dist/types/src/application/features/uploads/operations/upload-files/upload-files.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-files.d.ts","sourceRoot":"","sources":["../../../../../../../../src/application/features/uploads/operations/upload-files/upload-files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"upload-files.d.ts","sourceRoot":"","sources":["../../../../../../../../src/application/features/uploads/operations/upload-files/upload-files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EACV,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAOhD,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAChD,aAAa,EAAE,sBAAsB,CAAC;IACtC,SAAS,CAAC,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,GAAG,SAAS,CAAC;IAC7D,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,MAAM,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CACnC,GAAG,oBAAoB,CA4DvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation-errors.d.ts","sourceRoot":"","sources":["../../../../../../../src/application/resources/admin/errors/operation-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAA2B,MAAM,SAAS,CAAC;AAErE,qBAAa,kBAAmB,SAAQ,cAAc,CACpD,OAAO,iBAAiB,CAAC,SAAS,CACnC;;CAKA;AAED,qBAAa,4BAA6B,SAAQ,cAAc;;
|
|
1
|
+
{"version":3,"file":"operation-errors.d.ts","sourceRoot":"","sources":["../../../../../../../src/application/resources/admin/errors/operation-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAA2B,MAAM,SAAS,CAAC;AAErE,qBAAa,kBAAmB,SAAQ,cAAc,CACpD,OAAO,iBAAiB,CAAC,SAAS,CACnC;;CAKA;AAED,qBAAa,4BAA6B,SAAQ,cAAc;;CAc/D;AAED,qBAAa,yBAA0B,SAAQ,cAAc;;CAK5D;AAED,qBAAa,yBAA0B,SAAQ,cAAc;;CAK5D;AAED,qBAAa,yBAA0B,SAAQ,cAAc;;CAK5D;AAED,qBAAa,uBAAwB,SAAQ,cAAc;;CAK1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-refresh-token-delete-command.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/application/resources/admin-refresh-token/operations/commands/delete/admin-refresh-token-delete-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EACV,4BAA4B,EAC5B,0BAA0B,EAC3B,MAAM,gBAAgB,CAAC;AASxB,wBAAgB,oCAAoC,CAAC,KAAK,EAAE;IAC1D,aAAa,EAAE,sBAAsB,CAAC;IACtC,0BAA0B,EAAE,0BAA0B,CAAC;IACvD,4BAA4B,EAAE,4BAA4B,CAAC;CAC5D,GAAG,8BAA8B,
|
|
1
|
+
{"version":3,"file":"admin-refresh-token-delete-command.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/application/resources/admin-refresh-token/operations/commands/delete/admin-refresh-token-delete-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EACV,4BAA4B,EAC5B,0BAA0B,EAC3B,MAAM,gBAAgB,CAAC;AASxB,wBAAgB,oCAAoC,CAAC,KAAK,EAAE;IAC1D,aAAa,EAAE,sBAAsB,CAAC;IACtC,0BAA0B,EAAE,0BAA0B,CAAC;IACvD,4BAA4B,EAAE,4BAA4B,CAAC;CAC5D,GAAG,8BAA8B,CA2CjC"}
|
|
@@ -13,6 +13,19 @@ export interface AdminRefreshTokenFindManyCriteria {
|
|
|
13
13
|
}
|
|
14
14
|
/** Adapter write contract for one Admin Refresh Token. */
|
|
15
15
|
export type AdminRefreshTokenCreateInput = AdminRefreshTokenData;
|
|
16
|
+
/** Atomically replaces the active credential for one logical session. */
|
|
17
|
+
export interface AdminRefreshTokenRotateInput {
|
|
18
|
+
id: string;
|
|
19
|
+
currentTokenHash: string;
|
|
20
|
+
nextTokenHash: string;
|
|
21
|
+
expiresAt: Date;
|
|
22
|
+
lastIp: string;
|
|
23
|
+
lastUsedAt: Date;
|
|
24
|
+
}
|
|
25
|
+
/** A consumed credential identifies the logical session whose token replayed. */
|
|
26
|
+
export interface AdminRefreshTokenReplayLookup {
|
|
27
|
+
sessionId: string;
|
|
28
|
+
}
|
|
16
29
|
/** Adapter write contract for revoking Admin Refresh Token sessions. */
|
|
17
30
|
export interface AdminRefreshTokenDeleteManyInput {
|
|
18
31
|
adminId: string;
|
|
@@ -20,6 +33,7 @@ export interface AdminRefreshTokenDeleteManyInput {
|
|
|
20
33
|
}
|
|
21
34
|
export interface AdminRefreshTokenCommandPort {
|
|
22
35
|
create(input: AdminRefreshTokenCreateInput): Promise<AdminRefreshToken>;
|
|
36
|
+
rotate(input: AdminRefreshTokenRotateInput): Promise<AdminRefreshToken | null>;
|
|
23
37
|
delete(input: {
|
|
24
38
|
id: string;
|
|
25
39
|
}): Promise<void>;
|
|
@@ -28,6 +42,9 @@ export interface AdminRefreshTokenCommandPort {
|
|
|
28
42
|
}
|
|
29
43
|
export interface AdminRefreshTokenQueryPort {
|
|
30
44
|
find(input: AdminRefreshTokenLookupInput): Promise<AdminRefreshToken | null>;
|
|
45
|
+
findReplay(input: {
|
|
46
|
+
tokenHash: string;
|
|
47
|
+
}): Promise<AdminRefreshTokenReplayLookup | null>;
|
|
31
48
|
findMany(input: AdminRefreshTokenFindManyCriteria): Promise<AdminRefreshToken[]>;
|
|
32
49
|
}
|
|
33
50
|
//# sourceMappingURL=ports.d.ts.map
|