fix(types): add workspace module shims

This commit is contained in:
Peter Steinberger
2026-03-24 10:04:41 -07:00
parent 7eefddd0ed
commit 44d5e6d672
2 changed files with 47 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
declare module "@create-markdown/preview" {
export type PreviewThemeOptions = {
sanitize?: ((html: string) => string) | undefined;
};
export function applyPreviewTheme(html: string, options?: PreviewThemeOptions): string;
}

40
src/types/microsoft-teams-sdk.d.ts vendored Normal file
View File

@@ -0,0 +1,40 @@
declare module "@microsoft/teams.apps" {
export class App {
constructor(options: { clientId: string; clientSecret: string; tenantId?: string });
getBotToken(): Promise<{ toString(): string } | null>;
getAppGraphToken(): Promise<{ toString(): string } | null>;
}
}
declare module "@microsoft/teams.api" {
export class Client {
constructor(
serviceUrl: string,
options?: {
token?: (() => Promise<string | undefined>) | undefined;
headers?: Record<string, string> | undefined;
},
);
conversations: {
activities: (conversationId: string) => {
create: (activity: Record<string, unknown>) => Promise<unknown>;
};
};
}
}
declare module "@microsoft/teams.apps/dist/middleware/auth/jwt-validator.js" {
export function createServiceTokenValidator(
appId: string,
tenantId?: string,
): {
validateAccessToken(
token: string,
options?: {
validateServiceUrl?: { expectedServiceUrl: string } | undefined;
},
): Promise<unknown>;
};
}