Request validation for /api/integrations.* (#5638)

This commit is contained in:
Apoorv Mishra
2023-08-02 06:47:01 +05:30
committed by GitHub
parent 228d1faa9f
commit 2331bbbd36
6 changed files with 314 additions and 103 deletions

View File

@@ -95,13 +95,14 @@ export type IntegrationSettings<T> = T extends IntegrationType.Embed
? { measurementId: string }
: T extends IntegrationType.Post
? { url: string; channel: string; channelId: string }
: T extends IntegrationType.Post
: T extends IntegrationType.Command
? { serviceTeamId: string }
:
| { url: string }
| { url: string; channel: string; channelId: string }
| { serviceTeamId: string }
| { measurementId: string };
| { measurementId: string }
| undefined;
export enum UserPreference {
/** Whether reopening the app should redirect to the last viewed document. */