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
Structs§
- Access
- User access type and role
- Activity
- Activity report
- Activity
Changed Data - Data that changed
- Background
- Background theme and style
- Business
Data - Definitions of business data (user-defined) fields
- Changed
Array - Set of changed values
- Changed
Value - Original and new value
- Checklist
- Checklist field
- Checklist
Item - item in a checklist
- Date
Time - Variation on
chrono::DateTimethat 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 avariant. - Date
Value - Value of date from or to
- Delete
List Entry Detail - deleted item reference
- Delete
List Entry Response - Response from delete entry
- Element
- Field definition
- Element
Category - Metadata about field data type
- Element
Change - change of object field
- Element
Data - definition of type of data held by Element/field
- Element
Data Categories - Metadata about label/choice fields
- user email info
- Entry
- List item
- Error
Info - Error details returned from Zenkit
- Error
Result - Error response returned from Zenkit
- File
- File attachment
- Filter
Count Data - filtered view response data
- GetEntries
Request - Parameters for get_list_entries
- GetEntries
View Request - Parameters for get_entries_for_list_view
- GetEntries
View Response - 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
- List
Info - A read-only reference to a List and its fields To modify list field definitions, use methods of workspace ..
- List
Prototype - prototype
- MinNotification
- NewActivity
Element - NewComment
- new comment
- NewWebhook
- Parameter for creating a new webhook
- NoAccess
List - Inaccessible lit
- OAuth
Client - Application OAuth client configuration
- OAuth
Response - OAuth response data
- OrderBy
- Sort order for filtered query
- Predefined
Category - for elements of type Category, PredefinedCategory defines the choices
- Resource
Tag - Shared
Accesses - 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§
- Access
Type - Activity
Bulk Action - Activity type for bulk action
- Activity
Created In - Where activity occurred
- Activity
Filter - Activity filter type
- Activity
Type - 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)
- Background
Role - Background
Style - Background
Theme - Background
Type - Changed
Data - 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.
- Child
List - Embedded list, if accessible
- Date
Filter Term Modus - date expression term
- Device
Operating System - Element
Category Group - Element
Category Id - Element(field) data type
- Field
Val - Hold value of field for set and update operations
- Filter
Keys - Filter
Term Modus - Filter expression term
- FromTo
- Selection of changed data
- List
Visibility - Login
Provider - Notification
Type - Numeric
Type - Type of numeric field
- RoleID
- Sort
Direction - Sort direction
- Text
Format - Update
Action - Type of data change
- Webhook
Trigger Type - 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§
- Error
Code - Error code returned from zenkit api calls. See https://base.zenkit.com/docs/api/type/errorcode
- Field
- Field is new/UI name for Element
- Field
SetVal - 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