mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-20 21:23:23 +00:00
fix(types): add workspace module shims
This commit is contained in:
7
src/types/create-markdown-preview.d.ts
vendored
Normal file
7
src/types/create-markdown-preview.d.ts
vendored
Normal 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
40
src/types/microsoft-teams-sdk.d.ts
vendored
Normal 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>;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user