import { JSONSchemaType } from "ajv"; import { ManifestCommonProperties } from "./ManifestCommonProperties"; import { DeclarativeCopilotManifestSchema } from "./declarativeCopilotManifest"; import { DevPreviewSchema, TeamsManifest } from "./generated-types"; import { TeamsAppManifest } from "./manifest"; import { PluginManifestSchema } from "./pluginManifest"; export * from "./declarativeCopilotManifest"; export * from "./generated-types"; export * from "./manifest"; export * from "./pluginManifest"; export type TeamsAppManifestJSONSchema = JSONSchemaType; export type DevPreviewManifestJSONSchema = JSONSchemaType; /** * @deprecated */ export type Manifest = TeamsAppManifest | DevPreviewSchema; export type ManifestProperties = ManifestCommonProperties; export declare class ManifestUtil { /** * Loads the manifest from the given path with basic type check. * * @deprecated use `AppManifestUtils.read()` instead * @param path - The path to the manifest file. * @throws Will propagate any error thrown by the fs-extra#readJson or type check failure. * * @returns The Manifest Object. */ static loadFromPath(path: string): Promise; /** * Loads the manifest from the given path with validation * * @deprecated use `AppManifestUtils.readAndValidate()` instead * @param path - The path to the manifest file. * @throws Will propagate any error thrown by the fs-extra#readJson or type check failure. * * @returns The Manifest Object and schema validation results */ static loadAndValidateFromPath(path: string): Promise<[TeamsManifest, string[]]>; /** * Writes the manifest object to the given path. * * @deprecated use `AppManifestUtils.writeTeamsManifest()` instead * @param path - Where to write * @param manifest - Manifest object to be saved * @throws Will propagate any error thrown by the fs-extra#writeJson. * */ static writeToPath(path: string, manifest: T): Promise; /** * Validate manifest against json schema. * @deprecated use `AppManifestUtils.validateAgainstSchema(manifest, schema)` instead * @param manifest - Manifest object to be validated * @param schema - teams-app-manifest schema * @returns An empty array if it passes validation, or an array of error string otherwise. */ static validateManifestAgainstSchema(manifest: T, schema: JSONSchemaType): Promise; /** * @deprecated * @param manifest * @returns */ static fetchSchema(manifest: T): Promise>; /** * Validate manifest against {@link TeamsAppManifest#$schema}. * * @deprecated use `AppManifestUtils.validateAgainstSchema(manifest: T)` instead * @param manifest - Manifest object to be validated * @throws Will throw if {@link TeamsAppManifest#$schema} is undefined, not valid * or there is any network failure when getting the schema. * * @returns An empty array if schema validation passes, or an array of error string otherwise. */ static validateManifest(manifest: T): Promise; }