Skip to content

Commit

Permalink
Define CustomField
Browse files Browse the repository at this point in the history
  • Loading branch information
Fweddi committed Dec 16, 2024
1 parent 3ae09bf commit aee622d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions thrift/src/main/thrift/atoms/interactive.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -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<AnyVal> listVal
9: set<AnyVal> setVal
10: map<string, AnyVal> 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
Expand All @@ -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<CustomField> customFields = []
}

0 comments on commit aee622d

Please sign in to comment.