@yimingliao/cms 0.0.53 → 0.0.55
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.
|
@@ -338,4 +338,4 @@ type AdminCard = AdminSafe & {
|
|
|
338
338
|
translations: AdminTranslation[];
|
|
339
339
|
};
|
|
340
340
|
|
|
341
|
-
export { ADMIN_ROLES as A, type BaseTranslation as B, type DeviceInfo as D, type ExternalLink as E, type FolderFull as F, type MultiItems as M, type PostFull as P, type SeoMetadata as S, type TocItem as T, type
|
|
341
|
+
export { ADMIN_ROLES as A, type BaseTranslation as B, type DeviceInfo as D, type ExternalLink as E, type FolderFull as F, type MultiItems as M, type PostFull as P, type SeoMetadata as S, type TocItem as T, type Folder as a, type FileFull as b, type FileCard as c, type Admin as d, type AdminCard as e, type AdminFull as f, type AdminRefreshToken as g, type AdminRole as h, type AdminSafe as i, type AdminTranslation as j, type Alternate as k, FILE_TYPES as l, type Faq as m, type File as n, type FileTranslation as o, type FileType as p, POST_TYPES as q, type Post as r, type PostListCard as s, type PostTranslation as t, type PostType as u, type SingleItem as v, type Translation as w };
|
|
@@ -5,6 +5,24 @@ var ADMIN_ROLES = {
|
|
|
5
5
|
EDITOR: "EDITOR"
|
|
6
6
|
};
|
|
7
7
|
|
|
8
|
+
// src/domain/resources/file/utils/is-file-locked.ts
|
|
9
|
+
var isFileLocked = (file) => {
|
|
10
|
+
if (!file) return false;
|
|
11
|
+
if (!("adminAsAvatarImage" in file && "postsAsCoverImage" in file && "postsAsContentImage" in file && "postsAsImages1" in file && "postsAsImages2" in file && "postsAsImage1" in file && "postsAsImage2" in file && "postsAsImage3" in file && "postsAsImage4" in file)) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
const locked = file.adminAsAvatarImage.length > 0 || file.postsAsCoverImage.length > 0 || file.postsAsContentImage.length > 0 || file.postsAsImages1.length > 0 || file.postsAsImages2.length > 0 || file.postsAsImage1.length > 0 || file.postsAsImage2.length > 0 || file.postsAsImage3.length > 0 || file.postsAsImage4.length > 0;
|
|
15
|
+
return locked;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// src/domain/resources/folder/utils/is-folder-locked.ts
|
|
19
|
+
var isFolderLocked = (folder) => {
|
|
20
|
+
if (!folder) return true;
|
|
21
|
+
if (!("subFolders" in folder)) return false;
|
|
22
|
+
const locked = folder.subFolders?.length > 0 || folder.files?.length > 0;
|
|
23
|
+
return locked;
|
|
24
|
+
};
|
|
25
|
+
|
|
8
26
|
// src/domain/resources/post/props.ts
|
|
9
27
|
var POST_TYPES = {
|
|
10
28
|
TOPIC: "TOPIC",
|
|
@@ -43,4 +61,4 @@ var ROOT_FOLDER = {
|
|
|
43
61
|
var SIMPLE_UPLOAD_FOLDER_NAME = "simple-upload";
|
|
44
62
|
var SIMPLE_UPLOAD_FOLDER_KEY = `${SIMPLE_UPLOAD_FOLDER_NAME}`;
|
|
45
63
|
|
|
46
|
-
export { ADMIN_ROLES, POST_TYPES, ROOT_FOLDER, ROOT_FOLDER_ID, ROOT_FOLDER_NAME, SIMPLE_UPLOAD_FOLDER_KEY, SIMPLE_UPLOAD_FOLDER_NAME };
|
|
64
|
+
export { ADMIN_ROLES, POST_TYPES, ROOT_FOLDER, ROOT_FOLDER_ID, ROOT_FOLDER_NAME, SIMPLE_UPLOAD_FOLDER_KEY, SIMPLE_UPLOAD_FOLDER_NAME, isFileLocked, isFolderLocked };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { F as FolderFull, P as PostFull, B as BaseTranslation } from './card-
|
|
2
|
-
export { A as ADMIN_ROLES,
|
|
1
|
+
import { F as FolderFull, a as Folder, b as FileFull, c as FileCard, P as PostFull, B as BaseTranslation } from './card-BG2vtuIz.js';
|
|
2
|
+
export { A as ADMIN_ROLES, d as Admin, e as AdminCard, f as AdminFull, g as AdminRefreshToken, h as AdminRole, i as AdminSafe, j as AdminTranslation, k as Alternate, D as DeviceInfo, E as ExternalLink, l as FILE_TYPES, m as Faq, n as File, o as FileTranslation, p as FileType, M as MultiItems, q as POST_TYPES, r as Post, s as PostListCard, t as PostTranslation, u as PostType, S as SeoMetadata, v as SingleItem, T as TocItem, w as Translation } from './card-BG2vtuIz.js';
|
|
3
3
|
export { B as BlobFile } from './types-0oS1A2K5.js';
|
|
4
4
|
import { E as ErrorDetail, S as SuccessResult, a as ErrorResult } from './types-DHlRoJwv.js';
|
|
5
5
|
export { R as Result } from './types-DHlRoJwv.js';
|
|
6
6
|
import { Metadata } from 'next';
|
|
7
7
|
import { Robots } from 'next/dist/lib/metadata/types/metadata-types';
|
|
8
8
|
|
|
9
|
+
declare const isFolderLocked: (folder?: FolderFull | Folder) => boolean;
|
|
10
|
+
|
|
11
|
+
declare const isFileLocked: (file?: FileFull | FileCard | null) => boolean;
|
|
12
|
+
|
|
9
13
|
declare const ROOT_FOLDER_ID = "01ARZ3NDEKTSV4RRFFQ69G5FAV";
|
|
10
14
|
declare const ROOT_FOLDER_NAME = "ROOT";
|
|
11
15
|
declare const ROOT_FOLDER: FolderFull;
|
|
@@ -94,4 +98,4 @@ declare const SIZE: {
|
|
|
94
98
|
};
|
|
95
99
|
type SizeUnit = keyof typeof SIZE;
|
|
96
100
|
|
|
97
|
-
export { BaseTranslation, ErrorDetail, ErrorResult, type ErrorResultParams, FolderFull, OG_TYPE_ARRAY, type OgType, PostFull, ROOT_FOLDER, ROOT_FOLDER_ID, ROOT_FOLDER_NAME, SIMPLE_UPLOAD_FOLDER_KEY, SIMPLE_UPLOAD_FOLDER_NAME, SIZE, type SizeUnit, SuccessResult, type SuccessResultParams, TWITTER_CARD_ARRAY, type TwitterCard, classifyFileType, createBuildArticleMetadata, createBuildTranslations, createBuildWebsiteMetadata, findTranslation, formatFileSize, getMediaInfo, mimeToExtension, result, serializeJsonLd };
|
|
101
|
+
export { BaseTranslation, ErrorDetail, ErrorResult, type ErrorResultParams, FileCard, FileFull, Folder, FolderFull, OG_TYPE_ARRAY, type OgType, PostFull, ROOT_FOLDER, ROOT_FOLDER_ID, ROOT_FOLDER_NAME, SIMPLE_UPLOAD_FOLDER_KEY, SIMPLE_UPLOAD_FOLDER_NAME, SIZE, type SizeUnit, SuccessResult, type SuccessResultParams, TWITTER_CARD_ARRAY, type TwitterCard, classifyFileType, createBuildArticleMetadata, createBuildTranslations, createBuildWebsiteMetadata, findTranslation, formatFileSize, getMediaInfo, isFileLocked, isFolderLocked, mimeToExtension, result, serializeJsonLd };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ADMIN_ROLES, POST_TYPES, ROOT_FOLDER, ROOT_FOLDER_ID, ROOT_FOLDER_NAME, SIMPLE_UPLOAD_FOLDER_KEY, SIMPLE_UPLOAD_FOLDER_NAME } from './chunk-
|
|
1
|
+
export { ADMIN_ROLES, POST_TYPES, ROOT_FOLDER, ROOT_FOLDER_ID, ROOT_FOLDER_NAME, SIMPLE_UPLOAD_FOLDER_KEY, SIMPLE_UPLOAD_FOLDER_NAME, isFileLocked, isFolderLocked } from './chunk-FUAJWL2N.js';
|
|
2
2
|
export { FILE_TYPES, OG_TYPE_ARRAY, SIZE, TWITTER_CARD_ARRAY, classifyFileType, createBuildArticleMetadata, createBuildTranslations, createBuildWebsiteMetadata, findTranslation, formatFileSize, getMediaInfo, mimeToExtension, result, serializeJsonLd } from './chunk-YAUBKQVA.js';
|
package/dist/server/index.d.ts
CHANGED
|
@@ -7,12 +7,13 @@ import * as zod from 'zod';
|
|
|
7
7
|
import zod__default, { z, ZodType } from 'zod';
|
|
8
8
|
import { B as BlobFile } from '../types-0oS1A2K5.js';
|
|
9
9
|
import * as zod_v4_core from 'zod/v4/core';
|
|
10
|
-
import { T as TocItem,
|
|
10
|
+
import { T as TocItem, h as AdminRole, v as SingleItem, B as BaseTranslation, d as Admin, f as AdminFull, i as AdminSafe, D as DeviceInfo, g as AdminRefreshToken, n as File$1, b as FileFull, p as FileType, a as Folder, F as FolderFull, u as PostType, M as MultiItems, E as ExternalLink, m as Faq, r as Post, s as PostListCard, t as PostTranslation, P as PostFull, k as Alternate } from '../card-BG2vtuIz.js';
|
|
11
11
|
import * as nodemailer_lib_smtp_transport from 'nodemailer/lib/smtp-transport';
|
|
12
12
|
import nodemailer, { Transporter } from 'nodemailer';
|
|
13
13
|
import { BaseTranslator, LocaleMessages } from 'intor';
|
|
14
14
|
import { S as SuccessResult, R as Result } from '../types-DHlRoJwv.js';
|
|
15
15
|
import { NextResponse } from 'next/server';
|
|
16
|
+
import { S as StorageService } from '../types-J25u1G6t.js';
|
|
16
17
|
|
|
17
18
|
interface CreateJwtServiceParams {
|
|
18
19
|
defaultSecret: string;
|
|
@@ -225,8 +226,8 @@ declare function createRenderEmailTemplate({ siteName, webUrl, logoUrl, logger,
|
|
|
225
226
|
}): (templateKey: string, replacements?: Record<string, string>) => Promise<string>;
|
|
226
227
|
|
|
227
228
|
interface CreateParams$4 {
|
|
228
|
-
email: string;
|
|
229
229
|
role: AdminRole;
|
|
230
|
+
email: string;
|
|
230
231
|
passwordHash: string;
|
|
231
232
|
socialLinks: string[];
|
|
232
233
|
avatarImage: SingleItem;
|
|
@@ -244,11 +245,10 @@ interface CreateParams$4 {
|
|
|
244
245
|
}
|
|
245
246
|
interface UpdateParams$3 {
|
|
246
247
|
id: string;
|
|
247
|
-
email?: string;
|
|
248
248
|
role: AdminRole;
|
|
249
|
+
email?: string;
|
|
249
250
|
socialLinks: string[];
|
|
250
251
|
avatarImage: SingleItem;
|
|
251
|
-
emailVerifiedAt: Date | null;
|
|
252
252
|
translations: (BaseTranslation & {
|
|
253
253
|
name: string | null;
|
|
254
254
|
authorName: string | null;
|
|
@@ -260,11 +260,12 @@ interface UpdateParams$3 {
|
|
|
260
260
|
homeLocation: string | null;
|
|
261
261
|
nationality: string | null;
|
|
262
262
|
})[];
|
|
263
|
+
emailVerifiedAt: Date | null;
|
|
263
264
|
}
|
|
264
265
|
|
|
265
266
|
declare function createAdminCommandRepository(prisma: any): {
|
|
266
|
-
create: ({ avatarImage, translations,
|
|
267
|
-
update: ({ id, avatarImage, translations,
|
|
267
|
+
create: ({ role, email, passwordHash, socialLinks, avatarImage, translations, }: CreateParams$4) => Promise<Admin>;
|
|
268
|
+
update: ({ id, role, email, socialLinks, avatarImage, translations, emailVerifiedAt, }: UpdateParams$3) => Promise<Admin>;
|
|
268
269
|
delete: ({ id }: {
|
|
269
270
|
id: string;
|
|
270
271
|
}) => Promise<Admin>;
|
|
@@ -359,8 +360,8 @@ interface UpdateParams$2 {
|
|
|
359
360
|
}
|
|
360
361
|
|
|
361
362
|
declare function createFileCommandRepository(prisma: any): {
|
|
362
|
-
create: ({ fileMeta, folder, translations,
|
|
363
|
-
update: ({ file, id, fileMeta, folder, translations,
|
|
363
|
+
create: ({ key, checksum, fileMeta, width, height, duration, folder, translations, }: CreateParams$2) => Promise<FileFull>;
|
|
364
|
+
update: ({ file, id, key, checksum, fileMeta, width, height, duration, folder, translations, }: UpdateParams$2) => Promise<File$1>;
|
|
364
365
|
softDelete: ({ id }: {
|
|
365
366
|
id: string;
|
|
366
367
|
}) => Promise<File$1>;
|
|
@@ -875,11 +876,17 @@ interface ActionContext {
|
|
|
875
876
|
cryptoService: ReturnType<typeof createCryptoService>;
|
|
876
877
|
argon2Service: ReturnType<typeof createArgon2Service>;
|
|
877
878
|
cookieService: ReturnType<typeof createCookieService>;
|
|
879
|
+
storageService: StorageService;
|
|
878
880
|
};
|
|
879
881
|
repositories: {
|
|
880
882
|
adminQueryRepository: ReturnType<typeof createAdminQueryRepository>;
|
|
881
883
|
adminCommandRepository: ReturnType<typeof createAdminCommandRepository>;
|
|
884
|
+
adminRefreshTokenQueryRepository: ReturnType<typeof createAdminRefreshTokenQueryRepository>;
|
|
882
885
|
adminRefreshTokenCommandRepository: ReturnType<typeof createAdminRefreshTokenCommandRepository>;
|
|
886
|
+
folderQueryRepository: ReturnType<typeof createFolderQueryRepository>;
|
|
887
|
+
folderCommandRepository: ReturnType<typeof createFolderCommandRepository>;
|
|
888
|
+
fileQueryRepository: ReturnType<typeof createFileQueryRepository>;
|
|
889
|
+
fileCommandRepository: ReturnType<typeof createFileCommandRepository>;
|
|
883
890
|
};
|
|
884
891
|
useCases: {
|
|
885
892
|
authUseCases: ReturnType<typeof createAuthUseCases>;
|
|
@@ -976,6 +983,291 @@ declare function createResetPasswordAction(ctx: ActionContext): ({ formData, }:
|
|
|
976
983
|
formData: ResetPasswordFormData;
|
|
977
984
|
}) => Promise<Result<void>>;
|
|
978
985
|
|
|
986
|
+
declare const adminCreateValidator: (schemas: ReturnType<typeof createSchemas>) => zod.ZodObject<{
|
|
987
|
+
role: zod.ZodEnum<{
|
|
988
|
+
SUPER_ADMIN: "SUPER_ADMIN";
|
|
989
|
+
ADMIN: "ADMIN";
|
|
990
|
+
EDITOR: "EDITOR";
|
|
991
|
+
}>;
|
|
992
|
+
email: zod.ZodEmail;
|
|
993
|
+
password: zod.ZodString;
|
|
994
|
+
socialLinks: zod.ZodPipe<zod.ZodArray<zod.ZodPipe<zod.ZodTransform<{} | null | undefined, unknown>, zod.ZodNullable<zod.ZodURL>>>, zod.ZodTransform<string[], (string | null)[]>>;
|
|
995
|
+
avatarImage: zod.ZodNullable<zod.ZodObject<{
|
|
996
|
+
id: zod.ZodString;
|
|
997
|
+
}, zod_v4_core.$strip>>;
|
|
998
|
+
translations: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
|
|
999
|
+
locale: zod.ZodString;
|
|
1000
|
+
name: zod.ZodNullable<zod.ZodString>;
|
|
1001
|
+
authorName: zod.ZodNullable<zod.ZodString>;
|
|
1002
|
+
description: zod.ZodNullable<zod.ZodString>;
|
|
1003
|
+
jobTitle: zod.ZodNullable<zod.ZodString>;
|
|
1004
|
+
url: zod.ZodNullable<zod.ZodPipe<zod.ZodTransform<{} | null | undefined, unknown>, zod.ZodNullable<zod.ZodURL>>>;
|
|
1005
|
+
worksFor: zod.ZodNullable<zod.ZodString>;
|
|
1006
|
+
knowsAbout: zod.ZodPipe<zod.ZodArray<zod.ZodString>, zod.ZodTransform<string[], string[]>>;
|
|
1007
|
+
homeLocation: zod.ZodNullable<zod.ZodString>;
|
|
1008
|
+
nationality: zod.ZodNullable<zod.ZodString>;
|
|
1009
|
+
}, zod_v4_core.$strip>>, zod.ZodTransform<{
|
|
1010
|
+
locale: string;
|
|
1011
|
+
name: string | null;
|
|
1012
|
+
authorName: string | null;
|
|
1013
|
+
description: string | null;
|
|
1014
|
+
jobTitle: string | null;
|
|
1015
|
+
url: string | null;
|
|
1016
|
+
worksFor: string | null;
|
|
1017
|
+
knowsAbout: string[];
|
|
1018
|
+
homeLocation: string | null;
|
|
1019
|
+
nationality: string | null;
|
|
1020
|
+
}[], {
|
|
1021
|
+
locale: string;
|
|
1022
|
+
name: string | null;
|
|
1023
|
+
authorName: string | null;
|
|
1024
|
+
description: string | null;
|
|
1025
|
+
jobTitle: string | null;
|
|
1026
|
+
url: string | null;
|
|
1027
|
+
worksFor: string | null;
|
|
1028
|
+
knowsAbout: string[];
|
|
1029
|
+
homeLocation: string | null;
|
|
1030
|
+
nationality: string | null;
|
|
1031
|
+
}[]>>;
|
|
1032
|
+
}, zod_v4_core.$strip>;
|
|
1033
|
+
|
|
1034
|
+
type AdminCreateFormData = zod__default.infer<ReturnType<typeof adminCreateValidator>>;
|
|
1035
|
+
declare function createAdminCreateAction(ctx: ActionContext): ({ formData, }: {
|
|
1036
|
+
formData: AdminCreateFormData;
|
|
1037
|
+
}) => Promise<Result<{
|
|
1038
|
+
admin: Admin;
|
|
1039
|
+
}>>;
|
|
1040
|
+
|
|
1041
|
+
declare const adminUpdateValidator: (schemas: ReturnType<typeof createSchemas>, id: string) => zod.ZodObject<{
|
|
1042
|
+
role: zod.ZodEnum<{
|
|
1043
|
+
SUPER_ADMIN: "SUPER_ADMIN";
|
|
1044
|
+
ADMIN: "ADMIN";
|
|
1045
|
+
EDITOR: "EDITOR";
|
|
1046
|
+
}>;
|
|
1047
|
+
email: zod.ZodOptional<zod.ZodEmail>;
|
|
1048
|
+
socialLinks: zod.ZodPipe<zod.ZodArray<zod.ZodPipe<zod.ZodTransform<{} | null | undefined, unknown>, zod.ZodNullable<zod.ZodURL>>>, zod.ZodTransform<string[], (string | null)[]>>;
|
|
1049
|
+
avatarImage: zod.ZodNullable<zod.ZodObject<{
|
|
1050
|
+
id: zod.ZodString;
|
|
1051
|
+
}, zod_v4_core.$strip>>;
|
|
1052
|
+
translations: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
|
|
1053
|
+
locale: zod.ZodString;
|
|
1054
|
+
name: zod.ZodNullable<zod.ZodString>;
|
|
1055
|
+
authorName: zod.ZodNullable<zod.ZodString>;
|
|
1056
|
+
description: zod.ZodNullable<zod.ZodString>;
|
|
1057
|
+
jobTitle: zod.ZodNullable<zod.ZodString>;
|
|
1058
|
+
url: zod.ZodNullable<zod.ZodPipe<zod.ZodTransform<{} | null | undefined, unknown>, zod.ZodNullable<zod.ZodURL>>>;
|
|
1059
|
+
worksFor: zod.ZodNullable<zod.ZodString>;
|
|
1060
|
+
knowsAbout: zod.ZodPipe<zod.ZodArray<zod.ZodString>, zod.ZodTransform<string[], string[]>>;
|
|
1061
|
+
homeLocation: zod.ZodNullable<zod.ZodString>;
|
|
1062
|
+
nationality: zod.ZodNullable<zod.ZodString>;
|
|
1063
|
+
}, zod_v4_core.$strip>>, zod.ZodTransform<{
|
|
1064
|
+
locale: string;
|
|
1065
|
+
name: string | null;
|
|
1066
|
+
authorName: string | null;
|
|
1067
|
+
description: string | null;
|
|
1068
|
+
jobTitle: string | null;
|
|
1069
|
+
url: string | null;
|
|
1070
|
+
worksFor: string | null;
|
|
1071
|
+
knowsAbout: string[];
|
|
1072
|
+
homeLocation: string | null;
|
|
1073
|
+
nationality: string | null;
|
|
1074
|
+
}[], {
|
|
1075
|
+
locale: string;
|
|
1076
|
+
name: string | null;
|
|
1077
|
+
authorName: string | null;
|
|
1078
|
+
description: string | null;
|
|
1079
|
+
jobTitle: string | null;
|
|
1080
|
+
url: string | null;
|
|
1081
|
+
worksFor: string | null;
|
|
1082
|
+
knowsAbout: string[];
|
|
1083
|
+
homeLocation: string | null;
|
|
1084
|
+
nationality: string | null;
|
|
1085
|
+
}[]>>;
|
|
1086
|
+
}, zod_v4_core.$strip>;
|
|
1087
|
+
|
|
1088
|
+
type AdminUpdateFormData = zod__default.infer<ReturnType<typeof adminUpdateValidator>>;
|
|
1089
|
+
declare function createAdminUpdateAction(ctx: ActionContext): ({ id, formData, }: {
|
|
1090
|
+
id: string;
|
|
1091
|
+
formData: AdminUpdateFormData;
|
|
1092
|
+
}) => Promise<Result<{
|
|
1093
|
+
admin: Admin;
|
|
1094
|
+
}>>;
|
|
1095
|
+
|
|
1096
|
+
declare function createAdminDeleteAction(ctx: ActionContext): ({ targetId }: {
|
|
1097
|
+
targetId: string;
|
|
1098
|
+
}) => Promise<Result<void>>;
|
|
1099
|
+
|
|
1100
|
+
declare function createAdminFindFullAction(ctx: ActionContext): (params: {
|
|
1101
|
+
id?: string;
|
|
1102
|
+
email?: string;
|
|
1103
|
+
}) => Promise<Result<{
|
|
1104
|
+
admin: AdminFull;
|
|
1105
|
+
}>>;
|
|
1106
|
+
|
|
1107
|
+
declare function createAdminFindListCardsAction(ctx: ActionContext): (params: {
|
|
1108
|
+
searchString?: string;
|
|
1109
|
+
adminIds?: string[];
|
|
1110
|
+
page: number;
|
|
1111
|
+
pageSize: number;
|
|
1112
|
+
}) => Promise<Result<{
|
|
1113
|
+
items: AdminFull[];
|
|
1114
|
+
total: number;
|
|
1115
|
+
}>>;
|
|
1116
|
+
|
|
1117
|
+
declare function createAdminRefreshTokenDeleteAction(ctx: ActionContext): (tokenHash: string) => Promise<Result<void>>;
|
|
1118
|
+
|
|
1119
|
+
declare function createAdminRefreshTokenFindManyAction(ctx: ActionContext): ({ adminId, }: {
|
|
1120
|
+
adminId: string;
|
|
1121
|
+
}) => Promise<Result<{
|
|
1122
|
+
adminRefreshTokens: AdminRefreshToken[];
|
|
1123
|
+
currentToken: AdminRefreshToken;
|
|
1124
|
+
}>>;
|
|
1125
|
+
|
|
1126
|
+
declare const fileCreateValidator: (schemas: ReturnType<typeof createSchemas>) => zod.ZodObject<{
|
|
1127
|
+
key: zod.ZodString;
|
|
1128
|
+
checksum: zod.ZodString;
|
|
1129
|
+
fileMeta: zod.ZodObject<{
|
|
1130
|
+
type: zod.ZodString;
|
|
1131
|
+
size: zod.ZodPipe<zod.ZodTransform<number | undefined, unknown>, zod.ZodNumber>;
|
|
1132
|
+
name: zod.ZodString;
|
|
1133
|
+
}, zod_v4_core.$strip>;
|
|
1134
|
+
width: zod.ZodOptional<zod.ZodNullable<zod.ZodPipe<zod.ZodTransform<number | undefined, unknown>, zod.ZodNumber>>>;
|
|
1135
|
+
height: zod.ZodOptional<zod.ZodNullable<zod.ZodPipe<zod.ZodTransform<number | undefined, unknown>, zod.ZodNumber>>>;
|
|
1136
|
+
duration: zod.ZodOptional<zod.ZodNullable<zod.ZodPipe<zod.ZodTransform<number | undefined, unknown>, zod.ZodNumber>>>;
|
|
1137
|
+
folder: zod.ZodOptional<zod.ZodNullable<zod.ZodObject<{
|
|
1138
|
+
id: zod.ZodString;
|
|
1139
|
+
}, zod_v4_core.$strip>>>;
|
|
1140
|
+
folderKey: zod.ZodOptional<zod.ZodString>;
|
|
1141
|
+
translations: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
|
|
1142
|
+
locale: zod.ZodString;
|
|
1143
|
+
name: zod.ZodNullable<zod.ZodString>;
|
|
1144
|
+
alt: zod.ZodNullable<zod.ZodString>;
|
|
1145
|
+
}, zod_v4_core.$strip>>, zod.ZodTransform<{
|
|
1146
|
+
locale: string;
|
|
1147
|
+
name: string | null;
|
|
1148
|
+
alt: string | null;
|
|
1149
|
+
}[], {
|
|
1150
|
+
locale: string;
|
|
1151
|
+
name: string | null;
|
|
1152
|
+
alt: string | null;
|
|
1153
|
+
}[]>>;
|
|
1154
|
+
}, zod_v4_core.$strip>;
|
|
1155
|
+
|
|
1156
|
+
type FileCreateFormData = zod__default.infer<ReturnType<typeof fileCreateValidator>>;
|
|
1157
|
+
declare function createFileCreateAction(ctx: ActionContext): ({ formData, }: {
|
|
1158
|
+
formData: FileCreateFormData;
|
|
1159
|
+
}) => Promise<Result<{
|
|
1160
|
+
file: FileFull;
|
|
1161
|
+
}>>;
|
|
1162
|
+
|
|
1163
|
+
declare const fileCreateManyValidator: (schemas: ReturnType<typeof createSchemas>) => zod.ZodObject<{
|
|
1164
|
+
uploadResults: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
|
|
1165
|
+
key: zod.ZodString;
|
|
1166
|
+
checksum: zod.ZodString;
|
|
1167
|
+
fileMeta: zod.ZodObject<{
|
|
1168
|
+
type: zod.ZodString;
|
|
1169
|
+
size: zod.ZodPipe<zod.ZodTransform<number | undefined, unknown>, zod.ZodNumber>;
|
|
1170
|
+
name: zod.ZodString;
|
|
1171
|
+
}, zod_v4_core.$strip>;
|
|
1172
|
+
width: zod.ZodNullable<zod.ZodPipe<zod.ZodTransform<number | undefined, unknown>, zod.ZodNumber>>;
|
|
1173
|
+
height: zod.ZodNullable<zod.ZodPipe<zod.ZodTransform<number | undefined, unknown>, zod.ZodNumber>>;
|
|
1174
|
+
duration: zod.ZodNullable<zod.ZodPipe<zod.ZodTransform<number | undefined, unknown>, zod.ZodNumber>>;
|
|
1175
|
+
translations: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
|
|
1176
|
+
locale: zod.ZodString;
|
|
1177
|
+
name: zod.ZodNullable<zod.ZodString>;
|
|
1178
|
+
alt: zod.ZodNullable<zod.ZodString>;
|
|
1179
|
+
}, zod_v4_core.$strip>>, zod.ZodTransform<{
|
|
1180
|
+
locale: string;
|
|
1181
|
+
name: string | null;
|
|
1182
|
+
alt: string | null;
|
|
1183
|
+
}[], {
|
|
1184
|
+
locale: string;
|
|
1185
|
+
name: string | null;
|
|
1186
|
+
alt: string | null;
|
|
1187
|
+
}[]>>;
|
|
1188
|
+
}, zod_v4_core.$strip>>, zod.ZodTransform<{
|
|
1189
|
+
key: string;
|
|
1190
|
+
checksum: string;
|
|
1191
|
+
fileMeta: {
|
|
1192
|
+
type: string;
|
|
1193
|
+
size: number;
|
|
1194
|
+
name: string;
|
|
1195
|
+
};
|
|
1196
|
+
width: number | null;
|
|
1197
|
+
height: number | null;
|
|
1198
|
+
duration: number | null;
|
|
1199
|
+
translations: {
|
|
1200
|
+
locale: string;
|
|
1201
|
+
name: string | null;
|
|
1202
|
+
alt: string | null;
|
|
1203
|
+
}[];
|
|
1204
|
+
}[], {
|
|
1205
|
+
key: string;
|
|
1206
|
+
checksum: string;
|
|
1207
|
+
fileMeta: {
|
|
1208
|
+
type: string;
|
|
1209
|
+
size: number;
|
|
1210
|
+
name: string;
|
|
1211
|
+
};
|
|
1212
|
+
width: number | null;
|
|
1213
|
+
height: number | null;
|
|
1214
|
+
duration: number | null;
|
|
1215
|
+
translations: {
|
|
1216
|
+
locale: string;
|
|
1217
|
+
name: string | null;
|
|
1218
|
+
alt: string | null;
|
|
1219
|
+
}[];
|
|
1220
|
+
}[]>>;
|
|
1221
|
+
folder: zod.ZodOptional<zod.ZodNullable<zod.ZodObject<{
|
|
1222
|
+
id: zod.ZodString;
|
|
1223
|
+
}, zod_v4_core.$strip>>>;
|
|
1224
|
+
}, zod_v4_core.$strip>;
|
|
1225
|
+
|
|
1226
|
+
type FileCreateManyFormData = zod__default.infer<ReturnType<typeof fileCreateManyValidator>>;
|
|
1227
|
+
declare function createFileCreateManyAction(ctx: ActionContext): ({ formData, }: {
|
|
1228
|
+
formData: FileCreateManyFormData;
|
|
1229
|
+
}) => Promise<Result<{
|
|
1230
|
+
count: number;
|
|
1231
|
+
}>>;
|
|
1232
|
+
|
|
1233
|
+
declare function createFilePurgeManyAction(ctx: ActionContext): ({ formData, }: {
|
|
1234
|
+
formData: {
|
|
1235
|
+
ids: string[];
|
|
1236
|
+
};
|
|
1237
|
+
}) => Promise<Result<void>>;
|
|
1238
|
+
|
|
1239
|
+
declare function createFileRestoreManyAction(ctx: ActionContext): ({ formData, }: {
|
|
1240
|
+
formData: {
|
|
1241
|
+
ids: string[];
|
|
1242
|
+
};
|
|
1243
|
+
}) => Promise<Result<void>>;
|
|
1244
|
+
|
|
1245
|
+
declare function createFileSoftDeleteManyAction(ctx: ActionContext): ({ formData, }: {
|
|
1246
|
+
formData: {
|
|
1247
|
+
ids: string[];
|
|
1248
|
+
};
|
|
1249
|
+
}) => Promise<Result<void>>;
|
|
1250
|
+
|
|
1251
|
+
declare function createFileFindFullAction(ctx: ActionContext): (params: {
|
|
1252
|
+
id: string;
|
|
1253
|
+
}) => Promise<Result<{
|
|
1254
|
+
file: FileFull;
|
|
1255
|
+
}>>;
|
|
1256
|
+
|
|
1257
|
+
declare function createFileFindListCardsAction(ctx: ActionContext): (params: {
|
|
1258
|
+
searchString?: string;
|
|
1259
|
+
type: FileType | null;
|
|
1260
|
+
isDeleted?: boolean;
|
|
1261
|
+
isLocked?: boolean | null;
|
|
1262
|
+
folderId?: string;
|
|
1263
|
+
fileIds?: string[];
|
|
1264
|
+
page: number;
|
|
1265
|
+
pageSize: number;
|
|
1266
|
+
}) => Promise<Result<{
|
|
1267
|
+
items: FileFull[];
|
|
1268
|
+
total: number;
|
|
1269
|
+
}>>;
|
|
1270
|
+
|
|
979
1271
|
declare class ServerError extends Error {
|
|
980
1272
|
readonly i18nKey?: string;
|
|
981
1273
|
readonly statusCode?: number;
|
|
@@ -994,4 +1286,4 @@ declare class ServerError extends Error {
|
|
|
994
1286
|
static internalServerError(): ServerError;
|
|
995
1287
|
}
|
|
996
1288
|
|
|
997
|
-
export { ADMIN_ORDER_BY, type ActionContext, type ChangePasswordFormData, type EmailUnverifiedFormData, type ForgotPasswordFormData, ORDER_BY, POST_ORDER_BY, type RawCacheKey, type ResetPasswordFormData, ServerError, type SignInFormData, type VerifyEmailFormData, createAdminCommandRepository, createAdminQueryRepository, createAdminRefreshTokenCommandRepository, createAdminRefreshTokenQueryRepository, createArgon2Service, createAuthMiddleware, createAuthUseCases, createCache, createCacheResult, createChangePasswordAction, createCookieService, createCryptoService, createEmailUnverifiedAction, createEmailVerificationEmail, createExecuteAction, createExecuteApi, createExist, createFileCommandRepository, createFileQueryRepository, createFileSchema, createFolderCommandRepository, createFolderQueryRepository, createForgotPasswordAction, createForgotPasswordEmail, createIpRateLimiter, createJwtService, createMultiFileSchema, createPostCommandRepository, createPostQueryRepository, createRenderEmailTemplate, createResetPasswordAction, createSchemas, createSendEmail, createSeoMetadataCommandRepository, createSignInAction, createSignOutAction, createTocItemSchema, createTransporter, createUnique, createVerifyAccessToken, createVerifyAction, createVerifyEmailAction, createVerifyRefreshToken, createZod, normalizeCacheKey };
|
|
1289
|
+
export { ADMIN_ORDER_BY, type ActionContext, type AdminCreateFormData, type AdminUpdateFormData, type ChangePasswordFormData, type EmailUnverifiedFormData, type FileCreateFormData, type FileCreateManyFormData, type ForgotPasswordFormData, ORDER_BY, POST_ORDER_BY, type RawCacheKey, type ResetPasswordFormData, ServerError, type SignInFormData, type VerifyEmailFormData, createAdminCommandRepository, createAdminCreateAction, createAdminDeleteAction, createAdminFindFullAction, createAdminFindListCardsAction, createAdminQueryRepository, createAdminRefreshTokenCommandRepository, createAdminRefreshTokenDeleteAction, createAdminRefreshTokenFindManyAction, createAdminRefreshTokenQueryRepository, createAdminUpdateAction, createArgon2Service, createAuthMiddleware, createAuthUseCases, createCache, createCacheResult, createChangePasswordAction, createCookieService, createCryptoService, createEmailUnverifiedAction, createEmailVerificationEmail, createExecuteAction, createExecuteApi, createExist, createFileCommandRepository, createFileCreateAction, createFileCreateManyAction, createFileFindFullAction, createFileFindListCardsAction, createFilePurgeManyAction, createFileQueryRepository, createFileRestoreManyAction, createFileSchema, createFileSoftDeleteManyAction, createFolderCommandRepository, createFolderQueryRepository, createForgotPasswordAction, createForgotPasswordEmail, createIpRateLimiter, createJwtService, createMultiFileSchema, createPostCommandRepository, createPostQueryRepository, createRenderEmailTemplate, createResetPasswordAction, createSchemas, createSendEmail, createSeoMetadataCommandRepository, createSignInAction, createSignOutAction, createTocItemSchema, createTransporter, createUnique, createVerifyAccessToken, createVerifyAction, createVerifyEmailAction, createVerifyRefreshToken, createZod, normalizeCacheKey };
|