[{"data":1,"prerenderedAt":1348},["ShallowReactive",2],{"navigation":3,"\u002Fwriting\u002Fdeleting":307,"\u002Fwriting\u002Fdeleting-surround":1343},{"3.x":4,"2.x":203},[5,32,61,99,121,147,165],{"title":6,"icon":7,"path":8,"stem":9,"children":10,"page":31},"Getting Started","i-heroicons-star","\u002Fgetting-started","1.getting-started",[11,15,19,23,27],{"title":12,"path":13,"stem":14},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction",{"title":16,"path":17,"stem":18},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation",{"title":20,"path":21,"stem":22},"Quick start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start",{"title":24,"path":25,"stem":26},"Configuration","\u002Fgetting-started\u002Fconfiguration","1.getting-started\u002F4.configuration",{"title":28,"path":29,"stem":30},"Upgrade guide","\u002Fgetting-started\u002Fupgrade-guide","1.getting-started\u002F5.upgrade-guide",false,{"title":33,"icon":34,"path":35,"stem":36,"children":37,"page":31},"Resources","i-heroicons-document-text","\u002Fresources","2.resources",[38,41,45,49,53,57],{"title":33,"path":39,"stem":40},"\u002Fresources\u002Fresources","2.resources\u002F1.resources",{"title":42,"path":43,"stem":44},"Fields","\u002Fresources\u002Ffields","2.resources\u002F2.fields",{"title":46,"path":47,"stem":48},"Relationships","\u002Fresources\u002Frelations","2.resources\u002F3.relations",{"title":50,"path":51,"stem":52},"Validation","\u002Fresources\u002Fvalidation","2.resources\u002F4.validation",{"title":54,"path":55,"stem":56},"Perimeter","\u002Fresources\u002Fperimeter","2.resources\u002F5.perimeter",{"title":58,"path":59,"stem":60},"Limits","\u002Fresources\u002Flimits","2.resources\u002F6.limits",{"title":62,"icon":63,"path":64,"stem":65,"children":66,"page":31},"Search","i-heroicons-magnifying-glass","\u002Fsearch","3.search",[67,71,75,79,83,87,91,95],{"title":68,"path":69,"stem":70},"Search overview","\u002Fsearch\u002Foverview","3.search\u002F1.overview",{"title":72,"path":73,"stem":74},"Search filters","\u002Fsearch\u002Ffilters","3.search\u002F2.filters",{"title":76,"path":77,"stem":78},"Sorts and selects","\u002Fsearch\u002Fsorts-and-selects","3.search\u002F3.sorts-and-selects",{"title":80,"path":81,"stem":82},"Includes and aggregates","\u002Fsearch\u002Fincludes-and-aggregates","3.search\u002F4.includes-and-aggregates",{"title":84,"path":85,"stem":86},"Scopes and instructions","\u002Fsearch\u002Fscopes-and-instructions","3.search\u002F5.scopes-and-instructions",{"title":88,"path":89,"stem":90},"Text search","\u002Fsearch\u002Ftext-search","3.search\u002F6.text-search",{"title":92,"path":93,"stem":94},"Search engines","\u002Fsearch\u002Fsearch-engines","3.search\u002F7.search-engines",{"title":96,"path":97,"stem":98},"Searching outside HTTP","\u002Fsearch\u002Foutside-http","3.search\u002F8.outside-http",{"title":100,"icon":101,"path":102,"stem":103,"children":104,"page":31},"Writing","i-heroicons-pencil-square","\u002Fwriting","4.writing",[105,109,113,117],{"title":106,"path":107,"stem":108},"Mutate","\u002Fwriting\u002Fmutate","4.writing\u002F1.mutate",{"title":110,"path":111,"stem":112},"Writing relations","\u002Fwriting\u002Frelations","4.writing\u002F2.relations",{"title":114,"path":115,"stem":116},"Versioned rows","\u002Fwriting\u002Fversioned-rows","4.writing\u002F3.versioned-rows",{"title":118,"path":119,"stem":120},"Deleting and restoring","\u002Fwriting\u002Fdeleting","4.writing\u002F4.deleting",{"title":122,"icon":123,"path":124,"stem":125,"children":126,"page":31},"Actions and Metrics","i-heroicons-bolt","\u002Factions-and-metrics","5.actions-and-metrics",[127,131,135,139,143],{"title":128,"path":129,"stem":130},"Actions","\u002Factions-and-metrics\u002Factions","5.actions-and-metrics\u002F1.actions",{"title":132,"path":133,"stem":134},"Queued Actions","\u002Factions-and-metrics\u002Fqueued-actions","5.actions-and-metrics\u002F2.queued-actions",{"title":136,"path":137,"stem":138},"Confirmation","\u002Factions-and-metrics\u002Fconfirmation","5.actions-and-metrics\u002F3.confirmation",{"title":140,"path":141,"stem":142},"Metrics","\u002Factions-and-metrics\u002Fmetrics","5.actions-and-metrics\u002F4.metrics",{"title":144,"path":145,"stem":146},"Exports","\u002Factions-and-metrics\u002Fexports","5.actions-and-metrics\u002F5.exports",{"title":148,"icon":149,"path":150,"stem":151,"children":152,"page":31},"Authorization","i-heroicons-lock-closed","\u002Fauthorization","6.authorization",[153,157,161],{"title":154,"path":155,"stem":156},"Policies","\u002Fauthorization\u002Fpolicies","6.authorization\u002F1.policies",{"title":158,"path":159,"stem":160},"Gates","\u002Fauthorization\u002Fgates","6.authorization\u002F2.gates",{"title":162,"path":163,"stem":164},"Decision Cache","\u002Fauthorization\u002Fdecision-cache","6.authorization\u002F3.decision-cache",{"title":166,"icon":167,"path":168,"stem":169,"children":170,"page":31},"Digging Deeper","i-heroicons-list-bullet","\u002Fdigging-deeper","7.digging-deeper",[171,175,179,183,187,191,195,199],{"title":172,"path":173,"stem":174},"Details","\u002Fdigging-deeper\u002Fdetails","7.digging-deeper\u002F1.details",{"title":176,"path":177,"stem":178},"Events and Hooks","\u002Fdigging-deeper\u002Fevents-and-hooks","7.digging-deeper\u002F2.events-and-hooks",{"title":180,"path":181,"stem":182},"Custom Responses","\u002Fdigging-deeper\u002Fresponses","7.digging-deeper\u002F3.responses",{"title":184,"path":185,"stem":186},"OpenAPI Documentation","\u002Fdigging-deeper\u002Fopenapi","7.digging-deeper\u002F4.openapi",{"title":188,"path":189,"stem":190},"Precognition","\u002Fdigging-deeper\u002Fprecognition","7.digging-deeper\u002F5.precognition",{"title":192,"path":193,"stem":194},"Artisan Commands","\u002Fdigging-deeper\u002Fartisan","7.digging-deeper\u002F6.artisan",{"title":196,"path":197,"stem":198},"Laravel Boost Skill","\u002Fdigging-deeper\u002Fai-skill","7.digging-deeper\u002F7.ai-skill",{"title":200,"path":201,"stem":202},"Translations","\u002Fdigging-deeper\u002Ftranslations","7.digging-deeper\u002F8.translations",[204,215,237,260,297],{"title":6,"icon":7,"path":205,"stem":206,"children":207,"page":31},"\u002F2.x\u002Fgetting-started","2.x\u002F1.getting-started",[208,211],{"title":16,"path":209,"stem":210},"\u002F2.x\u002Fgetting-started\u002Finstallation","2.x\u002F1.getting-started\u002F1.installation",{"title":212,"path":213,"stem":214},"Upgrade Guide","\u002F2.x\u002Fgetting-started\u002Fupgrade-guide","2.x\u002F1.getting-started\u002F2.upgrade-guide",{"title":216,"icon":217,"path":218,"stem":219,"children":220,"page":31},"Endpoints","i-heroicons-arrow-uturn-left","\u002F2.x\u002Fendpoints","2.x\u002F2.endpoints",[221,224,227,230,233],{"title":172,"path":222,"stem":223},"\u002F2.x\u002Fendpoints\u002Fdetails","2.x\u002F2.endpoints\u002F1.details",{"title":62,"path":225,"stem":226},"\u002F2.x\u002Fendpoints\u002Fsearch","2.x\u002F2.endpoints\u002F2.search",{"title":106,"path":228,"stem":229},"\u002F2.x\u002Fendpoints\u002Fmutate","2.x\u002F2.endpoints\u002F3.mutate",{"title":128,"path":231,"stem":232},"\u002F2.x\u002Fendpoints\u002Factions","2.x\u002F2.endpoints\u002F4.actions",{"title":234,"path":235,"stem":236},"Delete","\u002F2.x\u002Fendpoints\u002Fdelete","2.x\u002F2.endpoints\u002F5.delete",{"title":33,"icon":34,"path":238,"stem":239,"children":240,"page":31},"\u002F2.x\u002Fresources","2.x\u002F3.resources",[241,245,249,252,256],{"title":242,"path":243,"stem":244},"Basics","\u002F2.x\u002Fresources\u002Fbasics","2.x\u002F3.resources\u002F1.basics",{"title":246,"path":247,"stem":248},"Exposed Data","\u002F2.x\u002Fresources\u002Fexposed-data","2.x\u002F3.resources\u002F2.exposed-data",{"title":46,"path":250,"stem":251},"\u002F2.x\u002Fresources\u002Frelationships","2.x\u002F3.resources\u002F3.relationships",{"title":253,"path":254,"stem":255},"Validations","\u002F2.x\u002Fresources\u002Fvalidations","2.x\u002F3.resources\u002F4.validations",{"title":257,"path":258,"stem":259},"Interactions","\u002F2.x\u002Fresources\u002Finteractions","2.x\u002F3.resources\u002F5.interactions",{"title":166,"icon":167,"path":261,"stem":262,"children":263,"page":31},"\u002F2.x\u002Fdigging-deeper","2.x\u002F4.digging-deeper",[264,267,271,274,278,282,286,290,294],{"title":128,"path":265,"stem":266},"\u002F2.x\u002Fdigging-deeper\u002Factions","2.x\u002F4.digging-deeper\u002F1.actions",{"title":268,"path":269,"stem":270},"Hooks","\u002F2.x\u002Fdigging-deeper\u002Fhooks","2.x\u002F4.digging-deeper\u002F2.hooks",{"title":158,"path":272,"stem":273},"\u002F2.x\u002Fdigging-deeper\u002Fgates","2.x\u002F4.digging-deeper\u002F3.gates",{"title":275,"path":276,"stem":277},"Authorizations","\u002F2.x\u002Fdigging-deeper\u002Fauthorizations","2.x\u002F4.digging-deeper\u002F4.authorizations",{"title":279,"path":280,"stem":281},"Full Text Search","\u002F2.x\u002Fdigging-deeper\u002Ffull-text-search","2.x\u002F4.digging-deeper\u002F5.full-text-search",{"title":283,"path":284,"stem":285},"Instructions","\u002F2.x\u002Fdigging-deeper\u002Finstructions","2.x\u002F4.digging-deeper\u002F6.instructions",{"title":287,"path":288,"stem":289},"Responses","\u002F2.x\u002Fdigging-deeper\u002Fresponses","2.x\u002F4.digging-deeper\u002F7.responses",{"title":291,"path":292,"stem":293},"Documentation","\u002F2.x\u002Fdigging-deeper\u002Fdocumentation","2.x\u002F4.digging-deeper\u002F8.documentation",{"title":188,"path":295,"stem":296},"\u002F2.x\u002Fdigging-deeper\u002Fprecognition","2.x\u002F4.digging-deeper\u002F9.precognition",{"title":298,"icon":299,"path":300,"stem":301,"children":302,"page":31},"Integrations","i-lucide-puzzle","\u002F2.x\u002Fintegrations","2.x\u002F5.integrations",[303],{"title":304,"path":305,"stem":306},"Flutter","\u002F2.x\u002Fintegrations\u002Fflutter","2.x\u002F5.integrations\u002F1.flutter",{"id":308,"title":118,"body":309,"description":1336,"extension":1337,"links":1338,"meta":1339,"navigation":380,"path":119,"seo":1340,"sitemap":1341,"stem":120,"__hash__":1342},"docs3x\u002F4.writing\u002F4.deleting.md",{"type":310,"value":311,"toc":1329},"minimark",[312,333,427,514,582,587,634,779,794,798,895,899,950,953,1043,1082,1088,1092,1114,1118,1151,1223,1292,1325],[313,314,315,316,320,321,324,325,328,329,332],"p",{},"Three endpoints manage the lifecycle of rows: ",[317,318,319],"code",{},"destroy"," deletes them (a soft delete on a ",[317,322,323],{},"SoftDeletes"," model), ",[317,326,327],{},"restore"," brings soft-deleted rows back, and ",[317,330,331],{},"forceDestroy"," removes them for good.",[334,335,341],"pre",{"className":336,"code":337,"filename":338,"language":339,"meta":340,"style":340},"language-php shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","use Lomkit\\Rest\\Facades\\Rest;\n\nRest::resource('documents', DocumentsController::class)->withSoftDeletes();\n","routes\u002Fapi.php","php","",[317,342,343,375,382],{"__ignoreMap":340},[344,345,348,352,356,360,363,365,368,370,372],"span",{"class":346,"line":347},"line",1,[344,349,351],{"class":350},"sbssI","use",[344,353,355],{"class":354},"sTEyZ"," Lomkit",[344,357,359],{"class":358},"sMK4o","\\",[344,361,362],{"class":354},"Rest",[344,364,359],{"class":358},[344,366,367],{"class":354},"Facades",[344,369,359],{"class":358},[344,371,362],{"class":354},[344,373,374],{"class":358},";\n",[344,376,378],{"class":346,"line":377},2,[344,379,381],{"emptyLinePlaceholder":380},true,"\n",[344,383,385,388,391,395,398,401,405,407,410,413,415,418,421,424],{"class":346,"line":384},3,[344,386,362],{"class":387},"sBMFI",[344,389,390],{"class":358},"::",[344,392,394],{"class":393},"s2Zo4","resource",[344,396,397],{"class":358},"(",[344,399,400],{"class":358},"'",[344,402,404],{"class":403},"sfazB","documents",[344,406,400],{"class":358},[344,408,409],{"class":358},",",[344,411,412],{"class":387}," DocumentsController",[344,414,390],{"class":358},[344,416,417],{"class":350},"class",[344,419,420],{"class":358},")->",[344,422,423],{"class":393},"withSoftDeletes",[344,425,426],{"class":358},"();\n",[428,429,430,449],"table",{},[431,432,433],"thead",{},[434,435,436,440,443,446],"tr",{},[437,438,439],"th",{},"Method",[437,441,442],{},"URI",[437,444,445],{},"Endpoint",[437,447,448],{},"Policy ability",[450,451,452,474,494],"tbody",{},[434,453,454,460,465,469],{},[455,456,457],"td",{},[317,458,459],{},"DELETE",[455,461,462],{},[317,463,464],{},"\u002Fapi\u002Fdocuments",[455,466,467],{},[317,468,319],{},[455,470,471],{},[317,472,473],{},"delete",[434,475,476,481,486,490],{},[455,477,478],{},[317,479,480],{},"POST",[455,482,483],{},[317,484,485],{},"\u002Fapi\u002Fdocuments\u002Frestore",[455,487,488],{},[317,489,327],{},[455,491,492],{},[317,493,327],{},[434,495,496,500,505,509],{},[455,497,498],{},[317,499,459],{},[455,501,502],{},[317,503,504],{},"\u002Fapi\u002Fdocuments\u002Fforce",[455,506,507],{},[317,508,331],{},[455,510,511],{},[317,512,513],{},"forceDelete",[515,516,517,537,549,558],"ul",{},[518,519,520,522,523,525,526,528,529,532,533,536],"li",{},[317,521,319],{}," is registered by default. ",[317,524,327],{}," and ",[317,527,331],{}," are opt-in: ",[317,530,531],{},"withSoftDeletes()"," registers both, ",[317,534,535],{},"withSoftDeletes('restore')"," only one.",[518,538,539,541,542,545,546,548],{},[317,540,531],{}," throws ",[317,543,544],{},"InvalidResourceException"," when the routes are registered if the model does not use ",[317,547,323],{},".",[518,550,551,554,555,557],{},[317,552,553],{},"except('destroy')"," leaves ",[317,556,319],{}," out.",[518,559,560,525,562,564,565,567,568,572,573,576,577,525,579,548],{},[317,561,327],{},[317,563,513],{}," exist only for a model that uses ",[317,566,323],{},". On another model, they are not ",[569,570,571],"a",{"href":159},"gates",", and the ",[569,574,575],{"href":173},"details"," leave them out of ",[317,578,571],{},[317,580,581],{},"authorizations",[583,584,586],"h2",{"id":585},"request-and-response","Request and response",[334,588,593],{"className":589,"code":590,"filename":591,"language":592,"meta":340,"style":340},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"resources\": [1, 2]\n}\n","DELETE \u002Fapi\u002Fdocuments","json",[317,594,595,600,629],{"__ignoreMap":340},[344,596,597],{"class":346,"line":347},[344,598,599],{"class":358},"{\n",[344,601,602,605,609,612,615,618,621,623,626],{"class":346,"line":377},[344,603,604],{"class":358},"  \"",[344,606,608],{"class":607},"spNyl","resources",[344,610,611],{"class":358},"\"",[344,613,614],{"class":358},":",[344,616,617],{"class":358}," [",[344,619,620],{"class":350},"1",[344,622,409],{"class":358},[344,624,625],{"class":350}," 2",[344,627,628],{"class":358},"]\n",[344,630,631],{"class":346,"line":384},[344,632,633],{"class":358},"}\n",[334,635,638],{"className":589,"code":636,"filename":637,"language":592,"meta":340,"style":340},"{\n  \"data\": [\n    {\"id\": 1, \"title\": \"Annual report\", \"archived\": false},\n    {\"id\": 2, \"title\": \"Budget\", \"archived\": false}\n  ],\n  \"meta\": {}\n}\n","200 OK",[317,639,640,644,658,708,753,759,774],{"__ignoreMap":340},[344,641,642],{"class":346,"line":347},[344,643,599],{"class":358},[344,645,646,648,651,653,655],{"class":346,"line":377},[344,647,604],{"class":358},[344,649,650],{"class":607},"data",[344,652,611],{"class":358},[344,654,614],{"class":358},[344,656,657],{"class":358}," [\n",[344,659,660,663,665,668,670,672,675,677,680,683,685,687,689,692,694,696,698,701,703,705],{"class":346,"line":384},[344,661,662],{"class":358},"    {",[344,664,611],{"class":358},[344,666,667],{"class":387},"id",[344,669,611],{"class":358},[344,671,614],{"class":358},[344,673,674],{"class":350}," 1",[344,676,409],{"class":358},[344,678,679],{"class":358}," \"",[344,681,682],{"class":387},"title",[344,684,611],{"class":358},[344,686,614],{"class":358},[344,688,679],{"class":358},[344,690,691],{"class":403},"Annual report",[344,693,611],{"class":358},[344,695,409],{"class":358},[344,697,679],{"class":358},[344,699,700],{"class":387},"archived",[344,702,611],{"class":358},[344,704,614],{"class":358},[344,706,707],{"class":358}," false},\n",[344,709,711,713,715,717,719,721,723,725,727,729,731,733,735,738,740,742,744,746,748,750],{"class":346,"line":710},4,[344,712,662],{"class":358},[344,714,611],{"class":358},[344,716,667],{"class":387},[344,718,611],{"class":358},[344,720,614],{"class":358},[344,722,625],{"class":350},[344,724,409],{"class":358},[344,726,679],{"class":358},[344,728,682],{"class":387},[344,730,611],{"class":358},[344,732,614],{"class":358},[344,734,679],{"class":358},[344,736,737],{"class":403},"Budget",[344,739,611],{"class":358},[344,741,409],{"class":358},[344,743,679],{"class":358},[344,745,700],{"class":387},[344,747,611],{"class":358},[344,749,614],{"class":358},[344,751,752],{"class":358}," false}\n",[344,754,756],{"class":346,"line":755},5,[344,757,758],{"class":358},"  ],\n",[344,760,762,764,767,769,771],{"class":346,"line":761},6,[344,763,604],{"class":358},[344,765,766],{"class":607},"meta",[344,768,611],{"class":358},[344,770,614],{"class":358},[344,772,773],{"class":358}," {}\n",[344,775,777],{"class":346,"line":776},7,[344,778,633],{"class":358},[515,780,781,784],{},[518,782,783],{},"The response holds the rows that the endpoint wrote, with the selectable fields of the resource, without gates or aggregates.",[518,785,786,525,788,790,791,793],{},[317,787,327],{},[317,789,331],{}," take the same body and answer the same way. ",[317,792,331],{}," accepts live and soft-deleted rows.",[583,795,797],{"id":796},"keys","Keys",[515,799,800,820,832,835,854,864,877],{},[518,801,802,804,805,808,809,812,813,816,817],{},[317,803,608],{}," is a list of keys, typed like the ",[317,806,807],{},"ID"," field of the resource: an integer for integer keys, a string, a UUID or a ULID otherwise. A list, an object or ",[317,810,811],{},"null"," as an entry gives a 422 under ",[317,814,815],{},"resources.0",", such as ",[317,818,819],{},"The resources.0 field must be an integer.",[518,821,822,824,825,828,829],{},[317,823,608],{}," must be a JSON list of at most ",[317,826,827],{},"rest.limits.sizes.resources"," keys, 1000 by default: ",[317,830,831],{},"The resources field must be a list.",[518,833,834],{},"A repeated key gives a 422 on every copy. UUID and ULID keys compare without case.",[518,836,837,838,841,842,525,844,846,847,850,851,853],{},"The keys are read through the ",[317,839,840],{},"perimeterQuery()"," of the resource, with the global scopes of the model, trashed rows included on ",[317,843,327],{},[317,845,331],{},". A key that it does not return gives ",[317,848,849],{},"The selected resources.0 is invalid."," On ",[317,852,319],{},", a key that is already trashed gives the same 422.",[518,855,856,857,863],{},"A key outside the perimeter also dispatches the ",[569,858,860],{"href":859},"\u002Fdigging-deeper\u002Fevents-and-hooks#keys-out-of-reach",[317,861,862],{},"KeysOutOfReach"," event. A key refused for another reason, its type or a repeat, dispatches nothing.",[518,865,866,869,870,873,874],{},[317,867,868],{},"confirmation"," carries the token of a ",[569,871,868],{"href":872},"\u002Factions-and-metrics\u002Fconfirmation#confirming-writes",". It must be a string: ",[317,875,876],{},"The confirmation field must be a string.",[518,878,879,880,883,884,887,888,891,892,894],{},"The endpoints take no ",[317,881,882],{},"search",". An empty array is accepted, and any other value gives ",[317,885,886],{},"The search field is prohibited.",", or ",[317,889,890],{},"The search field must be an array."," for ",[317,893,811],{},". Nothing is written then.",[583,896,898],{"id":897},"checks-and-transaction","Checks and transaction",[900,901,902,908,911,927,945],"ol",{},[518,903,904,907],{},[317,905,906],{},"viewAny"," on the resource is checked before validation.",[518,909,910],{},"Validation reads the rows of the keys, through the perimeter, with one query per 1,000 keys.",[518,912,913,914,916,917,919,920,922,923,926],{},"Every row is checked with ",[317,915,473],{},", ",[317,918,327],{}," or ",[317,921,513],{}," before any row is written. A denied row answers ",[317,924,925],{},"403",", and nothing is written.",[518,928,929,916,932,919,935,938,939,941,942,926],{},[317,930,931],{},"destroyConfirmation()",[317,933,934],{},"restoreConfirmation()",[317,936,937],{},"forceDestroyConfirmation()"," can ask for a ",[569,940,868],{"href":872},": the endpoint then answers ",[317,943,944],{},"428",[518,946,947,948,548],{},"The rows are written in one database transaction, on the connection of the model, in the order of ",[317,949,608],{},[313,951,952],{},"Inside the transaction:",[428,954,955,971],{},[431,956,957],{},[434,958,959,963,967],{},[437,960,961],{},[317,962,319],{},[437,964,965],{},[317,966,327],{},[437,968,969],{},[317,970,331],{},[450,972,973,990,1026],{},[434,974,975,980,985],{},[455,976,977],{},[317,978,979],{},"destroyingAll($models)",[455,981,982],{},[317,983,984],{},"restoringAll($models)",[455,986,987],{},[317,988,989],{},"forceDestroyingAll($models)",[434,991,992,1004,1015],{},[455,993,994,995,916,998,916,1001],{},"per row: ",[317,996,997],{},"destroying($model)",[317,999,1000],{},"performDelete()",[317,1002,1003],{},"destroyed($model)",[455,1005,994,1006,916,1009,916,1012],{},[317,1007,1008],{},"restoring($model)",[317,1010,1011],{},"performRestore()",[317,1013,1014],{},"restored($model)",[455,1016,994,1017,916,1020,916,1023],{},[317,1018,1019],{},"forceDestroying($model)",[317,1021,1022],{},"performForceDelete()",[317,1024,1025],{},"forceDestroyed($model)",[434,1027,1028,1033,1038],{},[455,1029,1030],{},[317,1031,1032],{},"destroyedAll($models)",[455,1034,1035],{},[317,1036,1037],{},"restoredAll($models)",[455,1039,1040],{},[317,1041,1042],{},"forceDestroyedAll($models)",[515,1044,1045,1052,1065,1076],{},[518,1046,1047,1048,1051],{},"A failure on any row, in a hook, in a ",[317,1049,1050],{},"perform"," method or in the database, rolls back the rows written before it, and the request answers with the error.",[518,1053,1054,1055,916,1058,525,1061,1064],{},"An observer or a listener that runs after commit runs only when the transaction commits. The ",[317,1056,1057],{},"ResourceDestroyed",[317,1059,1060],{},"ResourceRestored",[317,1062,1063],{},"ResourceForceDestroyed"," events are dispatched once, after the commit.",[518,1066,1067,1068,1071,1072,548],{},"With ",[317,1069,1070],{},"transactions.attempts"," above 1, a deadlock runs the transaction again, see ",[569,1073,1075],{"href":1074},"\u002Fwriting\u002Fmutate#deadlock-retries","Deadlock retries",[518,1077,1078,1079,1081],{},"A ",[317,1080,1050],{}," method that writes on another connection writes outside the transaction.",[313,1083,1084,1085,548],{},"See ",[569,1086,1087],{"href":177},"Events and hooks",[583,1089,1091],{"id":1090},"deleting-children-with-their-parent","Deleting children with their parent",[313,1093,1094,1095,1097,1098,1101,1102,1105,1106,1110,1111,1113],{},"To delete child rows in the same request as an update of their parent, use a ",[317,1096,473],{}," entry in ",[317,1099,1100],{},"mutate"," on a relation declared ",[317,1103,1104],{},"deletable()",", see ",[569,1107,1109],{"href":1108},"\u002Fwriting\u002Frelations#deleting-child-rows","Relations",". The ",[317,1112,319],{}," hooks do not run there.",[583,1115,1117],{"id":1116},"errors","Errors",[334,1119,1122],{"className":589,"code":1120,"filename":1121,"language":592,"meta":340,"style":340},"{\n  \"message\": \"This action is unauthorized.\"\n}\n","403 Forbidden",[317,1123,1124,1128,1147],{"__ignoreMap":340},[344,1125,1126],{"class":346,"line":347},[344,1127,599],{"class":358},[344,1129,1130,1132,1135,1137,1139,1141,1144],{"class":346,"line":377},[344,1131,604],{"class":358},[344,1133,1134],{"class":607},"message",[344,1136,611],{"class":358},[344,1138,614],{"class":358},[344,1140,679],{"class":358},[344,1142,1143],{"class":403},"This action is unauthorized.",[344,1145,1146],{"class":358},"\"\n",[344,1148,1149],{"class":346,"line":384},[344,1150,633],{"class":358},[334,1152,1155],{"className":589,"code":1153,"filename":1154,"language":592,"meta":340,"style":340},"{\n  \"message\": \"The selected resources.0 is invalid.\",\n  \"errors\": {\n    \"resources.0\": [\"The selected resources.0 is invalid.\"]\n  }\n}\n","422 Unprocessable Content",[317,1156,1157,1161,1180,1193,1214,1219],{"__ignoreMap":340},[344,1158,1159],{"class":346,"line":347},[344,1160,599],{"class":358},[344,1162,1163,1165,1167,1169,1171,1173,1175,1177],{"class":346,"line":377},[344,1164,604],{"class":358},[344,1166,1134],{"class":607},[344,1168,611],{"class":358},[344,1170,614],{"class":358},[344,1172,679],{"class":358},[344,1174,849],{"class":403},[344,1176,611],{"class":358},[344,1178,1179],{"class":358},",\n",[344,1181,1182,1184,1186,1188,1190],{"class":346,"line":384},[344,1183,604],{"class":358},[344,1185,1116],{"class":607},[344,1187,611],{"class":358},[344,1189,614],{"class":358},[344,1191,1192],{"class":358}," {\n",[344,1194,1195,1198,1200,1202,1204,1206,1208,1210,1212],{"class":346,"line":710},[344,1196,1197],{"class":358},"    \"",[344,1199,815],{"class":387},[344,1201,611],{"class":358},[344,1203,614],{"class":358},[344,1205,617],{"class":358},[344,1207,611],{"class":358},[344,1209,849],{"class":403},[344,1211,611],{"class":358},[344,1213,628],{"class":358},[344,1215,1216],{"class":346,"line":755},[344,1217,1218],{"class":358},"  }\n",[344,1220,1221],{"class":346,"line":761},[344,1222,633],{"class":358},[428,1224,1225,1235],{},[431,1226,1227],{},[434,1228,1229,1232],{},[437,1230,1231],{},"Status",[437,1233,1234],{},"Cause",[450,1236,1237,1257,1270,1281],{},[434,1238,1239,1243],{},[455,1240,1241],{},[317,1242,925],{},[455,1244,1245,1247,1248,916,1250,919,1252,1254,1255],{},[317,1246,906],{}," is denied, or a row is denied by ",[317,1249,473],{},[317,1251,327],{},[317,1253,513],{},". The message is the one of the first denied row in the order of ",[317,1256,608],{},[434,1258,1259,1264],{},[455,1260,1261],{},[317,1262,1263],{},"422",[455,1265,1266,1267,1269],{},"A key outside the perimeter, missing, already trashed on ",[317,1268,319],{},", repeated, or of the wrong type",[434,1271,1272,1276],{},[455,1273,1274],{},[317,1275,1263],{},[455,1277,1078,1278,1280],{},[317,1279,882],{}," key that is not an empty array",[434,1282,1283,1287],{},[455,1284,1285],{},[317,1286,944],{},[455,1288,1289,1290],{},"The resource asks for a confirmation, see ",[569,1291,136],{"href":872},[313,1293,1294,1295,1298,1299,1301,1302,1305,1306,1309,1310,1313,1314,916,1317,525,1320,1322,1323,548],{},"With the ",[317,1296,1297],{},"DenialsRenderer"," registered, a ",[317,1300,925],{}," also lists every denied row under ",[317,1303,1304],{},"denials",", with its ",[317,1307,1308],{},"path"," (",[317,1311,1312],{},"resources.1","), ",[317,1315,1316],{},"ability",[317,1318,1319],{},"key",[317,1321,1134],{},". See ",[569,1324,154],{"href":155},[1326,1327,1328],"style",{},"html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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 .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}",{"title":340,"searchDepth":347,"depth":377,"links":1330},[1331,1332,1333,1334,1335],{"id":585,"depth":377,"text":586},{"id":796,"depth":377,"text":797},{"id":897,"depth":377,"text":898},{"id":1090,"depth":377,"text":1091},{"id":1116,"depth":377,"text":1117},"Delete, restore and force delete rows by key with destroy, restore and forceDestroy, in one transaction with per-row policy checks.","md",null,{},{"title":118,"description":1336},{"loc":119},"ui6l2BDu4nxxBq4FF-Pkcq5ctbjOsHim9QXGyPqaIQs",[1344,1346],{"title":114,"path":115,"stem":116,"description":1345,"children":-1},"Refuse an update of a row that another request changed since the client read it, with a 409 that lists every conflict.",{"title":128,"path":129,"stem":130,"description":1347,"children":-1},"Run your own code on the rows of a resource, with typed inputs, row checks, transactions and a result for the client.",1794181348940]