{"type":"video","version":"1.0","html":"<iframe src=\"https://www.loom.com/embed/cbffbfccbb384220bfe0a8aa80981b9d\" frameborder=\"0\" width=\"1662\" height=\"1246\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>","height":1246,"width":1662,"provider_name":"Loom","provider_url":"https://www.loom.com","thumbnail_height":1246,"thumbnail_width":1662,"thumbnail_url":"https://cdn.loom.com/sessions/thumbnails/cbffbfccbb384220bfe0a8aa80981b9d-d8b84326bc17d9ef.gif","duration":130.847,"title":"Upsert Root Code for Cross App Content","description":"This Loom explains the upsert root code used to handle upserting internal content cross-app data. It takes the space ID from the route and assumes the request.json is standalone cross-app, with a standalone type created because many parameters are optional in inline but mandatory in standalone. The author postponed the z-validator, applied a constraint inverter, and then performed the upsert. In the diff, they describe changes to require cross-app base fields, infer the inline variant, and add a new converter plus helper functions to supply either local or database IDs while setting the other related fields to null, including the inline parameter."}