From 44d3766030e35206ca2eaee7a9b865e129f2e01d 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..5c36a33 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 AnyValue { + 1: bool bool + 2: byte byte + 3: i16 i16 + 4: i32 i32 + 5: i64 i64 + 6: double double + 7: string string + 8: list list + 9: set set + 10: map map +} + +struct CustomField { + 1: required string fieldName + 2: required string fieldType + 3: required AnyValue 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 = [] }