Skip to content

Instantly share code, notes, and snippets.

@mnichols
Last active September 19, 2017 17:59
Show Gist options
  • Save mnichols/49eb1149e819feb84377d0cac998c320 to your computer and use it in GitHub Desktop.
Save mnichols/49eb1149e819feb84377d0cac998c320 to your computer and use it in GitHub Desktop.
var model = {
apiRootUrl: string,
context,
contextRefs: [{
contextId: string,
type: string,
clientId: string
}],
initialized: boolean,
user: {
id: string,
avatarUrl: string
}
}
var context = {
...contextResponse,
loading: boolean,
activeThreadId: string,
markable: {
enabled: boolean,
position: {
x: number,
y: number
}
},
startThread: {
threadId: string,
position: {
x: number,
y: number
}
}
}
var contextResponse = {
type: string,
clientId: string,
contextId: string,
ref: {
type: string,
clientId: string,
contextId: string
},
metadata: {
data: any,
dataType: string
},
threadIds: [string], // ordered by startedat
threads: {
[threadId:string]: {
commentIds: [string],
metadata: {
data: any,
dataType: string
},
resolved: boolean,
startedAt: date,
threadId: string
}
},
comments: {
[commentId:string]: {
authorId: string,
commentId: string,
isThreadStarter: boolean,
madeAt: date,
metadata: {
data: any,
dataType: string
},
source: string,
text: string,
updatedAt: date,
},
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment