@financial-times/content-curation-client 0.2.0 → 0.3.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.
@@ -1680,11 +1680,537 @@ declare type InteractiveSlice = FlourishGraphicSliceType | CustomIframeSliceType
1680
1680
  export { InteractiveSlice }
1681
1681
  export { InteractiveSlice as InteractiveSlice_alias_1 }
1682
1682
 
1683
+ declare type LegacyBlock = z.infer<typeof LegacyBlockSchema>;
1684
+ export { LegacyBlock }
1685
+ export { LegacyBlock as LegacyBlock_alias_1 }
1686
+
1687
+ declare const LegacyBlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1688
+ type: z.ZodLiteral<"topper-basic">;
1689
+ children: z.ZodTuple<[], null>;
1690
+ properties: z.ZodObject<{
1691
+ title: z.ZodString;
1692
+ sponsorText: z.ZodDefault<z.ZodString>;
1693
+ }, "strip", z.ZodTypeAny, {
1694
+ title: string;
1695
+ sponsorText: string;
1696
+ }, {
1697
+ title: string;
1698
+ sponsorText?: string | undefined;
1699
+ }>;
1700
+ }, "strip", z.ZodTypeAny, {
1701
+ type: "topper-basic";
1702
+ properties: {
1703
+ title: string;
1704
+ sponsorText: string;
1705
+ };
1706
+ children: [];
1707
+ }, {
1708
+ type: "topper-basic";
1709
+ properties: {
1710
+ title: string;
1711
+ sponsorText?: string | undefined;
1712
+ };
1713
+ children: [];
1714
+ }>, z.ZodObject<{
1715
+ type: z.ZodLiteral<"info-box">;
1716
+ children: z.ZodTuple<[], null>;
1717
+ properties: z.ZodObject<{
1718
+ bodyHTML: z.ZodString;
1719
+ }, "strip", z.ZodTypeAny, {
1720
+ bodyHTML: string;
1721
+ }, {
1722
+ bodyHTML: string;
1723
+ }>;
1724
+ }, "strip", z.ZodTypeAny, {
1725
+ type: "info-box";
1726
+ properties: {
1727
+ bodyHTML: string;
1728
+ };
1729
+ children: [];
1730
+ }, {
1731
+ type: "info-box";
1732
+ properties: {
1733
+ bodyHTML: string;
1734
+ };
1735
+ children: [];
1736
+ }>, z.ZodObject<{
1737
+ type: z.ZodLiteral<"container">;
1738
+ children: z.ZodArray<z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
1739
+ source: z.ZodLiteral<"flourish">;
1740
+ properties: z.ZodObject<{
1741
+ id: z.ZodString;
1742
+ }, "strip", z.ZodTypeAny, {
1743
+ id: string;
1744
+ }, {
1745
+ id: string;
1746
+ }>;
1747
+ }, "strip", z.ZodTypeAny, {
1748
+ properties: {
1749
+ id: string;
1750
+ };
1751
+ source: "flourish";
1752
+ }, {
1753
+ properties: {
1754
+ id: string;
1755
+ };
1756
+ source: "flourish";
1757
+ }>, z.ZodObject<{
1758
+ source: z.ZodLiteral<"list">;
1759
+ properties: z.ZodObject<{
1760
+ id: z.ZodString;
1761
+ maxItems: z.ZodOptional<z.ZodNumber>;
1762
+ }, "strip", z.ZodTypeAny, {
1763
+ id: string;
1764
+ maxItems?: number | undefined;
1765
+ }, {
1766
+ id: string;
1767
+ maxItems?: number | undefined;
1768
+ }>;
1769
+ }, "strip", z.ZodTypeAny, {
1770
+ properties: {
1771
+ id: string;
1772
+ maxItems?: number | undefined;
1773
+ };
1774
+ source: "list";
1775
+ }, {
1776
+ properties: {
1777
+ id: string;
1778
+ maxItems?: number | undefined;
1779
+ };
1780
+ source: "list";
1781
+ }>]>, "many">;
1782
+ properties: z.ZodObject<{
1783
+ title: z.ZodOptional<z.ZodString>;
1784
+ design: z.ZodDefault<z.ZodEnum<["chart", "four-story", "freeform", "hero-lead"]>>;
1785
+ backgroundColor: z.ZodOptional<z.ZodString>;
1786
+ }, "strip", z.ZodTypeAny, {
1787
+ design: "chart" | "four-story" | "freeform" | "hero-lead";
1788
+ title?: string | undefined;
1789
+ backgroundColor?: string | undefined;
1790
+ }, {
1791
+ title?: string | undefined;
1792
+ design?: "chart" | "four-story" | "freeform" | "hero-lead" | undefined;
1793
+ backgroundColor?: string | undefined;
1794
+ }>;
1795
+ }, "strip", z.ZodTypeAny, {
1796
+ type: "container";
1797
+ properties: {
1798
+ design: "chart" | "four-story" | "freeform" | "hero-lead";
1799
+ title?: string | undefined;
1800
+ backgroundColor?: string | undefined;
1801
+ };
1802
+ children: ({
1803
+ properties: {
1804
+ id: string;
1805
+ };
1806
+ source: "flourish";
1807
+ } | {
1808
+ properties: {
1809
+ id: string;
1810
+ maxItems?: number | undefined;
1811
+ };
1812
+ source: "list";
1813
+ })[];
1814
+ }, {
1815
+ type: "container";
1816
+ properties: {
1817
+ title?: string | undefined;
1818
+ design?: "chart" | "four-story" | "freeform" | "hero-lead" | undefined;
1819
+ backgroundColor?: string | undefined;
1820
+ };
1821
+ children: ({
1822
+ properties: {
1823
+ id: string;
1824
+ };
1825
+ source: "flourish";
1826
+ } | {
1827
+ properties: {
1828
+ id: string;
1829
+ maxItems?: number | undefined;
1830
+ };
1831
+ source: "list";
1832
+ })[];
1833
+ }>, z.ZodObject<{
1834
+ type: z.ZodLiteral<"experiment">;
1835
+ children: z.ZodTuple<[], null>;
1836
+ properties: z.ZodObject<{
1837
+ experimentName: z.ZodString;
1838
+ id: z.ZodString;
1839
+ title: z.ZodOptional<z.ZodString>;
1840
+ config: z.ZodOptional<z.ZodObject<{
1841
+ value: z.ZodOptional<z.ZodOptional<z.ZodUnknown>>;
1842
+ format: z.ZodOptional<z.ZodDefault<z.ZodEnum<["json"]>>>;
1843
+ }, "strip", z.ZodTypeAny, {
1844
+ format?: "json" | undefined;
1845
+ value?: unknown;
1846
+ }, {
1847
+ format?: "json" | undefined;
1848
+ value?: unknown;
1849
+ }>>;
1850
+ }, "strip", z.ZodTypeAny, {
1851
+ experimentName: string;
1852
+ id: string;
1853
+ config?: {
1854
+ format?: "json" | undefined;
1855
+ value?: unknown;
1856
+ } | undefined;
1857
+ title?: string | undefined;
1858
+ }, {
1859
+ experimentName: string;
1860
+ id: string;
1861
+ config?: {
1862
+ format?: "json" | undefined;
1863
+ value?: unknown;
1864
+ } | undefined;
1865
+ title?: string | undefined;
1866
+ }>;
1867
+ }, "strip", z.ZodTypeAny, {
1868
+ type: "experiment";
1869
+ properties: {
1870
+ experimentName: string;
1871
+ id: string;
1872
+ config?: {
1873
+ format?: "json" | undefined;
1874
+ value?: unknown;
1875
+ } | undefined;
1876
+ title?: string | undefined;
1877
+ };
1878
+ children: [];
1879
+ }, {
1880
+ type: "experiment";
1881
+ properties: {
1882
+ experimentName: string;
1883
+ id: string;
1884
+ config?: {
1885
+ format?: "json" | undefined;
1886
+ value?: unknown;
1887
+ } | undefined;
1888
+ title?: string | undefined;
1889
+ };
1890
+ children: [];
1891
+ }>]>;
1892
+
1893
+ declare type LegacyPageStructureOutput = z.infer<typeof LegacyPageStructureOutputSchema>;
1894
+ export { LegacyPageStructureOutput }
1895
+ export { LegacyPageStructureOutput as LegacyPageStructureOutput_alias_1 }
1896
+
1897
+ declare const LegacyPageStructureOutputSchema: z.ZodObject<{
1898
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1899
+ type: z.ZodLiteral<"topper-basic">;
1900
+ children: z.ZodTuple<[], null>;
1901
+ properties: z.ZodObject<{
1902
+ title: z.ZodString;
1903
+ sponsorText: z.ZodDefault<z.ZodString>;
1904
+ }, "strip", z.ZodTypeAny, {
1905
+ title: string;
1906
+ sponsorText: string;
1907
+ }, {
1908
+ title: string;
1909
+ sponsorText?: string | undefined;
1910
+ }>;
1911
+ }, "strip", z.ZodTypeAny, {
1912
+ type: "topper-basic";
1913
+ properties: {
1914
+ title: string;
1915
+ sponsorText: string;
1916
+ };
1917
+ children: [];
1918
+ }, {
1919
+ type: "topper-basic";
1920
+ properties: {
1921
+ title: string;
1922
+ sponsorText?: string | undefined;
1923
+ };
1924
+ children: [];
1925
+ }>, z.ZodObject<{
1926
+ type: z.ZodLiteral<"info-box">;
1927
+ children: z.ZodTuple<[], null>;
1928
+ properties: z.ZodObject<{
1929
+ bodyHTML: z.ZodString;
1930
+ }, "strip", z.ZodTypeAny, {
1931
+ bodyHTML: string;
1932
+ }, {
1933
+ bodyHTML: string;
1934
+ }>;
1935
+ }, "strip", z.ZodTypeAny, {
1936
+ type: "info-box";
1937
+ properties: {
1938
+ bodyHTML: string;
1939
+ };
1940
+ children: [];
1941
+ }, {
1942
+ type: "info-box";
1943
+ properties: {
1944
+ bodyHTML: string;
1945
+ };
1946
+ children: [];
1947
+ }>, z.ZodObject<{
1948
+ type: z.ZodLiteral<"container">;
1949
+ children: z.ZodArray<z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
1950
+ source: z.ZodLiteral<"flourish">;
1951
+ properties: z.ZodObject<{
1952
+ id: z.ZodString;
1953
+ }, "strip", z.ZodTypeAny, {
1954
+ id: string;
1955
+ }, {
1956
+ id: string;
1957
+ }>;
1958
+ }, "strip", z.ZodTypeAny, {
1959
+ properties: {
1960
+ id: string;
1961
+ };
1962
+ source: "flourish";
1963
+ }, {
1964
+ properties: {
1965
+ id: string;
1966
+ };
1967
+ source: "flourish";
1968
+ }>, z.ZodObject<{
1969
+ source: z.ZodLiteral<"list">;
1970
+ properties: z.ZodObject<{
1971
+ id: z.ZodString;
1972
+ maxItems: z.ZodOptional<z.ZodNumber>;
1973
+ }, "strip", z.ZodTypeAny, {
1974
+ id: string;
1975
+ maxItems?: number | undefined;
1976
+ }, {
1977
+ id: string;
1978
+ maxItems?: number | undefined;
1979
+ }>;
1980
+ }, "strip", z.ZodTypeAny, {
1981
+ properties: {
1982
+ id: string;
1983
+ maxItems?: number | undefined;
1984
+ };
1985
+ source: "list";
1986
+ }, {
1987
+ properties: {
1988
+ id: string;
1989
+ maxItems?: number | undefined;
1990
+ };
1991
+ source: "list";
1992
+ }>]>, "many">;
1993
+ properties: z.ZodObject<{
1994
+ title: z.ZodOptional<z.ZodString>;
1995
+ design: z.ZodDefault<z.ZodEnum<["chart", "four-story", "freeform", "hero-lead"]>>;
1996
+ backgroundColor: z.ZodOptional<z.ZodString>;
1997
+ }, "strip", z.ZodTypeAny, {
1998
+ design: "chart" | "four-story" | "freeform" | "hero-lead";
1999
+ title?: string | undefined;
2000
+ backgroundColor?: string | undefined;
2001
+ }, {
2002
+ title?: string | undefined;
2003
+ design?: "chart" | "four-story" | "freeform" | "hero-lead" | undefined;
2004
+ backgroundColor?: string | undefined;
2005
+ }>;
2006
+ }, "strip", z.ZodTypeAny, {
2007
+ type: "container";
2008
+ properties: {
2009
+ design: "chart" | "four-story" | "freeform" | "hero-lead";
2010
+ title?: string | undefined;
2011
+ backgroundColor?: string | undefined;
2012
+ };
2013
+ children: ({
2014
+ properties: {
2015
+ id: string;
2016
+ };
2017
+ source: "flourish";
2018
+ } | {
2019
+ properties: {
2020
+ id: string;
2021
+ maxItems?: number | undefined;
2022
+ };
2023
+ source: "list";
2024
+ })[];
2025
+ }, {
2026
+ type: "container";
2027
+ properties: {
2028
+ title?: string | undefined;
2029
+ design?: "chart" | "four-story" | "freeform" | "hero-lead" | undefined;
2030
+ backgroundColor?: string | undefined;
2031
+ };
2032
+ children: ({
2033
+ properties: {
2034
+ id: string;
2035
+ };
2036
+ source: "flourish";
2037
+ } | {
2038
+ properties: {
2039
+ id: string;
2040
+ maxItems?: number | undefined;
2041
+ };
2042
+ source: "list";
2043
+ })[];
2044
+ }>, z.ZodObject<{
2045
+ type: z.ZodLiteral<"experiment">;
2046
+ children: z.ZodTuple<[], null>;
2047
+ properties: z.ZodObject<{
2048
+ experimentName: z.ZodString;
2049
+ id: z.ZodString;
2050
+ title: z.ZodOptional<z.ZodString>;
2051
+ config: z.ZodOptional<z.ZodObject<{
2052
+ value: z.ZodOptional<z.ZodOptional<z.ZodUnknown>>;
2053
+ format: z.ZodOptional<z.ZodDefault<z.ZodEnum<["json"]>>>;
2054
+ }, "strip", z.ZodTypeAny, {
2055
+ format?: "json" | undefined;
2056
+ value?: unknown;
2057
+ }, {
2058
+ format?: "json" | undefined;
2059
+ value?: unknown;
2060
+ }>>;
2061
+ }, "strip", z.ZodTypeAny, {
2062
+ experimentName: string;
2063
+ id: string;
2064
+ config?: {
2065
+ format?: "json" | undefined;
2066
+ value?: unknown;
2067
+ } | undefined;
2068
+ title?: string | undefined;
2069
+ }, {
2070
+ experimentName: string;
2071
+ id: string;
2072
+ config?: {
2073
+ format?: "json" | undefined;
2074
+ value?: unknown;
2075
+ } | undefined;
2076
+ title?: string | undefined;
2077
+ }>;
2078
+ }, "strip", z.ZodTypeAny, {
2079
+ type: "experiment";
2080
+ properties: {
2081
+ experimentName: string;
2082
+ id: string;
2083
+ config?: {
2084
+ format?: "json" | undefined;
2085
+ value?: unknown;
2086
+ } | undefined;
2087
+ title?: string | undefined;
2088
+ };
2089
+ children: [];
2090
+ }, {
2091
+ type: "experiment";
2092
+ properties: {
2093
+ experimentName: string;
2094
+ id: string;
2095
+ config?: {
2096
+ format?: "json" | undefined;
2097
+ value?: unknown;
2098
+ } | undefined;
2099
+ title?: string | undefined;
2100
+ };
2101
+ children: [];
2102
+ }>]>, "many">;
2103
+ conceptId: z.ZodOptional<z.ZodString>;
2104
+ themeName: z.ZodOptional<z.ZodString>;
2105
+ uuid: z.ZodString;
2106
+ }, "strip", z.ZodTypeAny, {
2107
+ blocks: ({
2108
+ type: "topper-basic";
2109
+ properties: {
2110
+ title: string;
2111
+ sponsorText: string;
2112
+ };
2113
+ children: [];
2114
+ } | {
2115
+ type: "info-box";
2116
+ properties: {
2117
+ bodyHTML: string;
2118
+ };
2119
+ children: [];
2120
+ } | {
2121
+ type: "container";
2122
+ properties: {
2123
+ design: "chart" | "four-story" | "freeform" | "hero-lead";
2124
+ title?: string | undefined;
2125
+ backgroundColor?: string | undefined;
2126
+ };
2127
+ children: ({
2128
+ properties: {
2129
+ id: string;
2130
+ };
2131
+ source: "flourish";
2132
+ } | {
2133
+ properties: {
2134
+ id: string;
2135
+ maxItems?: number | undefined;
2136
+ };
2137
+ source: "list";
2138
+ })[];
2139
+ } | {
2140
+ type: "experiment";
2141
+ properties: {
2142
+ experimentName: string;
2143
+ id: string;
2144
+ config?: {
2145
+ format?: "json" | undefined;
2146
+ value?: unknown;
2147
+ } | undefined;
2148
+ title?: string | undefined;
2149
+ };
2150
+ children: [];
2151
+ })[];
2152
+ uuid: string;
2153
+ conceptId?: string | undefined;
2154
+ themeName?: string | undefined;
2155
+ }, {
2156
+ blocks: ({
2157
+ type: "topper-basic";
2158
+ properties: {
2159
+ title: string;
2160
+ sponsorText?: string | undefined;
2161
+ };
2162
+ children: [];
2163
+ } | {
2164
+ type: "info-box";
2165
+ properties: {
2166
+ bodyHTML: string;
2167
+ };
2168
+ children: [];
2169
+ } | {
2170
+ type: "container";
2171
+ properties: {
2172
+ title?: string | undefined;
2173
+ design?: "chart" | "four-story" | "freeform" | "hero-lead" | undefined;
2174
+ backgroundColor?: string | undefined;
2175
+ };
2176
+ children: ({
2177
+ properties: {
2178
+ id: string;
2179
+ };
2180
+ source: "flourish";
2181
+ } | {
2182
+ properties: {
2183
+ id: string;
2184
+ maxItems?: number | undefined;
2185
+ };
2186
+ source: "list";
2187
+ })[];
2188
+ } | {
2189
+ type: "experiment";
2190
+ properties: {
2191
+ experimentName: string;
2192
+ id: string;
2193
+ config?: {
2194
+ format?: "json" | undefined;
2195
+ value?: unknown;
2196
+ } | undefined;
2197
+ title?: string | undefined;
2198
+ };
2199
+ children: [];
2200
+ })[];
2201
+ uuid: string;
2202
+ conceptId?: string | undefined;
2203
+ themeName?: string | undefined;
2204
+ }>;
2205
+ export { LegacyPageStructureOutputSchema }
2206
+ export { LegacyPageStructureOutputSchema as LegacyPageStructureOutputSchema_alias_1 }
2207
+
1683
2208
  /**
1684
2209
  * Client for Page structure endpoints
1685
2210
  */
