diff --git a/app/common/Telemetry.ts b/app/common/Telemetry.ts index 33b8f54a..dc9f3085 100644 --- a/app/common/Telemetry.ts +++ b/app/common/Telemetry.ts @@ -761,6 +761,10 @@ export const TelemetryContracts: TelemetryContracts = { description: 'A timestamp of the most recent update made to a site document.', dataType: 'date', }, + earliestDocCreatedAt: { + description: 'A timestamp of the earliest non-deleted document creation time.', + dataType: 'date', + }, }, }, tutorialProgressChanged: { diff --git a/app/common/ThemePrefs-ti.ts b/app/common/ThemePrefs-ti.ts index 40a67566..980eb7f7 100644 --- a/app/common/ThemePrefs-ti.ts +++ b/app/common/ThemePrefs-ti.ts @@ -137,6 +137,7 @@ export const ThemeColors = t.iface([], { "selection-opaque-fg": "string", "selection-opaque-bg": "string", "selection-opaque-dark-bg": "string", + "selection-header": "string", "widget-bg": "string", "widget-border": "string", "widget-active-border": "string", diff --git a/app/gen-server/lib/Housekeeper.ts b/app/gen-server/lib/Housekeeper.ts index 1a0d3efb..1dac3cc1 100644 --- a/app/gen-server/lib/Housekeeper.ts +++ b/app/gen-server/lib/Housekeeper.ts @@ -186,6 +186,7 @@ export class Housekeeper { numWorkspaces: Number(summary.num_workspaces), numMembers: Number(summary.num_members), lastActivity: summary.last_activity, + earliestDocCreatedAt: summary.earliest_doc_created_at, }, full: { stripePlanId: summary.stripe_plan_id, @@ -324,6 +325,7 @@ export class Housekeeper { .addSelect('COUNT(DISTINCT workspaces.id)', 'num_workspaces') .addSelect('COUNT(DISTINCT org_member_users.id)', 'num_members') .addSelect('MAX(docs.updated_at)', 'last_activity') + .addSelect('MIN(docs.created_at)', 'earliest_doc_created_at') .from(Organization, 'orgs') .leftJoin('orgs.workspaces', 'workspaces') .leftJoin('workspaces.docs', 'docs') diff --git a/test/common/Telemetry.ts b/test/common/Telemetry.ts index ad65805c..48df95c1 100644 --- a/test/common/Telemetry.ts +++ b/test/common/Telemetry.ts @@ -23,6 +23,7 @@ describe('Telemetry', function() { numWorkspaces: 1, numMembers: 1, lastActivity: new Date('2022-12-30T01:23:45'), + earliestDocCreatedAt: new Date('2022-12-29T00:01:02'), })); assert.doesNotThrow(() => checker('watchedVideoTour', { watchTimeSeconds: 30, @@ -54,6 +55,7 @@ describe('Telemetry', function() { numWorkspaces: 1, numMembers: 1, lastActivity: new Date('2022-12-30T01:23:45'), + earliestDocCreatedAt: new Date('2022-12-29T00:01:02'), })); assert.doesNotThrow(() => checker('watchedVideoTour', { watchTimeSeconds: 30,