Module types

Module types 

Source
Expand description

This module defines the data types used in the ZenKit Api. Most are specified by Zenkit API Docs, and a few have been added to make the code more Rust-idiomatic.

Structs defined here that aren’t directly in Zenkit API:

  • ListInfo - wraps a List with its field definitions, and contains business field getters and setters.
  • Item - wraps a list Entry, and has getters and setters to simplify access to business fields. (derefs to Entry)
  • Various structures whose names have a suffix of ‘Request’ or ‘Response’, for api parameters and responses.
  • ChangedArray,ChangedValue - describe data changed inside an Activity object

All struct, enum and field names follow Rust naming and capitalization convention, (Pascal case for struct/enum names, snake_case for field names) Serde rules are used to map to/from the json-defined names on a per-field/per-struct basis All color fields use ‘color’ (no _hex suffix) Whenever I felt fairly confident that a type could be made more specific, I did so (String -> UUID, int -> ID, String -> DateTime), etc.

Structs§

Access
User access type and role
Activity
Activity report
ActivityChangedData
Data that changed
Background
Background theme and style
BusinessData
Definitions of business data (user-defined) fields
ChangedArray
Set of changed values
ChangedValue
Original and new value
Checklist
Checklist field
ChecklistItem
item in a checklist
DateTime
Variation on chrono::DateTime that can parse and deserialize a Zenkit date with or without time. The value is always converted to Utc during parse/deserialization, for consistency, but the app can change timezone by calling with_timezone(tz). The type is declared generic over Timezone Tz, and it should work with different timezones for most operations; but parsing from string and deserializing will always create a variant.
DateValue
Value of date from or to
DeleteListEntryDetail
deleted item reference
DeleteListEntryResponse
Response from delete entry
Element
Field definition
ElementCategory
Metadata about field data type
ElementChange
change of object field
ElementData
definition of type of data held by Element/field
ElementDataCategories
Metadata about label/choice fields
Email
user email info
Entry
List item
ErrorInfo
Error details returned from Zenkit
ErrorResult
Error response returned from Zenkit
File
File attachment
FilterCountData
filtered view response data
GetEntriesRequest
Parameters for get_list_entries
GetEntriesViewRequest
Parameters for get_entries_for_list_view
GetEntriesViewResponse
Response returned from get_entries_for_list_view
Item
Item in a list. Wrapper for Entry that includes field getters for business values.
List
List (aka Collection). See also ListInfo, which wraps a List with field definitions, to provide getters and setters for user-defined fields
ListInfo
A read-only reference to a List and its fields To modify list field definitions, use methods of workspace ..
ListPrototype
prototype
MinNotification
NewActivityElement
NewComment
new comment
NewWebhook
Parameter for creating a new webhook
NoAccessList
Inaccessible lit
OAuthClient
Application OAuth client configuration
OAuthResponse
OAuth response data
OrderBy
Sort order for filtered query
PredefinedCategory
for elements of type Category, PredefinedCategory defines the choices
ResourceTag
SharedAccesses
Return value from get_shared_access
User
User profile data
Utc
The UTC time zone. This is the most efficient time zone when you don’t need the local time. It is also used as an offset (which is also a dummy type).
Webhook
Webhook definition
Workspace
Workspace

Enums§

AccessType
ActivityBulkAction
Activity type for bulk action
ActivityCreatedIn
Where activity occurred
ActivityFilter
Activity filter type
ActivityType
Type of activity
AllId
AllId is used when function parameters may accept more than one name for an object. In addition to id or uuid, many functions also accept a String name (e.g., a field name)
BackgroundRole
BackgroundStyle
BackgroundTheme
BackgroundType
ChangedData
ChangedData, within an Activity, represents the previous and new data values. Not all field types have been implemented as structs; the other field types have change data as a (serde_json) Value.
ChildList
Embedded list, if accessible
DateFilterTermModus
date expression term
DeviceOperatingSystem
ElementCategoryGroup
ElementCategoryId
Element(field) data type
FieldVal
Hold value of field for set and update operations
FilterKeys
FilterTermModus
Filter expression term
FromTo
Selection of changed data
ListVisibility
LoginProvider
NotificationType
NumericType
Type of numeric field
RoleID
SortDirection
Sort direction
TextFormat
UpdateAction
Type of data change
WebhookTriggerType
Webhook trigger

Traits§

ZKObjectID
Zenkit object with ID and UUID

Functions§

fset_f
Set field with float value
fset_i
Set field with integer
fset_id
Set field with ID
fset_s
Set field with String value (Text, or number-to-string)
fset_t
Set field with formatted text
fset_vid
Set field to Vec of IDs
fset_vs
Update field to Vec of Strings (names, categories, or uuids)
fup_f
Update field with float value
fup_i
Update field with integer
fup_id
Update field with ID
fup_s
Update field with String and action
fup_t
Update field with formatted text
fup_vid
Update field to Vec of IDs
fup_vs
Update field to Vec of Strings (names, categories, or uuids)

Type Aliases§

ErrorCode
Error code returned from zenkit api calls. See https://base.zenkit.com/docs/api/type/errorcode
Field
Field is new/UI name for Element
FieldSetVal
Parameters for setting a field
ID
Zenkit-assigned Object ID (positive int)
JsonMap
string-indexed map of json values
ShortId
Zenkit-assigned short object id (string)
UUID
Zenkit-assigned object UUID