@yimingliao/cms 0.0.58 → 0.0.60

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.
@@ -7,7 +7,7 @@ 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, 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';
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, e as AdminCard, c as FileCard } 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';
@@ -887,6 +887,8 @@ interface ActionContext {
887
887
  folderCommandRepository: ReturnType<typeof createFolderCommandRepository>;
888
888
  fileQueryRepository: ReturnType<typeof createFileQueryRepository>;
889
889
  fileCommandRepository: ReturnType<typeof createFileCommandRepository>;
890
+ postCommandRepository: ReturnType<typeof createPostCommandRepository>;
891
+ postQueryRepository: ReturnType<typeof createPostQueryRepository>;
890
892
  };
891
893
  useCases: {
892
894
  authUseCases: ReturnType<typeof createAuthUseCases>;
@@ -905,7 +907,10 @@ interface ActionContext {
905
907
  http: {
906
908
  headers: () => Promise<Headers>;
907
909
  };
908
- schemas: ReturnType<typeof createSchemas>;
910
+ schemas: {
911
+ schemas: ReturnType<typeof createSchemas>;
912
+ tocItemSchema: ReturnType<typeof createTocItemSchema>;
913
+ };
909
914
  config: {
910
915
  accessTokenName: string;
911
916
  refreshTokenName: string;
@@ -1370,6 +1375,942 @@ declare function createFolderFindListCardsAction(ctx: ActionContext): (params: {
1370
1375
  total: number;
1371
1376
  }>>;
1372
1377
 
1378
+ declare const postCreateValidator: ({ type, topicId, schemas, tocItemSchema, }: {
1379
+ type: PostType;
1380
+ topicId: string | null;
1381
+ schemas: ReturnType<typeof createSchemas>;
1382
+ tocItemSchema: ReturnType<typeof createTocItemSchema>;
1383
+ }) => zod.ZodPipe<zod.ZodObject<{
1384
+ type: zod.ZodEnum<{
1385
+ TOPIC: "TOPIC";
1386
+ CATEGORY: "CATEGORY";
1387
+ POST: "POST";
1388
+ TAG: "TAG";
1389
+ PAGE: "PAGE";
1390
+ }>;
1391
+ isLocked: zod.ZodBoolean;
1392
+ isActive: zod.ZodBoolean;
1393
+ isIndexActive: zod.ZodBoolean;
1394
+ index: zod.ZodNullable<zod.ZodPipe<zod.ZodTransform<number | undefined, unknown>, zod.ZodNumber>>;
1395
+ isSlugActive: zod.ZodBoolean;
1396
+ slug: zod.ZodNullable<zod.ZodString>;
1397
+ isFeatured: zod.ZodBoolean;
1398
+ isShownOnHome: zod.ZodBoolean;
1399
+ author: zod.ZodNullable<zod.ZodNullable<zod.ZodObject<{
1400
+ id: zod.ZodString;
1401
+ }, zod_v4_core.$strip>>>;
1402
+ topicId: zod.ZodNullable<zod.ZodString>;
1403
+ parents: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
1404
+ id: zod.ZodString;
1405
+ }, zod_v4_core.$strip>>, zod.ZodTransform<{
1406
+ id: string;
1407
+ }[], {
1408
+ id: string;
1409
+ }[]>>;
1410
+ tags: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
1411
+ id: zod.ZodString;
1412
+ }, zod_v4_core.$strip>>, zod.ZodTransform<{
1413
+ id: string;
1414
+ }[], {
1415
+ id: string;
1416
+ }[]>>;
1417
+ relatedPosts: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
1418
+ id: zod.ZodString;
1419
+ }, zod_v4_core.$strip>>, zod.ZodTransform<{
1420
+ id: string;
1421
+ }[], {
1422
+ id: string;
1423
+ }[]>>;
1424
+ coverImage: zod.ZodNullable<zod.ZodObject<{
1425
+ id: zod.ZodString;
1426
+ }, zod_v4_core.$strip>>;
1427
+ contentImageIds: zod.ZodPipe<zod.ZodArray<zod.ZodString>, zod.ZodTransform<string[], string[]>>;
1428
+ state1: zod.ZodBoolean;
1429
+ state2: zod.ZodBoolean;
1430
+ state3: zod.ZodBoolean;
1431
+ state4: zod.ZodBoolean;
1432
+ state5: zod.ZodBoolean;
1433
+ state6: zod.ZodBoolean;
1434
+ state7: zod.ZodBoolean;
1435
+ state8: zod.ZodBoolean;
1436
+ state9: zod.ZodBoolean;
1437
+ state10: zod.ZodBoolean;
1438
+ images1: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
1439
+ id: zod.ZodString;
1440
+ }, zod_v4_core.$strip>>, zod.ZodTransform<{
1441
+ id: string;
1442
+ }[], {
1443
+ id: string;
1444
+ }[]>>;
1445
+ images2: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
1446
+ id: zod.ZodString;
1447
+ }, zod_v4_core.$strip>>, zod.ZodTransform<{
1448
+ id: string;
1449
+ }[], {
1450
+ id: string;
1451
+ }[]>>;
1452
+ image1: zod.ZodNullable<zod.ZodObject<{
1453
+ id: zod.ZodString;
1454
+ }, zod_v4_core.$strip>>;
1455
+ image2: zod.ZodNullable<zod.ZodObject<{
1456
+ id: zod.ZodString;
1457
+ }, zod_v4_core.$strip>>;
1458
+ image3: zod.ZodNullable<zod.ZodObject<{
1459
+ id: zod.ZodString;
1460
+ }, zod_v4_core.$strip>>;
1461
+ image4: zod.ZodNullable<zod.ZodObject<{
1462
+ id: zod.ZodString;
1463
+ }, zod_v4_core.$strip>>;
1464
+ text1: zod.ZodNullable<zod.ZodString>;
1465
+ text2: zod.ZodNullable<zod.ZodString>;
1466
+ text3: zod.ZodNullable<zod.ZodString>;
1467
+ text4: zod.ZodNullable<zod.ZodString>;
1468
+ text5: zod.ZodNullable<zod.ZodString>;
1469
+ text6: zod.ZodNullable<zod.ZodString>;
1470
+ text7: zod.ZodNullable<zod.ZodString>;
1471
+ text8: zod.ZodNullable<zod.ZodString>;
1472
+ text9: zod.ZodNullable<zod.ZodString>;
1473
+ text10: zod.ZodNullable<zod.ZodString>;
1474
+ data1: zod.ZodPipe<zod.ZodArray<zod.ZodAny>, zod.ZodTransform<any[], any[]>>;
1475
+ data2: zod.ZodPipe<zod.ZodArray<zod.ZodAny>, zod.ZodTransform<any[], any[]>>;
1476
+ data3: zod.ZodPipe<zod.ZodArray<zod.ZodAny>, zod.ZodTransform<any[], any[]>>;
1477
+ data4: zod.ZodPipe<zod.ZodArray<zod.ZodAny>, zod.ZodTransform<any[], any[]>>;
1478
+ translations: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
1479
+ locale: zod.ZodString;
1480
+ title: zod.ZodNullable<zod.ZodString>;
1481
+ subtitle: zod.ZodNullable<zod.ZodString>;
1482
+ summary: zod.ZodNullable<zod.ZodString>;
1483
+ description: zod.ZodNullable<zod.ZodString>;
1484
+ content: zod.ZodNullable<zod.ZodString>;
1485
+ externalLinks: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
1486
+ name: zod.ZodString;
1487
+ href: zod.ZodString;
1488
+ }, zod_v4_core.$strip>>, zod.ZodTransform<{
1489
+ name: string;
1490
+ href: string;
1491
+ }[], {
1492
+ name: string;
1493
+ href: string;
1494
+ }[]>>;
1495
+ faq: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
1496
+ question: zod.ZodString;
1497
+ answer: zod.ZodString;
1498
+ }, zod_v4_core.$strip>>, zod.ZodTransform<{
1499
+ question: string;
1500
+ answer: string;
1501
+ }[], {
1502
+ question: string;
1503
+ answer: string;
1504
+ }[]>>;
1505
+ toc: zod.ZodPipe<zod.ZodArray<zod.ZodType<TocItem, unknown, zod_v4_core.$ZodTypeInternals<TocItem, unknown>>>, zod.ZodTransform<TocItem[], TocItem[]>>;
1506
+ readTime: zod.ZodNullable<zod.ZodPipe<zod.ZodTransform<number | undefined, unknown>, zod.ZodNumber>>;
1507
+ wordCount: zod.ZodPipe<zod.ZodTransform<number | undefined, unknown>, zod.ZodNumber>;
1508
+ text1: zod.ZodNullable<zod.ZodString>;
1509
+ text2: zod.ZodNullable<zod.ZodString>;
1510
+ text3: zod.ZodNullable<zod.ZodString>;
1511
+ text4: zod.ZodNullable<zod.ZodString>;
1512
+ text5: zod.ZodNullable<zod.ZodString>;
1513
+ text6: zod.ZodNullable<zod.ZodString>;
1514
+ text7: zod.ZodNullable<zod.ZodString>;
1515
+ text8: zod.ZodNullable<zod.ZodString>;
1516
+ text9: zod.ZodNullable<zod.ZodString>;
1517
+ text10: zod.ZodNullable<zod.ZodString>;
1518
+ data1: zod.ZodPipe<zod.ZodArray<zod.ZodAny>, zod.ZodTransform<any[], any[]>>;
1519
+ data2: zod.ZodPipe<zod.ZodArray<zod.ZodAny>, zod.ZodTransform<any[], any[]>>;
1520
+ data3: zod.ZodPipe<zod.ZodArray<zod.ZodAny>, zod.ZodTransform<any[], any[]>>;
1521
+ data4: zod.ZodPipe<zod.ZodArray<zod.ZodAny>, zod.ZodTransform<any[], any[]>>;
1522
+ }, zod_v4_core.$strip>>, zod.ZodTransform<{
1523
+ locale: string;
1524
+ title: string | null;
1525
+ subtitle: string | null;
1526
+ summary: string | null;
1527
+ description: string | null;
1528
+ content: string | null;
1529
+ externalLinks: {
1530
+ name: string;
1531
+ href: string;
1532
+ }[];
1533
+ faq: {
1534
+ question: string;
1535
+ answer: string;
1536
+ }[];
1537
+ toc: TocItem[];
1538
+ readTime: number | null;
1539
+ wordCount: number;
1540
+ text1: string | null;
1541
+ text2: string | null;
1542
+ text3: string | null;
1543
+ text4: string | null;
1544
+ text5: string | null;
1545
+ text6: string | null;
1546
+ text7: string | null;
1547
+ text8: string | null;
1548
+ text9: string | null;
1549
+ text10: string | null;
1550
+ data1: any[];
1551
+ data2: any[];
1552
+ data3: any[];
1553
+ data4: any[];
1554
+ }[], {
1555
+ locale: string;
1556
+ title: string | null;
1557
+ subtitle: string | null;
1558
+ summary: string | null;
1559
+ description: string | null;
1560
+ content: string | null;
1561
+ externalLinks: {
1562
+ name: string;
1563
+ href: string;
1564
+ }[];
1565
+ faq: {
1566
+ question: string;
1567
+ answer: string;
1568
+ }[];
1569
+ toc: TocItem[];
1570
+ readTime: number | null;
1571
+ wordCount: number;
1572
+ text1: string | null;
1573
+ text2: string | null;
1574
+ text3: string | null;
1575
+ text4: string | null;
1576
+ text5: string | null;
1577
+ text6: string | null;
1578
+ text7: string | null;
1579
+ text8: string | null;
1580
+ text9: string | null;
1581
+ text10: string | null;
1582
+ data1: any[];
1583
+ data2: any[];
1584
+ data3: any[];
1585
+ data4: any[];
1586
+ }[]>>;
1587
+ }, zod_v4_core.$strip>, zod.ZodTransform<{
1588
+ index: number | null;
1589
+ slug: string | null;
1590
+ translations: {
1591
+ readTime: number | null;
1592
+ locale: string;
1593
+ title: string | null;
1594
+ subtitle: string | null;
1595
+ summary: string | null;
1596
+ description: string | null;
1597
+ content: string | null;
1598
+ externalLinks: {
1599
+ name: string;
1600
+ href: string;
1601
+ }[];
1602
+ faq: {
1603
+ question: string;
1604
+ answer: string;
1605
+ }[];
1606
+ toc: TocItem[];
1607
+ wordCount: number;
1608
+ text1: string | null;
1609
+ text2: string | null;
1610
+ text3: string | null;
1611
+ text4: string | null;
1612
+ text5: string | null;
1613
+ text6: string | null;
1614
+ text7: string | null;
1615
+ text8: string | null;
1616
+ text9: string | null;
1617
+ text10: string | null;
1618
+ data1: any[];
1619
+ data2: any[];
1620
+ data3: any[];
1621
+ data4: any[];
1622
+ }[];
1623
+ type: "TOPIC" | "CATEGORY" | "POST" | "TAG" | "PAGE";
1624
+ isLocked: boolean;
1625
+ isActive: boolean;
1626
+ isIndexActive: boolean;
1627
+ isSlugActive: boolean;
1628
+ isFeatured: boolean;
1629
+ isShownOnHome: boolean;
1630
+ author: {
1631
+ id: string;
1632
+ } | null;
1633
+ topicId: string | null;
1634
+ parents: {
1635
+ id: string;
1636
+ }[];
1637
+ tags: {
1638
+ id: string;
1639
+ }[];
1640
+ relatedPosts: {
1641
+ id: string;
1642
+ }[];
1643
+ coverImage: {
1644
+ id: string;
1645
+ } | null;
1646
+ contentImageIds: string[];
1647
+ state1: boolean;
1648
+ state2: boolean;
1649
+ state3: boolean;
1650
+ state4: boolean;
1651
+ state5: boolean;
1652
+ state6: boolean;
1653
+ state7: boolean;
1654
+ state8: boolean;
1655
+ state9: boolean;
1656
+ state10: boolean;
1657
+ images1: {
1658
+ id: string;
1659
+ }[];
1660
+ images2: {
1661
+ id: string;
1662
+ }[];
1663
+ image1: {
1664
+ id: string;
1665
+ } | null;
1666
+ image2: {
1667
+ id: string;
1668
+ } | null;
1669
+ image3: {
1670
+ id: string;
1671
+ } | null;
1672
+ image4: {
1673
+ id: string;
1674
+ } | null;
1675
+ text1: string | null;
1676
+ text2: string | null;
1677
+ text3: string | null;
1678
+ text4: string | null;
1679
+ text5: string | null;
1680
+ text6: string | null;
1681
+ text7: string | null;
1682
+ text8: string | null;
1683
+ text9: string | null;
1684
+ text10: string | null;
1685
+ data1: any[];
1686
+ data2: any[];
1687
+ data3: any[];
1688
+ data4: any[];
1689
+ }, {
1690
+ type: "TOPIC" | "CATEGORY" | "POST" | "TAG" | "PAGE";
1691
+ isLocked: boolean;
1692
+ isActive: boolean;
1693
+ isIndexActive: boolean;
1694
+ index: number | null;
1695
+ isSlugActive: boolean;
1696
+ slug: string | null;
1697
+ isFeatured: boolean;
1698
+ isShownOnHome: boolean;
1699
+ author: {
1700
+ id: string;
1701
+ } | null;
1702
+ topicId: string | null;
1703
+ parents: {
1704
+ id: string;
1705
+ }[];
1706
+ tags: {
1707
+ id: string;
1708
+ }[];
1709
+ relatedPosts: {
1710
+ id: string;
1711
+ }[];
1712
+ coverImage: {
1713
+ id: string;
1714
+ } | null;
1715
+ contentImageIds: string[];
1716
+ state1: boolean;
1717
+ state2: boolean;
1718
+ state3: boolean;
1719
+ state4: boolean;
1720
+ state5: boolean;
1721
+ state6: boolean;
1722
+ state7: boolean;
1723
+ state8: boolean;
1724
+ state9: boolean;
1725
+ state10: boolean;
1726
+ images1: {
1727
+ id: string;
1728
+ }[];
1729
+ images2: {
1730
+ id: string;
1731
+ }[];
1732
+ image1: {
1733
+ id: string;
1734
+ } | null;
1735
+ image2: {
1736
+ id: string;
1737
+ } | null;
1738
+ image3: {
1739
+ id: string;
1740
+ } | null;
1741
+ image4: {
1742
+ id: string;
1743
+ } | null;
1744
+ text1: string | null;
1745
+ text2: string | null;
1746
+ text3: string | null;
1747
+ text4: string | null;
1748
+ text5: string | null;
1749
+ text6: string | null;
1750
+ text7: string | null;
1751
+ text8: string | null;
1752
+ text9: string | null;
1753
+ text10: string | null;
1754
+ data1: any[];
1755
+ data2: any[];
1756
+ data3: any[];
1757
+ data4: any[];
1758
+ translations: {
1759
+ locale: string;
1760
+ title: string | null;
1761
+ subtitle: string | null;
1762
+ summary: string | null;
1763
+ description: string | null;
1764
+ content: string | null;
1765
+ externalLinks: {
1766
+ name: string;
1767
+ href: string;
1768
+ }[];
1769
+ faq: {
1770
+ question: string;
1771
+ answer: string;
1772
+ }[];
1773
+ toc: TocItem[];
1774
+ readTime: number | null;
1775
+ wordCount: number;
1776
+ text1: string | null;
1777
+ text2: string | null;
1778
+ text3: string | null;
1779
+ text4: string | null;
1780
+ text5: string | null;
1781
+ text6: string | null;
1782
+ text7: string | null;
1783
+ text8: string | null;
1784
+ text9: string | null;
1785
+ text10: string | null;
1786
+ data1: any[];
1787
+ data2: any[];
1788
+ data3: any[];
1789
+ data4: any[];
1790
+ }[];
1791
+ }>>;
1792
+
1793
+ type PostCreateFormData = Omit<zod__default.infer<ReturnType<typeof postCreateValidator>>, "author" | "parents" | "tags" | "relatedPosts" | "coverImage" | "contentImageIds" | "images1" | "images2" | "image1" | "image2" | "image3" | "image4"> & {
1794
+ author: AdminCard | null;
1795
+ parents: PostListCard[];
1796
+ tags: PostListCard[];
1797
+ relatedPosts: PostListCard[];
1798
+ coverImage: FileCard | null;
1799
+ images1: FileCard[];
1800
+ images2: FileCard[];
1801
+ image1: FileCard | null;
1802
+ image2: FileCard | null;
1803
+ image3: FileCard | null;
1804
+ image4: FileCard | null;
1805
+ };
1806
+ declare function createPostCreateAction(ctx: ActionContext): ({ formData, }: {
1807
+ formData: PostCreateFormData;
1808
+ }) => Promise<Result<{
1809
+ post: Post;
1810
+ }>>;
1811
+
1812
+ declare const postUpdateValidator: ({ id, type, topicId, schemas, tocItemSchema, }: {
1813
+ id: string;
1814
+ type: PostType;
1815
+ topicId: string | null;
1816
+ schemas: ReturnType<typeof createSchemas>;
1817
+ tocItemSchema: ReturnType<typeof createTocItemSchema>;
1818
+ }) => zod.ZodPipe<zod.ZodObject<{
1819
+ type: zod.ZodEnum<{
1820
+ TOPIC: "TOPIC";
1821
+ CATEGORY: "CATEGORY";
1822
+ POST: "POST";
1823
+ TAG: "TAG";
1824
+ PAGE: "PAGE";
1825
+ }>;
1826
+ isLocked: zod.ZodBoolean;
1827
+ isActive: zod.ZodBoolean;
1828
+ isIndexActive: zod.ZodBoolean;
1829
+ index: zod.ZodNullable<zod.ZodPipe<zod.ZodTransform<number | undefined, unknown>, zod.ZodNumber>>;
1830
+ isSlugActive: zod.ZodBoolean;
1831
+ slug: zod.ZodNullable<zod.ZodString>;
1832
+ isFeatured: zod.ZodBoolean;
1833
+ isShownOnHome: zod.ZodBoolean;
1834
+ author: zod.ZodNullable<zod.ZodObject<{
1835
+ id: zod.ZodString;
1836
+ }, zod_v4_core.$strip>>;
1837
+ topicId: zod.ZodNullable<zod.ZodString>;
1838
+ parents: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
1839
+ id: zod.ZodString;
1840
+ }, zod_v4_core.$strip>>, zod.ZodTransform<{
1841
+ id: string;
1842
+ }[], {
1843
+ id: string;
1844
+ }[]>>;
1845
+ tags: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
1846
+ id: zod.ZodString;
1847
+ }, zod_v4_core.$strip>>, zod.ZodTransform<{
1848
+ id: string;
1849
+ }[], {
1850
+ id: string;
1851
+ }[]>>;
1852
+ relatedPosts: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
1853
+ id: zod.ZodString;
1854
+ }, zod_v4_core.$strip>>, zod.ZodTransform<{
1855
+ id: string;
1856
+ }[], {
1857
+ id: string;
1858
+ }[]>>;
1859
+ coverImage: zod.ZodNullable<zod.ZodObject<{
1860
+ id: zod.ZodString;
1861
+ }, zod_v4_core.$strip>>;
1862
+ contentImageIds: zod.ZodPipe<zod.ZodArray<zod.ZodString>, zod.ZodTransform<string[], string[]>>;
1863
+ state1: zod.ZodBoolean;
1864
+ state2: zod.ZodBoolean;
1865
+ state3: zod.ZodBoolean;
1866
+ state4: zod.ZodBoolean;
1867
+ state5: zod.ZodBoolean;
1868
+ state6: zod.ZodBoolean;
1869
+ state7: zod.ZodBoolean;
1870
+ state8: zod.ZodBoolean;
1871
+ state9: zod.ZodBoolean;
1872
+ state10: zod.ZodBoolean;
1873
+ images1: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
1874
+ id: zod.ZodString;
1875
+ }, zod_v4_core.$strip>>, zod.ZodTransform<{
1876
+ id: string;
1877
+ }[], {
1878
+ id: string;
1879
+ }[]>>;
1880
+ images2: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
1881
+ id: zod.ZodString;
1882
+ }, zod_v4_core.$strip>>, zod.ZodTransform<{
1883
+ id: string;
1884
+ }[], {
1885
+ id: string;
1886
+ }[]>>;
1887
+ image1: zod.ZodNullable<zod.ZodObject<{
1888
+ id: zod.ZodString;
1889
+ }, zod_v4_core.$strip>>;
1890
+ image2: zod.ZodNullable<zod.ZodObject<{
1891
+ id: zod.ZodString;
1892
+ }, zod_v4_core.$strip>>;
1893
+ image3: zod.ZodNullable<zod.ZodObject<{
1894
+ id: zod.ZodString;
1895
+ }, zod_v4_core.$strip>>;
1896
+ image4: zod.ZodNullable<zod.ZodObject<{
1897
+ id: zod.ZodString;
1898
+ }, zod_v4_core.$strip>>;
1899
+ text1: zod.ZodNullable<zod.ZodString>;
1900
+ text2: zod.ZodNullable<zod.ZodString>;
1901
+ text3: zod.ZodNullable<zod.ZodString>;
1902
+ text4: zod.ZodNullable<zod.ZodString>;
1903
+ text5: zod.ZodNullable<zod.ZodString>;
1904
+ text6: zod.ZodNullable<zod.ZodString>;
1905
+ text7: zod.ZodNullable<zod.ZodString>;
1906
+ text8: zod.ZodNullable<zod.ZodString>;
1907
+ text9: zod.ZodNullable<zod.ZodString>;
1908
+ text10: zod.ZodNullable<zod.ZodString>;
1909
+ data1: zod.ZodPipe<zod.ZodArray<zod.ZodAny>, zod.ZodTransform<any[], any[]>>;
1910
+ data2: zod.ZodPipe<zod.ZodArray<zod.ZodAny>, zod.ZodTransform<any[], any[]>>;
1911
+ data3: zod.ZodPipe<zod.ZodArray<zod.ZodAny>, zod.ZodTransform<any[], any[]>>;
1912
+ data4: zod.ZodPipe<zod.ZodArray<zod.ZodAny>, zod.ZodTransform<any[], any[]>>;
1913
+ translations: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
1914
+ locale: zod.ZodString;
1915
+ title: zod.ZodNullable<zod.ZodString>;
1916
+ subtitle: zod.ZodNullable<zod.ZodString>;
1917
+ summary: zod.ZodNullable<zod.ZodString>;
1918
+ description: zod.ZodNullable<zod.ZodString>;
1919
+ content: zod.ZodNullable<zod.ZodString>;
1920
+ externalLinks: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
1921
+ name: zod.ZodString;
1922
+ href: zod.ZodString;
1923
+ }, zod_v4_core.$strip>>, zod.ZodTransform<{
1924
+ name: string;
1925
+ href: string;
1926
+ }[], {
1927
+ name: string;
1928
+ href: string;
1929
+ }[]>>;
1930
+ faq: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
1931
+ question: zod.ZodString;
1932
+ answer: zod.ZodString;
1933
+ }, zod_v4_core.$strip>>, zod.ZodTransform<{
1934
+ question: string;
1935
+ answer: string;
1936
+ }[], {
1937
+ question: string;
1938
+ answer: string;
1939
+ }[]>>;
1940
+ toc: zod.ZodPipe<zod.ZodArray<zod.ZodType<TocItem, unknown, zod_v4_core.$ZodTypeInternals<TocItem, unknown>>>, zod.ZodTransform<TocItem[], TocItem[]>>;
1941
+ readTime: zod.ZodNullable<zod.ZodPipe<zod.ZodTransform<number | undefined, unknown>, zod.ZodNumber>>;
1942
+ wordCount: zod.ZodPipe<zod.ZodTransform<number | undefined, unknown>, zod.ZodNumber>;
1943
+ text1: zod.ZodNullable<zod.ZodString>;
1944
+ text2: zod.ZodNullable<zod.ZodString>;
1945
+ text3: zod.ZodNullable<zod.ZodString>;
1946
+ text4: zod.ZodNullable<zod.ZodString>;
1947
+ text5: zod.ZodNullable<zod.ZodString>;
1948
+ text6: zod.ZodNullable<zod.ZodString>;
1949
+ text7: zod.ZodNullable<zod.ZodString>;
1950
+ text8: zod.ZodNullable<zod.ZodString>;
1951
+ text9: zod.ZodNullable<zod.ZodString>;
1952
+ text10: zod.ZodNullable<zod.ZodString>;
1953
+ data1: zod.ZodPipe<zod.ZodArray<zod.ZodAny>, zod.ZodTransform<any[], any[]>>;
1954
+ data2: zod.ZodPipe<zod.ZodArray<zod.ZodAny>, zod.ZodTransform<any[], any[]>>;
1955
+ data3: zod.ZodPipe<zod.ZodArray<zod.ZodAny>, zod.ZodTransform<any[], any[]>>;
1956
+ data4: zod.ZodPipe<zod.ZodArray<zod.ZodAny>, zod.ZodTransform<any[], any[]>>;
1957
+ }, zod_v4_core.$strip>>, zod.ZodTransform<{
1958
+ locale: string;
1959
+ title: string | null;
1960
+ subtitle: string | null;
1961
+ summary: string | null;
1962
+ description: string | null;
1963
+ content: string | null;
1964
+ externalLinks: {
1965
+ name: string;
1966
+ href: string;
1967
+ }[];
1968
+ faq: {
1969
+ question: string;
1970
+ answer: string;
1971
+ }[];
1972
+ toc: TocItem[];
1973
+ readTime: number | null;
1974
+ wordCount: number;
1975
+ text1: string | null;
1976
+ text2: string | null;
1977
+ text3: string | null;
1978
+ text4: string | null;
1979
+ text5: string | null;
1980
+ text6: string | null;
1981
+ text7: string | null;
1982
+ text8: string | null;
1983
+ text9: string | null;
1984
+ text10: string | null;
1985
+ data1: any[];
1986
+ data2: any[];
1987
+ data3: any[];
1988
+ data4: any[];
1989
+ }[], {
1990
+ locale: string;
1991
+ title: string | null;
1992
+ subtitle: string | null;
1993
+ summary: string | null;
1994
+ description: string | null;
1995
+ content: string | null;
1996
+ externalLinks: {
1997
+ name: string;
1998
+ href: string;
1999
+ }[];
2000
+ faq: {
2001
+ question: string;
2002
+ answer: string;
2003
+ }[];
2004
+ toc: TocItem[];
2005
+ readTime: number | null;
2006
+ wordCount: number;
2007
+ text1: string | null;
2008
+ text2: string | null;
2009
+ text3: string | null;
2010
+ text4: string | null;
2011
+ text5: string | null;
2012
+ text6: string | null;
2013
+ text7: string | null;
2014
+ text8: string | null;
2015
+ text9: string | null;
2016
+ text10: string | null;
2017
+ data1: any[];
2018
+ data2: any[];
2019
+ data3: any[];
2020
+ data4: any[];
2021
+ }[]>>;
2022
+ }, zod_v4_core.$strip>, zod.ZodTransform<{
2023
+ index: number | null;
2024
+ slug: string | null;
2025
+ translations: {
2026
+ readTime: number | null;
2027
+ locale: string;
2028
+ title: string | null;
2029
+ subtitle: string | null;
2030
+ summary: string | null;
2031
+ description: string | null;
2032
+ content: string | null;
2033
+ externalLinks: {
2034
+ name: string;
2035
+ href: string;
2036
+ }[];
2037
+ faq: {
2038
+ question: string;
2039
+ answer: string;
2040
+ }[];
2041
+ toc: TocItem[];
2042
+ wordCount: number;
2043
+ text1: string | null;
2044
+ text2: string | null;
2045
+ text3: string | null;
2046
+ text4: string | null;
2047
+ text5: string | null;
2048
+ text6: string | null;
2049
+ text7: string | null;
2050
+ text8: string | null;
2051
+ text9: string | null;
2052
+ text10: string | null;
2053
+ data1: any[];
2054
+ data2: any[];
2055
+ data3: any[];
2056
+ data4: any[];
2057
+ }[];
2058
+ type: "TOPIC" | "CATEGORY" | "POST" | "TAG" | "PAGE";
2059
+ isLocked: boolean;
2060
+ isActive: boolean;
2061
+ isIndexActive: boolean;
2062
+ isSlugActive: boolean;
2063
+ isFeatured: boolean;
2064
+ isShownOnHome: boolean;
2065
+ author: {
2066
+ id: string;
2067
+ } | null;
2068
+ topicId: string | null;
2069
+ parents: {
2070
+ id: string;
2071
+ }[];
2072
+ tags: {
2073
+ id: string;
2074
+ }[];
2075
+ relatedPosts: {
2076
+ id: string;
2077
+ }[];
2078
+ coverImage: {
2079
+ id: string;
2080
+ } | null;
2081
+ contentImageIds: string[];
2082
+ state1: boolean;
2083
+ state2: boolean;
2084
+ state3: boolean;
2085
+ state4: boolean;
2086
+ state5: boolean;
2087
+ state6: boolean;
2088
+ state7: boolean;
2089
+ state8: boolean;
2090
+ state9: boolean;
2091
+ state10: boolean;
2092
+ images1: {
2093
+ id: string;
2094
+ }[];
2095
+ images2: {
2096
+ id: string;
2097
+ }[];
2098
+ image1: {
2099
+ id: string;
2100
+ } | null;
2101
+ image2: {
2102
+ id: string;
2103
+ } | null;
2104
+ image3: {
2105
+ id: string;
2106
+ } | null;
2107
+ image4: {
2108
+ id: string;
2109
+ } | null;
2110
+ text1: string | null;
2111
+ text2: string | null;
2112
+ text3: string | null;
2113
+ text4: string | null;
2114
+ text5: string | null;
2115
+ text6: string | null;
2116
+ text7: string | null;
2117
+ text8: string | null;
2118
+ text9: string | null;
2119
+ text10: string | null;
2120
+ data1: any[];
2121
+ data2: any[];
2122
+ data3: any[];
2123
+ data4: any[];
2124
+ }, {
2125
+ type: "TOPIC" | "CATEGORY" | "POST" | "TAG" | "PAGE";
2126
+ isLocked: boolean;
2127
+ isActive: boolean;
2128
+ isIndexActive: boolean;
2129
+ index: number | null;
2130
+ isSlugActive: boolean;
2131
+ slug: string | null;
2132
+ isFeatured: boolean;
2133
+ isShownOnHome: boolean;
2134
+ author: {
2135
+ id: string;
2136
+ } | null;
2137
+ topicId: string | null;
2138
+ parents: {
2139
+ id: string;
2140
+ }[];
2141
+ tags: {
2142
+ id: string;
2143
+ }[];
2144
+ relatedPosts: {
2145
+ id: string;
2146
+ }[];
2147
+ coverImage: {
2148
+ id: string;
2149
+ } | null;
2150
+ contentImageIds: string[];
2151
+ state1: boolean;
2152
+ state2: boolean;
2153
+ state3: boolean;
2154
+ state4: boolean;
2155
+ state5: boolean;
2156
+ state6: boolean;
2157
+ state7: boolean;
2158
+ state8: boolean;
2159
+ state9: boolean;
2160
+ state10: boolean;
2161
+ images1: {
2162
+ id: string;
2163
+ }[];
2164
+ images2: {
2165
+ id: string;
2166
+ }[];
2167
+ image1: {
2168
+ id: string;
2169
+ } | null;
2170
+ image2: {
2171
+ id: string;
2172
+ } | null;
2173
+ image3: {
2174
+ id: string;
2175
+ } | null;
2176
+ image4: {
2177
+ id: string;
2178
+ } | null;
2179
+ text1: string | null;
2180
+ text2: string | null;
2181
+ text3: string | null;
2182
+ text4: string | null;
2183
+ text5: string | null;
2184
+ text6: string | null;
2185
+ text7: string | null;
2186
+ text8: string | null;
2187
+ text9: string | null;
2188
+ text10: string | null;
2189
+ data1: any[];
2190
+ data2: any[];
2191
+ data3: any[];
2192
+ data4: any[];
2193
+ translations: {
2194
+ locale: string;
2195
+ title: string | null;
2196
+ subtitle: string | null;
2197
+ summary: string | null;
2198
+ description: string | null;
2199
+ content: string | null;
2200
+ externalLinks: {
2201
+ name: string;
2202
+ href: string;
2203
+ }[];
2204
+ faq: {
2205
+ question: string;
2206
+ answer: string;
2207
+ }[];
2208
+ toc: TocItem[];
2209
+ readTime: number | null;
2210
+ wordCount: number;
2211
+ text1: string | null;
2212
+ text2: string | null;
2213
+ text3: string | null;
2214
+ text4: string | null;
2215
+ text5: string | null;
2216
+ text6: string | null;
2217
+ text7: string | null;
2218
+ text8: string | null;
2219
+ text9: string | null;
2220
+ text10: string | null;
2221
+ data1: any[];
2222
+ data2: any[];
2223
+ data3: any[];
2224
+ data4: any[];
2225
+ }[];
2226
+ }>>;
2227
+
2228
+ type PostUpdateFormData = Omit<zod__default.infer<ReturnType<typeof postUpdateValidator>>, "author" | "parents" | "tags" | "relatedPosts" | "coverImage" | "contentImageIds" | "images1" | "images2" | "image1" | "image2" | "image3" | "image4"> & {
2229
+ author: AdminCard | null;
2230
+ parents: PostListCard[];
2231
+ tags: PostListCard[];
2232
+ relatedPosts: PostListCard[];
2233
+ coverImage: FileCard | null;
2234
+ images1: FileCard[];
2235
+ images2: FileCard[];
2236
+ image1: FileCard | null;
2237
+ image2: FileCard | null;
2238
+ image3: FileCard | null;
2239
+ image4: FileCard | null;
2240
+ };
2241
+ declare function createPostUpdateAction(ctx: ActionContext): ({ id, formData, }: {
2242
+ id: string;
2243
+ formData: PostUpdateFormData;
2244
+ }) => Promise<Result<{
2245
+ post: Post;
2246
+ }>>;
2247
+
2248
+ declare function createPostDeleteAction(ctx: ActionContext): ({ id }: {
2249
+ id: string;
2250
+ }) => Promise<Result<void>>;
2251
+
2252
+ declare function createPostFindAction(ctx: ActionContext): (params: {
2253
+ id?: string;
2254
+ type?: PostType;
2255
+ slug?: string;
2256
+ isActive?: boolean;
2257
+ topicSlug?: string;
2258
+ }) => Promise<Result<{
2259
+ post: Post & {
2260
+ translations: PostTranslation[];
2261
+ };
2262
+ }>>;
2263
+
2264
+ declare function createPostFindFullAction(ctx: ActionContext): (params: {
2265
+ id?: string;
2266
+ type?: PostType;
2267
+ slug?: string;
2268
+ isActive?: boolean;
2269
+ topicSlug?: string;
2270
+ }) => Promise<Result<{
2271
+ post: PostFull;
2272
+ }>>;
2273
+
2274
+ declare function createPostFindListCardsAction(ctx: ActionContext): (params: {
2275
+ searchString?: string;
2276
+ type: PostType | null;
2277
+ isActive?: boolean;
2278
+ isIndexActive?: boolean;
2279
+ isSlugActive?: boolean;
2280
+ isFeatured?: boolean;
2281
+ isShownOnHome?: boolean;
2282
+ state1?: boolean;
2283
+ state2?: boolean;
2284
+ state3?: boolean;
2285
+ state4?: boolean;
2286
+ state5?: boolean;
2287
+ state6?: boolean;
2288
+ state7?: boolean;
2289
+ state8?: boolean;
2290
+ state9?: boolean;
2291
+ state10?: boolean;
2292
+ topicId?: string;
2293
+ topicSlug?: string;
2294
+ categoryId?: string;
2295
+ categorySlug?: string;
2296
+ postIds?: string[];
2297
+ excludeIds?: string[];
2298
+ page?: number;
2299
+ pageSize?: number;
2300
+ }) => Promise<Result<{
2301
+ items: PostListCard[];
2302
+ total: number;
2303
+ }>>;
2304
+
2305
+ declare function createPostFindManyAction(ctx: ActionContext): (params: {
2306
+ type: PostType;
2307
+ topicId?: string;
2308
+ }) => Promise<Result<{
2309
+ posts: (Post & {
2310
+ translations: PostTranslation[];
2311
+ })[];
2312
+ }>>;
2313
+
1373
2314
  declare class ServerError extends Error {
1374
2315
  readonly i18nKey?: string;
1375
2316
  readonly statusCode?: number;
@@ -1388,4 +2329,4 @@ declare class ServerError extends Error {
1388
2329
  static internalServerError(): ServerError;
1389
2330
  }
1390
2331
 
1391
- export { ADMIN_ORDER_BY, type ActionContext, type AdminCreateFormData, type AdminUpdateFormData, type ChangePasswordFormData, type EmailUnverifiedFormData, type FileCreateFormData, type FileCreateManyFormData, type FileUpdateFormData, type FolderCreateFormData, type FolderUpdateFormData, 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, createFileSoftDeleteAction, createFileSoftDeleteManyAction, createFileUpdateAction, createFolderCommandRepository, createFolderCreateAction, createFolderDeleteAction, createFolderFindFullAction, createFolderFindListCardsAction, createFolderQueryRepository, createFolderUpdateAction, createForgotPasswordAction, createForgotPasswordEmail, createIpRateLimiter, createJwtService, createMultiFileSchema, createPostCommandRepository, createPostQueryRepository, createRenderEmailTemplate, createResetPasswordAction, createSchemas, createSendEmail, createSeoMetadataCommandRepository, createSignInAction, createSignOutAction, createTocItemSchema, createTransporter, createUnique, createVerifyAccessToken, createVerifyAction, createVerifyEmailAction, createVerifyRefreshToken, createZod, normalizeCacheKey };
2332
+ export { ADMIN_ORDER_BY, type ActionContext, type AdminCreateFormData, type AdminUpdateFormData, type ChangePasswordFormData, type EmailUnverifiedFormData, type FileCreateFormData, type FileCreateManyFormData, type FileUpdateFormData, type FolderCreateFormData, type FolderUpdateFormData, type ForgotPasswordFormData, ORDER_BY, POST_ORDER_BY, type PostCreateFormData, type PostUpdateFormData, 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, createFileSoftDeleteAction, createFileSoftDeleteManyAction, createFileUpdateAction, createFolderCommandRepository, createFolderCreateAction, createFolderDeleteAction, createFolderFindFullAction, createFolderFindListCardsAction, createFolderQueryRepository, createFolderUpdateAction, createForgotPasswordAction, createForgotPasswordEmail, createIpRateLimiter, createJwtService, createMultiFileSchema, createPostCommandRepository, createPostCreateAction, createPostDeleteAction, createPostFindAction, createPostFindFullAction, createPostFindListCardsAction, createPostFindManyAction, createPostQueryRepository, createPostUpdateAction, createRenderEmailTemplate, createResetPasswordAction, createSchemas, createSendEmail, createSeoMetadataCommandRepository, createSignInAction, createSignOutAction, createTocItemSchema, createTransporter, createUnique, createVerifyAccessToken, createVerifyAction, createVerifyEmailAction, createVerifyRefreshToken, createZod, normalizeCacheKey };