@microsoft/m365-spec-parser 0.2.7-alpha.ef180c1c1.0 → 0.2.7-alpha.fdd1bfa46.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.
@@ -1,4 +1,4 @@
1
- import { ResponseSemanticsObject } from "@microsoft/teams-manifest";
1
+ import { ResponseSemanticsObject } from "@microsoft/app-manifest";
2
2
  import { AdaptiveCard, PreviewCardTemplate, WrappedAdaptiveCard } from "./interfaces";
3
3
  export declare function wrapAdaptiveCard(card: AdaptiveCard, jsonPath: string): WrappedAdaptiveCard;
4
4
  export declare function wrapResponseSemantics(card: AdaptiveCard, jsonPath: string): ResponseSemanticsObject;
@@ -12,6 +12,7 @@ export declare class ConstantString {
12
12
  static readonly ResolveServerUrlFailed = "Unable to resolve the server URL: please make sure that the environment variable %s is defined.";
13
13
  static readonly OperationOnlyContainsOptionalParam = "Operation %s contains multiple optional parameters. The first optional parameter is used for this command.";
14
14
  static readonly ConvertSwaggerToOpenAPI = "The Swagger 2.0 file has been converted to OpenAPI 3.0.";
15
+ static readonly OpenAPI31ConvertTo30 = "OpenAPI 3.1 document has been converted to OpenAPI 3.0.";
15
16
  static readonly SwaggerNotSupported = "Swagger 2.0 is not supported. Please convert to OpenAPI 3.0 manually before proceeding.";
16
17
  static readonly SpecVersionNotSupported = "Unsupported OpenAPI version %s. Please use version 3.0.x.";
17
18
  static readonly MultipleAuthNotSupported = "Multiple authentication methods are unsupported. Ensure all selected APIs use identical authentication.";
@@ -1,6 +1,6 @@
1
1
  export { SpecParser } from "./specParser";
2
2
  export { SpecParserError } from "./specParserError";
3
- export { ValidationStatus, WarningType, ErrorType, WarningResult, ErrorResult, ListAPIResult, APIInfo, ValidateResult, ParseOptions, AdaptiveCard, ProjectType, InvalidAPIInfo, AuthType, AdaptiveCardUpdateStrategy, ListAPIInfo, AuthInfo, } from "./interfaces";
3
+ export { ValidationStatus, WarningType, ErrorType, WarningResult, ErrorResult, ListAPIResult, APIInfo, ValidateResult, ParseOptions, AdaptiveCard, ProjectType, InvalidAPIInfo, AuthType, AdaptiveCardUpdateStrategy, ListAPIInfo, AuthInfo, GenerateResult, } from "./interfaces";
4
4
  export { ConstantString } from "./constants";
5
5
  export { Utils } from "./utils";
6
6
  export { AdaptiveCardGenerator } from "./adaptiveCardGenerator";
@@ -1,4 +1,4 @@
1
- import { IParameter } from "@microsoft/teams-manifest";
1
+ import { IParameter } from "@microsoft/app-manifest";
2
2
  import { OpenAPIV3 } from "openapi-types";
3
3
  /**
4
4
  * An interface that represents the result of validating an OpenAPI specification file.
@@ -115,7 +115,7 @@ export declare enum WarningType {
115
115
  GenerateCardFailed = "generate-card-failed",
116
116
  OperationOnlyContainsOptionalParam = "operation-only-contains-optional-param",
117
117
  ConvertSwaggerToOpenAPI = "convert-swagger-to-openapi",
118
- FuncDescriptionTooLong = "function-description-too-long",
118
+ OpenAPI31ConvertTo30 = "openapi31-convert-to-30",
119
119
  OperationIdContainsSpecialCharacters = "operationid-contains-special-characters",
120
120
  UnsupportedAuthType = "unsupported-auth-type",
121
121
  GenerateJsonDataFailed = "generate-json-data-failed",
@@ -1,7 +1,8 @@
1
1
  import { OpenAPIV3 } from "openapi-types";
2
2
  import { AuthInfo, ExistingPluginManifestInfo, OperationAuthInfoMap, ParseOptions, WarningResult } from "./interfaces";
3
- import { IMessagingExtensionCommand, TeamsAppManifest, PluginManifestSchema } from "@microsoft/teams-manifest";
3
+ import { IMessagingExtensionCommand, TeamsAppManifest, PluginManifestSchema } from "@microsoft/app-manifest";
4
4
  export declare class ManifestUpdater {
5
+ static useCopilotExtensionsInSchema(manifest: TeamsAppManifest): Promise<boolean>;
5
6
  static updateManifestWithAiPlugin(manifestPath: string, outputSpecPath: string, apiPluginFilePath: string, spec: OpenAPIV3.Document, options: ParseOptions, authMap: OperationAuthInfoMap, existingPluginManifestInfo?: ExistingPluginManifestInfo): Promise<[TeamsAppManifest, PluginManifestSchema, WarningResult[], Record<string, any>]>;
6
7
  static updateManifestDescription(manifest: TeamsAppManifest, spec: OpenAPIV3.Document): void;
7
8
  static checkSchema(schema: OpenAPIV3.SchemaObject, method: string, pathUrl: string): void;
@@ -1,6 +1,6 @@
1
1
  import { OpenAPIV3 } from "openapi-types";
2
2
  import { AuthInfo, AuthType, ErrorResult, OperationAuthInfoMap, ParseOptions } from "./interfaces";
3
- import { IMessagingExtensionCommand, IParameter } from "@microsoft/teams-manifest";
3
+ import { IMessagingExtensionCommand, IParameter } from "@microsoft/app-manifest";
4
4
  export declare class Utils {
5
5
  static isObjectSchema(schema: OpenAPIV3.SchemaObject): boolean;
6
6
  static containMultipleMediaTypes(bodyObject: OpenAPIV3.RequestBodyObject | OpenAPIV3.ResponseObject): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/m365-spec-parser",
3
- "version": "0.2.7-alpha.ef180c1c1.0",
3
+ "version": "0.2.7-alpha.fdd1bfa46.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.1",
42
- "@microsoft/teams-manifest": "0.1.10-alpha.ef180c1c1.0",
42
+ "@microsoft/app-manifest": "1.0.0-alpha.fdd1bfa46.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": "b7782424ff638a6d227c3e00a227e6ad4bbdbe3e"
150
+ "gitHead": "96b17048440a44ddd6804e84c5b8b447429aa28d"
151
151
  }