1686
2211
  declare class PageClient extends BaseApiClient {
1687
2212
  getStructure(pageId: string): Promise<PageStructureOutput>;
2213
+ getLegacyHubPageStructure(pageId: string): Promise<LegacyPageStructureOutput>;
1688
2214
  upsertStructure(pageId: string, data: Omit<PageStructureInput, "type">): Promise<PageStructureOutput>;
1689
2215
  }
1690
2216
  export { PageClient }
@@ -2585,7 +3111,7 @@ export { Slice as Slice_alias_1 }
2585
3111
  * All possible slice inputs for the Page API.
2586
3112
  * This discriminated union allows Zod to pick the correct schema based on the `type` field.
2587
3113
  */
2588
- export declare const SliceApiInputSchema: z.ZodDiscriminatedUnion<"type", readonly [z.ZodObject<{
3114
+ declare const SliceApiInputSchema: z.ZodDiscriminatedUnion<"type", readonly [z.ZodObject<{
2589
3115
  type: z.ZodLiteral<"HomepageSlice">;
2590
3116
  hidden: z.ZodOptional<z.ZodBoolean>;
2591
3117
  properties: z.ZodOptional<z.ZodObject<{
@@ -2871,12 +3397,14 @@ export declare const SliceApiInputSchema: z.ZodDiscriminatedUnion<"type", readon
2871
3397
  hidden?: boolean | undefined;
2872
3398
  sliceId?: string | undefined;
2873
3399
  }>]>;
3400
+ export { SliceApiInputSchema }
3401
+ export { SliceApiInputSchema as SliceApiInputSchema_alias_1 }
2874
3402
 
2875
3403
  /**
2876
3404
  * All possible slice outputs for the Page API.
2877
3405
  * The same discriminated union but with each slice requiring `sliceId`.
2878
3406
  */
2879
- export declare const SliceApiOutputSchema: z.ZodDiscriminatedUnion<"type", readonly [z.ZodObject<{
3407
+ declare const SliceApiOutputSchema: z.ZodDiscriminatedUnion<"type", readonly [z.ZodObject<{
2880
3408
  type: z.ZodLiteral<"HomepageSlice">;
2881
3409
  hidden: z.ZodOptional<z.ZodBoolean>;
2882
3410
  properties: z.ZodOptional<z.ZodObject<{
@@ -3162,6 +3690,8 @@ export declare const SliceApiOutputSchema: z.ZodDiscriminatedUnion<"type", reado
3162
3690
  sliceId: string;
3163
3691
  hidden?: boolean | undefined;
3164
3692
  }>]>;
3693
+ export { SliceApiOutputSchema }
3694
+ export { SliceApiOutputSchema as SliceApiOutputSchema_alias_1 }
3165
3695
 
3166
3696
  declare const SparkListSlice: {
3167
3697
  InputSchema: z.ZodObject<{
package/dist/index.cjs CHANGED
@@ -246,11 +246,86 @@ var HomepageClient = class extends BaseApiClient {
246
246
  }
247
247
  };
248
248
 
249
+ // src/schemas/ftpink/legacyHubPage/index.ts
250
+
251
+ var LegacyFlourishChildSchema = _zod.z.object({
252
+ source: _zod.z.literal("flourish"),
253
+ properties: _zod.z.object({
254
+ id: _zod.z.string().min(1)
255
+ // e.g. "visualisation/21901162"
256
+ })
257
+ });
258
+ var LegacyListChildSchema = _zod.z.object({
259
+ source: _zod.z.literal("list"),
260
+ properties: _zod.z.object({
261
+ id: _zod.z.string().uuid(),
262
+ maxItems: _zod.z.number().optional()
263
+ })
264
+ });
265
+ var LegacyContainerChildSchema = _zod.z.discriminatedUnion("source", [
266
+ LegacyFlourishChildSchema,
267
+ LegacyListChildSchema
268
+ ]);
269
+ var LegacyTopperSchema = _zod.z.object({
270
+ type: _zod.z.literal("topper-basic"),
271
+ children: _zod.z.tuple([]),
272
+ properties: _zod.z.object({
273
+ title: _zod.z.string(),
274
+ sponsorText: _zod.z.string().default("")
275
+ })
276
+ });
277
+ var LegacyInfoBoxSchema = _zod.z.object({
278
+ type: _zod.z.literal("info-box"),
279
+ children: _zod.z.tuple([]),
280
+ properties: _zod.z.object({
281
+ bodyHTML: _zod.z.string()
282
+ })
283
+ });
284
+ var LegacyContainerSchema = _zod.z.object({
285
+ type: _zod.z.literal("container"),
286
+ children: _zod.z.array(LegacyContainerChildSchema).min(1),
287
+ properties: _zod.z.object({
288
+ title: _zod.z.string().optional(),
289
+ design: _zod.z.enum(["chart", "four-story", "freeform", "hero-lead"]).default("freeform"),
290
+ backgroundColor: _zod.z.string().optional()
291
+ })
292
+ });
293
+ var LegacyExperimentSchema = _zod.z.object({
294
+ type: _zod.z.literal("experiment"),
295
+ children: _zod.z.tuple([]),
296
+ properties: _zod.z.object({
297
+ experimentName: _zod.z.string(),
298
+ id: _zod.z.string(),
299
+ title: _zod.z.string().optional(),
300
+ config: _zod.z.object({
301
+ value: _zod.z.unknown().optional(),
302
+ // Hub pages support experiments with HTML and Text.
303
+ // For now we just support JSON. As we migrate pages, this may change.
304
+ format: _zod.z.enum(["json"]).default("json")
305
+ }).partial().optional()
306
+ })
307
+ });
308
+ var LegacyBlockSchema = _zod.z.discriminatedUnion("type", [
309
+ LegacyTopperSchema,
310
+ LegacyInfoBoxSchema,
311
+ LegacyContainerSchema,
312
+ LegacyExperimentSchema
313
+ ]);
314
+ var LegacyPageStructureOutputSchema = _zod.z.object({
315
+ blocks: _zod.z.array(LegacyBlockSchema),
316
+ conceptId: _zod.z.string().uuid().optional(),
317
+ themeName: _zod.z.string().optional(),
318
+ uuid: _zod.z.string().uuid()
319
+ });
320
+
249
321
  // src/page.ts
250
322
  var PageClient = class extends BaseApiClient {
251
323
  async getStructure(pageId) {
252
324
  return this.get(`/v1/page/${pageId}/structure`, PageStructureOutputSchema);
253
325
  }
326
+ async getLegacyHubPageStructure(pageId) {
327
+ return this.get(`/v1/page/${pageId}/legacyHubPageStructure`, LegacyPageStructureOutputSchema);
328
+ }
254
329
  async upsertStructure(pageId, data) {
255
330
  return this.put(
256
331
  `/v1/page/${pageId}/structure`,
@@ -288,5 +363,8 @@ var ApiClient = class extends BaseApiClient {
288
363
 
289
364
 
290
365
 
291
- exports.ApiClient = ApiClient; exports.ApiClientError = ApiClientError; exports.ApiErrorCode = ApiErrorCode; exports.ApiErrorPayloadSchema = ApiErrorPayloadSchema; exports.ApiErrorResponseSchema = ApiErrorResponseSchema; exports.ApiResponseSchema = ApiResponseSchema; exports.ApiSuccessResponseSchema = ApiSuccessResponseSchema; exports.HomepageClient = HomepageClient; exports.HomepageStructureInputSchema = HomepageStructureInputSchema; exports.HomepageStructureOutputSchema = HomepageStructureOutputSchema; exports.PageClient = PageClient; exports.PageStructureInputSchema = PageStructureInputSchema; exports.PageStructureOutputSchema = PageStructureOutputSchema;
366
+
367
+
368
+
369
+ exports.ApiClient = ApiClient; exports.ApiClientError = ApiClientError; exports.ApiErrorCode = ApiErrorCode; exports.ApiErrorPayloadSchema = ApiErrorPayloadSchema; exports.ApiErrorResponseSchema = ApiErrorResponseSchema; exports.ApiResponseSchema = ApiResponseSchema; exports.ApiSuccessResponseSchema = ApiSuccessResponseSchema; exports.HomepageClient = HomepageClient; exports.HomepageStructureInputSchema = HomepageStructureInputSchema; exports.HomepageStructureOutputSchema = HomepageStructureOutputSchema; exports.LegacyPageStructureOutputSchema = LegacyPageStructureOutputSchema; exports.PageClient = PageClient; exports.PageStructureInputSchema = PageStructureInputSchema; exports.PageStructureOutputSchema = PageStructureOutputSchema; exports.SliceApiInputSchema = SliceApiInputSchema; exports.SliceApiOutputSchema = SliceApiOutputSchema;
292
370
  //# sourceMappingURL=index.cjs.map