# Tymly Reference

# Plugins

Name Description
tymly-auth-auth0-plugin Provides auth0 authentication functionality to the Tymly framework
tymly-cardscript-plugin Plugin which handles interactions to do with Cardscript
tymly-cloudstorage-plugin Defines the cloudstorage service interface and provides state-resources around the service. Specific cloudstorage implementations provided by additional Tymly plugins.
tymly-core-plugin Provides low-level functions for Tymly
tymly-crypto-plugin A plugin to allow Tymly to perform encryption
tymly-diaries-plugin Plugin to handle bookings and appointment kind of things within Tymly framework
tymly-etl-plugin A collection of states for helping with Extract, Transform and Load tasks.
tymly-fastify-plugin Exposes the Tymly framework via a Fastify web app.
tymly-gov-uk-notify-plugin Allows sending notifications via sms or email using the GOV UK Notify service with Tymly framework.
tymly-localfilestorage-plugin Implements a local filestorage provider for Tymly's cloudstorage plugin.
tymly-notes-plugin Plugin to handle notes, which can be attached to arbitrary objects
tymly-os-places-plugin Provides OS Places API to the Tymly framework
tymly-pg-plugin Replace Tymly's out-the-box memory storage with PostgreSQL
tymly-rankings-plugin Plugin which handles ranking of data for Tymly framework
tymly-rbac-plugin Plugin which provides role-based authentication
tymly-rest-client-plugin A REST API client for Tymly
tymly-schedule-plugin Provides state machine scheduling for the Tymly framework
tymly-sharepoint-plugin A plugin for accessing sharepoint from within Tymly
tymly-solr-plugin Plugin which handles interaction with Apache Solr for Tymly framework

# Blueprint

# Component directories

