@yimingliao/cms 0.0.68 → 0.0.69
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/dist/server/index.d.ts +13 -25
- package/dist/server/index.js +7 -4
- package/package.json +1 -1
package/dist/server/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import * as zod from 'zod';
|
|
|
8
8
|
import zod__default, { z, ZodType } from 'zod';
|
|
9
9
|
import { B as BlobFile } from '../types-0oS1A2K5.js';
|
|
10
10
|
import * as zod_v4_core from 'zod/v4/core';
|
|
11
|
-
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,
|
|
11
|
+
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, M as MultiItems, E as ExternalLink, m as Faq, r as Post, u as PostType, s as PostListCard, t as PostTranslation, P as PostFull, k as Alternate, e as AdminCard, c as FileCard } from '../card-BG2vtuIz.js';
|
|
12
12
|
import * as nodemailer_lib_smtp_transport from 'nodemailer/lib/smtp-transport';
|
|
13
13
|
import nodemailer, { Transporter, SentMessageInfo } from 'nodemailer';
|
|
14
14
|
import { S as SuccessResult, R as Result } from '../types-DHlRoJwv.js';
|
|
@@ -443,7 +443,7 @@ declare function createFolderQueryRepository(prisma: PrismaClient): {
|
|
|
443
443
|
};
|
|
444
444
|
|
|
445
445
|
interface CreateParams {
|
|
446
|
-
type:
|
|
446
|
+
type: string;
|
|
447
447
|
isLocked: boolean;
|
|
448
448
|
isActive: boolean;
|
|
449
449
|
isIndexActive: boolean;
|
|
@@ -518,7 +518,7 @@ interface CreateParams {
|
|
|
518
518
|
}
|
|
519
519
|
interface UpdateParams {
|
|
520
520
|
id: string;
|
|
521
|
-
type:
|
|
521
|
+
type: string;
|
|
522
522
|
isLocked: boolean;
|
|
523
523
|
isActive: boolean;
|
|
524
524
|
isIndexActive: boolean;
|
|
@@ -593,8 +593,8 @@ interface UpdateParams {
|
|
|
593
593
|
}
|
|
594
594
|
|
|
595
595
|
declare function createPostCommandRepository(prisma: PrismaClient): {
|
|
596
|
-
create: ({ slug, author, topicId, parents, tags, relatedPosts, coverImage, contentImageIds, images1, images2, image1, image2, image3, image4, translations, ...params }: CreateParams) => Promise<Post>;
|
|
597
|
-
update: ({ id, slug, author, topicId, parents, tags, relatedPosts, coverImage, contentImageIds, images1, images2, image1, image2, image3, image4, translations, ...params }: UpdateParams) => Promise<Post>;
|
|
596
|
+
create: ({ slug, type, author, topicId, parents, tags, relatedPosts, coverImage, contentImageIds, images1, images2, image1, image2, image3, image4, translations, ...params }: CreateParams) => Promise<Post>;
|
|
597
|
+
update: ({ id, slug, type, author, topicId, parents, tags, relatedPosts, coverImage, contentImageIds, images1, images2, image1, image2, image3, image4, translations, ...params }: UpdateParams) => Promise<Post>;
|
|
598
598
|
delete: ({ id }: {
|
|
599
599
|
id: string;
|
|
600
600
|
}) => Promise<Post>;
|
|
@@ -1378,18 +1378,12 @@ declare function createFolderFindListCardsAction(ctx: ActionContext): (params: {
|
|
|
1378
1378
|
}>>;
|
|
1379
1379
|
|
|
1380
1380
|
declare const postCreateValidator: ({ type, topicId, schemas, tocItemSchema, }: {
|
|
1381
|
-
type:
|
|
1381
|
+
type: string;
|
|
1382
1382
|
topicId: string | null;
|
|
1383
1383
|
schemas: ReturnType<typeof createSchemas>;
|
|
1384
1384
|
tocItemSchema: ReturnType<typeof createTocItemSchema>;
|
|
1385
1385
|
}) => zod.ZodPipe<zod.ZodObject<{
|
|
1386
|
-
type: zod.
|
|
1387
|
-
TOPIC: "TOPIC";
|
|
1388
|
-
CATEGORY: "CATEGORY";
|
|
1389
|
-
POST: "POST";
|
|
1390
|
-
TAG: "TAG";
|
|
1391
|
-
PAGE: "PAGE";
|
|
1392
|
-
}>;
|
|
1386
|
+
type: zod.ZodString;
|
|
1393
1387
|
isLocked: zod.ZodBoolean;
|
|
1394
1388
|
isActive: zod.ZodBoolean;
|
|
1395
1389
|
isIndexActive: zod.ZodBoolean;
|
|
@@ -1622,7 +1616,7 @@ declare const postCreateValidator: ({ type, topicId, schemas, tocItemSchema, }:
|
|
|
1622
1616
|
data3: any[];
|
|
1623
1617
|
data4: any[];
|
|
1624
1618
|
}[];
|
|
1625
|
-
type:
|
|
1619
|
+
type: string;
|
|
1626
1620
|
isLocked: boolean;
|
|
1627
1621
|
isActive: boolean;
|
|
1628
1622
|
isIndexActive: boolean;
|
|
@@ -1689,7 +1683,7 @@ declare const postCreateValidator: ({ type, topicId, schemas, tocItemSchema, }:
|
|
|
1689
1683
|
data3: any[];
|
|
1690
1684
|
data4: any[];
|
|
1691
1685
|
}, {
|
|
1692
|
-
type:
|
|
1686
|
+
type: string;
|
|
1693
1687
|
isLocked: boolean;
|
|
1694
1688
|
isActive: boolean;
|
|
1695
1689
|
isIndexActive: boolean;
|
|
@@ -1813,18 +1807,12 @@ declare function createPostCreateAction(ctx: ActionContext): ({ formData, }: {
|
|
|
1813
1807
|
|
|
1814
1808
|
declare const postUpdateValidator: ({ id, type, topicId, schemas, tocItemSchema, }: {
|
|
1815
1809
|
id: string;
|
|
1816
|
-
type:
|
|
1810
|
+
type: string;
|
|
1817
1811
|
topicId: string | null;
|
|
1818
1812
|
schemas: ReturnType<typeof createSchemas>;
|
|
1819
1813
|
tocItemSchema: ReturnType<typeof createTocItemSchema>;
|
|
1820
1814
|
}) => zod.ZodPipe<zod.ZodObject<{
|
|
1821
|
-
type: zod.
|
|
1822
|
-
TOPIC: "TOPIC";
|
|
1823
|
-
CATEGORY: "CATEGORY";
|
|
1824
|
-
POST: "POST";
|
|
1825
|
-
TAG: "TAG";
|
|
1826
|
-
PAGE: "PAGE";
|
|
1827
|
-
}>;
|
|
1815
|
+
type: zod.ZodString;
|
|
1828
1816
|
isLocked: zod.ZodBoolean;
|
|
1829
1817
|
isActive: zod.ZodBoolean;
|
|
1830
1818
|
isIndexActive: zod.ZodBoolean;
|
|
@@ -2057,7 +2045,7 @@ declare const postUpdateValidator: ({ id, type, topicId, schemas, tocItemSchema,
|
|
|
2057
2045
|
data3: any[];
|
|
2058
2046
|
data4: any[];
|
|
2059
2047
|
}[];
|
|
2060
|
-
type:
|
|
2048
|
+
type: string;
|
|
2061
2049
|
isLocked: boolean;
|
|
2062
2050
|
isActive: boolean;
|
|
2063
2051
|
isIndexActive: boolean;
|
|
@@ -2124,7 +2112,7 @@ declare const postUpdateValidator: ({ id, type, topicId, schemas, tocItemSchema,
|
|
|
2124
2112
|
data3: any[];
|
|
2125
2113
|
data4: any[];
|
|
2126
2114
|
}, {
|
|
2127
|
-
type:
|
|
2115
|
+
type: string;
|
|
2128
2116
|
isLocked: boolean;
|
|
2129
2117
|
isActive: boolean;
|
|
2130
2118
|
isIndexActive: boolean;
|
package/dist/server/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ADMIN_ROLES, isFileLocked, isFolderLocked, ROOT_FOLDER_ID, ROOT_FOLDER
|
|
1
|
+
import { ADMIN_ROLES, isFileLocked, isFolderLocked, ROOT_FOLDER_ID, ROOT_FOLDER } from '../chunk-FUAJWL2N.js';
|
|
2
2
|
import { SIZE, result, datetimeToDb, jsonArrayToDb, mimeToExtension, classifyFileType, TWITTER_CARD_ARRAY, OG_TYPE_ARRAY } from '../chunk-N2PRNBP2.js';
|
|
3
3
|
import jwt from 'jsonwebtoken';
|
|
4
4
|
import argon2 from 'argon2';
|
|
@@ -1433,6 +1433,7 @@ function createFolderQueryRepository(prisma) {
|
|
|
1433
1433
|
function createPostCommandRepository(prisma) {
|
|
1434
1434
|
async function create({
|
|
1435
1435
|
slug,
|
|
1436
|
+
type,
|
|
1436
1437
|
// ------------------------------------
|
|
1437
1438
|
// relations
|
|
1438
1439
|
// ------------------------------------
|
|
@@ -1469,6 +1470,7 @@ function createPostCommandRepository(prisma) {
|
|
|
1469
1470
|
data: {
|
|
1470
1471
|
...params,
|
|
1471
1472
|
id,
|
|
1473
|
+
type,
|
|
1472
1474
|
// ------------------------------------------------------------------------
|
|
1473
1475
|
// states
|
|
1474
1476
|
// ------------------------------------------------------------------------
|
|
@@ -1516,6 +1518,7 @@ function createPostCommandRepository(prisma) {
|
|
|
1516
1518
|
async function update({
|
|
1517
1519
|
id,
|
|
1518
1520
|
slug,
|
|
1521
|
+
type,
|
|
1519
1522
|
// ------------------------------------
|
|
1520
1523
|
// relations
|
|
1521
1524
|
// ------------------------------------
|
|
@@ -1551,6 +1554,7 @@ function createPostCommandRepository(prisma) {
|
|
|
1551
1554
|
where: { id },
|
|
1552
1555
|
data: {
|
|
1553
1556
|
...params,
|
|
1557
|
+
type,
|
|
1554
1558
|
// ------------------------------------------------------------------------
|
|
1555
1559
|
// states
|
|
1556
1560
|
// ------------------------------------------------------------------------
|
|
@@ -3502,7 +3506,7 @@ var postCreateValidator = ({
|
|
|
3502
3506
|
schemas,
|
|
3503
3507
|
tocItemSchema
|
|
3504
3508
|
}) => schemas.z.object({
|
|
3505
|
-
type: schemas.
|
|
3509
|
+
type: schemas.text(),
|
|
3506
3510
|
// ----------------------------------------------------------------------------
|
|
3507
3511
|
// states
|
|
3508
3512
|
// ----------------------------------------------------------------------------
|
|
@@ -3681,8 +3685,7 @@ var postUpdateValidator = ({
|
|
|
3681
3685
|
schemas,
|
|
3682
3686
|
tocItemSchema
|
|
3683
3687
|
}) => schemas.z.object({
|
|
3684
|
-
type: schemas.
|
|
3685
|
-
// depth: schemas.z.number().nullable(),
|
|
3688
|
+
type: schemas.text(),
|
|
3686
3689
|
// ----------------------------------------------------------------------------
|
|
3687
3690
|
// states
|
|
3688
3691
|
// ----------------------------------------------------------------------------
|