From aee622d04056cf871c233d0fcd0ebbbe94df0425 Mon Sep 17 00:00:00 2001 From: fweddi Date: Mon, 16 Dec 2024 14:21:37 +0000 Subject: [PATCH] Define CustomField --- .../src/main/thrift/atoms/interactive.thrift | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/thrift/src/main/thrift/atoms/interactive.thrift b/thrift/src/main/thrift/atoms/interactive.thrift index 43ff6d2..437d841 100644 --- a/thrift/src/main/thrift/atoms/interactive.thrift +++ b/thrift/src/main/thrift/atoms/interactive.thrift @@ -3,6 +3,25 @@ namespace java com.gu.contentatom.thrift.atom.interactive #@namespace scala com.gu.contentatom.thrift.atom.interactive #@namespace typescript _at_guardian.content_atom_model.interactive +union AnyVal { + 1: bool boolVal + 2: byte byteVal + 3: i16 i16Val + 4: i32 i32Val + 5: i64 i64Val + 6: double doubleVal + 7: string stringVal + 8: list listVal + 9: set setVal + 10: map mapVal +} + +struct CustomField { + 1: required string fieldName + 2: required string fieldType + 3: required AnyVal defaultValue +} + struct InteractiveAtom { /* the unique ID will be stored in the `atom` data*/ 1: required string type @@ -18,4 +37,5 @@ struct InteractiveAtom { See here: https://amp.dev/documentation/components/amp-iframe/ for more information. */ 7: optional string placeholderUrl + 8: optional list customFields = [] }