@microsoft/m365-spec-parser 0.2.2 → 0.2.3-alpha.09af212fe.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,8 +1,10 @@
1
1
  import { OpenAPIV3 } from "openapi-types";
2
2
  import { AdaptiveCard, ArrayElement, ImageElement, TextBlockElement } from "./interfaces";
3
3
  export declare class AdaptiveCardGenerator {
4
- static generateAdaptiveCard(operationItem: OpenAPIV3.OperationObject, allowMultipleMediaType?: boolean): [AdaptiveCard, string];
5
- static generateCardFromResponse(schema: OpenAPIV3.SchemaObject, name: string, parentArrayName?: string): Array<TextBlockElement | ImageElement | ArrayElement>;
4
+ static generateAdaptiveCard(operationItem: OpenAPIV3.OperationObject, allowMultipleMediaType?: boolean, maxElementCount?: number): [AdaptiveCard, string];
5
+ static generateCardFromResponse(schema: OpenAPIV3.SchemaObject, name: string, parentArrayName?: string, maxElementCount?: number, counter?: {
6
+ count: number;
7
+ }): Array<TextBlockElement | ImageElement | ArrayElement>;
6
8
  static getResponseJsonPathFromSchema(schema: OpenAPIV3.SchemaObject): string;
7
9
  static isImageUrlProperty(schema: OpenAPIV3.NonArraySchemaObject, name: string, parentArrayName: string): boolean;
8
10
  }
@@ -15,6 +15,7 @@ export declare class ConstantString {
15
15
  static readonly SwaggerNotSupported = "Swagger 2.0 is not supported. Please convert to OpenAPI 3.0 manually before proceeding.";
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
+ static readonly OperationIdContainsSpecialCharacters = "Operation id '%s' in OpenAPI description document contained special characters and was renamed to '%s'.";
18
19
  static readonly UnsupportedSchema = "Unsupported schema in %s %s: %s";
19
20
  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.";
20
21
  static readonly WrappedCardVersion = "devPreview";
@@ -118,6 +118,7 @@ export declare enum WarningType {
118
118
  OperationOnlyContainsOptionalParam = "operation-only-contains-optional-param",
119
119
  ConvertSwaggerToOpenAPI = "convert-swagger-to-openapi",
120
120
  FuncDescriptionTooLong = "function-description-too-long",
121
+ OperationIdContainsSpecialCharacters = "operationid-contains-special-characters",
121
122
  Unknown = "unknown"
122
123
  }
123
124
  /**
@@ -1,8 +1,9 @@
1
1
  import { OpenAPIV3 } from "openapi-types";
2
- import { AdaptiveCardBody, AuthInfo, AuthType, ErrorResult, ParseOptions } from "./interfaces";
2
+ import { AuthInfo, AuthType, ErrorResult, ParseOptions } from "./interfaces";
3
3
  import { IMessagingExtensionCommand, IParameter } from "@microsoft/teams-manifest";
4
4
  export declare class Utils {
5
5
  static hasNestedObjectInSchema(schema: OpenAPIV3.SchemaObject): boolean;
6
+ static isObjectSchema(schema: OpenAPIV3.SchemaObject): boolean;
6
7
  static containMultipleMediaTypes(bodyObject: OpenAPIV3.RequestBodyObject | OpenAPIV3.ResponseObject): boolean;
7
8
  static isBearerTokenAuth(authScheme: AuthType): boolean;
8
9
  static isAPIKeyAuth(authScheme: AuthType): boolean;
@@ -26,5 +27,4 @@ export declare class Utils {
26
27
  static format(str: string, ...args: string[]): string;
27
28
  static getSafeRegistrationIdEnvName(authName: string): string;
28
29
  static getServerObject(spec: OpenAPIV3.Document, method: string, path: string): OpenAPIV3.ServerObject | undefined;
29
- static limitACBodyProperties(body: AdaptiveCardBody, maxCount: number): AdaptiveCardBody;
30
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/m365-spec-parser",
3
- "version": "0.2.2",
3
+ "version": "0.2.3-alpha.09af212fe.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",
42
+ "@microsoft/teams-manifest": "0.1.7-alpha.09af212fe.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": "7199ccb44e6dc8f72680b6752f965a424b0d0fcf"
150
+ "gitHead": "12182bef3676d5ef2cc8a86486dd58a5f0bb9b09"
151
151
  }