Skip to content

Instantly share code, notes, and snippets.

@hdavidzhu hdavidzhu/newCard.js
Created Aug 27, 2015

Embed
What would you like to do?
// This is the key as well as the cardID.
"id_31f6e7046976d442": {
cardID: "id_31f6e7046976d442",
// These are antiquated terms that are relics of the tree design.
// Since we are now using a directed graph, these should be called
// lastCardIDs and nextCardIDs in the future.
parentCardIDs: [],
childrenCardIDs: [],
// `speaker` can be `client`, `ai`, or in the future - usernames / names.
// With the speaker as the client, this card is meant to be editable.
speaker: "client",
// Tells our programs to render and treat the following as an email.
// This is how we can render and edit cards properly on the client.
cardType: "email",
// The bulk of our card. This will contain the data that will be properly
// treated based on the `cardType`.
cardBody: {
// `messages` is blank here because it will be filled in by the client.
message: "",
}
// Relays what can be modified. This is specific to `client` related cards.
inputs: ["message"],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.