.
This commit is contained in:
1 parent
04fccbb539
commit
214469eb31
31 files changed
+2345
-708
No files matched your search
+19
@@ -7,6 +7,8 @@ export default function App() {
|
||||
const [currentPage, setCurrentPage] = useState<'home' | 'documentation'>('home');
|
||||
const [isSidebarOpen, setIsSidebarOpen] = useState(false);
|
||||
const [theme, setTheme] = useState<'light' | 'dark'>('light');
|
||||
const [currentTaxonomyId, setCurrentTaxonomyId] = useState<string | null>(null);
|
||||
const [currentArticleSlug, setCurrentArticleSlug] = useState<string | null>(null);
|
||||
|
||||
const toggleSidebar = () => {
|
||||
setIsSidebarOpen(!isSidebarOpen);
|
||||
@@ -19,6 +21,8 @@ export default function App() {
|
||||
const navigateToHome = () => {
|
||||
setCurrentPage('home');
|
||||
setIsSidebarOpen(false);
|
||||
setCurrentTaxonomyId(null);
|
||||
setCurrentArticleSlug(null);
|
||||
};
|
||||
|
||||
const navigateToDocumentation = () => {
|
||||
@@ -26,6 +30,17 @@ export default function App() {
|
||||
setIsSidebarOpen(false);
|
||||
};
|
||||
|
||||
const handleTaxonomyClick = (taxonomyId: string) => {
|
||||
setCurrentPage('documentation');
|
||||
setCurrentTaxonomyId(taxonomyId);
|
||||
setCurrentArticleSlug(null);
|
||||
setIsSidebarOpen(false);
|
||||
};
|
||||
|
||||
const handleArticleClick = (slug: string) => {
|
||||
setCurrentArticleSlug(slug);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={`min-h-screen ${theme === 'dark' ? 'bg-[#1a1a1a] text-white' : 'bg-white text-gray-900'}`}>
|
||||
<Header
|
||||
@@ -34,6 +49,7 @@ export default function App() {
|
||||
toggleTheme={toggleTheme}
|
||||
navigateToHome={navigateToHome}
|
||||
navigateToDocumentation={navigateToDocumentation}
|
||||
onTaxonomyClick={handleTaxonomyClick}
|
||||
/>
|
||||
|
||||
{currentPage === 'home' ? (
|
||||
@@ -43,6 +59,9 @@ export default function App() {
|
||||
isSidebarOpen={isSidebarOpen}
|
||||
toggleSidebar={toggleSidebar}
|
||||
theme={theme}
|
||||
taxonomyId={currentTaxonomyId}
|
||||
articleSlug={currentArticleSlug}
|
||||
onArticleClick={handleArticleClick}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
||||
@@ -6,9 +6,19 @@ interface DocumentationPageProps {
|
||||
isSidebarOpen: boolean;
|
||||
toggleSidebar: () => void;
|
||||
theme: 'light' | 'dark';
|
||||
taxonomyId: string | null;
|
||||
articleSlug: string | null;
|
||||
onArticleClick: (slug: string) => void;
|
||||
}
|
||||
|
||||
export function DocumentationPage({ isSidebarOpen, toggleSidebar, theme }: DocumentationPageProps) {
|
||||
export function DocumentationPage({
|
||||
isSidebarOpen,
|
||||
toggleSidebar,
|
||||
theme,
|
||||
taxonomyId,
|
||||
articleSlug,
|
||||
onArticleClick
|
||||
}: DocumentationPageProps) {
|
||||
return (
|
||||
<div className="flex justify-center">
|
||||
<div className="flex w-full max-w-[1920px]">
|
||||
@@ -16,8 +26,13 @@ export function DocumentationPage({ isSidebarOpen, toggleSidebar, theme }: Docum
|
||||
isOpen={isSidebarOpen}
|
||||
toggleSidebar={toggleSidebar}
|
||||
theme={theme}
|
||||
taxonomyId={taxonomyId}
|
||||
onArticleClick={onArticleClick}
|
||||
/>
|
||||
<MainContent
|
||||
theme={theme}
|
||||
articleSlug={articleSlug}
|
||||
/>
|
||||
<MainContent theme={theme} />
|
||||
<TableOfContents theme={theme} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+56
-210
@@ -1,5 +1,6 @@
|
||||
import { Search, ChevronDown, Menu, Sun, Moon } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import { useSiteHeader } from '../hooks/useApi';
|
||||
|
||||
interface HeaderProps {
|
||||
toggleSidebar: () => void;
|
||||
@@ -7,10 +8,12 @@ interface HeaderProps {
|
||||
toggleTheme: () => void;
|
||||
navigateToHome: () => void;
|
||||
navigateToDocumentation: () => void;
|
||||
onTaxonomyClick: (taxonomyId: string) => void;
|
||||
}
|
||||
|
||||
export function Header({ toggleSidebar, theme, toggleTheme, navigateToHome, navigateToDocumentation }: HeaderProps) {
|
||||
export function Header({ toggleSidebar, theme, toggleTheme, navigateToHome, navigateToDocumentation, onTaxonomyClick }: HeaderProps) {
|
||||
const [openMenu, setOpenMenu] = useState<string | null>(null);
|
||||
const { data: siteHeaders, isLoading } = useSiteHeader();
|
||||
|
||||
const toggleMenu = (menu: string) => {
|
||||
setOpenMenu(openMenu === menu ? null : menu);
|
||||
@@ -31,8 +34,8 @@ export function Header({ toggleSidebar, theme, toggleTheme, navigateToHome, navi
|
||||
<div className="flex items-center gap-2 sm:gap-4 min-w-0">
|
||||
<button
|
||||
onClick={toggleSidebar}
|
||||
className={`p-2 hover:bg-opacity-10 rounded lg:hidden flex-shrink-0 ${
|
||||
theme === 'dark' ? 'hover:bg-white' : 'hover:bg-gray-900'
|
||||
className={`p-2 hover:bg-opacity-10 rounded lg:hidden shrink-0 ${
|
||||
theme === 'dark' ? 'hover:bg-gray-800' : 'hover:bg-gray-100'
|
||||
}`}
|
||||
>
|
||||
<Menu className="w-5 h-5" />
|
||||
@@ -43,46 +46,26 @@ export function Header({ toggleSidebar, theme, toggleTheme, navigateToHome, navi
|
||||
className="flex items-center gap-2 sm:gap-3 flex-shrink-0"
|
||||
>
|
||||
<div className="w-5 h-5 sm:w-6 sm:h-6 bg-gradient-to-br from-orange-500 via-blue-500 to-green-500" />
|
||||
<span className={`text-sm sm:text-base ${theme === 'dark' ? 'text-white' : 'text-gray-900'}`}>Learn</span>
|
||||
<span className={`text-sm sm:text-base ${theme === 'dark' ? 'text-white' : 'text-gray-900'}`}>Moeum</span>
|
||||
</button>
|
||||
|
||||
<nav className="hidden md:flex items-center gap-4 relative">
|
||||
<button
|
||||
onClick={() => toggleMenu('documentation')}
|
||||
className={`flex items-center gap-1 text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300 hover:text-white' : 'text-gray-600 hover:text-gray-900'
|
||||
} ${openMenu === 'documentation' ? (theme === 'dark' ? 'text-white' : 'text-gray-900') : ''}`}
|
||||
>
|
||||
Documentation
|
||||
<ChevronDown className="w-4 h-4" />
|
||||
</button>
|
||||
<button
|
||||
onClick={() => toggleMenu('training')}
|
||||
className={`flex items-center gap-1 text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300 hover:text-white' : 'text-gray-600 hover:text-gray-900'
|
||||
} ${openMenu === 'training' ? (theme === 'dark' ? 'text-white' : 'text-gray-900') : ''}`}
|
||||
>
|
||||
Training
|
||||
<ChevronDown className="w-4 h-4" />
|
||||
</button>
|
||||
<button
|
||||
onClick={() => toggleMenu('qa')}
|
||||
className={`flex items-center gap-1 text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300 hover:text-white' : 'text-gray-600 hover:text-gray-900'
|
||||
} ${openMenu === 'qa' ? (theme === 'dark' ? 'text-white' : 'text-gray-900') : ''}`}
|
||||
>
|
||||
Q&A
|
||||
<ChevronDown className="w-4 h-4" />
|
||||
</button>
|
||||
<button
|
||||
onClick={() => toggleMenu('topics')}
|
||||
className={`flex items-center gap-1 text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300 hover:text-white' : 'text-gray-600 hover:text-gray-900'
|
||||
} ${openMenu === 'topics' ? (theme === 'dark' ? 'text-white' : 'text-gray-900') : ''}`}
|
||||
>
|
||||
Topics
|
||||
<ChevronDown className="w-4 h-4" />
|
||||
</button>
|
||||
{isLoading ? (
|
||||
<div className="text-sm text-gray-400">Loading...</div>
|
||||
) : (
|
||||
siteHeaders?.map((header) => (
|
||||
<button
|
||||
key={header.key}
|
||||
onClick={() => toggleMenu(header.key || '')}
|
||||
className={`flex items-center gap-1 text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300 hover:text-white' : 'text-gray-600 hover:text-gray-900'
|
||||
} ${openMenu === header.key ? (theme === 'dark' ? 'text-white' : 'text-gray-900') : ''}`}
|
||||
>
|
||||
{header.label}
|
||||
<ChevronDown className="w-4 h-4" />
|
||||
</button>
|
||||
))
|
||||
)}
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@@ -107,188 +90,51 @@ export function Header({ toggleSidebar, theme, toggleTheme, navigateToHome, navi
|
||||
</div>
|
||||
|
||||
{/* Dropdown Menus */}
|
||||
{openMenu === 'documentation' && (
|
||||
{siteHeaders?.map((header) => (
|
||||
openMenu === header.key && (
|
||||
<>
|
||||
<div
|
||||
className="fixed inset-0 top-12 bg-black bg-opacity-20 z-10"
|
||||
className="fixed inset-0 top-12 bg-black opacity-20 z-10"
|
||||
onClick={() => setOpenMenu(null)}
|
||||
/>
|
||||
<div className={`absolute left-0 right-0 top-12 shadow-lg z-20 ${
|
||||
<div className={`absolute left-0 right-0 top-12 shadow-lg z-60 ${
|
||||
theme === 'dark' ? 'bg-[#0d0d0d] border-b border-gray-800' : 'bg-white border-b border-gray-200'
|
||||
}`}>
|
||||
<div className="max-w-[1920px] mx-auto px-8 py-8">
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
|
||||
<div>
|
||||
<h3 className={`text-xs mb-4 ${theme === 'dark' ? 'text-gray-500' : 'text-gray-500'}`}>
|
||||
DOCUMENTATION
|
||||
</h3>
|
||||
<nav className="space-y-3">
|
||||
<button
|
||||
onClick={handleDocumentationClick}
|
||||
className={`block text-sm text-left ${theme === 'dark' ? 'text-gray-300 hover:text-blue-400' : 'text-gray-700 hover:text-blue-600'}`}
|
||||
>
|
||||
All product documentation
|
||||
</button>
|
||||
<button
|
||||
onClick={handleDocumentationClick}
|
||||
className={`block text-sm text-left ${theme === 'dark' ? 'text-gray-300 hover:text-blue-400' : 'text-gray-700 hover:text-blue-600'}`}
|
||||
>
|
||||
Azure documentation
|
||||
</button>
|
||||
<button
|
||||
onClick={handleDocumentationClick}
|
||||
className={`block text-sm text-left ${theme === 'dark' ? 'text-gray-300 hover:text-blue-400' : 'text-gray-700 hover:text-blue-600'}`}
|
||||
>
|
||||
Dynamics 365 documentation
|
||||
</button>
|
||||
<button
|
||||
onClick={handleDocumentationClick}
|
||||
className={`block text-sm text-left ${theme === 'dark' ? 'text-gray-300 hover:text-blue-400' : 'text-gray-700 hover:text-blue-600'}`}
|
||||
>
|
||||
Microsoft Copilot documentation
|
||||
</button>
|
||||
<button
|
||||
onClick={handleDocumentationClick}
|
||||
className={`block text-sm text-left ${theme === 'dark' ? 'text-gray-300 hover:text-blue-400' : 'text-gray-700 hover:text-blue-600'}`}
|
||||
>
|
||||
Microsoft 365 documentation
|
||||
</button>
|
||||
<button
|
||||
onClick={handleDocumentationClick}
|
||||
className={`block text-sm text-left ${theme === 'dark' ? 'text-gray-300 hover:text-blue-400' : 'text-gray-700 hover:text-blue-600'}`}
|
||||
>
|
||||
Power Platform documentation
|
||||
</button>
|
||||
<button
|
||||
onClick={handleDocumentationClick}
|
||||
className={`block text-sm text-left ${theme === 'dark' ? 'text-gray-300 hover:text-blue-400' : 'text-gray-700 hover:text-blue-600'}`}
|
||||
>
|
||||
Code samples
|
||||
</button>
|
||||
</nav>
|
||||
</div>
|
||||
<div>
|
||||
<nav className="space-y-3">
|
||||
<button
|
||||
onClick={handleDocumentationClick}
|
||||
className={`block text-sm text-left ${theme === 'dark' ? 'text-gray-300 hover:text-blue-400' : 'text-gray-700 hover:text-blue-600'}`}
|
||||
>
|
||||
Troubleshooting documentation
|
||||
</button>
|
||||
</nav>
|
||||
</div>
|
||||
<div className={`p-4 rounded ${theme === 'dark' ? 'bg-[#1a1a1a]' : 'bg-gray-50'}`}>
|
||||
<p className={`text-xs mb-2 ${theme === 'dark' ? 'text-gray-500' : 'text-gray-500'}`}>
|
||||
FREE TO JOIN, REQUEST TO ATTEND
|
||||
</p>
|
||||
<h4 className={`text-sm mb-2 ${theme === 'dark' ? 'text-white' : 'text-gray-900'}`}>
|
||||
Microsoft AI Tour
|
||||
</h4>
|
||||
<p className={`text-xs ${theme === 'dark' ? 'text-gray-400' : 'text-gray-600'}`}>
|
||||
Take your business to the AI frontier.
|
||||
</p>
|
||||
</div>
|
||||
{header.sections?.map((section, idx) => (
|
||||
<div key={idx}>
|
||||
<h3 className={`text-xs mb-4 uppercase ${
|
||||
theme === 'dark' ? 'text-gray-500' : 'text-gray-500'
|
||||
}`}>
|
||||
{section.headline}
|
||||
</h3>
|
||||
<nav className="space-y-3">
|
||||
{section.taxonomies?.map((taxonomy) => (
|
||||
<button
|
||||
key={taxonomy.taxonomyId}
|
||||
onClick={() => {
|
||||
if (taxonomy.taxonomyId) {
|
||||
onTaxonomyClick(taxonomy.taxonomyId);
|
||||
setOpenMenu(null);
|
||||
}
|
||||
}}
|
||||
className={`block text-sm text-left ${
|
||||
theme === 'dark' ? 'text-gray-300 hover:text-blue-400' : 'text-gray-700 hover:text-blue-600'
|
||||
}`}
|
||||
>
|
||||
{taxonomy.label}
|
||||
</button>
|
||||
))}
|
||||
</nav>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
{openMenu === 'training' && (
|
||||
<>
|
||||
<div
|
||||
className="fixed inset-0 top-12 bg-black bg-opacity-20 z-10"
|
||||
onClick={() => setOpenMenu(null)}
|
||||
/>
|
||||
<div className={`absolute left-0 right-0 top-12 shadow-lg z-20 ${
|
||||
theme === 'dark' ? 'bg-[#0d0d0d] border-b border-gray-800' : 'bg-white border-b border-gray-200'
|
||||
}`}>
|
||||
<div className="max-w-[1920px] mx-auto px-8 py-8">
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
|
||||
<div>
|
||||
<h3 className={`text-xs mb-4 ${theme === 'dark' ? 'text-gray-500' : 'text-gray-500'}`}>
|
||||
TRAINING
|
||||
</h3>
|
||||
<nav className="space-y-3">
|
||||
<a href="#" className={`block text-sm ${theme === 'dark' ? 'text-gray-300 hover:text-blue-400' : 'text-gray-700 hover:text-blue-600'}`}>
|
||||
Browse all courses
|
||||
</a>
|
||||
<a href="#" className={`block text-sm ${theme === 'dark' ? 'text-gray-300 hover:text-blue-400' : 'text-gray-700 hover:text-blue-600'}`}>
|
||||
Learning paths
|
||||
</a>
|
||||
<a href="#" className={`block text-sm ${theme === 'dark' ? 'text-gray-300 hover:text-blue-400' : 'text-gray-700 hover:text-blue-600'}`}>
|
||||
Certifications
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
{openMenu === 'qa' && (
|
||||
<>
|
||||
<div
|
||||
className="fixed inset-0 top-12 bg-black bg-opacity-20 z-10"
|
||||
onClick={() => setOpenMenu(null)}
|
||||
/>
|
||||
<div className={`absolute left-0 right-0 top-12 shadow-lg z-20 ${
|
||||
theme === 'dark' ? 'bg-[#0d0d0d] border-b border-gray-800' : 'bg-white border-b border-gray-200'
|
||||
}`}>
|
||||
<div className="max-w-[1920px] mx-auto px-8 py-8">
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
|
||||
<div>
|
||||
<h3 className={`text-xs mb-4 ${theme === 'dark' ? 'text-gray-500' : 'text-gray-500'}`}>
|
||||
Q&A
|
||||
</h3>
|
||||
<nav className="space-y-3">
|
||||
<a href="#" className={`block text-sm ${theme === 'dark' ? 'text-gray-300 hover:text-blue-400' : 'text-gray-700 hover:text-blue-600'}`}>
|
||||
Ask a question
|
||||
</a>
|
||||
<a href="#" className={`block text-sm ${theme === 'dark' ? 'text-gray-300 hover:text-blue-400' : 'text-gray-700 hover:text-blue-600'}`}>
|
||||
Browse questions
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
{openMenu === 'topics' && (
|
||||
<>
|
||||
<div
|
||||
className="fixed inset-0 top-12 bg-black bg-opacity-20 z-10"
|
||||
onClick={() => setOpenMenu(null)}
|
||||
/>
|
||||
<div className={`absolute left-0 right-0 top-12 shadow-lg z-20 ${
|
||||
theme === 'dark' ? 'bg-[#0d0d0d] border-b border-gray-800' : 'bg-white border-b border-gray-200'
|
||||
}`}>
|
||||
<div className="max-w-[1920px] mx-auto px-8 py-8">
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
|
||||
<div>
|
||||
<h3 className={`text-xs mb-4 ${theme === 'dark' ? 'text-gray-500' : 'text-gray-500'}`}>
|
||||
TOPICS
|
||||
</h3>
|
||||
<nav className="space-y-3">
|
||||
<a href="#" className={`block text-sm ${theme === 'dark' ? 'text-gray-300 hover:text-blue-400' : 'text-gray-700 hover:text-blue-600'}`}>
|
||||
AI and Machine Learning
|
||||
</a>
|
||||
<a href="#" className={`block text-sm ${theme === 'dark' ? 'text-gray-300 hover:text-blue-400' : 'text-gray-700 hover:text-blue-600'}`}>
|
||||
Cloud Computing
|
||||
</a>
|
||||
<a href="#" className={`block text-sm ${theme === 'dark' ? 'text-gray-300 hover:text-blue-400' : 'text-gray-700 hover:text-blue-600'}`}>
|
||||
DevOps
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
)
|
||||
))}
|
||||
</header>
|
||||
);
|
||||
}
|
||||
+58
-207
@@ -1,10 +1,50 @@
|
||||
import { ChevronRight, MessageSquare, Eye, MoreHorizontal, Download } from 'lucide-react';
|
||||
import { useArticle } from '../hooks/useApi';
|
||||
|
||||
interface MainContentProps {
|
||||
theme: 'light' | 'dark';
|
||||
articleSlug: string | null;
|
||||
}
|
||||
|
||||
export function MainContent({ theme }: MainContentProps) {
|
||||
export function MainContent({ theme, articleSlug }: MainContentProps) {
|
||||
const { data: article, isLoading, error } = useArticle(articleSlug);
|
||||
|
||||
if (!articleSlug) {
|
||||
return (
|
||||
<main className="flex-1 max-w-4xl px-4 sm:px-6 lg:px-12 py-4 sm:py-8">
|
||||
<div className={`text-center py-12 ${
|
||||
theme === 'dark' ? 'text-gray-400' : 'text-gray-600'
|
||||
}`}>
|
||||
<p className="text-lg">Select an article from the sidebar to view its content</p>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
<main className="flex-1 max-w-4xl px-4 sm:px-6 lg:px-12 py-4 sm:py-8">
|
||||
<div className={`text-center py-12 ${
|
||||
theme === 'dark' ? 'text-gray-400' : 'text-gray-600'
|
||||
}`}>
|
||||
<p className="text-lg">Loading article...</p>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
if (error || !article) {
|
||||
return (
|
||||
<main className="flex-1 max-w-4xl px-4 sm:px-6 lg:px-12 py-4 sm:py-8">
|
||||
<div className={`text-center py-12 ${
|
||||
theme === 'dark' ? 'text-red-400' : 'text-red-600'
|
||||
}`}>
|
||||
<p className="text-lg">Error loading article</p>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<main className="flex-1 max-w-4xl px-4 sm:px-6 lg:px-12 py-4 sm:py-8">
|
||||
{/* Breadcrumb */}
|
||||
@@ -13,7 +53,7 @@ export function MainContent({ theme }: MainContentProps) {
|
||||
}`}>
|
||||
<a href="#" className="hover:text-blue-600">Learn</a>
|
||||
<ChevronRight className="w-3 h-3 sm:w-4 sm:h-4" />
|
||||
<a href="#" className="hover:text-blue-600">OpenAPI</a>
|
||||
<span>{article.title}</span>
|
||||
</div>
|
||||
|
||||
{/* Action buttons */}
|
||||
@@ -40,213 +80,24 @@ export function MainContent({ theme }: MainContentProps) {
|
||||
</div>
|
||||
|
||||
{/* Main heading */}
|
||||
<h1 className="text-2xl sm:text-3xl lg:text-4xl mb-4 sm:mb-6">Kiota API models</h1>
|
||||
<h1 className="text-2xl sm:text-3xl lg:text-4xl mb-4 sm:mb-6">{article.title}</h1>
|
||||
|
||||
{/* Introduction */}
|
||||
<p className={`mb-6 sm:mb-8 leading-relaxed text-sm sm:text-base ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
The primary goal of Kiota's generated models is to enable a developer to easily craft request payloads and get results as high levels objects. These models eliminate the need for developers to define their own types and/or implement serialization/deserialization.
|
||||
</p>
|
||||
|
||||
{/* Section */}
|
||||
<section className="mb-6 sm:mb-8">
|
||||
<h2 className="text-xl sm:text-2xl mb-3 sm:mb-4" id="components-versus-inline-models">
|
||||
Components versus inline models
|
||||
</h2>
|
||||
<p className={`mb-3 sm:mb-4 leading-relaxed text-sm sm:text-base ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
{/* Article metadata */}
|
||||
{article.updatedAt && (
|
||||
<div className={`mb-6 text-xs ${
|
||||
theme === 'dark' ? 'text-gray-500' : 'text-gray-500'
|
||||
}`}>
|
||||
All models declared as components are generated under a <code className={`px-1.5 py-0.5 rounded text-xs sm:text-sm ${
|
||||
theme === 'dark'
|
||||
? 'bg-[#2d2d2d] text-pink-400'
|
||||
: 'bg-gray-100 text-pink-600'
|
||||
}`}>models</code> subnamespace. If models/components are namespaced <code className={`px-1.5 py-0.5 rounded text-xs sm:text-sm ${
|
||||
theme === 'dark'
|
||||
? 'bg-[#2d2d2d] text-pink-400'
|
||||
: 'bg-gray-100 text-pink-600'
|
||||
}`}>components/models</code>, <code className={`px-1.5 py-0.5 rounded text-xs sm:text-sm ${
|
||||
theme === 'dark'
|
||||
? 'bg-[#2d2d2d] text-pink-400'
|
||||
: 'bg-gray-100 text-pink-600'
|
||||
}`}>components/ns1/models</code>, the namespaces are included as subnamespaces of the <code className={`px-1.5 py-0.5 rounded text-xs sm:text-sm ${
|
||||
theme === 'dark'
|
||||
? 'bg-[#2d2d2d] text-pink-400'
|
||||
: 'bg-gray-100 text-pink-600'
|
||||
}`}>models</code> namespace.
|
||||
</p>
|
||||
<p className={`mb-3 sm:mb-4 leading-relaxed text-sm sm:text-base ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
All models declared inline with an operation are generated under the namespace of the operation, next to the request builder that uses it. As a reminder, all request builders are put in namespaces according to the path segment they refer to.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
{/* Section */}
|
||||
<section className="mb-6 sm:mb-8">
|
||||
<h2 className="text-xl sm:text-2xl mb-3 sm:mb-4" id="inheritance">
|
||||
Inheritance
|
||||
</h2>
|
||||
<p className={`mb-3 sm:mb-4 leading-relaxed text-sm sm:text-base ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
Models in an <a href="#" className="text-blue-600 hover:underline">allOf</a> schema declaration inherit from each other. The uppermost type in the collection is the greatest ancestor of the chain.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
{/* Section */}
|
||||
<section className="mb-6 sm:mb-8">
|
||||
<h3 className="text-lg sm:text-xl mb-3 sm:mb-4" id="allof-interpretation">
|
||||
allOf interpretation rules
|
||||
</h3>
|
||||
<p className={`mb-3 sm:mb-4 leading-relaxed text-sm sm:text-base ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
The following table describes how kiota will project any schema with allOf entries when processing an API description:
|
||||
</p>
|
||||
|
||||
{/* Table */}
|
||||
<div className={`border rounded-lg overflow-hidden mt-4 sm:mt-6 ${
|
||||
theme === 'dark' ? 'border-gray-700' : 'border-gray-300'
|
||||
}`}>
|
||||
<button className={`w-full flex items-center justify-center gap-2 py-2 border-b text-xs sm:text-sm ${
|
||||
theme === 'dark'
|
||||
? 'bg-[#0d0d0d] border-gray-700 text-gray-400 hover:text-white'
|
||||
: 'bg-gray-50 border-gray-300 text-gray-600 hover:text-gray-900'
|
||||
}`}>
|
||||
<MoreHorizontal className="w-4 h-4" />
|
||||
<span className="hidden sm:inline">Expand table</span>
|
||||
<span className="sm:hidden">Expand</span>
|
||||
</button>
|
||||
|
||||
<div className="overflow-x-auto">
|
||||
<table className="w-full">
|
||||
<thead>
|
||||
<tr className={`border-b ${
|
||||
theme === 'dark'
|
||||
? 'bg-[#0d0d0d] border-gray-700'
|
||||
: 'bg-gray-50 border-gray-300'
|
||||
}`}>
|
||||
<th className={`px-2 sm:px-4 py-2 sm:py-3 text-left text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
<span className="hidden sm:inline">Number of peer properties</span>
|
||||
<span className="sm:hidden">Peer props</span>
|
||||
</th>
|
||||
<th className={`px-2 sm:px-4 py-2 sm:py-3 text-left text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
<span className="hidden sm:inline">Number of inline schemas</span>
|
||||
<span className="sm:hidden">Inline</span>
|
||||
</th>
|
||||
<th className={`px-2 sm:px-4 py-2 sm:py-3 text-left text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
<span className="hidden sm:inline">Number referenced schemas</span>
|
||||
<span className="sm:hidden">Referenced</span>
|
||||
</th>
|
||||
<th className={`px-2 sm:px-4 py-2 sm:py-3 text-left text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
<span className="hidden sm:inline">Total number of schemas</span>
|
||||
<span className="sm:hidden">Total</span>
|
||||
</th>
|
||||
<th className={`px-2 sm:px-4 py-2 sm:py-3 text-left text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>Result</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr className={`border-b ${
|
||||
theme === 'dark' ? 'border-gray-800' : 'border-gray-200'
|
||||
}`}>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>0</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>0</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>0</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>0</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
<span className="hidden sm:inline">Ignored/invalid</span>
|
||||
<span className="sm:hidden">Invalid</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr className={`border-b ${
|
||||
theme === 'dark' ? 'border-gray-800' : 'border-gray-200'
|
||||
}`}>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>0</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>0</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>1</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>1</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>Unwrapped</td>
|
||||
</tr>
|
||||
<tr className={`border-b ${
|
||||
theme === 'dark' ? 'border-gray-800' : 'border-gray-200'
|
||||
}`}>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>0</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>0</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>2+</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>2+</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
<span className="hidden sm:inline">Intersection type</span>
|
||||
<span className="sm:hidden">Intersection</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr className={`border-b ${
|
||||
theme === 'dark' ? 'border-gray-800' : 'border-gray-200'
|
||||
}`}>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>1+</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>any</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>0</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>any</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
<span className="hidden sm:inline">Inline object</span>
|
||||
<span className="sm:hidden">Inline obj</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
Last updated: {new Date(article.updatedAt).toLocaleDateString()}
|
||||
</div>
|
||||
</section>
|
||||
)}
|
||||
|
||||
{/* Article content */}
|
||||
<div
|
||||
className={`mb-6 sm:mb-8 leading-relaxed text-sm sm:text-base prose max-w-none ${
|
||||
theme === 'dark' ? 'text-gray-300 prose-invert' : 'text-gray-700'
|
||||
}`}
|
||||
dangerouslySetInnerHTML={{ __html: article.content || '' }}
|
||||
/>
|
||||
|
||||
{/* Footer */}
|
||||
<div className={`mt-8 sm:mt-12 pt-4 sm:pt-6 border-t ${
|
||||
@@ -261,4 +112,4 @@ export function MainContent({ theme }: MainContentProps) {
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
}
|
||||
+63
-216
@@ -1,18 +1,19 @@
|
||||
import { Search, ChevronRight, ChevronDown, X } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import { useTaxonomyChildren } from '../hooks/useApi';
|
||||
import type { GetChildItemDto } from '../kiota/models';
|
||||
|
||||
interface SidebarProps {
|
||||
isOpen: boolean;
|
||||
toggleSidebar: () => void;
|
||||
theme: 'light' | 'dark';
|
||||
taxonomyId: string | null;
|
||||
onArticleClick: (slug: string) => void;
|
||||
}
|
||||
|
||||
export function Sidebar({ isOpen, toggleSidebar, theme }: SidebarProps) {
|
||||
const [expandedSections, setExpandedSections] = useState<Record<string, boolean>>({
|
||||
'quick-start': true,
|
||||
'concepts': true,
|
||||
'how-to': false
|
||||
});
|
||||
export function Sidebar({ isOpen, toggleSidebar, theme, taxonomyId, onArticleClick }: SidebarProps) {
|
||||
const [expandedSections, setExpandedSections] = useState<Record<string, boolean>>({});
|
||||
const { data: taxonomyData, isLoading } = useTaxonomyChildren(taxonomyId);
|
||||
|
||||
const toggleSection = (section: string) => {
|
||||
setExpandedSections(prev => ({
|
||||
@@ -21,6 +22,45 @@ export function Sidebar({ isOpen, toggleSidebar, theme }: SidebarProps) {
|
||||
}));
|
||||
};
|
||||
|
||||
const renderMenuItem = (item: GetChildItemDto, depth: number = 0) => {
|
||||
const hasChildren = item.children && item.children.length > 0;
|
||||
const isExpanded = expandedSections[item.title || ''];
|
||||
|
||||
return (
|
||||
<div key={item.title} style={{ marginLeft: `${depth * 1.5}rem` }}>
|
||||
<button
|
||||
onClick={() => {
|
||||
if (hasChildren) {
|
||||
toggleSection(item.title || '');
|
||||
} else if (item.slug) {
|
||||
onArticleClick(item.slug);
|
||||
}
|
||||
}}
|
||||
className={`flex items-center gap-2 w-full px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}
|
||||
>
|
||||
{hasChildren && (
|
||||
isExpanded ? (
|
||||
<ChevronDown className="w-4 h-4" />
|
||||
) : (
|
||||
<ChevronRight className="w-4 h-4" />
|
||||
)
|
||||
)}
|
||||
{!hasChildren}
|
||||
{item.title}
|
||||
</button>
|
||||
{hasChildren && isExpanded && (
|
||||
<div className="mt-1">
|
||||
{item.children?.map((child) => renderMenuItem(child, depth + 1))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<aside
|
||||
className={`
|
||||
@@ -68,216 +108,23 @@ export function Sidebar({ isOpen, toggleSidebar, theme }: SidebarProps) {
|
||||
</div>
|
||||
|
||||
<nav className="space-y-1">
|
||||
<div className={`px-3 py-2 text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-900'
|
||||
}`}>
|
||||
Kiota documentation
|
||||
</div>
|
||||
|
||||
<a href="#" className={`block px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}>
|
||||
Overview
|
||||
</a>
|
||||
<a href="#" className={`block px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}>
|
||||
Install
|
||||
</a>
|
||||
<a href="#" className={`block px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}>
|
||||
Use Kiota
|
||||
</a>
|
||||
|
||||
<div>
|
||||
<button
|
||||
onClick={() => toggleSection('quick-start')}
|
||||
className={`flex items-center gap-2 w-full px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}
|
||||
>
|
||||
{expandedSections['quick-start'] ? (
|
||||
<ChevronDown className="w-4 h-4" />
|
||||
) : (
|
||||
<ChevronRight className="w-4 h-4" />
|
||||
)}
|
||||
Quick start
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button
|
||||
onClick={() => toggleSection('tutorials')}
|
||||
className={`flex items-center gap-2 w-full px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}
|
||||
>
|
||||
{expandedSections['tutorials'] ? (
|
||||
<ChevronDown className="w-4 h-4" />
|
||||
) : (
|
||||
<ChevronRight className="w-4 h-4" />
|
||||
)}
|
||||
Tutorials
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button
|
||||
onClick={() => toggleSection('concepts')}
|
||||
className={`flex items-center gap-2 w-full px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}
|
||||
>
|
||||
{expandedSections['concepts'] ? (
|
||||
<ChevronDown className="w-4 h-4" />
|
||||
) : (
|
||||
<ChevronRight className="w-4 h-4" />
|
||||
)}
|
||||
Concepts
|
||||
</button>
|
||||
|
||||
{expandedSections['concepts'] && (
|
||||
<div className="ml-6 mt-1 space-y-1">
|
||||
<a href="#" className={`block px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}>
|
||||
Kiota design
|
||||
</a>
|
||||
<a href="#" className={`block px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}>
|
||||
Managing dependencies
|
||||
</a>
|
||||
<a href="#" className={`block px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}>
|
||||
API client experience
|
||||
</a>
|
||||
<a href="#" className={`block px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}>
|
||||
Abstractions
|
||||
</a>
|
||||
<a href="#" className={`block px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}>
|
||||
Authentication
|
||||
</a>
|
||||
<a href="#" className={`block px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}>
|
||||
Request builders
|
||||
</a>
|
||||
<a href="#" className={`block px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}>
|
||||
Query parameters and headers
|
||||
</a>
|
||||
<a href="#" className={`block px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}>
|
||||
Serialization
|
||||
</a>
|
||||
<a href="#" className={`block px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}>
|
||||
Middleware handlers
|
||||
</a>
|
||||
<a href="#" className={`block px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'bg-gray-800'
|
||||
: 'bg-gray-100'
|
||||
}`}>
|
||||
Models
|
||||
</a>
|
||||
<a href="#" className={`block px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}>
|
||||
Status codes
|
||||
</a>
|
||||
<a href="#" className={`block px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}>
|
||||
Error handling
|
||||
</a>
|
||||
<a href="#" className={`block px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}>
|
||||
Backing store
|
||||
</a>
|
||||
<a href="#" className={`block px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}>
|
||||
Unit testing
|
||||
</a>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button
|
||||
onClick={() => toggleSection('how-to')}
|
||||
className={`flex items-center gap-2 w-full px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}
|
||||
>
|
||||
{expandedSections['how-to'] ? (
|
||||
<ChevronDown className="w-4 h-4" />
|
||||
) : (
|
||||
<ChevronRight className="w-4 h-4" />
|
||||
)}
|
||||
How to
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<a href="#" className={`block px-3 py-1.5 text-sm rounded ${
|
||||
theme === 'dark'
|
||||
? 'text-gray-400 hover:bg-gray-800'
|
||||
: 'text-gray-600 hover:bg-gray-100'
|
||||
}`}>
|
||||
Support
|
||||
</a>
|
||||
{isLoading ? (
|
||||
<div className={`px-3 py-2 text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-900'
|
||||
}`}>
|
||||
Loading...
|
||||
</div>
|
||||
) : taxonomyData?.items && taxonomyData.items.length > 0 ? (
|
||||
<>
|
||||
{taxonomyData.items.map((item) => renderMenuItem(item))}
|
||||
</>
|
||||
) : (
|
||||
<div className={`px-3 py-2 text-sm ${
|
||||
theme === 'dark' ? 'text-gray-400' : 'text-gray-600'
|
||||
}`}>
|
||||
{taxonomyId ? 'No items found' : 'Select a category from the menu'}
|
||||
</div>
|
||||
)}
|
||||
</nav>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { apiClient } from '../lib/apiClient';
|
||||
import type { GetSiteHeaderResponseDto, GetChildResponseDto, GetArticleResponseDto } from '../kiota/models';
|
||||
|
||||
/**
|
||||
* Hook to fetch site header data
|
||||
*/
|
||||
export function useSiteHeader() {
|
||||
return useQuery({
|
||||
queryKey: ['siteHeader'],
|
||||
queryFn: async () => {
|
||||
const response = await apiClient.v1.contents.siteHeader.get();
|
||||
return response as GetSiteHeaderResponseDto[];
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook to fetch taxonomy child items
|
||||
*/
|
||||
export function useTaxonomyChildren(taxonomyId: string | null) {
|
||||
return useQuery({
|
||||
queryKey: ['taxonomyChildren', taxonomyId],
|
||||
queryFn: async () => {
|
||||
if (!taxonomyId) return null;
|
||||
const response = await apiClient.v1.taxonomies.byId(taxonomyId).childItems.get();
|
||||
console.log(response);
|
||||
return response as unknown as GetChildResponseDto;
|
||||
},
|
||||
enabled: !!taxonomyId,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook to fetch article by slug
|
||||
*/
|
||||
export function useArticle(slug: string | null) {
|
||||
return useQuery({
|
||||
queryKey: ['article', slug],
|
||||
queryFn: async () => {
|
||||
if (!slug) return null;
|
||||
const response = await apiClient.v1.articles.bySlug(slug).get();
|
||||
return response as unknown as GetArticleResponseDto;
|
||||
},
|
||||
enabled: !!slug,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook to fetch article taxonomy path
|
||||
*/
|
||||
export function useArticleTaxonomyPath(slug: string | null) {
|
||||
return useQuery({
|
||||
queryKey: ['articleTaxonomyPath', slug],
|
||||
queryFn: async () => {
|
||||
if (!slug) return null;
|
||||
const response = await apiClient.v1.articles.bySlug(slug).taxonomyPath.get();
|
||||
return response;
|
||||
},
|
||||
enabled: !!slug,
|
||||
});
|
||||
}
|
||||
+10
-4
@@ -1,5 +1,11 @@
|
||||
@import "tailwindcss";
|
||||
@layer theme {
|
||||
:root, :host {
|
||||
font-family: "Asta Sans", sans-serif;
|
||||
}
|
||||
}
|
||||
/*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */
|
||||
@layer properties {
|
||||
/* @layer properties {
|
||||
@supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
|
||||
*, :before, :after, ::backdrop {
|
||||
--tw-translate-x: 0;
|
||||
@@ -40,8 +46,8 @@
|
||||
|
||||
@layer theme {
|
||||
:root, :host {
|
||||
--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
--font-sans: "Asta Sans", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
--font-mono: "Asta Sans", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
--color-orange-500: oklch(.705 .213 47.604);
|
||||
--color-green-500: oklch(.723 .219 149.579);
|
||||
--color-blue-400: oklch(.707 .165 254.624);
|
||||
@@ -1642,4 +1648,4 @@ html {
|
||||
@property --tw-ease {
|
||||
syntax: "*";
|
||||
inherits: false
|
||||
}
|
||||
} */
|
||||
@@ -0,0 +1,8 @@
|
||||
Warning: KiotaBuilder Could not create error type for 4XX in AppController_isHealthy
|
||||
Warning: KiotaBuilder Could not create error type for 5XX in AppController_isHealthy
|
||||
Warning: KiotaBuilder Could not create error type for 4XX in AccountController_getAccountInfo
|
||||
Warning: KiotaBuilder Could not create error type for 5XX in AccountController_getAccountInfo
|
||||
Warning: KiotaBuilder Could not create error type for 4XX in ImageController_uploadImage
|
||||
Warning: KiotaBuilder Could not create error type for 5XX in ImageController_uploadImage
|
||||
Warning: KiotaBuilder Could not create error type for 4XX in AccountController_signIn
|
||||
Warning: KiotaBuilder Could not create error type for 5XX in AccountController_signIn
|
||||
@@ -0,0 +1,74 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// Generated by Microsoft Kiota
|
||||
// @ts-ignore
|
||||
import { type V1RequestBuilder, V1RequestBuilderNavigationMetadata, V1RequestBuilderRequestsMetadata } from './v1/index.js';
|
||||
// @ts-ignore
|
||||
import { apiClientProxifier, ParseNodeFactoryRegistry, SerializationWriterFactoryRegistry, type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type RequestAdapter } from '@microsoft/kiota-abstractions';
|
||||
// @ts-ignore
|
||||
import { FormParseNodeFactory, FormSerializationWriterFactory } from '@microsoft/kiota-serialization-form';
|
||||
// @ts-ignore
|
||||
import { JsonParseNodeFactory, JsonSerializationWriterFactory } from '@microsoft/kiota-serialization-json';
|
||||
// @ts-ignore
|
||||
import { MultipartSerializationWriterFactory } from '@microsoft/kiota-serialization-multipart';
|
||||
// @ts-ignore
|
||||
import { TextParseNodeFactory, TextSerializationWriterFactory } from '@microsoft/kiota-serialization-text';
|
||||
|
||||
/**
|
||||
* The main entry point of the SDK, exposes the configuration and the fluent API.
|
||||
*/
|
||||
export interface ApiClient extends BaseRequestBuilder<ApiClient> {
|
||||
/**
|
||||
* The v1 property
|
||||
*/
|
||||
get v1(): V1RequestBuilder;
|
||||
}
|
||||
/**
|
||||
* Instantiates a new {@link ApiClient} and sets the default values.
|
||||
* @param requestAdapter The request adapter to use to execute the requests.
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function createApiClient(requestAdapter: RequestAdapter) {
|
||||
if (requestAdapter === undefined) {
|
||||
throw new Error("requestAdapter cannot be undefined");
|
||||
}
|
||||
const serializationWriterFactory = requestAdapter.getSerializationWriterFactory() as SerializationWriterFactoryRegistry;
|
||||
const parseNodeFactoryRegistry = requestAdapter.getParseNodeFactory() as ParseNodeFactoryRegistry;
|
||||
const backingStoreFactory = requestAdapter.getBackingStoreFactory();
|
||||
|
||||
if (parseNodeFactoryRegistry.registerDefaultDeserializer) {
|
||||
parseNodeFactoryRegistry.registerDefaultDeserializer(JsonParseNodeFactory, backingStoreFactory);
|
||||
parseNodeFactoryRegistry.registerDefaultDeserializer(TextParseNodeFactory, backingStoreFactory);
|
||||
parseNodeFactoryRegistry.registerDefaultDeserializer(FormParseNodeFactory, backingStoreFactory);
|
||||
}
|
||||
|
||||
if (serializationWriterFactory.registerDefaultSerializer) {
|
||||
serializationWriterFactory.registerDefaultSerializer(JsonSerializationWriterFactory);
|
||||
serializationWriterFactory.registerDefaultSerializer(TextSerializationWriterFactory);
|
||||
serializationWriterFactory.registerDefaultSerializer(FormSerializationWriterFactory);
|
||||
serializationWriterFactory.registerDefaultSerializer(MultipartSerializationWriterFactory);
|
||||
}
|
||||
|
||||
if (requestAdapter.baseUrl === undefined || requestAdapter.baseUrl === null || requestAdapter.baseUrl === "") {
|
||||
requestAdapter.baseUrl = "https://moeum.dahyeon.us";
|
||||
}
|
||||
const pathParameters: Record<string, unknown> = {
|
||||
"baseurl": requestAdapter.baseUrl,
|
||||
};
|
||||
return apiClientProxifier<ApiClient>(requestAdapter, pathParameters, ApiClientNavigationMetadata, undefined);
|
||||
}
|
||||
/**
|
||||
* Uri template for the request builder.
|
||||
*/
|
||||
export const ApiClientUriTemplate = "{+baseurl}";
|
||||
/**
|
||||
* Metadata for all the navigation properties in the request builder.
|
||||
*/
|
||||
export const ApiClientNavigationMetadata: Record<Exclude<keyof ApiClient, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {
|
||||
v1: {
|
||||
requestsMetadata: V1RequestBuilderRequestsMetadata,
|
||||
navigationMetadata: V1RequestBuilderNavigationMetadata,
|
||||
},
|
||||
};
|
||||
/* tslint:enable */
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"descriptionHash": "611FC3ED07B68D7974B5903237F68D794D044CCB3F89C7E348F801F31C53FA36B2A3BB5A2DC3C3B3B11C5D1D35E193D454673552A3181BCD4C104ECF35FD1001",
|
||||
"descriptionLocation": "https://moeum.dahyeon.us/v1/api-json",
|
||||
"lockFileVersion": "1.0.0",
|
||||
"kiotaVersion": "1.28.0",
|
||||
"clientClassName": "ApiClient",
|
||||
"typeAccessModifier": "Public",
|
||||
"clientNamespaceName": "ApiSdk",
|
||||
"language": "TypeScript",
|
||||
"usesBackingStore": false,
|
||||
"excludeBackwardCompatible": false,
|
||||
"includeAdditionalData": true,
|
||||
"disableSSLValidation": false,
|
||||
"serializers": [
|
||||
"Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory",
|
||||
"Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory",
|
||||
"Microsoft.Kiota.Serialization.Form.FormSerializationWriterFactory",
|
||||
"Microsoft.Kiota.Serialization.Multipart.MultipartSerializationWriterFactory"
|
||||
],
|
||||
"deserializers": [
|
||||
"Microsoft.Kiota.Serialization.Json.JsonParseNodeFactory",
|
||||
"Microsoft.Kiota.Serialization.Text.TextParseNodeFactory",
|
||||
"Microsoft.Kiota.Serialization.Form.FormParseNodeFactory"
|
||||
],
|
||||
"structuredMimeTypes": [
|
||||
"application/json",
|
||||
"text/plain;q=0.9",
|
||||
"application/x-www-form-urlencoded;q=0.2",
|
||||
"multipart/form-data;q=0.1"
|
||||
],
|
||||
"includePatterns": [],
|
||||
"excludePatterns": [],
|
||||
"disabledValidationRules": []
|
||||
}
|
||||
@@ -0,0 +1,588 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// Generated by Microsoft Kiota
|
||||
// @ts-ignore
|
||||
import { type AdditionalDataHolder, type ApiError, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions';
|
||||
|
||||
export interface ArticleMetadataDto extends AdditionalDataHolder, Parsable {
|
||||
/**
|
||||
* The dataType property
|
||||
*/
|
||||
dataType?: ArticleMetadataDto_dataType | null;
|
||||
/**
|
||||
* The isReserved property
|
||||
*/
|
||||
isReserved?: boolean | null;
|
||||
/**
|
||||
* The key property
|
||||
*/
|
||||
key?: string | null;
|
||||
/**
|
||||
* The value property
|
||||
*/
|
||||
value?: string[] | string | null;
|
||||
}
|
||||
export type ArticleMetadataDto_dataType = (typeof ArticleMetadataDto_dataTypeObject)[keyof typeof ArticleMetadataDto_dataTypeObject];
|
||||
export type ArticleMetadataDto_value = string[] | string;
|
||||
export interface ContentSectionDto extends AdditionalDataHolder, Parsable {
|
||||
/**
|
||||
* The headline property
|
||||
*/
|
||||
headline?: string | null;
|
||||
/**
|
||||
* The taxonomies property
|
||||
*/
|
||||
taxonomies?: ContentSectionEmbeddedTaxonomyDto[] | null;
|
||||
}
|
||||
export interface ContentSectionEmbeddedTaxonomyDto extends AdditionalDataHolder, Parsable {
|
||||
/**
|
||||
* The label property
|
||||
*/
|
||||
label?: string | null;
|
||||
/**
|
||||
* The taxonomyId property
|
||||
*/
|
||||
taxonomyId?: string | null;
|
||||
}
|
||||
/**
|
||||
* Creates a new instance of the appropriate class based on discriminator value
|
||||
* @param parseNode The parse node to use to read the discriminator value and create the object
|
||||
* @returns {string[] | string}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function createArticleMetadataDto_valueFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
|
||||
return deserializeIntoArticleMetadataDto_value;
|
||||
}
|
||||
/**
|
||||
* Creates a new instance of the appropriate class based on discriminator value
|
||||
* @param parseNode The parse node to use to read the discriminator value and create the object
|
||||
* @returns {ArticleMetadataDto}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function createArticleMetadataDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
|
||||
return deserializeIntoArticleMetadataDto;
|
||||
}
|
||||
/**
|
||||
* Creates a new instance of the appropriate class based on discriminator value
|
||||
* @param parseNode The parse node to use to read the discriminator value and create the object
|
||||
* @returns {ContentSectionDto}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function createContentSectionDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
|
||||
return deserializeIntoContentSectionDto;
|
||||
}
|
||||
/**
|
||||
* Creates a new instance of the appropriate class based on discriminator value
|
||||
* @param parseNode The parse node to use to read the discriminator value and create the object
|
||||
* @returns {ContentSectionEmbeddedTaxonomyDto}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function createContentSectionEmbeddedTaxonomyDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
|
||||
return deserializeIntoContentSectionEmbeddedTaxonomyDto;
|
||||
}
|
||||
/**
|
||||
* Creates a new instance of the appropriate class based on discriminator value
|
||||
* @param parseNode The parse node to use to read the discriminator value and create the object
|
||||
* @returns {GetArticleResponseDto}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function createGetArticleResponseDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
|
||||
return deserializeIntoGetArticleResponseDto;
|
||||
}
|
||||
/**
|
||||
* Creates a new instance of the appropriate class based on discriminator value
|
||||
* @param parseNode The parse node to use to read the discriminator value and create the object
|
||||
* @returns {GetChildItemDto}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function createGetChildItemDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
|
||||
return deserializeIntoGetChildItemDto;
|
||||
}
|
||||
/**
|
||||
* Creates a new instance of the appropriate class based on discriminator value
|
||||
* @param parseNode The parse node to use to read the discriminator value and create the object
|
||||
* @returns {GetChildItemMetadataDto}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function createGetChildItemMetadataDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
|
||||
return deserializeIntoGetChildItemMetadataDto;
|
||||
}
|
||||
/**
|
||||
* Creates a new instance of the appropriate class based on discriminator value
|
||||
* @param parseNode The parse node to use to read the discriminator value and create the object
|
||||
* @returns {GetChildItemResponseDto}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function createGetChildItemResponseDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
|
||||
return deserializeIntoGetChildItemResponseDto;
|
||||
}
|
||||
/**
|
||||
* Creates a new instance of the appropriate class based on discriminator value
|
||||
* @param parseNode The parse node to use to read the discriminator value and create the object
|
||||
* @returns {GetSiteHeaderResponseDto}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function createGetSiteHeaderResponseDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
|
||||
return deserializeIntoGetSiteHeaderResponseDto;
|
||||
}
|
||||
/**
|
||||
* Creates a new instance of the appropriate class based on discriminator value
|
||||
* @param parseNode The parse node to use to read the discriminator value and create the object
|
||||
* @returns {GetTaxonomyPathResponseDto}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function createGetTaxonomyPathResponseDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
|
||||
return deserializeIntoGetTaxonomyPathResponseDto;
|
||||
}
|
||||
/**
|
||||
* Creates a new instance of the appropriate class based on discriminator value
|
||||
* @param parseNode The parse node to use to read the discriminator value and create the object
|
||||
* @returns {TaxonomyPathItemDto}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function createTaxonomyPathItemDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
|
||||
return deserializeIntoTaxonomyPathItemDto;
|
||||
}
|
||||
/**
|
||||
* The deserialization information for the current model
|
||||
* @param ArticleMetadataDto The instance to deserialize into.
|
||||
* @returns {Record<string, (node: ParseNode) => void>}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function deserializeIntoArticleMetadataDto(articleMetadataDto: Partial<ArticleMetadataDto> | undefined = {}) : Record<string, (node: ParseNode) => void> {
|
||||
return {
|
||||
"dataType": n => { articleMetadataDto.dataType = n.getEnumValue<ArticleMetadataDto_dataType>(ArticleMetadataDto_dataTypeObject) ?? ArticleMetadataDto_dataTypeObject.String; },
|
||||
"isReserved": n => { articleMetadataDto.isReserved = n.getBooleanValue(); },
|
||||
"key": n => { articleMetadataDto.key = n.getStringValue(); },
|
||||
"value": n => { articleMetadataDto.value = n.getCollectionOfPrimitiveValues<string>() ?? n.getStringValue(); },
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The deserialization information for the current model
|
||||
* @param ArticleMetadataDto_value The instance to deserialize into.
|
||||
* @returns {Record<string, (node: ParseNode) => void>}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function deserializeIntoArticleMetadataDto_value(articleMetadataDto_value: Partial<Parsable | string[] | string> | undefined = {}) : Record<string, (node: ParseNode) => void> {
|
||||
return {
|
||||
"" : n => { articleMetadataDto_value = n.getCollectionOfPrimitiveValues<string>() ?? n.getStringValue()},
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The deserialization information for the current model
|
||||
* @param ContentSectionDto The instance to deserialize into.
|
||||
* @returns {Record<string, (node: ParseNode) => void>}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function deserializeIntoContentSectionDto(contentSectionDto: Partial<ContentSectionDto> | undefined = {}) : Record<string, (node: ParseNode) => void> {
|
||||
return {
|
||||
"headline": n => { contentSectionDto.headline = n.getStringValue(); },
|
||||
"taxonomies": n => { contentSectionDto.taxonomies = n.getCollectionOfObjectValues<ContentSectionEmbeddedTaxonomyDto>(createContentSectionEmbeddedTaxonomyDtoFromDiscriminatorValue); },
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The deserialization information for the current model
|
||||
* @param ContentSectionEmbeddedTaxonomyDto The instance to deserialize into.
|
||||
* @returns {Record<string, (node: ParseNode) => void>}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function deserializeIntoContentSectionEmbeddedTaxonomyDto(contentSectionEmbeddedTaxonomyDto: Partial<ContentSectionEmbeddedTaxonomyDto> | undefined = {}) : Record<string, (node: ParseNode) => void> {
|
||||
return {
|
||||
"label": n => { contentSectionEmbeddedTaxonomyDto.label = n.getStringValue(); },
|
||||
"taxonomyId": n => { contentSectionEmbeddedTaxonomyDto.taxonomyId = n.getStringValue(); },
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The deserialization information for the current model
|
||||
* @param GetArticleResponseDto The instance to deserialize into.
|
||||
* @returns {Record<string, (node: ParseNode) => void>}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function deserializeIntoGetArticleResponseDto(getArticleResponseDto: Partial<GetArticleResponseDto> | undefined = {}) : Record<string, (node: ParseNode) => void> {
|
||||
return {
|
||||
"content": n => { getArticleResponseDto.content = n.getStringValue(); },
|
||||
"createdAt": n => { getArticleResponseDto.createdAt = n.getDateValue(); },
|
||||
"_id": n => { getArticleResponseDto.id = n.getStringValue(); },
|
||||
"metadatas": n => { getArticleResponseDto.metadatas = n.getCollectionOfObjectValues<ArticleMetadataDto>(createArticleMetadataDtoFromDiscriminatorValue); },
|
||||
"slug": n => { getArticleResponseDto.slug = n.getStringValue(); },
|
||||
"status": n => { getArticleResponseDto.status = n.getEnumValue<GetArticleResponseDto_status>(GetArticleResponseDto_statusObject); },
|
||||
"title": n => { getArticleResponseDto.title = n.getStringValue(); },
|
||||
"updatedAt": n => { getArticleResponseDto.updatedAt = n.getDateValue(); },
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The deserialization information for the current model
|
||||
* @param GetChildItemDto The instance to deserialize into.
|
||||
* @returns {Record<string, (node: ParseNode) => void>}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function deserializeIntoGetChildItemDto(getChildItemDto: Partial<GetChildItemDto> | undefined = {}) : Record<string, (node: ParseNode) => void> {
|
||||
return {
|
||||
"articleId": n => { getChildItemDto.articleId = n.getStringValue(); },
|
||||
"children": n => { getChildItemDto.children = n.getCollectionOfObjectValues<GetChildItemDto>(createGetChildItemDtoFromDiscriminatorValue); },
|
||||
"order": n => { getChildItemDto.order = n.getNumberValue(); },
|
||||
"slug": n => { getChildItemDto.slug = n.getStringValue(); },
|
||||
"title": n => { getChildItemDto.title = n.getStringValue(); },
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The deserialization information for the current model
|
||||
* @param GetChildItemMetadataDto The instance to deserialize into.
|
||||
* @returns {Record<string, (node: ParseNode) => void>}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function deserializeIntoGetChildItemMetadataDto(getChildItemMetadataDto: Partial<GetChildItemMetadataDto> | undefined = {}) : Record<string, (node: ParseNode) => void> {
|
||||
return {
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The deserialization information for the current model
|
||||
* @param GetChildItemResponseDto The instance to deserialize into.
|
||||
* @returns {Record<string, (node: ParseNode) => void>}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function deserializeIntoGetChildItemResponseDto(getChildItemResponseDto: Partial<GetChildItemResponseDto> | undefined = {}) : Record<string, (node: ParseNode) => void> {
|
||||
return {
|
||||
"items": n => { getChildItemResponseDto.items = n.getCollectionOfObjectValues<GetChildItemDto>(createGetChildItemDtoFromDiscriminatorValue); },
|
||||
"label": n => { getChildItemResponseDto.label = n.getStringValue(); },
|
||||
"metadatas": n => { getChildItemResponseDto.metadatas = n.getCollectionOfObjectValues<GetChildItemMetadataDto>(createGetChildItemMetadataDtoFromDiscriminatorValue); },
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The deserialization information for the current model
|
||||
* @param GetSiteHeaderResponseDto The instance to deserialize into.
|
||||
* @returns {Record<string, (node: ParseNode) => void>}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function deserializeIntoGetSiteHeaderResponseDto(getSiteHeaderResponseDto: Partial<GetSiteHeaderResponseDto> | undefined = {}) : Record<string, (node: ParseNode) => void> {
|
||||
return {
|
||||
"key": n => { getSiteHeaderResponseDto.key = n.getStringValue(); },
|
||||
"label": n => { getSiteHeaderResponseDto.label = n.getStringValue(); },
|
||||
"sections": n => { getSiteHeaderResponseDto.sections = n.getCollectionOfObjectValues<ContentSectionDto>(createContentSectionDtoFromDiscriminatorValue); },
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The deserialization information for the current model
|
||||
* @param GetTaxonomyPathResponseDto The instance to deserialize into.
|
||||
* @returns {Record<string, (node: ParseNode) => void>}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function deserializeIntoGetTaxonomyPathResponseDto(getTaxonomyPathResponseDto: Partial<GetTaxonomyPathResponseDto> | undefined = {}) : Record<string, (node: ParseNode) => void> {
|
||||
return {
|
||||
"items": n => { getTaxonomyPathResponseDto.items = n.getCollectionOfObjectValues<TaxonomyPathItemDto>(createTaxonomyPathItemDtoFromDiscriminatorValue); },
|
||||
"taxonomyId": n => { getTaxonomyPathResponseDto.taxonomyId = n.getStringValue(); },
|
||||
"taxonomyLabel": n => { getTaxonomyPathResponseDto.taxonomyLabel = n.getStringValue(); },
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The deserialization information for the current model
|
||||
* @param TaxonomyPathItemDto The instance to deserialize into.
|
||||
* @returns {Record<string, (node: ParseNode) => void>}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function deserializeIntoTaxonomyPathItemDto(taxonomyPathItemDto: Partial<TaxonomyPathItemDto> | undefined = {}) : Record<string, (node: ParseNode) => void> {
|
||||
return {
|
||||
"articleId": n => { taxonomyPathItemDto.articleId = n.getStringValue(); },
|
||||
"order": n => { taxonomyPathItemDto.order = n.getNumberValue(); },
|
||||
"slug": n => { taxonomyPathItemDto.slug = n.getStringValue(); },
|
||||
"title": n => { taxonomyPathItemDto.title = n.getStringValue(); },
|
||||
}
|
||||
}
|
||||
export interface GetArticleResponseDto extends AdditionalDataHolder, ApiError, Parsable {
|
||||
/**
|
||||
* The content property
|
||||
*/
|
||||
content?: string | null;
|
||||
/**
|
||||
* The createdAt property
|
||||
*/
|
||||
createdAt?: Date | null;
|
||||
/**
|
||||
* The _id property
|
||||
*/
|
||||
id?: string | null;
|
||||
/**
|
||||
* The metadatas property
|
||||
*/
|
||||
metadatas?: ArticleMetadataDto[] | null;
|
||||
/**
|
||||
* The slug property
|
||||
*/
|
||||
slug?: string | null;
|
||||
/**
|
||||
* The status property
|
||||
*/
|
||||
status?: GetArticleResponseDto_status | null;
|
||||
/**
|
||||
* The title property
|
||||
*/
|
||||
title?: string | null;
|
||||
/**
|
||||
* The updatedAt property
|
||||
*/
|
||||
updatedAt?: Date | null;
|
||||
}
|
||||
export type GetArticleResponseDto_status = (typeof GetArticleResponseDto_statusObject)[keyof typeof GetArticleResponseDto_statusObject];
|
||||
export interface GetChildItemDto extends AdditionalDataHolder, Parsable {
|
||||
/**
|
||||
* The articleId property
|
||||
*/
|
||||
articleId?: string | null;
|
||||
/**
|
||||
* 하위 목차 아이템 리스트
|
||||
*/
|
||||
children?: GetChildItemDto[] | null;
|
||||
/**
|
||||
* The order property
|
||||
*/
|
||||
order?: number | null;
|
||||
/**
|
||||
* The slug property
|
||||
*/
|
||||
slug?: string | null;
|
||||
/**
|
||||
* The title property
|
||||
*/
|
||||
title?: string | null;
|
||||
}
|
||||
export interface GetChildItemMetadataDto extends AdditionalDataHolder, Parsable {
|
||||
}
|
||||
export interface GetChildItemResponseDto extends AdditionalDataHolder, ApiError, Parsable {
|
||||
/**
|
||||
* The items property
|
||||
*/
|
||||
items?: GetChildItemDto[] | null;
|
||||
/**
|
||||
* The label property
|
||||
*/
|
||||
label?: string | null;
|
||||
/**
|
||||
* The metadatas property
|
||||
*/
|
||||
metadatas?: GetChildItemMetadataDto[] | null;
|
||||
}
|
||||
export interface GetSiteHeaderResponseDto extends AdditionalDataHolder, Parsable {
|
||||
/**
|
||||
* The key property
|
||||
*/
|
||||
key?: string | null;
|
||||
/**
|
||||
* The label property
|
||||
*/
|
||||
label?: string | null;
|
||||
/**
|
||||
* The sections property
|
||||
*/
|
||||
sections?: ContentSectionDto[] | null;
|
||||
}
|
||||
export interface GetTaxonomyPathResponseDto extends AdditionalDataHolder, ApiError, Parsable {
|
||||
/**
|
||||
* The items property
|
||||
*/
|
||||
items?: TaxonomyPathItemDto[] | null;
|
||||
/**
|
||||
* The taxonomyId property
|
||||
*/
|
||||
taxonomyId?: string | null;
|
||||
/**
|
||||
* The taxonomyLabel property
|
||||
*/
|
||||
taxonomyLabel?: string | null;
|
||||
}
|
||||
/**
|
||||
* Serializes information the current object
|
||||
* @param ArticleMetadataDto The instance to serialize from.
|
||||
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
|
||||
* @param writer Serialization writer to use to serialize this model
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function serializeArticleMetadataDto(writer: SerializationWriter, articleMetadataDto: Partial<ArticleMetadataDto> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
|
||||
if (!articleMetadataDto || isSerializingDerivedType) { return; }
|
||||
writer.writeEnumValue<ArticleMetadataDto_dataType>("dataType", articleMetadataDto.dataType ?? ArticleMetadataDto_dataTypeObject.String);
|
||||
writer.writeBooleanValue("isReserved", articleMetadataDto.isReserved);
|
||||
writer.writeStringValue("key", articleMetadataDto.key);
|
||||
if ( typeof articleMetadataDto.value === "string") {
|
||||
writer.writeStringValue("value", articleMetadataDto.value as string);
|
||||
}
|
||||
else {
|
||||
writer.writeCollectionOfObjectValues<string>("value", articleMetadataDto.value as string[] | undefined | null, serializeArticleMetadataDto_value);
|
||||
}
|
||||
writer.writeAdditionalData(articleMetadataDto.additionalData);
|
||||
}
|
||||
/**
|
||||
* Serializes information the current object
|
||||
* @param ArticleMetadataDto_value The instance to serialize from.
|
||||
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
|
||||
* @param writer Serialization writer to use to serialize this model
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function serializeArticleMetadataDto_value(writer: SerializationWriter, articleMetadataDto_value: Partial<Parsable | ArticleMetadataDto_value> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
|
||||
if (articleMetadataDto_value === undefined || articleMetadataDto_value === null) return;
|
||||
if (Array.isArray(articleMetadataDto_value) && (articleMetadataDto_value).every(item => typeof item === 'string')) {
|
||||
writer.writeCollectionOfPrimitiveValues<string>(undefined, articleMetadataDto_value as string[]);
|
||||
}
|
||||
else if (typeof articleMetadataDto_value === "string" ) {
|
||||
writer.writeStringValue(undefined, articleMetadataDto_value as string);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Serializes information the current object
|
||||
* @param ContentSectionDto The instance to serialize from.
|
||||
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
|
||||
* @param writer Serialization writer to use to serialize this model
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function serializeContentSectionDto(writer: SerializationWriter, contentSectionDto: Partial<ContentSectionDto> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
|
||||
if (!contentSectionDto || isSerializingDerivedType) { return; }
|
||||
writer.writeStringValue("headline", contentSectionDto.headline);
|
||||
writer.writeCollectionOfObjectValues<ContentSectionEmbeddedTaxonomyDto>("taxonomies", contentSectionDto.taxonomies, serializeContentSectionEmbeddedTaxonomyDto);
|
||||
writer.writeAdditionalData(contentSectionDto.additionalData);
|
||||
}
|
||||
/**
|
||||
* Serializes information the current object
|
||||
* @param ContentSectionEmbeddedTaxonomyDto The instance to serialize from.
|
||||
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
|
||||
* @param writer Serialization writer to use to serialize this model
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function serializeContentSectionEmbeddedTaxonomyDto(writer: SerializationWriter, contentSectionEmbeddedTaxonomyDto: Partial<ContentSectionEmbeddedTaxonomyDto> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
|
||||
if (!contentSectionEmbeddedTaxonomyDto || isSerializingDerivedType) { return; }
|
||||
writer.writeStringValue("label", contentSectionEmbeddedTaxonomyDto.label);
|
||||
writer.writeStringValue("taxonomyId", contentSectionEmbeddedTaxonomyDto.taxonomyId);
|
||||
writer.writeAdditionalData(contentSectionEmbeddedTaxonomyDto.additionalData);
|
||||
}
|
||||
/**
|
||||
* Serializes information the current object
|
||||
* @param GetArticleResponseDto The instance to serialize from.
|
||||
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
|
||||
* @param writer Serialization writer to use to serialize this model
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function serializeGetArticleResponseDto(writer: SerializationWriter, getArticleResponseDto: Partial<GetArticleResponseDto> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
|
||||
if (!getArticleResponseDto || isSerializingDerivedType) { return; }
|
||||
writer.writeStringValue("content", getArticleResponseDto.content);
|
||||
writer.writeDateValue("createdAt", getArticleResponseDto.createdAt);
|
||||
writer.writeStringValue("_id", getArticleResponseDto.id);
|
||||
writer.writeCollectionOfObjectValues<ArticleMetadataDto>("metadatas", getArticleResponseDto.metadatas, serializeArticleMetadataDto);
|
||||
writer.writeStringValue("slug", getArticleResponseDto.slug);
|
||||
writer.writeEnumValue<GetArticleResponseDto_status>("status", getArticleResponseDto.status);
|
||||
writer.writeStringValue("title", getArticleResponseDto.title);
|
||||
writer.writeDateValue("updatedAt", getArticleResponseDto.updatedAt);
|
||||
writer.writeAdditionalData(getArticleResponseDto.additionalData);
|
||||
}
|
||||
/**
|
||||
* Serializes information the current object
|
||||
* @param GetChildItemDto The instance to serialize from.
|
||||
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
|
||||
* @param writer Serialization writer to use to serialize this model
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function serializeGetChildItemDto(writer: SerializationWriter, getChildItemDto: Partial<GetChildItemDto> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
|
||||
if (!getChildItemDto || isSerializingDerivedType) { return; }
|
||||
writer.writeStringValue("articleId", getChildItemDto.articleId);
|
||||
writer.writeCollectionOfObjectValues<GetChildItemDto>("children", getChildItemDto.children, serializeGetChildItemDto);
|
||||
writer.writeNumberValue("order", getChildItemDto.order);
|
||||
writer.writeStringValue("slug", getChildItemDto.slug);
|
||||
writer.writeStringValue("title", getChildItemDto.title);
|
||||
writer.writeAdditionalData(getChildItemDto.additionalData);
|
||||
}
|
||||
/**
|
||||
* Serializes information the current object
|
||||
* @param GetChildItemMetadataDto The instance to serialize from.
|
||||
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
|
||||
* @param writer Serialization writer to use to serialize this model
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function serializeGetChildItemMetadataDto(writer: SerializationWriter, getChildItemMetadataDto: Partial<GetChildItemMetadataDto> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
|
||||
if (!getChildItemMetadataDto || isSerializingDerivedType) { return; }
|
||||
writer.writeAdditionalData(getChildItemMetadataDto.additionalData);
|
||||
}
|
||||
/**
|
||||
* Serializes information the current object
|
||||
* @param GetChildItemResponseDto The instance to serialize from.
|
||||
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
|
||||
* @param writer Serialization writer to use to serialize this model
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function serializeGetChildItemResponseDto(writer: SerializationWriter, getChildItemResponseDto: Partial<GetChildItemResponseDto> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
|
||||
if (!getChildItemResponseDto || isSerializingDerivedType) { return; }
|
||||
writer.writeCollectionOfObjectValues<GetChildItemDto>("items", getChildItemResponseDto.items, serializeGetChildItemDto);
|
||||
writer.writeStringValue("label", getChildItemResponseDto.label);
|
||||
writer.writeCollectionOfObjectValues<GetChildItemMetadataDto>("metadatas", getChildItemResponseDto.metadatas, serializeGetChildItemMetadataDto);
|
||||
writer.writeAdditionalData(getChildItemResponseDto.additionalData);
|
||||
}
|
||||
/**
|
||||
* Serializes information the current object
|
||||
* @param GetSiteHeaderResponseDto The instance to serialize from.
|
||||
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
|
||||
* @param writer Serialization writer to use to serialize this model
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function serializeGetSiteHeaderResponseDto(writer: SerializationWriter, getSiteHeaderResponseDto: Partial<GetSiteHeaderResponseDto> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
|
||||
if (!getSiteHeaderResponseDto || isSerializingDerivedType) { return; }
|
||||
writer.writeStringValue("key", getSiteHeaderResponseDto.key);
|
||||
writer.writeStringValue("label", getSiteHeaderResponseDto.label);
|
||||
writer.writeCollectionOfObjectValues<ContentSectionDto>("sections", getSiteHeaderResponseDto.sections, serializeContentSectionDto);
|
||||
writer.writeAdditionalData(getSiteHeaderResponseDto.additionalData);
|
||||
}
|
||||
/**
|
||||
* Serializes information the current object
|
||||
* @param GetTaxonomyPathResponseDto The instance to serialize from.
|
||||
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
|
||||
* @param writer Serialization writer to use to serialize this model
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function serializeGetTaxonomyPathResponseDto(writer: SerializationWriter, getTaxonomyPathResponseDto: Partial<GetTaxonomyPathResponseDto> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
|
||||
if (!getTaxonomyPathResponseDto || isSerializingDerivedType) { return; }
|
||||
writer.writeCollectionOfObjectValues<TaxonomyPathItemDto>("items", getTaxonomyPathResponseDto.items, serializeTaxonomyPathItemDto);
|
||||
writer.writeStringValue("taxonomyId", getTaxonomyPathResponseDto.taxonomyId);
|
||||
writer.writeStringValue("taxonomyLabel", getTaxonomyPathResponseDto.taxonomyLabel);
|
||||
writer.writeAdditionalData(getTaxonomyPathResponseDto.additionalData);
|
||||
}
|
||||
/**
|
||||
* Serializes information the current object
|
||||
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
|
||||
* @param TaxonomyPathItemDto The instance to serialize from.
|
||||
* @param writer Serialization writer to use to serialize this model
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function serializeTaxonomyPathItemDto(writer: SerializationWriter, taxonomyPathItemDto: Partial<TaxonomyPathItemDto> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
|
||||
if (!taxonomyPathItemDto || isSerializingDerivedType) { return; }
|
||||
writer.writeStringValue("articleId", taxonomyPathItemDto.articleId);
|
||||
writer.writeNumberValue("order", taxonomyPathItemDto.order);
|
||||
writer.writeStringValue("slug", taxonomyPathItemDto.slug);
|
||||
writer.writeStringValue("title", taxonomyPathItemDto.title);
|
||||
writer.writeAdditionalData(taxonomyPathItemDto.additionalData);
|
||||
}
|
||||
export interface TaxonomyPathItemDto extends AdditionalDataHolder, Parsable {
|
||||
/**
|
||||
* The articleId property
|
||||
*/
|
||||
articleId?: string | null;
|
||||
/**
|
||||
* The order property
|
||||
*/
|
||||
order?: number | null;
|
||||
/**
|
||||
* The slug property
|
||||
*/
|
||||
slug?: string | null;
|
||||
/**
|
||||
* The title property
|
||||
*/
|
||||
title?: string | null;
|
||||
}
|
||||
export const ArticleMetadataDto_dataTypeObject = {
|
||||
String: "string",
|
||||
Number: "number",
|
||||
Boolean: "boolean",
|
||||
Array: "array",
|
||||
Json: "json",
|
||||
} as const;
|
||||
export const GetArticleResponseDto_statusObject = {
|
||||
Draft: "draft",
|
||||
Published: "published",
|
||||
Archived: "archived",
|
||||
} as const;
|
||||
/* tslint:enable */
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,54 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// Generated by Microsoft Kiota
|
||||
// @ts-ignore
|
||||
import { SigninRequestBuilderRequestsMetadata, type SigninRequestBuilder } from './signin/index.js';
|
||||
// @ts-ignore
|
||||
import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
|
||||
|
||||
/**
|
||||
* Builds and executes requests for operations under /v1/account
|
||||
*/
|
||||
export interface AccountRequestBuilder extends BaseRequestBuilder<AccountRequestBuilder> {
|
||||
/**
|
||||
* The signin property
|
||||
*/
|
||||
get signin(): SigninRequestBuilder;
|
||||
/**
|
||||
* 현재 로그인한 사용자의 계정 정보 조회
|
||||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<string | undefined>;
|
||||
/**
|
||||
* 현재 로그인한 사용자의 계정 정보 조회
|
||||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
||||
* @returns {RequestInformation}
|
||||
*/
|
||||
toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
|
||||
}
|
||||
/**
|
||||
* Uri template for the request builder.
|
||||
*/
|
||||
export const AccountRequestBuilderUriTemplate = "{+baseurl}/v1/account";
|
||||
/**
|
||||
* Metadata for all the navigation properties in the request builder.
|
||||
*/
|
||||
export const AccountRequestBuilderNavigationMetadata: Record<Exclude<keyof AccountRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {
|
||||
signin: {
|
||||
requestsMetadata: SigninRequestBuilderRequestsMetadata,
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Metadata for all the requests in the request builder.
|
||||
*/
|
||||
export const AccountRequestBuilderRequestsMetadata: RequestsMetadata = {
|
||||
get: {
|
||||
uriTemplate: AccountRequestBuilderUriTemplate,
|
||||
responseBodyContentType: "application/json",
|
||||
adapterMethodName: "sendPrimitive",
|
||||
responseBodyFactory: "string",
|
||||
},
|
||||
};
|
||||
/* tslint:enable */
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,40 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// Generated by Microsoft Kiota
|
||||
// @ts-ignore
|
||||
import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
|
||||
|
||||
/**
|
||||
* Builds and executes requests for operations under /v1/account/signin
|
||||
*/
|
||||
export interface SigninRequestBuilder extends BaseRequestBuilder<SigninRequestBuilder> {
|
||||
/**
|
||||
* 사용자 로그인
|
||||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<string | undefined>;
|
||||
/**
|
||||
* 사용자 로그인
|
||||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
||||
* @returns {RequestInformation}
|
||||
*/
|
||||
toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
|
||||
}
|
||||
/**
|
||||
* Uri template for the request builder.
|
||||
*/
|
||||
export const SigninRequestBuilderUriTemplate = "{+baseurl}/v1/account/signin";
|
||||
/**
|
||||
* Metadata for all the requests in the request builder.
|
||||
*/
|
||||
export const SigninRequestBuilderRequestsMetadata: RequestsMetadata = {
|
||||
get: {
|
||||
uriTemplate: SigninRequestBuilderUriTemplate,
|
||||
responseBodyContentType: "application/json",
|
||||
adapterMethodName: "sendPrimitive",
|
||||
responseBodyFactory: "string",
|
||||
},
|
||||
};
|
||||
/* tslint:enable */
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,35 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// Generated by Microsoft Kiota
|
||||
// @ts-ignore
|
||||
import { type WithSlugItemRequestBuilder, WithSlugItemRequestBuilderNavigationMetadata, WithSlugItemRequestBuilderRequestsMetadata } from './item/index.js';
|
||||
// @ts-ignore
|
||||
import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata } from '@microsoft/kiota-abstractions';
|
||||
|
||||
/**
|
||||
* Builds and executes requests for operations under /v1/articles
|
||||
*/
|
||||
export interface ArticlesRequestBuilder extends BaseRequestBuilder<ArticlesRequestBuilder> {
|
||||
/**
|
||||
* Gets an item from the ApiSdk.v1.articles.item collection
|
||||
* @param slug Unique identifier of the item
|
||||
* @returns {WithSlugItemRequestBuilder}
|
||||
*/
|
||||
bySlug(slug: string) : WithSlugItemRequestBuilder;
|
||||
}
|
||||
/**
|
||||
* Uri template for the request builder.
|
||||
*/
|
||||
export const ArticlesRequestBuilderUriTemplate = "{+baseurl}/v1/articles";
|
||||
/**
|
||||
* Metadata for all the navigation properties in the request builder.
|
||||
*/
|
||||
export const ArticlesRequestBuilderNavigationMetadata: Record<Exclude<keyof ArticlesRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {
|
||||
bySlug: {
|
||||
requestsMetadata: WithSlugItemRequestBuilderRequestsMetadata,
|
||||
navigationMetadata: WithSlugItemRequestBuilderNavigationMetadata,
|
||||
pathParametersMappings: ["slug"],
|
||||
},
|
||||
};
|
||||
/* tslint:enable */
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,58 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// Generated by Microsoft Kiota
|
||||
// @ts-ignore
|
||||
import { createGetArticleResponseDtoFromDiscriminatorValue, type GetArticleResponseDto } from '../../../models/index.js';
|
||||
// @ts-ignore
|
||||
import { TaxonomyPathRequestBuilderRequestsMetadata, type TaxonomyPathRequestBuilder } from './taxonomyPath/index.js';
|
||||
// @ts-ignore
|
||||
import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
|
||||
|
||||
/**
|
||||
* Builds and executes requests for operations under /v1/articles/{slug}
|
||||
*/
|
||||
export interface WithSlugItemRequestBuilder extends BaseRequestBuilder<WithSlugItemRequestBuilder> {
|
||||
/**
|
||||
* The taxonomyPath property
|
||||
*/
|
||||
get taxonomyPath(): TaxonomyPathRequestBuilder;
|
||||
/**
|
||||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
||||
* @returns {Promise<GetArticleResponseDto>}
|
||||
* @throws {GetArticleResponseDto} error when the service returns a 4XX or 5XX status code
|
||||
*/
|
||||
get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<GetArticleResponseDto | undefined>;
|
||||
/**
|
||||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
||||
* @returns {RequestInformation}
|
||||
*/
|
||||
toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
|
||||
}
|
||||
/**
|
||||
* Uri template for the request builder.
|
||||
*/
|
||||
export const WithSlugItemRequestBuilderUriTemplate = "{+baseurl}/v1/articles/{slug}";
|
||||
/**
|
||||
* Metadata for all the navigation properties in the request builder.
|
||||
*/
|
||||
export const WithSlugItemRequestBuilderNavigationMetadata: Record<Exclude<keyof WithSlugItemRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {
|
||||
taxonomyPath: {
|
||||
requestsMetadata: TaxonomyPathRequestBuilderRequestsMetadata,
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Metadata for all the requests in the request builder.
|
||||
*/
|
||||
export const WithSlugItemRequestBuilderRequestsMetadata: RequestsMetadata = {
|
||||
get: {
|
||||
uriTemplate: WithSlugItemRequestBuilderUriTemplate,
|
||||
responseBodyContentType: "application/json",
|
||||
errorMappings: {
|
||||
XXX: createGetArticleResponseDtoFromDiscriminatorValue as ParsableFactory<Parsable>,
|
||||
},
|
||||
adapterMethodName: "send",
|
||||
responseBodyFactory: createGetArticleResponseDtoFromDiscriminatorValue,
|
||||
},
|
||||
};
|
||||
/* tslint:enable */
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,44 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// Generated by Microsoft Kiota
|
||||
// @ts-ignore
|
||||
import { createGetTaxonomyPathResponseDtoFromDiscriminatorValue, type GetTaxonomyPathResponseDto } from '../../../../models/index.js';
|
||||
// @ts-ignore
|
||||
import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
|
||||
|
||||
/**
|
||||
* Builds and executes requests for operations under /v1/articles/{slug}/taxonomy-path
|
||||
*/
|
||||
export interface TaxonomyPathRequestBuilder extends BaseRequestBuilder<TaxonomyPathRequestBuilder> {
|
||||
/**
|
||||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
||||
* @returns {Promise<GetTaxonomyPathResponseDto>}
|
||||
* @throws {GetTaxonomyPathResponseDto} error when the service returns a 4XX or 5XX status code
|
||||
*/
|
||||
get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<GetTaxonomyPathResponseDto | undefined>;
|
||||
/**
|
||||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
||||
* @returns {RequestInformation}
|
||||
*/
|
||||
toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
|
||||
}
|
||||
/**
|
||||
* Uri template for the request builder.
|
||||
*/
|
||||
export const TaxonomyPathRequestBuilderUriTemplate = "{+baseurl}/v1/articles/{slug}/taxonomy-path";
|
||||
/**
|
||||
* Metadata for all the requests in the request builder.
|
||||
*/
|
||||
export const TaxonomyPathRequestBuilderRequestsMetadata: RequestsMetadata = {
|
||||
get: {
|
||||
uriTemplate: TaxonomyPathRequestBuilderUriTemplate,
|
||||
responseBodyContentType: "application/json",
|
||||
errorMappings: {
|
||||
XXX: createGetTaxonomyPathResponseDtoFromDiscriminatorValue as ParsableFactory<Parsable>,
|
||||
},
|
||||
adapterMethodName: "send",
|
||||
responseBodyFactory: createGetTaxonomyPathResponseDtoFromDiscriminatorValue,
|
||||
},
|
||||
};
|
||||
/* tslint:enable */
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,31 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// Generated by Microsoft Kiota
|
||||
// @ts-ignore
|
||||
import { SiteHeaderRequestBuilderRequestsMetadata, type SiteHeaderRequestBuilder } from './siteHeader/index.js';
|
||||
// @ts-ignore
|
||||
import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata } from '@microsoft/kiota-abstractions';
|
||||
|
||||
/**
|
||||
* Builds and executes requests for operations under /v1/contents
|
||||
*/
|
||||
export interface ContentsRequestBuilder extends BaseRequestBuilder<ContentsRequestBuilder> {
|
||||
/**
|
||||
* The siteHeader property
|
||||
*/
|
||||
get siteHeader(): SiteHeaderRequestBuilder;
|
||||
}
|
||||
/**
|
||||
* Uri template for the request builder.
|
||||
*/
|
||||
export const ContentsRequestBuilderUriTemplate = "{+baseurl}/v1/contents";
|
||||
/**
|
||||
* Metadata for all the navigation properties in the request builder.
|
||||
*/
|
||||
export const ContentsRequestBuilderNavigationMetadata: Record<Exclude<keyof ContentsRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {
|
||||
siteHeader: {
|
||||
requestsMetadata: SiteHeaderRequestBuilderRequestsMetadata,
|
||||
},
|
||||
};
|
||||
/* tslint:enable */
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,40 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// Generated by Microsoft Kiota
|
||||
// @ts-ignore
|
||||
import { createGetSiteHeaderResponseDtoFromDiscriminatorValue, type GetSiteHeaderResponseDto } from '../../../models/index.js';
|
||||
// @ts-ignore
|
||||
import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
|
||||
|
||||
/**
|
||||
* Builds and executes requests for operations under /v1/contents/site-header
|
||||
*/
|
||||
export interface SiteHeaderRequestBuilder extends BaseRequestBuilder<SiteHeaderRequestBuilder> {
|
||||
/**
|
||||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
||||
* @returns {Promise<GetSiteHeaderResponseDto[]>}
|
||||
*/
|
||||
get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<GetSiteHeaderResponseDto[] | undefined>;
|
||||
/**
|
||||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
||||
* @returns {RequestInformation}
|
||||
*/
|
||||
toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
|
||||
}
|
||||
/**
|
||||
* Uri template for the request builder.
|
||||
*/
|
||||
export const SiteHeaderRequestBuilderUriTemplate = "{+baseurl}/v1/contents/site-header";
|
||||
/**
|
||||
* Metadata for all the requests in the request builder.
|
||||
*/
|
||||
export const SiteHeaderRequestBuilderRequestsMetadata: RequestsMetadata = {
|
||||
get: {
|
||||
uriTemplate: SiteHeaderRequestBuilderUriTemplate,
|
||||
responseBodyContentType: "application/json",
|
||||
adapterMethodName: "sendCollection",
|
||||
responseBodyFactory: createGetSiteHeaderResponseDtoFromDiscriminatorValue,
|
||||
},
|
||||
};
|
||||
/* tslint:enable */
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,45 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// Generated by Microsoft Kiota
|
||||
// @ts-ignore
|
||||
import { MultipartBody, serializeMultipartBody, type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
|
||||
|
||||
/**
|
||||
* Builds and executes requests for operations under /v1/image
|
||||
*/
|
||||
export interface ImageRequestBuilder extends BaseRequestBuilder<ImageRequestBuilder> {
|
||||
/**
|
||||
* 이미지 파일을 업로드합니다
|
||||
* @param body The request body
|
||||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
post(body: MultipartBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<string | undefined>;
|
||||
/**
|
||||
* 이미지 파일을 업로드합니다
|
||||
* @param body The request body
|
||||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
||||
* @returns {RequestInformation}
|
||||
*/
|
||||
toPostRequestInformation(body: MultipartBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
|
||||
}
|
||||
/**
|
||||
* Uri template for the request builder.
|
||||
*/
|
||||
export const ImageRequestBuilderUriTemplate = "{+baseurl}/v1/image";
|
||||
/**
|
||||
* Metadata for all the requests in the request builder.
|
||||
*/
|
||||
export const ImageRequestBuilderRequestsMetadata: RequestsMetadata = {
|
||||
post: {
|
||||
uriTemplate: ImageRequestBuilderUriTemplate,
|
||||
responseBodyContentType: "application/json",
|
||||
adapterMethodName: "sendPrimitive",
|
||||
responseBodyFactory: "string",
|
||||
requestBodyContentType: "multipart/form-data",
|
||||
requestBodySerializer: serializeMultipartBody,
|
||||
requestInformationContentSetMethod: "setContentFromParsable",
|
||||
},
|
||||
};
|
||||
/* tslint:enable */
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,91 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// Generated by Microsoft Kiota
|
||||
// @ts-ignore
|
||||
import { AccountRequestBuilderNavigationMetadata, AccountRequestBuilderRequestsMetadata, type AccountRequestBuilder } from './account/index.js';
|
||||
// @ts-ignore
|
||||
import { ArticlesRequestBuilderNavigationMetadata, type ArticlesRequestBuilder } from './articles/index.js';
|
||||
// @ts-ignore
|
||||
import { ContentsRequestBuilderNavigationMetadata, type ContentsRequestBuilder } from './contents/index.js';
|
||||
// @ts-ignore
|
||||
import { ImageRequestBuilderRequestsMetadata, type ImageRequestBuilder } from './image/index.js';
|
||||
// @ts-ignore
|
||||
import { TaxonomiesRequestBuilderNavigationMetadata, type TaxonomiesRequestBuilder } from './taxonomies/index.js';
|
||||
// @ts-ignore
|
||||
import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
|
||||
|
||||
/**
|
||||
* Builds and executes requests for operations under /v1
|
||||
*/
|
||||
export interface V1RequestBuilder extends BaseRequestBuilder<V1RequestBuilder> {
|
||||
/**
|
||||
* The account property
|
||||
*/
|
||||
get account(): AccountRequestBuilder;
|
||||
/**
|
||||
* The articles property
|
||||
*/
|
||||
get articles(): ArticlesRequestBuilder;
|
||||
/**
|
||||
* The contents property
|
||||
*/
|
||||
get contents(): ContentsRequestBuilder;
|
||||
/**
|
||||
* The image property
|
||||
*/
|
||||
get image(): ImageRequestBuilder;
|
||||
/**
|
||||
* The taxonomies property
|
||||
*/
|
||||
get taxonomies(): TaxonomiesRequestBuilder;
|
||||
/**
|
||||
* 서버 상태 확인
|
||||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<string | undefined>;
|
||||
/**
|
||||
* 서버 상태 확인
|
||||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
||||
* @returns {RequestInformation}
|
||||
*/
|
||||
toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
|
||||
}
|
||||
/**
|
||||
* Uri template for the request builder.
|
||||
*/
|
||||
export const V1RequestBuilderUriTemplate = "{+baseurl}/v1";
|
||||
/**
|
||||
* Metadata for all the navigation properties in the request builder.
|
||||
*/
|
||||
export const V1RequestBuilderNavigationMetadata: Record<Exclude<keyof V1RequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {
|
||||
account: {
|
||||
requestsMetadata: AccountRequestBuilderRequestsMetadata,
|
||||
navigationMetadata: AccountRequestBuilderNavigationMetadata,
|
||||
},
|
||||
articles: {
|
||||
navigationMetadata: ArticlesRequestBuilderNavigationMetadata,
|
||||
},
|
||||
contents: {
|
||||
navigationMetadata: ContentsRequestBuilderNavigationMetadata,
|
||||
},
|
||||
image: {
|
||||
requestsMetadata: ImageRequestBuilderRequestsMetadata,
|
||||
},
|
||||
taxonomies: {
|
||||
navigationMetadata: TaxonomiesRequestBuilderNavigationMetadata,
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Metadata for all the requests in the request builder.
|
||||
*/
|
||||
export const V1RequestBuilderRequestsMetadata: RequestsMetadata = {
|
||||
get: {
|
||||
uriTemplate: V1RequestBuilderUriTemplate,
|
||||
responseBodyContentType: "application/json",
|
||||
adapterMethodName: "sendPrimitive",
|
||||
responseBodyFactory: "string",
|
||||
},
|
||||
};
|
||||
/* tslint:enable */
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,34 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// Generated by Microsoft Kiota
|
||||
// @ts-ignore
|
||||
import { TaxonomiesItemRequestBuilderNavigationMetadata, type TaxonomiesItemRequestBuilder } from './item/index.js';
|
||||
// @ts-ignore
|
||||
import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata } from '@microsoft/kiota-abstractions';
|
||||
|
||||
/**
|
||||
* Builds and executes requests for operations under /v1/taxonomies
|
||||
*/
|
||||
export interface TaxonomiesRequestBuilder extends BaseRequestBuilder<TaxonomiesRequestBuilder> {
|
||||
/**
|
||||
* Gets an item from the ApiSdk.v1.taxonomies.item collection
|
||||
* @param id Unique identifier of the item
|
||||
* @returns {TaxonomiesItemRequestBuilder}
|
||||
*/
|
||||
byId(id: string) : TaxonomiesItemRequestBuilder;
|
||||
}
|
||||
/**
|
||||
* Uri template for the request builder.
|
||||
*/
|
||||
export const TaxonomiesRequestBuilderUriTemplate = "{+baseurl}/v1/taxonomies";
|
||||
/**
|
||||
* Metadata for all the navigation properties in the request builder.
|
||||
*/
|
||||
export const TaxonomiesRequestBuilderNavigationMetadata: Record<Exclude<keyof TaxonomiesRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {
|
||||
byId: {
|
||||
navigationMetadata: TaxonomiesItemRequestBuilderNavigationMetadata,
|
||||
pathParametersMappings: ["id"],
|
||||
},
|
||||
};
|
||||
/* tslint:enable */
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,44 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// Generated by Microsoft Kiota
|
||||
// @ts-ignore
|
||||
import { createGetChildItemResponseDtoFromDiscriminatorValue, type GetChildItemResponseDto } from '../../../../models/index.js';
|
||||
// @ts-ignore
|
||||
import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
|
||||
|
||||
/**
|
||||
* Builds and executes requests for operations under /v1/taxonomies/{id}/child-items
|
||||
*/
|
||||
export interface ChildItemsRequestBuilder extends BaseRequestBuilder<ChildItemsRequestBuilder> {
|
||||
/**
|
||||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
||||
* @returns {Promise<GetChildItemResponseDto>}
|
||||
* @throws {GetChildItemResponseDto} error when the service returns a 4XX or 5XX status code
|
||||
*/
|
||||
get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<GetChildItemResponseDto | undefined>;
|
||||
/**
|
||||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
||||
* @returns {RequestInformation}
|
||||
*/
|
||||
toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
|
||||
}
|
||||
/**
|
||||
* Uri template for the request builder.
|
||||
*/
|
||||
export const ChildItemsRequestBuilderUriTemplate = "{+baseurl}/v1/taxonomies/{id}/child-items";
|
||||
/**
|
||||
* Metadata for all the requests in the request builder.
|
||||
*/
|
||||
export const ChildItemsRequestBuilderRequestsMetadata: RequestsMetadata = {
|
||||
get: {
|
||||
uriTemplate: ChildItemsRequestBuilderUriTemplate,
|
||||
responseBodyContentType: "application/json",
|
||||
errorMappings: {
|
||||
XXX: createGetChildItemResponseDtoFromDiscriminatorValue as ParsableFactory<Parsable>,
|
||||
},
|
||||
adapterMethodName: "send",
|
||||
responseBodyFactory: createGetChildItemResponseDtoFromDiscriminatorValue,
|
||||
},
|
||||
};
|
||||
/* tslint:enable */
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,31 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// Generated by Microsoft Kiota
|
||||
// @ts-ignore
|
||||
import { ChildItemsRequestBuilderRequestsMetadata, type ChildItemsRequestBuilder } from './childItems/index.js';
|
||||
// @ts-ignore
|
||||
import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata } from '@microsoft/kiota-abstractions';
|
||||
|
||||
/**
|
||||
* Builds and executes requests for operations under /v1/taxonomies/{id}
|
||||
*/
|
||||
export interface TaxonomiesItemRequestBuilder extends BaseRequestBuilder<TaxonomiesItemRequestBuilder> {
|
||||
/**
|
||||
* The childItems property
|
||||
*/
|
||||
get childItems(): ChildItemsRequestBuilder;
|
||||
}
|
||||
/**
|
||||
* Uri template for the request builder.
|
||||
*/
|
||||
export const TaxonomiesItemRequestBuilderUriTemplate = "{+baseurl}/v1/taxonomies/{id}";
|
||||
/**
|
||||
* Metadata for all the navigation properties in the request builder.
|
||||
*/
|
||||
export const TaxonomiesItemRequestBuilderNavigationMetadata: Record<Exclude<keyof TaxonomiesItemRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {
|
||||
childItems: {
|
||||
requestsMetadata: ChildItemsRequestBuilderRequestsMetadata,
|
||||
},
|
||||
};
|
||||
/* tslint:enable */
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,12 @@
|
||||
import { DefaultRequestAdapter } from '@microsoft/kiota-bundle';
|
||||
import { AnonymousAuthenticationProvider } from '@microsoft/kiota-abstractions';
|
||||
import { createApiClient } from '../kiota/apiClient';
|
||||
|
||||
// Create authentication provider (anonymous for now)
|
||||
const authProvider = new AnonymousAuthenticationProvider();
|
||||
|
||||
// Create the request adapter with the base URL
|
||||
const requestAdapter = new DefaultRequestAdapter(authProvider);
|
||||
|
||||
// Create and export the API client
|
||||
export const apiClient = createApiClient(requestAdapter);
|
||||
+17
-5
@@ -1,7 +1,19 @@
|
||||
import { createRoot } from "react-dom/client";
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||
import App from "./App.tsx";
|
||||
import "./index.css";
|
||||
|
||||
import { createRoot } from "react-dom/client";
|
||||
import App from "./App.tsx";
|
||||
import "./index.css";
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
staleTime: 1000 * 60 * 5, // 5 minutes
|
||||
refetchOnWindowFocus: false,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
createRoot(document.getElementById("root")!).render(<App />);
|
||||
|
||||
createRoot(document.getElementById("root")!).render(
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<App />
|
||||
</QueryClientProvider>
|
||||
);
|
||||
@@ -1,3 +1,5 @@
|
||||
|
||||
|
||||
@custom-variant dark (&:is(.dark *));
|
||||
|
||||
:root {
|
||||
|
||||
Reference in new issue
Block a user