You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 24, 2024. It is now read-only.
The order property in the type definition of FieldBase is marked as a required property which must be a number. In the API documentation it is marked as optional. As for the Create method changing the type to be optional would be sufficient, but for the Get* endpoints it must be number | null as it turns out the property is always there but set the null if the value is not set. This is also not documented in the API documention. In fact, the API documentation explains only the fields for the Create endpoint and for all other endpoints only examples are given without clear specification.
In any case, I think this means that the Field type cannot simply extend from FieldBase as the type of the order property is different depending on its context (Create vs Get).
I haven’t looked deeply into the other properties yet, but since FieldBase marks all properties as required right now, I guess a few others are also incorrect as validation_rules for example is also marked as optional in the API but not in the sdk.
The
orderproperty in the type definition ofFieldBaseis marked as a required property which must be anumber. In the API documentation it is marked as optional. As for theCreatemethod changing the type to be optional would be sufficient, but for theGet*endpoints it must benumber | nullas it turns out the property is always there but set thenullif the value is not set. This is also not documented in the API documention. In fact, the API documentation explains only the fields for theCreateendpoint and for all other endpoints only examples are given without clear specification.In any case, I think this means that the
Fieldtype cannot simply extend fromFieldBaseas the type of theorderproperty is different depending on its context (CreatevsGet).I haven’t looked deeply into the other properties yet, but since
FieldBasemarks all properties as required right now, I guess a few others are also incorrect asvalidation_rulesfor example is also marked as optional in the API but not in the sdk.