@ -23,764 +23,546 @@ export enum Level {
* level .
* /
export const TelemetryContracts : TelemetryContracts = {
/ * *
* Triggered when an HTTP request with an API key is made .
* /
apiUsage : {
description : 'Triggered when an HTTP request with an API key is made.' ,
minimumTelemetryLevel : Level.full ,
metadataContracts : {
/ * *
* The HTTP request method ( e . g . GET , POST , PUT ) .
* /
method : {
description : 'The HTTP request method (e.g. GET, POST, PUT).' ,
dataType : 'string' ,
} ,
/ * *
* The id of the user that triggered this event .
* /
userId : {
description : 'The id of the user that triggered this event.' ,
dataType : 'number' ,
} ,
/ * *
* The User - Agent HTTP request header .
* /
userAgent : {
description : 'The User-Agent HTTP request header.' ,
dataType : 'string' ,
} ,
} ,
} ,
/ * *
* Triggered when HelpScout Beacon is opened .
* /
beaconOpen : {
description : 'Triggered when HelpScout Beacon is opened.' ,
minimumTelemetryLevel : Level.full ,
metadataContracts : {
/ * *
* The id of the user that triggered this event .
* /
userId : {
description : 'The id of the user that triggered this event.' ,
dataType : 'number' ,
} ,
/ * *
* A random , session - based identifier for the user that triggered this event .
* /
altSessionId : {
description : 'A random, session-based identifier for the user that triggered this event.' ,
dataType : 'string' ,
} ,
} ,
} ,
/ * *
* Triggered when an article is opened in HelpScout Beacon .
* /
beaconArticleViewed : {
description : 'Triggered when an article is opened in HelpScout Beacon.' ,
minimumTelemetryLevel : Level.full ,
metadataContracts : {
/ * *
* The id of the article .
* /
articleId : {
description : 'The id of the article.' ,
dataType : 'string' ,
} ,
/ * *
* The id of the user that triggered this event .
* /
userId : {
description : 'The id of the user that triggered this event.' ,
dataType : 'number' ,
} ,
/ * *
* A random , session - based identifier for the user that triggered this event .
* /
altSessionId : {
description : 'A random, session-based identifier for the user that triggered this event.' ,
dataType : 'string' ,
} ,
} ,
} ,
/ * *
* Triggered when an email is sent in HelpScout Beacon .
* /
beaconEmailSent : {
description : 'Triggered when an email is sent in HelpScout Beacon.' ,
minimumTelemetryLevel : Level.full ,
metadataContracts : {
/ * *
* The id of the user that triggered this event .
* /
userId : {
description : 'The id of the user that triggered this event.' ,
dataType : 'number' ,
} ,
/ * *
* A random , session - based identifier for the user that triggered this event .
* /
altSessionId : {
description : 'A random, session-based identifier for the user that triggered this event.' ,
dataType : 'string' ,
} ,
} ,
} ,
/ * *
* Triggered when a search is made in HelpScout Beacon .
* /
beaconSearch : {
description : 'Triggered when a search is made in HelpScout Beacon.' ,
minimumTelemetryLevel : Level.full ,
metadataContracts : {
/ * *
* The search query .
* /
searchQuery : {
description : 'The search query.' ,
dataType : 'string' ,
} ,
/ * *
* The id of the user that triggered this event .
* /
userId : {
description : 'The id of the user that triggered this event.' ,
dataType : 'number' ,
} ,
/ * *
* A random , session - based identifier for the user that triggered this event .
* /
altSessionId : {
description : 'A random, session-based identifier for the user that triggered this event.' ,
dataType : 'string' ,
} ,
} ,
} ,
/ * *
* Triggered when a document is forked .
* /
documentForked : {
description : 'Triggered when a document is forked.' ,
minimumTelemetryLevel : Level.limited ,
metadataContracts : {
/ * *
* A hash of the doc id .
* /
docIdDigest : {
description : 'A hash of the doc id.' ,
dataType : 'string' ,
} ,
/ * *
* The id of the site containing the forked document .
* /
siteId : {
description : 'The id of the site containing the forked document.' ,
dataType : 'number' ,
minimumTelemetryLevel : Level.full ,
} ,
/ * *
* The type of the site .
* /
siteType : {
description : 'The type of the site.' ,
dataType : 'string' ,
minimumTelemetryLevel : Level.full ,
} ,
/ * *
* A random , session - based identifier for the user that triggered this event .
* /
altSessionId : {
description : 'A random, session-based identifier for the user that triggered this event.' ,
dataType : 'string' ,
minimumTelemetryLevel : Level.full ,
} ,
/ * *
* The id of the user that triggered this event .
* /
access : {
description : 'The document access level of the user that triggered this event.' ,
dataType : 'string' ,
} ,
userId : {
description : 'The id of the user that triggered this event.' ,
dataType : 'number' ,
minimumTelemetryLevel : Level.full ,
} ,
/ * *
* A hash of the fork id .
* /
forkIdDigest : {
description : 'A hash of the fork id.' ,
dataType : 'string' ,
} ,
/ * *
* A hash of the full id of the fork , including the trunk id and fork id .
* /
forkDocIdDigest : {
description : 'A hash of the full id of the fork, including the trunk id and fork id.' ,
dataType : 'string' ,
} ,
/ * *
* A hash of the trunk id .
* /
trunkIdDigest : {
description : 'A hash of the trunk id.' ,
dataType : 'string' ,
} ,
/ * *
* Whether the trunk is a template .
* /
isTemplate : {
description : 'Whether the trunk is a template.' ,
dataType : 'boolean' ,
} ,
/ * *
* Timestamp of the last update to the trunk document .
* /
lastActivity : {
description : 'Timestamp of the last update to the trunk document.' ,
dataType : 'date' ,
} ,
} ,
} ,
/ * *
* Triggered when a public document or template is opened .
* /
documentOpened : {
description : 'Triggered when a public document or template is opened.' ,
minimumTelemetryLevel : Level.limited ,
metadataContracts : {
/ * *
* A hash of the doc id .
* /
docIdDigest : {
description : 'A hash of the doc id.' ,
dataType : 'string' ,
} ,
/ * *
* The site id .
* /
siteId : {
description : 'The site id.' ,
dataType : 'number' ,
minimumTelemetryLevel : Level.full ,
} ,
/ * *
* The site type .
* /
siteType : {
description : 'The site type.' ,
dataType : 'string' ,
minimumTelemetryLevel : Level.full ,
} ,
/ * *
* The id of the user that triggered this event .
* /
userId : {
description : 'The id of the user that triggered this event.' ,
dataType : 'number' ,
minimumTelemetryLevel : Level.full ,
} ,
/ * *
* A random , session - based identifier for the user that triggered this event .
* /
altSessionId : {
description : 'A random, session-based identifier for the user that triggered this event.' ,
dataType : 'string' ,
minimumTelemetryLevel : Level.full ,
} ,
/ * *
* The document access level of the user that triggered this event .
* /
access : {
dataType : 'boolean' ,
description : 'The document access level of the user that triggered this event.' ,
dataType : 'string' ,
} ,
/ * *
* Whether the document is public .
* /
isPublic : {
description : 'Whether the document is public.' ,
dataType : 'boolean' ,
} ,
/ * *
* Whether a snapshot was opened .
* /
isSnapshot : {
description : 'Whether a snapshot was opened.' ,
dataType : 'boolean' ,
} ,
/ * *
* Whether the document is a template .
* /
isTemplate : {
description : 'Whether the document is a template.' ,
dataType : 'boolean' ,
} ,
/ * *
* Timestamp of when the document was last updated .
* /
lastUpdated : {
description : 'Timestamp of when the document was last updated.' ,
dataType : 'date' ,
} ,
} ,
} ,
/ * *
* Triggered on doc open and close , as well as hourly while a document is open .
* /
documentUsage : {
description : 'Triggered on doc open and close, as well as hourly while a document is open.' ,
minimumTelemetryLevel : Level.limited ,
metadataContracts : {
/ * *
* A hash of the doc id .
* /
docIdDigest : {
description : 'A hash of the doc id.' ,
dataType : 'string' ,
} ,
/ * *
* The site id .
* /
siteId : {
description : 'The site id.' ,
dataType : 'number' ,
minimumTelemetryLevel : Level.full ,
} ,
/ * *
* The site type .
* /
siteType : {
description : 'The site type.' ,
dataType : 'string' ,
minimumTelemetryLevel : Level.full ,
} ,
/ * *
* A random , session - based identifier for the user that triggered this event .
* /
altSessionId : {
description : 'A random, session-based identifier for the user that triggered this event.' ,
dataType : 'string' ,
minimumTelemetryLevel : Level.full ,
} ,
/ * *
* The id of the user that triggered this event .
* /
access : {
description : 'The document access level of the user that triggered this event.' ,
dataType : 'string' ,
} ,
userId : {
description : 'The id of the user that triggered this event.' ,
dataType : 'number' ,
minimumTelemetryLevel : Level.full ,
} ,
/ * *
* What caused this event to trigger .
*
* May be either "docOpen" , "interval" , or "docClose" .
* /
triggeredBy : {
description : 'What caused this event to trigger. May be either "docOpen", "interval", or "docClose".' ,
dataType : 'string' ,
} ,
/ * *
* Whether the document is public .
* /
isPublic : {
description : 'Whether the document is public.' ,
dataType : 'boolean' ,
} ,
/ * *
* The number of rows in the document .
* /
rowCount : {
description : 'The number of rows in the document.' ,
dataType : 'number' ,
} ,
/ * *
* The total size of all data in the document , excluding attachments .
* /
dataSizeBytes : {
description : 'The total size of all data in the document, excluding attachments.' ,
dataType : 'number' ,
} ,
/ * *
* The total size of all attachments in the document .
* /
attachmentsSize : {
description : 'The total size of all attachments in the document.' ,
dataType : 'number' ,
} ,
/ * *
* The number of access rules in the document .
* /
numAccessRules : {
description : 'The number of access rules in the document.' ,
dataType : 'number' ,
} ,
/ * *
* The number of user attributes in the document .
* /
numUserAttributes : {
description : 'The number of user attributes in the document.' ,
dataType : 'number' ,
} ,
/ * *
* The number of attachments in the document .
* /
numAttachments : {
description : 'The number of attachments in the document.' ,
dataType : 'number' ,
} ,
/ * *
* A list of unique file extensions compiled from all of the document ' s attachments .
* /
attachmentTypes : {
description : "A list of unique file extensions compiled from all of the document's attachments." ,
dataType : 'string[]' ,
} ,
/ * *
* The number of charts in the document .
* /
numCharts : {
description : 'The number of charts in the document.' ,
dataType : 'number' ,
} ,
/ * *
* A list of chart types of every chart in the document .
* /
chartTypes : {
description : 'A list of chart types of every chart in the document.' ,
dataType : 'string[]' ,
} ,
/ * *
* The number of linked charts in the document .
* /
numLinkedCharts : {
description : 'The number of linked charts in the document.' ,
dataType : 'number' ,
} ,
/ * *
* The number of linked widgets in the document .
* /
numLinkedWidgets : {
description : 'The number of linked widgets in the document.' ,
dataType : 'number' ,
} ,
/ * *
* The number of columns in the document .
* /
numColumns : {
description : 'The number of columns in the document.' ,
dataType : 'number' ,
} ,
/ * *
* The number of columns with conditional formatting in the document .
* /
numColumnsWithConditionalFormatting : {
description : 'The number of columns with conditional formatting in the document.' ,
dataType : 'number' ,
} ,
/ * *
* The number of formula columns in the document .
* /
numFormulaColumns : {
description : 'The number of formula columns in the document.' ,
dataType : 'number' ,
} ,
/ * *
* The number of trigger formula columns in the document .
* /
numTriggerFormulaColumns : {
description : 'The number of trigger formula columns in the document.' ,
dataType : 'number' ,
} ,
/ * *
* The number of summary formula columns in the document .
* /
numSummaryFormulaColumns : {
description : 'The number of summary formula columns in the document.' ,
dataType : 'number' ,
} ,
/ * *
* The number of fields with conditional formatting in the document .
* /
numFieldsWithConditionalFormatting : {
description : 'The number of fields with conditional formatting in the document.' ,
dataType : 'number' ,
} ,
/ * *
* The number of tables in the document .
* /
numTables : {
description : 'The number of tables in the document.' ,
dataType : 'number' ,
} ,
/ * *
* The number of on - demand tables in the document .
* /
numOnDemandTables : {
description : 'The number of on-demand tables in the document.' ,
dataType : 'number' ,
} ,
/ * *
* The number of tables with conditional formatting in the document .
* /
numTablesWithConditionalFormatting : {
description : 'The number of tables with conditional formatting in the document.' ,
dataType : 'number' ,
} ,
/ * *
* The number of summary tables in the document .
* /
numSummaryTables : {
description : 'The number of summary tables in the document.' ,
dataType : 'number' ,
} ,
/ * *
* The number of custom widgets in the document .
* /
numCustomWidgets : {
description : 'The number of custom widgets in the document.' ,
dataType : 'number' ,
} ,
/ * *
* A list of plugin ids for every custom widget in the document .
*
* The ids of widgets not created by Grist Labs are replaced with "externalId" .
* /
customWidgetIds : {
description : 'A list of plugin ids for every custom widget in the document. '
+ 'The ids of widgets not created by Grist Labs are replaced with "externalId".' ,
dataType : 'string[]' ,
} ,
} ,
} ,
/ * *
* Triggered every 5 seconds .
* /
processMonitor : {
description : 'Triggered every 5 seconds.' ,
minimumTelemetryLevel : Level.full ,
metadataContracts : {
/** Size of JS heap in use, in MiB. */
heapUsedMB : {
description : 'Size of JS heap in use, in MiB.' ,
dataType : 'number' ,
} ,
/** Total heap size, in MiB, allocated for JS by V8. */
heapTotalMB : {
description : 'Total heap size, in MiB, allocated for JS by V8. ' ,
dataType : 'number' ,
} ,
/** Fraction (typically between 0 and 1) of CPU usage. Includes all threads, so may exceed 1. */
cpuAverage : {
description : 'Fraction (typically between 0 and 1) of CPU usage. Includes all threads, so may exceed 1.' ,
dataType : 'number' ,
} ,
/** Interval (in milliseconds) over which `cpuAverage` is reported. */
intervalMs : {
description : 'Interval (in milliseconds) over which `cpuAverage` is reported.' ,
dataType : 'number' ,
} ,
} ,
} ,
/ * *
* Triggered when sending webhooks .
* /
sendingWebhooks : {
description : 'Triggered when sending webhooks.' ,
minimumTelemetryLevel : Level.limited ,
metadataContracts : {
/ * *
* The number of events in the batch of webhooks being sent .
* /
numEvents : {
description : 'The number of events in the batch of webhooks being sent.' ,
dataType : 'number' ,
} ,
/ * *
* A hash of the doc id .
* /
docIdDigest : {
description : 'A hash of the doc id.' ,
dataType : 'string' ,
} ,
/ * *
* The site id .
* /
siteId : {
description : 'The site id.' ,
dataType : 'number' ,
minimumTelemetryLevel : Level.full ,
} ,
/ * *
* The site type .
* /
siteType : {
description : 'The site type.' ,
dataType : 'string' ,
minimumTelemetryLevel : Level.full ,
} ,
/ * *
* A random , session - based identifier for the user that triggered this event .
* /
altSessionId : {
description : 'A random, session-based identifier for the user that triggered this event.' ,
dataType : 'string' ,
minimumTelemetryLevel : Level.full ,
} ,
/ * *
* The id of the user that triggered this event .
* /
access : {
description : 'The document access level of the user that triggered this event.' ,
dataType : 'string' ,
} ,
userId : {
description : 'The id of the user that triggered this event.' ,
dataType : 'number' ,
minimumTelemetryLevel : Level.full ,
} ,
} ,
} ,
/ * *
* Triggered after a user successfully verifies their account during sign - up .
*
* Not triggered in grist - core .
* /
signupVerified : {
description : 'Triggered after a user successfully verifies their account during sign-up. '
+ 'Not triggered in grist-core.' ,
minimumTelemetryLevel : Level.full ,
metadataContracts : {
/ * *
* Whether the user viewed any templates before signing up .
* /
isAnonymousTemplateSignup : {
description : 'Whether the user viewed any templates before signing up.' ,
dataType : 'boolean' ,
} ,
/ * *
* The doc id of the template the user last viewed before signing up , if any .
* /
templateId : {
description : 'The doc id of the template the user last viewed before signing up, if any.' ,
dataType : 'string' ,
} ,
} ,
} ,
/ * *
* Triggered daily .
* /
siteMembership : {
description : 'Triggered daily.' ,
minimumTelemetryLevel : Level.limited ,
metadataContracts : {
/ * *
* The site id .
* /
siteId : {
description : 'The site id.' ,
dataType : 'number' ,
} ,
/ * *
* The site type .
* /
siteType : {
description : 'The site type.' ,
dataType : 'string' ,
} ,
/ * *
* The number of users with an owner role in this site .
* /
numOwners : {
description : 'The number of users with an owner role in this site.' ,
dataType : 'number' ,
} ,
/ * *
* The number of users with an editor role in this site .
* /
numEditors : {
description : 'The number of users with an editor role in this site.' ,
dataType : 'number' ,
} ,
/ * *
* The number of users with a viewer role in this site .
* /
numViewers : {
description : 'The number of users with a viewer role in this site.' ,
dataType : 'number' ,
} ,
} ,
} ,
/ * *
* Triggered daily .
* /
siteUsage : {
description : 'Triggered daily.' ,
minimumTelemetryLevel : Level.limited ,
metadataContracts : {
/ * *
* The site id .
* /
siteId : {
description : 'The site id.' ,
dataType : 'number' ,
} ,
/ * *
* The site type .
* /
siteType : {
description : 'The site type.' ,
dataType : 'string' ,
} ,
/ * *
* Whether the site ' s subscription is in good standing .
* /
inGoodStanding : {
description : "Whether the site's subscription is in good standing." ,
dataType : 'boolean' ,
} ,
/ * *
* The Stripe Plan id associated with this site .
* /
stripePlanId : {
description : 'The Stripe Plan id associated with this site.' ,
dataType : 'string' ,
minimumTelemetryLevel : Level.full ,
} ,
/ * *
* The number of docs in this site .
* /
numDocs : {
description : 'The number of docs in this site.' ,
dataType : 'number' ,
} ,
/ * *
* The number of workspaces in this site .
* /
numWorkspaces : {
description : 'The number of workspaces in this site.' ,
dataType : 'number' ,
} ,
/ * *
* The number of site members .
* /
numMembers : {
description : 'The number of site members.' ,
dataType : 'number' ,
} ,
/ * *
* A timestamp of the most recent update made to a site document .
* /
lastActivity : {
description : 'A timestamp of the most recent update made to a site document.' ,
dataType : 'date' ,
} ,
} ,
} ,
/ * *
* Triggered on changes to tutorial progress .
* /
tutorialProgressChanged : {
description : 'Triggered on changes to tutorial progress.' ,
minimumTelemetryLevel : Level.full ,
metadataContracts : {
/ * *
* A hash of the tutorial fork id .
* /
tutorialForkIdDigest : {
description : 'A hash of the tutorial fork id.' ,
dataType : 'string' ,
} ,
/ * *
* A hash of the tutorial trunk id .
* /
tutorialTrunkIdDigest : {
description : 'A hash of the tutorial trunk id.' ,
dataType : 'string' ,
} ,
/ * *
* The 0 - based index of the last tutorial slide the user had open .
* /
lastSlideIndex : {
description : 'The 0-based index of the last tutorial slide the user had open.' ,
dataType : 'number' ,
} ,
/ * *
* The total number of slides in the tutorial .
* /
numSlides : {
description : 'The total number of slides in the tutorial.' ,
dataType : 'number' ,
} ,
/ * *
* Percentage of tutorial completion .
* /
percentComplete : {
description : 'Percentage of tutorial completion.' ,
dataType : 'number' ,
} ,
} ,
} ,
/ * *
* Triggered when a tutorial is restarted .
* /
tutorialRestarted : {
description : 'Triggered when a tutorial is restarted.' ,
minimumTelemetryLevel : Level.full ,
metadataContracts : {
/ * *
* A hash of the tutorial fork id .
* /
tutorialForkIdDigest : {
description : 'A hash of the tutorial fork id.' ,
dataType : 'string' ,
} ,
/ * *
* A hash of the tutorial trunk id .
* /
tutorialTrunkIdDigest : {
description : 'A hash of the tutorial trunk id.' ,
dataType : 'string' ,
} ,
/ * *
* A hash of the doc id .
* /
docIdDigest : {
description : 'A hash of the doc id.' ,
dataType : 'string' ,
} ,
/ * *
* The site id .
* /
siteId : {
description : 'The site id.' ,
dataType : 'number' ,
} ,
/ * *
* The site type .
* /
siteType : {
description : 'The site type.' ,
dataType : 'string' ,
} ,
/ * *
* A random , session - based identifier for the user that triggered this event .
* /
altSessionId : {
description : 'A random, session-based identifier for the user that triggered this event.' ,
dataType : 'string' ,
} ,
access : {
description : 'The document access level of the user that triggered this event.' ,
dataType : 'string' ,
} ,
/ * *
* The id of the user that triggered this event .
* /
userId : {
description : 'The id of the user that triggered this event.' ,
dataType : 'number' ,
} ,
} ,
} ,
/ * *
* Triggered when the video tour is closed .
* /
watchedVideoTour : {
description : 'Triggered when the video tour is closed.' ,
minimumTelemetryLevel : Level.limited ,
metadataContracts : {
/ * *
* The number of seconds elapsed in the video player .
* /
watchTimeSeconds : {
description : 'The number of seconds elapsed in the video player.' ,
dataType : 'number' ,
} ,
/ * *
* The id of the user that triggered this event .
* /
userId : {
description : 'The id of the user that triggered this event.' ,
dataType : 'number' ,
minimumTelemetryLevel : Level.full ,
} ,
/ * *
* A random , session - based identifier for the user that triggered this event .
* /
altSessionId : {
description : 'A random, session-based identifier for the user that triggered this event.' ,
dataType : 'string' ,
minimumTelemetryLevel : Level.full ,
} ,
@ -811,11 +593,13 @@ export const TelemetryEvents = StringUnion(
export type TelemetryEvent = typeof TelemetryEvents . type ;
interface TelemetryEventContract {
description : string ;
minimumTelemetryLevel : Level ;
metadataContracts? : Record < string , MetadataContract > ;
}
interface MetadataContract {
description : string ;
dataType : 'boolean' | 'number' | 'string' | 'string[]' | 'date' ;
minimumTelemetryLevel? : Level ;
}