@microsoft/m365-spec-parser 0.2.4-alpha.ad0d7aa1a.0 → 0.2.4-alpha.db2563b3b.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.
@@ -31,9 +31,7 @@ export declare class ConstantString {
31
31
  static readonly TextBlockType = "TextBlock";
32
32
  static readonly ImageType = "Image";
33
33
  static readonly ContainerType = "Container";
34
- static readonly RegistrationIdPostfix: {
35
- [key: string]: string;
36
- };
34
+ static readonly RegistrationIdPostfix = "REGISTRATION_ID";
37
35
  static readonly ResponseCodeFor20X: string[];
38
36
  static readonly AllOperationMethods: string[];
39
37
  static readonly WellknownResultNames: string[];
@@ -282,3 +282,12 @@ export interface ExistingPluginManifestInfo {
282
282
  manifestPath: string;
283
283
  specPath: string;
284
284
  }
285
+ export interface OperationAuthInfoMap {
286
+ [operationId: string]: AuthInfo;
287
+ }
288
+ export interface FunctionClassificationMap {
289
+ [authType: string]: {
290
+ functionNames: string[];
291
+ authName: string;
292
+ };
293
+ }
@@ -1,11 +1,11 @@
1
1
  import { OpenAPIV3 } from "openapi-types";
2
- import { AuthInfo, ExistingPluginManifestInfo, ParseOptions, WarningResult } from "./interfaces";
2
+ import { AuthInfo, ExistingPluginManifestInfo, OperationAuthInfoMap, 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, existingPluginManifestInfo?: ExistingPluginManifestInfo): Promise<[TeamsAppManifest, PluginManifestSchema, WarningResult[]]>;
5
+ static updateManifestWithAiPlugin(manifestPath: string, outputSpecPath: string, apiPluginFilePath: string, spec: OpenAPIV3.Document, options: ParseOptions, authMap: OperationAuthInfoMap, 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, existingPluginManifestInfo?: ExistingPluginManifestInfo): Promise<[PluginManifestSchema, WarningResult[]]>;
8
+ static generatePluginManifestSchema(spec: OpenAPIV3.Document, specRelativePath: string, apiPluginFilePath: string, appName: string, authMap: OperationAuthInfoMap, 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;
@@ -1,5 +1,5 @@
1
1
  import { OpenAPIV3 } from "openapi-types";
2
- import { AuthInfo, AuthType, ErrorResult, ParseOptions } from "./interfaces";
2
+ import { AuthInfo, AuthType, ErrorResult, OperationAuthInfoMap, ParseOptions } from "./interfaces";
3
3
  import { IMessagingExtensionCommand, IParameter } from "@microsoft/teams-manifest";
4
4
  export declare class Utils {
5
5
  static isObjectSchema(schema: OpenAPIV3.SchemaObject): boolean;
@@ -9,6 +9,7 @@ export declare class Utils {
9
9
  static isOAuthWithAuthCodeFlow(authScheme: AuthType): boolean;
10
10
  static isNotSupportedAuth(authSchemeArray: AuthInfo[][]): boolean;
11
11
  static getAuthArray(securities: OpenAPIV3.SecurityRequirementObject[] | undefined, spec: OpenAPIV3.Document): AuthInfo[][];
12
+ static getAuthMap(spec: OpenAPIV3.Document): OperationAuthInfoMap;
12
13
  static getAuthInfo(spec: OpenAPIV3.Document): AuthInfo | undefined;
13
14
  static updateFirstLetter(str: string): string;
14
15
  static getResponseJson(operationObject: OpenAPIV3.OperationObject | undefined, allowMultipleMediaType?: boolean): {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/m365-spec-parser",
3
- "version": "0.2.4-alpha.ad0d7aa1a.0",
3
+ "version": "0.2.4-alpha.db2563b3b.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.8-alpha.ad0d7aa1a.0",
42
+ "@microsoft/teams-manifest": "0.1.8-alpha.db2563b3b.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": "9ba67af6f8e12f442b1ef56ac2052759a649e00d"
150
+ "gitHead": "5b3675aec7fe34cfd3bd3ad206a88a4843c7f60c"
151
151
  }