[{"data":1,"prerenderedAt":594},["ShallowReactive",2],{"page-\u002Futils\u002Fapi\u002Ffunctions\u002FgetPermitStatus":3,"navigation":207},{"collection":4,"page":5},"docs_en",{"id":6,"title":7,"body":8,"description":197,"extension":198,"meta":199,"navigation":201,"path":202,"rawbody":203,"seo":204,"stem":205,"__hash__":206},"docs_en\u002Futils\u002Fapi\u002Ffunctions\u002FgetPermitStatus.md","getPermitStatus",{"type":9,"value":10,"toc":186},"minimark",[11,44,51,132,141,146,149,154,156,164,166,174,178],[12,13,14],"blockquote",{},[15,16,17,20,21,25,26,25,29,32,33,40,41],"p",{},[18,19,7],"strong",{},"(",[22,23,24],"code",{},"well",", ",[22,27,28],{},"permit",[22,30,31],{},"today?","): ",[34,35,37],"a",{"href":36},"\u002Futils\u002Fapi\u002Ftype-aliases\u002FPermitStatus",[22,38,39],{},"PermitStatus"," | ",[22,42,43],{},"undefined",[15,45,46,47,50],{},"Derives the status of a permit (.well v2.3), evaluated on ",[22,48,49],{},"today"," (a local\ncalendar date at the well site), in order:",[52,53,54,83,94,102,114,126],"ol",{},[55,56,57,58,61,62,65,66,69,70,25,73,25,76,25,79,82],"li",{},"A stored administrative ",[22,59,60],{},"status"," other than ",[22,63,64],{},"granted"," (",[22,67,68],{},"requested",",\n",[22,71,72],{},"suspended",[22,74,75],{},"revoked",[22,77,78],{},"denied",[22,80,81],{},"withdrawn",") is returned as-is.",[55,84,85,86,89,90,93],{},"Another permit ",[22,87,88],{},"supersedes"," it → ",[22,91,92],{},"superseded",".",[55,95,96,98,99,93],{},[22,97,49],{}," is before its start date → ",[22,100,101],{},"not_yet_valid",[55,103,104,107,108,110,111,93],{},[22,105,106],{},"valid_until"," is absent, or ",[22,109,49],{}," is on or before it → ",[22,112,113],{},"active",[55,115,116,119,120,122,123,93],{},[22,117,118],{},"renewal_requested_at"," is on or before ",[22,121,106],{}," →\n",[22,124,125],{},"active_pending_renewal",[55,127,128,129,93],{},"Otherwise → ",[22,130,131],{},"expired",[15,133,134,135,137,138,140],{},"Returns ",[22,136,43],{}," when ",[22,139,28],{}," is an id that does not resolve.",[142,143,145],"h2",{"id":144},"parameters","Parameters",[147,148,24],"h3",{"id":24},[15,150,151],{},[22,152,153],{},"Well",[147,155,28],{"id":28},[15,157,158,40,161],{},[22,159,160],{},"string",[22,162,163],{},"Permit",[147,165,31],{"id":49},[15,167,168,170,171],{},[22,169,160],{}," = ",[22,172,173],{},"...",[142,175,177],{"id":176},"returns","Returns",[15,179,180,40,184],{},[34,181,182],{"href":36},[22,183,39],{},[22,185,43],{},{"title":187,"searchDepth":188,"depth":188,"links":189},"",2,[190,196],{"id":144,"depth":188,"text":145,"children":191},[192,194,195],{"id":24,"depth":193,"text":24},3,{"id":28,"depth":193,"text":28},{"id":49,"depth":193,"text":31},{"id":176,"depth":188,"text":177},"Derives the status of a permit (.well v2.3), evaluated on today (a local calendar date at the well site), in order:","md",{"generated":200},true,false,"\u002Futils\u002Fapi\u002Ffunctions\u002FgetPermitStatus","---\npath: \"\u002Futils\u002Fapi\u002Ffunctions\u002FgetPermitStatus\"\ntitle: getPermitStatus\ndescription: \"Derives the status of a permit (.well v2.3), evaluated on today (a local calendar date at the well site), in order:\"\ngenerated: true\nnavigation: false\n---\n\n> **getPermitStatus**(`well`, `permit`, `today?`): [`PermitStatus`](\u002Futils\u002Fapi\u002Ftype-aliases\u002FPermitStatus) \\| `undefined`\n\nDerives the status of a permit (.well v2.3), evaluated on `today` (a local\ncalendar date at the well site), in order:\n\n1. A stored administrative `status` other than `granted` (`requested`,\n   `suspended`, `revoked`, `denied`, `withdrawn`) is returned as-is.\n2. Another permit `supersedes` it → `superseded`.\n3. `today` is before its start date → `not_yet_valid`.\n4. `valid_until` is absent, or `today` is on or before it → `active`.\n5. `renewal_requested_at` is on or before `valid_until` →\n   `active_pending_renewal`.\n6. Otherwise → `expired`.\n\nReturns `undefined` when `permit` is an id that does not resolve.\n\n## Parameters\n\n### well\n\n`Well`\n\n### permit\n\n`string` \\| `Permit`\n\n### today?\n\n`string` = `...`\n\n## Returns\n\n[`PermitStatus`](\u002Futils\u002Fapi\u002Ftype-aliases\u002FPermitStatus) \\| `undefined`\n",{"title":7,"description":197},"utils\u002Fapi\u002Ffunctions\u002FgetPermitStatus","ifXX30hA2toRiz_c4GoLZqmQFpTt4ODspXJHia8vD0E",{"docs_en":208,"spec":525,"changelogs":575},[209,229,248,303,413,467],{"title":210,"path":211,"stem":212,"children":213},"Ai","\u002Fai","ai",[214,217,221,225],{"title":215,"path":211,"stem":216},"Introduction","ai\u002Findex",{"title":218,"path":219,"stem":220},"Converting reports with an assistant","\u002Fai\u002Fconversion-skill","ai\u002Fconversion-skill",{"title":222,"path":223,"stem":224},"llms.txt and Markdown pages","\u002Fai\u002Fllms","ai\u002Fllms",{"title":226,"path":227,"stem":228},"MCP server","\u002Fai\u002Fmcp","ai\u002Fmcp",{"title":230,"path":231,"stem":232,"children":233},"Contributing","\u002Fcontributing","contributing",[234,236,240,244],{"title":215,"path":231,"stem":235},"contributing\u002Findex",{"title":237,"path":238,"stem":239},"Writing docs","\u002Fcontributing\u002Fwriting-docs","contributing\u002F1.writing-docs",{"title":241,"path":242,"stem":243},"Update rules","\u002Fcontributing\u002Fupdate-rules","contributing\u002F2.update-rules",{"title":245,"path":246,"stem":247},"Content components","\u002Fcontributing\u002Fcomponents","contributing\u002Fcomponents",{"title":249,"path":250,"stem":251,"children":252},"Core","\u002Fcore","core",[253,255,268,297],{"title":215,"path":250,"stem":254},"core\u002Findex",{"title":256,"path":257,"stem":258,"children":259,"page":201},"Getting Started","\u002Fcore\u002Fgetting-started","core\u002F1.getting-started",[260,264],{"title":261,"path":262,"stem":263},"Installation","\u002Fcore\u002Fgetting-started\u002Finstallation","core\u002F1.getting-started\u002F1.installation",{"title":265,"path":266,"stem":267},"First use","\u002Fcore\u002Fgetting-started\u002Ffirst-use","core\u002F1.getting-started\u002F2.first-use",{"title":269,"path":270,"stem":271,"children":272,"page":201},"Guides","\u002Fcore\u002Fguides","core\u002F2.guides",[273,277,281,285,289,293],{"title":274,"path":275,"stem":276},"Parsing and validating","\u002Fcore\u002Fguides\u002Fparsing-and-validating","core\u002F2.guides\u002F1.parsing-and-validating",{"title":278,"path":279,"stem":280},"Serializing and sharing","\u002Fcore\u002Fguides\u002Fserializing-and-sharing","core\u002F2.guides\u002F2.serializing-and-sharing",{"title":282,"path":283,"stem":284},"Unit conversion","\u002Fcore\u002Fguides\u002Funit-conversion","core\u002F2.guides\u002F3.unit-conversion",{"title":286,"path":287,"stem":288},"Vocabularies and textures","\u002Fcore\u002Fguides\u002Fvocabularies-and-textures","core\u002F2.guides\u002F4.vocabularies-and-textures",{"title":290,"path":291,"stem":292},"Water quality vocabulary","\u002Fcore\u002Fguides\u002Fwater-quality-vocabulary","core\u002F2.guides\u002F5.water-quality-vocabulary",{"title":294,"path":295,"stem":296},"Versions and time zones","\u002Fcore\u002Fguides\u002Fversions-and-time-zones","core\u002F2.guides\u002F6.versions-and-time-zones",{"title":298,"path":299,"stem":300,"children":301},"API reference","\u002Fcore\u002Fapi","core\u002Fapi\u002Findex",[302],{"title":298,"path":299,"stem":300},{"title":304,"path":305,"stem":306,"children":307},"Format","\u002Fformat","format",[308,310,330,359,383,403,409],{"title":215,"path":305,"stem":309},"format\u002Findex",{"title":256,"path":311,"stem":312,"children":313,"page":201},"\u002Fformat\u002Fgetting-started","format\u002F1.getting-started",[314,318,322,326],{"title":315,"path":316,"stem":317},"What is .well?","\u002Fformat\u002Fgetting-started\u002Fwhat-is-well","format\u002F1.getting-started\u002F1.what-is-well",{"title":319,"path":320,"stem":321},"For geologists","\u002Fformat\u002Fgetting-started\u002Ffor-geologists","format\u002F1.getting-started\u002F2.for-geologists",{"title":323,"path":324,"stem":325},"For developers","\u002Fformat\u002Fgetting-started\u002Ffor-developers","format\u002F1.getting-started\u002F3.for-developers",{"title":327,"path":328,"stem":329},"Your first .well file","\u002Fformat\u002Fgetting-started\u002Ffirst-well-file","format\u002F1.getting-started\u002F4.first-well-file",{"title":331,"path":332,"stem":333,"children":334,"page":201},"Concepts","\u002Fformat\u002Fconcepts","format\u002F2.concepts",[335,339,343,347,351,355],{"title":336,"path":337,"stem":338},"Depths and intervals","\u002Fformat\u002Fconcepts\u002Fdepths-and-intervals","format\u002F2.concepts\u002F1.depths-and-intervals",{"title":340,"path":341,"stem":342},"Units and precision","\u002Fformat\u002Fconcepts\u002Funits-and-precision","format\u002F2.concepts\u002F2.units-and-precision",{"title":344,"path":345,"stem":346},"Vocabularies","\u002Fformat\u002Fconcepts\u002Fvocabularies","format\u002F2.concepts\u002F3.vocabularies",{"title":348,"path":349,"stem":350},"Profiles","\u002Fformat\u002Fconcepts\u002Fprofiles","format\u002F2.concepts\u002F4.profiles",{"title":352,"path":353,"stem":354},"Versions and deprecation","\u002Fformat\u002Fconcepts\u002Fversions-and-deprecation","format\u002F2.concepts\u002F5.versions-and-deprecation",{"title":356,"path":357,"stem":358},"Extensibility","\u002Fformat\u002Fconcepts\u002Fextensibility","format\u002F2.concepts\u002F6.extensibility",{"title":269,"path":360,"stem":361,"children":362,"page":201},"\u002Fformat\u002Fguides","format\u002F3.guides",[363,367,371,375,379],{"title":364,"path":365,"stem":366},"Writing a .well by hand","\u002Fformat\u002Fguides\u002Fwriting-by-hand","format\u002F3.guides\u002F1.writing-by-hand",{"title":368,"path":369,"stem":370},"Converting a report","\u002Fformat\u002Fguides\u002Fconverting-a-report","format\u002F3.guides\u002F2.converting-a-report",{"title":372,"path":373,"stem":374},"Validating","\u002Fformat\u002Fguides\u002Fvalidating","format\u002F3.guides\u002F3.validating",{"title":376,"path":377,"stem":378},"Extending for your own needs","\u002Fformat\u002Fguides\u002Fextending","format\u002F3.guides\u002F4.extending",{"title":380,"path":381,"stem":382},"Building an editor or database on .well","\u002Fformat\u002Fguides\u002Fbuilding-on-well","format\u002F3.guides\u002F5.building-on-well",{"title":384,"path":385,"stem":386,"children":387},"Overview","\u002Fformat\u002Freference","format\u002F4.reference\u002Findex",[388,389,393,397],{"title":384,"path":385,"stem":386},{"title":390,"path":391,"stem":392},"JSON Schema","\u002Fformat\u002Freference\u002Fjson-schema","format\u002F4.reference\u002F1.json-schema",{"title":394,"path":395,"stem":396},"Example wells","\u002Fformat\u002Freference\u002Fexamples","format\u002F4.reference\u002F2.examples",{"title":398,"path":399,"stem":400,"children":401},"Object reference","\u002Fformat\u002Freference\u002Fobjects","format\u002Freference\u002Fobjects\u002Findex",[402],{"title":398,"path":399,"stem":400},{"title":404,"path":405,"stem":406,"children":407},"About the spec","\u002Fformat\u002Fspec","format\u002F5.spec\u002Findex",[408],{"title":404,"path":405,"stem":406},{"title":410,"path":411,"stem":412},"Changelog","\u002Fformat\u002Fchangelog","format\u002F6.changelog",{"title":414,"path":415,"stem":416,"children":417},"Render","\u002Frender","render",[418,420,430,462],{"title":215,"path":415,"stem":419},"render\u002Findex",{"title":256,"path":421,"stem":422,"children":423,"page":201},"\u002Frender\u002Fgetting-started","render\u002F1.getting-started",[424,427],{"title":261,"path":425,"stem":426},"\u002Frender\u002Fgetting-started\u002Finstallation","render\u002F1.getting-started\u002F1.installation",{"title":265,"path":428,"stem":429},"\u002Frender\u002Fgetting-started\u002Ffirst-use","render\u002F1.getting-started\u002F2.first-use",{"title":269,"path":431,"stem":432,"children":433,"page":201},"\u002Frender\u002Fguides","render\u002F2.guides",[434,438,442,446,450,454,458],{"title":435,"path":436,"stem":437},"Panels and layout","\u002Frender\u002Fguides\u002Fpanels-and-layout","render\u002F2.guides\u002F1.panels-and-layout",{"title":439,"path":440,"stem":441},"Layers and labels","\u002Frender\u002Fguides\u002Flayers-and-labels","render\u002F2.guides\u002F2.layers-and-labels",{"title":443,"path":444,"stem":445},"Theming","\u002Frender\u002Fguides\u002Ftheming","render\u002F2.guides\u002F3.theming",{"title":447,"path":448,"stem":449},"Locale and units","\u002Frender\u002Fguides\u002Flocale-and-units","render\u002F2.guides\u002F4.locale-and-units",{"title":451,"path":452,"stem":453},"Legends","\u002Frender\u002Fguides\u002Flegends","render\u002F2.guides\u002F5.legends",{"title":455,"path":456,"stem":457},"Zoom, pan and highlights","\u002Frender\u002Fguides\u002Finteraction","render\u002F2.guides\u002F6.interaction",{"title":459,"path":460,"stem":461},"Using it in a framework","\u002Frender\u002Fguides\u002Fframeworks","render\u002F2.guides\u002F7.frameworks",{"title":298,"path":463,"stem":464,"children":465},"\u002Frender\u002Fapi","render\u002Fapi\u002Findex",[466],{"title":298,"path":463,"stem":464},{"title":468,"path":469,"stem":470,"children":471},"Utils","\u002Futils","utils",[472,474,484,520],{"title":215,"path":469,"stem":473},"utils\u002Findex",{"title":256,"path":475,"stem":476,"children":477,"page":201},"\u002Futils\u002Fgetting-started","utils\u002F1.getting-started",[478,481],{"title":261,"path":479,"stem":480},"\u002Futils\u002Fgetting-started\u002Finstallation","utils\u002F1.getting-started\u002F1.installation",{"title":265,"path":482,"stem":483},"\u002Futils\u002Fgetting-started\u002Ffirst-use","utils\u002F1.getting-started\u002F2.first-use",{"title":269,"path":485,"stem":486,"children":487,"page":201},"\u002Futils\u002Fguides","utils\u002F2.guides",[488,492,496,500,504,508,512,516],{"title":489,"path":490,"stem":491},"Geometry and volumes","\u002Futils\u002Fguides\u002Fgeometry-and-volumes","utils\u002F2.guides\u002F1.geometry-and-volumes",{"title":493,"path":494,"stem":495},"Water levels and pumping tests","\u002Futils\u002Fguides\u002Fpumping-tests","utils\u002F2.guides\u002F2.pumping-tests",{"title":497,"path":498,"stem":499},"Permits","\u002Futils\u002Fguides\u002Fpermits","utils\u002F2.guides\u002F3.permits",{"title":501,"path":502,"stem":503},"Operation and production","\u002Futils\u002Fguides\u002Foperation","utils\u002F2.guides\u002F4.operation",{"title":505,"path":506,"stem":507},"Water quality","\u002Futils\u002Fguides\u002Fwater-quality","utils\u002F2.guides\u002F5.water-quality",{"title":509,"path":510,"stem":511},"Logger import","\u002Futils\u002Fguides\u002Flogger-import","utils\u002F2.guides\u002F6.logger-import",{"title":513,"path":514,"stem":515},"SIAGAS import","\u002Futils\u002Fguides\u002Fsiagas-import","utils\u002F2.guides\u002F7.siagas-import",{"title":517,"path":518,"stem":519},"Formatting","\u002Futils\u002Fguides\u002Fformatting","utils\u002F2.guides\u002F8.formatting",{"title":298,"path":521,"stem":522,"children":523},"\u002Futils\u002Fapi","utils\u002Fapi\u002Findex",[524],{"title":298,"path":521,"stem":522},[526],{"title":304,"path":305,"stem":306,"children":527,"page":201},[528],{"title":529,"path":405,"stem":530,"children":531,"page":201},"Spec","format\u002Fspec",[532,541,550],{"title":533,"path":534,"stem":535,"children":536,"page":201},"Reference","\u002Fformat\u002Fspec\u002Freference","format\u002Fspec\u002Freference",[537],{"title":538,"path":539,"stem":540},"FGDC Texture Patterns Reference","\u002Fformat\u002Fspec\u002Freference\u002Ffgdc-textures","format\u002Fspec\u002Freference\u002Ffgdc-textures",{"title":542,"path":543,"stem":544,"children":545,"page":201},"V1","\u002Fformat\u002Fspec\u002Fv1","format\u002Fspec\u002Fv1",[546],{"title":547,"path":548,"stem":549},".well File Format Specification","\u002Fformat\u002Fspec\u002Fv1\u002Fwell-format","format\u002Fspec\u002Fv1\u002Fwell-format",{"title":551,"path":552,"stem":553,"children":554,"page":201},"V2","\u002Fformat\u002Fspec\u002Fv2","format\u002Fspec\u002Fv2",[555,559,563,567,571],{"title":556,"path":557,"stem":558},".well File Format Specification — Version 2.4: Format Reference","\u002Fformat\u002Fspec\u002Fv2\u002Fformat-reference","format\u002Fspec\u002Fv2\u002Fformat-reference",{"title":560,"path":561,"stem":562},".well File Format Specification — Version 2.4: Interoperability","\u002Fformat\u002Fspec\u002Fv2\u002Finteroperability","format\u002Fspec\u002Fv2\u002Finteroperability",{"title":564,"path":565,"stem":566},".well File Format Specification — Version 2.4: Object Schemas","\u002Fformat\u002Fspec\u002Fv2\u002Fobject-schemas","format\u002Fspec\u002Fv2\u002Fobject-schemas",{"title":568,"path":569,"stem":570},".well File Format Specification — Version 2.4: Overview","\u002Fformat\u002Fspec\u002Fv2\u002Foverview","format\u002Fspec\u002Fv2\u002Foverview",{"title":572,"path":573,"stem":574},".well File Format Specification — Version 2.4: Water Quality","\u002Fformat\u002Fspec\u002Fv2\u002Fwater-quality","format\u002Fspec\u002Fv2\u002Fwater-quality",[576,582,588],{"title":249,"path":250,"stem":251,"children":577,"page":201},[578],{"title":579,"path":580,"stem":581},"@welldot\u002Fcore","\u002Fcore\u002Fchangelog","core\u002FCHANGELOG",{"title":414,"path":415,"stem":416,"children":583,"page":201},[584],{"title":585,"path":586,"stem":587},"@welldot\u002Frender","\u002Frender\u002Fchangelog","render\u002FCHANGELOG",{"title":468,"path":469,"stem":470,"children":589,"page":201},[590],{"title":591,"path":592,"stem":593},"@welldot\u002Futils","\u002Futils\u002Fchangelog","utils\u002FCHANGELOG",1793050500667]