Matomo integration (#7009)

This commit is contained in:
Tom Moor
2024-06-12 08:03:38 -04:00
committed by GitHub
parent 0bf66cc560
commit df3cd22aee
19 changed files with 314 additions and 62 deletions

View File

@@ -52,9 +52,9 @@ export enum MentionType {
export type PublicEnv = {
ROOT_SHARE_ID?: string;
analytics: {
service?: IntegrationService;
settings?: IntegrationSettings<IntegrationType.Analytics>;
};
service: IntegrationService;
settings: IntegrationSettings<IntegrationType.Analytics>;
}[];
};
export enum AttachmentPreset {
@@ -82,6 +82,7 @@ export enum IntegrationService {
Grist = "grist",
Slack = "slack",
GoogleAnalytics = "google-analytics",
Matomo = "matomo",
GitHub = "github",
}
@@ -90,12 +91,14 @@ export type UserCreatableIntegrationService = Extract<
| IntegrationService.Diagrams
| IntegrationService.Grist
| IntegrationService.GoogleAnalytics
| IntegrationService.Matomo
>;
export const UserCreatableIntegrationService = {
Diagrams: IntegrationService.Diagrams,
Grist: IntegrationService.Grist,
GoogleAnalytics: IntegrationService.GoogleAnalytics,
Matomo: IntegrationService.Matomo,
} as const;
export enum CollectionPermission {
@@ -121,7 +124,7 @@ export type IntegrationSettings<T> = T extends IntegrationType.Embed
};
}
: T extends IntegrationType.Analytics
? { measurementId: string }
? { measurementId: string; instanceUrl?: string }
: T extends IntegrationType.Post
? { url: string; channel: string; channelId: string }
: T extends IntegrationType.Command