Directory Description Plugin
/card-templates One JSON file per Card tymly-cardscript-plugin
/functions Blueprints are predominantly declarative - preferring JSON definitions over hand-coded functions. But for those times when only code will do, blueprints can supply supplemental Javascript functions too. tymly-core-plugin
/images A place to put images that can be served-up in Forms and similar tymly-fastify-plugin
/message-templates One JSON file per message template tymly-gov-uk-notify-plugin
/models One JSON file per model (contents to be a JSON schema for defining the model's data structure) tymly-pg-plugin
/models This sub-directory deals with the M portion of MVC - each JSON file in here defines a data model that can be subsequently used by a State Machine. Nested documents are supported along with a couple of extensions to help describe database indexes and primary keys. Tymly uses the JSON Schema standard for describing data models. tymly-core-plugin
/rankings Each JSON file here will help configure everything required to rank a set of documents by a score derived from a variety of sources tymly-rankings-plugin
/registry-keys Consider a blueprint that defines a simple workflow that sends a Tweet - what Twitter username/password should be used? This is where Registry Keys come in useful... a simple key/value store inside Tymly, where keys are declared inside this sub-directory. To help conjure administrative screens and help validation, the required value content is described using JSON Schema. tymly-core-plugin
/search-docs Each JSON file is used to translates a model document into standard properties for searching. tymly-solr-plugin
/state-machines Each JSON file inside this sub-directory will be used to conjure a State Machine for orchestrating a workflow. Tymly uses the open Amazon State Language (opens new window) to describe State Machines. tymly-core-plugin
/tags JSON files providing 'tags' which are used throughout Tymly to help categorise things and aid discovery tymly-core-plugin

# blueprint.json

# State Resources

Directory Description
acknowledgeNotifications Acknowledges notifications for a user
addAuth0Mapping Allows addition of an Auth0 Mapping
addCryptoEntry Add a crypto value
addDocs Adds docs
addNote No description! 😦
applySettings Applies settings for a user
archiveExecution Archive a completed execution. It's status is prefixed with ARCHIVED-. Primarily used to removed long-running tasks from the list of completed executions.
auditTrail No description! 😦
availableResources Returns a list of currently available resources
availableStateMachines Returns a list of currently available state machines
awaitingExternalInput Awaits for an external input to advance the state-machine
awaitingHumanInput Awaits the input of a human to advance the state-machine
calculateMessageRates No description! 😦
cancelDiaryEntry Cancel Diary Entry
checkUserAuthorization Checks if a user can access a specific resource
clearConfiguredRegistryKey Clears a registry specific value
clearRegistryKey Clears a registry key value
configSetting Reads a config setting
copyFileToLocalFolder Copies a remote file into a folder on the local file system
copyFileToRemoteFolder Copies a local file into a folder in remote storage
createCustomMessageTemplate No description! 😦
createDiaryEntry Create Diary Entry
createNotification Creates notification
createRole Creates an RBAC role
createScheduledTask Create task
createTodoEntry Creates a new todo entry. Note that after creating the todo, the ResultPath object will have a property called idProperties, which will have a sub-property called id - which will hold the id of the newly created todo.
deleteCacheItem Delete item from cache within Tymly
deleteCustomMessageTemplate No description! 😦
deletingById Deletes document by ID
deletingCloudStorageFile Deletes a cloud storage file
deltaReindex Performs a delta reindex
editCustomMessageTemplate No description! 😦
emitNotifyEvents Handle events via GOV UK Notify Service
ensureCloudStorageFolder Creates the last folder in the specified path (if it already exists, it does nothing). Be aware that if one of the folders prior to the last folder doesn't exist, the state resource will throw an exception. So for example, if you pass in the path 'Shared Documents/1234567890/Audit/Photos', if the folder 'Shared Documents/1234567890/Audit' doesn't exist, then the state resource will throw an exception.
exportingCsvDeltaFile Outputs change-only-update CSV files (or β€œdelta” files) that contain all the necessary actions required to re-synchronize rows in a cloned table - just a thin wrapper over pg-delta-file (opens new window)
extractInputDateGdsTheme Extracts Input.Date value for GDS theme
fileDownloading No description! 😦
findCustomMessageTemplate No description! 😦
findScheduledExecutions Find scheduled executions
finding Finds documents in a specified model that meet specified criteria and adds it to the tymly context
findingById Finds a single document that has the specified id and adds it to the tymly context
findingCount Counts documents with where clause from storage
findingOne Finds a single document in a specified model that meets the specified criteria, and adds it to the tymly context
flattenXmlFiles Flatten XML Files
fullReindex Performs a full reindex
generateUuid Generate UUID (Long or short!)
getAllAuth0UserById Gets all user data from auth0 by provided user id
getAvailableDiarySlots Get Available Diary Entry Slots
getCacheItem Get item from cache within Tymly
getCloudStorageContents Returns the contents of a cloud storage folder
getConfiguredRegistryKey Gets a specific registry key value
getCryptoEntry Get a crypto value
getCurrentValueFromSequence Gets the current value from the specified sequence, returning it as the value of the value property
getDataFromRestApi Gets data from a rest API
getFavouriteStartableNames Gets favourite startable names for a user
getMessageStatusViaService Get the status of a message sent via GOV UK Notify Service
getNextValueFromSequence Gets the next value from the specified sequence, returning it as the value of the value property
getNotifications Gets notifications for a user
getRegistryKey Gets a registry key value
getSettings Gets settings for a user
getTodoChanges Get a list of todo-list entries that need adding/removing from the client store
getUserDashboardData Get the necessary information to be render a personal dashboard for the user.
getUserHistory Get the history of state machines the user has accessed.
getUserRemit Gets the user remit
getWatchedBoards Gets all watched boards for a user
grantPermission Grants permission to a user
grantRoleMembership Grants role membership
importingCsvFiles Takes a specifically-named directory structure of CSV files and conjures bulk insert, update and delete statements and applies them to a PostgreSQL database - just a thin wrapper over Supercopy (opens new window)
launchStateMachine Launches another state machine, but does not wait for it to complete. The output of this state-resource is the execution description of the launched state machine. The description of the parent state machine is given as input to the launched state machine so it can, for example, send heart beats back.
listAuth0Mappings Allows listing of Auth0 Mappings
listCustomTemplateRecipients No description! 😦
listLongRunningTasks No description! 😦
listMessageTemplates No description! 😦
listRoles Lists roles
logging Logs to the console via a template
notesList No description! 😦
osAddressLookup No description! 😦
permissionsTree Returns a permission tree
postDataToRestApi Posts data to a rest API
processingCsvFiles Smash CSV files into more manageable files based on column values - just a thin wrapper over Smithereens (opens new window)
processingXmlFiles Takes an XML file and converts it to CSV
reassignTodoEntries Reassign ToDo Entries
refreshAll Refreshes all associated databases
refreshPermissions Refreshes a users permissions
refreshRanking Regenerates a database view of ranked data
refreshRiskScore Regenerates a risk score usin growth curve
removeAuth0Mapping Allows deletion of an Auth0 Mapping
removeDocsByDocId Remove SOLR Docs
removeDocsByQuery Remove SOLR Docs
removeRoleMembership Removes role membership
removeTodoEntries Removes todos for a user
resetCache Reset cache within Tymly
runFunction Run function from a blueprint
runStateMachine Run another state machine and wait for it to complete. The output of this state-resource is the output from the spawned state machine.
search Performs a search
sendTaskHeartbeat Sends Task Heartbeat to another execution.
sendTaskSuccess Sends Task Success to another execution.
sendingCustomMessageViaService No description! 😦
sendingMessageViaService Sending Mail or SMS via GOV UK Notify Service
setClientMetaData No description! 😦
setConfiguredRegistryKey Sets a registry specific value
setContextData Sets the context data
setFavouriteStartableNames Sets favourite startable names for a user
setRegistryKey Sets an arbitrary registry key value
startScheduledTask Start task
stopScheduledTask Stop task
storageSearch Paginated search across documents from storage
synchronizingTable Takes the contents of one PostgreSQL table, applies a transformation function to each row and ensures a target table is kept in sync - just a thin wrapper over pg-telepods (opens new window)
timestamp Generates a timestamp
unwatchBoard Allows a user to unwatch a board
updateDocsBySearchDoc Update SOLR Docs
updateScheduledStateMachineConfig Update state machine config
updateScheduledTask Update task
upserting Perists a document to storage
userIdFromEmail Converts email to Auth0 user ID
watchBoard Allows a user to watch a board

# Cardscript

# Containers

Icon Type Description
Relevant Cardscript icon ActionSet ActionSet allows actions to be displayed within a card.
Relevant Cardscript icon Collapsible A container which expands when clicked on to show a card.
Relevant Cardscript icon Column Defines a container that is part of a ColumnSet.
Relevant Cardscript icon ColumnSet ColumnSet divides a region into Columns, allowing elements to sit side-by-side.
Relevant Cardscript icon Container Containers group items together.
Relevant Cardscript icon ImageSet The ImageSet displays a collection of Images similar to a gallery.
Relevant Cardscript icon Tab Defines a container that is part of a TabSet.
Relevant Cardscript icon TabSet TabSet allows to display content through various tabs.

# Elements

Icon Type Description
Relevant Cardscript icon AdaptiveCard Root element in an Adaptive Card.
Relevant Cardscript icon AddressBlock Displays an address.
Relevant Cardscript icon CardList A container which opens a modal when clicked on to show a card.
Relevant Cardscript icon Chip A chip to display some text.
Relevant Cardscript icon Fact Describes a Fact in a FactSet as a key/value pair.
Relevant Cardscript icon FactSet The FactSet element displays a series of facts (i.e. name/value pairs) in a tabular form.
Relevant Cardscript icon Graph Displays a graph.
Relevant Cardscript icon Image Displays an image.
Relevant Cardscript icon Jumbotron An element typically placed at the top of a card to describe its purpose.
Relevant Cardscript icon List Displays information in List format.
Relevant Cardscript icon Map Displays a map.
Relevant Cardscript icon MarkupTable Displays information in table format.
Relevant Cardscript icon Media Displays a media player for audio or video content.
Relevant Cardscript icon MediaSource Defines a source for a Media element
Relevant Cardscript icon PhaseBanner Displays a banner highlighting a phase.
Relevant Cardscript icon Separator Displays a horizontal line.
Relevant Cardscript icon Table Displays information in table format.
Relevant Cardscript icon TextBlock Displays text, allowing control over font sizes, weight, and color.
Relevant Cardscript icon Tree Displays some information in a tree format.
Relevant Cardscript icon TreeItem Nodes belonging to a tree structure

# Inputs

Icon Type Description
Relevant Cardscript icon Input.Address Lets a user enter an address.
Relevant Cardscript icon Input.ApiLookup Lets a user look up a value via an API.
Relevant Cardscript icon Input.Choice Describes a choice for use in a ChoiceSet.
Relevant Cardscript icon Input.ChoiceSet Allows a user to input a Choice.
Relevant Cardscript icon Input.Currency Lets a user enter a currency value.
Relevant Cardscript icon Input.Date Lets a user choose a date.
Relevant Cardscript icon Input.DateTime Lets a user enter a telephone number.
Relevant Cardscript icon Input.Email Lets a user enter an email.
Relevant Cardscript icon Input.FileUpload Lets a user upload a file.
Relevant Cardscript icon Input.Gender Lets a user enter a gender.
Relevant Cardscript icon Input.Name Lets a user enter a name.
Relevant Cardscript icon Input.Number Allows a user to enter a number.
Relevant Cardscript icon Input.Signature Lets a user enter a signature.
Relevant Cardscript icon Input.Slider Lets a user enter value with a slider.
Relevant Cardscript icon Input.TelephoneNumber Lets a user enter a telephone number.
Relevant Cardscript icon Input.Text Lets a user enter text.
Relevant Cardscript icon Input.Time Lets a user select a time.
Relevant Cardscript icon Input.Toggle Lets a user choose between two options.

# Actions

Icon Type Description
Relevant Cardscript icon Action.Cancel Allows to cancel out of a form.
Relevant Cardscript icon Action.OpenUrl When invoked, show the given url either by launching it in an external web browser or showing in-situ with embedded web browser.
Relevant Cardscript icon Action.PushCard When invoked this will push the new card on the routing history.
Relevant Cardscript icon Action.RefreshRemit When invoked this will refresh the app's remit.
Relevant Cardscript icon Action.RefreshTasks When invoked this will refresh the users tasks.
Relevant Cardscript icon Action.RefreshWatching When invoked this will refresh the users watched cards.
Relevant Cardscript icon Action.ReplaceCard When invoked this will replace the current entry in the history with the new route.
Relevant Cardscript icon Action.Save Allows to save a form to continue later.
Relevant Cardscript icon Action.ShowCard Defines an AdaptiveCard which is shown to the user when the button or link is clicked.
Relevant Cardscript icon Action.Submit Gathers input fields, merges with optional data field, and sends an event to the client. It is up to the client to determine how this data is processed. For example: With BotFramework bots, the client would send an activity through the messaging medium to the bot.

# Services

Directory Description
audit PG Audit Service
auth0GroupMapping No description! 😦
blueprintDocs Allows tracking of documents created via blueprints, so they don't get reverted when Tymly restarts
caches Adds lru-cache (opens new window)-based caching to Tymly. Note defaults will be used if no caches configuration is provided.
cards Exposes UI configuration
categories Provides a generic mechanism to help tag/classify search results, tasks, forms etc.
cloudstorage Defines the cloudstorage service interface and provides state-resources around the service. Specific cloudstorage implementations provided by additional Tymly plugins.
crypto Crypto Service
diaries Diary Service
fileDownloading No description! 😦
fileUploading No description! 😦
functions Adds ability to run custom logic as defined in a blueprint
inventory Collates component information by scanning plugins. The results can then be used by tooling and documentation-generators
jwtAuth Provides JWT-based authentication capabilities
localfilestorage Implements a local filestorage provider for the cloudstorage plugin.
logger Tymly Logger Service
notify Provides functions for interacting with Gov UK Notify service
osPlaces No description! 😦
rankings Adds a ranking engine
rbac Provides Rbac-based authorization capabilities
registry Provides a mechanism for states to refer to site-specific values
schedule Tymly Schedule Service
server Provides a CORS-enabled Fastify server. Includes serving of static assets as supplied via Blueprints
sharepoint Adds Sharepoint support
solr Adds Solr support
statebox Runs state machines defined in Amazon States Language
stateboxApi Exposes the core Tymly abilities (start, get, update and cancel) over a JWT-secured REST API
storage Replaces the default in-memory storage solution with a Postgresql-backed alternative
storage This is the default in-memory storage service that ships with Tymly. Useful for testing and not much else.
tasks Collects information on long-running tasks
temp Helps configure and manage a temporary folder for Tymly to use
timestamp Tymly Time Service!
tymly Tymly Service
userInfo Auth0 Service
Last Updated: 9/10/2023, 11:30:14 AM