Webhooks.id.check: def of bend-kit-webhooks@0.11.0.1 Import: import bend-kit-webhooks@0.11.0.1/webhooks.bend as Webhooks Lines 102-104 of bend-kit-webhooks@0.11.0.1/webhooks.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-webhooks@0.11.0.1/webhooks.bend&start_line=102&end_line=104 import Base # A webhook id is not empty and has no '.', so id.timestamp.body reads one way. def id.check(+id: String) -> Result<&1, &1, Err, Unit>: Bool.pick(Result<&1, &1, Err, Unit>, Bool.or(String.is_empty(id), String.contains(id, ".")), Fail{BadId{}}, Done{Unit{}}) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.contains https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.is_empty https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-kit-webhooks@0.11.0.1/webhooks.bend&name=Err