SortAs

The ordering to apply to a sort_by field, for the StoriesQuery.sortBy overload that states it rather than deriving it from the property's type. Storyblok serializes a number field as text, so a field holding one is as likely to be modelled as a String as a Long or a Double, and its type cannot settle the ordering.

Entries

Link copied to clipboard

Order numerically, without a decimal point, so that 100 sorts after 99. Appends :int.

Link copied to clipboard

Order numerically, with a decimal point. Appends :float.

Link copied to clipboard

Order as text, which is the API's default and orders an ISO-8601 date chronologically. Appends nothing.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int

Functions

Link copied to clipboard
fun valueOf(value: String): SortAs

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.