cmx-sdk 0.2.19 → 0.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/core/types.ts","../src/core/sdk-fetcher.ts","../src/core/cache-tags.ts","../src/core/date-reviver.ts","../src/generated/sdk/endpoints/sdk.ts","../src/api.ts","../src/mdx/components/basic/Callout.tsx","../src/mdx/components/basic/Button.tsx","../src/mdx/components/basic/Embed.tsx","../src/mdx/components/basic/YouTube.tsx","../src/mdx/components/basic/Twitter.tsx","../src/mdx/components/basic/Instagram.tsx","../src/mdx/components/basic/TikTok.tsx","../src/mdx/components/basic/Bluesky.tsx","../src/mdx/components/basic/Vimeo.tsx","../src/mdx/components/basic/Spotify.tsx","../src/mdx/components/basic/Gist.tsx","../src/mdx/components/basic/CodePen.tsx","../src/mdx/components/basic/CodeSandbox.tsx","../src/mdx/components/basic/GoogleMap.tsx","../src/mdx/components/basic/Details.tsx","../src/mdx/components/basic/Tabs.tsx","../src/mdx/components/basic/Columns.tsx","../src/mdx/components/basic/Audio.tsx","../src/mdx/components/basic/Video.tsx","../src/mdx/components/basic/FileDownload.tsx","../src/mdx/components/basic/TableOfContents.tsx","../src/mdx/components/basic/index.ts","../src/mdx/components/custom/BlogCard.tsx","../src/mdx/components/custom/Image.tsx","../src/mdx/components/custom/Gallery.tsx","../src/mdx/components/custom/index.ts","../src/mdx/components/markdown/index.tsx","../src/mdx/components/index.ts","../src/mdx/component-catalog.ts","../src/mdx/validator.ts","../src/render.tsx"],"sourcesContent":["/**\n * API共通型定義\n */\n\n/**\n * APIレスポンスの共通型(Admin API用)\n */\nexport interface ApiResponse<T> {\n data: T | null\n error: string | null\n status: number\n}\n\n/**\n * Admin fetcherオプション\n */\nexport interface AdminFetcherOptions {\n /** 401エラー時の自動リダイレクトを無効化 */\n disableAutoSignOut?: boolean\n /** 401エラー時のリダイレクト先URL */\n signOutCallbackUrl?: string\n /** ワークスペースSlug(未指定ならURLから推測) */\n workspaceSlug?: string\n}\n\n/**\n * Public fetcherオプション\n */\nexport interface PublicFetcherOptions {\n /** 認証トークン */\n token: string\n /** Next.js cache tags */\n tags?: string[]\n /** キャッシュ設定 */\n revalidate?: number | false\n}\n\n/**\n * 認証エラーコード\n */\nexport const AUTH_ERROR_CODES = [\"AUTH_REQUIRED\", \"USER_DELETED\"] as const\nexport type AuthErrorCode = (typeof AUTH_ERROR_CODES)[number]\n\n/**\n * SDK APIエラー\n * HTTPステータスコードとAPIエラーコードを保持し、\n * 404/401/403/500等の区別を可能にする\n */\nexport class CmxApiError extends Error {\n constructor(\n message: string,\n public readonly status: number,\n public readonly code?: string,\n ) {\n super(message)\n this.name = \"CmxApiError\"\n }\n\n get isNotFound(): boolean {\n return this.status === 404\n }\n\n get isUnauthorized(): boolean {\n return this.status === 401\n }\n\n get isForbidden(): boolean {\n return this.status === 403\n }\n\n get isServerError(): boolean {\n return this.status >= 500\n }\n}\n","/**\n * SDK API用カスタムfetcher\n * サーバーサイドからSDK APIを呼び出すためのfetcher\n * - Authorization: Bearer ヘッダー付与\n * - Next.js cache tags対応\n */\n\nimport type { PublicFetcherOptions } from \"./types\"\nimport { CmxApiError } from \"./types\"\n\ninterface SdkErrorPayload {\n error?: unknown\n message?: unknown\n details?: unknown\n code?: unknown\n}\n\n// Next.js拡張のRequestInit型\ninterface NextFetchRequestInit extends RequestInit {\n next?: {\n tags?: string[]\n revalidate?: number | false\n }\n}\n\nconst DEFAULT_API_URL = \"https://app.cmx-ai.org\"\n\nfunction stringifyErrorValue(value: unknown): string {\n if (typeof value === \"string\") return value\n if (value === null || value === undefined) return \"\"\n\n if (typeof value === \"object\") {\n const objectValue = value as { message?: unknown }\n if (typeof objectValue.message === \"string\" && objectValue.message.length > 0) {\n return objectValue.message\n }\n try {\n return JSON.stringify(value)\n } catch {\n return String(value)\n }\n }\n\n return String(value)\n}\n\nfunction parseSdkErrorBody(body: string, status: number): { message: string; code?: string } {\n const fallbackMessage = `API error: ${status}`\n if (!body) {\n return { message: fallbackMessage }\n }\n\n try {\n const parsed = JSON.parse(body) as SdkErrorPayload\n const main = stringifyErrorValue(parsed.error ?? parsed.message)\n const details = stringifyErrorValue(parsed.details)\n const code = typeof parsed.code === \"string\" ? parsed.code : undefined\n\n const message = [main, details]\n .filter((part, index, parts) => part.length > 0 && parts.indexOf(part) === index)\n .join(\" | \")\n\n return {\n message: message || fallbackMessage,\n code,\n }\n } catch {\n return { message: body }\n }\n}\n\nasync function toCmxApiError(response: Response): Promise<CmxApiError> {\n const body = await response.text()\n const { message, code } = parseSdkErrorBody(body, response.status)\n return new CmxApiError(message, response.status, code)\n}\n\n/**\n * SDK APIのベースURL取得\n */\nexport function getSdkApiBaseUrl(): string {\n const apiUrl = process.env.CMX_API_URL || DEFAULT_API_URL\n return `${apiUrl}/api/v1/sdk`\n}\n\n/**\n * 環境変数からSDK APIトークン取得\n */\nexport function getSdkApiToken(): string {\n const token = process.env.CMX_API_KEY\n if (!token) {\n throw new Error(\"CMX_API_KEY environment variable is not set\")\n }\n return token\n}\n\n/**\n * SDK API用のカスタムfetcher\n * サーバーサイドでのみ使用(SSR/RSC)\n */\nexport async function sdkFetcher<T>(\n path: string,\n options: PublicFetcherOptions\n): Promise<T> {\n const { token, tags, revalidate } = options\n const baseUrl = getSdkApiBaseUrl()\n const url = `${baseUrl}${path}`\n\n const fetchOptions: NextFetchRequestInit = {\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${token}`,\n },\n next: {\n tags: tags || [],\n ...(revalidate !== undefined && { revalidate }),\n },\n }\n\n const response = await fetch(url, fetchOptions as RequestInit)\n\n if (!response.ok) {\n throw await toCmxApiError(response)\n }\n\n return response.json()\n}\n\n/**\n * Orval用のカスタムインスタンス\n * OrvalはURLとRequestInitを直接渡す形式で呼び出す\n */\nexport async function sdkCustomInstance<T>(\n url: string,\n options?: RequestInit\n): Promise<T> {\n const token = getSdkApiToken()\n const baseUrl = getSdkApiBaseUrl()\n const fullUrl = url.startsWith(\"http\") ? url : `${baseUrl}${url}`\n\n const response = await fetch(fullUrl, {\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${token}`,\n ...options?.headers,\n },\n })\n\n if (!response.ok) {\n throw await toCmxApiError(response)\n }\n\n return response.json()\n}\n\n/**\n * キャッシュタグ付きのSDK APIリクエスト用ラッパー\n * Next.js ISR/on-demand revalidation対応\n */\nexport async function sdkFetchWithTags<T>(\n path: string,\n tags?: string[],\n revalidate?: number | false\n): Promise<T> {\n const token = getSdkApiToken()\n const baseUrl = getSdkApiBaseUrl()\n const url = `${baseUrl}${path}`\n\n const fetchOptions: NextFetchRequestInit = {\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${token}`,\n },\n next: {\n tags: tags || [],\n ...(revalidate !== undefined && { revalidate }),\n },\n }\n\n const response = await fetch(url, fetchOptions as RequestInit)\n\n if (!response.ok) {\n throw await toCmxApiError(response)\n }\n\n return response.json()\n}\n\n/**\n * SDK API用のPOSTリクエストfetcher\n * サーバーサイド(Server Action等)から使用\n */\nexport async function sdkPostFetcher<T>(\n path: string,\n body: unknown\n): Promise<T> {\n const token = getSdkApiToken()\n const baseUrl = getSdkApiBaseUrl()\n const url = `${baseUrl}${path}`\n\n const response = await fetch(url, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${token}`,\n },\n body: JSON.stringify(body),\n cache: \"no-store\",\n })\n\n if (!response.ok) {\n throw await toCmxApiError(response)\n }\n\n return response.json()\n}\n","/**\n * キャッシュタグ定義\n * Next.js ISR/on-demand revalidation用\n */\n\nexport const CACHE_TAGS = {\n /** 全コレクション共通 */\n collections: \"collections\",\n /** 特定コレクション */\n collection: (slug: string) => `collection:${slug}`,\n /** 特定コンテンツ */\n content: (collectionSlug: string, contentSlug: string) =>\n `content:${collectionSlug}:${contentSlug}`,\n /** 全データタイプ共通 */\n data: \"data\",\n /** 特定データタイプ */\n dataType: (slug: string) => `data:${slug}`,\n} as const\n","/**\n * JSON reviver for automatic date parsing\n * Converts ISO date strings to JavaScript Date objects\n */\nconst isoDateFormat = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}/\n\nexport function dateReviver(_key: string, value: unknown): unknown {\n if (typeof value === \"string\" && isoDateFormat.test(value)) {\n return new Date(value)\n }\n return value\n}\n","/**\n * Generated by orval v8.4.0 🍺\n * Do not edit manually.\n * CMX SDK API\n * CMX SDK API(コンテンツ配信+管理)\n * OpenAPI spec version: 1.0.0\n */\nimport type {\n CollectionContentDetailResponse,\n CollectionContentsResponse,\n CollectionListResponse,\n CollectionResponse,\n CreateCollectionRequest,\n CreateContentRequest,\n CreateDataTypeRequest,\n CreateFormDefinitionRequest,\n DataEntryDetailResponse,\n DataListResponse,\n DataTypeResponse,\n DeleteManageContentsIdParams,\n DeleteManageDataTypeSlugIdParams,\n ErrorResponse,\n FormDefinitionResponse,\n GetAnalyticsDailyParams,\n GetCollectionsSlugContentsParams,\n GetDataTypeSlugParams,\n GetManageCollectionPresets200,\n GetManageCollectionPresetsParams,\n GetManageContentsIdParams,\n GetManageContentsParams,\n GetManageDataTypeSlugIdParams,\n GetManageDataTypeSlugParams,\n GetPreviewToken200,\n PublicSubmissionRequest,\n PublicSubmissionResponse,\n ReferenceField,\n SchemaResponse,\n SdkAddCollectionDataTypeRequest,\n SdkAnalyticsDailyListResponse,\n SdkBugReportResponse,\n SdkCollectionDataTypeResponse,\n SdkComponentSuccessResponse,\n SdkComponentSyncRequest,\n SdkContentDetail,\n SdkContentListResponse,\n SdkContentReferencesResponse,\n SdkCreateBugReportBody,\n SdkCreateContentResponse,\n SdkCreateEntryRequest,\n SdkCustomComponentsListResponse,\n SdkDataEntriesListResponse,\n SdkDataEntryDeletionImpactResponse,\n SdkDataEntryDetailResponse,\n SdkDataEntryResponse,\n SdkDeleteCollectionDataTypeResponse,\n SdkDeleteCollectionResponse,\n SdkDeleteContentResponse,\n SdkDeleteDataEntryResponse,\n SdkDeleteDataTypeResponse,\n SdkDeleteFormDefinitionResponse,\n SdkDocResponse,\n SdkDocType,\n SdkLinkExistingDataTypeRequest,\n SdkPublishContentResponse,\n SdkRequestReviewResponse,\n SdkRuntimeSettingsResponse,\n SdkSetContentReferencesRequest,\n SdkSetContentReferencesResponse,\n SdkUpdateContentResponse,\n SdkUpdateEntryRequest,\n SdkUpsertDocBody,\n SdkValidateContentResponse,\n UpdateCollectionRequest,\n UpdateContentRequest,\n UpdateDataTypeRequest,\n UpdateFormDefinitionRequest\n} from '../models';\n\nimport { dateReviver } from '../../../core/date-reviver';\n\n/**\n * @summary コレクションの公開済みコンテンツ一覧を取得\n */\nexport type getCollectionsSlugContentsResponse200 = {\n data: CollectionContentsResponse\n status: 200\n}\n\nexport type getCollectionsSlugContentsResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type getCollectionsSlugContentsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getCollectionsSlugContentsResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getCollectionsSlugContentsResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getCollectionsSlugContentsResponseSuccess = (getCollectionsSlugContentsResponse200) & {\n headers: Headers;\n};\nexport type getCollectionsSlugContentsResponseError = (getCollectionsSlugContentsResponse400 | getCollectionsSlugContentsResponse401 | getCollectionsSlugContentsResponse404 | getCollectionsSlugContentsResponse500) & {\n headers: Headers;\n};\n\nexport type getCollectionsSlugContentsResponse = (getCollectionsSlugContentsResponseSuccess | getCollectionsSlugContentsResponseError)\n\nexport const getGetCollectionsSlugContentsUrl = (slug: string,\n params?: GetCollectionsSlugContentsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/api/v1/sdk/collections/${slug}/contents?${stringifiedParams}` : `/api/v1/sdk/collections/${slug}/contents`\n}\n\nexport const getCollectionsSlugContents = async (slug: string,\n params?: GetCollectionsSlugContentsParams, options?: RequestInit): Promise<getCollectionsSlugContentsResponse> => {\n \n const res = await fetch(getGetCollectionsSlugContentsUrl(slug,params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getCollectionsSlugContentsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getCollectionsSlugContentsResponse\n}\n\n\n\n/**\n * @summary コレクションの公開済みコンテンツ詳細を取得(参照解決済み)\n */\nexport type getCollectionsSlugContentsContentSlugResponse200 = {\n data: CollectionContentDetailResponse\n status: 200\n}\n\nexport type getCollectionsSlugContentsContentSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getCollectionsSlugContentsContentSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getCollectionsSlugContentsContentSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getCollectionsSlugContentsContentSlugResponseSuccess = (getCollectionsSlugContentsContentSlugResponse200) & {\n headers: Headers;\n};\nexport type getCollectionsSlugContentsContentSlugResponseError = (getCollectionsSlugContentsContentSlugResponse401 | getCollectionsSlugContentsContentSlugResponse404 | getCollectionsSlugContentsContentSlugResponse500) & {\n headers: Headers;\n};\n\nexport type getCollectionsSlugContentsContentSlugResponse = (getCollectionsSlugContentsContentSlugResponseSuccess | getCollectionsSlugContentsContentSlugResponseError)\n\nexport const getGetCollectionsSlugContentsContentSlugUrl = (slug: string,\n contentSlug: string,) => {\n\n\n \n\n return `/api/v1/sdk/collections/${slug}/contents/${contentSlug}`\n}\n\nexport const getCollectionsSlugContentsContentSlug = async (slug: string,\n contentSlug: string, options?: RequestInit): Promise<getCollectionsSlugContentsContentSlugResponse> => {\n \n const res = await fetch(getGetCollectionsSlugContentsContentSlugUrl(slug,contentSlug),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getCollectionsSlugContentsContentSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getCollectionsSlugContentsContentSlugResponse\n}\n\n\n\n/**\n * @summary データタイプのエントリ一覧を取得\n */\nexport type getDataTypeSlugResponse200 = {\n data: DataListResponse\n status: 200\n}\n\nexport type getDataTypeSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getDataTypeSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getDataTypeSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getDataTypeSlugResponseSuccess = (getDataTypeSlugResponse200) & {\n headers: Headers;\n};\nexport type getDataTypeSlugResponseError = (getDataTypeSlugResponse401 | getDataTypeSlugResponse404 | getDataTypeSlugResponse500) & {\n headers: Headers;\n};\n\nexport type getDataTypeSlugResponse = (getDataTypeSlugResponseSuccess | getDataTypeSlugResponseError)\n\nexport const getGetDataTypeSlugUrl = (typeSlug: string,\n params?: GetDataTypeSlugParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/api/v1/sdk/data/${typeSlug}?${stringifiedParams}` : `/api/v1/sdk/data/${typeSlug}`\n}\n\nexport const getDataTypeSlug = async (typeSlug: string,\n params?: GetDataTypeSlugParams, options?: RequestInit): Promise<getDataTypeSlugResponse> => {\n \n const res = await fetch(getGetDataTypeSlugUrl(typeSlug,params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getDataTypeSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getDataTypeSlugResponse\n}\n\n\n\n/**\n * @summary データエントリの詳細を取得\n */\nexport type getDataTypeSlugIdResponse200 = {\n data: DataEntryDetailResponse\n status: 200\n}\n\nexport type getDataTypeSlugIdResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getDataTypeSlugIdResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getDataTypeSlugIdResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getDataTypeSlugIdResponseSuccess = (getDataTypeSlugIdResponse200) & {\n headers: Headers;\n};\nexport type getDataTypeSlugIdResponseError = (getDataTypeSlugIdResponse401 | getDataTypeSlugIdResponse404 | getDataTypeSlugIdResponse500) & {\n headers: Headers;\n};\n\nexport type getDataTypeSlugIdResponse = (getDataTypeSlugIdResponseSuccess | getDataTypeSlugIdResponseError)\n\nexport const getGetDataTypeSlugIdUrl = (typeSlug: string,\n id: string,) => {\n\n\n \n\n return `/api/v1/sdk/data/${typeSlug}/${id}`\n}\n\nexport const getDataTypeSlugId = async (typeSlug: string,\n id: string, options?: RequestInit): Promise<getDataTypeSlugIdResponse> => {\n \n const res = await fetch(getGetDataTypeSlugIdUrl(typeSlug,id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getDataTypeSlugIdResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getDataTypeSlugIdResponse\n}\n\n\n\n/**\n * @summary プレビュートークンで記事を取得(認証不要)\n */\nexport type getPreviewTokenResponse200 = {\n data: GetPreviewToken200\n status: 200\n}\n\nexport type getPreviewTokenResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getPreviewTokenResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getPreviewTokenResponseSuccess = (getPreviewTokenResponse200) & {\n headers: Headers;\n};\nexport type getPreviewTokenResponseError = (getPreviewTokenResponse404 | getPreviewTokenResponse500) & {\n headers: Headers;\n};\n\nexport type getPreviewTokenResponse = (getPreviewTokenResponseSuccess | getPreviewTokenResponseError)\n\nexport const getGetPreviewTokenUrl = (token: string,) => {\n\n\n \n\n return `/api/v1/sdk/preview/${token}`\n}\n\nexport const getPreviewToken = async (token: string, options?: RequestInit): Promise<getPreviewTokenResponse> => {\n \n const res = await fetch(getGetPreviewTokenUrl(token),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getPreviewTokenResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getPreviewTokenResponse\n}\n\n\n\n/**\n * @summary ワークスペースのスキーマ情報を取得(データタイプ・コレクション)\n */\nexport type getSchemaResponse200 = {\n data: SchemaResponse\n status: 200\n}\n\nexport type getSchemaResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getSchemaResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getSchemaResponseSuccess = (getSchemaResponse200) & {\n headers: Headers;\n};\nexport type getSchemaResponseError = (getSchemaResponse401 | getSchemaResponse500) & {\n headers: Headers;\n};\n\nexport type getSchemaResponse = (getSchemaResponseSuccess | getSchemaResponseError)\n\nexport const getGetSchemaUrl = () => {\n\n\n \n\n return `/api/v1/sdk/schema`\n}\n\nexport const getSchema = async ( options?: RequestInit): Promise<getSchemaResponse> => {\n \n const res = await fetch(getGetSchemaUrl(),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getSchemaResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getSchemaResponse\n}\n\n\n\n/**\n * enabledが有効なフォーム定義にデータを送信します。送信データはpendingステータスで保存されます。\n * @summary 公開フォームからデータを送信\n */\nexport type postSubmissionsTypeSlugResponse200 = {\n data: PublicSubmissionResponse\n status: 200\n}\n\nexport type postSubmissionsTypeSlugResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postSubmissionsTypeSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postSubmissionsTypeSlugResponse403 = {\n data: ErrorResponse\n status: 403\n}\n\nexport type postSubmissionsTypeSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type postSubmissionsTypeSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postSubmissionsTypeSlugResponseSuccess = (postSubmissionsTypeSlugResponse200) & {\n headers: Headers;\n};\nexport type postSubmissionsTypeSlugResponseError = (postSubmissionsTypeSlugResponse400 | postSubmissionsTypeSlugResponse401 | postSubmissionsTypeSlugResponse403 | postSubmissionsTypeSlugResponse404 | postSubmissionsTypeSlugResponse500) & {\n headers: Headers;\n};\n\nexport type postSubmissionsTypeSlugResponse = (postSubmissionsTypeSlugResponseSuccess | postSubmissionsTypeSlugResponseError)\n\nexport const getPostSubmissionsTypeSlugUrl = (typeSlug: string,) => {\n\n\n \n\n return `/api/v1/sdk/submissions/${typeSlug}`\n}\n\nexport const postSubmissionsTypeSlug = async (typeSlug: string,\n publicSubmissionRequest: PublicSubmissionRequest, options?: RequestInit): Promise<postSubmissionsTypeSlugResponse> => {\n \n const res = await fetch(getPostSubmissionsTypeSlugUrl(typeSlug),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n publicSubmissionRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postSubmissionsTypeSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postSubmissionsTypeSlugResponse\n}\n\n\n\n/**\n * @summary スターターキット用 Runtime Settings を取得\n */\nexport type getRuntimeSettingsResponse200 = {\n data: SdkRuntimeSettingsResponse\n status: 200\n}\n\nexport type getRuntimeSettingsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getRuntimeSettingsResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getRuntimeSettingsResponseSuccess = (getRuntimeSettingsResponse200) & {\n headers: Headers;\n};\nexport type getRuntimeSettingsResponseError = (getRuntimeSettingsResponse401 | getRuntimeSettingsResponse404) & {\n headers: Headers;\n};\n\nexport type getRuntimeSettingsResponse = (getRuntimeSettingsResponseSuccess | getRuntimeSettingsResponseError)\n\nexport const getGetRuntimeSettingsUrl = () => {\n\n\n \n\n return `/api/v1/sdk/runtime/settings`\n}\n\nexport const getRuntimeSettings = async ( options?: RequestInit): Promise<getRuntimeSettingsResponse> => {\n \n const res = await fetch(getGetRuntimeSettingsUrl(),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getRuntimeSettingsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getRuntimeSettingsResponse\n}\n\n\n\n/**\n * @summary 日次アナリティクスメトリクスを取得\n */\nexport type getAnalyticsDailyResponse200 = {\n data: SdkAnalyticsDailyListResponse\n status: 200\n}\n\nexport type getAnalyticsDailyResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getAnalyticsDailyResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getAnalyticsDailyResponseSuccess = (getAnalyticsDailyResponse200) & {\n headers: Headers;\n};\nexport type getAnalyticsDailyResponseError = (getAnalyticsDailyResponse401 | getAnalyticsDailyResponse500) & {\n headers: Headers;\n};\n\nexport type getAnalyticsDailyResponse = (getAnalyticsDailyResponseSuccess | getAnalyticsDailyResponseError)\n\nexport const getGetAnalyticsDailyUrl = (params?: GetAnalyticsDailyParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/api/v1/sdk/analytics/daily?${stringifiedParams}` : `/api/v1/sdk/analytics/daily`\n}\n\nexport const getAnalyticsDaily = async (params?: GetAnalyticsDailyParams, options?: RequestInit): Promise<getAnalyticsDailyResponse> => {\n \n const res = await fetch(getGetAnalyticsDailyUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getAnalyticsDailyResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getAnalyticsDailyResponse\n}\n\n\n\n/**\n * @summary コレクション一覧を取得\n */\nexport type getManageCollectionsResponse200 = {\n data: CollectionListResponse\n status: 200\n}\n\nexport type getManageCollectionsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageCollectionsResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageCollectionsResponseSuccess = (getManageCollectionsResponse200) & {\n headers: Headers;\n};\nexport type getManageCollectionsResponseError = (getManageCollectionsResponse401 | getManageCollectionsResponse500) & {\n headers: Headers;\n};\n\nexport type getManageCollectionsResponse = (getManageCollectionsResponseSuccess | getManageCollectionsResponseError)\n\nexport const getGetManageCollectionsUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/collections`\n}\n\nexport const getManageCollections = async ( options?: RequestInit): Promise<getManageCollectionsResponse> => {\n \n const res = await fetch(getGetManageCollectionsUrl(),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageCollectionsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageCollectionsResponse\n}\n\n\n\n/**\n * @summary コレクションを作成\n */\nexport type postManageCollectionsResponse201 = {\n data: CollectionResponse\n status: 201\n}\n\nexport type postManageCollectionsResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postManageCollectionsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageCollectionsResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type postManageCollectionsResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageCollectionsResponseSuccess = (postManageCollectionsResponse201) & {\n headers: Headers;\n};\nexport type postManageCollectionsResponseError = (postManageCollectionsResponse400 | postManageCollectionsResponse401 | postManageCollectionsResponse409 | postManageCollectionsResponse500) & {\n headers: Headers;\n};\n\nexport type postManageCollectionsResponse = (postManageCollectionsResponseSuccess | postManageCollectionsResponseError)\n\nexport const getPostManageCollectionsUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/collections`\n}\n\nexport const postManageCollections = async (createCollectionRequest: CreateCollectionRequest, options?: RequestInit): Promise<postManageCollectionsResponse> => {\n \n const res = await fetch(getPostManageCollectionsUrl(),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n createCollectionRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageCollectionsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageCollectionsResponse\n}\n\n\n\n/**\n * @summary コレクションを取得\n */\nexport type getManageCollectionsSlugResponse200 = {\n data: CollectionResponse\n status: 200\n}\n\nexport type getManageCollectionsSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageCollectionsSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageCollectionsSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageCollectionsSlugResponseSuccess = (getManageCollectionsSlugResponse200) & {\n headers: Headers;\n};\nexport type getManageCollectionsSlugResponseError = (getManageCollectionsSlugResponse401 | getManageCollectionsSlugResponse404 | getManageCollectionsSlugResponse500) & {\n headers: Headers;\n};\n\nexport type getManageCollectionsSlugResponse = (getManageCollectionsSlugResponseSuccess | getManageCollectionsSlugResponseError)\n\nexport const getGetManageCollectionsSlugUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/collections/${slug}`\n}\n\nexport const getManageCollectionsSlug = async (slug: string, options?: RequestInit): Promise<getManageCollectionsSlugResponse> => {\n \n const res = await fetch(getGetManageCollectionsSlugUrl(slug),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageCollectionsSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageCollectionsSlugResponse\n}\n\n\n\n/**\n * @summary コレクションを更新\n */\nexport type putManageCollectionsSlugResponse200 = {\n data: CollectionResponse\n status: 200\n}\n\nexport type putManageCollectionsSlugResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type putManageCollectionsSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type putManageCollectionsSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type putManageCollectionsSlugResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type putManageCollectionsSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type putManageCollectionsSlugResponseSuccess = (putManageCollectionsSlugResponse200) & {\n headers: Headers;\n};\nexport type putManageCollectionsSlugResponseError = (putManageCollectionsSlugResponse400 | putManageCollectionsSlugResponse401 | putManageCollectionsSlugResponse404 | putManageCollectionsSlugResponse409 | putManageCollectionsSlugResponse500) & {\n headers: Headers;\n};\n\nexport type putManageCollectionsSlugResponse = (putManageCollectionsSlugResponseSuccess | putManageCollectionsSlugResponseError)\n\nexport const getPutManageCollectionsSlugUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/collections/${slug}`\n}\n\nexport const putManageCollectionsSlug = async (slug: string,\n updateCollectionRequest: UpdateCollectionRequest, options?: RequestInit): Promise<putManageCollectionsSlugResponse> => {\n \n const res = await fetch(getPutManageCollectionsSlugUrl(slug),\n { \n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n updateCollectionRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: putManageCollectionsSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as putManageCollectionsSlugResponse\n}\n\n\n\n/**\n * @summary コレクションを削除\n */\nexport type deleteManageCollectionsSlugResponse200 = {\n data: SdkDeleteCollectionResponse\n status: 200\n}\n\nexport type deleteManageCollectionsSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type deleteManageCollectionsSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type deleteManageCollectionsSlugResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type deleteManageCollectionsSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type deleteManageCollectionsSlugResponseSuccess = (deleteManageCollectionsSlugResponse200) & {\n headers: Headers;\n};\nexport type deleteManageCollectionsSlugResponseError = (deleteManageCollectionsSlugResponse401 | deleteManageCollectionsSlugResponse404 | deleteManageCollectionsSlugResponse409 | deleteManageCollectionsSlugResponse500) & {\n headers: Headers;\n};\n\nexport type deleteManageCollectionsSlugResponse = (deleteManageCollectionsSlugResponseSuccess | deleteManageCollectionsSlugResponseError)\n\nexport const getDeleteManageCollectionsSlugUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/collections/${slug}`\n}\n\nexport const deleteManageCollectionsSlug = async (slug: string, options?: RequestInit): Promise<deleteManageCollectionsSlugResponse> => {\n \n const res = await fetch(getDeleteManageCollectionsSlugUrl(slug),\n { \n ...options,\n method: 'DELETE'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: deleteManageCollectionsSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as deleteManageCollectionsSlugResponse\n}\n\n\n\n/**\n * @summary データタイプ一覧を取得\n */\nexport type getManageDataTypesResponse200 = {\n data: DataTypeResponse[]\n status: 200\n}\n\nexport type getManageDataTypesResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageDataTypesResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageDataTypesResponseSuccess = (getManageDataTypesResponse200) & {\n headers: Headers;\n};\nexport type getManageDataTypesResponseError = (getManageDataTypesResponse401 | getManageDataTypesResponse500) & {\n headers: Headers;\n};\n\nexport type getManageDataTypesResponse = (getManageDataTypesResponseSuccess | getManageDataTypesResponseError)\n\nexport const getGetManageDataTypesUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/data-types`\n}\n\nexport const getManageDataTypes = async ( options?: RequestInit): Promise<getManageDataTypesResponse> => {\n \n const res = await fetch(getGetManageDataTypesUrl(),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageDataTypesResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageDataTypesResponse\n}\n\n\n\n/**\n * @summary データタイプを作成\n */\nexport type postManageDataTypesResponse201 = {\n data: DataTypeResponse\n status: 201\n}\n\nexport type postManageDataTypesResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postManageDataTypesResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageDataTypesResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type postManageDataTypesResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageDataTypesResponseSuccess = (postManageDataTypesResponse201) & {\n headers: Headers;\n};\nexport type postManageDataTypesResponseError = (postManageDataTypesResponse400 | postManageDataTypesResponse401 | postManageDataTypesResponse409 | postManageDataTypesResponse500) & {\n headers: Headers;\n};\n\nexport type postManageDataTypesResponse = (postManageDataTypesResponseSuccess | postManageDataTypesResponseError)\n\nexport const getPostManageDataTypesUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/data-types`\n}\n\nexport const postManageDataTypes = async (createDataTypeRequest: CreateDataTypeRequest, options?: RequestInit): Promise<postManageDataTypesResponse> => {\n \n const res = await fetch(getPostManageDataTypesUrl(),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n createDataTypeRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageDataTypesResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageDataTypesResponse\n}\n\n\n\n/**\n * @summary データタイプを取得\n */\nexport type getManageDataTypesSlugResponse200 = {\n data: DataTypeResponse\n status: 200\n}\n\nexport type getManageDataTypesSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageDataTypesSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageDataTypesSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageDataTypesSlugResponseSuccess = (getManageDataTypesSlugResponse200) & {\n headers: Headers;\n};\nexport type getManageDataTypesSlugResponseError = (getManageDataTypesSlugResponse401 | getManageDataTypesSlugResponse404 | getManageDataTypesSlugResponse500) & {\n headers: Headers;\n};\n\nexport type getManageDataTypesSlugResponse = (getManageDataTypesSlugResponseSuccess | getManageDataTypesSlugResponseError)\n\nexport const getGetManageDataTypesSlugUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/data-types/${slug}`\n}\n\nexport const getManageDataTypesSlug = async (slug: string, options?: RequestInit): Promise<getManageDataTypesSlugResponse> => {\n \n const res = await fetch(getGetManageDataTypesSlugUrl(slug),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageDataTypesSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageDataTypesSlugResponse\n}\n\n\n\n/**\n * @summary データタイプを更新\n */\nexport type putManageDataTypesSlugResponse200 = {\n data: DataTypeResponse\n status: 200\n}\n\nexport type putManageDataTypesSlugResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type putManageDataTypesSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type putManageDataTypesSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type putManageDataTypesSlugResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type putManageDataTypesSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type putManageDataTypesSlugResponseSuccess = (putManageDataTypesSlugResponse200) & {\n headers: Headers;\n};\nexport type putManageDataTypesSlugResponseError = (putManageDataTypesSlugResponse400 | putManageDataTypesSlugResponse401 | putManageDataTypesSlugResponse404 | putManageDataTypesSlugResponse409 | putManageDataTypesSlugResponse500) & {\n headers: Headers;\n};\n\nexport type putManageDataTypesSlugResponse = (putManageDataTypesSlugResponseSuccess | putManageDataTypesSlugResponseError)\n\nexport const getPutManageDataTypesSlugUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/data-types/${slug}`\n}\n\nexport const putManageDataTypesSlug = async (slug: string,\n updateDataTypeRequest: UpdateDataTypeRequest, options?: RequestInit): Promise<putManageDataTypesSlugResponse> => {\n \n const res = await fetch(getPutManageDataTypesSlugUrl(slug),\n { \n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n updateDataTypeRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: putManageDataTypesSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as putManageDataTypesSlugResponse\n}\n\n\n\n/**\n * @summary データタイプを削除\n */\nexport type deleteManageDataTypesSlugResponse200 = {\n data: SdkDeleteDataTypeResponse\n status: 200\n}\n\nexport type deleteManageDataTypesSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type deleteManageDataTypesSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type deleteManageDataTypesSlugResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type deleteManageDataTypesSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type deleteManageDataTypesSlugResponseSuccess = (deleteManageDataTypesSlugResponse200) & {\n headers: Headers;\n};\nexport type deleteManageDataTypesSlugResponseError = (deleteManageDataTypesSlugResponse401 | deleteManageDataTypesSlugResponse404 | deleteManageDataTypesSlugResponse409 | deleteManageDataTypesSlugResponse500) & {\n headers: Headers;\n};\n\nexport type deleteManageDataTypesSlugResponse = (deleteManageDataTypesSlugResponseSuccess | deleteManageDataTypesSlugResponseError)\n\nexport const getDeleteManageDataTypesSlugUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/data-types/${slug}`\n}\n\nexport const deleteManageDataTypesSlug = async (slug: string, options?: RequestInit): Promise<deleteManageDataTypesSlugResponse> => {\n \n const res = await fetch(getDeleteManageDataTypesSlugUrl(slug),\n { \n ...options,\n method: 'DELETE'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: deleteManageDataTypesSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as deleteManageDataTypesSlugResponse\n}\n\n\n\n/**\n * @summary データエントリ一覧を取得\n */\nexport type getManageDataTypeSlugResponse200 = {\n data: SdkDataEntriesListResponse\n status: 200\n}\n\nexport type getManageDataTypeSlugResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type getManageDataTypeSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageDataTypeSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageDataTypeSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageDataTypeSlugResponseSuccess = (getManageDataTypeSlugResponse200) & {\n headers: Headers;\n};\nexport type getManageDataTypeSlugResponseError = (getManageDataTypeSlugResponse400 | getManageDataTypeSlugResponse401 | getManageDataTypeSlugResponse404 | getManageDataTypeSlugResponse500) & {\n headers: Headers;\n};\n\nexport type getManageDataTypeSlugResponse = (getManageDataTypeSlugResponseSuccess | getManageDataTypeSlugResponseError)\n\nexport const getGetManageDataTypeSlugUrl = (typeSlug: string,\n params?: GetManageDataTypeSlugParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/data/${typeSlug}?${stringifiedParams}` : `/api/v1/sdk/manage/data/${typeSlug}`\n}\n\nexport const getManageDataTypeSlug = async (typeSlug: string,\n params?: GetManageDataTypeSlugParams, options?: RequestInit): Promise<getManageDataTypeSlugResponse> => {\n \n const res = await fetch(getGetManageDataTypeSlugUrl(typeSlug,params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageDataTypeSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageDataTypeSlugResponse\n}\n\n\n\n/**\n * @summary データエントリを作成\n */\nexport type postManageDataTypeSlugResponse201 = {\n data: SdkDataEntryResponse\n status: 201\n}\n\nexport type postManageDataTypeSlugResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postManageDataTypeSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageDataTypeSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type postManageDataTypeSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageDataTypeSlugResponseSuccess = (postManageDataTypeSlugResponse201) & {\n headers: Headers;\n};\nexport type postManageDataTypeSlugResponseError = (postManageDataTypeSlugResponse400 | postManageDataTypeSlugResponse401 | postManageDataTypeSlugResponse404 | postManageDataTypeSlugResponse500) & {\n headers: Headers;\n};\n\nexport type postManageDataTypeSlugResponse = (postManageDataTypeSlugResponseSuccess | postManageDataTypeSlugResponseError)\n\nexport const getPostManageDataTypeSlugUrl = (typeSlug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/data/${typeSlug}`\n}\n\nexport const postManageDataTypeSlug = async (typeSlug: string,\n sdkCreateEntryRequest: SdkCreateEntryRequest, options?: RequestInit): Promise<postManageDataTypeSlugResponse> => {\n \n const res = await fetch(getPostManageDataTypeSlugUrl(typeSlug),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n sdkCreateEntryRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageDataTypeSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageDataTypeSlugResponse\n}\n\n\n\n/**\n * @summary データエントリを取得\n */\nexport type getManageDataTypeSlugIdResponse200 = {\n data: SdkDataEntryDetailResponse\n status: 200\n}\n\nexport type getManageDataTypeSlugIdResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type getManageDataTypeSlugIdResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageDataTypeSlugIdResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageDataTypeSlugIdResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageDataTypeSlugIdResponseSuccess = (getManageDataTypeSlugIdResponse200) & {\n headers: Headers;\n};\nexport type getManageDataTypeSlugIdResponseError = (getManageDataTypeSlugIdResponse400 | getManageDataTypeSlugIdResponse401 | getManageDataTypeSlugIdResponse404 | getManageDataTypeSlugIdResponse500) & {\n headers: Headers;\n};\n\nexport type getManageDataTypeSlugIdResponse = (getManageDataTypeSlugIdResponseSuccess | getManageDataTypeSlugIdResponseError)\n\nexport const getGetManageDataTypeSlugIdUrl = (typeSlug: string,\n id: string,\n params?: GetManageDataTypeSlugIdParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/data/${typeSlug}/${id}?${stringifiedParams}` : `/api/v1/sdk/manage/data/${typeSlug}/${id}`\n}\n\nexport const getManageDataTypeSlugId = async (typeSlug: string,\n id: string,\n params?: GetManageDataTypeSlugIdParams, options?: RequestInit): Promise<getManageDataTypeSlugIdResponse> => {\n \n const res = await fetch(getGetManageDataTypeSlugIdUrl(typeSlug,id,params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageDataTypeSlugIdResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageDataTypeSlugIdResponse\n}\n\n\n\n/**\n * @summary データエントリを更新\n */\nexport type patchManageDataTypeSlugIdResponse200 = {\n data: SdkDataEntryResponse\n status: 200\n}\n\nexport type patchManageDataTypeSlugIdResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type patchManageDataTypeSlugIdResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type patchManageDataTypeSlugIdResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type patchManageDataTypeSlugIdResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type patchManageDataTypeSlugIdResponseSuccess = (patchManageDataTypeSlugIdResponse200) & {\n headers: Headers;\n};\nexport type patchManageDataTypeSlugIdResponseError = (patchManageDataTypeSlugIdResponse400 | patchManageDataTypeSlugIdResponse401 | patchManageDataTypeSlugIdResponse404 | patchManageDataTypeSlugIdResponse500) & {\n headers: Headers;\n};\n\nexport type patchManageDataTypeSlugIdResponse = (patchManageDataTypeSlugIdResponseSuccess | patchManageDataTypeSlugIdResponseError)\n\nexport const getPatchManageDataTypeSlugIdUrl = (typeSlug: string,\n id: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/data/${typeSlug}/${id}`\n}\n\nexport const patchManageDataTypeSlugId = async (typeSlug: string,\n id: string,\n sdkUpdateEntryRequest: SdkUpdateEntryRequest, options?: RequestInit): Promise<patchManageDataTypeSlugIdResponse> => {\n \n const res = await fetch(getPatchManageDataTypeSlugIdUrl(typeSlug,id),\n { \n ...options,\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n sdkUpdateEntryRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: patchManageDataTypeSlugIdResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as patchManageDataTypeSlugIdResponse\n}\n\n\n\n/**\n * @summary データエントリを削除\n */\nexport type deleteManageDataTypeSlugIdResponse200 = {\n data: SdkDeleteDataEntryResponse\n status: 200\n}\n\nexport type deleteManageDataTypeSlugIdResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type deleteManageDataTypeSlugIdResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type deleteManageDataTypeSlugIdResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type deleteManageDataTypeSlugIdResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type deleteManageDataTypeSlugIdResponseSuccess = (deleteManageDataTypeSlugIdResponse200) & {\n headers: Headers;\n};\nexport type deleteManageDataTypeSlugIdResponseError = (deleteManageDataTypeSlugIdResponse400 | deleteManageDataTypeSlugIdResponse401 | deleteManageDataTypeSlugIdResponse404 | deleteManageDataTypeSlugIdResponse500) & {\n headers: Headers;\n};\n\nexport type deleteManageDataTypeSlugIdResponse = (deleteManageDataTypeSlugIdResponseSuccess | deleteManageDataTypeSlugIdResponseError)\n\nexport const getDeleteManageDataTypeSlugIdUrl = (typeSlug: string,\n id: string,\n params?: DeleteManageDataTypeSlugIdParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/data/${typeSlug}/${id}?${stringifiedParams}` : `/api/v1/sdk/manage/data/${typeSlug}/${id}`\n}\n\nexport const deleteManageDataTypeSlugId = async (typeSlug: string,\n id: string,\n params?: DeleteManageDataTypeSlugIdParams, options?: RequestInit): Promise<deleteManageDataTypeSlugIdResponse> => {\n \n const res = await fetch(getDeleteManageDataTypeSlugIdUrl(typeSlug,id,params),\n { \n ...options,\n method: 'DELETE'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: deleteManageDataTypeSlugIdResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as deleteManageDataTypeSlugIdResponse\n}\n\n\n\n/**\n * @summary データエントリ削除時の影響を取得\n */\nexport type getManageDataTypeSlugIdDeletionImpactResponse200 = {\n data: SdkDataEntryDeletionImpactResponse\n status: 200\n}\n\nexport type getManageDataTypeSlugIdDeletionImpactResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageDataTypeSlugIdDeletionImpactResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageDataTypeSlugIdDeletionImpactResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageDataTypeSlugIdDeletionImpactResponseSuccess = (getManageDataTypeSlugIdDeletionImpactResponse200) & {\n headers: Headers;\n};\nexport type getManageDataTypeSlugIdDeletionImpactResponseError = (getManageDataTypeSlugIdDeletionImpactResponse401 | getManageDataTypeSlugIdDeletionImpactResponse404 | getManageDataTypeSlugIdDeletionImpactResponse500) & {\n headers: Headers;\n};\n\nexport type getManageDataTypeSlugIdDeletionImpactResponse = (getManageDataTypeSlugIdDeletionImpactResponseSuccess | getManageDataTypeSlugIdDeletionImpactResponseError)\n\nexport const getGetManageDataTypeSlugIdDeletionImpactUrl = (typeSlug: string,\n id: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/data/${typeSlug}/${id}/deletion-impact`\n}\n\nexport const getManageDataTypeSlugIdDeletionImpact = async (typeSlug: string,\n id: string, options?: RequestInit): Promise<getManageDataTypeSlugIdDeletionImpactResponse> => {\n \n const res = await fetch(getGetManageDataTypeSlugIdDeletionImpactUrl(typeSlug,id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageDataTypeSlugIdDeletionImpactResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageDataTypeSlugIdDeletionImpactResponse\n}\n\n\n\n/**\n * @summary カスタムコンポーネント一覧を取得\n */\nexport type getManageComponentsResponse200 = {\n data: SdkCustomComponentsListResponse\n status: 200\n}\n\nexport type getManageComponentsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageComponentsResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageComponentsResponseSuccess = (getManageComponentsResponse200) & {\n headers: Headers;\n};\nexport type getManageComponentsResponseError = (getManageComponentsResponse401 | getManageComponentsResponse500) & {\n headers: Headers;\n};\n\nexport type getManageComponentsResponse = (getManageComponentsResponseSuccess | getManageComponentsResponseError)\n\nexport const getGetManageComponentsUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/components`\n}\n\nexport const getManageComponents = async ( options?: RequestInit): Promise<getManageComponentsResponse> => {\n \n const res = await fetch(getGetManageComponentsUrl(),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageComponentsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageComponentsResponse\n}\n\n\n\n/**\n * カスタムコンポーネント定義を同期します。既存のコンポーネントは更新され、新しいコンポーネントは作成されます。\n * @summary カスタムコンポーネントを同期\n */\nexport type postManageComponentsSyncResponse200 = {\n data: SdkComponentSuccessResponse\n status: 200\n}\n\nexport type postManageComponentsSyncResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postManageComponentsSyncResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageComponentsSyncResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageComponentsSyncResponseSuccess = (postManageComponentsSyncResponse200) & {\n headers: Headers;\n};\nexport type postManageComponentsSyncResponseError = (postManageComponentsSyncResponse400 | postManageComponentsSyncResponse401 | postManageComponentsSyncResponse500) & {\n headers: Headers;\n};\n\nexport type postManageComponentsSyncResponse = (postManageComponentsSyncResponseSuccess | postManageComponentsSyncResponseError)\n\nexport const getPostManageComponentsSyncUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/components/sync`\n}\n\nexport const postManageComponentsSync = async (sdkComponentSyncRequest: SdkComponentSyncRequest, options?: RequestInit): Promise<postManageComponentsSyncResponse> => {\n \n const res = await fetch(getPostManageComponentsSyncUrl(),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n sdkComponentSyncRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageComponentsSyncResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageComponentsSyncResponse\n}\n\n\n\n/**\n * @summary フォーム定義一覧を取得\n */\nexport type getManageFormDefinitionsResponse200 = {\n data: FormDefinitionResponse[]\n status: 200\n}\n\nexport type getManageFormDefinitionsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageFormDefinitionsResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageFormDefinitionsResponseSuccess = (getManageFormDefinitionsResponse200) & {\n headers: Headers;\n};\nexport type getManageFormDefinitionsResponseError = (getManageFormDefinitionsResponse401 | getManageFormDefinitionsResponse500) & {\n headers: Headers;\n};\n\nexport type getManageFormDefinitionsResponse = (getManageFormDefinitionsResponseSuccess | getManageFormDefinitionsResponseError)\n\nexport const getGetManageFormDefinitionsUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/form-definitions`\n}\n\nexport const getManageFormDefinitions = async ( options?: RequestInit): Promise<getManageFormDefinitionsResponse> => {\n \n const res = await fetch(getGetManageFormDefinitionsUrl(),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageFormDefinitionsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageFormDefinitionsResponse\n}\n\n\n\n/**\n * @summary フォーム定義を作成\n */\nexport type postManageFormDefinitionsResponse201 = {\n data: FormDefinitionResponse\n status: 201\n}\n\nexport type postManageFormDefinitionsResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postManageFormDefinitionsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageFormDefinitionsResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageFormDefinitionsResponseSuccess = (postManageFormDefinitionsResponse201) & {\n headers: Headers;\n};\nexport type postManageFormDefinitionsResponseError = (postManageFormDefinitionsResponse400 | postManageFormDefinitionsResponse401 | postManageFormDefinitionsResponse500) & {\n headers: Headers;\n};\n\nexport type postManageFormDefinitionsResponse = (postManageFormDefinitionsResponseSuccess | postManageFormDefinitionsResponseError)\n\nexport const getPostManageFormDefinitionsUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/form-definitions`\n}\n\nexport const postManageFormDefinitions = async (createFormDefinitionRequest: CreateFormDefinitionRequest, options?: RequestInit): Promise<postManageFormDefinitionsResponse> => {\n \n const res = await fetch(getPostManageFormDefinitionsUrl(),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n createFormDefinitionRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageFormDefinitionsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageFormDefinitionsResponse\n}\n\n\n\n/**\n * @summary フォーム定義を取得\n */\nexport type getManageFormDefinitionsSlugResponse200 = {\n data: FormDefinitionResponse\n status: 200\n}\n\nexport type getManageFormDefinitionsSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageFormDefinitionsSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageFormDefinitionsSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageFormDefinitionsSlugResponseSuccess = (getManageFormDefinitionsSlugResponse200) & {\n headers: Headers;\n};\nexport type getManageFormDefinitionsSlugResponseError = (getManageFormDefinitionsSlugResponse401 | getManageFormDefinitionsSlugResponse404 | getManageFormDefinitionsSlugResponse500) & {\n headers: Headers;\n};\n\nexport type getManageFormDefinitionsSlugResponse = (getManageFormDefinitionsSlugResponseSuccess | getManageFormDefinitionsSlugResponseError)\n\nexport const getGetManageFormDefinitionsSlugUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/form-definitions/${slug}`\n}\n\nexport const getManageFormDefinitionsSlug = async (slug: string, options?: RequestInit): Promise<getManageFormDefinitionsSlugResponse> => {\n \n const res = await fetch(getGetManageFormDefinitionsSlugUrl(slug),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageFormDefinitionsSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageFormDefinitionsSlugResponse\n}\n\n\n\n/**\n * @summary フォーム定義を更新\n */\nexport type putManageFormDefinitionsSlugResponse200 = {\n data: FormDefinitionResponse\n status: 200\n}\n\nexport type putManageFormDefinitionsSlugResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type putManageFormDefinitionsSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type putManageFormDefinitionsSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type putManageFormDefinitionsSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type putManageFormDefinitionsSlugResponseSuccess = (putManageFormDefinitionsSlugResponse200) & {\n headers: Headers;\n};\nexport type putManageFormDefinitionsSlugResponseError = (putManageFormDefinitionsSlugResponse400 | putManageFormDefinitionsSlugResponse401 | putManageFormDefinitionsSlugResponse404 | putManageFormDefinitionsSlugResponse500) & {\n headers: Headers;\n};\n\nexport type putManageFormDefinitionsSlugResponse = (putManageFormDefinitionsSlugResponseSuccess | putManageFormDefinitionsSlugResponseError)\n\nexport const getPutManageFormDefinitionsSlugUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/form-definitions/${slug}`\n}\n\nexport const putManageFormDefinitionsSlug = async (slug: string,\n updateFormDefinitionRequest: UpdateFormDefinitionRequest, options?: RequestInit): Promise<putManageFormDefinitionsSlugResponse> => {\n \n const res = await fetch(getPutManageFormDefinitionsSlugUrl(slug),\n { \n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n updateFormDefinitionRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: putManageFormDefinitionsSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as putManageFormDefinitionsSlugResponse\n}\n\n\n\n/**\n * @summary フォーム定義を削除\n */\nexport type deleteManageFormDefinitionsSlugResponse200 = {\n data: SdkDeleteFormDefinitionResponse\n status: 200\n}\n\nexport type deleteManageFormDefinitionsSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type deleteManageFormDefinitionsSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type deleteManageFormDefinitionsSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type deleteManageFormDefinitionsSlugResponseSuccess = (deleteManageFormDefinitionsSlugResponse200) & {\n headers: Headers;\n};\nexport type deleteManageFormDefinitionsSlugResponseError = (deleteManageFormDefinitionsSlugResponse401 | deleteManageFormDefinitionsSlugResponse404 | deleteManageFormDefinitionsSlugResponse500) & {\n headers: Headers;\n};\n\nexport type deleteManageFormDefinitionsSlugResponse = (deleteManageFormDefinitionsSlugResponseSuccess | deleteManageFormDefinitionsSlugResponseError)\n\nexport const getDeleteManageFormDefinitionsSlugUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/form-definitions/${slug}`\n}\n\nexport const deleteManageFormDefinitionsSlug = async (slug: string, options?: RequestInit): Promise<deleteManageFormDefinitionsSlugResponse> => {\n \n const res = await fetch(getDeleteManageFormDefinitionsSlugUrl(slug),\n { \n ...options,\n method: 'DELETE'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: deleteManageFormDefinitionsSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as deleteManageFormDefinitionsSlugResponse\n}\n\n\n\n/**\n * @summary コレクションのデータタイプ一覧を取得\n */\nexport type getManageCollectionsSlugDataTypesResponse200 = {\n data: SdkCollectionDataTypeResponse[]\n status: 200\n}\n\nexport type getManageCollectionsSlugDataTypesResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageCollectionsSlugDataTypesResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageCollectionsSlugDataTypesResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageCollectionsSlugDataTypesResponseSuccess = (getManageCollectionsSlugDataTypesResponse200) & {\n headers: Headers;\n};\nexport type getManageCollectionsSlugDataTypesResponseError = (getManageCollectionsSlugDataTypesResponse401 | getManageCollectionsSlugDataTypesResponse404 | getManageCollectionsSlugDataTypesResponse500) & {\n headers: Headers;\n};\n\nexport type getManageCollectionsSlugDataTypesResponse = (getManageCollectionsSlugDataTypesResponseSuccess | getManageCollectionsSlugDataTypesResponseError)\n\nexport const getGetManageCollectionsSlugDataTypesUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/collections/${slug}/data-types`\n}\n\nexport const getManageCollectionsSlugDataTypes = async (slug: string, options?: RequestInit): Promise<getManageCollectionsSlugDataTypesResponse> => {\n \n const res = await fetch(getGetManageCollectionsSlugDataTypesUrl(slug),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageCollectionsSlugDataTypesResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageCollectionsSlugDataTypesResponse\n}\n\n\n\n/**\n * @summary コレクションにデータタイプを追加\n */\nexport type postManageCollectionsSlugDataTypesResponse201 = {\n data: DataTypeResponse\n status: 201\n}\n\nexport type postManageCollectionsSlugDataTypesResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postManageCollectionsSlugDataTypesResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageCollectionsSlugDataTypesResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type postManageCollectionsSlugDataTypesResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type postManageCollectionsSlugDataTypesResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageCollectionsSlugDataTypesResponseSuccess = (postManageCollectionsSlugDataTypesResponse201) & {\n headers: Headers;\n};\nexport type postManageCollectionsSlugDataTypesResponseError = (postManageCollectionsSlugDataTypesResponse400 | postManageCollectionsSlugDataTypesResponse401 | postManageCollectionsSlugDataTypesResponse404 | postManageCollectionsSlugDataTypesResponse409 | postManageCollectionsSlugDataTypesResponse500) & {\n headers: Headers;\n};\n\nexport type postManageCollectionsSlugDataTypesResponse = (postManageCollectionsSlugDataTypesResponseSuccess | postManageCollectionsSlugDataTypesResponseError)\n\nexport const getPostManageCollectionsSlugDataTypesUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/collections/${slug}/data-types`\n}\n\nexport const postManageCollectionsSlugDataTypes = async (slug: string,\n sdkAddCollectionDataTypeRequest: SdkAddCollectionDataTypeRequest, options?: RequestInit): Promise<postManageCollectionsSlugDataTypesResponse> => {\n \n const res = await fetch(getPostManageCollectionsSlugDataTypesUrl(slug),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n sdkAddCollectionDataTypeRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageCollectionsSlugDataTypesResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageCollectionsSlugDataTypesResponse\n}\n\n\n\n/**\n * @summary コレクションからデータタイプを削除\n */\nexport type deleteManageCollectionsSlugDataTypesDtSlugResponse200 = {\n data: SdkDeleteCollectionDataTypeResponse\n status: 200\n}\n\nexport type deleteManageCollectionsSlugDataTypesDtSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type deleteManageCollectionsSlugDataTypesDtSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type deleteManageCollectionsSlugDataTypesDtSlugResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type deleteManageCollectionsSlugDataTypesDtSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type deleteManageCollectionsSlugDataTypesDtSlugResponseSuccess = (deleteManageCollectionsSlugDataTypesDtSlugResponse200) & {\n headers: Headers;\n};\nexport type deleteManageCollectionsSlugDataTypesDtSlugResponseError = (deleteManageCollectionsSlugDataTypesDtSlugResponse401 | deleteManageCollectionsSlugDataTypesDtSlugResponse404 | deleteManageCollectionsSlugDataTypesDtSlugResponse409 | deleteManageCollectionsSlugDataTypesDtSlugResponse500) & {\n headers: Headers;\n};\n\nexport type deleteManageCollectionsSlugDataTypesDtSlugResponse = (deleteManageCollectionsSlugDataTypesDtSlugResponseSuccess | deleteManageCollectionsSlugDataTypesDtSlugResponseError)\n\nexport const getDeleteManageCollectionsSlugDataTypesDtSlugUrl = (slug: string,\n dtSlug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/collections/${slug}/data-types/${dtSlug}`\n}\n\nexport const deleteManageCollectionsSlugDataTypesDtSlug = async (slug: string,\n dtSlug: string, options?: RequestInit): Promise<deleteManageCollectionsSlugDataTypesDtSlugResponse> => {\n \n const res = await fetch(getDeleteManageCollectionsSlugDataTypesDtSlugUrl(slug,dtSlug),\n { \n ...options,\n method: 'DELETE'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: deleteManageCollectionsSlugDataTypesDtSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as deleteManageCollectionsSlugDataTypesDtSlugResponse\n}\n\n\n\n/**\n * @summary 既存のデータタイプをコレクションにリンク\n */\nexport type postManageCollectionsSlugDataTypesLinkResponse201 = {\n data: ReferenceField\n status: 201\n}\n\nexport type postManageCollectionsSlugDataTypesLinkResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postManageCollectionsSlugDataTypesLinkResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageCollectionsSlugDataTypesLinkResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type postManageCollectionsSlugDataTypesLinkResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type postManageCollectionsSlugDataTypesLinkResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageCollectionsSlugDataTypesLinkResponseSuccess = (postManageCollectionsSlugDataTypesLinkResponse201) & {\n headers: Headers;\n};\nexport type postManageCollectionsSlugDataTypesLinkResponseError = (postManageCollectionsSlugDataTypesLinkResponse400 | postManageCollectionsSlugDataTypesLinkResponse401 | postManageCollectionsSlugDataTypesLinkResponse404 | postManageCollectionsSlugDataTypesLinkResponse409 | postManageCollectionsSlugDataTypesLinkResponse500) & {\n headers: Headers;\n};\n\nexport type postManageCollectionsSlugDataTypesLinkResponse = (postManageCollectionsSlugDataTypesLinkResponseSuccess | postManageCollectionsSlugDataTypesLinkResponseError)\n\nexport const getPostManageCollectionsSlugDataTypesLinkUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/collections/${slug}/data-types/link`\n}\n\nexport const postManageCollectionsSlugDataTypesLink = async (slug: string,\n sdkLinkExistingDataTypeRequest: SdkLinkExistingDataTypeRequest, options?: RequestInit): Promise<postManageCollectionsSlugDataTypesLinkResponse> => {\n \n const res = await fetch(getPostManageCollectionsSlugDataTypesLinkUrl(slug),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n sdkLinkExistingDataTypeRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageCollectionsSlugDataTypesLinkResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageCollectionsSlugDataTypesLinkResponse\n}\n\n\n\n/**\n * @summary コレクションプリセット一覧を取得\n */\nexport type getManageCollectionPresetsResponse200 = {\n data: GetManageCollectionPresets200\n status: 200\n}\n\nexport type getManageCollectionPresetsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageCollectionPresetsResponseSuccess = (getManageCollectionPresetsResponse200) & {\n headers: Headers;\n};\nexport type getManageCollectionPresetsResponseError = (getManageCollectionPresetsResponse401) & {\n headers: Headers;\n};\n\nexport type getManageCollectionPresetsResponse = (getManageCollectionPresetsResponseSuccess | getManageCollectionPresetsResponseError)\n\nexport const getGetManageCollectionPresetsUrl = (params?: GetManageCollectionPresetsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/collection-presets?${stringifiedParams}` : `/api/v1/sdk/manage/collection-presets`\n}\n\nexport const getManageCollectionPresets = async (params?: GetManageCollectionPresetsParams, options?: RequestInit): Promise<getManageCollectionPresetsResponse> => {\n \n const res = await fetch(getGetManageCollectionPresetsUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageCollectionPresetsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageCollectionPresetsResponse\n}\n\n\n\n/**\n * @summary コンテンツを作成\n */\nexport type postManageContentsResponse201 = {\n data: SdkCreateContentResponse\n status: 201\n}\n\nexport type postManageContentsResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postManageContentsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageContentsResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type postManageContentsResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type postManageContentsResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageContentsResponseSuccess = (postManageContentsResponse201) & {\n headers: Headers;\n};\nexport type postManageContentsResponseError = (postManageContentsResponse400 | postManageContentsResponse401 | postManageContentsResponse404 | postManageContentsResponse409 | postManageContentsResponse500) & {\n headers: Headers;\n};\n\nexport type postManageContentsResponse = (postManageContentsResponseSuccess | postManageContentsResponseError)\n\nexport const getPostManageContentsUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/contents`\n}\n\nexport const postManageContents = async (createContentRequest: CreateContentRequest, options?: RequestInit): Promise<postManageContentsResponse> => {\n \n const res = await fetch(getPostManageContentsUrl(),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n createContentRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageContentsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageContentsResponse\n}\n\n\n\n/**\n * @summary コンテンツ一覧を取得\n */\nexport type getManageContentsResponse200 = {\n data: SdkContentListResponse\n status: 200\n}\n\nexport type getManageContentsResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type getManageContentsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageContentsResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageContentsResponseSuccess = (getManageContentsResponse200) & {\n headers: Headers;\n};\nexport type getManageContentsResponseError = (getManageContentsResponse400 | getManageContentsResponse401 | getManageContentsResponse500) & {\n headers: Headers;\n};\n\nexport type getManageContentsResponse = (getManageContentsResponseSuccess | getManageContentsResponseError)\n\nexport const getGetManageContentsUrl = (params?: GetManageContentsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/contents?${stringifiedParams}` : `/api/v1/sdk/manage/contents`\n}\n\nexport const getManageContents = async (params?: GetManageContentsParams, options?: RequestInit): Promise<getManageContentsResponse> => {\n \n const res = await fetch(getGetManageContentsUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageContentsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageContentsResponse\n}\n\n\n\n/**\n * @summary レビューをリクエスト\n */\nexport type postManageContentsIdRequestReviewResponse200 = {\n data: SdkRequestReviewResponse\n status: 200\n}\n\nexport type postManageContentsIdRequestReviewResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageContentsIdRequestReviewResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type postManageContentsIdRequestReviewResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageContentsIdRequestReviewResponseSuccess = (postManageContentsIdRequestReviewResponse200) & {\n headers: Headers;\n};\nexport type postManageContentsIdRequestReviewResponseError = (postManageContentsIdRequestReviewResponse401 | postManageContentsIdRequestReviewResponse404 | postManageContentsIdRequestReviewResponse500) & {\n headers: Headers;\n};\n\nexport type postManageContentsIdRequestReviewResponse = (postManageContentsIdRequestReviewResponseSuccess | postManageContentsIdRequestReviewResponseError)\n\nexport const getPostManageContentsIdRequestReviewUrl = (id: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/contents/${id}/request-review`\n}\n\nexport const postManageContentsIdRequestReview = async (id: string, options?: RequestInit): Promise<postManageContentsIdRequestReviewResponse> => {\n \n const res = await fetch(getPostManageContentsIdRequestReviewUrl(id),\n { \n ...options,\n method: 'POST'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageContentsIdRequestReviewResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageContentsIdRequestReviewResponse\n}\n\n\n\n/**\n * @summary コンテンツを公開\n */\nexport type postManageContentsIdPublishResponse200 = {\n data: SdkPublishContentResponse\n status: 200\n}\n\nexport type postManageContentsIdPublishResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postManageContentsIdPublishResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageContentsIdPublishResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type postManageContentsIdPublishResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageContentsIdPublishResponseSuccess = (postManageContentsIdPublishResponse200) & {\n headers: Headers;\n};\nexport type postManageContentsIdPublishResponseError = (postManageContentsIdPublishResponse400 | postManageContentsIdPublishResponse401 | postManageContentsIdPublishResponse404 | postManageContentsIdPublishResponse500) & {\n headers: Headers;\n};\n\nexport type postManageContentsIdPublishResponse = (postManageContentsIdPublishResponseSuccess | postManageContentsIdPublishResponseError)\n\nexport const getPostManageContentsIdPublishUrl = (id: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/contents/${id}/publish`\n}\n\nexport const postManageContentsIdPublish = async (id: string, options?: RequestInit): Promise<postManageContentsIdPublishResponse> => {\n \n const res = await fetch(getPostManageContentsIdPublishUrl(id),\n { \n ...options,\n method: 'POST'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageContentsIdPublishResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageContentsIdPublishResponse\n}\n\n\n\n/**\n * @summary コンテンツの参照を取得\n */\nexport type getManageContentsIdReferencesResponse200 = {\n data: SdkContentReferencesResponse\n status: 200\n}\n\nexport type getManageContentsIdReferencesResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageContentsIdReferencesResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageContentsIdReferencesResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageContentsIdReferencesResponseSuccess = (getManageContentsIdReferencesResponse200) & {\n headers: Headers;\n};\nexport type getManageContentsIdReferencesResponseError = (getManageContentsIdReferencesResponse401 | getManageContentsIdReferencesResponse404 | getManageContentsIdReferencesResponse500) & {\n headers: Headers;\n};\n\nexport type getManageContentsIdReferencesResponse = (getManageContentsIdReferencesResponseSuccess | getManageContentsIdReferencesResponseError)\n\nexport const getGetManageContentsIdReferencesUrl = (id: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/contents/${id}/references`\n}\n\nexport const getManageContentsIdReferences = async (id: string, options?: RequestInit): Promise<getManageContentsIdReferencesResponse> => {\n \n const res = await fetch(getGetManageContentsIdReferencesUrl(id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageContentsIdReferencesResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageContentsIdReferencesResponse\n}\n\n\n\n/**\n * @summary コンテンツの参照を設定\n */\nexport type putManageContentsIdReferencesResponse200 = {\n data: SdkSetContentReferencesResponse\n status: 200\n}\n\nexport type putManageContentsIdReferencesResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type putManageContentsIdReferencesResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type putManageContentsIdReferencesResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type putManageContentsIdReferencesResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type putManageContentsIdReferencesResponseSuccess = (putManageContentsIdReferencesResponse200) & {\n headers: Headers;\n};\nexport type putManageContentsIdReferencesResponseError = (putManageContentsIdReferencesResponse400 | putManageContentsIdReferencesResponse401 | putManageContentsIdReferencesResponse404 | putManageContentsIdReferencesResponse500) & {\n headers: Headers;\n};\n\nexport type putManageContentsIdReferencesResponse = (putManageContentsIdReferencesResponseSuccess | putManageContentsIdReferencesResponseError)\n\nexport const getPutManageContentsIdReferencesUrl = (id: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/contents/${id}/references`\n}\n\nexport const putManageContentsIdReferences = async (id: string,\n sdkSetContentReferencesRequest: SdkSetContentReferencesRequest, options?: RequestInit): Promise<putManageContentsIdReferencesResponse> => {\n \n const res = await fetch(getPutManageContentsIdReferencesUrl(id),\n { \n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n sdkSetContentReferencesRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: putManageContentsIdReferencesResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as putManageContentsIdReferencesResponse\n}\n\n\n\n/**\n * @summary コンテンツを取得\n */\nexport type getManageContentsIdResponse200 = {\n data: SdkContentDetail\n status: 200\n}\n\nexport type getManageContentsIdResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type getManageContentsIdResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageContentsIdResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageContentsIdResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageContentsIdResponseSuccess = (getManageContentsIdResponse200) & {\n headers: Headers;\n};\nexport type getManageContentsIdResponseError = (getManageContentsIdResponse400 | getManageContentsIdResponse401 | getManageContentsIdResponse404 | getManageContentsIdResponse500) & {\n headers: Headers;\n};\n\nexport type getManageContentsIdResponse = (getManageContentsIdResponseSuccess | getManageContentsIdResponseError)\n\nexport const getGetManageContentsIdUrl = (id: string,\n params?: GetManageContentsIdParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/contents/${id}?${stringifiedParams}` : `/api/v1/sdk/manage/contents/${id}`\n}\n\nexport const getManageContentsId = async (id: string,\n params?: GetManageContentsIdParams, options?: RequestInit): Promise<getManageContentsIdResponse> => {\n \n const res = await fetch(getGetManageContentsIdUrl(id,params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageContentsIdResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageContentsIdResponse\n}\n\n\n\n/**\n * @summary コンテンツを更新\n */\nexport type putManageContentsIdResponse200 = {\n data: SdkUpdateContentResponse\n status: 200\n}\n\nexport type putManageContentsIdResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type putManageContentsIdResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type putManageContentsIdResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type putManageContentsIdResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type putManageContentsIdResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type putManageContentsIdResponseSuccess = (putManageContentsIdResponse200) & {\n headers: Headers;\n};\nexport type putManageContentsIdResponseError = (putManageContentsIdResponse400 | putManageContentsIdResponse401 | putManageContentsIdResponse404 | putManageContentsIdResponse409 | putManageContentsIdResponse500) & {\n headers: Headers;\n};\n\nexport type putManageContentsIdResponse = (putManageContentsIdResponseSuccess | putManageContentsIdResponseError)\n\nexport const getPutManageContentsIdUrl = (id: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/contents/${id}`\n}\n\nexport const putManageContentsId = async (id: string,\n updateContentRequest: UpdateContentRequest, options?: RequestInit): Promise<putManageContentsIdResponse> => {\n \n const res = await fetch(getPutManageContentsIdUrl(id),\n { \n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n updateContentRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: putManageContentsIdResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as putManageContentsIdResponse\n}\n\n\n\n/**\n * @summary コンテンツを削除(デフォルト: アーカイブ)\n */\nexport type deleteManageContentsIdResponse200 = {\n data: SdkDeleteContentResponse\n status: 200\n}\n\nexport type deleteManageContentsIdResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type deleteManageContentsIdResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type deleteManageContentsIdResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type deleteManageContentsIdResponseSuccess = (deleteManageContentsIdResponse200) & {\n headers: Headers;\n};\nexport type deleteManageContentsIdResponseError = (deleteManageContentsIdResponse401 | deleteManageContentsIdResponse404 | deleteManageContentsIdResponse500) & {\n headers: Headers;\n};\n\nexport type deleteManageContentsIdResponse = (deleteManageContentsIdResponseSuccess | deleteManageContentsIdResponseError)\n\nexport const getDeleteManageContentsIdUrl = (id: string,\n params?: DeleteManageContentsIdParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/contents/${id}?${stringifiedParams}` : `/api/v1/sdk/manage/contents/${id}`\n}\n\nexport const deleteManageContentsId = async (id: string,\n params?: DeleteManageContentsIdParams, options?: RequestInit): Promise<deleteManageContentsIdResponse> => {\n \n const res = await fetch(getDeleteManageContentsIdUrl(id,params),\n { \n ...options,\n method: 'DELETE'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: deleteManageContentsIdResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as deleteManageContentsIdResponse\n}\n\n\n\n/**\n * @summary コンテンツのMDX参照整合性を検証\n */\nexport type getManageContentsIdValidateResponse200 = {\n data: SdkValidateContentResponse\n status: 200\n}\n\nexport type getManageContentsIdValidateResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageContentsIdValidateResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageContentsIdValidateResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageContentsIdValidateResponseSuccess = (getManageContentsIdValidateResponse200) & {\n headers: Headers;\n};\nexport type getManageContentsIdValidateResponseError = (getManageContentsIdValidateResponse401 | getManageContentsIdValidateResponse404 | getManageContentsIdValidateResponse500) & {\n headers: Headers;\n};\n\nexport type getManageContentsIdValidateResponse = (getManageContentsIdValidateResponseSuccess | getManageContentsIdValidateResponseError)\n\nexport const getGetManageContentsIdValidateUrl = (id: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/contents/${id}/validate`\n}\n\nexport const getManageContentsIdValidate = async (id: string, options?: RequestInit): Promise<getManageContentsIdValidateResponse> => {\n \n const res = await fetch(getGetManageContentsIdValidateUrl(id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageContentsIdValidateResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageContentsIdValidateResponse\n}\n\n\n\n/**\n * スタイルガイドなどの環境ドキュメントを保存します。同じ type が存在する場合は上書きします。\n * @summary ドキュメントを保存(SDK)\n */\nexport type putManageDocsTypeResponse200 = {\n data: SdkDocResponse\n status: 200\n}\n\nexport type putManageDocsTypeResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type putManageDocsTypeResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type putManageDocsTypeResponse403 = {\n data: ErrorResponse\n status: 403\n}\n\nexport type putManageDocsTypeResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type putManageDocsTypeResponseSuccess = (putManageDocsTypeResponse200) & {\n headers: Headers;\n};\nexport type putManageDocsTypeResponseError = (putManageDocsTypeResponse400 | putManageDocsTypeResponse401 | putManageDocsTypeResponse403 | putManageDocsTypeResponse500) & {\n headers: Headers;\n};\n\nexport type putManageDocsTypeResponse = (putManageDocsTypeResponseSuccess | putManageDocsTypeResponseError)\n\nexport const getPutManageDocsTypeUrl = (type: SdkDocType,) => {\n\n\n \n\n return `/api/v1/sdk/manage/docs/${type}`\n}\n\nexport const putManageDocsType = async (type: SdkDocType,\n sdkUpsertDocBody: SdkUpsertDocBody, options?: RequestInit): Promise<putManageDocsTypeResponse> => {\n \n const res = await fetch(getPutManageDocsTypeUrl(type),\n { \n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n sdkUpsertDocBody,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: putManageDocsTypeResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as putManageDocsTypeResponse\n}\n\n\n\n/**\n * @summary ドキュメントを取得(SDK)\n */\nexport type getManageDocsTypeResponse200 = {\n data: SdkDocResponse\n status: 200\n}\n\nexport type getManageDocsTypeResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type getManageDocsTypeResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageDocsTypeResponse403 = {\n data: ErrorResponse\n status: 403\n}\n\nexport type getManageDocsTypeResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageDocsTypeResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageDocsTypeResponseSuccess = (getManageDocsTypeResponse200) & {\n headers: Headers;\n};\nexport type getManageDocsTypeResponseError = (getManageDocsTypeResponse400 | getManageDocsTypeResponse401 | getManageDocsTypeResponse403 | getManageDocsTypeResponse404 | getManageDocsTypeResponse500) & {\n headers: Headers;\n};\n\nexport type getManageDocsTypeResponse = (getManageDocsTypeResponseSuccess | getManageDocsTypeResponseError)\n\nexport const getGetManageDocsTypeUrl = (type: SdkDocType,) => {\n\n\n \n\n return `/api/v1/sdk/manage/docs/${type}`\n}\n\nexport const getManageDocsType = async (type: SdkDocType, options?: RequestInit): Promise<getManageDocsTypeResponse> => {\n \n const res = await fetch(getGetManageDocsTypeUrl(type),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageDocsTypeResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageDocsTypeResponse\n}\n\n\n\n/**\n * CMX プラットフォームのバグを報告します。GitHub Issue が自動作成されます。\n * @summary バグレポートを送信(SDK)\n */\nexport type postManageBugReportsResponse201 = {\n data: SdkBugReportResponse\n status: 201\n}\n\nexport type postManageBugReportsResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postManageBugReportsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageBugReportsResponse403 = {\n data: ErrorResponse\n status: 403\n}\n\nexport type postManageBugReportsResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageBugReportsResponseSuccess = (postManageBugReportsResponse201) & {\n headers: Headers;\n};\nexport type postManageBugReportsResponseError = (postManageBugReportsResponse400 | postManageBugReportsResponse401 | postManageBugReportsResponse403 | postManageBugReportsResponse500) & {\n headers: Headers;\n};\n\nexport type postManageBugReportsResponse = (postManageBugReportsResponseSuccess | postManageBugReportsResponseError)\n\nexport const getPostManageBugReportsUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/bug-reports`\n}\n\nexport const postManageBugReports = async (sdkCreateBugReportBody: SdkCreateBugReportBody, options?: RequestInit): Promise<postManageBugReportsResponse> => {\n \n const res = await fetch(getPostManageBugReportsUrl(),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n sdkCreateBugReportBody,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageBugReportsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageBugReportsResponse\n}\n\n\n\n/**\n * @summary スターターキットをダウンロード\n */\nexport type getDownloadStarterKitResponse200 = {\n data: Blob\n status: 200\n}\n\nexport type getDownloadStarterKitResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getDownloadStarterKitResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getDownloadStarterKitResponseSuccess = (getDownloadStarterKitResponse200) & {\n headers: Headers;\n};\nexport type getDownloadStarterKitResponseError = (getDownloadStarterKitResponse401 | getDownloadStarterKitResponse500) & {\n headers: Headers;\n};\n\nexport type getDownloadStarterKitResponse = (getDownloadStarterKitResponseSuccess | getDownloadStarterKitResponseError)\n\nexport const getGetDownloadStarterKitUrl = () => {\n\n\n \n\n return `/api/v1/sdk/download/starter-kit`\n}\n\nexport const getDownloadStarterKit = async ( options?: RequestInit): Promise<getDownloadStarterKitResponse> => {\n \n const res = await fetch(getGetDownloadStarterKitUrl(),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getDownloadStarterKitResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getDownloadStarterKitResponse\n}\n\n\n\n/**\n * @summary CMX Studio をダウンロード\n */\nexport type getDownloadStudioResponse200 = {\n data: Blob\n status: 200\n}\n\nexport type getDownloadStudioResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getDownloadStudioResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getDownloadStudioResponseSuccess = (getDownloadStudioResponse200) & {\n headers: Headers;\n};\nexport type getDownloadStudioResponseError = (getDownloadStudioResponse401 | getDownloadStudioResponse500) & {\n headers: Headers;\n};\n\nexport type getDownloadStudioResponse = (getDownloadStudioResponseSuccess | getDownloadStudioResponseError)\n\nexport const getGetDownloadStudioUrl = () => {\n\n\n \n\n return `/api/v1/sdk/download/studio`\n}\n\nexport const getDownloadStudio = async ( options?: RequestInit): Promise<getDownloadStudioResponse> => {\n \n const res = await fetch(getGetDownloadStudioUrl(),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getDownloadStudioResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getDownloadStudioResponse\n}\n\n\n\n/**\n * @summary CMX Workflow をダウンロード\n */\nexport type getDownloadWorkflowResponse200 = {\n data: Blob\n status: 200\n}\n\nexport type getDownloadWorkflowResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getDownloadWorkflowResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getDownloadWorkflowResponseSuccess = (getDownloadWorkflowResponse200) & {\n headers: Headers;\n};\nexport type getDownloadWorkflowResponseError = (getDownloadWorkflowResponse401 | getDownloadWorkflowResponse500) & {\n headers: Headers;\n};\n\nexport type getDownloadWorkflowResponse = (getDownloadWorkflowResponseSuccess | getDownloadWorkflowResponseError)\n\nexport const getGetDownloadWorkflowUrl = () => {\n\n\n \n\n return `/api/v1/sdk/download/workflow`\n}\n\nexport const getDownloadWorkflow = async ( options?: RequestInit): Promise<getDownloadWorkflowResponse> => {\n \n const res = await fetch(getGetDownloadWorkflowUrl(),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getDownloadWorkflowResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getDownloadWorkflowResponse\n}\n\n\n\n","/**\n * CMX SDK — Convenience API functions\n *\n * Human-friendly wrappers around the generated Orval endpoints.\n * These manage cache tags automatically and return typed responses.\n */\n\nimport { sdkFetchWithTags, sdkPostFetcher, getSdkApiBaseUrl } from \"./core/sdk.js\"\nimport { CACHE_TAGS } from \"./core/sdk.js\"\nimport { getRuntimeSettings, getAnalyticsDaily } from \"./generated/sdk/endpoints/sdk.js\"\nimport type {\n CollectionContentsResponse,\n CollectionContentDetailResponse,\n DataListResponse,\n DataEntryItem,\n GetAnalyticsDailyParams,\n GetPreviewToken200,\n SdkAnalyticsDailyListResponse,\n SdkRuntimeSettingsResponse,\n SchemaResponse,\n} from \"./generated/sdk/models/index.js\"\n\n// Re-export the preview response type with a friendlier name\nexport type PreviewResponse = GetPreviewToken200\n\n/**\n * Common fetch options for ISR/caching\n */\nexport interface FetchOptions {\n /** Next.js ISR revalidation interval in seconds. Set to `false` to disable caching. */\n revalidate?: number | false\n}\n\n/**\n * Options for fetching collection contents\n */\nexport interface CollectionContentsOptions extends FetchOptions {\n sortBy?: \"publishedAt\" | \"sortOrder\"\n sortOrder?: \"asc\" | \"desc\"\n limit?: number\n offset?: number\n status?: string // \"published\" (default), \"all\", or comma-separated statuses (e.g., \"draft,review\")\n}\n\n/**\n * Get contents from a collection\n */\nexport async function getCollectionContents(\n slug: string,\n options?: CollectionContentsOptions\n): Promise<CollectionContentsResponse> {\n const params = new URLSearchParams()\n if (options?.sortBy) params.set(\"sortBy\", options.sortBy)\n if (options?.sortOrder) params.set(\"sortOrder\", options.sortOrder)\n if (options?.limit) params.set(\"limit\", String(options.limit))\n if (options?.offset) params.set(\"offset\", String(options.offset))\n if (options?.status) params.set(\"status\", options.status)\n\n const query = params.toString()\n return sdkFetchWithTags<CollectionContentsResponse>(\n `/collections/${encodeURIComponent(slug)}/contents${query ? `?${query}` : \"\"}`,\n [CACHE_TAGS.collections, CACHE_TAGS.collection(slug)],\n options?.revalidate\n )\n}\n\n/**\n * Get a specific content detail with resolved references\n */\nexport async function getCollectionContentDetail(\n collectionSlug: string,\n contentSlug: string,\n options?: FetchOptions\n): Promise<CollectionContentDetailResponse> {\n return sdkFetchWithTags<CollectionContentDetailResponse>(\n `/collections/${encodeURIComponent(collectionSlug)}/contents/${encodeURIComponent(contentSlug)}`,\n [\n CACHE_TAGS.collections,\n CACHE_TAGS.collection(collectionSlug),\n CACHE_TAGS.content(collectionSlug, contentSlug),\n ],\n options?.revalidate\n )\n}\n\n/**\n * Options for fetching data entries\n */\nexport interface DataEntriesOptions extends FetchOptions {\n sortBy?: string\n sortOrder?: string\n limit?: number\n offset?: number\n status?: string // \"published\" (default) or \"all\"\n}\n\n/**\n * Get data entries for a data type\n */\nexport async function getDataEntries(\n typeSlug: string,\n options?: DataEntriesOptions\n): Promise<DataListResponse> {\n const params = new URLSearchParams()\n if (options?.sortBy) params.set(\"sortBy\", options.sortBy)\n if (options?.sortOrder) params.set(\"sortOrder\", options.sortOrder)\n if (options?.limit) params.set(\"limit\", String(options.limit))\n if (options?.offset) params.set(\"offset\", String(options.offset))\n if (options?.status) params.set(\"status\", options.status)\n\n const query = params.toString()\n return sdkFetchWithTags<DataListResponse>(\n `/data/${encodeURIComponent(typeSlug)}${query ? `?${query}` : \"\"}`,\n [CACHE_TAGS.data, CACHE_TAGS.dataType(typeSlug)],\n options?.revalidate\n )\n}\n\n/**\n * Get a single data entry\n */\nexport async function getDataEntry(\n typeSlug: string,\n id: string,\n options?: FetchOptions\n): Promise<DataEntryItem> {\n return sdkFetchWithTags<DataEntryItem>(\n `/data/${encodeURIComponent(typeSlug)}/${encodeURIComponent(id)}`,\n [CACHE_TAGS.data, CACHE_TAGS.dataType(typeSlug)],\n options?.revalidate\n )\n}\n\n// ============================================\n// OrThrow variants — throw on failure instead of returning null/undefined\n// ============================================\n\n/**\n * Get contents from a collection, or throw an error\n */\nexport async function getCollectionContentsOrThrow(\n slug: string,\n options?: CollectionContentsOptions\n): Promise<CollectionContentsResponse> {\n const result = await getCollectionContents(slug, options)\n if (!result) throw new Error(`Failed to fetch collection contents: ${slug}`)\n return result\n}\n\n/**\n * Get a specific content detail, or throw an error\n */\nexport async function getCollectionContentDetailOrThrow(\n collectionSlug: string,\n contentSlug: string,\n options?: FetchOptions\n): Promise<CollectionContentDetailResponse> {\n const result = await getCollectionContentDetail(collectionSlug, contentSlug, options)\n if (!result) throw new Error(`Failed to fetch content detail: ${collectionSlug}/${contentSlug}`)\n return result\n}\n\n/**\n * Get data entries for a data type, or throw an error\n */\nexport async function getDataEntriesOrThrow(\n typeSlug: string,\n options?: DataEntriesOptions\n): Promise<DataListResponse> {\n const result = await getDataEntries(typeSlug, options)\n if (!result) throw new Error(`Failed to fetch data entries: ${typeSlug}`)\n return result\n}\n\n/**\n * Get a single data entry, or throw an error\n */\nexport async function getDataEntryOrThrow(\n typeSlug: string,\n id: string,\n options?: FetchOptions\n): Promise<DataEntryItem> {\n const result = await getDataEntry(typeSlug, id, options)\n if (!result) throw new Error(`Failed to fetch data entry: ${typeSlug}/${id}`)\n return result\n}\n\n/**\n * Get preview content by token (no authentication required)\n * Returns null if the token is invalid or expired.\n */\nexport async function getPreviewByToken(token: string): Promise<PreviewResponse | null> {\n try {\n const baseUrl = getSdkApiBaseUrl()\n const response = await fetch(`${baseUrl}/preview/${encodeURIComponent(token)}`, {\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n cache: \"no-store\",\n })\n\n if (!response.ok) {\n return null\n }\n\n return response.json()\n } catch (error) {\n console.error(\"Error fetching preview:\", error)\n return null\n }\n}\n\n/**\n * Get the workspace schema (collections, data types, forms)\n */\nexport async function getSchema(\n options?: FetchOptions\n): Promise<SchemaResponse> {\n return sdkFetchWithTags<SchemaResponse>(\n \"/schema\",\n [CACHE_TAGS.collections, CACHE_TAGS.data],\n options?.revalidate\n )\n}\n\n/**\n * Get all collections in the workspace\n */\nexport async function getCollections(\n options?: FetchOptions\n): Promise<SchemaResponse[\"collections\"]> {\n const schema = await getSchema(options)\n return schema.collections\n}\n\n/**\n * Submit data to a public form\n * Only works for data types with publicSubmission enabled.\n * Submissions are saved as \"pending\" for admin review.\n */\nexport async function submitFormData(\n typeSlug: string,\n data: Record<string, unknown>\n): Promise<{ success: true; id: string }> {\n return sdkPostFetcher<{ success: true; id: string }>(\n `/submissions/${encodeURIComponent(typeSlug)}`,\n { data }\n )\n}\n\n/**\n * Get runtime settings for starter kit deployment/runtime behavior.\n */\nexport async function fetchRuntimeSettings(): Promise<SdkRuntimeSettingsResponse> {\n const response = await getRuntimeSettings()\n if (response.status !== 200) {\n throw new Error(`Failed to fetch runtime settings: ${response.status}`)\n }\n return response.data\n}\n\n/**\n * Get daily analytics metrics collected by CMX.\n */\nexport async function fetchAnalyticsDailyMetrics(\n params?: GetAnalyticsDailyParams\n): Promise<SdkAnalyticsDailyListResponse> {\n const response = await getAnalyticsDaily(params)\n if (response.status !== 200) {\n throw new Error(`Failed to fetch analytics daily metrics: ${response.status}`)\n }\n return response.data\n}\n","import { ReactNode } from \"react\"\nimport { AlertCircle, AlertTriangle, CheckCircle, Info, Lightbulb } from \"lucide-react\"\n\ninterface CalloutProps {\n type?: \"info\" | \"warning\" | \"error\" | \"success\" | \"tip\"\n title?: string\n children: ReactNode\n}\n\nconst icons = {\n info: Info,\n warning: AlertTriangle,\n error: AlertCircle,\n success: CheckCircle,\n tip: Lightbulb,\n}\n\nconst styles = {\n info: \"cmx-mdx__callout--info\",\n warning: \"cmx-mdx__callout--warning\",\n error: \"cmx-mdx__callout--error\",\n success: \"cmx-mdx__callout--success\",\n tip: \"cmx-mdx__callout--tip\",\n}\n\nexport function Callout({ type = \"info\", title, children }: CalloutProps) {\n const Icon = icons[type]\n\n return (\n <div className={`cmx-mdx__callout ${styles[type]}`}>\n <div className=\"cmx-mdx__callout-content flex gap-3\">\n <Icon className=\"cmx-mdx__callout-icon flex-shrink-0\" />\n <div className=\"cmx-mdx__callout-body flex-1\">\n {title && <p className=\"cmx-mdx__callout-title\">{title}</p>}\n <div className=\"cmx-mdx__callout-text\">{children}</div>\n </div>\n </div>\n </div>\n )\n}\n","import Link from \"next/link\"\nimport { ReactNode } from \"react\"\n\ninterface ButtonProps {\n href: string\n children: ReactNode\n variant?: \"primary\" | \"secondary\" | \"outline\"\n}\n\nconst variants = {\n primary: \"cmx-mdx__button--primary\",\n secondary: \"cmx-mdx__button--secondary\",\n outline: \"cmx-mdx__button--outline\",\n}\n\nexport function Button({ href, children, variant = \"primary\" }: ButtonProps) {\n const isExternal = href.startsWith(\"http\")\n\n const className = `cmx-mdx__button ${variants[variant]}`\n\n if (isExternal) {\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={className}\n >\n {children}\n </a>\n )\n }\n\n return (\n <Link href={href} className={className}>\n {children}\n </Link>\n )\n}\n","interface EmbedProps {\n url: string\n}\n\nexport function Embed({ url }: EmbedProps) {\n return (\n <div className=\"cmx-mdx__embed cmx-mdx__embed--generic aspect-video\">\n <iframe\n src={url}\n className=\"cmx-mdx__embed-iframe w-full h-full\"\n allowFullScreen\n />\n </div>\n )\n}\n","interface YouTubeProps {\n url: string\n start?: number\n}\n\nfunction extractYouTubeId(url: string): string | null {\n const patterns = [\n /(?:youtube\\.com\\/watch\\?v=|youtu\\.be\\/|youtube\\.com\\/embed\\/)([^&\\n?#]+)/,\n ]\n for (const pattern of patterns) {\n const match = url.match(pattern)\n if (match) return match[1]\n }\n return null\n}\n\nexport function YouTube({ url, start }: YouTubeProps) {\n const videoId = extractYouTubeId(url)\n if (!videoId) {\n return (\n <div className=\"cmx-mdx__youtube cmx-mdx__youtube--error\">\n <p className=\"cmx-mdx__error-text\">無効なYouTube URL: {url}</p>\n </div>\n )\n }\n\n const embedUrl = `https://www.youtube.com/embed/${videoId}${start ? `?start=${start}` : \"\"}`\n\n return (\n <div className=\"cmx-mdx__youtube aspect-video\">\n <iframe\n src={embedUrl}\n className=\"cmx-mdx__youtube-iframe w-full h-full\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\"\n allowFullScreen\n />\n </div>\n )\n}\n","interface TwitterProps {\n url: string\n}\n\nexport function Twitter({ url }: TwitterProps) {\n return (\n <div className=\"cmx-mdx__twitter\">\n <p className=\"cmx-mdx__twitter-label\">Twitter / X</p>\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"cmx-mdx__twitter-link break-all\"\n >\n {url}\n </a>\n </div>\n )\n}\n","interface InstagramProps {\n url: string\n}\n\nexport function Instagram({ url }: InstagramProps) {\n return (\n <div className=\"cmx-mdx__instagram\">\n <p className=\"cmx-mdx__instagram-label\">Instagram</p>\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"cmx-mdx__instagram-link break-all\"\n >\n {url}\n </a>\n </div>\n )\n}\n","interface TikTokProps {\n url: string\n}\n\nfunction extractTikTokVideoId(url: string): string | null {\n const match = url.match(/\\/video\\/(\\d+)/)\n return match ? match[1] : null\n}\n\nexport function TikTok({ url }: TikTokProps) {\n const videoId = extractTikTokVideoId(url)\n if (!videoId) {\n return (\n <div className=\"cmx-mdx__tiktok cmx-mdx__tiktok--error\">\n <p className=\"cmx-mdx__tiktok-label\">TikTok</p>\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"cmx-mdx__tiktok-link break-all\"\n >\n {url}\n </a>\n </div>\n )\n }\n\n return (\n <div className=\"cmx-mdx__tiktok\">\n <iframe\n src={`https://www.tiktok.com/embed/v2/${videoId}`}\n className=\"cmx-mdx__tiktok-iframe w-full border-0\"\n style={{ height: 740, maxWidth: 325 }}\n allowFullScreen\n allow=\"encrypted-media\"\n />\n </div>\n )\n}\n","interface BlueskyProps {\n url: string\n}\n\nexport function Bluesky({ url }: BlueskyProps) {\n return (\n <div className=\"cmx-mdx__bluesky\">\n <p className=\"cmx-mdx__bluesky-label\">Bluesky</p>\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"cmx-mdx__bluesky-link break-all\"\n >\n {url}\n </a>\n </div>\n )\n}\n","interface VimeoProps {\n url: string\n}\n\nfunction extractVimeoId(url: string): string | null {\n const match = url.match(/vimeo\\.com\\/(\\d+)/)\n return match ? match[1] : null\n}\n\nexport function Vimeo({ url }: VimeoProps) {\n const videoId = extractVimeoId(url)\n if (!videoId) {\n return (\n <div className=\"cmx-mdx__vimeo cmx-mdx__vimeo--error\">\n <p className=\"cmx-mdx__error-text\">無効なVimeo URL: {url}</p>\n </div>\n )\n }\n\n return (\n <div className=\"cmx-mdx__vimeo aspect-video\">\n <iframe\n src={`https://player.vimeo.com/video/${videoId}`}\n className=\"cmx-mdx__vimeo-iframe w-full h-full\"\n allow=\"autoplay; fullscreen; picture-in-picture\"\n allowFullScreen\n />\n </div>\n )\n}\n","interface SpotifyProps {\n url: string\n theme?: \"light\" | \"dark\"\n}\n\nfunction toSpotifyEmbedUrl(url: string): string | null {\n const match = url.match(/open\\.spotify\\.com\\/(track|album|playlist|episode|show)\\/([^?#]+)/)\n if (!match) return null\n return `https://open.spotify.com/embed/${match[1]}/${match[2]}`\n}\n\nexport function Spotify({ url, theme = \"light\" }: SpotifyProps) {\n const embedUrl = toSpotifyEmbedUrl(url)\n if (!embedUrl) {\n return (\n <div className=\"cmx-mdx__spotify cmx-mdx__spotify--error\">\n <p className=\"cmx-mdx__error-text\">無効なSpotify URL: {url}</p>\n </div>\n )\n }\n\n const src = `${embedUrl}?theme=${theme === \"dark\" ? \"0\" : \"1\"}`\n\n return (\n <div className=\"cmx-mdx__spotify\">\n <iframe\n src={src}\n className=\"cmx-mdx__spotify-iframe w-full border-0\"\n height={152}\n allow=\"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture\"\n loading=\"lazy\"\n />\n </div>\n )\n}\n","interface GistProps {\n url: string\n}\n\nfunction extractGistId(url: string): { user: string; id: string } | null {\n const match = url.match(/gist\\.github\\.com\\/([^/]+)\\/([a-f0-9]+)/)\n if (!match) return null\n return { user: match[1], id: match[2] }\n}\n\nexport function Gist({ url }: GistProps) {\n const gist = extractGistId(url)\n if (!gist) {\n return (\n <div className=\"cmx-mdx__gist cmx-mdx__gist--error\">\n <p className=\"cmx-mdx__error-text\">無効なGist URL: {url}</p>\n </div>\n )\n }\n\n return (\n <div className=\"cmx-mdx__gist\">\n <iframe\n src={`https://gist.github.com/${gist.user}/${gist.id}.pibb`}\n className=\"cmx-mdx__gist-iframe w-full\"\n style={{ minHeight: 200 }}\n />\n </div>\n )\n}\n","interface CodePenProps {\n url: string\n height?: number\n defaultTab?: \"html\" | \"css\" | \"js\" | \"result\"\n}\n\nfunction toCodePenEmbedUrl(url: string): string | null {\n const match = url.match(/codepen\\.io\\/([^/]+)\\/(?:pen|full|details)\\/([^?#]+)/)\n if (!match) return null\n return `https://codepen.io/${match[1]}/embed/${match[2]}`\n}\n\nexport function CodePen({ url, height = 400, defaultTab = \"result\" }: CodePenProps) {\n const embedUrl = toCodePenEmbedUrl(url)\n if (!embedUrl) {\n return (\n <div className=\"cmx-mdx__codepen cmx-mdx__codepen--error\">\n <p className=\"cmx-mdx__error-text\">無効なCodePen URL: {url}</p>\n </div>\n )\n }\n\n const src = `${embedUrl}?default-tab=${defaultTab}&editable=true`\n\n return (\n <div className=\"cmx-mdx__codepen\">\n <iframe\n src={src}\n className=\"cmx-mdx__codepen-iframe w-full\"\n style={{ height }}\n loading=\"lazy\"\n allowFullScreen\n />\n </div>\n )\n}\n","interface CodeSandboxProps {\n url: string\n height?: number\n}\n\nfunction toCodeSandboxEmbedUrl(url: string): string | null {\n const match = url.match(/codesandbox\\.io\\/(?:s|p)\\/([^?#]+)/)\n if (!match) return null\n return `https://codesandbox.io/embed/${match[1]}`\n}\n\nexport function CodeSandbox({ url, height = 500 }: CodeSandboxProps) {\n const embedUrl = toCodeSandboxEmbedUrl(url)\n if (!embedUrl) {\n return (\n <div className=\"cmx-mdx__codesandbox cmx-mdx__codesandbox--error\">\n <p className=\"cmx-mdx__error-text\">無効なCodeSandbox URL: {url}</p>\n </div>\n )\n }\n\n return (\n <div className=\"cmx-mdx__codesandbox\">\n <iframe\n src={embedUrl}\n className=\"cmx-mdx__codesandbox-iframe w-full\"\n style={{ height }}\n allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\"\n sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"\n />\n </div>\n )\n}\n","interface GoogleMapProps {\n url: string\n height?: number\n}\n\nexport function GoogleMap({ url, height = 450 }: GoogleMapProps) {\n let embedUrl = url\n if (!url.includes(\"/maps/embed\")) {\n embedUrl = url\n }\n\n return (\n <div className=\"cmx-mdx__googlemap\">\n <iframe\n src={embedUrl}\n className=\"cmx-mdx__googlemap-iframe w-full\"\n style={{ height }}\n allowFullScreen\n loading=\"lazy\"\n referrerPolicy=\"no-referrer-when-downgrade\"\n />\n </div>\n )\n}\n","import { ReactNode } from \"react\"\n\ninterface DetailsProps {\n summary: string\n children: ReactNode\n}\n\nexport function Details({ summary, children }: DetailsProps) {\n return (\n <details className=\"cmx-mdx__details\">\n <summary className=\"cmx-mdx__details-summary cursor-pointer select-none\">\n {summary}\n </summary>\n <div className=\"cmx-mdx__details-content\">\n {children}\n </div>\n </details>\n )\n}\n","\"use client\"\n\nimport { ReactNode, useState, Children, isValidElement, ReactElement } from \"react\"\n\ninterface TabsProps {\n children: ReactNode\n}\n\ninterface TabProps {\n label: string\n children: ReactNode\n}\n\nexport function Tabs({ children }: TabsProps) {\n const [activeIndex, setActiveIndex] = useState(0)\n\n const tabs: { label: string; content: ReactNode }[] = []\n Children.forEach(children, (child) => {\n if (isValidElement(child) && (child as ReactElement<TabProps>).props.label) {\n const tabChild = child as ReactElement<TabProps>\n tabs.push({\n label: tabChild.props.label,\n content: tabChild.props.children,\n })\n }\n })\n\n if (tabs.length === 0) return null\n\n return (\n <div className=\"cmx-mdx__tabs overflow-hidden\">\n <div className=\"cmx-mdx__tabs-header flex\" role=\"tablist\">\n {tabs.map((tab, i) => (\n <button\n key={i}\n role=\"tab\"\n aria-selected={i === activeIndex}\n className={`cmx-mdx__tabs-button ${\n i === activeIndex ? \"cmx-mdx__tabs-button--active\" : \"\"\n }`}\n onClick={() => setActiveIndex(i)}\n >\n {tab.label}\n </button>\n ))}\n </div>\n <div className=\"cmx-mdx__tabs-content\" role=\"tabpanel\">\n {tabs[activeIndex]?.content}\n </div>\n </div>\n )\n}\n\nexport function Tab({ children }: TabProps) {\n return <div className=\"cmx-mdx__tab\">{children}</div>\n}\n","import { ReactNode } from \"react\"\n\ninterface ColumnsProps {\n cols?: number\n children: ReactNode\n}\n\ninterface ColumnProps {\n children: ReactNode\n}\n\nconst gridClasses: Record<number, string> = {\n 2: \"grid-cols-1 md:grid-cols-2\",\n 3: \"grid-cols-1 md:grid-cols-3\",\n 4: \"grid-cols-1 md:grid-cols-2 lg:grid-cols-4\",\n}\n\nexport function Columns({ cols = 2, children }: ColumnsProps) {\n const gridClass = gridClasses[cols] || gridClasses[2]\n\n return (\n <div className={`cmx-mdx__columns grid gap-4 ${gridClass}`}>\n {children}\n </div>\n )\n}\n\nexport function Column({ children }: ColumnProps) {\n return (\n <div className=\"cmx-mdx__column\">\n {children}\n </div>\n )\n}\n","interface AudioProps {\n src: string\n title?: string\n}\n\nexport function Audio({ src, title }: AudioProps) {\n return (\n <div className=\"cmx-mdx__audio\">\n {title && (\n <p className=\"cmx-mdx__audio-title\">{title}</p>\n )}\n <audio\n src={src}\n controls\n className=\"cmx-mdx__audio-player w-full\"\n preload=\"metadata\"\n />\n </div>\n )\n}\n","interface VideoProps {\n src: string\n title?: string\n poster?: string\n}\n\nexport function Video({ src, title, poster }: VideoProps) {\n return (\n <div className=\"cmx-mdx__video\">\n {title && (\n <p className=\"cmx-mdx__video-title\">{title}</p>\n )}\n <video\n src={src}\n poster={poster}\n controls\n className=\"cmx-mdx__video-player w-full\"\n preload=\"metadata\"\n />\n </div>\n )\n}\n","import { Download } from \"lucide-react\"\n\ninterface FileDownloadProps {\n url: string\n filename?: string\n size?: string\n}\n\nexport function FileDownload({ url, filename, size }: FileDownloadProps) {\n const displayName = filename || url.split(\"/\").pop() || \"ファイル\"\n\n return (\n <div className=\"cmx-mdx__filedownload flex items-center gap-3\">\n <Download className=\"cmx-mdx__filedownload-icon flex-shrink-0\" />\n <div className=\"cmx-mdx__filedownload-info flex-1 min-w-0\">\n <a\n href={url}\n download\n className=\"cmx-mdx__filedownload-link truncate block\"\n >\n {displayName}\n </a>\n {size && (\n <p className=\"cmx-mdx__filedownload-size\">{size}</p>\n )}\n </div>\n </div>\n )\n}\n","interface TableOfContentsProps {\n maxDepth?: number\n}\n\nexport function TableOfContents({ maxDepth = 3 }: TableOfContentsProps) {\n return (\n <nav\n className=\"cmx-mdx__toc\"\n aria-label=\"目次\"\n data-max-depth={maxDepth}\n >\n <p className=\"cmx-mdx__toc-title\">目次</p>\n <p className=\"cmx-mdx__toc-placeholder\">\n 目次はレンダリング時に自動生成されます\n </p>\n </nav>\n )\n}\n","// CMX Basic MDX Components\n// テンプレートとして提供する標準コンポーネント\n// クラス名: cmx-mdx__[component], cmx-mdx__[component]-[element], cmx-mdx__[component]--[modifier]\n\n// content\nexport { Callout } from \"./Callout\"\nexport { Button } from \"./Button\"\n\n// embed\nexport { Embed } from \"./Embed\"\nexport { YouTube } from \"./YouTube\"\nexport { Twitter } from \"./Twitter\"\nexport { Instagram } from \"./Instagram\"\nexport { TikTok } from \"./TikTok\"\nexport { Bluesky } from \"./Bluesky\"\nexport { Vimeo } from \"./Vimeo\"\nexport { Spotify } from \"./Spotify\"\nexport { Gist } from \"./Gist\"\nexport { CodePen } from \"./CodePen\"\nexport { CodeSandbox } from \"./CodeSandbox\"\nexport { GoogleMap } from \"./GoogleMap\"\n\n// layout\nexport { Details } from \"./Details\"\nexport { Tabs, Tab } from \"./Tabs\"\nexport { Columns, Column } from \"./Columns\"\n\n// media\nexport { Audio } from \"./Audio\"\nexport { Video } from \"./Video\"\n\n// utility\nexport { FileDownload } from \"./FileDownload\"\nexport { TableOfContents } from \"./TableOfContents\"\n\nimport { Callout } from \"./Callout\"\nimport { Button } from \"./Button\"\nimport { Embed } from \"./Embed\"\nimport { YouTube } from \"./YouTube\"\nimport { Twitter } from \"./Twitter\"\nimport { Instagram } from \"./Instagram\"\nimport { TikTok } from \"./TikTok\"\nimport { Bluesky } from \"./Bluesky\"\nimport { Vimeo } from \"./Vimeo\"\nimport { Spotify } from \"./Spotify\"\nimport { Gist } from \"./Gist\"\nimport { CodePen } from \"./CodePen\"\nimport { CodeSandbox } from \"./CodeSandbox\"\nimport { GoogleMap } from \"./GoogleMap\"\nimport { Details } from \"./Details\"\nimport { Tabs, Tab } from \"./Tabs\"\nimport { Columns, Column } from \"./Columns\"\nimport { Audio } from \"./Audio\"\nimport { Video } from \"./Video\"\nimport { FileDownload } from \"./FileDownload\"\nimport { TableOfContents } from \"./TableOfContents\"\n\nexport const basicComponents = {\n Callout,\n Button,\n Embed,\n YouTube,\n Twitter,\n Instagram,\n TikTok,\n Bluesky,\n Vimeo,\n Spotify,\n Gist,\n CodePen,\n CodeSandbox,\n GoogleMap,\n Details,\n Tabs,\n Tab,\n Columns,\n Column,\n Audio,\n Video,\n FileDownload,\n TableOfContents,\n}\n","import Link from \"next/link\"\n\ninterface BlogCardProps {\n contentId: string\n title?: string\n slug?: string\n excerpt?: string\n}\n\nexport function BlogCard({ contentId, title, slug, excerpt }: BlogCardProps) {\n if (!title || !slug) {\n return (\n <div className=\"cmx-mdx__blogcard cmx-mdx__blogcard--unresolved\">\n <p className=\"cmx-mdx__blogcard-text\">記事カード: {contentId}</p>\n </div>\n )\n }\n\n return (\n <Link\n href={`/${slug}`}\n className=\"cmx-mdx__blogcard-link\"\n >\n <h3 className=\"cmx-mdx__blogcard-title\">{title}</h3>\n {excerpt && <p className=\"cmx-mdx__blogcard-excerpt line-clamp-2\">{excerpt}</p>}\n </Link>\n )\n}\n","import NextImage from \"next/image\"\n\ninterface ImageProps {\n assetId: string\n alt?: string\n size?: \"thumbnail\" | \"medium\" | \"large\" | \"original\"\n caption?: string\n url?: string\n width?: number\n height?: number\n}\n\nexport function Image({\n assetId,\n alt = \"\",\n size = \"large\",\n caption,\n url,\n width,\n height,\n}: ImageProps) {\n if (!url) {\n return (\n <figure className=\"cmx-mdx__image\">\n <div className=\"cmx-mdx__image--unresolved\">\n <p className=\"cmx-mdx__image-id\">画像: {assetId}</p>\n <p className=\"cmx-mdx__image-size\">サイズ: {size}</p>\n </div>\n {caption && (\n <figcaption className=\"cmx-mdx__image-caption\">\n {caption}\n </figcaption>\n )}\n </figure>\n )\n }\n\n return (\n <figure className=\"cmx-mdx__image\">\n <NextImage\n src={url}\n alt={alt}\n width={width || 800}\n height={height || 600}\n className=\"cmx-mdx__image-img\"\n />\n {caption && (\n <figcaption className=\"cmx-mdx__image-caption\">\n {caption}\n </figcaption>\n )}\n </figure>\n )\n}\n","interface GalleryImage {\n assetId: string\n url?: string\n alt?: string\n}\n\ninterface GalleryProps {\n assetIds: string[]\n columns?: number\n caption?: string\n images?: GalleryImage[]\n}\n\nconst gridClasses: Record<number, string> = {\n 1: \"grid-cols-1\",\n 2: \"grid-cols-1 sm:grid-cols-2\",\n 3: \"grid-cols-1 sm:grid-cols-2 md:grid-cols-3\",\n 4: \"grid-cols-2 md:grid-cols-4\",\n 5: \"grid-cols-2 md:grid-cols-3 lg:grid-cols-5\",\n 6: \"grid-cols-2 md:grid-cols-3 lg:grid-cols-6\",\n}\n\nexport function Gallery({ assetIds, columns = 3, caption, images }: GalleryProps) {\n const gridClass = gridClasses[columns] || gridClasses[3]\n\n const items: GalleryImage[] = images || assetIds.map((id) => ({ assetId: id }))\n\n return (\n <figure className=\"cmx-mdx__gallery\">\n <div className={`cmx-mdx__gallery-grid grid gap-2 ${gridClass}`}>\n {items.map((item, i) => (\n <div\n key={item.assetId || i}\n className=\"cmx-mdx__gallery-item aspect-square overflow-hidden\"\n >\n {item.url ? (\n <img\n src={item.url}\n alt={item.alt || \"\"}\n className=\"cmx-mdx__gallery-image w-full h-full object-cover\"\n loading=\"lazy\"\n />\n ) : (\n <div className=\"cmx-mdx__gallery-placeholder w-full h-full flex items-center justify-center\">\n 画像\n </div>\n )}\n </div>\n ))}\n </div>\n {caption && (\n <figcaption className=\"cmx-mdx__gallery-caption\">\n {caption}\n </figcaption>\n )}\n </figure>\n )\n}\n","// CMX Custom MDX Components\n// プロジェクト固有のカスタムコンポーネント(reference解決が必要)\n// これらは企業ごとにカスタマイズされることを想定\n\nexport { BlogCard } from \"./BlogCard\"\nexport { Image } from \"./Image\"\nexport { Gallery } from \"./Gallery\"\n\nimport { BlogCard } from \"./BlogCard\"\nimport { Image } from \"./Image\"\nimport { Gallery } from \"./Gallery\"\n\nexport const customComponents = {\n BlogCard,\n Image,\n Gallery,\n}\n","// ============================================\n// Standard Markdown Element Components\n// These map to HTML elements generated from Markdown syntax\n// ============================================\n\ntype PropsWithChildren = { children?: React.ReactNode; [key: string]: unknown }\n\n// Headings: # ## ### #### ##### ######\nconst mdxH1 = ({ children, ...props }: PropsWithChildren) => (\n <h1 className=\"cmx-mdx__h1\" {...props}>{children}</h1>\n)\nconst mdxH2 = ({ children, ...props }: PropsWithChildren) => (\n <h2 className=\"cmx-mdx__h2\" {...props}>{children}</h2>\n)\nconst mdxH3 = ({ children, ...props }: PropsWithChildren) => (\n <h3 className=\"cmx-mdx__h3\" {...props}>{children}</h3>\n)\nconst mdxH4 = ({ children, ...props }: PropsWithChildren) => (\n <h4 className=\"cmx-mdx__h4\" {...props}>{children}</h4>\n)\nconst mdxH5 = ({ children, ...props }: PropsWithChildren) => (\n <h5 className=\"cmx-mdx__h5\" {...props}>{children}</h5>\n)\nconst mdxH6 = ({ children, ...props }: PropsWithChildren) => (\n <h6 className=\"cmx-mdx__h6\" {...props}>{children}</h6>\n)\n\n// Paragraph\nconst mdxP = ({ children, ...props }: PropsWithChildren) => (\n <p className=\"cmx-mdx__p\" {...props}>{children}</p>\n)\n\n// Lists: - item / 1. item\nconst mdxUl = ({ children, ...props }: PropsWithChildren) => (\n <ul className=\"cmx-mdx__ul\" {...props}>{children}</ul>\n)\nconst mdxOl = ({ children, ...props }: PropsWithChildren) => (\n <ol className=\"cmx-mdx__ol\" {...props}>{children}</ol>\n)\nconst mdxLi = ({ children, ...props }: PropsWithChildren) => (\n <li className=\"cmx-mdx__li\" {...props}>{children}</li>\n)\n\n// Blockquote: > quote\nconst mdxBlockquote = ({ children, ...props }: PropsWithChildren) => (\n <blockquote className=\"cmx-mdx__blockquote\" {...props}>\n {children}\n </blockquote>\n)\n\n// Code: ```code``` and `inline`\nconst mdxPre = ({ children, ...props }: PropsWithChildren) => (\n <pre className=\"cmx-mdx__pre\" {...props}>\n {children}\n </pre>\n)\nconst mdxCode = ({ children, ...props }: PropsWithChildren) => (\n <code className=\"cmx-mdx__code\" {...props}>\n {children}\n </code>\n)\n\n// Horizontal rule: ---\nconst mdxHr = () => (\n <hr className=\"cmx-mdx__hr\" />\n)\n\n// Links: [text](url)\nconst mdxA = ({ children, href, ...props }: PropsWithChildren & { href?: string }) => (\n <a\n href={href}\n className=\"cmx-mdx__a\"\n target={href?.startsWith(\"http\") ? \"_blank\" : undefined}\n rel={href?.startsWith(\"http\") ? \"noopener noreferrer\" : undefined}\n {...props}\n >\n {children}\n </a>\n)\n\n// Images: ![alt](url)\nconst mdxImg = ({ src, alt, ...props }: { src?: string; alt?: string; [key: string]: unknown }) => (\n // eslint-disable-next-line @next/next/no-img-element\n <img\n src={src}\n alt={alt || \"\"}\n className=\"cmx-mdx__img\"\n {...props}\n />\n)\n\n// Text formatting: **bold** *italic*\nconst mdxStrong = ({ children, ...props }: PropsWithChildren) => (\n <strong className=\"cmx-mdx__strong\" {...props}>{children}</strong>\n)\nconst mdxEm = ({ children, ...props }: PropsWithChildren) => (\n <em className=\"cmx-mdx__em\" {...props}>{children}</em>\n)\n\n// Tables (GFM)\nconst mdxTable = ({ children, ...props }: PropsWithChildren) => (\n <div className=\"cmx-mdx__table-wrapper\">\n <table className=\"cmx-mdx__table\" {...props}>\n {children}\n </table>\n </div>\n)\nconst mdxThead = ({ children, ...props }: PropsWithChildren) => (\n <thead className=\"cmx-mdx__thead\" {...props}>{children}</thead>\n)\nconst mdxTbody = ({ children, ...props }: PropsWithChildren) => (\n <tbody {...props}>{children}</tbody>\n)\nconst mdxTr = ({ children, ...props }: PropsWithChildren) => (\n <tr className=\"cmx-mdx__tr\" {...props}>{children}</tr>\n)\nconst mdxTh = ({ children, ...props }: PropsWithChildren) => (\n <th className=\"cmx-mdx__th\" {...props}>{children}</th>\n)\nconst mdxTd = ({ children, ...props }: PropsWithChildren) => (\n <td className=\"cmx-mdx__td\" {...props}>{children}</td>\n)\n\n/**\n * Standard markdown element mappings for MDX\n * Use with MDX's components prop: <MDXContent components={markdownComponents} />\n */\nexport const markdownComponents = {\n h1: mdxH1,\n h2: mdxH2,\n h3: mdxH3,\n h4: mdxH4,\n h5: mdxH5,\n h6: mdxH6,\n p: mdxP,\n ul: mdxUl,\n ol: mdxOl,\n li: mdxLi,\n blockquote: mdxBlockquote,\n pre: mdxPre,\n code: mdxCode,\n hr: mdxHr,\n a: mdxA,\n img: mdxImg,\n strong: mdxStrong,\n em: mdxEm,\n table: mdxTable,\n thead: mdxThead,\n tbody: mdxTbody,\n tr: mdxTr,\n th: mdxTh,\n td: mdxTd,\n}\n","// MDX Components\n// basic: CMXテンプレート(cmx-mdx__プレフィックス付き)\n// custom: プロジェクト固有(reference解決が必要)\n// markdown: 標準Markdown要素(h1, p, ul, etc.)\n\n// Basic Components (CMX templates)\nexport {\n Callout, Embed, Button,\n YouTube, Twitter, Instagram, TikTok, Bluesky,\n Vimeo, Spotify, Gist, CodePen, CodeSandbox, GoogleMap,\n Details, Tabs, Tab, Columns, Column,\n Audio, Video, FileDownload, TableOfContents,\n basicComponents,\n} from \"./basic\"\n\n// Custom Components (project-specific)\nexport { BlogCard, Image, Gallery, customComponents } from \"./custom\"\n\n// Standard Markdown Element Components\nexport { markdownComponents } from \"./markdown\"\n\n// Combined MDX Component Map\nimport { basicComponents } from \"./basic\"\nimport { customComponents } from \"./custom\"\nimport { markdownComponents } from \"./markdown\"\n\nexport const mdxComponents = {\n ...markdownComponents,\n ...basicComponents,\n ...customComponents,\n}\n","import { z } from \"zod\"\n\n// ============================================\n// Component Props Schema Definitions\n// ============================================\n\nexport const componentSchemas = {\n // --- content ---\n Callout: z.object({\n type: z\n .enum([\"info\", \"warning\", \"error\", \"success\", \"tip\"])\n .default(\"info\")\n .describe(\"タイプ\"),\n title: z.string().optional().describe(\"タイトル\"),\n children: z.string().describe(\"本文(Markdown可)\"),\n }),\n\n Button: z.object({\n href: z.string().describe(\"リンク先URL\"),\n children: z.string().describe(\"ボタンテキスト\"),\n variant: z.enum([\"primary\", \"secondary\", \"outline\"]).default(\"primary\").describe(\"スタイル\"),\n }),\n\n // --- media ---\n Image: z.object({\n assetId: z.string().uuid().describe(\"アセットのUUID\"),\n alt: z.string().optional().describe(\"代替テキスト\"),\n size: z\n .enum([\"thumbnail\", \"medium\", \"large\", \"original\"])\n .default(\"large\")\n .describe(\"表示サイズ\"),\n caption: z.string().optional().describe(\"キャプション\"),\n }),\n\n Audio: z.object({\n src: z.string().url().describe(\"音声ファイルURL\"),\n title: z.string().optional().describe(\"タイトル\"),\n }),\n\n Video: z.object({\n src: z.string().url().describe(\"動画ファイルURL\"),\n title: z.string().optional().describe(\"タイトル\"),\n poster: z.string().url().optional().describe(\"ポスター画像URL\"),\n }),\n\n Gallery: z.object({\n assetIds: z.array(z.string().uuid()).describe(\"アセットUUIDの配列\"),\n columns: z.number().min(1).max(6).default(3).describe(\"列数\"),\n caption: z.string().optional().describe(\"キャプション\"),\n }),\n\n // --- reference ---\n BlogCard: z.object({\n contentId: z.string().uuid().describe(\"参照先コンテンツのUUID\"),\n }),\n\n // --- embed ---\n YouTube: z.object({\n url: z.string().url().describe(\"YouTube動画URL\"),\n start: z.number().optional().describe(\"開始秒数\"),\n }),\n\n Twitter: z.object({\n url: z.string().url().describe(\"ツイートURL\"),\n }),\n\n Instagram: z.object({\n url: z.string().url().describe(\"Instagram投稿URL\"),\n }),\n\n TikTok: z.object({\n url: z.string().url().describe(\"TikTok動画URL\"),\n }),\n\n Bluesky: z.object({\n url: z.string().url().describe(\"BlueskyポストURL\"),\n }),\n\n Vimeo: z.object({\n url: z.string().url().describe(\"Vimeo動画URL\"),\n }),\n\n Spotify: z.object({\n url: z.string().url().describe(\"SpotifyコンテンツURL\"),\n theme: z.enum([\"light\", \"dark\"]).default(\"light\").describe(\"テーマ\"),\n }),\n\n Gist: z.object({\n url: z.string().url().describe(\"GitHub Gist URL\"),\n }),\n\n CodePen: z.object({\n url: z.string().url().describe(\"CodePen URL\"),\n height: z.number().default(400).describe(\"高さ(px)\"),\n defaultTab: z.enum([\"html\", \"css\", \"js\", \"result\"]).default(\"result\").describe(\"デフォルトタブ\"),\n }),\n\n CodeSandbox: z.object({\n url: z.string().url().describe(\"CodeSandbox URL\"),\n height: z.number().default(500).describe(\"高さ(px)\"),\n }),\n\n GoogleMap: z.object({\n url: z.string().url().describe(\"Google Maps URL\"),\n height: z.number().default(450).describe(\"高さ(px)\"),\n }),\n\n // --- layout ---\n Details: z.object({\n summary: z.string().describe(\"折りたたみの見出し\"),\n children: z.string().describe(\"折りたたまれる内容\"),\n }),\n\n Tabs: z.object({\n children: z.string().describe(\"Tabコンポーネントの並び\"),\n }),\n\n Tab: z.object({\n label: z.string().describe(\"タブのラベル\"),\n children: z.string().describe(\"タブの内容\"),\n }),\n\n Columns: z.object({\n cols: z.number().min(2).max(4).default(2).describe(\"列数\"),\n children: z.string().describe(\"Columnコンポーネントの並び\"),\n }),\n\n Column: z.object({\n children: z.string().describe(\"カラムの内容\"),\n }),\n\n // --- utility ---\n Embed: z.object({\n url: z.string().url().describe(\"埋め込みURL\"),\n }),\n\n FileDownload: z.object({\n url: z.string().url().describe(\"ファイルURL\"),\n filename: z.string().optional().describe(\"表示ファイル名\"),\n size: z.string().optional().describe(\"ファイルサイズ表示\"),\n }),\n\n TableOfContents: z.object({\n maxDepth: z.number().min(1).max(6).default(3).describe(\"見出しの最大深さ\"),\n }),\n} as const\n\n// ============================================\n// Component Catalog Type\n// ============================================\n\nexport type ComponentName = keyof typeof componentSchemas\nexport const COMPONENT_SOURCES = [\"standard\", \"custom\"] as const\nexport type ComponentSource = (typeof COMPONENT_SOURCES)[number]\nexport type ComponentKind = \"presentational\" | \"data-bound\"\nexport type ComponentCategory = \"content\" | \"media\" | \"reference\" | \"embed\" | \"layout\" | \"utility\"\n\nexport interface ComponentBinding {\n prop: string\n target: \"content\" | \"asset\" | \"dataEntry\"\n strategy: \"by-id\"\n}\n\nexport interface ComponentDefinition<T extends ComponentName = ComponentName> {\n name: T\n displayName: string\n description: string\n category: ComponentCategory\n schema: (typeof componentSchemas)[T]\n examples: string[]\n hasReferences: boolean\n source: \"standard\"\n kind: ComponentKind\n locked: true\n editable: false\n bindings?: ComponentBinding[]\n /** 子コンポーネントの場合、親コンポーネント名 */\n parentComponent?: ComponentName\n}\n\nexport interface CatalogForAIComponent {\n name: string\n description: string\n props: Record<string, { type: string; description?: string; required: boolean }>\n examples: string[]\n source: ComponentSource\n kind: ComponentKind\n locked: boolean\n editable: boolean\n bindings?: ComponentBinding[]\n parentComponent?: string\n}\n\n// ============================================\n// Component Catalog (Standard / Immutable)\n// ============================================\n\nexport const componentCatalog: Record<ComponentName, ComponentDefinition> = {\n // --- content ---\n Callout: {\n name: \"Callout\",\n displayName: \"コールアウト\",\n description: \"注意書きや補足情報を目立たせるボックス\",\n category: \"content\",\n schema: componentSchemas.Callout,\n examples: [\n '<Callout type=\"info\">これは情報です</Callout>',\n '<Callout type=\"warning\" title=\"注意\">重要な注意事項です</Callout>',\n ],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Button: {\n name: \"Button\",\n displayName: \"ボタン\",\n description: \"アクションを促すボタンリンク\",\n category: \"content\",\n schema: componentSchemas.Button,\n examples: [\n '<Button href=\"/contact\">お問い合わせ</Button>',\n '<Button href=\"https://example.com\" variant=\"secondary\">詳細を見る</Button>',\n ],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n // --- media ---\n Image: {\n name: \"Image\",\n displayName: \"画像\",\n description: \"アップロード済み画像を表示します\",\n category: \"media\",\n schema: componentSchemas.Image,\n examples: [\n '<Image assetId=\"123e4567-e89b-12d3-a456-426614174000\" alt=\"説明\" />',\n '<Image assetId=\"123e4567-e89b-12d3-a456-426614174000\" size=\"medium\" caption=\"キャプション\" />',\n ],\n hasReferences: true,\n source: \"standard\",\n kind: \"data-bound\",\n locked: true,\n editable: false,\n bindings: [{ prop: \"assetId\", target: \"asset\", strategy: \"by-id\" }],\n },\n\n Audio: {\n name: \"Audio\",\n displayName: \"音声プレイヤー\",\n description: \"音声ファイルを再生するプレイヤー\",\n category: \"media\",\n schema: componentSchemas.Audio,\n examples: ['<Audio src=\"https://example.com/podcast.mp3\" title=\"エピソード1\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Video: {\n name: \"Video\",\n displayName: \"動画プレイヤー\",\n description: \"セルフホスト動画を再生するプレイヤー\",\n category: \"media\",\n schema: componentSchemas.Video,\n examples: ['<Video src=\"https://example.com/video.mp4\" poster=\"https://example.com/thumb.jpg\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Gallery: {\n name: \"Gallery\",\n displayName: \"画像ギャラリー\",\n description: \"複数の画像をグリッドレイアウトで表示します\",\n category: \"media\",\n schema: componentSchemas.Gallery,\n examples: [\n '<Gallery assetIds={[\"uuid1\", \"uuid2\", \"uuid3\"]} />',\n '<Gallery assetIds={[\"uuid1\", \"uuid2\"]} columns={2} caption=\"写真集\" />',\n ],\n hasReferences: true,\n source: \"standard\",\n kind: \"data-bound\",\n locked: true,\n editable: false,\n bindings: [{ prop: \"assetIds\", target: \"asset\", strategy: \"by-id\" }],\n },\n\n // --- reference ---\n BlogCard: {\n name: \"BlogCard\",\n displayName: \"記事カード\",\n description: \"他の記事へのリンクカードを表示します\",\n category: \"reference\",\n schema: componentSchemas.BlogCard,\n examples: ['<BlogCard contentId=\"123e4567-e89b-12d3-a456-426614174000\" />'],\n hasReferences: true,\n source: \"standard\",\n kind: \"data-bound\",\n locked: true,\n editable: false,\n bindings: [{ prop: \"contentId\", target: \"content\", strategy: \"by-id\" }],\n },\n\n // --- embed ---\n YouTube: {\n name: \"YouTube\",\n displayName: \"YouTube\",\n description: \"YouTube動画を埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.YouTube,\n examples: [\n '<YouTube url=\"https://www.youtube.com/watch?v=dQw4w9WgXcQ\" />',\n '<YouTube url=\"https://youtu.be/dQw4w9WgXcQ\" start={30} />',\n ],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Twitter: {\n name: \"Twitter\",\n displayName: \"Twitter / X\",\n description: \"ツイート・ポストを埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.Twitter,\n examples: ['<Twitter url=\"https://twitter.com/example/status/123456789\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Instagram: {\n name: \"Instagram\",\n displayName: \"Instagram\",\n description: \"Instagram投稿を埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.Instagram,\n examples: ['<Instagram url=\"https://www.instagram.com/p/ABC123/\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n TikTok: {\n name: \"TikTok\",\n displayName: \"TikTok\",\n description: \"TikTok動画を埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.TikTok,\n examples: ['<TikTok url=\"https://www.tiktok.com/@user/video/123456789\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Bluesky: {\n name: \"Bluesky\",\n displayName: \"Bluesky\",\n description: \"Blueskyポストを埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.Bluesky,\n examples: ['<Bluesky url=\"https://bsky.app/profile/user.bsky.social/post/abc123\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Vimeo: {\n name: \"Vimeo\",\n displayName: \"Vimeo\",\n description: \"Vimeo動画を埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.Vimeo,\n examples: ['<Vimeo url=\"https://vimeo.com/123456789\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Spotify: {\n name: \"Spotify\",\n displayName: \"Spotify\",\n description: \"Spotify楽曲・プレイリストを埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.Spotify,\n examples: [\n '<Spotify url=\"https://open.spotify.com/track/xxx\" />',\n '<Spotify url=\"https://open.spotify.com/playlist/xxx\" theme=\"dark\" />',\n ],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Gist: {\n name: \"Gist\",\n displayName: \"GitHub Gist\",\n description: \"GitHub Gistのコードスニペットを埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.Gist,\n examples: ['<Gist url=\"https://gist.github.com/user/abc123\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n CodePen: {\n name: \"CodePen\",\n displayName: \"CodePen\",\n description: \"CodePenのライブデモを埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.CodePen,\n examples: ['<CodePen url=\"https://codepen.io/user/pen/abc123\" height={500} defaultTab=\"result\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n CodeSandbox: {\n name: \"CodeSandbox\",\n displayName: \"CodeSandbox\",\n description: \"CodeSandboxのライブデモを埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.CodeSandbox,\n examples: ['<CodeSandbox url=\"https://codesandbox.io/s/abc123\" height={500} />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n GoogleMap: {\n name: \"GoogleMap\",\n displayName: \"Google Maps\",\n description: \"Google Mapsの地図を埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.GoogleMap,\n examples: ['<GoogleMap url=\"https://www.google.com/maps/embed?pb=...\" height={400} />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n // --- layout ---\n Details: {\n name: \"Details\",\n displayName: \"折りたたみ\",\n description: \"クリックで展開・折りたたみ可能なセクション\",\n category: \"layout\",\n schema: componentSchemas.Details,\n examples: ['<Details summary=\"詳細を見る\">折りたたまれた内容</Details>'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Tabs: {\n name: \"Tabs\",\n displayName: \"タブ\",\n description: \"タブで切り替え可能なコンテンツ\",\n category: \"layout\",\n schema: componentSchemas.Tabs,\n examples: ['<Tabs><Tab label=\"タブ1\">内容1</Tab><Tab label=\"タブ2\">内容2</Tab></Tabs>'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Tab: {\n name: \"Tab\",\n displayName: \"タブ(子)\",\n description: \"Tabsの子コンポーネント\",\n category: \"layout\",\n schema: componentSchemas.Tab,\n examples: ['<Tab label=\"タブ名\">内容</Tab>'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n parentComponent: \"Tabs\",\n },\n\n Columns: {\n name: \"Columns\",\n displayName: \"カラム\",\n description: \"マルチカラムレイアウト\",\n category: \"layout\",\n schema: componentSchemas.Columns,\n examples: ['<Columns cols={2}><Column>左</Column><Column>右</Column></Columns>'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Column: {\n name: \"Column\",\n displayName: \"カラム(子)\",\n description: \"Columnsの子コンポーネント\",\n category: \"layout\",\n schema: componentSchemas.Column,\n examples: [\"<Column>カラムの内容</Column>\"],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n parentComponent: \"Columns\",\n },\n\n // --- utility ---\n Embed: {\n name: \"Embed\",\n displayName: \"汎用埋め込み\",\n description: \"汎用iframeで外部コンテンツを埋め込みます\",\n category: \"utility\",\n schema: componentSchemas.Embed,\n examples: ['<Embed url=\"https://example.com/widget\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n FileDownload: {\n name: \"FileDownload\",\n displayName: \"ファイルダウンロード\",\n description: \"ファイルダウンロードリンクを表示します\",\n category: \"utility\",\n schema: componentSchemas.FileDownload,\n examples: ['<FileDownload url=\"https://example.com/doc.pdf\" filename=\"資料.pdf\" size=\"2.4MB\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n TableOfContents: {\n name: \"TableOfContents\",\n displayName: \"目次\",\n description: \"記事内の見出しから目次を自動生成します\",\n category: \"utility\",\n schema: componentSchemas.TableOfContents,\n examples: [\"<TableOfContents />\", \"<TableOfContents maxDepth={2} />\"],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n}\n\n// ============================================\n// Child Component Pairing\n// ============================================\n\n/** 子コンポーネントから親コンポーネントへのマッピング */\nexport const CHILD_COMPONENT_MAP: Partial<Record<ComponentName, ComponentName>> = {\n Tab: \"Tabs\",\n Column: \"Columns\",\n}\n\n/** 親コンポーネントが有効化されると自動で有効化される子コンポーネント */\nexport const PARENT_CHILD_MAP: Partial<Record<ComponentName, ComponentName[]>> = {\n Tabs: [\"Tab\"],\n Columns: [\"Column\"],\n}\n\n// ============================================\n// Utility Functions\n// ============================================\n\nexport function isValidComponent(name: string): name is ComponentName {\n return name in componentCatalog\n}\n\nexport function validateComponentProps(\n name: ComponentName,\n props: unknown\n): { success: true; data: unknown } | { success: false; error: z.ZodError } {\n const schema = componentSchemas[name]\n const result = schema.safeParse(props)\n if (result.success) {\n return { success: true, data: result.data }\n }\n return { success: false, error: result.error }\n}\n\nexport function getComponentsWithReferences(): ComponentName[] {\n return (Object.keys(componentCatalog) as ComponentName[]).filter(\n (name) => componentCatalog[name].hasReferences\n )\n}\n\nexport function getComponentsByCategory(): Record<string, ComponentDefinition[]> {\n const grouped: Record<string, ComponentDefinition[]> = {}\n for (const def of Object.values(componentCatalog)) {\n if (!grouped[def.category]) {\n grouped[def.category] = []\n }\n grouped[def.category].push(def)\n }\n return grouped\n}\n\nexport function getStandardComponentNames(): ComponentName[] {\n return Object.keys(componentCatalog) as ComponentName[]\n}\n\nexport function isStandardComponentName(name: string): boolean {\n return isValidComponent(name)\n}\n\nexport function getCatalogForAI(enabledComponents?: string[]): CatalogForAIComponent[] {\n let entries = Object.values(componentCatalog)\n\n if (enabledComponents) {\n entries = entries.filter((def) => enabledComponents.includes(def.name))\n }\n\n return entries.map((def) => {\n const shape = def.schema.shape as Record<string, z.ZodTypeAny>\n const props: Record<string, { type: string; description?: string; required: boolean }> = {}\n\n for (const [key, zodType] of Object.entries(shape)) {\n const isOptional = zodType.isOptional()\n props[key] = {\n type: getZodTypeName(zodType),\n description: zodType.description,\n required: !isOptional,\n }\n }\n\n return {\n name: def.name,\n description: def.description,\n props,\n examples: def.examples,\n source: def.source,\n kind: def.kind,\n locked: def.locked,\n editable: def.editable,\n bindings: def.bindings,\n parentComponent: def.parentComponent,\n }\n })\n}\n\nfunction getZodTypeName(zodType: z.ZodTypeAny): string {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const typeDef = (zodType as any)._zod?.def ?? (zodType as any)._def\n if (!typeDef) return \"unknown\"\n\n const typeName = typeDef.type ?? typeDef.typeName\n\n switch (typeName) {\n case \"string\":\n case \"ZodString\":\n return \"string\"\n case \"number\":\n case \"ZodNumber\":\n return \"number\"\n case \"boolean\":\n case \"ZodBoolean\":\n return \"boolean\"\n case \"enum\":\n case \"ZodEnum\":\n return `enum(${typeDef.values?.join(\"|\") ?? \"\"})`\n case \"array\":\n case \"ZodArray\":\n return \"array\"\n case \"optional\":\n case \"ZodOptional\":\n return typeDef.innerType ? getZodTypeName(typeDef.innerType) : \"unknown\"\n case \"default\":\n case \"ZodDefault\":\n return typeDef.innerType ? getZodTypeName(typeDef.innerType) : \"unknown\"\n default:\n return \"unknown\"\n }\n}\n","import { compile } from \"@mdx-js/mdx\"\nimport remarkGfm from \"remark-gfm\"\nimport { isValidComponent, validateComponentProps, ComponentName, CHILD_COMPONENT_MAP } from \"./component-catalog\"\n\n// ============================================\n// Validation Error Types\n// ============================================\n\nexport interface ValidationError {\n type: \"syntax\" | \"forbidden\" | \"component\" | \"props\"\n message: string\n line?: number\n column?: number\n component?: string\n}\n\nexport interface ValidationResult {\n valid: boolean\n errors: ValidationError[]\n warnings: string[]\n references: {\n contentIds: string[]\n assetIds: string[]\n }\n}\n\n// ============================================\n// Forbidden Patterns\n// ============================================\n\nconst FORBIDDEN_PATTERNS = [\n // import/export statements (at MDX level, not inside code blocks)\n { pattern: /^\\s*import\\s+/m, message: \"import文は使用できません\" },\n { pattern: /^\\s*export\\s+/m, message: \"export文は使用できません\" },\n // JS expressions in curly braces (except component props)\n { pattern: /\\{[^}]*(?:=>|function|new\\s+|typeof|instanceof)[^}]*\\}/m, message: \"JavaScript式は使用できません\" },\n // eval, Function constructor\n { pattern: /\\beval\\s*\\(/m, message: \"evalは使用できません\" },\n { pattern: /\\bnew\\s+Function\\s*\\(/m, message: \"Function constructorは使用できません\" },\n // script tags\n { pattern: /<script[\\s>]/i, message: \"scriptタグは使用できません\" },\n // on* event handlers\n { pattern: /\\bon\\w+\\s*=/i, message: \"イベントハンドラ属性は使用できません\" },\n // javascript: URLs\n { pattern: /javascript\\s*:/i, message: \"javascript: URLは使用できません\" },\n // data: URLs (for images - can be XSS vector)\n { pattern: /src\\s*=\\s*[\"']?\\s*data:/i, message: \"data: URLは使用できません\" },\n]\n\n// ============================================\n// Strip Code Blocks for Pattern Checking\n// ============================================\n\n/**\n * Remove CodeBlock content from MDX before checking forbidden patterns.\n * This prevents false positives when code examples contain import/export statements.\n * Preserves the same number of newlines so that line numbers remain accurate.\n */\nfunction stripCodeBlocksForPatternCheck(mdx: string): string {\n // Replace CodeBlock component content with placeholder, preserving newline count\n let result = mdx.replace(/<CodeBlock[^>]*>([^]*?)<\\/CodeBlock>/g, (_match, content: string) => {\n const newlineCount = (content.match(/\\n/g) || []).length\n return \"<CodeBlock>__CODE_PLACEHOLDER__\" + \"\\n\".repeat(newlineCount) + \"</CodeBlock>\"\n })\n\n // Also strip markdown fenced code blocks (```...```), preserving newline count\n result = result.replace(/```[\\s\\S]*?```/g, (match) => {\n const newlineCount = (match.match(/\\n/g) || []).length\n return \"```__CODE_PLACEHOLDER__\" + \"\\n\".repeat(Math.max(0, newlineCount - 1)) + \"```\"\n })\n\n return result\n}\n\n/**\n * Escape CodeBlock content for MDX compilation.\n * Replaces problematic syntax with HTML entities to prevent parsing errors.\n */\nfunction escapeCodeBlocksForCompile(mdx: string): string {\n // Escape content inside CodeBlock components\n let result = mdx.replace(/<CodeBlock([^>]*)>([^]*?)<\\/CodeBlock>/g, (_match, attrs, content) => {\n const escapedContent = content\n .replace(/^(\\s*)(import|export)\\s/gm, \"$1/* $2 */ \")\n .replace(/\\{/g, \"&#123;\")\n .replace(/\\}/g, \"&#125;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g, \"&gt;\")\n return `<CodeBlock${attrs}>${escapedContent}</CodeBlock>`\n })\n\n // Also escape markdown fenced code blocks\n result = result.replace(/```([a-z]*)\\n([\\s\\S]*?)```/g, (_match, lang, content) => {\n const escapedContent = content\n .replace(/^(\\s*)(import|export)\\s/gm, \"$1/* $2 */ \")\n .replace(/\\{/g, \"&#123;\")\n .replace(/\\}/g, \"&#125;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g, \"&gt;\")\n return \"```\" + lang + \"\\n\" + escapedContent + \"```\"\n })\n\n return result\n}\n\n// ============================================\n// Component Extraction\n// ============================================\n\ninterface ExtractedComponent {\n name: string\n props: Record<string, unknown>\n line: number\n}\n\n/**\n * Stack-based component extractor that handles nested components.\n * Scans for '<' characters, identifies opening/closing/self-closing tags,\n * and uses a stack to properly match open/close pairs at all nesting levels.\n */\nfunction extractComponents(mdx: string): ExtractedComponent[] {\n const components: ExtractedComponent[] = []\n\n // Pre-calculate line offsets for efficient lookup\n const lines = mdx.split(\"\\n\")\n const lineOffsets: number[] = []\n let offset = 0\n for (const line of lines) {\n lineOffsets.push(offset)\n offset += line.length + 1\n }\n\n function getLineNumber(index: number): number {\n let lo = 0, hi = lineOffsets.length - 1\n while (lo < hi) {\n const mid = Math.floor((lo + hi + 1) / 2)\n if (lineOffsets[mid] <= index) {\n lo = mid\n } else {\n hi = mid - 1\n }\n }\n return lo + 1\n }\n\n const stack: { name: string; propsString: string; tagStart: number; contentStart: number; line: number }[] = []\n\n let i = 0\n while (i < mdx.length) {\n if (mdx[i] !== \"<\") {\n i++\n continue\n }\n\n const tagStart = i\n i++ // skip '<'\n\n // Closing tag: </ComponentName>\n if (mdx[i] === \"/\") {\n i++\n const closeMatch = mdx.slice(i).match(/^([A-Z][a-zA-Z0-9]*)\\s*>/)\n if (closeMatch) {\n const closingName = closeMatch[1]\n i += closeMatch[0].length\n\n // Find matching opening tag on stack (search from top)\n for (let s = stack.length - 1; s >= 0; s--) {\n if (stack[s].name === closingName) {\n const opening = stack[s]\n const children = mdx.slice(opening.contentStart, tagStart).trim()\n const props = parseProps(opening.propsString)\n if (children) {\n props.children = children\n }\n\n components.push({\n name: opening.name,\n props,\n line: opening.line,\n })\n\n stack.splice(s, 1)\n break\n }\n }\n }\n continue\n }\n\n // Skip HTML comments: <!-- ... -->\n if (mdx[i] === \"!\" && mdx[i + 1] === \"-\" && mdx[i + 2] === \"-\") {\n const commentEnd = mdx.indexOf(\"-->\", i + 3)\n i = commentEnd !== -1 ? commentEnd + 3 : mdx.length\n continue\n }\n\n // Opening or self-closing tag: <ComponentName ...> or <ComponentName ... />\n const tagMatch = mdx.slice(i).match(/^([A-Z][a-zA-Z0-9]*)([\\s\\S]*?)(\\/)?>/)\n if (!tagMatch) {\n // Not a component tag (lowercase HTML tag or malformed)\n continue\n }\n\n const name = tagMatch[1]\n const attrsPart = tagMatch[2].trim()\n const isSelfClosing = tagMatch[3] === \"/\"\n i += tagMatch[0].length\n\n if (isSelfClosing) {\n components.push({\n name,\n props: parseProps(attrsPart),\n line: getLineNumber(tagStart),\n })\n } else {\n // Opening tag — push to stack\n stack.push({\n name,\n propsString: attrsPart,\n tagStart,\n contentStart: tagStart + 1 + tagMatch[0].length, // after '>'\n line: getLineNumber(tagStart),\n })\n }\n }\n\n return components\n}\n\nfunction parseProps(propsString: string): Record<string, unknown> {\n const props: Record<string, unknown> = {}\n\n // Match prop=\"value\" or prop={value} patterns\n const propPattern = /(\\w+)\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)'|\\{([^}]*)\\})/g\n let match\n\n while ((match = propPattern.exec(propsString)) !== null) {\n const key = match[1]\n const stringValue = match[2] ?? match[3]\n const expressionValue = match[4]\n\n if (stringValue !== undefined) {\n props[key] = stringValue\n } else if (expressionValue !== undefined) {\n // Try to parse simple values\n const trimmed = expressionValue.trim()\n if (trimmed === \"true\") {\n props[key] = true\n } else if (trimmed === \"false\") {\n props[key] = false\n } else if (/^\\d+$/.test(trimmed)) {\n props[key] = parseInt(trimmed, 10)\n } else if (/^\\d+\\.\\d+$/.test(trimmed)) {\n props[key] = parseFloat(trimmed)\n } else if (trimmed.startsWith(\"[\") && trimmed.endsWith(\"]\")) {\n // Try to parse array\n try {\n props[key] = JSON.parse(trimmed.replace(/'/g, '\"'))\n } catch {\n props[key] = trimmed\n }\n } else {\n props[key] = trimmed\n }\n }\n }\n\n // Handle boolean props without value (e.g., <CodeBlock showLineNumbers />)\n const booleanPattern = /(?:^|\\s)(\\w+)(?=\\s|\\/|>|$)/g\n while ((match = booleanPattern.exec(propsString)) !== null) {\n const key = match[1]\n if (!(key in props)) {\n props[key] = true\n }\n }\n\n return props\n}\n\n// ============================================\n// Extract References\n// ============================================\n\nfunction extractReferences(components: ExtractedComponent[]): {\n contentIds: string[]\n assetIds: string[]\n} {\n const contentIds: string[] = []\n const assetIds: string[] = []\n\n for (const component of components) {\n if (component.name === \"BlogCard\" && typeof component.props.contentId === \"string\") {\n contentIds.push(component.props.contentId)\n }\n if (component.name === \"Image\" && typeof component.props.assetId === \"string\") {\n assetIds.push(component.props.assetId)\n }\n if (component.name === \"Gallery\" && Array.isArray(component.props.assetIds)) {\n for (const id of component.props.assetIds) {\n if (typeof id === \"string\") assetIds.push(id)\n }\n }\n }\n\n return {\n contentIds: [...new Set(contentIds)],\n assetIds: [...new Set(assetIds)],\n }\n}\n\n// ============================================\n// Main Validation Function\n// ============================================\n\nexport interface ValidateMdxOptions {\n /** 有効なコンポーネント名の配列。undefined = 全コンポーネント有効 */\n enabledComponents?: string[]\n}\n\nexport async function validateMdx(mdx: string, options?: ValidateMdxOptions): Promise<ValidationResult> {\n const errors: ValidationError[] = []\n const warnings: string[] = []\n\n // 1. Check forbidden patterns (excluding code block content)\n const mdxWithoutCodeBlocks = stripCodeBlocksForPatternCheck(mdx)\n for (const { pattern, message } of FORBIDDEN_PATTERNS) {\n if (pattern.test(mdxWithoutCodeBlocks)) {\n const lines = mdxWithoutCodeBlocks.split(\"\\n\")\n for (let i = 0; i < lines.length; i++) {\n if (pattern.test(lines[i])) {\n errors.push({\n type: \"forbidden\",\n message,\n line: i + 1,\n })\n break\n }\n }\n }\n }\n\n // 2. Try to compile MDX (syntax check)\n // Escape CodeBlock content to prevent JSX expression parsing errors\n const escapedMdx = escapeCodeBlocksForCompile(mdx)\n try {\n await compile(escapedMdx, {\n development: false,\n remarkPlugins: [remarkGfm],\n })\n } catch (error) {\n const err = error as Error & { line?: number; column?: number }\n errors.push({\n type: \"syntax\",\n message: err.message,\n line: err.line,\n column: err.column,\n })\n }\n\n // 3. Extract and validate components (from MDX with CodeBlocks stripped)\n const mdxForComponentExtraction = stripCodeBlocksForPatternCheck(mdx)\n const components = extractComponents(mdxForComponentExtraction)\n\n const enabledSet = options?.enabledComponents ? new Set(options.enabledComponents) : undefined\n\n for (const component of components) {\n // Check if component is in catalog\n if (!isValidComponent(component.name)) {\n errors.push({\n type: \"component\",\n message: `未知のコンポーネント: ${component.name}`,\n line: component.line,\n component: component.name,\n })\n continue\n }\n\n // Check if component is enabled\n if (enabledSet && !enabledSet.has(component.name)) {\n errors.push({\n type: \"component\",\n message: `無効なコンポーネント: ${component.name}(この環境では使用できません)`,\n line: component.line,\n component: component.name,\n })\n continue\n }\n\n // Check child component pairing: standalone child without parent is an error\n const parentName = CHILD_COMPONENT_MAP[component.name as keyof typeof CHILD_COMPONENT_MAP]\n if (parentName) {\n const hasParent = components.some((c) => c.name === parentName)\n if (!hasParent) {\n errors.push({\n type: \"component\",\n message: `${component.name} は ${parentName} の中で使用する必要があります`,\n line: component.line,\n component: component.name,\n })\n }\n }\n\n // Validate props\n const result = validateComponentProps(component.name as ComponentName, component.props)\n if (!result.success) {\n for (const issue of result.error.issues) {\n errors.push({\n type: \"props\",\n message: `${component.name}: ${issue.path.join(\".\")} - ${issue.message}`,\n line: component.line,\n component: component.name,\n })\n }\n }\n }\n\n // 4. Extract references\n const references = extractReferences(components)\n\n return {\n valid: errors.length === 0,\n errors,\n warnings,\n references,\n }\n}\n\n// ============================================\n// Quick Validation (for save)\n// ============================================\n\nexport function quickValidateMdx(mdx: string): {\n valid: boolean\n errors: ValidationError[]\n} {\n const errors: ValidationError[] = []\n\n // Only check forbidden patterns (fast), excluding code block content\n const mdxWithoutCodeBlocks = stripCodeBlocksForPatternCheck(mdx)\n for (const { pattern, message } of FORBIDDEN_PATTERNS) {\n if (pattern.test(mdxWithoutCodeBlocks)) {\n errors.push({\n type: \"forbidden\",\n message,\n })\n }\n }\n\n return {\n valid: errors.length === 0,\n errors,\n }\n}\n","/**\n * CMX SDK — MDX Rendering\n *\n * Server-side MDX compilation and rendering with reference resolution.\n * Provides `renderMdx` as an async function for Server Components.\n */\n\nimport { compile, run } from \"@mdx-js/mdx\"\nimport remarkGfm from \"remark-gfm\"\nimport * as runtime from \"react/jsx-runtime\"\n\nimport {\n BlogCard,\n Image,\n Gallery,\n Callout,\n Embed,\n Button,\n YouTube,\n Twitter,\n Instagram,\n TikTok,\n Bluesky,\n Vimeo,\n Spotify,\n Gist,\n CodePen,\n CodeSandbox,\n GoogleMap,\n Details,\n Tabs,\n Tab,\n Columns,\n Column,\n Audio,\n Video,\n FileDownload,\n TableOfContents,\n markdownComponents,\n} from \"./mdx/components/index.js\"\n\nimport type {\n References,\n ContentReference,\n AssetReference,\n} from \"./generated/sdk/models/index.js\"\n\n// ============================================\n// Types\n// ============================================\n\nexport interface ResolvedReferences {\n contents: Map<string, ContentReference>\n assets: Map<string, AssetReference>\n}\n\nexport interface RenderOptions {\n /** Additional MDX components to make available (e.g. custom components) */\n additionalComponents?: Record<string, React.ComponentType<any>>\n}\n\nexport interface RenderResult {\n content: React.ReactElement\n references: ResolvedReferences\n}\n\n// ============================================\n// Reference Conversion\n// ============================================\n\nfunction convertReferencesToMaps(refs?: References): ResolvedReferences {\n const contentsMap = new Map<string, ContentReference>()\n const assetsMap = new Map<string, AssetReference>()\n\n if (refs?.contents) {\n Object.entries(refs.contents).forEach(([id, content]) => {\n contentsMap.set(id, content)\n })\n }\n\n if (refs?.assets) {\n Object.entries(refs.assets).forEach(([id, asset]) => {\n assetsMap.set(id, asset)\n })\n }\n\n return { contents: contentsMap, assets: assetsMap }\n}\n\n// ============================================\n// Component Factory\n// ============================================\n\nfunction createResolvedComponents(\n references: ResolvedReferences,\n additionalComponents?: Record<string, React.ComponentType<any>>\n) {\n return {\n // Standard markdown elements\n ...markdownComponents,\n\n // Custom components with reference resolution\n BlogCard: (props: { contentId: string }) => {\n const ref = references.contents.get(props.contentId)\n return (\n <BlogCard\n contentId={props.contentId}\n title={ref?.title}\n slug={ref?.slug}\n excerpt={ref?.description || undefined}\n />\n )\n },\n\n Image: (props: { assetId: string; alt?: string; size?: \"thumbnail\" | \"medium\" | \"large\" | \"original\"; caption?: string }) => {\n const asset = references.assets.get(props.assetId)\n const size = props.size || \"large\"\n let url = asset?.url\n\n // Get the appropriate variant URL\n if (asset?.variants && size !== \"original\") {\n url = asset.variants[size] || asset.url\n }\n\n return (\n <Image\n assetId={props.assetId}\n alt={props.alt || asset?.alt || \"\"}\n size={size}\n caption={props.caption}\n url={url}\n width={asset?.width || undefined}\n height={asset?.height || undefined}\n />\n )\n },\n\n // Gallery with reference resolution\n Gallery: (props: { assetIds: string[]; columns?: number; caption?: string }) => {\n const images = props.assetIds.map((id) => {\n const asset = references.assets.get(id)\n return {\n assetId: id,\n url: asset?.url,\n alt: asset?.alt ?? undefined,\n }\n })\n return <Gallery assetIds={props.assetIds} columns={props.columns} caption={props.caption} images={images} />\n },\n\n // Components without resolution\n Callout,\n Embed,\n Button,\n YouTube,\n Twitter,\n Instagram,\n TikTok,\n Bluesky,\n Vimeo,\n Spotify,\n Gist,\n CodePen,\n CodeSandbox,\n GoogleMap,\n Details,\n Tabs,\n Tab,\n Columns,\n Column,\n Audio,\n Video,\n FileDownload,\n TableOfContents,\n\n // User-provided custom components\n ...additionalComponents,\n }\n}\n\n// ============================================\n// MDX Validation\n// ============================================\n\n/**\n * Patterns that indicate potentially dangerous MDX content.\n * These are blocked to prevent arbitrary code execution via MDX injection.\n */\nconst DANGEROUS_PATTERNS = [\n /\\bimport\\s+/, // import statements\n /\\bexport\\s+/, // export statements (except default handled by mdx compiler)\n /\\{.*\\bconstructor\\b/, // constructor access in expressions\n /\\{.*\\b__proto__\\b/, // prototype pollution\n /\\{.*\\bprocess\\b/, // process access\n /\\{.*\\brequire\\s*\\(/, // require() calls\n /\\{.*\\beval\\s*\\(/, // eval() calls\n /\\{.*\\bFunction\\s*\\(/, // Function constructor\n] as const\n\n/**\n * Validate MDX content before compilation.\n * Throws an error if dangerous patterns are detected.\n */\nfunction validateMdx(mdx: string): void {\n for (const pattern of DANGEROUS_PATTERNS) {\n if (pattern.test(mdx)) {\n throw new Error(\n `MDX validation failed: potentially unsafe content detected (${pattern.source}). ` +\n \"MDX content must not contain import/export statements or dynamic code execution.\"\n )\n }\n }\n}\n\n// ============================================\n// MDX Renderer\n// ============================================\n\n/**\n * Render MDX content with pre-resolved references from CMX API.\n *\n * @param mdx - Raw MDX string\n * @param references - References object from the API response (contents & assets)\n * @param options - Additional options (e.g. custom components)\n * @returns Rendered content and resolved references\n *\n * @example\n * ```tsx\n * const { content } = await renderMdx(post.mdx, post.references)\n * return <article>{content}</article>\n * ```\n *\n * @example With custom components\n * ```tsx\n * import { FeatureCard } from '@/components/custom'\n * const { content } = await renderMdx(post.mdx, post.references, {\n * additionalComponents: { FeatureCard }\n * })\n * ```\n */\nexport async function renderMdx(\n mdx: string,\n references?: References,\n options?: RenderOptions\n): Promise<RenderResult> {\n validateMdx(mdx)\n\n const resolvedReferences = convertReferencesToMaps(references)\n const components = createResolvedComponents(resolvedReferences, options?.additionalComponents)\n\n const code = await compile(mdx, {\n outputFormat: \"function-body\",\n development: false,\n remarkPlugins: [remarkGfm],\n })\n\n const { default: MDXContent } = await run(String(code), {\n ...runtime,\n baseUrl: import.meta.url,\n })\n\n const content = <MDXContent components={components} />\n\n return {\n content,\n references: resolvedReferences,\n }\n}\n\n/**\n * Render MDX content without reference resolution (for preview in editor).\n *\n * @param mdx - Raw MDX string\n * @param additionalComponents - Optional custom components\n * @returns Rendered React element\n */\nexport async function renderMdxPreview(\n mdx: string,\n additionalComponents?: Record<string, React.ComponentType<any>>\n): Promise<React.ReactElement> {\n const components = {\n ...markdownComponents,\n BlogCard,\n Image,\n Gallery,\n Callout,\n Embed,\n Button,\n YouTube,\n Twitter,\n Instagram,\n TikTok,\n Bluesky,\n Vimeo,\n Spotify,\n Gist,\n CodePen,\n CodeSandbox,\n GoogleMap,\n Details,\n Tabs,\n Tab,\n Columns,\n Column,\n Audio,\n Video,\n FileDownload,\n TableOfContents,\n ...additionalComponents,\n }\n\n try {\n validateMdx(mdx)\n\n const code = await compile(mdx, {\n outputFormat: \"function-body\",\n development: false,\n remarkPlugins: [remarkGfm],\n })\n\n const { default: MDXContent } = await run(String(code), {\n ...runtime,\n baseUrl: import.meta.url,\n })\n\n return <MDXContent components={components} />\n } catch (error) {\n console.error(\"MDX render error:\", error)\n return (\n <div className=\"p-4 bg-red-50 border border-red-200 rounded-lg\">\n <p className=\"text-red-600 font-medium\">MDX Render Error</p>\n <pre className=\"mt-2 text-sm text-red-500 whitespace-pre-wrap\">\n {error instanceof Error ? error.message : \"Unknown error\"}\n </pre>\n </div>\n )\n }\n}\n"],"mappings":";AAgDO,IAAM,cAAN,cAA0B,MAAM;AAAA,EACrC,YACE,SACgB,QACA,MAChB;AACA,UAAM,OAAO;AAHG;AACA;AAGhB,SAAK,OAAO;AAAA,EACd;AAAA,EAEA,IAAI,aAAsB;AACxB,WAAO,KAAK,WAAW;AAAA,EACzB;AAAA,EAEA,IAAI,iB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A,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL;AAEA,MAAI;AACF,IAAAE,aAAY,GAAG;AAEf,UAAM,OAAO,MAAMC,SAAQ,KAAK;AAAA,MAC9B,cAAc;AAAA,MACd,aAAa;AAAA,MACb,eAAe,CAACC,UAAS;AAAA,IAC3B,CAAC;AAED,UAAM,EAAE,SAAS,WAAW,IAAI,MAAM,IAAI,OAAO,IAAI,GAAG;AAAA,MACtD,GAAG;AAAA,MACH,SAAS,YAAY;AAAA,IACvB,CAAC;AAED,WAAO,gBAAAJ,MAAC,cAAW,YAAwB;AAAA,EAC7C,SAAS,OAAO;AACd,YAAQ,MAAM,qBAAqB,KAAK;AACxC,WACE,gBAAAC,OAAC,SAAI,WAAU,kDACb;AAAA,sBAAAD,MAAC,OAAE,WAAU,4BAA2B,8BAAgB;AAAA,MACxD,gBAAAA,MAAC,SAAI,WAAU,iDACZ,2BAAiB,QAAQ,MAAM,UAAU,iBAC5C;AAAA,OACF;AAAA,EAEJ;AACF;","names":["jsx","jsx","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsx","jsxs","jsx","jsxs","jsx","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","Link","jsx","jsxs","jsx","jsxs","jsx","jsxs","gridClasses","jsx","compile","remarkGfm","jsx","jsxs","validateMdx","compile","remarkGfm"]}
1
+ {"version":3,"sources":["../src/core/types.ts","../src/core/sdk-fetcher.ts","../src/core/cache-tags.ts","../src/core/date-reviver.ts","../src/generated/sdk/endpoints/sdk.ts","../src/api.ts","../src/mdx/components/basic/Callout.tsx","../src/mdx/components/basic/Button.tsx","../src/mdx/components/basic/Embed.tsx","../src/mdx/components/basic/YouTube.tsx","../src/mdx/components/basic/Twitter.tsx","../src/mdx/components/basic/Instagram.tsx","../src/mdx/components/basic/TikTok.tsx","../src/mdx/components/basic/Bluesky.tsx","../src/mdx/components/basic/Vimeo.tsx","../src/mdx/components/basic/Spotify.tsx","../src/mdx/components/basic/Gist.tsx","../src/mdx/components/basic/CodePen.tsx","../src/mdx/components/basic/CodeSandbox.tsx","../src/mdx/components/basic/GoogleMap.tsx","../src/mdx/components/basic/Details.tsx","../src/mdx/components/basic/Tabs.tsx","../src/mdx/components/basic/Columns.tsx","../src/mdx/components/basic/Audio.tsx","../src/mdx/components/basic/Video.tsx","../src/mdx/components/basic/FileDownload.tsx","../src/mdx/components/basic/TableOfContents.tsx","../src/mdx/components/basic/index.ts","../src/mdx/components/custom/BlogCard.tsx","../src/mdx/components/custom/Image.tsx","../src/mdx/components/custom/Gallery.tsx","../src/mdx/components/custom/index.ts","../src/mdx/components/markdown/index.tsx","../src/mdx/components/index.ts","../src/mdx/component-catalog.ts","../src/mdx/validator.ts","../src/render.tsx"],"sourcesContent":["/**\n * API共通型定義\n */\n\n/**\n * APIレスポンスの共通型(Admin API用)\n */\nexport interface ApiResponse<T> {\n data: T | null\n error: string | null\n status: number\n}\n\n/**\n * Admin fetcherオプション\n */\nexport interface AdminFetcherOptions {\n /** 401エラー時の自動リダイレクトを無効化 */\n disableAutoSignOut?: boolean\n /** 401エラー時のリダイレクト先URL */\n signOutCallbackUrl?: string\n /** ワークスペースSlug(未指定ならURLから推測) */\n workspaceSlug?: string\n}\n\n/**\n * Public fetcherオプション\n */\nexport interface PublicFetcherOptions {\n /** 認証トークン */\n token: string\n /** Next.js cache tags */\n tags?: string[]\n /** キャッシュ設定 */\n revalidate?: number | false\n}\n\n/**\n * 認証エラーコード\n */\nexport const AUTH_ERROR_CODES = [\"AUTH_REQUIRED\", \"USER_DELETED\"] as const\nexport type AuthErrorCode = (typeof AUTH_ERROR_CODES)[number]\n\n/**\n * SDK APIエラー\n * HTTPステータスコードとAPIエラーコードを保持し、\n * 404/401/403/500等の区別を可能にする\n */\nexport class CmxApiError extends Error {\n constructor(\n message: string,\n public readonly status: number,\n public readonly code?: string,\n ) {\n super(message)\n this.name = \"CmxApiError\"\n }\n\n get isNotFound(): boolean {\n return this.status === 404\n }\n\n get isUnauthorized(): boolean {\n return this.status === 401\n }\n\n get isForbidden(): boolean {\n return this.status === 403\n }\n\n get isServerError(): boolean {\n return this.status >= 500\n }\n}\n","/**\n * SDK API用カスタムfetcher\n * サーバーサイドからSDK APIを呼び出すためのfetcher\n * - Authorization: Bearer ヘッダー付与\n * - Next.js cache tags対応\n */\n\nimport type { PublicFetcherOptions } from \"./types\"\nimport { CmxApiError } from \"./types\"\n\ninterface SdkErrorPayload {\n error?: unknown\n message?: unknown\n details?: unknown\n code?: unknown\n}\n\n// Next.js拡張のRequestInit型\ninterface NextFetchRequestInit extends RequestInit {\n next?: {\n tags?: string[]\n revalidate?: number | false\n }\n}\n\nconst DEFAULT_API_URL = \"https://app.cmx-ai.org\"\n\nfunction stringifyErrorValue(value: unknown): string {\n if (typeof value === \"string\") return value\n if (value === null || value === undefined) return \"\"\n\n if (typeof value === \"object\") {\n const objectValue = value as { message?: unknown }\n if (typeof objectValue.message === \"string\" && objectValue.message.length > 0) {\n return objectValue.message\n }\n try {\n return JSON.stringify(value)\n } catch {\n return String(value)\n }\n }\n\n return String(value)\n}\n\nfunction parseSdkErrorBody(body: string, status: number): { message: string; code?: string } {\n const fallbackMessage = `API error: ${status}`\n if (!body) {\n return { message: fallbackMessage }\n }\n\n try {\n const parsed = JSON.parse(body) as SdkErrorPayload\n const main = stringifyErrorValue(parsed.error ?? parsed.message)\n const details = stringifyErrorValue(parsed.details)\n const code = typeof parsed.code === \"string\" ? parsed.code : undefined\n\n const message = [main, details]\n .filter((part, index, parts) => part.length > 0 && parts.indexOf(part) === index)\n .join(\" | \")\n\n return {\n message: message || fallbackMessage,\n code,\n }\n } catch {\n return { message: body }\n }\n}\n\nasync function toCmxApiError(response: Response): Promise<CmxApiError> {\n const body = await response.text()\n const { message, code } = parseSdkErrorBody(body, response.status)\n return new CmxApiError(message, response.status, code)\n}\n\n/**\n * SDK APIのベースURL取得\n */\nexport function getSdkApiBaseUrl(): string {\n const apiUrl = process.env.CMX_API_URL || DEFAULT_API_URL\n return `${apiUrl}/api/v1/sdk`\n}\n\n/**\n * 環境変数からSDK APIトークン取得\n */\nexport function getSdkApiToken(): string {\n const token = process.env.CMX_API_KEY\n if (!token) {\n throw new Error(\"CMX_API_KEY environment variable is not set\")\n }\n return token\n}\n\n/**\n * SDK API用のカスタムfetcher\n * サーバーサイドでのみ使用(SSR/RSC)\n */\nexport async function sdkFetcher<T>(\n path: string,\n options: PublicFetcherOptions\n): Promise<T> {\n const { token, tags, revalidate } = options\n const baseUrl = getSdkApiBaseUrl()\n const url = `${baseUrl}${path}`\n\n const fetchOptions: NextFetchRequestInit = {\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${token}`,\n },\n next: {\n tags: tags || [],\n ...(revalidate !== undefined && { revalidate }),\n },\n }\n\n const response = await fetch(url, fetchOptions as RequestInit)\n\n if (!response.ok) {\n throw await toCmxApiError(response)\n }\n\n return response.json()\n}\n\n/**\n * Orval用のカスタムインスタンス\n * OrvalはURLとRequestInitを直接渡す形式で呼び出す\n */\nexport async function sdkCustomInstance<T>(\n url: string,\n options?: RequestInit\n): Promise<T> {\n const token = getSdkApiToken()\n const baseUrl = getSdkApiBaseUrl()\n const fullUrl = url.startsWith(\"http\") ? url : `${baseUrl}${url}`\n\n const response = await fetch(fullUrl, {\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${token}`,\n ...options?.headers,\n },\n })\n\n if (!response.ok) {\n throw await toCmxApiError(response)\n }\n\n return response.json()\n}\n\n/**\n * キャッシュタグ付きのSDK APIリクエスト用ラッパー\n * Next.js ISR/on-demand revalidation対応\n */\nexport async function sdkFetchWithTags<T>(\n path: string,\n tags?: string[],\n revalidate?: number | false\n): Promise<T> {\n const token = getSdkApiToken()\n const baseUrl = getSdkApiBaseUrl()\n const url = `${baseUrl}${path}`\n\n const fetchOptions: NextFetchRequestInit = {\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${token}`,\n },\n next: {\n tags: tags || [],\n ...(revalidate !== undefined && { revalidate }),\n },\n }\n\n const response = await fetch(url, fetchOptions as RequestInit)\n\n if (!response.ok) {\n throw await toCmxApiError(response)\n }\n\n return response.json()\n}\n\n/**\n * SDK API用のPOSTリクエストfetcher\n * サーバーサイド(Server Action等)から使用\n */\nexport async function sdkPostFetcher<T>(\n path: string,\n body: unknown\n): Promise<T> {\n const token = getSdkApiToken()\n const baseUrl = getSdkApiBaseUrl()\n const url = `${baseUrl}${path}`\n\n const response = await fetch(url, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${token}`,\n },\n body: JSON.stringify(body),\n cache: \"no-store\",\n })\n\n if (!response.ok) {\n throw await toCmxApiError(response)\n }\n\n return response.json()\n}\n","/**\n * キャッシュタグ定義\n * Next.js ISR/on-demand revalidation用\n */\n\nexport const CACHE_TAGS = {\n /** 全コレクション共通 */\n collections: \"collections\",\n /** 特定コレクション */\n collection: (slug: string) => `collection:${slug}`,\n /** 特定コンテンツ */\n content: (collectionSlug: string, contentSlug: string) =>\n `content:${collectionSlug}:${contentSlug}`,\n /** 全データタイプ共通 */\n data: \"data\",\n /** 特定データタイプ */\n dataType: (slug: string) => `data:${slug}`,\n} as const\n","/**\n * JSON reviver for automatic date parsing\n * Converts ISO date strings to JavaScript Date objects\n */\nconst isoDateFormat = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}/\n\nexport function dateReviver(_key: string, value: unknown): unknown {\n if (typeof value === \"string\" && isoDateFormat.test(value)) {\n return new Date(value)\n }\n return value\n}\n","/**\n * Generated by orval v8.4.0 🍺\n * Do not edit manually.\n * CMX SDK API\n * CMX SDK API(コンテンツ配信+管理)\n * OpenAPI spec version: 1.0.0\n */\nimport type {\n CollectionContentDetailResponse,\n CollectionContentsResponse,\n CollectionListResponse,\n CollectionResponse,\n CreateCollectionRequest,\n CreateContentRequest,\n CreateDataTypeRequest,\n CreateFormDefinitionRequest,\n CreateSocialPostRequest,\n DataEntryDetailResponse,\n DataListResponse,\n DataTypeResponse,\n DeleteManageContentsIdParams,\n DeleteManageDataTypeSlugIdParams,\n ErrorResponse,\n FormDefinitionResponse,\n GetAnalyticsDailyParams,\n GetCollectionsSlugContentsParams,\n GetDataTypeSlugParams,\n GetManageCollectionPresets200,\n GetManageCollectionPresetsParams,\n GetManageContentsIdParams,\n GetManageContentsParams,\n GetManageDataTypeSlugIdParams,\n GetManageDataTypeSlugParams,\n GetManageSocialPostsParams,\n GetPreviewToken200,\n PublicSubmissionRequest,\n PublicSubmissionResponse,\n ReferenceField,\n SchemaResponse,\n SdkAddCollectionDataTypeRequest,\n SdkAnalyticsDailyListResponse,\n SdkBugReportResponse,\n SdkCollectionDataTypeResponse,\n SdkComponentSuccessResponse,\n SdkComponentSyncRequest,\n SdkContentDetail,\n SdkContentListResponse,\n SdkContentReferencesResponse,\n SdkCreateBugReportBody,\n SdkCreateContentResponse,\n SdkCreateEntryRequest,\n SdkCustomComponentsListResponse,\n SdkDataEntriesListResponse,\n SdkDataEntryDeletionImpactResponse,\n SdkDataEntryDetailResponse,\n SdkDataEntryResponse,\n SdkDeleteCollectionDataTypeResponse,\n SdkDeleteCollectionResponse,\n SdkDeleteContentResponse,\n SdkDeleteDataEntryResponse,\n SdkDeleteDataTypeResponse,\n SdkDeleteFormDefinitionResponse,\n SdkDeleteSocialPostResponse,\n SdkDocResponse,\n SdkDocType,\n SdkLinkExistingDataTypeRequest,\n SdkPublishContentResponse,\n SdkRequestReviewResponse,\n SdkRuntimeSettingsResponse,\n SdkSetContentReferencesRequest,\n SdkSetContentReferencesResponse,\n SdkUpdateContentResponse,\n SdkUpdateEntryRequest,\n SdkUpsertDocBody,\n SdkValidateContentResponse,\n SocialAccountListResponse,\n SocialPostListResponse,\n SocialPostResponse,\n UpdateCollectionRequest,\n UpdateContentRequest,\n UpdateDataTypeRequest,\n UpdateFormDefinitionRequest,\n UpdateSocialPostRequest\n} from '../models';\n\nimport { dateReviver } from '../../../core/date-reviver';\n\n/**\n * @summary コレクションの公開済みコンテンツ一覧を取得\n */\nexport type getCollectionsSlugContentsResponse200 = {\n data: CollectionContentsResponse\n status: 200\n}\n\nexport type getCollectionsSlugContentsResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type getCollectionsSlugContentsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getCollectionsSlugContentsResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getCollectionsSlugContentsResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getCollectionsSlugContentsResponseSuccess = (getCollectionsSlugContentsResponse200) & {\n headers: Headers;\n};\nexport type getCollectionsSlugContentsResponseError = (getCollectionsSlugContentsResponse400 | getCollectionsSlugContentsResponse401 | getCollectionsSlugContentsResponse404 | getCollectionsSlugContentsResponse500) & {\n headers: Headers;\n};\n\nexport type getCollectionsSlugContentsResponse = (getCollectionsSlugContentsResponseSuccess | getCollectionsSlugContentsResponseError)\n\nexport const getGetCollectionsSlugContentsUrl = (slug: string,\n params?: GetCollectionsSlugContentsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/api/v1/sdk/collections/${slug}/contents?${stringifiedParams}` : `/api/v1/sdk/collections/${slug}/contents`\n}\n\nexport const getCollectionsSlugContents = async (slug: string,\n params?: GetCollectionsSlugContentsParams, options?: RequestInit): Promise<getCollectionsSlugContentsResponse> => {\n \n const res = await fetch(getGetCollectionsSlugContentsUrl(slug,params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getCollectionsSlugContentsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getCollectionsSlugContentsResponse\n}\n\n\n\n/**\n * @summary コレクションの公開済みコンテンツ詳細を取得(参照解決済み)\n */\nexport type getCollectionsSlugContentsContentSlugResponse200 = {\n data: CollectionContentDetailResponse\n status: 200\n}\n\nexport type getCollectionsSlugContentsContentSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getCollectionsSlugContentsContentSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getCollectionsSlugContentsContentSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getCollectionsSlugContentsContentSlugResponseSuccess = (getCollectionsSlugContentsContentSlugResponse200) & {\n headers: Headers;\n};\nexport type getCollectionsSlugContentsContentSlugResponseError = (getCollectionsSlugContentsContentSlugResponse401 | getCollectionsSlugContentsContentSlugResponse404 | getCollectionsSlugContentsContentSlugResponse500) & {\n headers: Headers;\n};\n\nexport type getCollectionsSlugContentsContentSlugResponse = (getCollectionsSlugContentsContentSlugResponseSuccess | getCollectionsSlugContentsContentSlugResponseError)\n\nexport const getGetCollectionsSlugContentsContentSlugUrl = (slug: string,\n contentSlug: string,) => {\n\n\n \n\n return `/api/v1/sdk/collections/${slug}/contents/${contentSlug}`\n}\n\nexport const getCollectionsSlugContentsContentSlug = async (slug: string,\n contentSlug: string, options?: RequestInit): Promise<getCollectionsSlugContentsContentSlugResponse> => {\n \n const res = await fetch(getGetCollectionsSlugContentsContentSlugUrl(slug,contentSlug),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getCollectionsSlugContentsContentSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getCollectionsSlugContentsContentSlugResponse\n}\n\n\n\n/**\n * @summary データタイプのエントリ一覧を取得\n */\nexport type getDataTypeSlugResponse200 = {\n data: DataListResponse\n status: 200\n}\n\nexport type getDataTypeSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getDataTypeSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getDataTypeSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getDataTypeSlugResponseSuccess = (getDataTypeSlugResponse200) & {\n headers: Headers;\n};\nexport type getDataTypeSlugResponseError = (getDataTypeSlugResponse401 | getDataTypeSlugResponse404 | getDataTypeSlugResponse500) & {\n headers: Headers;\n};\n\nexport type getDataTypeSlugResponse = (getDataTypeSlugResponseSuccess | getDataTypeSlugResponseError)\n\nexport const getGetDataTypeSlugUrl = (typeSlug: string,\n params?: GetDataTypeSlugParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/api/v1/sdk/data/${typeSlug}?${stringifiedParams}` : `/api/v1/sdk/data/${typeSlug}`\n}\n\nexport const getDataTypeSlug = async (typeSlug: string,\n params?: GetDataTypeSlugParams, options?: RequestInit): Promise<getDataTypeSlugResponse> => {\n \n const res = await fetch(getGetDataTypeSlugUrl(typeSlug,params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getDataTypeSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getDataTypeSlugResponse\n}\n\n\n\n/**\n * @summary データエントリの詳細を取得\n */\nexport type getDataTypeSlugIdResponse200 = {\n data: DataEntryDetailResponse\n status: 200\n}\n\nexport type getDataTypeSlugIdResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getDataTypeSlugIdResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getDataTypeSlugIdResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getDataTypeSlugIdResponseSuccess = (getDataTypeSlugIdResponse200) & {\n headers: Headers;\n};\nexport type getDataTypeSlugIdResponseError = (getDataTypeSlugIdResponse401 | getDataTypeSlugIdResponse404 | getDataTypeSlugIdResponse500) & {\n headers: Headers;\n};\n\nexport type getDataTypeSlugIdResponse = (getDataTypeSlugIdResponseSuccess | getDataTypeSlugIdResponseError)\n\nexport const getGetDataTypeSlugIdUrl = (typeSlug: string,\n id: string,) => {\n\n\n \n\n return `/api/v1/sdk/data/${typeSlug}/${id}`\n}\n\nexport const getDataTypeSlugId = async (typeSlug: string,\n id: string, options?: RequestInit): Promise<getDataTypeSlugIdResponse> => {\n \n const res = await fetch(getGetDataTypeSlugIdUrl(typeSlug,id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getDataTypeSlugIdResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getDataTypeSlugIdResponse\n}\n\n\n\n/**\n * @summary プレビュートークンで記事を取得(認証不要)\n */\nexport type getPreviewTokenResponse200 = {\n data: GetPreviewToken200\n status: 200\n}\n\nexport type getPreviewTokenResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getPreviewTokenResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getPreviewTokenResponseSuccess = (getPreviewTokenResponse200) & {\n headers: Headers;\n};\nexport type getPreviewTokenResponseError = (getPreviewTokenResponse404 | getPreviewTokenResponse500) & {\n headers: Headers;\n};\n\nexport type getPreviewTokenResponse = (getPreviewTokenResponseSuccess | getPreviewTokenResponseError)\n\nexport const getGetPreviewTokenUrl = (token: string,) => {\n\n\n \n\n return `/api/v1/sdk/preview/${token}`\n}\n\nexport const getPreviewToken = async (token: string, options?: RequestInit): Promise<getPreviewTokenResponse> => {\n \n const res = await fetch(getGetPreviewTokenUrl(token),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getPreviewTokenResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getPreviewTokenResponse\n}\n\n\n\n/**\n * @summary ワークスペースのスキーマ情報を取得(データタイプ・コレクション)\n */\nexport type getSchemaResponse200 = {\n data: SchemaResponse\n status: 200\n}\n\nexport type getSchemaResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getSchemaResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getSchemaResponseSuccess = (getSchemaResponse200) & {\n headers: Headers;\n};\nexport type getSchemaResponseError = (getSchemaResponse401 | getSchemaResponse500) & {\n headers: Headers;\n};\n\nexport type getSchemaResponse = (getSchemaResponseSuccess | getSchemaResponseError)\n\nexport const getGetSchemaUrl = () => {\n\n\n \n\n return `/api/v1/sdk/schema`\n}\n\nexport const getSchema = async ( options?: RequestInit): Promise<getSchemaResponse> => {\n \n const res = await fetch(getGetSchemaUrl(),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getSchemaResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getSchemaResponse\n}\n\n\n\n/**\n * enabledが有効なフォーム定義にデータを送信します。送信データはpendingステータスで保存されます。\n * @summary 公開フォームからデータを送信\n */\nexport type postSubmissionsTypeSlugResponse200 = {\n data: PublicSubmissionResponse\n status: 200\n}\n\nexport type postSubmissionsTypeSlugResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postSubmissionsTypeSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postSubmissionsTypeSlugResponse403 = {\n data: ErrorResponse\n status: 403\n}\n\nexport type postSubmissionsTypeSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type postSubmissionsTypeSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postSubmissionsTypeSlugResponseSuccess = (postSubmissionsTypeSlugResponse200) & {\n headers: Headers;\n};\nexport type postSubmissionsTypeSlugResponseError = (postSubmissionsTypeSlugResponse400 | postSubmissionsTypeSlugResponse401 | postSubmissionsTypeSlugResponse403 | postSubmissionsTypeSlugResponse404 | postSubmissionsTypeSlugResponse500) & {\n headers: Headers;\n};\n\nexport type postSubmissionsTypeSlugResponse = (postSubmissionsTypeSlugResponseSuccess | postSubmissionsTypeSlugResponseError)\n\nexport const getPostSubmissionsTypeSlugUrl = (typeSlug: string,) => {\n\n\n \n\n return `/api/v1/sdk/submissions/${typeSlug}`\n}\n\nexport const postSubmissionsTypeSlug = async (typeSlug: string,\n publicSubmissionRequest: PublicSubmissionRequest, options?: RequestInit): Promise<postSubmissionsTypeSlugResponse> => {\n \n const res = await fetch(getPostSubmissionsTypeSlugUrl(typeSlug),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n publicSubmissionRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postSubmissionsTypeSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postSubmissionsTypeSlugResponse\n}\n\n\n\n/**\n * @summary スターターキット用 Runtime Settings を取得\n */\nexport type getRuntimeSettingsResponse200 = {\n data: SdkRuntimeSettingsResponse\n status: 200\n}\n\nexport type getRuntimeSettingsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getRuntimeSettingsResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getRuntimeSettingsResponseSuccess = (getRuntimeSettingsResponse200) & {\n headers: Headers;\n};\nexport type getRuntimeSettingsResponseError = (getRuntimeSettingsResponse401 | getRuntimeSettingsResponse404) & {\n headers: Headers;\n};\n\nexport type getRuntimeSettingsResponse = (getRuntimeSettingsResponseSuccess | getRuntimeSettingsResponseError)\n\nexport const getGetRuntimeSettingsUrl = () => {\n\n\n \n\n return `/api/v1/sdk/runtime/settings`\n}\n\nexport const getRuntimeSettings = async ( options?: RequestInit): Promise<getRuntimeSettingsResponse> => {\n \n const res = await fetch(getGetRuntimeSettingsUrl(),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getRuntimeSettingsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getRuntimeSettingsResponse\n}\n\n\n\n/**\n * @summary 日次アナリティクスメトリクスを取得\n */\nexport type getAnalyticsDailyResponse200 = {\n data: SdkAnalyticsDailyListResponse\n status: 200\n}\n\nexport type getAnalyticsDailyResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getAnalyticsDailyResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getAnalyticsDailyResponseSuccess = (getAnalyticsDailyResponse200) & {\n headers: Headers;\n};\nexport type getAnalyticsDailyResponseError = (getAnalyticsDailyResponse401 | getAnalyticsDailyResponse500) & {\n headers: Headers;\n};\n\nexport type getAnalyticsDailyResponse = (getAnalyticsDailyResponseSuccess | getAnalyticsDailyResponseError)\n\nexport const getGetAnalyticsDailyUrl = (params?: GetAnalyticsDailyParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/api/v1/sdk/analytics/daily?${stringifiedParams}` : `/api/v1/sdk/analytics/daily`\n}\n\nexport const getAnalyticsDaily = async (params?: GetAnalyticsDailyParams, options?: RequestInit): Promise<getAnalyticsDailyResponse> => {\n \n const res = await fetch(getGetAnalyticsDailyUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getAnalyticsDailyResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getAnalyticsDailyResponse\n}\n\n\n\n/**\n * @summary コレクション一覧を取得\n */\nexport type getManageCollectionsResponse200 = {\n data: CollectionListResponse\n status: 200\n}\n\nexport type getManageCollectionsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageCollectionsResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageCollectionsResponseSuccess = (getManageCollectionsResponse200) & {\n headers: Headers;\n};\nexport type getManageCollectionsResponseError = (getManageCollectionsResponse401 | getManageCollectionsResponse500) & {\n headers: Headers;\n};\n\nexport type getManageCollectionsResponse = (getManageCollectionsResponseSuccess | getManageCollectionsResponseError)\n\nexport const getGetManageCollectionsUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/collections`\n}\n\nexport const getManageCollections = async ( options?: RequestInit): Promise<getManageCollectionsResponse> => {\n \n const res = await fetch(getGetManageCollectionsUrl(),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageCollectionsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageCollectionsResponse\n}\n\n\n\n/**\n * @summary コレクションを作成\n */\nexport type postManageCollectionsResponse201 = {\n data: CollectionResponse\n status: 201\n}\n\nexport type postManageCollectionsResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postManageCollectionsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageCollectionsResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type postManageCollectionsResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageCollectionsResponseSuccess = (postManageCollectionsResponse201) & {\n headers: Headers;\n};\nexport type postManageCollectionsResponseError = (postManageCollectionsResponse400 | postManageCollectionsResponse401 | postManageCollectionsResponse409 | postManageCollectionsResponse500) & {\n headers: Headers;\n};\n\nexport type postManageCollectionsResponse = (postManageCollectionsResponseSuccess | postManageCollectionsResponseError)\n\nexport const getPostManageCollectionsUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/collections`\n}\n\nexport const postManageCollections = async (createCollectionRequest: CreateCollectionRequest, options?: RequestInit): Promise<postManageCollectionsResponse> => {\n \n const res = await fetch(getPostManageCollectionsUrl(),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n createCollectionRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageCollectionsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageCollectionsResponse\n}\n\n\n\n/**\n * @summary コレクションを取得\n */\nexport type getManageCollectionsSlugResponse200 = {\n data: CollectionResponse\n status: 200\n}\n\nexport type getManageCollectionsSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageCollectionsSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageCollectionsSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageCollectionsSlugResponseSuccess = (getManageCollectionsSlugResponse200) & {\n headers: Headers;\n};\nexport type getManageCollectionsSlugResponseError = (getManageCollectionsSlugResponse401 | getManageCollectionsSlugResponse404 | getManageCollectionsSlugResponse500) & {\n headers: Headers;\n};\n\nexport type getManageCollectionsSlugResponse = (getManageCollectionsSlugResponseSuccess | getManageCollectionsSlugResponseError)\n\nexport const getGetManageCollectionsSlugUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/collections/${slug}`\n}\n\nexport const getManageCollectionsSlug = async (slug: string, options?: RequestInit): Promise<getManageCollectionsSlugResponse> => {\n \n const res = await fetch(getGetManageCollectionsSlugUrl(slug),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageCollectionsSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageCollectionsSlugResponse\n}\n\n\n\n/**\n * @summary コレクションを更新\n */\nexport type putManageCollectionsSlugResponse200 = {\n data: CollectionResponse\n status: 200\n}\n\nexport type putManageCollectionsSlugResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type putManageCollectionsSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type putManageCollectionsSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type putManageCollectionsSlugResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type putManageCollectionsSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type putManageCollectionsSlugResponseSuccess = (putManageCollectionsSlugResponse200) & {\n headers: Headers;\n};\nexport type putManageCollectionsSlugResponseError = (putManageCollectionsSlugResponse400 | putManageCollectionsSlugResponse401 | putManageCollectionsSlugResponse404 | putManageCollectionsSlugResponse409 | putManageCollectionsSlugResponse500) & {\n headers: Headers;\n};\n\nexport type putManageCollectionsSlugResponse = (putManageCollectionsSlugResponseSuccess | putManageCollectionsSlugResponseError)\n\nexport const getPutManageCollectionsSlugUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/collections/${slug}`\n}\n\nexport const putManageCollectionsSlug = async (slug: string,\n updateCollectionRequest: UpdateCollectionRequest, options?: RequestInit): Promise<putManageCollectionsSlugResponse> => {\n \n const res = await fetch(getPutManageCollectionsSlugUrl(slug),\n { \n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n updateCollectionRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: putManageCollectionsSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as putManageCollectionsSlugResponse\n}\n\n\n\n/**\n * @summary コレクションを削除\n */\nexport type deleteManageCollectionsSlugResponse200 = {\n data: SdkDeleteCollectionResponse\n status: 200\n}\n\nexport type deleteManageCollectionsSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type deleteManageCollectionsSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type deleteManageCollectionsSlugResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type deleteManageCollectionsSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type deleteManageCollectionsSlugResponseSuccess = (deleteManageCollectionsSlugResponse200) & {\n headers: Headers;\n};\nexport type deleteManageCollectionsSlugResponseError = (deleteManageCollectionsSlugResponse401 | deleteManageCollectionsSlugResponse404 | deleteManageCollectionsSlugResponse409 | deleteManageCollectionsSlugResponse500) & {\n headers: Headers;\n};\n\nexport type deleteManageCollectionsSlugResponse = (deleteManageCollectionsSlugResponseSuccess | deleteManageCollectionsSlugResponseError)\n\nexport const getDeleteManageCollectionsSlugUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/collections/${slug}`\n}\n\nexport const deleteManageCollectionsSlug = async (slug: string, options?: RequestInit): Promise<deleteManageCollectionsSlugResponse> => {\n \n const res = await fetch(getDeleteManageCollectionsSlugUrl(slug),\n { \n ...options,\n method: 'DELETE'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: deleteManageCollectionsSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as deleteManageCollectionsSlugResponse\n}\n\n\n\n/**\n * @summary データタイプ一覧を取得\n */\nexport type getManageDataTypesResponse200 = {\n data: DataTypeResponse[]\n status: 200\n}\n\nexport type getManageDataTypesResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageDataTypesResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageDataTypesResponseSuccess = (getManageDataTypesResponse200) & {\n headers: Headers;\n};\nexport type getManageDataTypesResponseError = (getManageDataTypesResponse401 | getManageDataTypesResponse500) & {\n headers: Headers;\n};\n\nexport type getManageDataTypesResponse = (getManageDataTypesResponseSuccess | getManageDataTypesResponseError)\n\nexport const getGetManageDataTypesUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/data-types`\n}\n\nexport const getManageDataTypes = async ( options?: RequestInit): Promise<getManageDataTypesResponse> => {\n \n const res = await fetch(getGetManageDataTypesUrl(),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageDataTypesResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageDataTypesResponse\n}\n\n\n\n/**\n * @summary データタイプを作成\n */\nexport type postManageDataTypesResponse201 = {\n data: DataTypeResponse\n status: 201\n}\n\nexport type postManageDataTypesResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postManageDataTypesResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageDataTypesResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type postManageDataTypesResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageDataTypesResponseSuccess = (postManageDataTypesResponse201) & {\n headers: Headers;\n};\nexport type postManageDataTypesResponseError = (postManageDataTypesResponse400 | postManageDataTypesResponse401 | postManageDataTypesResponse409 | postManageDataTypesResponse500) & {\n headers: Headers;\n};\n\nexport type postManageDataTypesResponse = (postManageDataTypesResponseSuccess | postManageDataTypesResponseError)\n\nexport const getPostManageDataTypesUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/data-types`\n}\n\nexport const postManageDataTypes = async (createDataTypeRequest: CreateDataTypeRequest, options?: RequestInit): Promise<postManageDataTypesResponse> => {\n \n const res = await fetch(getPostManageDataTypesUrl(),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n createDataTypeRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageDataTypesResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageDataTypesResponse\n}\n\n\n\n/**\n * @summary データタイプを取得\n */\nexport type getManageDataTypesSlugResponse200 = {\n data: DataTypeResponse\n status: 200\n}\n\nexport type getManageDataTypesSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageDataTypesSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageDataTypesSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageDataTypesSlugResponseSuccess = (getManageDataTypesSlugResponse200) & {\n headers: Headers;\n};\nexport type getManageDataTypesSlugResponseError = (getManageDataTypesSlugResponse401 | getManageDataTypesSlugResponse404 | getManageDataTypesSlugResponse500) & {\n headers: Headers;\n};\n\nexport type getManageDataTypesSlugResponse = (getManageDataTypesSlugResponseSuccess | getManageDataTypesSlugResponseError)\n\nexport const getGetManageDataTypesSlugUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/data-types/${slug}`\n}\n\nexport const getManageDataTypesSlug = async (slug: string, options?: RequestInit): Promise<getManageDataTypesSlugResponse> => {\n \n const res = await fetch(getGetManageDataTypesSlugUrl(slug),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageDataTypesSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageDataTypesSlugResponse\n}\n\n\n\n/**\n * @summary データタイプを更新\n */\nexport type putManageDataTypesSlugResponse200 = {\n data: DataTypeResponse\n status: 200\n}\n\nexport type putManageDataTypesSlugResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type putManageDataTypesSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type putManageDataTypesSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type putManageDataTypesSlugResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type putManageDataTypesSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type putManageDataTypesSlugResponseSuccess = (putManageDataTypesSlugResponse200) & {\n headers: Headers;\n};\nexport type putManageDataTypesSlugResponseError = (putManageDataTypesSlugResponse400 | putManageDataTypesSlugResponse401 | putManageDataTypesSlugResponse404 | putManageDataTypesSlugResponse409 | putManageDataTypesSlugResponse500) & {\n headers: Headers;\n};\n\nexport type putManageDataTypesSlugResponse = (putManageDataTypesSlugResponseSuccess | putManageDataTypesSlugResponseError)\n\nexport const getPutManageDataTypesSlugUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/data-types/${slug}`\n}\n\nexport const putManageDataTypesSlug = async (slug: string,\n updateDataTypeRequest: UpdateDataTypeRequest, options?: RequestInit): Promise<putManageDataTypesSlugResponse> => {\n \n const res = await fetch(getPutManageDataTypesSlugUrl(slug),\n { \n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n updateDataTypeRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: putManageDataTypesSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as putManageDataTypesSlugResponse\n}\n\n\n\n/**\n * @summary データタイプを削除\n */\nexport type deleteManageDataTypesSlugResponse200 = {\n data: SdkDeleteDataTypeResponse\n status: 200\n}\n\nexport type deleteManageDataTypesSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type deleteManageDataTypesSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type deleteManageDataTypesSlugResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type deleteManageDataTypesSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type deleteManageDataTypesSlugResponseSuccess = (deleteManageDataTypesSlugResponse200) & {\n headers: Headers;\n};\nexport type deleteManageDataTypesSlugResponseError = (deleteManageDataTypesSlugResponse401 | deleteManageDataTypesSlugResponse404 | deleteManageDataTypesSlugResponse409 | deleteManageDataTypesSlugResponse500) & {\n headers: Headers;\n};\n\nexport type deleteManageDataTypesSlugResponse = (deleteManageDataTypesSlugResponseSuccess | deleteManageDataTypesSlugResponseError)\n\nexport const getDeleteManageDataTypesSlugUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/data-types/${slug}`\n}\n\nexport const deleteManageDataTypesSlug = async (slug: string, options?: RequestInit): Promise<deleteManageDataTypesSlugResponse> => {\n \n const res = await fetch(getDeleteManageDataTypesSlugUrl(slug),\n { \n ...options,\n method: 'DELETE'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: deleteManageDataTypesSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as deleteManageDataTypesSlugResponse\n}\n\n\n\n/**\n * @summary データエントリ一覧を取得\n */\nexport type getManageDataTypeSlugResponse200 = {\n data: SdkDataEntriesListResponse\n status: 200\n}\n\nexport type getManageDataTypeSlugResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type getManageDataTypeSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageDataTypeSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageDataTypeSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageDataTypeSlugResponseSuccess = (getManageDataTypeSlugResponse200) & {\n headers: Headers;\n};\nexport type getManageDataTypeSlugResponseError = (getManageDataTypeSlugResponse400 | getManageDataTypeSlugResponse401 | getManageDataTypeSlugResponse404 | getManageDataTypeSlugResponse500) & {\n headers: Headers;\n};\n\nexport type getManageDataTypeSlugResponse = (getManageDataTypeSlugResponseSuccess | getManageDataTypeSlugResponseError)\n\nexport const getGetManageDataTypeSlugUrl = (typeSlug: string,\n params?: GetManageDataTypeSlugParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/data/${typeSlug}?${stringifiedParams}` : `/api/v1/sdk/manage/data/${typeSlug}`\n}\n\nexport const getManageDataTypeSlug = async (typeSlug: string,\n params?: GetManageDataTypeSlugParams, options?: RequestInit): Promise<getManageDataTypeSlugResponse> => {\n \n const res = await fetch(getGetManageDataTypeSlugUrl(typeSlug,params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageDataTypeSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageDataTypeSlugResponse\n}\n\n\n\n/**\n * @summary データエントリを作成\n */\nexport type postManageDataTypeSlugResponse201 = {\n data: SdkDataEntryResponse\n status: 201\n}\n\nexport type postManageDataTypeSlugResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postManageDataTypeSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageDataTypeSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type postManageDataTypeSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageDataTypeSlugResponseSuccess = (postManageDataTypeSlugResponse201) & {\n headers: Headers;\n};\nexport type postManageDataTypeSlugResponseError = (postManageDataTypeSlugResponse400 | postManageDataTypeSlugResponse401 | postManageDataTypeSlugResponse404 | postManageDataTypeSlugResponse500) & {\n headers: Headers;\n};\n\nexport type postManageDataTypeSlugResponse = (postManageDataTypeSlugResponseSuccess | postManageDataTypeSlugResponseError)\n\nexport const getPostManageDataTypeSlugUrl = (typeSlug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/data/${typeSlug}`\n}\n\nexport const postManageDataTypeSlug = async (typeSlug: string,\n sdkCreateEntryRequest: SdkCreateEntryRequest, options?: RequestInit): Promise<postManageDataTypeSlugResponse> => {\n \n const res = await fetch(getPostManageDataTypeSlugUrl(typeSlug),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n sdkCreateEntryRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageDataTypeSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageDataTypeSlugResponse\n}\n\n\n\n/**\n * @summary データエントリを取得\n */\nexport type getManageDataTypeSlugIdResponse200 = {\n data: SdkDataEntryDetailResponse\n status: 200\n}\n\nexport type getManageDataTypeSlugIdResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type getManageDataTypeSlugIdResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageDataTypeSlugIdResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageDataTypeSlugIdResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageDataTypeSlugIdResponseSuccess = (getManageDataTypeSlugIdResponse200) & {\n headers: Headers;\n};\nexport type getManageDataTypeSlugIdResponseError = (getManageDataTypeSlugIdResponse400 | getManageDataTypeSlugIdResponse401 | getManageDataTypeSlugIdResponse404 | getManageDataTypeSlugIdResponse500) & {\n headers: Headers;\n};\n\nexport type getManageDataTypeSlugIdResponse = (getManageDataTypeSlugIdResponseSuccess | getManageDataTypeSlugIdResponseError)\n\nexport const getGetManageDataTypeSlugIdUrl = (typeSlug: string,\n id: string,\n params?: GetManageDataTypeSlugIdParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/data/${typeSlug}/${id}?${stringifiedParams}` : `/api/v1/sdk/manage/data/${typeSlug}/${id}`\n}\n\nexport const getManageDataTypeSlugId = async (typeSlug: string,\n id: string,\n params?: GetManageDataTypeSlugIdParams, options?: RequestInit): Promise<getManageDataTypeSlugIdResponse> => {\n \n const res = await fetch(getGetManageDataTypeSlugIdUrl(typeSlug,id,params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageDataTypeSlugIdResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageDataTypeSlugIdResponse\n}\n\n\n\n/**\n * @summary データエントリを更新\n */\nexport type patchManageDataTypeSlugIdResponse200 = {\n data: SdkDataEntryResponse\n status: 200\n}\n\nexport type patchManageDataTypeSlugIdResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type patchManageDataTypeSlugIdResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type patchManageDataTypeSlugIdResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type patchManageDataTypeSlugIdResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type patchManageDataTypeSlugIdResponseSuccess = (patchManageDataTypeSlugIdResponse200) & {\n headers: Headers;\n};\nexport type patchManageDataTypeSlugIdResponseError = (patchManageDataTypeSlugIdResponse400 | patchManageDataTypeSlugIdResponse401 | patchManageDataTypeSlugIdResponse404 | patchManageDataTypeSlugIdResponse500) & {\n headers: Headers;\n};\n\nexport type patchManageDataTypeSlugIdResponse = (patchManageDataTypeSlugIdResponseSuccess | patchManageDataTypeSlugIdResponseError)\n\nexport const getPatchManageDataTypeSlugIdUrl = (typeSlug: string,\n id: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/data/${typeSlug}/${id}`\n}\n\nexport const patchManageDataTypeSlugId = async (typeSlug: string,\n id: string,\n sdkUpdateEntryRequest: SdkUpdateEntryRequest, options?: RequestInit): Promise<patchManageDataTypeSlugIdResponse> => {\n \n const res = await fetch(getPatchManageDataTypeSlugIdUrl(typeSlug,id),\n { \n ...options,\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n sdkUpdateEntryRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: patchManageDataTypeSlugIdResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as patchManageDataTypeSlugIdResponse\n}\n\n\n\n/**\n * @summary データエントリを削除\n */\nexport type deleteManageDataTypeSlugIdResponse200 = {\n data: SdkDeleteDataEntryResponse\n status: 200\n}\n\nexport type deleteManageDataTypeSlugIdResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type deleteManageDataTypeSlugIdResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type deleteManageDataTypeSlugIdResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type deleteManageDataTypeSlugIdResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type deleteManageDataTypeSlugIdResponseSuccess = (deleteManageDataTypeSlugIdResponse200) & {\n headers: Headers;\n};\nexport type deleteManageDataTypeSlugIdResponseError = (deleteManageDataTypeSlugIdResponse400 | deleteManageDataTypeSlugIdResponse401 | deleteManageDataTypeSlugIdResponse404 | deleteManageDataTypeSlugIdResponse500) & {\n headers: Headers;\n};\n\nexport type deleteManageDataTypeSlugIdResponse = (deleteManageDataTypeSlugIdResponseSuccess | deleteManageDataTypeSlugIdResponseError)\n\nexport const getDeleteManageDataTypeSlugIdUrl = (typeSlug: string,\n id: string,\n params?: DeleteManageDataTypeSlugIdParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/data/${typeSlug}/${id}?${stringifiedParams}` : `/api/v1/sdk/manage/data/${typeSlug}/${id}`\n}\n\nexport const deleteManageDataTypeSlugId = async (typeSlug: string,\n id: string,\n params?: DeleteManageDataTypeSlugIdParams, options?: RequestInit): Promise<deleteManageDataTypeSlugIdResponse> => {\n \n const res = await fetch(getDeleteManageDataTypeSlugIdUrl(typeSlug,id,params),\n { \n ...options,\n method: 'DELETE'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: deleteManageDataTypeSlugIdResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as deleteManageDataTypeSlugIdResponse\n}\n\n\n\n/**\n * @summary データエントリ削除時の影響を取得\n */\nexport type getManageDataTypeSlugIdDeletionImpactResponse200 = {\n data: SdkDataEntryDeletionImpactResponse\n status: 200\n}\n\nexport type getManageDataTypeSlugIdDeletionImpactResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageDataTypeSlugIdDeletionImpactResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageDataTypeSlugIdDeletionImpactResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageDataTypeSlugIdDeletionImpactResponseSuccess = (getManageDataTypeSlugIdDeletionImpactResponse200) & {\n headers: Headers;\n};\nexport type getManageDataTypeSlugIdDeletionImpactResponseError = (getManageDataTypeSlugIdDeletionImpactResponse401 | getManageDataTypeSlugIdDeletionImpactResponse404 | getManageDataTypeSlugIdDeletionImpactResponse500) & {\n headers: Headers;\n};\n\nexport type getManageDataTypeSlugIdDeletionImpactResponse = (getManageDataTypeSlugIdDeletionImpactResponseSuccess | getManageDataTypeSlugIdDeletionImpactResponseError)\n\nexport const getGetManageDataTypeSlugIdDeletionImpactUrl = (typeSlug: string,\n id: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/data/${typeSlug}/${id}/deletion-impact`\n}\n\nexport const getManageDataTypeSlugIdDeletionImpact = async (typeSlug: string,\n id: string, options?: RequestInit): Promise<getManageDataTypeSlugIdDeletionImpactResponse> => {\n \n const res = await fetch(getGetManageDataTypeSlugIdDeletionImpactUrl(typeSlug,id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageDataTypeSlugIdDeletionImpactResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageDataTypeSlugIdDeletionImpactResponse\n}\n\n\n\n/**\n * @summary カスタムコンポーネント一覧を取得\n */\nexport type getManageComponentsResponse200 = {\n data: SdkCustomComponentsListResponse\n status: 200\n}\n\nexport type getManageComponentsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageComponentsResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageComponentsResponseSuccess = (getManageComponentsResponse200) & {\n headers: Headers;\n};\nexport type getManageComponentsResponseError = (getManageComponentsResponse401 | getManageComponentsResponse500) & {\n headers: Headers;\n};\n\nexport type getManageComponentsResponse = (getManageComponentsResponseSuccess | getManageComponentsResponseError)\n\nexport const getGetManageComponentsUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/components`\n}\n\nexport const getManageComponents = async ( options?: RequestInit): Promise<getManageComponentsResponse> => {\n \n const res = await fetch(getGetManageComponentsUrl(),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageComponentsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageComponentsResponse\n}\n\n\n\n/**\n * カスタムコンポーネント定義を同期します。既存のコンポーネントは更新され、新しいコンポーネントは作成されます。\n * @summary カスタムコンポーネントを同期\n */\nexport type postManageComponentsSyncResponse200 = {\n data: SdkComponentSuccessResponse\n status: 200\n}\n\nexport type postManageComponentsSyncResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postManageComponentsSyncResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageComponentsSyncResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageComponentsSyncResponseSuccess = (postManageComponentsSyncResponse200) & {\n headers: Headers;\n};\nexport type postManageComponentsSyncResponseError = (postManageComponentsSyncResponse400 | postManageComponentsSyncResponse401 | postManageComponentsSyncResponse500) & {\n headers: Headers;\n};\n\nexport type postManageComponentsSyncResponse = (postManageComponentsSyncResponseSuccess | postManageComponentsSyncResponseError)\n\nexport const getPostManageComponentsSyncUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/components/sync`\n}\n\nexport const postManageComponentsSync = async (sdkComponentSyncRequest: SdkComponentSyncRequest, options?: RequestInit): Promise<postManageComponentsSyncResponse> => {\n \n const res = await fetch(getPostManageComponentsSyncUrl(),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n sdkComponentSyncRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageComponentsSyncResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageComponentsSyncResponse\n}\n\n\n\n/**\n * @summary フォーム定義一覧を取得\n */\nexport type getManageFormDefinitionsResponse200 = {\n data: FormDefinitionResponse[]\n status: 200\n}\n\nexport type getManageFormDefinitionsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageFormDefinitionsResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageFormDefinitionsResponseSuccess = (getManageFormDefinitionsResponse200) & {\n headers: Headers;\n};\nexport type getManageFormDefinitionsResponseError = (getManageFormDefinitionsResponse401 | getManageFormDefinitionsResponse500) & {\n headers: Headers;\n};\n\nexport type getManageFormDefinitionsResponse = (getManageFormDefinitionsResponseSuccess | getManageFormDefinitionsResponseError)\n\nexport const getGetManageFormDefinitionsUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/form-definitions`\n}\n\nexport const getManageFormDefinitions = async ( options?: RequestInit): Promise<getManageFormDefinitionsResponse> => {\n \n const res = await fetch(getGetManageFormDefinitionsUrl(),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageFormDefinitionsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageFormDefinitionsResponse\n}\n\n\n\n/**\n * @summary フォーム定義を作成\n */\nexport type postManageFormDefinitionsResponse201 = {\n data: FormDefinitionResponse\n status: 201\n}\n\nexport type postManageFormDefinitionsResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postManageFormDefinitionsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageFormDefinitionsResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageFormDefinitionsResponseSuccess = (postManageFormDefinitionsResponse201) & {\n headers: Headers;\n};\nexport type postManageFormDefinitionsResponseError = (postManageFormDefinitionsResponse400 | postManageFormDefinitionsResponse401 | postManageFormDefinitionsResponse500) & {\n headers: Headers;\n};\n\nexport type postManageFormDefinitionsResponse = (postManageFormDefinitionsResponseSuccess | postManageFormDefinitionsResponseError)\n\nexport const getPostManageFormDefinitionsUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/form-definitions`\n}\n\nexport const postManageFormDefinitions = async (createFormDefinitionRequest: CreateFormDefinitionRequest, options?: RequestInit): Promise<postManageFormDefinitionsResponse> => {\n \n const res = await fetch(getPostManageFormDefinitionsUrl(),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n createFormDefinitionRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageFormDefinitionsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageFormDefinitionsResponse\n}\n\n\n\n/**\n * @summary フォーム定義を取得\n */\nexport type getManageFormDefinitionsSlugResponse200 = {\n data: FormDefinitionResponse\n status: 200\n}\n\nexport type getManageFormDefinitionsSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageFormDefinitionsSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageFormDefinitionsSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageFormDefinitionsSlugResponseSuccess = (getManageFormDefinitionsSlugResponse200) & {\n headers: Headers;\n};\nexport type getManageFormDefinitionsSlugResponseError = (getManageFormDefinitionsSlugResponse401 | getManageFormDefinitionsSlugResponse404 | getManageFormDefinitionsSlugResponse500) & {\n headers: Headers;\n};\n\nexport type getManageFormDefinitionsSlugResponse = (getManageFormDefinitionsSlugResponseSuccess | getManageFormDefinitionsSlugResponseError)\n\nexport const getGetManageFormDefinitionsSlugUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/form-definitions/${slug}`\n}\n\nexport const getManageFormDefinitionsSlug = async (slug: string, options?: RequestInit): Promise<getManageFormDefinitionsSlugResponse> => {\n \n const res = await fetch(getGetManageFormDefinitionsSlugUrl(slug),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageFormDefinitionsSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageFormDefinitionsSlugResponse\n}\n\n\n\n/**\n * @summary フォーム定義を更新\n */\nexport type putManageFormDefinitionsSlugResponse200 = {\n data: FormDefinitionResponse\n status: 200\n}\n\nexport type putManageFormDefinitionsSlugResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type putManageFormDefinitionsSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type putManageFormDefinitionsSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type putManageFormDefinitionsSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type putManageFormDefinitionsSlugResponseSuccess = (putManageFormDefinitionsSlugResponse200) & {\n headers: Headers;\n};\nexport type putManageFormDefinitionsSlugResponseError = (putManageFormDefinitionsSlugResponse400 | putManageFormDefinitionsSlugResponse401 | putManageFormDefinitionsSlugResponse404 | putManageFormDefinitionsSlugResponse500) & {\n headers: Headers;\n};\n\nexport type putManageFormDefinitionsSlugResponse = (putManageFormDefinitionsSlugResponseSuccess | putManageFormDefinitionsSlugResponseError)\n\nexport const getPutManageFormDefinitionsSlugUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/form-definitions/${slug}`\n}\n\nexport const putManageFormDefinitionsSlug = async (slug: string,\n updateFormDefinitionRequest: UpdateFormDefinitionRequest, options?: RequestInit): Promise<putManageFormDefinitionsSlugResponse> => {\n \n const res = await fetch(getPutManageFormDefinitionsSlugUrl(slug),\n { \n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n updateFormDefinitionRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: putManageFormDefinitionsSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as putManageFormDefinitionsSlugResponse\n}\n\n\n\n/**\n * @summary フォーム定義を削除\n */\nexport type deleteManageFormDefinitionsSlugResponse200 = {\n data: SdkDeleteFormDefinitionResponse\n status: 200\n}\n\nexport type deleteManageFormDefinitionsSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type deleteManageFormDefinitionsSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type deleteManageFormDefinitionsSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type deleteManageFormDefinitionsSlugResponseSuccess = (deleteManageFormDefinitionsSlugResponse200) & {\n headers: Headers;\n};\nexport type deleteManageFormDefinitionsSlugResponseError = (deleteManageFormDefinitionsSlugResponse401 | deleteManageFormDefinitionsSlugResponse404 | deleteManageFormDefinitionsSlugResponse500) & {\n headers: Headers;\n};\n\nexport type deleteManageFormDefinitionsSlugResponse = (deleteManageFormDefinitionsSlugResponseSuccess | deleteManageFormDefinitionsSlugResponseError)\n\nexport const getDeleteManageFormDefinitionsSlugUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/form-definitions/${slug}`\n}\n\nexport const deleteManageFormDefinitionsSlug = async (slug: string, options?: RequestInit): Promise<deleteManageFormDefinitionsSlugResponse> => {\n \n const res = await fetch(getDeleteManageFormDefinitionsSlugUrl(slug),\n { \n ...options,\n method: 'DELETE'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: deleteManageFormDefinitionsSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as deleteManageFormDefinitionsSlugResponse\n}\n\n\n\n/**\n * @summary コレクションのデータタイプ一覧を取得\n */\nexport type getManageCollectionsSlugDataTypesResponse200 = {\n data: SdkCollectionDataTypeResponse[]\n status: 200\n}\n\nexport type getManageCollectionsSlugDataTypesResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageCollectionsSlugDataTypesResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageCollectionsSlugDataTypesResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageCollectionsSlugDataTypesResponseSuccess = (getManageCollectionsSlugDataTypesResponse200) & {\n headers: Headers;\n};\nexport type getManageCollectionsSlugDataTypesResponseError = (getManageCollectionsSlugDataTypesResponse401 | getManageCollectionsSlugDataTypesResponse404 | getManageCollectionsSlugDataTypesResponse500) & {\n headers: Headers;\n};\n\nexport type getManageCollectionsSlugDataTypesResponse = (getManageCollectionsSlugDataTypesResponseSuccess | getManageCollectionsSlugDataTypesResponseError)\n\nexport const getGetManageCollectionsSlugDataTypesUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/collections/${slug}/data-types`\n}\n\nexport const getManageCollectionsSlugDataTypes = async (slug: string, options?: RequestInit): Promise<getManageCollectionsSlugDataTypesResponse> => {\n \n const res = await fetch(getGetManageCollectionsSlugDataTypesUrl(slug),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageCollectionsSlugDataTypesResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageCollectionsSlugDataTypesResponse\n}\n\n\n\n/**\n * @summary コレクションにデータタイプを追加\n */\nexport type postManageCollectionsSlugDataTypesResponse201 = {\n data: DataTypeResponse\n status: 201\n}\n\nexport type postManageCollectionsSlugDataTypesResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postManageCollectionsSlugDataTypesResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageCollectionsSlugDataTypesResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type postManageCollectionsSlugDataTypesResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type postManageCollectionsSlugDataTypesResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageCollectionsSlugDataTypesResponseSuccess = (postManageCollectionsSlugDataTypesResponse201) & {\n headers: Headers;\n};\nexport type postManageCollectionsSlugDataTypesResponseError = (postManageCollectionsSlugDataTypesResponse400 | postManageCollectionsSlugDataTypesResponse401 | postManageCollectionsSlugDataTypesResponse404 | postManageCollectionsSlugDataTypesResponse409 | postManageCollectionsSlugDataTypesResponse500) & {\n headers: Headers;\n};\n\nexport type postManageCollectionsSlugDataTypesResponse = (postManageCollectionsSlugDataTypesResponseSuccess | postManageCollectionsSlugDataTypesResponseError)\n\nexport const getPostManageCollectionsSlugDataTypesUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/collections/${slug}/data-types`\n}\n\nexport const postManageCollectionsSlugDataTypes = async (slug: string,\n sdkAddCollectionDataTypeRequest: SdkAddCollectionDataTypeRequest, options?: RequestInit): Promise<postManageCollectionsSlugDataTypesResponse> => {\n \n const res = await fetch(getPostManageCollectionsSlugDataTypesUrl(slug),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n sdkAddCollectionDataTypeRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageCollectionsSlugDataTypesResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageCollectionsSlugDataTypesResponse\n}\n\n\n\n/**\n * @summary コレクションからデータタイプを削除\n */\nexport type deleteManageCollectionsSlugDataTypesDtSlugResponse200 = {\n data: SdkDeleteCollectionDataTypeResponse\n status: 200\n}\n\nexport type deleteManageCollectionsSlugDataTypesDtSlugResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type deleteManageCollectionsSlugDataTypesDtSlugResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type deleteManageCollectionsSlugDataTypesDtSlugResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type deleteManageCollectionsSlugDataTypesDtSlugResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type deleteManageCollectionsSlugDataTypesDtSlugResponseSuccess = (deleteManageCollectionsSlugDataTypesDtSlugResponse200) & {\n headers: Headers;\n};\nexport type deleteManageCollectionsSlugDataTypesDtSlugResponseError = (deleteManageCollectionsSlugDataTypesDtSlugResponse401 | deleteManageCollectionsSlugDataTypesDtSlugResponse404 | deleteManageCollectionsSlugDataTypesDtSlugResponse409 | deleteManageCollectionsSlugDataTypesDtSlugResponse500) & {\n headers: Headers;\n};\n\nexport type deleteManageCollectionsSlugDataTypesDtSlugResponse = (deleteManageCollectionsSlugDataTypesDtSlugResponseSuccess | deleteManageCollectionsSlugDataTypesDtSlugResponseError)\n\nexport const getDeleteManageCollectionsSlugDataTypesDtSlugUrl = (slug: string,\n dtSlug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/collections/${slug}/data-types/${dtSlug}`\n}\n\nexport const deleteManageCollectionsSlugDataTypesDtSlug = async (slug: string,\n dtSlug: string, options?: RequestInit): Promise<deleteManageCollectionsSlugDataTypesDtSlugResponse> => {\n \n const res = await fetch(getDeleteManageCollectionsSlugDataTypesDtSlugUrl(slug,dtSlug),\n { \n ...options,\n method: 'DELETE'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: deleteManageCollectionsSlugDataTypesDtSlugResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as deleteManageCollectionsSlugDataTypesDtSlugResponse\n}\n\n\n\n/**\n * @summary 既存のデータタイプをコレクションにリンク\n */\nexport type postManageCollectionsSlugDataTypesLinkResponse201 = {\n data: ReferenceField\n status: 201\n}\n\nexport type postManageCollectionsSlugDataTypesLinkResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postManageCollectionsSlugDataTypesLinkResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageCollectionsSlugDataTypesLinkResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type postManageCollectionsSlugDataTypesLinkResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type postManageCollectionsSlugDataTypesLinkResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageCollectionsSlugDataTypesLinkResponseSuccess = (postManageCollectionsSlugDataTypesLinkResponse201) & {\n headers: Headers;\n};\nexport type postManageCollectionsSlugDataTypesLinkResponseError = (postManageCollectionsSlugDataTypesLinkResponse400 | postManageCollectionsSlugDataTypesLinkResponse401 | postManageCollectionsSlugDataTypesLinkResponse404 | postManageCollectionsSlugDataTypesLinkResponse409 | postManageCollectionsSlugDataTypesLinkResponse500) & {\n headers: Headers;\n};\n\nexport type postManageCollectionsSlugDataTypesLinkResponse = (postManageCollectionsSlugDataTypesLinkResponseSuccess | postManageCollectionsSlugDataTypesLinkResponseError)\n\nexport const getPostManageCollectionsSlugDataTypesLinkUrl = (slug: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/collections/${slug}/data-types/link`\n}\n\nexport const postManageCollectionsSlugDataTypesLink = async (slug: string,\n sdkLinkExistingDataTypeRequest: SdkLinkExistingDataTypeRequest, options?: RequestInit): Promise<postManageCollectionsSlugDataTypesLinkResponse> => {\n \n const res = await fetch(getPostManageCollectionsSlugDataTypesLinkUrl(slug),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n sdkLinkExistingDataTypeRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageCollectionsSlugDataTypesLinkResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageCollectionsSlugDataTypesLinkResponse\n}\n\n\n\n/**\n * @summary コレクションプリセット一覧を取得\n */\nexport type getManageCollectionPresetsResponse200 = {\n data: GetManageCollectionPresets200\n status: 200\n}\n\nexport type getManageCollectionPresetsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageCollectionPresetsResponseSuccess = (getManageCollectionPresetsResponse200) & {\n headers: Headers;\n};\nexport type getManageCollectionPresetsResponseError = (getManageCollectionPresetsResponse401) & {\n headers: Headers;\n};\n\nexport type getManageCollectionPresetsResponse = (getManageCollectionPresetsResponseSuccess | getManageCollectionPresetsResponseError)\n\nexport const getGetManageCollectionPresetsUrl = (params?: GetManageCollectionPresetsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/collection-presets?${stringifiedParams}` : `/api/v1/sdk/manage/collection-presets`\n}\n\nexport const getManageCollectionPresets = async (params?: GetManageCollectionPresetsParams, options?: RequestInit): Promise<getManageCollectionPresetsResponse> => {\n \n const res = await fetch(getGetManageCollectionPresetsUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageCollectionPresetsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageCollectionPresetsResponse\n}\n\n\n\n/**\n * @summary コンテンツを作成\n */\nexport type postManageContentsResponse201 = {\n data: SdkCreateContentResponse\n status: 201\n}\n\nexport type postManageContentsResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postManageContentsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageContentsResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type postManageContentsResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type postManageContentsResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageContentsResponseSuccess = (postManageContentsResponse201) & {\n headers: Headers;\n};\nexport type postManageContentsResponseError = (postManageContentsResponse400 | postManageContentsResponse401 | postManageContentsResponse404 | postManageContentsResponse409 | postManageContentsResponse500) & {\n headers: Headers;\n};\n\nexport type postManageContentsResponse = (postManageContentsResponseSuccess | postManageContentsResponseError)\n\nexport const getPostManageContentsUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/contents`\n}\n\nexport const postManageContents = async (createContentRequest: CreateContentRequest, options?: RequestInit): Promise<postManageContentsResponse> => {\n \n const res = await fetch(getPostManageContentsUrl(),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n createContentRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageContentsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageContentsResponse\n}\n\n\n\n/**\n * @summary コンテンツ一覧を取得\n */\nexport type getManageContentsResponse200 = {\n data: SdkContentListResponse\n status: 200\n}\n\nexport type getManageContentsResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type getManageContentsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageContentsResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageContentsResponseSuccess = (getManageContentsResponse200) & {\n headers: Headers;\n};\nexport type getManageContentsResponseError = (getManageContentsResponse400 | getManageContentsResponse401 | getManageContentsResponse500) & {\n headers: Headers;\n};\n\nexport type getManageContentsResponse = (getManageContentsResponseSuccess | getManageContentsResponseError)\n\nexport const getGetManageContentsUrl = (params?: GetManageContentsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/contents?${stringifiedParams}` : `/api/v1/sdk/manage/contents`\n}\n\nexport const getManageContents = async (params?: GetManageContentsParams, options?: RequestInit): Promise<getManageContentsResponse> => {\n \n const res = await fetch(getGetManageContentsUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageContentsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageContentsResponse\n}\n\n\n\n/**\n * @summary レビューをリクエスト\n */\nexport type postManageContentsIdRequestReviewResponse200 = {\n data: SdkRequestReviewResponse\n status: 200\n}\n\nexport type postManageContentsIdRequestReviewResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageContentsIdRequestReviewResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type postManageContentsIdRequestReviewResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageContentsIdRequestReviewResponseSuccess = (postManageContentsIdRequestReviewResponse200) & {\n headers: Headers;\n};\nexport type postManageContentsIdRequestReviewResponseError = (postManageContentsIdRequestReviewResponse401 | postManageContentsIdRequestReviewResponse404 | postManageContentsIdRequestReviewResponse500) & {\n headers: Headers;\n};\n\nexport type postManageContentsIdRequestReviewResponse = (postManageContentsIdRequestReviewResponseSuccess | postManageContentsIdRequestReviewResponseError)\n\nexport const getPostManageContentsIdRequestReviewUrl = (id: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/contents/${id}/request-review`\n}\n\nexport const postManageContentsIdRequestReview = async (id: string, options?: RequestInit): Promise<postManageContentsIdRequestReviewResponse> => {\n \n const res = await fetch(getPostManageContentsIdRequestReviewUrl(id),\n { \n ...options,\n method: 'POST'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageContentsIdRequestReviewResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageContentsIdRequestReviewResponse\n}\n\n\n\n/**\n * @summary コンテンツを公開\n */\nexport type postManageContentsIdPublishResponse200 = {\n data: SdkPublishContentResponse\n status: 200\n}\n\nexport type postManageContentsIdPublishResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postManageContentsIdPublishResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageContentsIdPublishResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type postManageContentsIdPublishResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageContentsIdPublishResponseSuccess = (postManageContentsIdPublishResponse200) & {\n headers: Headers;\n};\nexport type postManageContentsIdPublishResponseError = (postManageContentsIdPublishResponse400 | postManageContentsIdPublishResponse401 | postManageContentsIdPublishResponse404 | postManageContentsIdPublishResponse500) & {\n headers: Headers;\n};\n\nexport type postManageContentsIdPublishResponse = (postManageContentsIdPublishResponseSuccess | postManageContentsIdPublishResponseError)\n\nexport const getPostManageContentsIdPublishUrl = (id: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/contents/${id}/publish`\n}\n\nexport const postManageContentsIdPublish = async (id: string, options?: RequestInit): Promise<postManageContentsIdPublishResponse> => {\n \n const res = await fetch(getPostManageContentsIdPublishUrl(id),\n { \n ...options,\n method: 'POST'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageContentsIdPublishResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageContentsIdPublishResponse\n}\n\n\n\n/**\n * @summary コンテンツの参照を取得\n */\nexport type getManageContentsIdReferencesResponse200 = {\n data: SdkContentReferencesResponse\n status: 200\n}\n\nexport type getManageContentsIdReferencesResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageContentsIdReferencesResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageContentsIdReferencesResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageContentsIdReferencesResponseSuccess = (getManageContentsIdReferencesResponse200) & {\n headers: Headers;\n};\nexport type getManageContentsIdReferencesResponseError = (getManageContentsIdReferencesResponse401 | getManageContentsIdReferencesResponse404 | getManageContentsIdReferencesResponse500) & {\n headers: Headers;\n};\n\nexport type getManageContentsIdReferencesResponse = (getManageContentsIdReferencesResponseSuccess | getManageContentsIdReferencesResponseError)\n\nexport const getGetManageContentsIdReferencesUrl = (id: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/contents/${id}/references`\n}\n\nexport const getManageContentsIdReferences = async (id: string, options?: RequestInit): Promise<getManageContentsIdReferencesResponse> => {\n \n const res = await fetch(getGetManageContentsIdReferencesUrl(id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageContentsIdReferencesResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageContentsIdReferencesResponse\n}\n\n\n\n/**\n * @summary コンテンツの参照を設定\n */\nexport type putManageContentsIdReferencesResponse200 = {\n data: SdkSetContentReferencesResponse\n status: 200\n}\n\nexport type putManageContentsIdReferencesResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type putManageContentsIdReferencesResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type putManageContentsIdReferencesResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type putManageContentsIdReferencesResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type putManageContentsIdReferencesResponseSuccess = (putManageContentsIdReferencesResponse200) & {\n headers: Headers;\n};\nexport type putManageContentsIdReferencesResponseError = (putManageContentsIdReferencesResponse400 | putManageContentsIdReferencesResponse401 | putManageContentsIdReferencesResponse404 | putManageContentsIdReferencesResponse500) & {\n headers: Headers;\n};\n\nexport type putManageContentsIdReferencesResponse = (putManageContentsIdReferencesResponseSuccess | putManageContentsIdReferencesResponseError)\n\nexport const getPutManageContentsIdReferencesUrl = (id: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/contents/${id}/references`\n}\n\nexport const putManageContentsIdReferences = async (id: string,\n sdkSetContentReferencesRequest: SdkSetContentReferencesRequest, options?: RequestInit): Promise<putManageContentsIdReferencesResponse> => {\n \n const res = await fetch(getPutManageContentsIdReferencesUrl(id),\n { \n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n sdkSetContentReferencesRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: putManageContentsIdReferencesResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as putManageContentsIdReferencesResponse\n}\n\n\n\n/**\n * @summary コンテンツを取得\n */\nexport type getManageContentsIdResponse200 = {\n data: SdkContentDetail\n status: 200\n}\n\nexport type getManageContentsIdResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type getManageContentsIdResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageContentsIdResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageContentsIdResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageContentsIdResponseSuccess = (getManageContentsIdResponse200) & {\n headers: Headers;\n};\nexport type getManageContentsIdResponseError = (getManageContentsIdResponse400 | getManageContentsIdResponse401 | getManageContentsIdResponse404 | getManageContentsIdResponse500) & {\n headers: Headers;\n};\n\nexport type getManageContentsIdResponse = (getManageContentsIdResponseSuccess | getManageContentsIdResponseError)\n\nexport const getGetManageContentsIdUrl = (id: string,\n params?: GetManageContentsIdParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/contents/${id}?${stringifiedParams}` : `/api/v1/sdk/manage/contents/${id}`\n}\n\nexport const getManageContentsId = async (id: string,\n params?: GetManageContentsIdParams, options?: RequestInit): Promise<getManageContentsIdResponse> => {\n \n const res = await fetch(getGetManageContentsIdUrl(id,params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageContentsIdResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageContentsIdResponse\n}\n\n\n\n/**\n * @summary コンテンツを更新\n */\nexport type putManageContentsIdResponse200 = {\n data: SdkUpdateContentResponse\n status: 200\n}\n\nexport type putManageContentsIdResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type putManageContentsIdResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type putManageContentsIdResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type putManageContentsIdResponse409 = {\n data: ErrorResponse\n status: 409\n}\n\nexport type putManageContentsIdResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type putManageContentsIdResponseSuccess = (putManageContentsIdResponse200) & {\n headers: Headers;\n};\nexport type putManageContentsIdResponseError = (putManageContentsIdResponse400 | putManageContentsIdResponse401 | putManageContentsIdResponse404 | putManageContentsIdResponse409 | putManageContentsIdResponse500) & {\n headers: Headers;\n};\n\nexport type putManageContentsIdResponse = (putManageContentsIdResponseSuccess | putManageContentsIdResponseError)\n\nexport const getPutManageContentsIdUrl = (id: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/contents/${id}`\n}\n\nexport const putManageContentsId = async (id: string,\n updateContentRequest: UpdateContentRequest, options?: RequestInit): Promise<putManageContentsIdResponse> => {\n \n const res = await fetch(getPutManageContentsIdUrl(id),\n { \n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n updateContentRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: putManageContentsIdResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as putManageContentsIdResponse\n}\n\n\n\n/**\n * @summary コンテンツを削除(デフォルト: アーカイブ)\n */\nexport type deleteManageContentsIdResponse200 = {\n data: SdkDeleteContentResponse\n status: 200\n}\n\nexport type deleteManageContentsIdResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type deleteManageContentsIdResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type deleteManageContentsIdResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type deleteManageContentsIdResponseSuccess = (deleteManageContentsIdResponse200) & {\n headers: Headers;\n};\nexport type deleteManageContentsIdResponseError = (deleteManageContentsIdResponse401 | deleteManageContentsIdResponse404 | deleteManageContentsIdResponse500) & {\n headers: Headers;\n};\n\nexport type deleteManageContentsIdResponse = (deleteManageContentsIdResponseSuccess | deleteManageContentsIdResponseError)\n\nexport const getDeleteManageContentsIdUrl = (id: string,\n params?: DeleteManageContentsIdParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/contents/${id}?${stringifiedParams}` : `/api/v1/sdk/manage/contents/${id}`\n}\n\nexport const deleteManageContentsId = async (id: string,\n params?: DeleteManageContentsIdParams, options?: RequestInit): Promise<deleteManageContentsIdResponse> => {\n \n const res = await fetch(getDeleteManageContentsIdUrl(id,params),\n { \n ...options,\n method: 'DELETE'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: deleteManageContentsIdResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as deleteManageContentsIdResponse\n}\n\n\n\n/**\n * @summary コンテンツのMDX参照整合性を検証\n */\nexport type getManageContentsIdValidateResponse200 = {\n data: SdkValidateContentResponse\n status: 200\n}\n\nexport type getManageContentsIdValidateResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageContentsIdValidateResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageContentsIdValidateResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageContentsIdValidateResponseSuccess = (getManageContentsIdValidateResponse200) & {\n headers: Headers;\n};\nexport type getManageContentsIdValidateResponseError = (getManageContentsIdValidateResponse401 | getManageContentsIdValidateResponse404 | getManageContentsIdValidateResponse500) & {\n headers: Headers;\n};\n\nexport type getManageContentsIdValidateResponse = (getManageContentsIdValidateResponseSuccess | getManageContentsIdValidateResponseError)\n\nexport const getGetManageContentsIdValidateUrl = (id: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/contents/${id}/validate`\n}\n\nexport const getManageContentsIdValidate = async (id: string, options?: RequestInit): Promise<getManageContentsIdValidateResponse> => {\n \n const res = await fetch(getGetManageContentsIdValidateUrl(id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageContentsIdValidateResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageContentsIdValidateResponse\n}\n\n\n\n/**\n * スタイルガイドなどの環境ドキュメントを保存します。同じ type が存在する場合は上書きします。\n * @summary ドキュメントを保存(SDK)\n */\nexport type putManageDocsTypeResponse200 = {\n data: SdkDocResponse\n status: 200\n}\n\nexport type putManageDocsTypeResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type putManageDocsTypeResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type putManageDocsTypeResponse403 = {\n data: ErrorResponse\n status: 403\n}\n\nexport type putManageDocsTypeResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type putManageDocsTypeResponseSuccess = (putManageDocsTypeResponse200) & {\n headers: Headers;\n};\nexport type putManageDocsTypeResponseError = (putManageDocsTypeResponse400 | putManageDocsTypeResponse401 | putManageDocsTypeResponse403 | putManageDocsTypeResponse500) & {\n headers: Headers;\n};\n\nexport type putManageDocsTypeResponse = (putManageDocsTypeResponseSuccess | putManageDocsTypeResponseError)\n\nexport const getPutManageDocsTypeUrl = (type: SdkDocType,) => {\n\n\n \n\n return `/api/v1/sdk/manage/docs/${type}`\n}\n\nexport const putManageDocsType = async (type: SdkDocType,\n sdkUpsertDocBody: SdkUpsertDocBody, options?: RequestInit): Promise<putManageDocsTypeResponse> => {\n \n const res = await fetch(getPutManageDocsTypeUrl(type),\n { \n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n sdkUpsertDocBody,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: putManageDocsTypeResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as putManageDocsTypeResponse\n}\n\n\n\n/**\n * @summary ドキュメントを取得(SDK)\n */\nexport type getManageDocsTypeResponse200 = {\n data: SdkDocResponse\n status: 200\n}\n\nexport type getManageDocsTypeResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type getManageDocsTypeResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageDocsTypeResponse403 = {\n data: ErrorResponse\n status: 403\n}\n\nexport type getManageDocsTypeResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageDocsTypeResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageDocsTypeResponseSuccess = (getManageDocsTypeResponse200) & {\n headers: Headers;\n};\nexport type getManageDocsTypeResponseError = (getManageDocsTypeResponse400 | getManageDocsTypeResponse401 | getManageDocsTypeResponse403 | getManageDocsTypeResponse404 | getManageDocsTypeResponse500) & {\n headers: Headers;\n};\n\nexport type getManageDocsTypeResponse = (getManageDocsTypeResponseSuccess | getManageDocsTypeResponseError)\n\nexport const getGetManageDocsTypeUrl = (type: SdkDocType,) => {\n\n\n \n\n return `/api/v1/sdk/manage/docs/${type}`\n}\n\nexport const getManageDocsType = async (type: SdkDocType, options?: RequestInit): Promise<getManageDocsTypeResponse> => {\n \n const res = await fetch(getGetManageDocsTypeUrl(type),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageDocsTypeResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageDocsTypeResponse\n}\n\n\n\n/**\n * CMX プラットフォームのバグを報告します。GitHub Issue が自動作成されます。\n * @summary バグレポートを送信(SDK)\n */\nexport type postManageBugReportsResponse201 = {\n data: SdkBugReportResponse\n status: 201\n}\n\nexport type postManageBugReportsResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postManageBugReportsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageBugReportsResponse403 = {\n data: ErrorResponse\n status: 403\n}\n\nexport type postManageBugReportsResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageBugReportsResponseSuccess = (postManageBugReportsResponse201) & {\n headers: Headers;\n};\nexport type postManageBugReportsResponseError = (postManageBugReportsResponse400 | postManageBugReportsResponse401 | postManageBugReportsResponse403 | postManageBugReportsResponse500) & {\n headers: Headers;\n};\n\nexport type postManageBugReportsResponse = (postManageBugReportsResponseSuccess | postManageBugReportsResponseError)\n\nexport const getPostManageBugReportsUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/bug-reports`\n}\n\nexport const postManageBugReports = async (sdkCreateBugReportBody: SdkCreateBugReportBody, options?: RequestInit): Promise<postManageBugReportsResponse> => {\n \n const res = await fetch(getPostManageBugReportsUrl(),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n sdkCreateBugReportBody,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageBugReportsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageBugReportsResponse\n}\n\n\n\n/**\n * @summary ソーシャルアカウント一覧を取得\n */\nexport type getManageSocialAccountsResponse200 = {\n data: SocialAccountListResponse\n status: 200\n}\n\nexport type getManageSocialAccountsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageSocialAccountsResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageSocialAccountsResponseSuccess = (getManageSocialAccountsResponse200) & {\n headers: Headers;\n};\nexport type getManageSocialAccountsResponseError = (getManageSocialAccountsResponse401 | getManageSocialAccountsResponse500) & {\n headers: Headers;\n};\n\nexport type getManageSocialAccountsResponse = (getManageSocialAccountsResponseSuccess | getManageSocialAccountsResponseError)\n\nexport const getGetManageSocialAccountsUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/social/accounts`\n}\n\nexport const getManageSocialAccounts = async ( options?: RequestInit): Promise<getManageSocialAccountsResponse> => {\n \n const res = await fetch(getGetManageSocialAccountsUrl(),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageSocialAccountsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageSocialAccountsResponse\n}\n\n\n\n/**\n * @summary ソーシャル投稿一覧を取得\n */\nexport type getManageSocialPostsResponse200 = {\n data: SocialPostListResponse\n status: 200\n}\n\nexport type getManageSocialPostsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageSocialPostsResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageSocialPostsResponseSuccess = (getManageSocialPostsResponse200) & {\n headers: Headers;\n};\nexport type getManageSocialPostsResponseError = (getManageSocialPostsResponse401 | getManageSocialPostsResponse500) & {\n headers: Headers;\n};\n\nexport type getManageSocialPostsResponse = (getManageSocialPostsResponseSuccess | getManageSocialPostsResponseError)\n\nexport const getGetManageSocialPostsUrl = (params?: GetManageSocialPostsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value instanceof Date ? value.toISOString() : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/social/posts?${stringifiedParams}` : `/api/v1/sdk/manage/social/posts`\n}\n\nexport const getManageSocialPosts = async (params?: GetManageSocialPostsParams, options?: RequestInit): Promise<getManageSocialPostsResponse> => {\n \n const res = await fetch(getGetManageSocialPostsUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageSocialPostsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageSocialPostsResponse\n}\n\n\n\n/**\n * @summary ソーシャル投稿を作成\n */\nexport type postManageSocialPostsResponse201 = {\n data: SocialPostResponse\n status: 201\n}\n\nexport type postManageSocialPostsResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type postManageSocialPostsResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type postManageSocialPostsResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type postManageSocialPostsResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type postManageSocialPostsResponseSuccess = (postManageSocialPostsResponse201) & {\n headers: Headers;\n};\nexport type postManageSocialPostsResponseError = (postManageSocialPostsResponse400 | postManageSocialPostsResponse401 | postManageSocialPostsResponse404 | postManageSocialPostsResponse500) & {\n headers: Headers;\n};\n\nexport type postManageSocialPostsResponse = (postManageSocialPostsResponseSuccess | postManageSocialPostsResponseError)\n\nexport const getPostManageSocialPostsUrl = () => {\n\n\n \n\n return `/api/v1/sdk/manage/social/posts`\n}\n\nexport const postManageSocialPosts = async (createSocialPostRequest: CreateSocialPostRequest, options?: RequestInit): Promise<postManageSocialPostsResponse> => {\n \n const res = await fetch(getPostManageSocialPostsUrl(),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n createSocialPostRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: postManageSocialPostsResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as postManageSocialPostsResponse\n}\n\n\n\n/**\n * @summary ソーシャル投稿詳細を取得\n */\nexport type getManageSocialPostsIdResponse200 = {\n data: SocialPostResponse\n status: 200\n}\n\nexport type getManageSocialPostsIdResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getManageSocialPostsIdResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type getManageSocialPostsIdResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getManageSocialPostsIdResponseSuccess = (getManageSocialPostsIdResponse200) & {\n headers: Headers;\n};\nexport type getManageSocialPostsIdResponseError = (getManageSocialPostsIdResponse401 | getManageSocialPostsIdResponse404 | getManageSocialPostsIdResponse500) & {\n headers: Headers;\n};\n\nexport type getManageSocialPostsIdResponse = (getManageSocialPostsIdResponseSuccess | getManageSocialPostsIdResponseError)\n\nexport const getGetManageSocialPostsIdUrl = (id: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/social/posts/${id}`\n}\n\nexport const getManageSocialPostsId = async (id: string, options?: RequestInit): Promise<getManageSocialPostsIdResponse> => {\n \n const res = await fetch(getGetManageSocialPostsIdUrl(id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getManageSocialPostsIdResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getManageSocialPostsIdResponse\n}\n\n\n\n/**\n * @summary ソーシャル投稿を更新\n */\nexport type putManageSocialPostsIdResponse200 = {\n data: SocialPostResponse\n status: 200\n}\n\nexport type putManageSocialPostsIdResponse400 = {\n data: ErrorResponse\n status: 400\n}\n\nexport type putManageSocialPostsIdResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type putManageSocialPostsIdResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type putManageSocialPostsIdResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type putManageSocialPostsIdResponseSuccess = (putManageSocialPostsIdResponse200) & {\n headers: Headers;\n};\nexport type putManageSocialPostsIdResponseError = (putManageSocialPostsIdResponse400 | putManageSocialPostsIdResponse401 | putManageSocialPostsIdResponse404 | putManageSocialPostsIdResponse500) & {\n headers: Headers;\n};\n\nexport type putManageSocialPostsIdResponse = (putManageSocialPostsIdResponseSuccess | putManageSocialPostsIdResponseError)\n\nexport const getPutManageSocialPostsIdUrl = (id: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/social/posts/${id}`\n}\n\nexport const putManageSocialPostsId = async (id: string,\n updateSocialPostRequest: UpdateSocialPostRequest, options?: RequestInit): Promise<putManageSocialPostsIdResponse> => {\n \n const res = await fetch(getPutManageSocialPostsIdUrl(id),\n { \n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n updateSocialPostRequest,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: putManageSocialPostsIdResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as putManageSocialPostsIdResponse\n}\n\n\n\n/**\n * @summary ソーシャル投稿を削除\n */\nexport type deleteManageSocialPostsIdResponse200 = {\n data: SdkDeleteSocialPostResponse\n status: 200\n}\n\nexport type deleteManageSocialPostsIdResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type deleteManageSocialPostsIdResponse404 = {\n data: ErrorResponse\n status: 404\n}\n\nexport type deleteManageSocialPostsIdResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type deleteManageSocialPostsIdResponseSuccess = (deleteManageSocialPostsIdResponse200) & {\n headers: Headers;\n};\nexport type deleteManageSocialPostsIdResponseError = (deleteManageSocialPostsIdResponse401 | deleteManageSocialPostsIdResponse404 | deleteManageSocialPostsIdResponse500) & {\n headers: Headers;\n};\n\nexport type deleteManageSocialPostsIdResponse = (deleteManageSocialPostsIdResponseSuccess | deleteManageSocialPostsIdResponseError)\n\nexport const getDeleteManageSocialPostsIdUrl = (id: string,) => {\n\n\n \n\n return `/api/v1/sdk/manage/social/posts/${id}`\n}\n\nexport const deleteManageSocialPostsId = async (id: string, options?: RequestInit): Promise<deleteManageSocialPostsIdResponse> => {\n \n const res = await fetch(getDeleteManageSocialPostsIdUrl(id),\n { \n ...options,\n method: 'DELETE'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: deleteManageSocialPostsIdResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as deleteManageSocialPostsIdResponse\n}\n\n\n\n/**\n * @summary スターターキットをダウンロード\n */\nexport type getDownloadStarterKitResponse200 = {\n data: Blob\n status: 200\n}\n\nexport type getDownloadStarterKitResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getDownloadStarterKitResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getDownloadStarterKitResponseSuccess = (getDownloadStarterKitResponse200) & {\n headers: Headers;\n};\nexport type getDownloadStarterKitResponseError = (getDownloadStarterKitResponse401 | getDownloadStarterKitResponse500) & {\n headers: Headers;\n};\n\nexport type getDownloadStarterKitResponse = (getDownloadStarterKitResponseSuccess | getDownloadStarterKitResponseError)\n\nexport const getGetDownloadStarterKitUrl = () => {\n\n\n \n\n return `/api/v1/sdk/download/starter-kit`\n}\n\nexport const getDownloadStarterKit = async ( options?: RequestInit): Promise<getDownloadStarterKitResponse> => {\n \n const res = await fetch(getGetDownloadStarterKitUrl(),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getDownloadStarterKitResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getDownloadStarterKitResponse\n}\n\n\n\n/**\n * @summary CMX Studio をダウンロード\n */\nexport type getDownloadStudioResponse200 = {\n data: Blob\n status: 200\n}\n\nexport type getDownloadStudioResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getDownloadStudioResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getDownloadStudioResponseSuccess = (getDownloadStudioResponse200) & {\n headers: Headers;\n};\nexport type getDownloadStudioResponseError = (getDownloadStudioResponse401 | getDownloadStudioResponse500) & {\n headers: Headers;\n};\n\nexport type getDownloadStudioResponse = (getDownloadStudioResponseSuccess | getDownloadStudioResponseError)\n\nexport const getGetDownloadStudioUrl = () => {\n\n\n \n\n return `/api/v1/sdk/download/studio`\n}\n\nexport const getDownloadStudio = async ( options?: RequestInit): Promise<getDownloadStudioResponse> => {\n \n const res = await fetch(getGetDownloadStudioUrl(),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getDownloadStudioResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getDownloadStudioResponse\n}\n\n\n\n/**\n * @summary CMX Workflow をダウンロード\n */\nexport type getDownloadWorkflowResponse200 = {\n data: Blob\n status: 200\n}\n\nexport type getDownloadWorkflowResponse401 = {\n data: ErrorResponse\n status: 401\n}\n\nexport type getDownloadWorkflowResponse500 = {\n data: ErrorResponse\n status: 500\n}\n\nexport type getDownloadWorkflowResponseSuccess = (getDownloadWorkflowResponse200) & {\n headers: Headers;\n};\nexport type getDownloadWorkflowResponseError = (getDownloadWorkflowResponse401 | getDownloadWorkflowResponse500) & {\n headers: Headers;\n};\n\nexport type getDownloadWorkflowResponse = (getDownloadWorkflowResponseSuccess | getDownloadWorkflowResponseError)\n\nexport const getGetDownloadWorkflowUrl = () => {\n\n\n \n\n return `/api/v1/sdk/download/workflow`\n}\n\nexport const getDownloadWorkflow = async ( options?: RequestInit): Promise<getDownloadWorkflowResponse> => {\n \n const res = await fetch(getGetDownloadWorkflowUrl(),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text();\n \n const data: getDownloadWorkflowResponse['data'] = body ? JSON.parse(body, dateReviver) : {}\n return { data, status: res.status, headers: res.headers } as getDownloadWorkflowResponse\n}\n\n\n\n","/**\n * CMX SDK — Convenience API functions\n *\n * Human-friendly wrappers around the generated Orval endpoints.\n * These manage cache tags automatically and return typed responses.\n */\n\nimport { sdkFetchWithTags, sdkPostFetcher, getSdkApiBaseUrl } from \"./core/sdk.js\"\nimport { CACHE_TAGS } from \"./core/sdk.js\"\nimport { getRuntimeSettings, getAnalyticsDaily } from \"./generated/sdk/endpoints/sdk.js\"\nimport type {\n CollectionContentsResponse,\n CollectionContentDetailResponse,\n DataListResponse,\n DataEntryItem,\n GetAnalyticsDailyParams,\n GetPreviewToken200,\n SdkAnalyticsDailyListResponse,\n SdkRuntimeSettingsResponse,\n SchemaResponse,\n} from \"./generated/sdk/models/index.js\"\n\n// Re-export the preview response type with a friendlier name\nexport type PreviewResponse = GetPreviewToken200\n\n/**\n * Common fetch options for ISR/caching\n */\nexport interface FetchOptions {\n /** Next.js ISR revalidation interval in seconds. Set to `false` to disable caching. */\n revalidate?: number | false\n}\n\n/**\n * Options for fetching collection contents\n */\nexport interface CollectionContentsOptions extends FetchOptions {\n sortBy?: \"publishedAt\" | \"sortOrder\"\n sortOrder?: \"asc\" | \"desc\"\n limit?: number\n offset?: number\n status?: string // \"published\" (default), \"all\", or comma-separated statuses (e.g., \"draft,review\")\n}\n\n/**\n * Get contents from a collection\n */\nexport async function getCollectionContents(\n slug: string,\n options?: CollectionContentsOptions\n): Promise<CollectionContentsResponse> {\n const params = new URLSearchParams()\n if (options?.sortBy) params.set(\"sortBy\", options.sortBy)\n if (options?.sortOrder) params.set(\"sortOrder\", options.sortOrder)\n if (options?.limit) params.set(\"limit\", String(options.limit))\n if (options?.offset) params.set(\"offset\", String(options.offset))\n if (options?.status) params.set(\"status\", options.status)\n\n const query = params.toString()\n return sdkFetchWithTags<CollectionContentsResponse>(\n `/collections/${encodeURIComponent(slug)}/contents${query ? `?${query}` : \"\"}`,\n [CACHE_TAGS.collections, CACHE_TAGS.collection(slug)],\n options?.revalidate\n )\n}\n\n/**\n * Get a specific content detail with resolved references\n */\nexport async function getCollectionContentDetail(\n collectionSlug: string,\n contentSlug: string,\n options?: FetchOptions\n): Promise<CollectionContentDetailResponse> {\n return sdkFetchWithTags<CollectionContentDetailResponse>(\n `/collections/${encodeURIComponent(collectionSlug)}/contents/${encodeURIComponent(contentSlug)}`,\n [\n CACHE_TAGS.collections,\n CACHE_TAGS.collection(collectionSlug),\n CACHE_TAGS.content(collectionSlug, contentSlug),\n ],\n options?.revalidate\n )\n}\n\n/**\n * Options for fetching data entries\n */\nexport interface DataEntriesOptions extends FetchOptions {\n sortBy?: string\n sortOrder?: string\n limit?: number\n offset?: number\n status?: string // \"published\" (default) or \"all\"\n}\n\n/**\n * Get data entries for a data type\n */\nexport async function getDataEntries(\n typeSlug: string,\n options?: DataEntriesOptions\n): Promise<DataListResponse> {\n const params = new URLSearchParams()\n if (options?.sortBy) params.set(\"sortBy\", options.sortBy)\n if (options?.sortOrder) params.set(\"sortOrder\", options.sortOrder)\n if (options?.limit) params.set(\"limit\", String(options.limit))\n if (options?.offset) params.set(\"offset\", String(options.offset))\n if (options?.status) params.set(\"status\", options.status)\n\n const query = params.toString()\n return sdkFetchWithTags<DataListResponse>(\n `/data/${encodeURIComponent(typeSlug)}${query ? `?${query}` : \"\"}`,\n [CACHE_TAGS.data, CACHE_TAGS.dataType(typeSlug)],\n options?.revalidate\n )\n}\n\n/**\n * Get a single data entry\n */\nexport async function getDataEntry(\n typeSlug: string,\n id: string,\n options?: FetchOptions\n): Promise<DataEntryItem> {\n return sdkFetchWithTags<DataEntryItem>(\n `/data/${encodeURIComponent(typeSlug)}/${encodeURIComponent(id)}`,\n [CACHE_TAGS.data, CACHE_TAGS.dataType(typeSlug)],\n options?.revalidate\n )\n}\n\n// ============================================\n// OrThrow variants — throw on failure instead of returning null/undefined\n// ============================================\n\n/**\n * Get contents from a collection, or throw an error\n */\nexport async function getCollectionContentsOrThrow(\n slug: string,\n options?: CollectionContentsOptions\n): Promise<CollectionContentsResponse> {\n const result = await getCollectionContents(slug, options)\n if (!result) throw new Error(`Failed to fetch collection contents: ${slug}`)\n return result\n}\n\n/**\n * Get a specific content detail, or throw an error\n */\nexport async function getCollectionContentDetailOrThrow(\n collectionSlug: string,\n contentSlug: string,\n options?: FetchOptions\n): Promise<CollectionContentDetailResponse> {\n const result = await getCollectionContentDetail(collectionSlug, contentSlug, options)\n if (!result) throw new Error(`Failed to fetch content detail: ${collectionSlug}/${contentSlug}`)\n return result\n}\n\n/**\n * Get data entries for a data type, or throw an error\n */\nexport async function getDataEntriesOrThrow(\n typeSlug: string,\n options?: DataEntriesOptions\n): Promise<DataListResponse> {\n const result = await getDataEntries(typeSlug, options)\n if (!result) throw new Error(`Failed to fetch data entries: ${typeSlug}`)\n return result\n}\n\n/**\n * Get a single data entry, or throw an error\n */\nexport async function getDataEntryOrThrow(\n typeSlug: string,\n id: string,\n options?: FetchOptions\n): Promise<DataEntryItem> {\n const result = await getDataEntry(typeSlug, id, options)\n if (!result) throw new Error(`Failed to fetch data entry: ${typeSlug}/${id}`)\n return result\n}\n\n/**\n * Get preview content by token (no authentication required)\n * Returns null if the token is invalid or expired.\n */\nexport async function getPreviewByToken(token: string): Promise<PreviewResponse | null> {\n try {\n const baseUrl = getSdkApiBaseUrl()\n const response = await fetch(`${baseUrl}/preview/${encodeURIComponent(token)}`, {\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n cache: \"no-store\",\n })\n\n if (!response.ok) {\n return null\n }\n\n return response.json()\n } catch (error) {\n console.error(\"Error fetching preview:\", error)\n return null\n }\n}\n\n/**\n * Get the workspace schema (collections, data types, forms)\n */\nexport async function getSchema(\n options?: FetchOptions\n): Promise<SchemaResponse> {\n return sdkFetchWithTags<SchemaResponse>(\n \"/schema\",\n [CACHE_TAGS.collections, CACHE_TAGS.data],\n options?.revalidate\n )\n}\n\n/**\n * Get all collections in the workspace\n */\nexport async function getCollections(\n options?: FetchOptions\n): Promise<SchemaResponse[\"collections\"]> {\n const schema = await getSchema(options)\n return schema.collections\n}\n\n/**\n * Submit data to a public form\n * Only works for data types with publicSubmission enabled.\n * Submissions are saved as \"pending\" for admin review.\n */\nexport async function submitFormData(\n typeSlug: string,\n data: Record<string, unknown>\n): Promise<{ success: true; id: string }> {\n return sdkPostFetcher<{ success: true; id: string }>(\n `/submissions/${encodeURIComponent(typeSlug)}`,\n { data }\n )\n}\n\n/**\n * Get runtime settings for starter kit deployment/runtime behavior.\n */\nexport async function fetchRuntimeSettings(): Promise<SdkRuntimeSettingsResponse> {\n const response = await getRuntimeSettings()\n if (response.status !== 200) {\n throw new Error(`Failed to fetch runtime settings: ${response.status}`)\n }\n return response.data\n}\n\n/**\n * Get daily analytics metrics collected by CMX.\n */\nexport async function fetchAnalyticsDailyMetrics(\n params?: GetAnalyticsDailyParams\n): Promise<SdkAnalyticsDailyListResponse> {\n const response = await getAnalyticsDaily(params)\n if (response.status !== 200) {\n throw new Error(`Failed to fetch analytics daily metrics: ${response.status}`)\n }\n return response.data\n}\n","import { ReactNode } from \"react\"\nimport { AlertCircle, AlertTriangle, CheckCircle, Info, Lightbulb } from \"lucide-react\"\n\ninterface CalloutProps {\n type?: \"info\" | \"warning\" | \"error\" | \"success\" | \"tip\"\n title?: string\n children: ReactNode\n}\n\nconst icons = {\n info: Info,\n warning: AlertTriangle,\n error: AlertCircle,\n success: CheckCircle,\n tip: Lightbulb,\n}\n\nconst styles = {\n info: \"cmx-mdx__callout--info\",\n warning: \"cmx-mdx__callout--warning\",\n error: \"cmx-mdx__callout--error\",\n success: \"cmx-mdx__callout--success\",\n tip: \"cmx-mdx__callout--tip\",\n}\n\nexport function Callout({ type = \"info\", title, children }: CalloutProps) {\n const Icon = icons[type]\n\n return (\n <div className={`cmx-mdx__callout ${styles[type]}`}>\n <div className=\"cmx-mdx__callout-content flex gap-3\">\n <Icon className=\"cmx-mdx__callout-icon flex-shrink-0\" />\n <div className=\"cmx-mdx__callout-body flex-1\">\n {title && <p className=\"cmx-mdx__callout-title\">{title}</p>}\n <div className=\"cmx-mdx__callout-text\">{children}</div>\n </div>\n </div>\n </div>\n )\n}\n","import Link from \"next/link\"\nimport { ReactNode } from \"react\"\n\ninterface ButtonProps {\n href: string\n children: ReactNode\n variant?: \"primary\" | \"secondary\" | \"outline\"\n}\n\nconst variants = {\n primary: \"cmx-mdx__button--primary\",\n secondary: \"cmx-mdx__button--secondary\",\n outline: \"cmx-mdx__button--outline\",\n}\n\nexport function Button({ href, children, variant = \"primary\" }: ButtonProps) {\n const isExternal = href.startsWith(\"http\")\n\n const className = `cmx-mdx__button ${variants[variant]}`\n\n if (isExternal) {\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={className}\n >\n {children}\n </a>\n )\n }\n\n return (\n <Link href={href} className={className}>\n {children}\n </Link>\n )\n}\n","interface EmbedProps {\n url: string\n}\n\nexport function Embed({ url }: EmbedProps) {\n return (\n <div className=\"cmx-mdx__embed cmx-mdx__embed--generic aspect-video\">\n <iframe\n src={url}\n className=\"cmx-mdx__embed-iframe w-full h-full\"\n allowFullScreen\n />\n </div>\n )\n}\n","interface YouTubeProps {\n url: string\n start?: number\n}\n\nfunction extractYouTubeId(url: string): string | null {\n const patterns = [\n /(?:youtube\\.com\\/watch\\?v=|youtu\\.be\\/|youtube\\.com\\/embed\\/)([^&\\n?#]+)/,\n ]\n for (const pattern of patterns) {\n const match = url.match(pattern)\n if (match) return match[1]\n }\n return null\n}\n\nexport function YouTube({ url, start }: YouTubeProps) {\n const videoId = extractYouTubeId(url)\n if (!videoId) {\n return (\n <div className=\"cmx-mdx__youtube cmx-mdx__youtube--error\">\n <p className=\"cmx-mdx__error-text\">無効なYouTube URL: {url}</p>\n </div>\n )\n }\n\n const embedUrl = `https://www.youtube.com/embed/${videoId}${start ? `?start=${start}` : \"\"}`\n\n return (\n <div className=\"cmx-mdx__youtube aspect-video\">\n <iframe\n src={embedUrl}\n className=\"cmx-mdx__youtube-iframe w-full h-full\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\"\n allowFullScreen\n />\n </div>\n )\n}\n","\"use client\"\n\nimport { useEffect, useRef } from \"react\"\n\ndeclare global {\n interface Window {\n twttr?: { widgets: { load: (el?: HTMLElement) => void } }\n }\n}\n\ninterface TwitterProps {\n url: string\n}\n\nexport function Twitter({ url }: TwitterProps) {\n const containerRef = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n const run = () => {\n window.twttr?.widgets.load(containerRef.current ?? undefined)\n }\n\n if (window.twttr) {\n run()\n return\n }\n\n const selector = 'script[src=\"https://platform.twitter.com/widgets.js\"]'\n const existing = document.querySelector<HTMLScriptElement>(selector)\n\n if (existing) {\n existing.addEventListener(\"load\", run, { once: true })\n return () => existing.removeEventListener(\"load\", run)\n }\n\n const script = document.createElement(\"script\")\n script.src = \"https://platform.twitter.com/widgets.js\"\n script.async = true\n script.onload = run\n document.body.appendChild(script)\n\n return () => {\n script.onload = null\n }\n }, [url])\n\n return (\n <div key={url} ref={containerRef} className=\"cmx-mdx__twitter\">\n <blockquote className=\"twitter-tweet\">\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"cmx-mdx__twitter-fallback-link break-all\"\n >\n {url}\n </a>\n </blockquote>\n </div>\n )\n}\n","\"use client\"\n\nimport { useEffect } from \"react\"\n\ndeclare global {\n interface Window {\n instgrm?: { Embeds: { process: () => void } }\n }\n}\n\ninterface InstagramProps {\n url: string\n}\n\nexport function Instagram({ url }: InstagramProps) {\n useEffect(() => {\n const run = () => window.instgrm?.Embeds.process()\n\n if (window.instgrm) {\n run()\n return\n }\n\n const selector = 'script[src=\"https://www.instagram.com/embed.js\"]'\n const existing = document.querySelector<HTMLScriptElement>(selector)\n\n if (existing) {\n existing.addEventListener(\"load\", run, { once: true })\n return () => existing.removeEventListener(\"load\", run)\n }\n\n const script = document.createElement(\"script\")\n script.src = \"https://www.instagram.com/embed.js\"\n script.async = true\n script.onload = run\n document.body.appendChild(script)\n\n return () => {\n script.onload = null\n }\n }, [url])\n\n return (\n <div key={url} className=\"cmx-mdx__instagram\">\n <blockquote\n className=\"instagram-media cmx-mdx__instagram-embed\"\n data-instgrm-permalink={url}\n data-instgrm-version=\"14\"\n >\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"cmx-mdx__instagram-link break-all\"\n >\n {url}\n </a>\n </blockquote>\n </div>\n )\n}\n","interface TikTokProps {\n url: string\n}\n\nfunction extractTikTokVideoId(url: string): string | null {\n const match = url.match(/\\/video\\/(\\d+)/)\n return match ? match[1] : null\n}\n\nexport function TikTok({ url }: TikTokProps) {\n const videoId = extractTikTokVideoId(url)\n if (!videoId) {\n return (\n <div className=\"cmx-mdx__tiktok cmx-mdx__tiktok--error\">\n <p className=\"cmx-mdx__tiktok-label\">TikTok</p>\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"cmx-mdx__tiktok-link break-all\"\n >\n {url}\n </a>\n </div>\n )\n }\n\n return (\n <div className=\"cmx-mdx__tiktok\">\n <iframe\n src={`https://www.tiktok.com/embed/v2/${videoId}`}\n className=\"cmx-mdx__tiktok-iframe w-full border-0\"\n style={{ height: 740, maxWidth: 325 }}\n allowFullScreen\n allow=\"encrypted-media\"\n />\n </div>\n )\n}\n","interface BlueskyProps {\n url: string\n}\n\nexport function Bluesky({ url }: BlueskyProps) {\n return (\n <div className=\"cmx-mdx__bluesky\">\n <p className=\"cmx-mdx__bluesky-label\">Bluesky</p>\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"cmx-mdx__bluesky-link break-all\"\n >\n {url}\n </a>\n </div>\n )\n}\n","interface VimeoProps {\n url: string\n}\n\nfunction extractVimeoId(url: string): string | null {\n const match = url.match(/vimeo\\.com\\/(\\d+)/)\n return match ? match[1] : null\n}\n\nexport function Vimeo({ url }: VimeoProps) {\n const videoId = extractVimeoId(url)\n if (!videoId) {\n return (\n <div className=\"cmx-mdx__vimeo cmx-mdx__vimeo--error\">\n <p className=\"cmx-mdx__error-text\">無効なVimeo URL: {url}</p>\n </div>\n )\n }\n\n return (\n <div className=\"cmx-mdx__vimeo aspect-video\">\n <iframe\n src={`https://player.vimeo.com/video/${videoId}`}\n className=\"cmx-mdx__vimeo-iframe w-full h-full\"\n allow=\"autoplay; fullscreen; picture-in-picture\"\n allowFullScreen\n />\n </div>\n )\n}\n","interface SpotifyProps {\n url: string\n theme?: \"light\" | \"dark\"\n}\n\nfunction toSpotifyEmbedUrl(url: string): string | null {\n const match = url.match(/open\\.spotify\\.com\\/(track|album|playlist|episode|show)\\/([^?#]+)/)\n if (!match) return null\n return `https://open.spotify.com/embed/${match[1]}/${match[2]}`\n}\n\nexport function Spotify({ url, theme = \"light\" }: SpotifyProps) {\n const embedUrl = toSpotifyEmbedUrl(url)\n if (!embedUrl) {\n return (\n <div className=\"cmx-mdx__spotify cmx-mdx__spotify--error\">\n <p className=\"cmx-mdx__error-text\">無効なSpotify URL: {url}</p>\n </div>\n )\n }\n\n const src = `${embedUrl}?theme=${theme === \"dark\" ? \"0\" : \"1\"}`\n\n return (\n <div className=\"cmx-mdx__spotify\">\n <iframe\n src={src}\n className=\"cmx-mdx__spotify-iframe w-full border-0\"\n height={152}\n allow=\"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture\"\n loading=\"lazy\"\n />\n </div>\n )\n}\n","interface GistProps {\n url: string\n}\n\nfunction extractGistId(url: string): { user: string; id: string } | null {\n const match = url.match(/gist\\.github\\.com\\/([^/]+)\\/([a-f0-9]+)/)\n if (!match) return null\n return { user: match[1], id: match[2] }\n}\n\nexport function Gist({ url }: GistProps) {\n const gist = extractGistId(url)\n if (!gist) {\n return (\n <div className=\"cmx-mdx__gist cmx-mdx__gist--error\">\n <p className=\"cmx-mdx__error-text\">無効なGist URL: {url}</p>\n </div>\n )\n }\n\n return (\n <div className=\"cmx-mdx__gist\">\n <iframe\n src={`https://gist.github.com/${gist.user}/${gist.id}.pibb`}\n className=\"cmx-mdx__gist-iframe w-full\"\n style={{ minHeight: 200 }}\n />\n </div>\n )\n}\n","interface CodePenProps {\n url: string\n height?: number\n defaultTab?: \"html\" | \"css\" | \"js\" | \"result\"\n}\n\nfunction toCodePenEmbedUrl(url: string): string | null {\n const match = url.match(/codepen\\.io\\/([^/]+)\\/(?:pen|full|details)\\/([^?#]+)/)\n if (!match) return null\n return `https://codepen.io/${match[1]}/embed/${match[2]}`\n}\n\nexport function CodePen({ url, height = 400, defaultTab = \"result\" }: CodePenProps) {\n const embedUrl = toCodePenEmbedUrl(url)\n if (!embedUrl) {\n return (\n <div className=\"cmx-mdx__codepen cmx-mdx__codepen--error\">\n <p className=\"cmx-mdx__error-text\">無効なCodePen URL: {url}</p>\n </div>\n )\n }\n\n const src = `${embedUrl}?default-tab=${defaultTab}&editable=true`\n\n return (\n <div className=\"cmx-mdx__codepen\">\n <iframe\n src={src}\n className=\"cmx-mdx__codepen-iframe w-full\"\n style={{ height }}\n loading=\"lazy\"\n allowFullScreen\n />\n </div>\n )\n}\n","interface CodeSandboxProps {\n url: string\n height?: number\n}\n\nfunction toCodeSandboxEmbedUrl(url: string): string | null {\n const match = url.match(/codesandbox\\.io\\/(?:s|p)\\/([^?#]+)/)\n if (!match) return null\n return `https://codesandbox.io/embed/${match[1]}`\n}\n\nexport function CodeSandbox({ url, height = 500 }: CodeSandboxProps) {\n const embedUrl = toCodeSandboxEmbedUrl(url)\n if (!embedUrl) {\n return (\n <div className=\"cmx-mdx__codesandbox cmx-mdx__codesandbox--error\">\n <p className=\"cmx-mdx__error-text\">無効なCodeSandbox URL: {url}</p>\n </div>\n )\n }\n\n return (\n <div className=\"cmx-mdx__codesandbox\">\n <iframe\n src={embedUrl}\n className=\"cmx-mdx__codesandbox-iframe w-full\"\n style={{ height }}\n allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\"\n sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"\n />\n </div>\n )\n}\n","interface GoogleMapProps {\n url: string\n height?: number\n}\n\nexport function GoogleMap({ url, height = 450 }: GoogleMapProps) {\n let embedUrl = url\n if (!url.includes(\"/maps/embed\")) {\n embedUrl = url\n }\n\n return (\n <div className=\"cmx-mdx__googlemap\">\n <iframe\n src={embedUrl}\n className=\"cmx-mdx__googlemap-iframe w-full\"\n style={{ height }}\n allowFullScreen\n loading=\"lazy\"\n referrerPolicy=\"no-referrer-when-downgrade\"\n />\n </div>\n )\n}\n","import { ReactNode } from \"react\"\n\ninterface DetailsProps {\n summary: string\n children: ReactNode\n}\n\nexport function Details({ summary, children }: DetailsProps) {\n return (\n <details className=\"cmx-mdx__details\">\n <summary className=\"cmx-mdx__details-summary cursor-pointer select-none\">\n {summary}\n </summary>\n <div className=\"cmx-mdx__details-content\">\n {children}\n </div>\n </details>\n )\n}\n","\"use client\"\n\nimport { ReactNode, useState, Children, isValidElement, ReactElement } from \"react\"\n\ninterface TabsProps {\n children: ReactNode\n}\n\ninterface TabProps {\n label: string\n children: ReactNode\n}\n\nexport function Tabs({ children }: TabsProps) {\n const [activeIndex, setActiveIndex] = useState(0)\n\n const tabs: { label: string; content: ReactNode }[] = []\n Children.forEach(children, (child) => {\n if (isValidElement(child) && (child as ReactElement<TabProps>).props.label) {\n const tabChild = child as ReactElement<TabProps>\n tabs.push({\n label: tabChild.props.label,\n content: tabChild.props.children,\n })\n }\n })\n\n if (tabs.length === 0) return null\n\n return (\n <div className=\"cmx-mdx__tabs overflow-hidden\">\n <div className=\"cmx-mdx__tabs-header flex\" role=\"tablist\">\n {tabs.map((tab, i) => (\n <button\n key={i}\n role=\"tab\"\n aria-selected={i === activeIndex}\n className={`cmx-mdx__tabs-button ${\n i === activeIndex ? \"cmx-mdx__tabs-button--active\" : \"\"\n }`}\n onClick={() => setActiveIndex(i)}\n >\n {tab.label}\n </button>\n ))}\n </div>\n <div className=\"cmx-mdx__tabs-content\" role=\"tabpanel\">\n {tabs[activeIndex]?.content}\n </div>\n </div>\n )\n}\n\nexport function Tab({ children }: TabProps) {\n return <div className=\"cmx-mdx__tab\">{children}</div>\n}\n","import { ReactNode } from \"react\"\n\ninterface ColumnsProps {\n cols?: number\n children: ReactNode\n}\n\ninterface ColumnProps {\n children: ReactNode\n}\n\nconst gridClasses: Record<number, string> = {\n 2: \"grid-cols-1 md:grid-cols-2\",\n 3: \"grid-cols-1 md:grid-cols-3\",\n 4: \"grid-cols-1 md:grid-cols-2 lg:grid-cols-4\",\n}\n\nexport function Columns({ cols = 2, children }: ColumnsProps) {\n const gridClass = gridClasses[cols] || gridClasses[2]\n\n return (\n <div className={`cmx-mdx__columns grid gap-4 ${gridClass}`}>\n {children}\n </div>\n )\n}\n\nexport function Column({ children }: ColumnProps) {\n return (\n <div className=\"cmx-mdx__column\">\n {children}\n </div>\n )\n}\n","interface AudioProps {\n src: string\n title?: string\n}\n\nexport function Audio({ src, title }: AudioProps) {\n return (\n <div className=\"cmx-mdx__audio\">\n {title && (\n <p className=\"cmx-mdx__audio-title\">{title}</p>\n )}\n <audio\n src={src}\n controls\n className=\"cmx-mdx__audio-player w-full\"\n preload=\"metadata\"\n />\n </div>\n )\n}\n","interface VideoProps {\n src: string\n title?: string\n poster?: string\n}\n\nexport function Video({ src, title, poster }: VideoProps) {\n return (\n <div className=\"cmx-mdx__video\">\n {title && (\n <p className=\"cmx-mdx__video-title\">{title}</p>\n )}\n <video\n src={src}\n poster={poster}\n controls\n className=\"cmx-mdx__video-player w-full\"\n preload=\"metadata\"\n />\n </div>\n )\n}\n","import { Download } from \"lucide-react\"\n\ninterface FileDownloadProps {\n url: string\n filename?: string\n size?: string\n}\n\nexport function FileDownload({ url, filename, size }: FileDownloadProps) {\n const displayName = filename || url.split(\"/\").pop() || \"ファイル\"\n\n return (\n <div className=\"cmx-mdx__filedownload flex items-center gap-3\">\n <Download className=\"cmx-mdx__filedownload-icon flex-shrink-0\" />\n <div className=\"cmx-mdx__filedownload-info flex-1 min-w-0\">\n <a\n href={url}\n download\n className=\"cmx-mdx__filedownload-link truncate block\"\n >\n {displayName}\n </a>\n {size && (\n <p className=\"cmx-mdx__filedownload-size\">{size}</p>\n )}\n </div>\n </div>\n )\n}\n","interface TableOfContentsProps {\n maxDepth?: number\n}\n\nexport function TableOfContents({ maxDepth = 3 }: TableOfContentsProps) {\n return (\n <nav\n className=\"cmx-mdx__toc\"\n aria-label=\"目次\"\n data-max-depth={maxDepth}\n >\n <p className=\"cmx-mdx__toc-title\">目次</p>\n <p className=\"cmx-mdx__toc-placeholder\">\n 目次はレンダリング時に自動生成されます\n </p>\n </nav>\n )\n}\n","// CMX Basic MDX Components\n// テンプレートとして提供する標準コンポーネント\n// クラス名: cmx-mdx__[component], cmx-mdx__[component]-[element], cmx-mdx__[component]--[modifier]\n\n// content\nexport { Callout } from \"./Callout\"\nexport { Button } from \"./Button\"\n\n// embed\nexport { Embed } from \"./Embed\"\nexport { YouTube } from \"./YouTube\"\nexport { Twitter } from \"./Twitter\"\nexport { Instagram } from \"./Instagram\"\nexport { TikTok } from \"./TikTok\"\nexport { Bluesky } from \"./Bluesky\"\nexport { Vimeo } from \"./Vimeo\"\nexport { Spotify } from \"./Spotify\"\nexport { Gist } from \"./Gist\"\nexport { CodePen } from \"./CodePen\"\nexport { CodeSandbox } from \"./CodeSandbox\"\nexport { GoogleMap } from \"./GoogleMap\"\n\n// layout\nexport { Details } from \"./Details\"\nexport { Tabs, Tab } from \"./Tabs\"\nexport { Columns, Column } from \"./Columns\"\n\n// media\nexport { Audio } from \"./Audio\"\nexport { Video } from \"./Video\"\n\n// utility\nexport { FileDownload } from \"./FileDownload\"\nexport { TableOfContents } from \"./TableOfContents\"\n\nimport { Callout } from \"./Callout\"\nimport { Button } from \"./Button\"\nimport { Embed } from \"./Embed\"\nimport { YouTube } from \"./YouTube\"\nimport { Twitter } from \"./Twitter\"\nimport { Instagram } from \"./Instagram\"\nimport { TikTok } from \"./TikTok\"\nimport { Bluesky } from \"./Bluesky\"\nimport { Vimeo } from \"./Vimeo\"\nimport { Spotify } from \"./Spotify\"\nimport { Gist } from \"./Gist\"\nimport { CodePen } from \"./CodePen\"\nimport { CodeSandbox } from \"./CodeSandbox\"\nimport { GoogleMap } from \"./GoogleMap\"\nimport { Details } from \"./Details\"\nimport { Tabs, Tab } from \"./Tabs\"\nimport { Columns, Column } from \"./Columns\"\nimport { Audio } from \"./Audio\"\nimport { Video } from \"./Video\"\nimport { FileDownload } from \"./FileDownload\"\nimport { TableOfContents } from \"./TableOfContents\"\n\nexport const basicComponents = {\n Callout,\n Button,\n Embed,\n YouTube,\n Twitter,\n Instagram,\n TikTok,\n Bluesky,\n Vimeo,\n Spotify,\n Gist,\n CodePen,\n CodeSandbox,\n GoogleMap,\n Details,\n Tabs,\n Tab,\n Columns,\n Column,\n Audio,\n Video,\n FileDownload,\n TableOfContents,\n}\n","import Link from \"next/link\"\n\ninterface BlogCardProps {\n contentId: string\n title?: string\n slug?: string\n excerpt?: string\n}\n\nexport function BlogCard({ contentId, title, slug, excerpt }: BlogCardProps) {\n if (!title || !slug) {\n return (\n <div className=\"cmx-mdx__blogcard cmx-mdx__blogcard--unresolved\">\n <p className=\"cmx-mdx__blogcard-text\">記事カード: {contentId}</p>\n </div>\n )\n }\n\n return (\n <Link\n href={`/${slug}`}\n className=\"cmx-mdx__blogcard-link\"\n >\n <h3 className=\"cmx-mdx__blogcard-title\">{title}</h3>\n {excerpt && <p className=\"cmx-mdx__blogcard-excerpt line-clamp-2\">{excerpt}</p>}\n </Link>\n )\n}\n","import NextImage from \"next/image\"\n\ninterface ImageProps {\n assetId: string\n alt?: string\n size?: \"thumbnail\" | \"medium\" | \"large\" | \"original\"\n caption?: string\n url?: string\n width?: number\n height?: number\n}\n\nexport function Image({\n assetId,\n alt = \"\",\n size = \"large\",\n caption,\n url,\n width,\n height,\n}: ImageProps) {\n if (!url) {\n return (\n <figure className=\"cmx-mdx__image\">\n <div className=\"cmx-mdx__image--unresolved\">\n <p className=\"cmx-mdx__image-id\">画像: {assetId}</p>\n <p className=\"cmx-mdx__image-size\">サイズ: {size}</p>\n </div>\n {caption && (\n <figcaption className=\"cmx-mdx__image-caption\">\n {caption}\n </figcaption>\n )}\n </figure>\n )\n }\n\n return (\n <figure className=\"cmx-mdx__image\">\n <NextImage\n src={url}\n alt={alt}\n width={width || 800}\n height={height || 600}\n className=\"cmx-mdx__image-img\"\n />\n {caption && (\n <figcaption className=\"cmx-mdx__image-caption\">\n {caption}\n </figcaption>\n )}\n </figure>\n )\n}\n","interface GalleryImage {\n assetId: string\n url?: string\n alt?: string\n}\n\ninterface GalleryProps {\n assetIds: string[]\n columns?: number\n caption?: string\n images?: GalleryImage[]\n}\n\nconst gridClasses: Record<number, string> = {\n 1: \"grid-cols-1\",\n 2: \"grid-cols-1 sm:grid-cols-2\",\n 3: \"grid-cols-1 sm:grid-cols-2 md:grid-cols-3\",\n 4: \"grid-cols-2 md:grid-cols-4\",\n 5: \"grid-cols-2 md:grid-cols-3 lg:grid-cols-5\",\n 6: \"grid-cols-2 md:grid-cols-3 lg:grid-cols-6\",\n}\n\nexport function Gallery({ assetIds, columns = 3, caption, images }: GalleryProps) {\n const gridClass = gridClasses[columns] || gridClasses[3]\n\n const items: GalleryImage[] = images || assetIds.map((id) => ({ assetId: id }))\n\n return (\n <figure className=\"cmx-mdx__gallery\">\n <div className={`cmx-mdx__gallery-grid grid gap-2 ${gridClass}`}>\n {items.map((item, i) => (\n <div\n key={item.assetId || i}\n className=\"cmx-mdx__gallery-item aspect-square overflow-hidden\"\n >\n {item.url ? (\n <img\n src={item.url}\n alt={item.alt || \"\"}\n className=\"cmx-mdx__gallery-image w-full h-full object-cover\"\n loading=\"lazy\"\n />\n ) : (\n <div className=\"cmx-mdx__gallery-placeholder w-full h-full flex items-center justify-center\">\n 画像\n </div>\n )}\n </div>\n ))}\n </div>\n {caption && (\n <figcaption className=\"cmx-mdx__gallery-caption\">\n {caption}\n </figcaption>\n )}\n </figure>\n )\n}\n","// CMX Custom MDX Components\n// プロジェクト固有のカスタムコンポーネント(reference解決が必要)\n// これらは企業ごとにカスタマイズされることを想定\n\nexport { BlogCard } from \"./BlogCard\"\nexport { Image } from \"./Image\"\nexport { Gallery } from \"./Gallery\"\n\nimport { BlogCard } from \"./BlogCard\"\nimport { Image } from \"./Image\"\nimport { Gallery } from \"./Gallery\"\n\nexport const customComponents = {\n BlogCard,\n Image,\n Gallery,\n}\n","// ============================================\n// Standard Markdown Element Components\n// These map to HTML elements generated from Markdown syntax\n// ============================================\n\ntype PropsWithChildren = { children?: React.ReactNode; [key: string]: unknown }\n\n// Headings: # ## ### #### ##### ######\nconst mdxH1 = ({ children, ...props }: PropsWithChildren) => (\n <h1 className=\"cmx-mdx__h1\" {...props}>{children}</h1>\n)\nconst mdxH2 = ({ children, ...props }: PropsWithChildren) => (\n <h2 className=\"cmx-mdx__h2\" {...props}>{children}</h2>\n)\nconst mdxH3 = ({ children, ...props }: PropsWithChildren) => (\n <h3 className=\"cmx-mdx__h3\" {...props}>{children}</h3>\n)\nconst mdxH4 = ({ children, ...props }: PropsWithChildren) => (\n <h4 className=\"cmx-mdx__h4\" {...props}>{children}</h4>\n)\nconst mdxH5 = ({ children, ...props }: PropsWithChildren) => (\n <h5 className=\"cmx-mdx__h5\" {...props}>{children}</h5>\n)\nconst mdxH6 = ({ children, ...props }: PropsWithChildren) => (\n <h6 className=\"cmx-mdx__h6\" {...props}>{children}</h6>\n)\n\n// Paragraph\nconst mdxP = ({ children, ...props }: PropsWithChildren) => (\n <p className=\"cmx-mdx__p\" {...props}>{children}</p>\n)\n\n// Lists: - item / 1. item\nconst mdxUl = ({ children, ...props }: PropsWithChildren) => (\n <ul className=\"cmx-mdx__ul\" {...props}>{children}</ul>\n)\nconst mdxOl = ({ children, ...props }: PropsWithChildren) => (\n <ol className=\"cmx-mdx__ol\" {...props}>{children}</ol>\n)\nconst mdxLi = ({ children, ...props }: PropsWithChildren) => (\n <li className=\"cmx-mdx__li\" {...props}>{children}</li>\n)\n\n// Blockquote: > quote\nconst mdxBlockquote = ({ children, ...props }: PropsWithChildren) => (\n <blockquote className=\"cmx-mdx__blockquote\" {...props}>\n {children}\n </blockquote>\n)\n\n// Code: ```code``` and `inline`\nconst mdxPre = ({ children, ...props }: PropsWithChildren) => (\n <pre className=\"cmx-mdx__pre\" {...props}>\n {children}\n </pre>\n)\nconst mdxCode = ({ children, ...props }: PropsWithChildren) => (\n <code className=\"cmx-mdx__code\" {...props}>\n {children}\n </code>\n)\n\n// Horizontal rule: ---\nconst mdxHr = () => (\n <hr className=\"cmx-mdx__hr\" />\n)\n\n// Links: [text](url)\nconst mdxA = ({ children, href, ...props }: PropsWithChildren & { href?: string }) => (\n <a\n href={href}\n className=\"cmx-mdx__a\"\n target={href?.startsWith(\"http\") ? \"_blank\" : undefined}\n rel={href?.startsWith(\"http\") ? \"noopener noreferrer\" : undefined}\n {...props}\n >\n {children}\n </a>\n)\n\n// Images: ![alt](url)\nconst mdxImg = ({ src, alt, ...props }: { src?: string; alt?: string; [key: string]: unknown }) => (\n // eslint-disable-next-line @next/next/no-img-element\n <img\n src={src}\n alt={alt || \"\"}\n className=\"cmx-mdx__img\"\n {...props}\n />\n)\n\n// Text formatting: **bold** *italic*\nconst mdxStrong = ({ children, ...props }: PropsWithChildren) => (\n <strong className=\"cmx-mdx__strong\" {...props}>{children}</strong>\n)\nconst mdxEm = ({ children, ...props }: PropsWithChildren) => (\n <em className=\"cmx-mdx__em\" {...props}>{children}</em>\n)\n\n// Tables (GFM)\nconst mdxTable = ({ children, ...props }: PropsWithChildren) => (\n <div className=\"cmx-mdx__table-wrapper\">\n <table className=\"cmx-mdx__table\" {...props}>\n {children}\n </table>\n </div>\n)\nconst mdxThead = ({ children, ...props }: PropsWithChildren) => (\n <thead className=\"cmx-mdx__thead\" {...props}>{children}</thead>\n)\nconst mdxTbody = ({ children, ...props }: PropsWithChildren) => (\n <tbody {...props}>{children}</tbody>\n)\nconst mdxTr = ({ children, ...props }: PropsWithChildren) => (\n <tr className=\"cmx-mdx__tr\" {...props}>{children}</tr>\n)\nconst mdxTh = ({ children, ...props }: PropsWithChildren) => (\n <th className=\"cmx-mdx__th\" {...props}>{children}</th>\n)\nconst mdxTd = ({ children, ...props }: PropsWithChildren) => (\n <td className=\"cmx-mdx__td\" {...props}>{children}</td>\n)\n\n/**\n * Standard markdown element mappings for MDX\n * Use with MDX's components prop: <MDXContent components={markdownComponents} />\n */\nexport const markdownComponents = {\n h1: mdxH1,\n h2: mdxH2,\n h3: mdxH3,\n h4: mdxH4,\n h5: mdxH5,\n h6: mdxH6,\n p: mdxP,\n ul: mdxUl,\n ol: mdxOl,\n li: mdxLi,\n blockquote: mdxBlockquote,\n pre: mdxPre,\n code: mdxCode,\n hr: mdxHr,\n a: mdxA,\n img: mdxImg,\n strong: mdxStrong,\n em: mdxEm,\n table: mdxTable,\n thead: mdxThead,\n tbody: mdxTbody,\n tr: mdxTr,\n th: mdxTh,\n td: mdxTd,\n}\n","// MDX Components\n// basic: CMXテンプレート(cmx-mdx__プレフィックス付き)\n// custom: プロジェクト固有(reference解決が必要)\n// markdown: 標準Markdown要素(h1, p, ul, etc.)\n\n// Basic Components (CMX templates)\nexport {\n Callout, Embed, Button,\n YouTube, Twitter, Instagram, TikTok, Bluesky,\n Vimeo, Spotify, Gist, CodePen, CodeSandbox, GoogleMap,\n Details, Tabs, Tab, Columns, Column,\n Audio, Video, FileDownload, TableOfContents,\n basicComponents,\n} from \"./basic\"\n\n// Custom Components (project-specific)\nexport { BlogCard, Image, Gallery, customComponents } from \"./custom\"\n\n// Standard Markdown Element Components\nexport { markdownComponents } from \"./markdown\"\n\n// Combined MDX Component Map\nimport { basicComponents } from \"./basic\"\nimport { customComponents } from \"./custom\"\nimport { markdownComponents } from \"./markdown\"\n\nexport const mdxComponents = {\n ...markdownComponents,\n ...basicComponents,\n ...customComponents,\n}\n","import { z } from \"zod\"\n\n// ============================================\n// Component Props Schema Definitions\n// ============================================\n\nexport const componentSchemas = {\n // --- content ---\n Callout: z.object({\n type: z\n .enum([\"info\", \"warning\", \"error\", \"success\", \"tip\"])\n .default(\"info\")\n .describe(\"タイプ\"),\n title: z.string().optional().describe(\"タイトル\"),\n children: z.string().describe(\"本文(Markdown可)\"),\n }),\n\n Button: z.object({\n href: z.string().describe(\"リンク先URL\"),\n children: z.string().describe(\"ボタンテキスト\"),\n variant: z.enum([\"primary\", \"secondary\", \"outline\"]).default(\"primary\").describe(\"スタイル\"),\n }),\n\n // --- media ---\n Image: z.object({\n assetId: z.string().uuid().describe(\"アセットのUUID\"),\n alt: z.string().optional().describe(\"代替テキスト\"),\n size: z\n .enum([\"thumbnail\", \"medium\", \"large\", \"original\"])\n .default(\"large\")\n .describe(\"表示サイズ\"),\n caption: z.string().optional().describe(\"キャプション\"),\n }),\n\n Audio: z.object({\n src: z.string().url().describe(\"音声ファイルURL\"),\n title: z.string().optional().describe(\"タイトル\"),\n }),\n\n Video: z.object({\n src: z.string().url().describe(\"動画ファイルURL\"),\n title: z.string().optional().describe(\"タイトル\"),\n poster: z.string().url().optional().describe(\"ポスター画像URL\"),\n }),\n\n Gallery: z.object({\n assetIds: z.array(z.string().uuid()).describe(\"アセットUUIDの配列\"),\n columns: z.number().min(1).max(6).default(3).describe(\"列数\"),\n caption: z.string().optional().describe(\"キャプション\"),\n }),\n\n // --- reference ---\n BlogCard: z.object({\n contentId: z.string().uuid().describe(\"参照先コンテンツのUUID\"),\n }),\n\n // --- embed ---\n YouTube: z.object({\n url: z.string().url().describe(\"YouTube動画URL\"),\n start: z.number().optional().describe(\"開始秒数\"),\n }),\n\n Twitter: z.object({\n url: z.string().url().describe(\"ツイートURL\"),\n }),\n\n Instagram: z.object({\n url: z.string().url().describe(\"Instagram投稿URL\"),\n }),\n\n TikTok: z.object({\n url: z.string().url().describe(\"TikTok動画URL\"),\n }),\n\n Bluesky: z.object({\n url: z.string().url().describe(\"BlueskyポストURL\"),\n }),\n\n Vimeo: z.object({\n url: z.string().url().describe(\"Vimeo動画URL\"),\n }),\n\n Spotify: z.object({\n url: z.string().url().describe(\"SpotifyコンテンツURL\"),\n theme: z.enum([\"light\", \"dark\"]).default(\"light\").describe(\"テーマ\"),\n }),\n\n Gist: z.object({\n url: z.string().url().describe(\"GitHub Gist URL\"),\n }),\n\n CodePen: z.object({\n url: z.string().url().describe(\"CodePen URL\"),\n height: z.number().default(400).describe(\"高さ(px)\"),\n defaultTab: z.enum([\"html\", \"css\", \"js\", \"result\"]).default(\"result\").describe(\"デフォルトタブ\"),\n }),\n\n CodeSandbox: z.object({\n url: z.string().url().describe(\"CodeSandbox URL\"),\n height: z.number().default(500).describe(\"高さ(px)\"),\n }),\n\n GoogleMap: z.object({\n url: z.string().url().describe(\"Google Maps URL\"),\n height: z.number().default(450).describe(\"高さ(px)\"),\n }),\n\n // --- layout ---\n Details: z.object({\n summary: z.string().describe(\"折りたたみの見出し\"),\n children: z.string().describe(\"折りたたまれる内容\"),\n }),\n\n Tabs: z.object({\n children: z.string().describe(\"Tabコンポーネントの並び\"),\n }),\n\n Tab: z.object({\n label: z.string().describe(\"タブのラベル\"),\n children: z.string().describe(\"タブの内容\"),\n }),\n\n Columns: z.object({\n cols: z.number().min(2).max(4).default(2).describe(\"列数\"),\n children: z.string().describe(\"Columnコンポーネントの並び\"),\n }),\n\n Column: z.object({\n children: z.string().describe(\"カラムの内容\"),\n }),\n\n // --- utility ---\n Embed: z.object({\n url: z.string().url().describe(\"埋め込みURL\"),\n }),\n\n FileDownload: z.object({\n url: z.string().url().describe(\"ファイルURL\"),\n filename: z.string().optional().describe(\"表示ファイル名\"),\n size: z.string().optional().describe(\"ファイルサイズ表示\"),\n }),\n\n TableOfContents: z.object({\n maxDepth: z.number().min(1).max(6).default(3).describe(\"見出しの最大深さ\"),\n }),\n} as const\n\n// ============================================\n// Component Catalog Type\n// ============================================\n\nexport type ComponentName = keyof typeof componentSchemas\nexport const COMPONENT_SOURCES = [\"standard\", \"custom\"] as const\nexport type ComponentSource = (typeof COMPONENT_SOURCES)[number]\nexport type ComponentKind = \"presentational\" | \"data-bound\"\nexport type ComponentCategory = \"content\" | \"media\" | \"reference\" | \"embed\" | \"layout\" | \"utility\"\n\nexport interface ComponentBinding {\n prop: string\n target: \"content\" | \"asset\" | \"dataEntry\"\n strategy: \"by-id\"\n}\n\nexport interface ComponentDefinition<T extends ComponentName = ComponentName> {\n name: T\n displayName: string\n description: string\n category: ComponentCategory\n schema: (typeof componentSchemas)[T]\n examples: string[]\n hasReferences: boolean\n source: \"standard\"\n kind: ComponentKind\n locked: true\n editable: false\n bindings?: ComponentBinding[]\n /** 子コンポーネントの場合、親コンポーネント名 */\n parentComponent?: ComponentName\n}\n\nexport interface CatalogForAIComponent {\n name: string\n description: string\n props: Record<string, { type: string; description?: string; required: boolean }>\n examples: string[]\n source: ComponentSource\n kind: ComponentKind\n locked: boolean\n editable: boolean\n bindings?: ComponentBinding[]\n parentComponent?: string\n}\n\n// ============================================\n// Component Catalog (Standard / Immutable)\n// ============================================\n\nexport const componentCatalog: Record<ComponentName, ComponentDefinition> = {\n // --- content ---\n Callout: {\n name: \"Callout\",\n displayName: \"コールアウト\",\n description: \"注意書きや補足情報を目立たせるボックス\",\n category: \"content\",\n schema: componentSchemas.Callout,\n examples: [\n '<Callout type=\"info\">これは情報です</Callout>',\n '<Callout type=\"warning\" title=\"注意\">重要な注意事項です</Callout>',\n ],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Button: {\n name: \"Button\",\n displayName: \"ボタン\",\n description: \"アクションを促すボタンリンク\",\n category: \"content\",\n schema: componentSchemas.Button,\n examples: [\n '<Button href=\"/contact\">お問い合わせ</Button>',\n '<Button href=\"https://example.com\" variant=\"secondary\">詳細を見る</Button>',\n ],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n // --- media ---\n Image: {\n name: \"Image\",\n displayName: \"画像\",\n description: \"アップロード済み画像を表示します\",\n category: \"media\",\n schema: componentSchemas.Image,\n examples: [\n '<Image assetId=\"123e4567-e89b-12d3-a456-426614174000\" alt=\"説明\" />',\n '<Image assetId=\"123e4567-e89b-12d3-a456-426614174000\" size=\"medium\" caption=\"キャプション\" />',\n ],\n hasReferences: true,\n source: \"standard\",\n kind: \"data-bound\",\n locked: true,\n editable: false,\n bindings: [{ prop: \"assetId\", target: \"asset\", strategy: \"by-id\" }],\n },\n\n Audio: {\n name: \"Audio\",\n displayName: \"音声プレイヤー\",\n description: \"音声ファイルを再生するプレイヤー\",\n category: \"media\",\n schema: componentSchemas.Audio,\n examples: ['<Audio src=\"https://example.com/podcast.mp3\" title=\"エピソード1\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Video: {\n name: \"Video\",\n displayName: \"動画プレイヤー\",\n description: \"セルフホスト動画を再生するプレイヤー\",\n category: \"media\",\n schema: componentSchemas.Video,\n examples: ['<Video src=\"https://example.com/video.mp4\" poster=\"https://example.com/thumb.jpg\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Gallery: {\n name: \"Gallery\",\n displayName: \"画像ギャラリー\",\n description: \"複数の画像をグリッドレイアウトで表示します\",\n category: \"media\",\n schema: componentSchemas.Gallery,\n examples: [\n '<Gallery assetIds={[\"uuid1\", \"uuid2\", \"uuid3\"]} />',\n '<Gallery assetIds={[\"uuid1\", \"uuid2\"]} columns={2} caption=\"写真集\" />',\n ],\n hasReferences: true,\n source: \"standard\",\n kind: \"data-bound\",\n locked: true,\n editable: false,\n bindings: [{ prop: \"assetIds\", target: \"asset\", strategy: \"by-id\" }],\n },\n\n // --- reference ---\n BlogCard: {\n name: \"BlogCard\",\n displayName: \"記事カード\",\n description: \"他の記事へのリンクカードを表示します\",\n category: \"reference\",\n schema: componentSchemas.BlogCard,\n examples: ['<BlogCard contentId=\"123e4567-e89b-12d3-a456-426614174000\" />'],\n hasReferences: true,\n source: \"standard\",\n kind: \"data-bound\",\n locked: true,\n editable: false,\n bindings: [{ prop: \"contentId\", target: \"content\", strategy: \"by-id\" }],\n },\n\n // --- embed ---\n YouTube: {\n name: \"YouTube\",\n displayName: \"YouTube\",\n description: \"YouTube動画を埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.YouTube,\n examples: [\n '<YouTube url=\"https://www.youtube.com/watch?v=dQw4w9WgXcQ\" />',\n '<YouTube url=\"https://youtu.be/dQw4w9WgXcQ\" start={30} />',\n ],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Twitter: {\n name: \"Twitter\",\n displayName: \"Twitter / X\",\n description: \"ツイート・ポストを埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.Twitter,\n examples: ['<Twitter url=\"https://twitter.com/example/status/123456789\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Instagram: {\n name: \"Instagram\",\n displayName: \"Instagram\",\n description: \"Instagram投稿を埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.Instagram,\n examples: ['<Instagram url=\"https://www.instagram.com/p/ABC123/\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n TikTok: {\n name: \"TikTok\",\n displayName: \"TikTok\",\n description: \"TikTok動画を埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.TikTok,\n examples: ['<TikTok url=\"https://www.tiktok.com/@user/video/123456789\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Bluesky: {\n name: \"Bluesky\",\n displayName: \"Bluesky\",\n description: \"Blueskyポストを埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.Bluesky,\n examples: ['<Bluesky url=\"https://bsky.app/profile/user.bsky.social/post/abc123\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Vimeo: {\n name: \"Vimeo\",\n displayName: \"Vimeo\",\n description: \"Vimeo動画を埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.Vimeo,\n examples: ['<Vimeo url=\"https://vimeo.com/123456789\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Spotify: {\n name: \"Spotify\",\n displayName: \"Spotify\",\n description: \"Spotify楽曲・プレイリストを埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.Spotify,\n examples: [\n '<Spotify url=\"https://open.spotify.com/track/xxx\" />',\n '<Spotify url=\"https://open.spotify.com/playlist/xxx\" theme=\"dark\" />',\n ],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Gist: {\n name: \"Gist\",\n displayName: \"GitHub Gist\",\n description: \"GitHub Gistのコードスニペットを埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.Gist,\n examples: ['<Gist url=\"https://gist.github.com/user/abc123\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n CodePen: {\n name: \"CodePen\",\n displayName: \"CodePen\",\n description: \"CodePenのライブデモを埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.CodePen,\n examples: ['<CodePen url=\"https://codepen.io/user/pen/abc123\" height={500} defaultTab=\"result\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n CodeSandbox: {\n name: \"CodeSandbox\",\n displayName: \"CodeSandbox\",\n description: \"CodeSandboxのライブデモを埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.CodeSandbox,\n examples: ['<CodeSandbox url=\"https://codesandbox.io/s/abc123\" height={500} />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n GoogleMap: {\n name: \"GoogleMap\",\n displayName: \"Google Maps\",\n description: \"Google Mapsの地図を埋め込みます\",\n category: \"embed\",\n schema: componentSchemas.GoogleMap,\n examples: ['<GoogleMap url=\"https://www.google.com/maps/embed?pb=...\" height={400} />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n // --- layout ---\n Details: {\n name: \"Details\",\n displayName: \"折りたたみ\",\n description: \"クリックで展開・折りたたみ可能なセクション\",\n category: \"layout\",\n schema: componentSchemas.Details,\n examples: ['<Details summary=\"詳細を見る\">折りたたまれた内容</Details>'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Tabs: {\n name: \"Tabs\",\n displayName: \"タブ\",\n description: \"タブで切り替え可能なコンテンツ\",\n category: \"layout\",\n schema: componentSchemas.Tabs,\n examples: ['<Tabs><Tab label=\"タブ1\">内容1</Tab><Tab label=\"タブ2\">内容2</Tab></Tabs>'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Tab: {\n name: \"Tab\",\n displayName: \"タブ(子)\",\n description: \"Tabsの子コンポーネント\",\n category: \"layout\",\n schema: componentSchemas.Tab,\n examples: ['<Tab label=\"タブ名\">内容</Tab>'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n parentComponent: \"Tabs\",\n },\n\n Columns: {\n name: \"Columns\",\n displayName: \"カラム\",\n description: \"マルチカラムレイアウト\",\n category: \"layout\",\n schema: componentSchemas.Columns,\n examples: ['<Columns cols={2}><Column>左</Column><Column>右</Column></Columns>'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n Column: {\n name: \"Column\",\n displayName: \"カラム(子)\",\n description: \"Columnsの子コンポーネント\",\n category: \"layout\",\n schema: componentSchemas.Column,\n examples: [\"<Column>カラムの内容</Column>\"],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n parentComponent: \"Columns\",\n },\n\n // --- utility ---\n Embed: {\n name: \"Embed\",\n displayName: \"汎用埋め込み\",\n description: \"汎用iframeで外部コンテンツを埋め込みます\",\n category: \"utility\",\n schema: componentSchemas.Embed,\n examples: ['<Embed url=\"https://example.com/widget\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n FileDownload: {\n name: \"FileDownload\",\n displayName: \"ファイルダウンロード\",\n description: \"ファイルダウンロードリンクを表示します\",\n category: \"utility\",\n schema: componentSchemas.FileDownload,\n examples: ['<FileDownload url=\"https://example.com/doc.pdf\" filename=\"資料.pdf\" size=\"2.4MB\" />'],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n\n TableOfContents: {\n name: \"TableOfContents\",\n displayName: \"目次\",\n description: \"記事内の見出しから目次を自動生成します\",\n category: \"utility\",\n schema: componentSchemas.TableOfContents,\n examples: [\"<TableOfContents />\", \"<TableOfContents maxDepth={2} />\"],\n hasReferences: false,\n source: \"standard\",\n kind: \"presentational\",\n locked: true,\n editable: false,\n },\n}\n\n// ============================================\n// Child Component Pairing\n// ============================================\n\n/** 子コンポーネントから親コンポーネントへのマッピング */\nexport const CHILD_COMPONENT_MAP: Partial<Record<ComponentName, ComponentName>> = {\n Tab: \"Tabs\",\n Column: \"Columns\",\n}\n\n/** 親コンポーネントが有効化されると自動で有効化される子コンポーネント */\nexport const PARENT_CHILD_MAP: Partial<Record<ComponentName, ComponentName[]>> = {\n Tabs: [\"Tab\"],\n Columns: [\"Column\"],\n}\n\n// ============================================\n// Utility Functions\n// ============================================\n\nexport function isValidComponent(name: string): name is ComponentName {\n return name in componentCatalog\n}\n\nexport function validateComponentProps(\n name: ComponentName,\n props: unknown\n): { success: true; data: unknown } | { success: false; error: z.ZodError } {\n const schema = componentSchemas[name]\n const result = schema.safeParse(props)\n if (result.success) {\n return { success: true, data: result.data }\n }\n return { success: false, error: result.error }\n}\n\nexport function getComponentsWithReferences(): ComponentName[] {\n return (Object.keys(componentCatalog) as ComponentName[]).filter(\n (name) => componentCatalog[name].hasReferences\n )\n}\n\nexport function getComponentsByCategory(): Record<string, ComponentDefinition[]> {\n const grouped: Record<string, ComponentDefinition[]> = {}\n for (const def of Object.values(componentCatalog)) {\n if (!grouped[def.category]) {\n grouped[def.category] = []\n }\n grouped[def.category].push(def)\n }\n return grouped\n}\n\nexport function getStandardComponentNames(): ComponentName[] {\n return Object.keys(componentCatalog) as ComponentName[]\n}\n\nexport function isStandardComponentName(name: string): boolean {\n return isValidComponent(name)\n}\n\nexport function getCatalogForAI(enabledComponents?: string[]): CatalogForAIComponent[] {\n let entries = Object.values(componentCatalog)\n\n if (enabledComponents) {\n entries = entries.filter((def) => enabledComponents.includes(def.name))\n }\n\n return entries.map((def) => {\n const shape = def.schema.shape as Record<string, z.ZodTypeAny>\n const props: Record<string, { type: string; description?: string; required: boolean }> = {}\n\n for (const [key, zodType] of Object.entries(shape)) {\n const isOptional = zodType.isOptional()\n props[key] = {\n type: getZodTypeName(zodType),\n description: zodType.description,\n required: !isOptional,\n }\n }\n\n return {\n name: def.name,\n description: def.description,\n props,\n examples: def.examples,\n source: def.source,\n kind: def.kind,\n locked: def.locked,\n editable: def.editable,\n bindings: def.bindings,\n parentComponent: def.parentComponent,\n }\n })\n}\n\nfunction getZodTypeName(zodType: z.ZodTypeAny): string {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const typeDef = (zodType as any)._zod?.def ?? (zodType as any)._def\n if (!typeDef) return \"unknown\"\n\n const typeName = typeDef.type ?? typeDef.typeName\n\n switch (typeName) {\n case \"string\":\n case \"ZodString\":\n return \"string\"\n case \"number\":\n case \"ZodNumber\":\n return \"number\"\n case \"boolean\":\n case \"ZodBoolean\":\n return \"boolean\"\n case \"enum\":\n case \"ZodEnum\":\n return `enum(${typeDef.values?.join(\"|\") ?? \"\"})`\n case \"array\":\n case \"ZodArray\":\n return \"array\"\n case \"optional\":\n case \"ZodOptional\":\n return typeDef.innerType ? getZodTypeName(typeDef.innerType) : \"unknown\"\n case \"default\":\n case \"ZodDefault\":\n return typeDef.innerType ? getZodTypeName(typeDef.innerType) : \"unknown\"\n default:\n return \"unknown\"\n }\n}\n","import { compile } from \"@mdx-js/mdx\"\nimport remarkGfm from \"remark-gfm\"\nimport { isValidComponent, validateComponentProps, ComponentName, CHILD_COMPONENT_MAP } from \"./component-catalog\"\n\n// ============================================\n// Validation Error Types\n// ============================================\n\nexport interface ValidationError {\n type: \"syntax\" | \"forbidden\" | \"component\" | \"props\"\n message: string\n line?: number\n column?: number\n component?: string\n}\n\nexport interface ValidationResult {\n valid: boolean\n errors: ValidationError[]\n warnings: string[]\n references: {\n contentIds: string[]\n assetIds: string[]\n }\n}\n\n// ============================================\n// Forbidden Patterns\n// ============================================\n\nconst FORBIDDEN_PATTERNS = [\n // import/export statements (at MDX level, not inside code blocks)\n { pattern: /^\\s*import\\s+/m, message: \"import文は使用できません\" },\n { pattern: /^\\s*export\\s+/m, message: \"export文は使用できません\" },\n // JS expressions in curly braces (except component props)\n { pattern: /\\{[^}]*(?:=>|function|new\\s+|typeof|instanceof)[^}]*\\}/m, message: \"JavaScript式は使用できません\" },\n // eval, Function constructor\n { pattern: /\\beval\\s*\\(/m, message: \"evalは使用できません\" },\n { pattern: /\\bnew\\s+Function\\s*\\(/m, message: \"Function constructorは使用できません\" },\n // script tags\n { pattern: /<script[\\s>]/i, message: \"scriptタグは使用できません\" },\n // on* event handlers\n { pattern: /\\bon\\w+\\s*=/i, message: \"イベントハンドラ属性は使用できません\" },\n // javascript: URLs\n { pattern: /javascript\\s*:/i, message: \"javascript: URLは使用できません\" },\n // data: URLs (for images - can be XSS vector)\n { pattern: /src\\s*=\\s*[\"']?\\s*data:/i, message: \"data: URLは使用できません\" },\n]\n\n// ============================================\n// Strip Code Blocks for Pattern Checking\n// ============================================\n\n/**\n * Remove CodeBlock content from MDX before checking forbidden patterns.\n * This prevents false positives when code examples contain import/export statements.\n * Preserves the same number of newlines so that line numbers remain accurate.\n */\nfunction stripCodeBlocksForPatternCheck(mdx: string): string {\n // Replace CodeBlock component content with placeholder, preserving newline count\n let result = mdx.replace(/<CodeBlock[^>]*>([^]*?)<\\/CodeBlock>/g, (_match, content: string) => {\n const newlineCount = (content.match(/\\n/g) || []).length\n return \"<CodeBlock>__CODE_PLACEHOLDER__\" + \"\\n\".repeat(newlineCount) + \"</CodeBlock>\"\n })\n\n // Also strip markdown fenced code blocks (```...```), preserving newline count\n result = result.replace(/```[\\s\\S]*?```/g, (match) => {\n const newlineCount = (match.match(/\\n/g) || []).length\n return \"```__CODE_PLACEHOLDER__\" + \"\\n\".repeat(Math.max(0, newlineCount - 1)) + \"```\"\n })\n\n return result\n}\n\n/**\n * Escape CodeBlock content for MDX compilation.\n * Replaces problematic syntax with HTML entities to prevent parsing errors.\n */\nfunction escapeCodeBlocksForCompile(mdx: string): string {\n // Escape content inside CodeBlock components\n let result = mdx.replace(/<CodeBlock([^>]*)>([^]*?)<\\/CodeBlock>/g, (_match, attrs, content) => {\n const escapedContent = content\n .replace(/^(\\s*)(import|export)\\s/gm, \"$1/* $2 */ \")\n .replace(/\\{/g, \"&#123;\")\n .replace(/\\}/g, \"&#125;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g, \"&gt;\")\n return `<CodeBlock${attrs}>${escapedContent}</CodeBlock>`\n })\n\n // Also escape markdown fenced code blocks\n result = result.replace(/```([a-z]*)\\n([\\s\\S]*?)```/g, (_match, lang, content) => {\n const escapedContent = content\n .replace(/^(\\s*)(import|export)\\s/gm, \"$1/* $2 */ \")\n .replace(/\\{/g, \"&#123;\")\n .replace(/\\}/g, \"&#125;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g, \"&gt;\")\n return \"```\" + lang + \"\\n\" + escapedContent + \"```\"\n })\n\n return result\n}\n\n// ============================================\n// Component Extraction\n// ============================================\n\ninterface ExtractedComponent {\n name: string\n props: Record<string, unknown>\n line: number\n}\n\n/**\n * Stack-based component extractor that handles nested components.\n * Scans for '<' characters, identifies opening/closing/self-closing tags,\n * and uses a stack to properly match open/close pairs at all nesting levels.\n */\nfunction extractComponents(mdx: string): ExtractedComponent[] {\n const components: ExtractedComponent[] = []\n\n // Pre-calculate line offsets for efficient lookup\n const lines = mdx.split(\"\\n\")\n const lineOffsets: number[] = []\n let offset = 0\n for (const line of lines) {\n lineOffsets.push(offset)\n offset += line.length + 1\n }\n\n function getLineNumber(index: number): number {\n let lo = 0, hi = lineOffsets.length - 1\n while (lo < hi) {\n const mid = Math.floor((lo + hi + 1) / 2)\n if (lineOffsets[mid] <= index) {\n lo = mid\n } else {\n hi = mid - 1\n }\n }\n return lo + 1\n }\n\n const stack: { name: string; propsString: string; tagStart: number; contentStart: number; line: number }[] = []\n\n let i = 0\n while (i < mdx.length) {\n if (mdx[i] !== \"<\") {\n i++\n continue\n }\n\n const tagStart = i\n i++ // skip '<'\n\n // Closing tag: </ComponentName>\n if (mdx[i] === \"/\") {\n i++\n const closeMatch = mdx.slice(i).match(/^([A-Z][a-zA-Z0-9]*)\\s*>/)\n if (closeMatch) {\n const closingName = closeMatch[1]\n i += closeMatch[0].length\n\n // Find matching opening tag on stack (search from top)\n for (let s = stack.length - 1; s >= 0; s--) {\n if (stack[s].name === closingName) {\n const opening = stack[s]\n const children = mdx.slice(opening.contentStart, tagStart).trim()\n const props = parseProps(opening.propsString)\n if (children) {\n props.children = children\n }\n\n components.push({\n name: opening.name,\n props,\n line: opening.line,\n })\n\n stack.splice(s, 1)\n break\n }\n }\n }\n continue\n }\n\n // Skip HTML comments: <!-- ... -->\n if (mdx[i] === \"!\" && mdx[i + 1] === \"-\" && mdx[i + 2] === \"-\") {\n const commentEnd = mdx.indexOf(\"-->\", i + 3)\n i = commentEnd !== -1 ? commentEnd + 3 : mdx.length\n continue\n }\n\n // Opening or self-closing tag: <ComponentName ...> or <ComponentName ... />\n const tagMatch = mdx.slice(i).match(/^([A-Z][a-zA-Z0-9]*)([\\s\\S]*?)(\\/)?>/)\n if (!tagMatch) {\n // Not a component tag (lowercase HTML tag or malformed)\n continue\n }\n\n const name = tagMatch[1]\n const attrsPart = tagMatch[2].trim()\n const isSelfClosing = tagMatch[3] === \"/\"\n i += tagMatch[0].length\n\n if (isSelfClosing) {\n components.push({\n name,\n props: parseProps(attrsPart),\n line: getLineNumber(tagStart),\n })\n } else {\n // Opening tag — push to stack\n stack.push({\n name,\n propsString: attrsPart,\n tagStart,\n contentStart: tagStart + 1 + tagMatch[0].length, // after '>'\n line: getLineNumber(tagStart),\n })\n }\n }\n\n return components\n}\n\nfunction parseProps(propsString: string): Record<string, unknown> {\n const props: Record<string, unknown> = {}\n\n // Match prop=\"value\" or prop={value} patterns\n const propPattern = /(\\w+)\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)'|\\{([^}]*)\\})/g\n let match\n\n while ((match = propPattern.exec(propsString)) !== null) {\n const key = match[1]\n const stringValue = match[2] ?? match[3]\n const expressionValue = match[4]\n\n if (stringValue !== undefined) {\n props[key] = stringValue\n } else if (expressionValue !== undefined) {\n // Try to parse simple values\n const trimmed = expressionValue.trim()\n if (trimmed === \"true\") {\n props[key] = true\n } else if (trimmed === \"false\") {\n props[key] = false\n } else if (/^\\d+$/.test(trimmed)) {\n props[key] = parseInt(trimmed, 10)\n } else if (/^\\d+\\.\\d+$/.test(trimmed)) {\n props[key] = parseFloat(trimmed)\n } else if (trimmed.startsWith(\"[\") && trimmed.endsWith(\"]\")) {\n // Try to parse array\n try {\n props[key] = JSON.parse(trimmed.replace(/'/g, '\"'))\n } catch {\n props[key] = trimmed\n }\n } else {\n props[key] = trimmed\n }\n }\n }\n\n // Handle boolean props without value (e.g., <CodeBlock showLineNumbers />)\n const booleanPattern = /(?:^|\\s)(\\w+)(?=\\s|\\/|>|$)/g\n while ((match = booleanPattern.exec(propsString)) !== null) {\n const key = match[1]\n if (!(key in props)) {\n props[key] = true\n }\n }\n\n return props\n}\n\n// ============================================\n// Extract References\n// ============================================\n\nfunction extractReferences(components: ExtractedComponent[]): {\n contentIds: string[]\n assetIds: string[]\n} {\n const contentIds: string[] = []\n const assetIds: string[] = []\n\n for (const component of components) {\n if (component.name === \"BlogCard\" && typeof component.props.contentId === \"string\") {\n contentIds.push(component.props.contentId)\n }\n if (component.name === \"Image\" && typeof component.props.assetId === \"string\") {\n assetIds.push(component.props.assetId)\n }\n if (component.name === \"Gallery\" && Array.isArray(component.props.assetIds)) {\n for (const id of component.props.assetIds) {\n if (typeof id === \"string\") assetIds.push(id)\n }\n }\n }\n\n return {\n contentIds: [...new Set(contentIds)],\n assetIds: [...new Set(assetIds)],\n }\n}\n\n// ============================================\n// Main Validation Function\n// ============================================\n\nexport interface ValidateMdxOptions {\n /** 有効なコンポーネント名の配列。undefined = 全コンポーネント有効 */\n enabledComponents?: string[]\n}\n\nexport async function validateMdx(mdx: string, options?: ValidateMdxOptions): Promise<ValidationResult> {\n const errors: ValidationError[] = []\n const warnings: string[] = []\n\n // 1. Check forbidden patterns (excluding code block content)\n const mdxWithoutCodeBlocks = stripCodeBlocksForPatternCheck(mdx)\n for (const { pattern, message } of FORBIDDEN_PATTERNS) {\n if (pattern.test(mdxWithoutCodeBlocks)) {\n const lines = mdxWithoutCodeBlocks.split(\"\\n\")\n for (let i = 0; i < lines.length; i++) {\n if (pattern.test(lines[i])) {\n errors.push({\n type: \"forbidden\",\n message,\n line: i + 1,\n })\n break\n }\n }\n }\n }\n\n // 2. Try to compile MDX (syntax check)\n // Escape CodeBlock content to prevent JSX expression parsing errors\n const escapedMdx = escapeCodeBlocksForCompile(mdx)\n try {\n await compile(escapedMdx, {\n development: false,\n remarkPlugins: [remarkGfm],\n })\n } catch (error) {\n const err = error as Error & { line?: number; column?: number }\n errors.push({\n type: \"syntax\",\n message: err.message,\n line: err.line,\n column: err.column,\n })\n }\n\n // 3. Extract and validate components (from MDX with CodeBlocks stripped)\n const mdxForComponentExtraction = stripCodeBlocksForPatternCheck(mdx)\n const components = extractComponents(mdxForComponentExtraction)\n\n const enabledSet = options?.enabledComponents ? new Set(options.enabledComponents) : undefined\n\n for (const component of components) {\n // Check if component is in catalog\n if (!isValidComponent(component.name)) {\n errors.push({\n type: \"component\",\n message: `未知のコンポーネント: ${component.name}`,\n line: component.line,\n component: component.name,\n })\n continue\n }\n\n // Check if component is enabled\n if (enabledSet && !enabledSet.has(component.name)) {\n errors.push({\n type: \"component\",\n message: `無効なコンポーネント: ${component.name}(この環境では使用できません)`,\n line: component.line,\n component: component.name,\n })\n continue\n }\n\n // Check child component pairing: standalone child without parent is an error\n const parentName = CHILD_COMPONENT_MAP[component.name as keyof typeof CHILD_COMPONENT_MAP]\n if (parentName) {\n const hasParent = components.some((c) => c.name === parentName)\n if (!hasParent) {\n errors.push({\n type: \"component\",\n message: `${component.name} は ${parentName} の中で使用する必要があります`,\n line: component.line,\n component: component.name,\n })\n }\n }\n\n // Validate props\n const result = validateComponentProps(component.name as ComponentName, component.props)\n if (!result.success) {\n for (const issue of result.error.issues) {\n errors.push({\n type: \"props\",\n message: `${component.name}: ${issue.path.join(\".\")} - ${issue.message}`,\n line: component.line,\n component: component.name,\n })\n }\n }\n }\n\n // 4. Extract references\n const references = extractReferences(components)\n\n return {\n valid: errors.length === 0,\n errors,\n warnings,\n references,\n }\n}\n\n// ============================================\n// Quick Validation (for save)\n// ============================================\n\nexport function quickValidateMdx(mdx: string): {\n valid: boolean\n errors: ValidationError[]\n} {\n const errors: ValidationError[] = []\n\n // Only check forbidden patterns (fast), excluding code block content\n const mdxWithoutCodeBlocks = stripCodeBlocksForPatternCheck(mdx)\n for (const { pattern, message } of FORBIDDEN_PATTERNS) {\n if (pattern.test(mdxWithoutCodeBlocks)) {\n errors.push({\n type: \"forbidden\",\n message,\n })\n }\n }\n\n return {\n valid: errors.length === 0,\n errors,\n }\n}\n","/**\n * CMX SDK — MDX Rendering\n *\n * Server-side MDX rendering with reference resolution.\n * Uses safe-mdx (AST-based renderer) for Edge Runtime / Cloudflare Workers compatibility.\n * Provides `renderMdx` as an async function for Server Components.\n */\n\nimport { MdastToJsx } from \"safe-mdx\"\nimport { mdxParse } from \"safe-mdx/parse\"\n\nimport {\n BlogCard,\n Image,\n Gallery,\n Callout,\n Embed,\n Button,\n YouTube,\n Twitter,\n Instagram,\n TikTok,\n Bluesky,\n Vimeo,\n Spotify,\n Gist,\n CodePen,\n CodeSandbox,\n GoogleMap,\n Details,\n Tabs,\n Tab,\n Columns,\n Column,\n Audio,\n Video,\n FileDownload,\n TableOfContents,\n markdownComponents,\n} from \"./mdx/components/index.js\"\n\nimport type {\n References,\n ContentReference,\n AssetReference,\n} from \"./generated/sdk/models/index.js\"\n\n// ============================================\n// Types\n// ============================================\n\nexport interface ResolvedReferences {\n contents: Map<string, ContentReference>\n assets: Map<string, AssetReference>\n}\n\nexport interface RenderOptions {\n /** Additional MDX components to make available (e.g. custom components) */\n additionalComponents?: Record<string, React.ComponentType<any>>\n}\n\nexport interface RenderResult {\n content: React.ReactElement\n references: ResolvedReferences\n}\n\n// ============================================\n// Reference Conversion\n// ============================================\n\nfunction convertReferencesToMaps(refs?: References): ResolvedReferences {\n const contentsMap = new Map<string, ContentReference>()\n const assetsMap = new Map<string, AssetReference>()\n\n if (refs?.contents) {\n Object.entries(refs.contents).forEach(([id, content]) => {\n contentsMap.set(id, content)\n })\n }\n\n if (refs?.assets) {\n Object.entries(refs.assets).forEach(([id, asset]) => {\n assetsMap.set(id, asset)\n })\n }\n\n return { contents: contentsMap, assets: assetsMap }\n}\n\n// ============================================\n// Component Factory\n// ============================================\n\nfunction createResolvedComponents(\n references: ResolvedReferences,\n additionalComponents?: Record<string, React.ComponentType<any>>\n) {\n return {\n // Standard markdown elements\n ...markdownComponents,\n\n // Custom components with reference resolution\n BlogCard: (props: { contentId: string }) => {\n const ref = references.contents.get(props.contentId)\n return (\n <BlogCard\n contentId={props.contentId}\n title={ref?.title}\n slug={ref?.slug}\n excerpt={ref?.description || undefined}\n />\n )\n },\n\n Image: (props: { assetId: string; alt?: string; size?: \"thumbnail\" | \"medium\" | \"large\" | \"original\"; caption?: string }) => {\n const asset = references.assets.get(props.assetId)\n const size = props.size || \"large\"\n let url = asset?.url\n\n // Get the appropriate variant URL\n if (asset?.variants && size !== \"original\") {\n url = asset.variants[size] || asset.url\n }\n\n return (\n <Image\n assetId={props.assetId}\n alt={props.alt || asset?.alt || \"\"}\n size={size}\n caption={props.caption}\n url={url}\n width={asset?.width || undefined}\n height={asset?.height || undefined}\n />\n )\n },\n\n // Gallery with reference resolution\n Gallery: (props: { assetIds: string[]; columns?: number; caption?: string }) => {\n const images = props.assetIds.map((id) => {\n const asset = references.assets.get(id)\n return {\n assetId: id,\n url: asset?.url,\n alt: asset?.alt ?? undefined,\n }\n })\n return <Gallery assetIds={props.assetIds} columns={props.columns} caption={props.caption} images={images} />\n },\n\n // Components without resolution\n Callout,\n Embed,\n Button,\n YouTube,\n Twitter,\n Instagram,\n TikTok,\n Bluesky,\n Vimeo,\n Spotify,\n Gist,\n CodePen,\n CodeSandbox,\n GoogleMap,\n Details,\n Tabs,\n Tab,\n Columns,\n Column,\n Audio,\n Video,\n FileDownload,\n TableOfContents,\n\n // User-provided custom components\n ...additionalComponents,\n }\n}\n\n// ============================================\n// MDX Validation\n// ============================================\n\n/**\n * Patterns that indicate potentially dangerous MDX content.\n * These are blocked to prevent arbitrary code execution via MDX injection.\n */\nconst DANGEROUS_PATTERNS = [\n /\\bimport\\s+/, // import statements\n /\\bexport\\s+/, // export statements (except default handled by mdx compiler)\n /\\{.*\\bconstructor\\b/, // constructor access in expressions\n /\\{.*\\b__proto__\\b/, // prototype pollution\n /\\{.*\\bprocess\\b/, // process access\n /\\{.*\\brequire\\s*\\(/, // require() calls\n /\\{.*\\beval\\s*\\(/, // eval() calls\n /\\{.*\\bFunction\\s*\\(/, // Function constructor\n] as const\n\n/**\n * Validate MDX content before compilation.\n * Throws an error if dangerous patterns are detected.\n */\nfunction validateMdx(mdx: string): void {\n for (const pattern of DANGEROUS_PATTERNS) {\n if (pattern.test(mdx)) {\n throw new Error(\n `MDX validation failed: potentially unsafe content detected (${pattern.source}). ` +\n \"MDX content must not contain import/export statements or dynamic code execution.\"\n )\n }\n }\n}\n\n// ============================================\n// safe-mdx Renderer Helper\n// ============================================\n\n/**\n * Render MDX using safe-mdx's MdastToJsx, with explicit error checking.\n * Unlike SafeMdxRenderer (which may silently drop unsupported content),\n * this checks for errors after rendering and throws if any occurred.\n */\nfunction renderSafeMdx(\n mdx: string,\n components: Record<string, any>\n): React.ReactElement {\n const ast = mdxParse(mdx)\n const visitor = new MdastToJsx({ markdown: mdx, mdast: ast, components })\n const node = visitor.run()\n\n if (visitor.errors.length > 0) {\n const details = visitor.errors\n .map((e) => (e.line ? `L${e.line}: ${e.message}` : e.message))\n .join(\"\\n\")\n throw new Error(`MDX render failed:\\n${details}`)\n }\n\n return <>{node}</>\n}\n\n// ============================================\n// MDX Renderer\n// ============================================\n\n/**\n * Render MDX content with pre-resolved references from CMX API.\n *\n * @param mdx - Raw MDX string\n * @param references - References object from the API response (contents & assets)\n * @param options - Additional options (e.g. custom components)\n * @returns Rendered content and resolved references\n *\n * @example\n * ```tsx\n * const { content } = await renderMdx(post.mdx, post.references)\n * return <article>{content}</article>\n * ```\n *\n * @example With custom components\n * ```tsx\n * import { FeatureCard } from '@/components/custom'\n * const { content } = await renderMdx(post.mdx, post.references, {\n * additionalComponents: { FeatureCard }\n * })\n * ```\n */\nexport async function renderMdx(\n mdx: string,\n references?: References,\n options?: RenderOptions\n): Promise<RenderResult> {\n validateMdx(mdx)\n\n const resolvedReferences = convertReferencesToMaps(references)\n const components = createResolvedComponents(resolvedReferences, options?.additionalComponents)\n const content = renderSafeMdx(mdx, components)\n\n return {\n content,\n references: resolvedReferences,\n }\n}\n\n/**\n * Render MDX content without reference resolution (for preview in editor).\n *\n * @param mdx - Raw MDX string\n * @param additionalComponents - Optional custom components\n * @returns Rendered React element\n */\nexport async function renderMdxPreview(\n mdx: string,\n additionalComponents?: Record<string, React.ComponentType<any>>\n): Promise<React.ReactElement> {\n const components = {\n ...markdownComponents,\n BlogCard,\n Image,\n Gallery,\n Callout,\n Embed,\n Button,\n YouTube,\n Twitter,\n Instagram,\n TikTok,\n Bluesky,\n Vimeo,\n Spotify,\n Gist,\n CodePen,\n CodeSandbox,\n GoogleMap,\n Details,\n Tabs,\n Tab,\n Columns,\n Column,\n Audio,\n Video,\n FileDownload,\n TableOfContents,\n ...additionalComponents,\n }\n\n try {\n validateMdx(mdx)\n return renderSafeMdx(mdx, components)\n } catch (error) {\n console.error(\"MDX render error:\", error)\n return (\n <div className=\"p-4 bg-red-50 border border-red-200 rounded-lg\">\n <p className=\"text-red-600 font-medium\">MDX Render Error</p>\n <pre className=\"mt-2 text-sm text-red-500 whitespace-pre-wrap\">\n {error instanceof Error ? error.message : \"Unknown error\"}\n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Aa,yBAAyB,oBAAoB,SAAS,oBAAoB;AAC7F,QAAM,UAAU,cAAc,KAAK,UAAU;AAE7C,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,EACd;AACF;AASA,eAAsB,iBACpB,KACA,sBAC6B;AAC7B,QAAM,aAAa;AAAA,IACjB,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL;AAEA,MAAI;AACF,IAAAA,aAAY,GAAG;AACf,WAAO,cAAc,KAAK,UAAU;AAAA,EACtC,SAAS,OAAO;AACd,YAAQ,MAAM,qBAAqB,KAAK;AACxC,WACE,gBAAAD,OAAC,SAAI,WAAU,kDACb;AAAA,sBAAAD,MAAC,OAAE,WAAU,4BAA2B,8BAAgB;AAAA,MACxD,gBAAAA,MAAC,SAAI,WAAU,iDACZ,2BAAiB,QAAQ,MAAM,UAAU,iBAC5C;AAAA,OACF;AAAA,EAEJ;AACF;","names":["jsx","jsx","jsx","jsxs","jsx","useEffect","jsx","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsx","jsxs","jsx","jsxs","jsx","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","Link","jsx","jsxs","jsx","jsxs","jsx","jsxs","gridClasses","jsx","jsx","jsxs","validateMdx"]}