[{"data":1,"prerenderedAt":1648},["ShallowReactive",2],{"docs-navigation-en":3,"mdc-d0lvp9-key":202,"docs--en-docs-api-hooks":223,"surround--en-docs-api-hooks":1637,"-en-docs-api-hooks-description":1640},[4],{"title":5,"path":6,"stem":7,"children":8,"page":105},"Docs","\u002Fen\u002Fdocs","en\u002Fdocs",[9,49,106,144,178],{"title":10,"path":11,"stem":12,"children":13,"category":16,"description":16,"icon":48},"Getting Started","\u002Fen\u002Fdocs\u002Fgetting-started","en\u002Fdocs\u002F1.getting-started\u002F1.index",[14,18,23,28,33,38,43],{"title":15,"path":11,"stem":12,"category":16,"description":17},"Introduction",null,"Explore forms, data tables, components, and API integration in Movk Nuxt and choose a setup for Nuxt or Vue + Vite.",{"title":19,"path":20,"stem":21,"category":16,"description":22},"Installation","\u002Fen\u002Fdocs\u002Fgetting-started\u002Finstallation","en\u002Fdocs\u002F1.getting-started\u002F2.installation","Install and configure the Movk Nuxt module in a Nuxt 4 project.",{"title":24,"path":25,"stem":26,"category":16,"description":27},"Module Configuration","\u002Fen\u002Fdocs\u002Fgetting-started\u002Fconfiguration","en\u002Fdocs\u002F1.getting-started\u002F3.configuration","Configure component prefix, theme colors, fonts, API endpoints, auth strategy, response parsing rules and Toast notification behavior.",{"title":29,"path":30,"stem":31,"category":16,"description":32},"Vue \u002F Vite","\u002Fen\u002Fdocs\u002Fgetting-started\u002Fvue","en\u002Fdocs\u002F1.getting-started\u002F4.vue","Use Movk standalone components, theming and composables in a plain Vue + Vite project without Nuxt.",{"title":34,"path":35,"stem":36,"category":16,"description":37},"Theme System","\u002Fen\u002Fdocs\u002Fgetting-started\u002Ftheme","en\u002Fdocs\u002F1.getting-started\u002F5.theme","Manage colors, radius, icon sets and dark mode through module defaults, the ThemePicker component and the useTheme composable, with build-time font configuration.",{"title":39,"path":40,"stem":41,"category":16,"description":42},"Migrate to v2","\u002Fen\u002Fdocs\u002Fgetting-started\u002Fmigration","en\u002Fdocs\u002F1.getting-started\u002F6.migration","Breaking changes to handle when upgrading from v1 to v2.",{"title":44,"path":45,"stem":46,"category":16,"description":47},"AI Integration","\u002Fen\u002Fdocs\u002Fgetting-started\u002Fai","en\u002Fdocs\u002F1.getting-started\u002F7.ai","Help AI assistants understand Movk Nuxt through MCP, llms.txt and Skills.","i-lucide-square-play",{"title":50,"category":16,"description":16,"icon":51,"path":52,"stem":53,"children":54,"page":105},"Forms","i-lucide-square-pen","\u002Fen\u002Fdocs\u002Fauto-form","en\u002Fdocs\u002F2.auto-form",[55,60,65,70,75,80,85,90,95,100],{"title":56,"path":57,"stem":58,"category":16,"description":59},"Quickstart","\u002Fen\u002Fdocs\u002Fauto-form\u002Fquickstart","en\u002Fdocs\u002F2.auto-form\u002F1.quickstart","Learn the core design philosophy and basic usage of AutoForm.",{"title":61,"path":62,"stem":63,"category":16,"description":64},"Recipes","\u002Fen\u002Fdocs\u002Fauto-form\u002Frecipes","en\u002Fdocs\u002F2.auto-form\u002F10.recipes","Real-world AutoForm scenarios — login, grouped registration validation, multi-file upload and horizontal search form.",{"title":66,"path":67,"stem":68,"category":16,"description":69},"Field Types","\u002Fen\u002Fdocs\u002Fauto-form\u002Ffield-types","en\u002Fdocs\u002F2.auto-form\u002F2.field-types","Mapping of afz field types to controls and their configuration.",{"title":71,"path":72,"stem":73,"category":16,"description":74},"Objects and Arrays","\u002Fen\u002Fdocs\u002Fauto-form\u002Fobject-array","en\u002Fdocs\u002F2.auto-form\u002F3.object-array","Rendering and editing nested object and dynamic array fields.",{"title":76,"path":77,"stem":78,"category":16,"description":79},"Controls","\u002Fen\u002Fdocs\u002Fauto-form\u002Fcontrols","en\u002Fdocs\u002F2.auto-form\u002F4.controls","Map schema fields to Nuxt UI controls via the type field, or register and inject custom Vue components to extend form fields.",{"title":81,"path":82,"stem":83,"category":16,"description":84},"Metadata and Layout","\u002Fen\u002Fdocs\u002Fauto-form\u002Fmetadata-layout","en\u002Fdocs\u002F2.auto-form\u002F5.metadata-layout","Configure field properties through meta and arrange them with afz.layout.",{"title":86,"path":87,"stem":88,"category":16,"description":89},"Slots","\u002Fen\u002Fdocs\u002Fauto-form\u002Fslots","en\u002Fdocs\u002F2.auto-form\u002F6.slots","Customize AutoForm's header\u002Ffooter, field controls, before\u002Fafter field and layout content via named slots.",{"title":91,"path":92,"stem":93,"category":16,"description":94},"Reactivity and Submit","\u002Fen\u002Fdocs\u002Fauto-form\u002Freactive-submit","en\u002Fdocs\u002F2.auto-form\u002F7.reactive-submit","Reactive linkage between fields and form submission handling.",{"title":96,"path":97,"stem":98,"category":16,"description":99},"SearchForm","\u002Fen\u002Fdocs\u002Fauto-form\u002Fsearch-form","en\u002Fdocs\u002F2.auto-form\u002F8.search-form","A schema-driven, collapsible search form component.",{"title":101,"path":102,"stem":103,"category":16,"description":104},"useAutoForm","\u002Fen\u002Fdocs\u002Fauto-form\u002Fuse-auto-form","en\u002Fdocs\u002F2.auto-form\u002F9.use-auto-form","A composable for creating typed Zod schemas and managing AutoForm controls.",false,{"title":107,"path":108,"stem":109,"children":110,"category":16,"description":16,"icon":143},"DataTable","\u002Fen\u002Fdocs\u002Fdata-table","en\u002Fdocs\u002F3.data-table\u002F1.index",[111,113,118,123,128,133,138],{"title":15,"path":108,"stem":109,"category":16,"description":112},"A declarative data table based on TanStack Table, with column configuration, selection, expansion, tree data, pagination, load more and complete API reference.",{"title":114,"path":115,"stem":116,"category":16,"description":117},"Appearance","\u002Fen\u002Fdocs\u002Fdata-table\u002Fappearance","en\u002Fdocs\u002F3.data-table\u002F2.appearance","Component style overrides, pagination style overrides, stripe and borders, visual density, fit-content width, empty-cell placeholders and sticky header.",{"title":119,"path":120,"stem":121,"category":16,"description":122},"Columns","\u002Fen\u002Fdocs\u002Fdata-table\u002Fcolumns","en\u002Fdocs\u002F3.data-table\u002F3.columns","Data column configuration — fixed columns, sorting, column pinning, column resize, text truncation, tooltips, visibility and functional per-column configuration.",{"title":124,"path":125,"stem":126,"category":16,"description":127},"Special Columns","\u002Fen\u002Fdocs\u002Fdata-table\u002Fspecial-columns","en\u002Fdocs\u002F3.data-table\u002F4.special-columns","Configuration for selection, index, row-pinning and actions columns — including tree selection strategies, dynamic button props and confirmation dialogs.",{"title":129,"path":130,"stem":131,"category":16,"description":132},"Rows & Interaction","\u002Fen\u002Fdocs\u002Fdata-table\u002Frows","en\u002Fdocs\u002F3.data-table\u002F5.rows","Row selection, expandable detail slot, click behaviors, dynamic row class\u002Fstyle, hover, context menu and imperative control.",{"title":134,"path":135,"stem":136,"category":16,"description":137},"Tree Data","\u002Fen\u002Fdocs\u002Fdata-table\u002Ftree","en\u002Fdocs\u002F3.data-table\u002F6.tree","Enable tree-mode tables via childrenKey — configure expansion, cascade selection strategies, indentation and read selection results.",{"title":139,"path":140,"stem":141,"category":16,"description":142},"Pagination & Load More","\u002Fen\u002Fdocs\u002Fdata-table\u002Fpagination","en\u002Fdocs\u002F3.data-table\u002F7.pagination","Client-side auto pagination, server-side manual pagination with loading state, and bottom-trigger load-more for infinite scroll.","i-lucide-table",{"title":145,"path":146,"stem":147,"children":148,"category":16,"description":16,"icon":177},"API","\u002Fen\u002Fdocs\u002Fapi","en\u002Fdocs\u002F4.api\u002F1.index",[149,152,157,162,167,172],{"title":150,"path":146,"stem":147,"category":16,"description":151},"Overview","Nuxt data-fetching fundamentals and the core concepts and architecture of the Movk Nuxt API system.",{"title":153,"path":154,"stem":155,"category":16,"description":156},"$api","\u002Fen\u002Fdocs\u002Fapi\u002Fapi-plugin","en\u002Fdocs\u002F4.api\u002F2.api-plugin","The enhanced $fetch instance created by the api.factory plugin, supporting auth injection, data unwrapping, business code checking and multi-endpoint switching.",{"title":158,"path":159,"stem":160,"category":16,"description":161},"Hooks","\u002Fen\u002Fdocs\u002Fapi\u002Fhooks","en\u002Fdocs\u002F4.api\u002F3.hooks","Extend API system behavior via Nuxt runtime hooks — global request interception, error handling and custom 401 logic.",{"title":163,"path":164,"stem":165,"category":16,"description":166},"useApiFetch","\u002Fen\u002Fdocs\u002Fapi\u002Fuse-api-fetch","en\u002Fdocs\u002F4.api\u002F4.use-api-fetch","An API request composable built on Nuxt useFetch, providing automatic authentication, business status code checking and Toast notifications.",{"title":168,"path":169,"stem":170,"category":16,"description":171},"Upload and Download","\u002Fen\u002Fdocs\u002Fapi\u002Fupload-download","en\u002Fdocs\u002F4.api\u002F5.upload-download","File upload and download with progress tracking.",{"title":173,"path":174,"stem":175,"category":16,"description":176},"Streaming","\u002Fen\u002Fdocs\u002Fapi\u002Fstream","en\u002Fdocs\u002F4.api\u002F6.stream","SSE streaming requests and the AI SDK chat transport.","i-lucide-cloud",{"title":179,"category":16,"description":16,"icon":180,"path":181,"stem":182,"children":183,"page":105},"Components","i-lucide-box","\u002Fen\u002Fdocs\u002Fcomponents","en\u002Fdocs\u002F5.components",[184,190,196],{"title":185,"path":186,"stem":187,"category":188,"description":189},"DatePicker","\u002Fen\u002Fdocs\u002Fcomponents\u002Fdate-picker","en\u002Fdocs\u002F5.components\u002Fdate-picker","advanced","An internationalized date picker component.",{"title":191,"path":192,"stem":193,"category":194,"description":195},"MessageBox","\u002Fen\u002Fdocs\u002Fcomponents\u002Fmessage-box","en\u002Fdocs\u002F5.components\u002Fmessage-box","feedback","A modal message dialog offering both declarative and programmatic usage.",{"title":197,"path":198,"stem":199,"category":188,"description":200,"badge":201},"Tree","\u002Fen\u002Fdocs\u002Fcomponents\u002Ftree","en\u002Fdocs\u002F5.components\u002Ftree","A tree component built on Nuxt UI Tree, adding search, lazy loading, toolbar, checkboxes, and parent\u002Fchild strategy.","v1.4.2",{"data":203,"body":204},{},{"type":205,"children":206},"root",[207],{"type":208,"tag":209,"props":210,"children":211},"element","p",{},[212,215],{"type":213,"value":214},"text","Copyright © 2025 - 2026 YiXuan - ",{"type":208,"tag":216,"props":217,"children":220},"span",{"className":218},[219],"text-highlighted",[221],{"type":213,"value":222},"MIT License",{"id":224,"title":158,"body":225,"category":16,"description":161,"difficulty":16,"extension":1632,"index":105,"keywords":16,"links":16,"meta":1633,"navigation":16,"path":159,"requires":16,"seo":1634,"sitemap":1635,"stem":160,"__hash__":1636},"docs_en\u002Fen\u002Fdocs\u002F4.api\u002F3.hooks.md",{"type":226,"value":227,"toc":1617},"minimark",[228,232,235,247,251,258,265,317,320,433,439,444,494,501,504,596,602,615,651,669,796,801,817,852,862,869,874,1122,1126,1130,1133,1227,1231,1234,1361,1368,1372,1379,1383,1386,1606,1613],[229,230,15],"h2",{"id":231},"introduction",[209,233,234],{},"The Movk Nuxt API system exposes 4 extension points via Nuxt runtime hooks, allowing you to extend and customize API behavior without modifying source code.",[209,236,237,238,242,243,246],{},"All hook types are automatically registered into ",[239,240,241],"code",{},"RuntimeNuxtHooks"," via module declaration; in your editor, ",[239,244,245],{},"nuxtApp.hook('movk:api:')"," provides full auto-completion.",[229,248,250],{"id":249},"available-hooks","Available Hooks",[252,253,255],"h3",{"id":254},"movkapirequest",[239,256,257],{},"movk:api:request",[209,259,260,264],{},[261,262,263],"strong",{},"When triggered",": After auth token injection, before the request is actually sent.",[266,267,272],"pre",{"className":268,"code":269,"language":270,"meta":271,"style":271},"language-ts shiki shiki-themes github-light github-light github-dark","'movk:api:request': (context: FetchContext) => void | Promise\u003Cvoid>\n","ts","",[239,273,274],{"__ignoreMap":271},[216,275,278,282,286,290,294,298,301,304,307,310,314],{"class":276,"line":277},"line",1,[216,279,281],{"class":280},"sIIMD","'movk:api:request'",[216,283,285],{"class":284},"sxrX7",": (",[216,287,289],{"class":288},"sP4rz","context",[216,291,293],{"class":292},"s8jYJ",":",[216,295,297],{"class":296},"snPdu"," FetchContext",[216,299,300],{"class":284},") ",[216,302,303],{"class":292},"=>",[216,305,306],{"class":292}," void",[216,308,309],{"class":292}," |",[216,311,313],{"class":312},"sBjJW"," Promise",[216,315,316],{"class":292},"\u003Cvoid>\n",[209,318,319],{},"Typical use cases: Adding extra request headers, request logging, modifying request parameters.",[266,321,324],{"className":268,"code":322,"filename":323,"language":270,"meta":271,"style":271},"export default defineNuxtPlugin((nuxtApp) => {\n  nuxtApp.hook('movk:api:request', (context) => {\n    console.log(`[API] ${context.options.method || 'GET'} ${context.request}`)\n  })\n})\n","plugins\u002Fapi-logger.ts",[239,325,326,350,375,421,427],{"__ignoreMap":271},[216,327,328,331,334,337,340,343,345,347],{"class":276,"line":277},[216,329,330],{"class":292},"export",[216,332,333],{"class":292}," default",[216,335,336],{"class":296}," defineNuxtPlugin",[216,338,339],{"class":284},"((",[216,341,342],{"class":288},"nuxtApp",[216,344,300],{"class":284},[216,346,303],{"class":292},[216,348,349],{"class":284}," {\n",[216,351,353,356,359,362,364,367,369,371,373],{"class":276,"line":352},2,[216,354,355],{"class":284},"  nuxtApp.",[216,357,358],{"class":296},"hook",[216,360,361],{"class":284},"(",[216,363,281],{"class":280},[216,365,366],{"class":284},", (",[216,368,289],{"class":288},[216,370,300],{"class":284},[216,372,303],{"class":292},[216,374,349],{"class":284},[216,376,378,381,384,386,389,391,394,397,399,402,405,408,410,412,415,418],{"class":276,"line":377},3,[216,379,380],{"class":284},"    console.",[216,382,383],{"class":296},"log",[216,385,361],{"class":284},[216,387,388],{"class":280},"`[API] ${",[216,390,289],{"class":284},[216,392,393],{"class":280},".",[216,395,396],{"class":284},"options",[216,398,393],{"class":280},[216,400,401],{"class":284},"method",[216,403,404],{"class":292}," ||",[216,406,407],{"class":280}," 'GET'} ${",[216,409,289],{"class":284},[216,411,393],{"class":280},[216,413,414],{"class":284},"request",[216,416,417],{"class":280},"}`",[216,419,420],{"class":284},")\n",[216,422,424],{"class":276,"line":423},4,[216,425,426],{"class":284},"  })\n",[216,428,430],{"class":276,"line":429},5,[216,431,432],{"class":284},"})\n",[252,434,436],{"id":435},"movkapiresponse",[239,437,438],{},"movk:api:response",[209,440,441,443],{},[261,442,263],{},": After business status code validation passes and data unwrapping is complete.",[266,445,447],{"className":268,"code":446,"language":270,"meta":271,"style":271},"'movk:api:response': (\n  context: FetchContext & { response: FetchResponse\u003Cany> }\n) => void | Promise\u003Cvoid>\n",[239,448,449,457,480],{"__ignoreMap":271},[216,450,451,454],{"class":276,"line":277},[216,452,453],{"class":280},"'movk:api:response'",[216,455,456],{"class":284},": (\n",[216,458,459,462,465,468,471,474,477],{"class":276,"line":352},[216,460,461],{"class":284},"  context: FetchContext ",[216,463,464],{"class":292},"&",[216,466,467],{"class":284}," { response: FetchResponse",[216,469,470],{"class":292},"\u003C",[216,472,473],{"class":284},"any",[216,475,476],{"class":292},">",[216,478,479],{"class":284}," }\n",[216,481,482,484,486,488,490,492],{"class":276,"line":377},[216,483,300],{"class":284},[216,485,303],{"class":292},[216,487,306],{"class":292},[216,489,309],{"class":292},[216,491,313],{"class":312},[216,493,316],{"class":292},[209,495,496,497,500],{},"At this point, ",[239,498,499],{},"context.response._data"," is already the unwrapped business data.",[209,502,503],{},"Typical use cases: Global data transformation, response logging, performance analysis.",[266,505,508],{"className":268,"code":506,"filename":507,"language":270,"meta":271,"style":271},"export default defineNuxtPlugin((nuxtApp) => {\n  nuxtApp.hook('movk:api:response', (context) => {\n    analytics.track('api_success', {\n      url: context.request,\n      method: context.options.method || 'GET'\n    })\n  })\n})\n","plugins\u002Fapi-analytics.ts",[239,509,510,528,548,564,569,580,586,591],{"__ignoreMap":271},[216,511,512,514,516,518,520,522,524,526],{"class":276,"line":277},[216,513,330],{"class":292},[216,515,333],{"class":292},[216,517,336],{"class":296},[216,519,339],{"class":284},[216,521,342],{"class":288},[216,523,300],{"class":284},[216,525,303],{"class":292},[216,527,349],{"class":284},[216,529,530,532,534,536,538,540,542,544,546],{"class":276,"line":352},[216,531,355],{"class":284},[216,533,358],{"class":296},[216,535,361],{"class":284},[216,537,453],{"class":280},[216,539,366],{"class":284},[216,541,289],{"class":288},[216,543,300],{"class":284},[216,545,303],{"class":292},[216,547,349],{"class":284},[216,549,550,553,556,558,561],{"class":276,"line":377},[216,551,552],{"class":284},"    analytics.",[216,554,555],{"class":296},"track",[216,557,361],{"class":284},[216,559,560],{"class":280},"'api_success'",[216,562,563],{"class":284},", {\n",[216,565,566],{"class":276,"line":423},[216,567,568],{"class":284},"      url: context.request,\n",[216,570,571,574,577],{"class":276,"line":429},[216,572,573],{"class":284},"      method: context.options.method ",[216,575,576],{"class":292},"||",[216,578,579],{"class":280}," 'GET'\n",[216,581,583],{"class":276,"line":582},6,[216,584,585],{"class":284},"    })\n",[216,587,589],{"class":276,"line":588},7,[216,590,426],{"class":284},[216,592,594],{"class":276,"line":593},8,[216,595,432],{"class":284},[252,597,599],{"id":598},"movkapierror",[239,600,601],{},"movk:api:error",[209,603,604,606,607,610,611,614],{},[261,605,263],{},": On business status code validation failure, HTTP error (4xx\u002F5xx), network failure or timeout. Fires ",[261,608,609],{},"only once",", after ofetch retries finish; aborts never fire it. For 401 errors, this fires after ",[239,612,613],{},"movk:api:unauthorized"," and is skipped when the business side handled it.",[266,616,618],{"className":268,"code":617,"language":270,"meta":271,"style":271},"'movk:api:error': (\n  context: FetchContext,\n  error: ApiError\n) => void | Promise\u003Cvoid>\n",[239,619,620,627,632,637],{"__ignoreMap":271},[216,621,622,625],{"class":276,"line":277},[216,623,624],{"class":280},"'movk:api:error'",[216,626,456],{"class":284},[216,628,629],{"class":276,"line":352},[216,630,631],{"class":284},"  context: FetchContext,\n",[216,633,634],{"class":276,"line":377},[216,635,636],{"class":284},"  error: ApiError\n",[216,638,639,641,643,645,647,649],{"class":276,"line":423},[216,640,300],{"class":284},[216,642,303],{"class":292},[216,644,306],{"class":292},[216,646,309],{"class":292},[216,648,313],{"class":312},[216,650,316],{"class":292},[209,652,653,656,657,664,665,668],{},[239,654,655],{},"error"," is the normalized ",[658,659,661],"a",{"href":660},"\u002Fen\u002Fdocs\u002Fapi\u002Fapi-plugin#apierror",[239,662,663],{},"ApiError","; ",[239,666,667],{},"error.data"," carries the category, endpoint, business code and raw response body. Typical use cases: Global error reporting (Sentry, etc.), error analytics.",[266,670,673],{"className":268,"code":671,"filename":672,"language":270,"meta":271,"style":271},"export default defineNuxtPlugin((nuxtApp) => {\n  nuxtApp.hook('movk:api:error', (context, error) => {\n    if (error.data?.kind === 'network') return\n\n    Sentry.captureException(error, {\n      extra: {\n        url: context.request,\n        endpoint: error.data?.endpoint,\n        response: error.data?.response\n      }\n    })\n  })\n})\n","plugins\u002Ferror-reporter.ts",[239,674,675,693,718,737,743,754,759,764,769,775,781,786,791],{"__ignoreMap":271},[216,676,677,679,681,683,685,687,689,691],{"class":276,"line":277},[216,678,330],{"class":292},[216,680,333],{"class":292},[216,682,336],{"class":296},[216,684,339],{"class":284},[216,686,342],{"class":288},[216,688,300],{"class":284},[216,690,303],{"class":292},[216,692,349],{"class":284},[216,694,695,697,699,701,703,705,707,710,712,714,716],{"class":276,"line":352},[216,696,355],{"class":284},[216,698,358],{"class":296},[216,700,361],{"class":284},[216,702,624],{"class":280},[216,704,366],{"class":284},[216,706,289],{"class":288},[216,708,709],{"class":284},", ",[216,711,655],{"class":288},[216,713,300],{"class":284},[216,715,303],{"class":292},[216,717,349],{"class":284},[216,719,720,723,726,729,732,734],{"class":276,"line":377},[216,721,722],{"class":292},"    if",[216,724,725],{"class":284}," (error.data?.kind ",[216,727,728],{"class":292},"===",[216,730,731],{"class":280}," 'network'",[216,733,300],{"class":284},[216,735,736],{"class":292},"return\n",[216,738,739],{"class":276,"line":423},[216,740,742],{"emptyLinePlaceholder":741},true,"\n",[216,744,745,748,751],{"class":276,"line":429},[216,746,747],{"class":284},"    Sentry.",[216,749,750],{"class":296},"captureException",[216,752,753],{"class":284},"(error, {\n",[216,755,756],{"class":276,"line":582},[216,757,758],{"class":284},"      extra: {\n",[216,760,761],{"class":276,"line":588},[216,762,763],{"class":284},"        url: context.request,\n",[216,765,766],{"class":276,"line":593},[216,767,768],{"class":284},"        endpoint: error.data?.endpoint,\n",[216,770,772],{"class":276,"line":771},9,[216,773,774],{"class":284},"        response: error.data?.response\n",[216,776,778],{"class":276,"line":777},10,[216,779,780],{"class":284},"      }\n",[216,782,784],{"class":276,"line":783},11,[216,785,585],{"class":284},[216,787,789],{"class":276,"line":788},12,[216,790,426],{"class":284},[216,792,794],{"class":276,"line":793},13,[216,795,432],{"class":284},[252,797,799],{"id":798},"movkapiunauthorized",[239,800,613],{},[209,802,803,805,806,809,810,813,814,816],{},[261,804,263],{},": When an HTTP 401 response is received, or the business code in the response body (",[239,807,808],{},"codeKey",", string values included) is 401, ",[261,811,812],{},"before"," ",[239,815,601],{},". Upload \u002F download progress requests are covered as well.",[266,818,820],{"className":268,"code":819,"language":270,"meta":271,"style":271},"'movk:api:unauthorized': (\n  context: FetchContext,\n  result: { handled: boolean }\n) => void | Promise\u003Cvoid>\n",[239,821,822,829,833,838],{"__ignoreMap":271},[216,823,824,827],{"class":276,"line":277},[216,825,826],{"class":280},"'movk:api:unauthorized'",[216,828,456],{"class":284},[216,830,831],{"class":276,"line":352},[216,832,631],{"class":284},[216,834,835],{"class":276,"line":377},[216,836,837],{"class":284},"  result: { handled: boolean }\n",[216,839,840,842,844,846,848,850],{"class":276,"line":423},[216,841,300],{"class":284},[216,843,303],{"class":292},[216,845,306],{"class":292},[216,847,309],{"class":292},[216,849,313],{"class":312},[216,851,316],{"class":292},[209,853,854,855,813,858,861],{},"Setting ",[239,856,857],{},"result.handled = true",[261,859,860],{},"skips the default 401 handling"," (clearing the session and redirecting to the login page).",[863,864,865,866,868],"warning",{},"If multiple handlers listen to this hook, any handler setting ",[239,867,857],{}," will prevent the default behavior.",[870,871,873],"h4",{"id":872},"token-refresh-pattern","Token Refresh Pattern",[266,875,878],{"className":268,"code":876,"filename":877,"language":270,"meta":271,"style":271},"export default defineNuxtPlugin((nuxtApp) => {\n  let isRefreshing = false\n\n  nuxtApp.hook('movk:api:unauthorized', async (_context, result) => {\n    if (isRefreshing) return\n\n    isRefreshing = true\n    try {\n      \u002F\u002F Attempt to refresh the token\n      await $fetch('\u002Fapi\u002Fauth\u002Frefresh', { method: 'POST' })\n      \u002F\u002F Refresh session state\n      const { fetch: fetchSession } = useUserSession()\n      await fetchSession()\n      \u002F\u002F Mark as handled, skip default 401 behavior\n      result.handled = true\n    }\n    catch {\n      \u002F\u002F Refresh failed — fall through to default behavior (clear session + redirect to login)\n    }\n    finally {\n      isRefreshing = false\n    }\n  })\n})\n","plugins\u002Ftoken-refresh.ts",[239,879,880,898,912,916,948,957,961,971,978,984,1006,1011,1039,1048,1054,1064,1070,1078,1084,1089,1097,1107,1112,1117],{"__ignoreMap":271},[216,881,882,884,886,888,890,892,894,896],{"class":276,"line":277},[216,883,330],{"class":292},[216,885,333],{"class":292},[216,887,336],{"class":296},[216,889,339],{"class":284},[216,891,342],{"class":288},[216,893,300],{"class":284},[216,895,303],{"class":292},[216,897,349],{"class":284},[216,899,900,903,906,909],{"class":276,"line":352},[216,901,902],{"class":292},"  let",[216,904,905],{"class":284}," isRefreshing ",[216,907,908],{"class":292},"=",[216,910,911],{"class":312}," false\n",[216,913,914],{"class":276,"line":377},[216,915,742],{"emptyLinePlaceholder":741},[216,917,918,920,922,924,926,928,931,934,937,939,942,944,946],{"class":276,"line":423},[216,919,355],{"class":284},[216,921,358],{"class":296},[216,923,361],{"class":284},[216,925,826],{"class":280},[216,927,709],{"class":284},[216,929,930],{"class":292},"async",[216,932,933],{"class":284}," (",[216,935,936],{"class":288},"_context",[216,938,709],{"class":284},[216,940,941],{"class":288},"result",[216,943,300],{"class":284},[216,945,303],{"class":292},[216,947,349],{"class":284},[216,949,950,952,955],{"class":276,"line":429},[216,951,722],{"class":292},[216,953,954],{"class":284}," (isRefreshing) ",[216,956,736],{"class":292},[216,958,959],{"class":276,"line":582},[216,960,742],{"emptyLinePlaceholder":741},[216,962,963,966,968],{"class":276,"line":588},[216,964,965],{"class":284},"    isRefreshing ",[216,967,908],{"class":292},[216,969,970],{"class":312}," true\n",[216,972,973,976],{"class":276,"line":593},[216,974,975],{"class":292},"    try",[216,977,349],{"class":284},[216,979,980],{"class":276,"line":771},[216,981,983],{"class":982},"sCsY4","      \u002F\u002F Attempt to refresh the token\n",[216,985,986,989,992,994,997,1000,1003],{"class":276,"line":777},[216,987,988],{"class":292},"      await",[216,990,991],{"class":296}," $fetch",[216,993,361],{"class":284},[216,995,996],{"class":280},"'\u002Fapi\u002Fauth\u002Frefresh'",[216,998,999],{"class":284},", { method: ",[216,1001,1002],{"class":280},"'POST'",[216,1004,1005],{"class":284}," })\n",[216,1007,1008],{"class":276,"line":783},[216,1009,1010],{"class":982},"      \u002F\u002F Refresh session state\n",[216,1012,1013,1016,1019,1022,1025,1028,1031,1033,1036],{"class":276,"line":788},[216,1014,1015],{"class":292},"      const",[216,1017,1018],{"class":284}," { ",[216,1020,1021],{"class":288},"fetch",[216,1023,1024],{"class":284},": ",[216,1026,1027],{"class":312},"fetchSession",[216,1029,1030],{"class":284}," } ",[216,1032,908],{"class":292},[216,1034,1035],{"class":296}," useUserSession",[216,1037,1038],{"class":284},"()\n",[216,1040,1041,1043,1046],{"class":276,"line":793},[216,1042,988],{"class":292},[216,1044,1045],{"class":296}," fetchSession",[216,1047,1038],{"class":284},[216,1049,1051],{"class":276,"line":1050},14,[216,1052,1053],{"class":982},"      \u002F\u002F Mark as handled, skip default 401 behavior\n",[216,1055,1057,1060,1062],{"class":276,"line":1056},15,[216,1058,1059],{"class":284},"      result.handled ",[216,1061,908],{"class":292},[216,1063,970],{"class":312},[216,1065,1067],{"class":276,"line":1066},16,[216,1068,1069],{"class":284},"    }\n",[216,1071,1073,1076],{"class":276,"line":1072},17,[216,1074,1075],{"class":292},"    catch",[216,1077,349],{"class":284},[216,1079,1081],{"class":276,"line":1080},18,[216,1082,1083],{"class":982},"      \u002F\u002F Refresh failed — fall through to default behavior (clear session + redirect to login)\n",[216,1085,1087],{"class":276,"line":1086},19,[216,1088,1069],{"class":284},[216,1090,1092,1095],{"class":276,"line":1091},20,[216,1093,1094],{"class":292},"    finally",[216,1096,349],{"class":284},[216,1098,1100,1103,1105],{"class":276,"line":1099},21,[216,1101,1102],{"class":284},"      isRefreshing ",[216,1104,908],{"class":292},[216,1106,911],{"class":312},[216,1108,1110],{"class":276,"line":1109},22,[216,1111,1069],{"class":284},[216,1113,1115],{"class":276,"line":1114},23,[216,1116,426],{"class":284},[216,1118,1120],{"class":276,"line":1119},24,[216,1121,432],{"class":284},[229,1123,1125],{"id":1124},"registration","Registration",[252,1127,1129],{"id":1128},"in-a-nuxt-plugin-recommended","In a Nuxt Plugin (Recommended)",[209,1131,1132],{},"Suitable for global logic that is automatically registered at app startup:",[266,1134,1137],{"className":268,"code":1135,"filename":1136,"language":270,"meta":271,"style":271},"export default defineNuxtPlugin((nuxtApp) => {\n  nuxtApp.hook('movk:api:request', (context) => {\n    \u002F\u002F Global request handling\n  })\n\n  nuxtApp.hook('movk:api:error', (context, error) => {\n    \u002F\u002F Global error handling\n  })\n})\n","plugins\u002Fapi-hooks.ts",[239,1138,1139,1157,1177,1182,1186,1190,1214,1219,1223],{"__ignoreMap":271},[216,1140,1141,1143,1145,1147,1149,1151,1153,1155],{"class":276,"line":277},[216,1142,330],{"class":292},[216,1144,333],{"class":292},[216,1146,336],{"class":296},[216,1148,339],{"class":284},[216,1150,342],{"class":288},[216,1152,300],{"class":284},[216,1154,303],{"class":292},[216,1156,349],{"class":284},[216,1158,1159,1161,1163,1165,1167,1169,1171,1173,1175],{"class":276,"line":352},[216,1160,355],{"class":284},[216,1162,358],{"class":296},[216,1164,361],{"class":284},[216,1166,281],{"class":280},[216,1168,366],{"class":284},[216,1170,289],{"class":288},[216,1172,300],{"class":284},[216,1174,303],{"class":292},[216,1176,349],{"class":284},[216,1178,1179],{"class":276,"line":377},[216,1180,1181],{"class":982},"    \u002F\u002F Global request handling\n",[216,1183,1184],{"class":276,"line":423},[216,1185,426],{"class":284},[216,1187,1188],{"class":276,"line":429},[216,1189,742],{"emptyLinePlaceholder":741},[216,1191,1192,1194,1196,1198,1200,1202,1204,1206,1208,1210,1212],{"class":276,"line":582},[216,1193,355],{"class":284},[216,1195,358],{"class":296},[216,1197,361],{"class":284},[216,1199,624],{"class":280},[216,1201,366],{"class":284},[216,1203,289],{"class":288},[216,1205,709],{"class":284},[216,1207,655],{"class":288},[216,1209,300],{"class":284},[216,1211,303],{"class":292},[216,1213,349],{"class":284},[216,1215,1216],{"class":276,"line":588},[216,1217,1218],{"class":982},"    \u002F\u002F Global error handling\n",[216,1220,1221],{"class":276,"line":593},[216,1222,426],{"class":284},[216,1224,1225],{"class":276,"line":771},[216,1226,432],{"class":284},[252,1228,1230],{"id":1229},"in-a-component","In a Component",[209,1232,1233],{},"Suitable for page-scoped logic:",[266,1235,1239],{"className":1236,"code":1237,"language":1238,"meta":271,"style":271},"language-vue shiki shiki-themes github-light github-light github-dark","\u003Cscript setup>\nconst nuxtApp = useNuxtApp()\n\n\u002F\u002F Only active on the current page\nconst unregister = nuxtApp.hook('movk:api:error', (context, error) => {\n  \u002F\u002F Page-level error handling\n})\n\nonUnmounted(() => {\n  unregister() \u002F\u002F Clean up when the component is destroyed\n})\n\u003C\u002Fscript>\n","vue",[239,1240,1241,1255,1271,1275,1280,1312,1317,1321,1325,1337,1348,1352],{"__ignoreMap":271},[216,1242,1243,1245,1249,1252],{"class":276,"line":277},[216,1244,470],{"class":284},[216,1246,1248],{"class":1247},"sovSZ","script",[216,1250,1251],{"class":296}," setup",[216,1253,1254],{"class":284},">\n",[216,1256,1257,1260,1263,1266,1269],{"class":276,"line":352},[216,1258,1259],{"class":292},"const",[216,1261,1262],{"class":312}," nuxtApp",[216,1264,1265],{"class":292}," =",[216,1267,1268],{"class":296}," useNuxtApp",[216,1270,1038],{"class":284},[216,1272,1273],{"class":276,"line":377},[216,1274,742],{"emptyLinePlaceholder":741},[216,1276,1277],{"class":276,"line":423},[216,1278,1279],{"class":982},"\u002F\u002F Only active on the current page\n",[216,1281,1282,1284,1287,1289,1292,1294,1296,1298,1300,1302,1304,1306,1308,1310],{"class":276,"line":429},[216,1283,1259],{"class":292},[216,1285,1286],{"class":312}," unregister",[216,1288,1265],{"class":292},[216,1290,1291],{"class":284}," nuxtApp.",[216,1293,358],{"class":296},[216,1295,361],{"class":284},[216,1297,624],{"class":280},[216,1299,366],{"class":284},[216,1301,289],{"class":288},[216,1303,709],{"class":284},[216,1305,655],{"class":288},[216,1307,300],{"class":284},[216,1309,303],{"class":292},[216,1311,349],{"class":284},[216,1313,1314],{"class":276,"line":582},[216,1315,1316],{"class":982},"  \u002F\u002F Page-level error handling\n",[216,1318,1319],{"class":276,"line":588},[216,1320,432],{"class":284},[216,1322,1323],{"class":276,"line":593},[216,1324,742],{"emptyLinePlaceholder":741},[216,1326,1327,1330,1333,1335],{"class":276,"line":771},[216,1328,1329],{"class":296},"onUnmounted",[216,1331,1332],{"class":284},"(() ",[216,1334,303],{"class":292},[216,1336,349],{"class":284},[216,1338,1339,1342,1345],{"class":276,"line":777},[216,1340,1341],{"class":296},"  unregister",[216,1343,1344],{"class":284},"() ",[216,1346,1347],{"class":982},"\u002F\u002F Clean up when the component is destroyed\n",[216,1349,1350],{"class":276,"line":783},[216,1351,432],{"class":284},[216,1353,1354,1357,1359],{"class":276,"line":788},[216,1355,1356],{"class":284},"\u003C\u002F",[216,1358,1248],{"class":1247},[216,1360,1254],{"class":284},[1362,1363,1364,1365,1367],"note",{},"When registering hooks inside a component, always call the returned unregister function in ",[239,1366,1329],{}," to avoid memory leaks.",[229,1369,1371],{"id":1370},"execution-order","Execution Order",[266,1373,1377],{"className":1374,"code":1376,"language":213,"meta":271},[1375],"language-text","Request initiated\n  │\n  ├── Auth token injection\n  ├── Debug logging\n  ├── movk:api:request             \u003C-- user extension point\n  │\n  ├── Network request sent ─────────────>\n  │\n  ├── HTTP 2xx response\n  │   ├── Business success (code in successCodes, or businessCheck disabled)\n  │   │   ├── Data unwrap (extract dataKey, skipped when unwrap is disabled)\n  │   │   ├── movk:api:response    \u003C-- user extension point\n  │   │   └── Success Toast\n  │   │\n  │   └── Business failure → throw ApiError(kind: business), go to exit\n  │\n  ├── HTTP 4xx\u002F5xx → ofetch retries per retry option, still failing goes to exit\n  ├── Network failure \u002F timeout → go to exit\n  │\n  └── Exit (runs once per request, skipped on abort)\n      ├── Normalize to ApiError\n      ├── [HTTP or business code 401] movk:api:unauthorized  \u003C-- user extension point\n      │       └── (if not handled) clear session + redirect to login\n      ├── movk:api:error           \u003C-- user extension point (skipped for handled 401)\n      ├── Error Toast\n      └── throw ApiError\n",[239,1378,1376],{"__ignoreMap":271},[229,1380,1382],{"id":1381},"typescript-support","TypeScript Support",[209,1384,1385],{},"Hook types are automatically registered via module declaration:",[266,1387,1390],{"className":268,"code":1388,"filename":1389,"language":270,"meta":271,"style":271},"declare module 'nuxt\u002Fapp' {\n  interface RuntimeNuxtHooks {\n    'movk:api:request': (context: FetchContext) => void | Promise\u003Cvoid>\n    'movk:api:response': (context: FetchContext & { response: FetchResponse\u003Cany> }) => void | Promise\u003Cvoid>\n    'movk:api:error': (context: FetchContext, error: ApiError) => void | Promise\u003Cvoid>\n    'movk:api:unauthorized': (\n      context: FetchContext,\n      result: { handled: boolean }\n    ) => void | Promise\u003Cvoid>\n  }\n}\n","src\u002Fruntime\u002Ftypes\u002Fmodule.ts",[239,1391,1392,1405,1415,1447,1496,1536,1546,1558,1577,1596,1601],{"__ignoreMap":271},[216,1393,1394,1397,1400,1403],{"class":276,"line":277},[216,1395,1396],{"class":292},"declare",[216,1398,1399],{"class":292}," module",[216,1401,1402],{"class":280}," 'nuxt\u002Fapp'",[216,1404,349],{"class":284},[216,1406,1407,1410,1413],{"class":276,"line":352},[216,1408,1409],{"class":292},"  interface",[216,1411,1412],{"class":296}," RuntimeNuxtHooks",[216,1414,349],{"class":284},[216,1416,1417,1420,1422,1424,1426,1428,1430,1432,1434,1436,1438,1440,1442,1445],{"class":276,"line":377},[216,1418,1419],{"class":280},"    'movk:api:request'",[216,1421,293],{"class":292},[216,1423,933],{"class":284},[216,1425,289],{"class":288},[216,1427,293],{"class":292},[216,1429,297],{"class":296},[216,1431,300],{"class":284},[216,1433,303],{"class":292},[216,1435,306],{"class":312},[216,1437,309],{"class":292},[216,1439,313],{"class":296},[216,1441,470],{"class":284},[216,1443,1444],{"class":312},"void",[216,1446,1254],{"class":284},[216,1448,1449,1452,1454,1456,1458,1460,1462,1465,1467,1470,1472,1475,1477,1479,1482,1484,1486,1488,1490,1492,1494],{"class":276,"line":423},[216,1450,1451],{"class":280},"    'movk:api:response'",[216,1453,293],{"class":292},[216,1455,933],{"class":284},[216,1457,289],{"class":288},[216,1459,293],{"class":292},[216,1461,297],{"class":296},[216,1463,1464],{"class":292}," &",[216,1466,1018],{"class":284},[216,1468,1469],{"class":288},"response",[216,1471,293],{"class":292},[216,1473,1474],{"class":296}," FetchResponse",[216,1476,470],{"class":284},[216,1478,473],{"class":312},[216,1480,1481],{"class":284},"> }) ",[216,1483,303],{"class":292},[216,1485,306],{"class":312},[216,1487,309],{"class":292},[216,1489,313],{"class":296},[216,1491,470],{"class":284},[216,1493,1444],{"class":312},[216,1495,1254],{"class":284},[216,1497,1498,1501,1503,1505,1507,1509,1511,1513,1515,1517,1520,1522,1524,1526,1528,1530,1532,1534],{"class":276,"line":429},[216,1499,1500],{"class":280},"    'movk:api:error'",[216,1502,293],{"class":292},[216,1504,933],{"class":284},[216,1506,289],{"class":288},[216,1508,293],{"class":292},[216,1510,297],{"class":296},[216,1512,709],{"class":284},[216,1514,655],{"class":288},[216,1516,293],{"class":292},[216,1518,1519],{"class":296}," ApiError",[216,1521,300],{"class":284},[216,1523,303],{"class":292},[216,1525,306],{"class":312},[216,1527,309],{"class":292},[216,1529,313],{"class":296},[216,1531,470],{"class":284},[216,1533,1444],{"class":312},[216,1535,1254],{"class":284},[216,1537,1538,1541,1543],{"class":276,"line":582},[216,1539,1540],{"class":280},"    'movk:api:unauthorized'",[216,1542,293],{"class":292},[216,1544,1545],{"class":284}," (\n",[216,1547,1548,1551,1553,1555],{"class":276,"line":588},[216,1549,1550],{"class":288},"      context",[216,1552,293],{"class":292},[216,1554,297],{"class":296},[216,1556,1557],{"class":284},",\n",[216,1559,1560,1563,1565,1567,1570,1572,1575],{"class":276,"line":593},[216,1561,1562],{"class":288},"      result",[216,1564,293],{"class":292},[216,1566,1018],{"class":284},[216,1568,1569],{"class":288},"handled",[216,1571,293],{"class":292},[216,1573,1574],{"class":312}," boolean",[216,1576,479],{"class":284},[216,1578,1579,1582,1584,1586,1588,1590,1592,1594],{"class":276,"line":771},[216,1580,1581],{"class":284},"    ) ",[216,1583,303],{"class":292},[216,1585,306],{"class":312},[216,1587,309],{"class":292},[216,1589,313],{"class":296},[216,1591,470],{"class":284},[216,1593,1444],{"class":312},[216,1595,1254],{"class":284},[216,1597,1598],{"class":276,"line":777},[216,1599,1600],{"class":284},"  }\n",[216,1602,1603],{"class":276,"line":783},[216,1604,1605],{"class":284},"}\n",[209,1607,1608,1609,1612],{},"No additional configuration is needed — ",[239,1610,1611],{},"nuxtApp.hook('movk:api:...')"," provides full type inference and auto-completion out of the box.",[1614,1615,1616],"style",{},"html pre.shiki code .sIIMD, html code.shiki .sIIMD{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sxrX7, html code.shiki .sxrX7{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sP4rz, html code.shiki .sP4rz{--shiki-light:#E36209;--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .s8jYJ, html code.shiki .s8jYJ{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .snPdu, html code.shiki .snPdu{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sBjJW, html code.shiki .sBjJW{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sovSZ, html code.shiki .sovSZ{--shiki-light:#22863A;--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":271,"searchDepth":352,"depth":352,"links":1618},[1619,1620,1626,1630,1631],{"id":231,"depth":352,"text":15},{"id":249,"depth":352,"text":250,"children":1621},[1622,1623,1624,1625],{"id":254,"depth":377,"text":257},{"id":435,"depth":377,"text":438},{"id":598,"depth":377,"text":601},{"id":798,"depth":377,"text":613},{"id":1124,"depth":352,"text":1125,"children":1627},[1628,1629],{"id":1128,"depth":377,"text":1129},{"id":1229,"depth":377,"text":1230},{"id":1370,"depth":352,"text":1371},{"id":1381,"depth":352,"text":1382},"md",{},{"title":158,"description":161},{"loc":159},"JHttCtGH3bU7n6p_OFi9JpTU7io4KawBCwm4IIiMT3E",[1638,1639],{"title":153,"path":154,"stem":155,"description":156,"children":-1},{"title":163,"path":164,"stem":165,"description":166,"children":-1},{"data":1641,"body":1642},{},{"type":205,"children":1643},[1644],{"type":208,"tag":209,"props":1645,"children":1646},{},[1647],{"type":213,"value":161},1795419759675]