@microsoft/m365-spec-parser 0.2.2-alpha.9389d4dc7.0 → 0.2.2-alpha.99de858a6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,6 +16,7 @@ export declare class ConstantString {
16
16
  static readonly SpecVersionNotSupported = "Unsupported OpenAPI version %s. Please use version 3.0.x.";
17
17
  static readonly MultipleAuthNotSupported = "Multiple authentication methods are unsupported. Ensure all selected APIs use identical authentication.";
18
18
  static readonly UnsupportedSchema = "Unsupported schema in %s %s: %s";
19
+ static readonly FuncDescriptionTooLong = "The description of the function '%s' is too long. The current length is %s characters, while the maximum allowed length is %s characters.";
19
20
  static readonly WrappedCardVersion = "devPreview";
20
21
  static readonly WrappedCardSchema = "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.ResponseRenderingTemplate.schema.json";
21
22
  static readonly WrappedCardResponseLayout = "list";
@@ -44,6 +45,7 @@ export declare class ConstantString {
44
45
  static readonly CommandTitleMaxLens = 32;
45
46
  static readonly ParameterTitleMaxLens = 32;
46
47
  static readonly SMERequiredParamsMaxNum = 5;
48
+ static readonly FunctionDescriptionMaxLens = 100;
47
49
  static readonly DefaultPluginId = "plugin_1";
48
- static readonly PluginManifestSchema = "https://aka.ms/json-schemas/copilot-extensions/v2.1/plugin.schema.json";
50
+ static readonly PluginManifestSchema = "https://aka.ms/json-schemas/copilot/plugin/v2.1/schema.json";
49
51
  }
@@ -16,6 +16,7 @@ export interface ValidateResult {
16
16
  * An array of error results generated during validation.
17
17
  */
18
18
  errors: ErrorResult[];
19
+ specHash?: string;
19
20
  }
20
21
  export interface SpecValidationResult {
21
22
  /**
@@ -116,6 +117,7 @@ export declare enum WarningType {
116
117
  GenerateCardFailed = "generate-card-failed",
117
118
  OperationOnlyContainsOptionalParam = "operation-only-contains-optional-param",
118
119
  ConvertSwaggerToOpenAPI = "convert-swagger-to-openapi",
120
+ FuncDescriptionTooLong = "function-description-too-long",
119
121
  Unknown = "unknown"
120
122
  }
121
123
  /**
@@ -276,3 +278,7 @@ export interface InferredProperties {
276
278
  subtitle?: string;
277
279
  imageUrl?: string;
278
280
  }
281
+ export interface ExistingPluginManifestInfo {
282
+ manifestPath: string;
283
+ specPath: string;
284
+ }
@@ -1,11 +1,11 @@
1
1
  import { OpenAPIV3 } from "openapi-types";
2
- import { AuthInfo, ParseOptions, WarningResult } from "./interfaces";
2
+ import { AuthInfo, ExistingPluginManifestInfo, ParseOptions, WarningResult } from "./interfaces";
3
3
  import { IMessagingExtensionCommand, TeamsAppManifest, PluginManifestSchema } from "@microsoft/teams-manifest";
4
4
  export declare class ManifestUpdater {
5
- static updateManifestWithAiPlugin(manifestPath: string, outputSpecPath: string, apiPluginFilePath: string, spec: OpenAPIV3.Document, options: ParseOptions, authInfo?: AuthInfo): Promise<[TeamsAppManifest, PluginManifestSchema, WarningResult[]]>;
5
+ static updateManifestWithAiPlugin(manifestPath: string, outputSpecPath: string, apiPluginFilePath: string, spec: OpenAPIV3.Document, options: ParseOptions, authInfo?: AuthInfo, existingPluginManifestInfo?: ExistingPluginManifestInfo): Promise<[TeamsAppManifest, PluginManifestSchema, WarningResult[]]>;
6
6
  static updateManifestDescription(manifest: TeamsAppManifest, spec: OpenAPIV3.Document): void;
7
7
  static checkSchema(schema: OpenAPIV3.SchemaObject, method: string, pathUrl: string): void;
8
- static generatePluginManifestSchema(spec: OpenAPIV3.Document, specRelativePath: string, apiPluginFilePath: string, appName: string, authInfo: AuthInfo | undefined, options: ParseOptions): Promise<[PluginManifestSchema, WarningResult[]]>;
8
+ static generatePluginManifestSchema(spec: OpenAPIV3.Document, specRelativePath: string, apiPluginFilePath: string, appName: string, authInfo: AuthInfo | undefined, options: ParseOptions, existingPluginManifestInfo?: ExistingPluginManifestInfo): Promise<[PluginManifestSchema, WarningResult[]]>;
9
9
  static updateManifest(manifestPath: string, outputSpecPath: string, spec: OpenAPIV3.Document, options: ParseOptions, adaptiveCardFolder?: string, authInfo?: AuthInfo): Promise<[TeamsAppManifest, WarningResult[]]>;
10
10
  static generateCommands(spec: OpenAPIV3.Document, manifestPath: string, options: ParseOptions, adaptiveCardFolder?: string): Promise<[IMessagingExtensionCommand[], WarningResult[]]>;
11
11
  static getRelativePath(from: string, to: string): string;
@@ -44,7 +44,7 @@ export declare class SpecParser {
44
44
  * @param outputSpecPath File path of the new OpenAPI specification file to generate. If not specified or empty, no spec file will be generated.
45
45
  * @param pluginFilePath File path of the api plugin file to generate.
46
46
  */
47
- generateForCopilot(manifestPath: string, filter: string[], outputSpecPath: string, pluginFilePath: string, signal?: AbortSignal): Promise<GenerateResult>;
47
+ generateForCopilot(manifestPath: string, filter: string[], outputSpecPath: string, pluginFilePath: string, existingPluginFilePath?: string, signal?: AbortSignal): Promise<GenerateResult>;
48
48
  /**
49
49
  * Generates and update artifacts from the OpenAPI specification file. Generate Adaptive Cards, update Teams app manifest, and generate a new OpenAPI specification file.
50
50
  * @param manifestPath A file path of the Teams app manifest file to update.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/m365-spec-parser",
3
- "version": "0.2.2-alpha.9389d4dc7.0",
3
+ "version": "0.2.2-alpha.99de858a6.0",
4
4
  "description": "OpenAPI specification files Parser for M365 Apps",
5
5
  "main": "dist/index.node.cjs.js",
6
6
  "browser": "dist/index.esm2017.js",
@@ -39,7 +39,7 @@
39
39
  "sideEffects": false,
40
40
  "dependencies": {
41
41
  "@apidevtools/swagger-parser": "^10.1.0",
42
- "@microsoft/teams-manifest": "0.1.6-alpha.9389d4dc7.0",
42
+ "@microsoft/teams-manifest": "0.1.6-alpha.99de858a6.0",
43
43
  "fs-extra": "^11.2.0",
44
44
  "js-yaml": "^4.1.0",
45
45
  "openapi-types": "^7.2.3",
@@ -147,5 +147,5 @@
147
147
  "npx eslint --cache --fix --quiet"
148
148
  ]
149
149
  },
150
- "gitHead": "68ee7c2d0dfe892b359f89db866abdc98df3c141"
150
+ "gitHead": "f5d3a67a8dc7a149e75a5d9e44d156b1c2ab1d93"
151
151
  }