@microsoft/m365-spec-parser 0.1.1-alpha.78701ec6a.0 → 0.1.1-alpha.87f45d762.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.
@@ -13,7 +13,9 @@ export declare class ConstantString {
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
15
  static readonly SwaggerNotSupported = "Swagger 2.0 is not supported. Please convert to OpenAPI 3.0 manually before proceeding.";
16
- static readonly MultipleAPIKeyNotSupported = "Multiple API keys are not supported. Please make sure that all selected APIs use the same API key.";
16
+ static readonly SpecVersionNotSupported = "Unsupported OpenAPI version %s. Please use version 3.0.x.";
17
+ static readonly MultipleAuthNotSupported = "Multiple authentication methods are unsupported. Ensure all selected APIs use identical authentication.";
18
+ static readonly UnsupportedSchema = "Unsupported schema in %s %s: %s";
17
19
  static readonly WrappedCardVersion = "devPreview";
18
20
  static readonly WrappedCardSchema = "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.ResponseRenderingTemplate.schema.json";
19
21
  static readonly WrappedCardResponseLayout = "list";
@@ -25,6 +27,7 @@ export declare class ConstantString {
25
27
  static readonly TextBlockType = "TextBlock";
26
28
  static readonly ContainerType = "Container";
27
29
  static readonly RegistrationIdPostfix = "REGISTRATION_ID";
30
+ static readonly OAuthRegistrationIdPostFix = "OAUTH_REGISTRATION_ID";
28
31
  static readonly ResponseCodeFor20X: string[];
29
32
  static readonly AllOperationMethods: string[];
30
33
  static readonly WellknownResultNames: string[];
@@ -37,4 +40,6 @@ export declare class ConstantString {
37
40
  static readonly ParameterDescriptionMaxLens = 128;
38
41
  static readonly CommandTitleMaxLens = 32;
39
42
  static readonly ParameterTitleMaxLens = 32;
43
+ static readonly SMERequiredParamsMaxNum = 5;
44
+ static readonly DefaultPluginId = "plugin_1";
40
45
  }
@@ -1,6 +1,7 @@
1
1
  export { SpecParser } from "./specParser.browser";
2
2
  export { SpecParserError } from "./specParserError";
3
3
  export { ValidationStatus, WarningType, ErrorType, ListAPIResult } from "./interfaces";
4
- export type { ErrorResult, APIInfo, ValidateResult, WarningResult, ParseOptions, } from "./interfaces";
4
+ export type { ErrorResult, APIInfo, ValidateResult, WarningResult, ParseOptions, AdaptiveCard, ProjectType, } from "./interfaces";
5
5
  export { ConstantString } from "./constants";
6
6
  export { Utils } from "./utils";
7
+ export { AdaptiveCardGenerator } from "./adaptiveCardGenerator";
@@ -1,5 +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, } from "./interfaces";
3
+ export { ValidationStatus, WarningType, ErrorType, WarningResult, ErrorResult, ListAPIResult, APIInfo, ValidateResult, ParseOptions, AdaptiveCard, ProjectType, InvalidAPIInfo, } from "./interfaces";
4
4
  export { ConstantString } from "./constants";
5
5
  export { Utils } from "./utils";
6
+ export { AdaptiveCardGenerator } from "./adaptiveCardGenerator";
@@ -1,3 +1,4 @@
1
+ import { IParameter } from "@microsoft/teams-manifest";
1
2
  import { OpenAPIV3 } from "openapi-types";
2
3
  /**
3
4
  * An interface that represents the result of validating an OpenAPI specification file.
@@ -16,6 +17,16 @@ export interface ValidateResult {
16
17
  */
17
18
  errors: ErrorResult[];
18
19
  }
20
+ export interface SpecValidationResult {
21
+ /**
22
+ * An array of warning results generated during validation.
23
+ */
24
+ warnings: WarningResult[];
25
+ /**
26
+ * An array of error results generated during validation.
27
+ */
28
+ errors: ErrorResult[];
29
+ }
19
30
  /**
20
31
  * An interface that represents a warning result generated during validation.
21
32
  */
@@ -67,7 +78,8 @@ export declare enum ErrorType {
67
78
  NoExtraAPICanBeAdded = "no-extra-api-can-be-added",
68
79
  ResolveServerUrlFailed = "resolve-server-url-failed",
69
80
  SwaggerNotSupported = "swagger-not-supported",
70
- MultipleAPIKeyNotSupported = "multiple-api-key-not-supported",
81
+ MultipleAuthNotSupported = "multiple-auth-not-supported",
82
+ SpecVersionNotSupported = "spec-version-not-supported",
71
83
  ListFailed = "list-failed",
72
84
  listSupportedAPIInfoFailed = "list-supported-api-info-failed",
73
85
  FilterSpecFailed = "filter-spec-failed",
@@ -75,6 +87,22 @@ export declare enum ErrorType {
75
87
  GenerateAdaptiveCardFailed = "generate-adaptive-card-failed",
76
88
  GenerateFailed = "generate-failed",
77
89
  ValidateFailed = "validate-failed",
90
+ GetSpecFailed = "get-spec-failed",
91
+ AuthTypeIsNotSupported = "auth-type-is-not-supported",
92
+ MissingOperationId = "missing-operation-id",
93
+ PostBodyContainMultipleMediaTypes = "post-body-contain-multiple-media-types",
94
+ ResponseContainMultipleMediaTypes = "response-contain-multiple-media-types",
95
+ ResponseJsonIsEmpty = "response-json-is-empty",
96
+ PostBodySchemaIsNotJson = "post-body-schema-is-not-json",
97
+ PostBodyContainsRequiredUnsupportedSchema = "post-body-contains-required-unsupported-schema",
98
+ ParamsContainRequiredUnsupportedSchema = "params-contain-required-unsupported-schema",
99
+ ParamsContainsNestedObject = "params-contains-nested-object",
100
+ RequestBodyContainsNestedObject = "request-body-contains-nested-object",
101
+ ExceededRequiredParamsLimit = "exceeded-required-params-limit",
102
+ NoParameter = "no-parameter",
103
+ NoAPIInfo = "no-api-info",
104
+ MethodNotAllowed = "method-not-allowed",
105
+ UrlPathNotExist = "url-path-not-exist",
78
106
  Cancelled = "cancelled",
79
107
  Unknown = "unknown"
80
108
  }
@@ -134,46 +162,90 @@ export interface WrappedAdaptiveCard {
134
162
  responseCardTemplate: AdaptiveCard;
135
163
  previewCardTemplate: PreviewCardTemplate;
136
164
  }
137
- export interface ChoicesItem {
138
- title: string;
139
- value: string;
140
- }
141
- export interface Parameter {
142
- name: string;
143
- title: string;
144
- description: string;
145
- inputType?: "text" | "textarea" | "number" | "date" | "time" | "toggle" | "choiceset";
146
- value?: string;
147
- choices?: ChoicesItem[];
148
- }
149
165
  export interface CheckParamResult {
150
166
  requiredNum: number;
151
167
  optionalNum: number;
152
168
  isValid: boolean;
169
+ reason: ErrorType[];
153
170
  }
154
171
  export interface ParseOptions {
172
+ /**
173
+ * If true, the parser will not throw an error if an ID is missing the spec file.
174
+ */
155
175
  allowMissingId?: boolean;
176
+ /**
177
+ * If true, the parser will allow parsing of Swagger specifications.
178
+ */
156
179
  allowSwagger?: boolean;
180
+ /**
181
+ * If true, the parser will allow API Key authentication in the spec file.
182
+ */
157
183
  allowAPIKeyAuth?: boolean;
184
+ /**
185
+ * If true, the parser will allow Bearer Token authentication in the spec file.
186
+ */
187
+ allowBearerTokenAuth?: boolean;
188
+ /**
189
+ * If true, the parser will allow multiple parameters in the spec file. Teams AI project would ignore this parameters and always true
190
+ */
158
191
  allowMultipleParameters?: boolean;
192
+ /**
193
+ * If true, the parser will allow OAuth2 authentication in the spec file. Currently only support OAuth2 with auth code flow.
194
+ */
159
195
  allowOauth2?: boolean;
196
+ /**
197
+ * An array of HTTP methods that the parser will allow in the spec file.
198
+ */
199
+ allowMethods?: string[];
200
+ /**
201
+ * The type of project that the parser is being used for.
202
+ * Project can be SME/Copilot/TeamsAi
203
+ */
204
+ projectType?: ProjectType;
205
+ }
206
+ export declare enum ProjectType {
207
+ Copilot = 0,
208
+ SME = 1,
209
+ TeamsAi = 2
160
210
  }
161
211
  export interface APIInfo {
162
212
  method: string;
163
213
  path: string;
164
214
  title: string;
165
215
  id: string;
166
- parameters: Parameter[];
216
+ parameters: IParameter[];
167
217
  description: string;
168
218
  warning?: WarningResult;
169
219
  }
170
- export interface ListAPIResult {
220
+ export interface ListAPIInfo {
171
221
  api: string;
172
222
  server: string;
173
223
  operationId: string;
174
- auth?: OpenAPIV3.SecuritySchemeObject;
224
+ isValid: boolean;
225
+ reason: ErrorType[];
226
+ auth?: AuthInfo;
227
+ }
228
+ export interface APIMap {
229
+ [key: string]: {
230
+ operation: OpenAPIV3.OperationObject;
231
+ isValid: boolean;
232
+ reason: ErrorType[];
233
+ };
234
+ }
235
+ export interface APIValidationResult {
236
+ isValid: boolean;
237
+ reason: ErrorType[];
238
+ }
239
+ export interface ListAPIResult {
240
+ allAPICount: number;
241
+ validAPICount: number;
242
+ APIs: ListAPIInfo[];
175
243
  }
176
- export interface AuthSchema {
177
- authSchema: OpenAPIV3.SecuritySchemeObject;
244
+ export interface AuthInfo {
245
+ authScheme: OpenAPIV3.SecuritySchemeObject;
178
246
  name: string;
179
247
  }
248
+ export interface InvalidAPIInfo {
249
+ api: string;
250
+ reason: ErrorType[];
251
+ }
@@ -1,8 +1,13 @@
1
1
  import { OpenAPIV3 } from "openapi-types";
2
- import { WarningResult } from "./interfaces";
3
- import { IMessagingExtensionCommand, TeamsAppManifest } from "@microsoft/teams-manifest";
2
+ import { AuthInfo, ParseOptions, WarningResult } from "./interfaces";
3
+ import { IMessagingExtensionCommand, TeamsAppManifest, PluginManifestSchema, FunctionParameter } from "@microsoft/teams-manifest";
4
4
  export declare class ManifestUpdater {
5
- static updateManifest(manifestPath: string, outputSpecPath: string, adaptiveCardFolder: string, spec: OpenAPIV3.Document, allowMultipleParameters: boolean, auth?: OpenAPIV3.SecuritySchemeObject): Promise<[TeamsAppManifest, WarningResult[]]>;
6
- static generateCommands(spec: OpenAPIV3.Document, adaptiveCardFolder: string, manifestPath: string, allowMultipleParameters: boolean): Promise<[IMessagingExtensionCommand[], WarningResult[]]>;
5
+ static updateManifestWithAiPlugin(manifestPath: string, outputSpecPath: string, apiPluginFilePath: string, spec: OpenAPIV3.Document, options: ParseOptions): Promise<[TeamsAppManifest, PluginManifestSchema]>;
6
+ static updateManifestDescription(manifest: TeamsAppManifest, spec: OpenAPIV3.Document): void;
7
+ static mapOpenAPISchemaToFuncParam(schema: OpenAPIV3.SchemaObject, method: string, pathUrl: string): FunctionParameter;
8
+ static generatePluginManifestSchema(spec: OpenAPIV3.Document, specRelativePath: string, apiPluginFilePath: string, appName: string, options: ParseOptions): Promise<PluginManifestSchema>;
9
+ static updateManifest(manifestPath: string, outputSpecPath: string, spec: OpenAPIV3.Document, options: ParseOptions, adaptiveCardFolder?: string, authInfo?: AuthInfo): Promise<[TeamsAppManifest, WarningResult[]]>;
10
+ static generateCommands(spec: OpenAPIV3.Document, manifestPath: string, options: ParseOptions, adaptiveCardFolder?: string): Promise<[IMessagingExtensionCommand[], WarningResult[]]>;
7
11
  static getRelativePath(from: string, to: string): string;
12
+ static removeEnvs(str: string): string;
8
13
  }
@@ -1,4 +1,5 @@
1
1
  import { OpenAPIV3 } from "openapi-types";
2
+ import { ParseOptions } from "./interfaces";
2
3
  export declare class SpecFilter {
3
- static specFilter(filter: string[], unResolveSpec: OpenAPIV3.Document, resolvedSpec: OpenAPIV3.Document, allowMissingId: boolean, allowAPIKeyAuth: boolean, allowMultipleParameters: boolean, allowOauth2: boolean): OpenAPIV3.Document;
4
+ static specFilter(filter: string[], unResolveSpec: OpenAPIV3.Document, resolvedSpec: OpenAPIV3.Document, options: ParseOptions): OpenAPIV3.Document;
4
5
  }
@@ -10,6 +10,7 @@ export declare class SpecParser {
10
10
  readonly options: Required<ParseOptions>;
11
11
  private apiMap;
12
12
  private spec;
13
+ private validator;
13
14
  private unResolveSpec;
14
15
  private isSwaggerFile;
15
16
  private defaultOptions;
@@ -32,14 +33,29 @@ export declare class SpecParser {
32
33
  * according to copilot plugin spec, only list get and post method without auth
33
34
  */
34
35
  list(): Promise<ListAPIResult[]>;
36
+ /**
37
+ * Generate specs according to the filters.
38
+ * @param filter An array of strings that represent the filters to apply when generating the artifacts. If filter is empty, it would process nothing.
39
+ */
40
+ getFilteredSpecs(filter: string[], signal?: AbortSignal): Promise<[OpenAPIV3.Document, OpenAPIV3.Document]>;
41
+ /**
42
+ * Generates and update artifacts from the OpenAPI specification file. Generate Adaptive Cards, update Teams app manifest, and generate a new OpenAPI specification file.
43
+ * @param manifestPath A file path of the Teams app manifest file to update.
44
+ * @param filter An array of strings that represent the filters to apply when generating the artifacts. If filter is empty, it would process nothing.
45
+ * @param outputSpecPath File path of the new OpenAPI specification file to generate. If not specified or empty, no spec file will be generated.
46
+ * @param pluginFilePath File path of the api plugin file to generate.
47
+ */
48
+ generateForCopilot(manifestPath: string, filter: string[], outputSpecPath: string, pluginFilePath: string, signal?: AbortSignal): Promise<GenerateResult>;
35
49
  /**
36
50
  * Generates and update artifacts from the OpenAPI specification file. Generate Adaptive Cards, update Teams app manifest, and generate a new OpenAPI specification file.
37
51
  * @param manifestPath A file path of the Teams app manifest file to update.
38
52
  * @param filter An array of strings that represent the filters to apply when generating the artifacts. If filter is empty, it would process nothing.
39
53
  * @param outputSpecPath File path of the new OpenAPI specification file to generate. If not specified or empty, no spec file will be generated.
40
54
  * @param adaptiveCardFolder Folder path where the Adaptive Card files will be generated. If not specified or empty, Adaptive Card files will not be generated.
55
+ * @param isMe Boolean that indicates whether the project is an Messaging Extension. For Messaging Extension, composeExtensions will be added in Teams app manifest.
41
56
  */
42
- generate(manifestPath: string, filter: string[], outputSpecPath: string, adaptiveCardFolder: string, signal?: AbortSignal): Promise<GenerateResult>;
57
+ generate(manifestPath: string, filter: string[], outputSpecPath: string, adaptiveCardFolder?: string, signal?: AbortSignal): Promise<GenerateResult>;
43
58
  private loadSpec;
44
- private getAllSupportedAPIs;
59
+ private getAPIs;
60
+ private getValidator;
45
61
  }
@@ -9,6 +9,7 @@ export declare class SpecParser {
9
9
  readonly parser: SwaggerParser;
10
10
  readonly options: Required<ParseOptions>;
11
11
  private apiMap;
12
+ private validator;
12
13
  private spec;
13
14
  private unResolveSpec;
14
15
  private isSwaggerFile;
@@ -31,7 +32,20 @@ export declare class SpecParser {
31
32
  * @returns A string array that represents the HTTP method and path of each operation, such as ['GET /pets/{petId}', 'GET /user/{userId}']
32
33
  * according to copilot plugin spec, only list get and post method without auth
33
34
  */
34
- list(): Promise<ListAPIResult[]>;
35
+ list(): Promise<ListAPIResult>;
36
+ /**
37
+ * Generate specs according to the filters.
38
+ * @param filter An array of strings that represent the filters to apply when generating the artifacts. If filter is empty, it would process nothing.
39
+ */
40
+ getFilteredSpecs(filter: string[], signal?: AbortSignal): Promise<[OpenAPIV3.Document, OpenAPIV3.Document]>;
41
+ /**
42
+ * Generates and update artifacts from the OpenAPI specification file. Generate Adaptive Cards, update Teams app manifest, and generate a new OpenAPI specification file.
43
+ * @param manifestPath A file path of the Teams app manifest file to update.
44
+ * @param filter An array of strings that represent the filters to apply when generating the artifacts. If filter is empty, it would process nothing.
45
+ * @param outputSpecPath File path of the new OpenAPI specification file to generate. If not specified or empty, no spec file will be generated.
46
+ * @param pluginFilePath File path of the api plugin file to generate.
47
+ */
48
+ generateForCopilot(manifestPath: string, filter: string[], outputSpecPath: string, pluginFilePath: string, signal?: AbortSignal): Promise<GenerateResult>;
35
49
  /**
36
50
  * Generates and update artifacts from the OpenAPI specification file. Generate Adaptive Cards, update Teams app manifest, and generate a new OpenAPI specification file.
37
51
  * @param manifestPath A file path of the Teams app manifest file to update.
@@ -39,7 +53,8 @@ export declare class SpecParser {
39
53
  * @param outputSpecPath File path of the new OpenAPI specification file to generate. If not specified or empty, no spec file will be generated.
40
54
  * @param adaptiveCardFolder Folder path where the Adaptive Card files will be generated. If not specified or empty, Adaptive Card files will not be generated.
41
55
  */
42
- generate(manifestPath: string, filter: string[], outputSpecPath: string, adaptiveCardFolder: string, signal?: AbortSignal): Promise<GenerateResult>;
56
+ generate(manifestPath: string, filter: string[], outputSpecPath: string, adaptiveCardFolder?: string, signal?: AbortSignal): Promise<GenerateResult>;
43
57
  private loadSpec;
44
- private getAllSupportedAPIs;
58
+ private getAPIs;
59
+ private getValidator;
45
60
  }
@@ -1,44 +1,28 @@
1
1
  import { OpenAPIV3 } from "openapi-types";
2
- import SwaggerParser from "@apidevtools/swagger-parser";
3
- import { AuthSchema, CheckParamResult, ErrorResult, Parameter, ValidateResult, WarningResult } from "./interfaces";
4
- import { IMessagingExtensionCommand } from "@microsoft/teams-manifest";
2
+ import { AuthInfo, ErrorResult, ParseOptions } from "./interfaces";
3
+ import { IMessagingExtensionCommand, IParameter } from "@microsoft/teams-manifest";
5
4
  export declare class Utils {
6
- static checkParameters(paramObject: OpenAPIV3.ParameterObject[]): CheckParamResult;
7
- static checkPostBody(schema: OpenAPIV3.SchemaObject, isRequired?: boolean): CheckParamResult;
8
- /**
9
- * Checks if the given API is supported.
10
- * @param {string} method - The HTTP method of the API.
11
- * @param {string} path - The path of the API.
12
- * @param {OpenAPIV3.Document} spec - The OpenAPI specification document.
13
- * @returns {boolean} - Returns true if the API is supported, false otherwise.
14
- * @description The following APIs are supported:
15
- * 1. only support Get/Post operation without auth property
16
- * 2. parameter inside query or path only support string, number, boolean and integer
17
- * 3. parameter inside post body only support string, number, boolean, integer and object
18
- * 4. request body + required parameters <= 1
19
- * 5. response body should be “application/json” and not empty, and response code should be 20X
20
- * 6. only support request body with “application/json” content type
21
- */
22
- static isSupportedApi(method: string, path: string, spec: OpenAPIV3.Document, allowMissingId: boolean, allowAPIKeyAuth: boolean, allowMultipleParameters: boolean, allowOauth2: boolean): boolean;
23
- static isSupportedAuth(authSchemaArray: AuthSchema[][], allowAPIKeyAuth: boolean, allowOauth2: boolean): boolean;
24
- static isAPIKeyAuth(authSchema: OpenAPIV3.SecuritySchemeObject): boolean;
25
- static isBearerTokenAuth(authSchema: OpenAPIV3.SecuritySchemeObject): boolean;
26
- static getAuthArray(securities: OpenAPIV3.SecurityRequirementObject[] | undefined, spec: OpenAPIV3.Document): AuthSchema[][];
5
+ static hasNestedObjectInSchema(schema: OpenAPIV3.SchemaObject): boolean;
6
+ static containMultipleMediaTypes(bodyObject: OpenAPIV3.RequestBodyObject | OpenAPIV3.ResponseObject): boolean;
7
+ static isBearerTokenAuth(authScheme: OpenAPIV3.SecuritySchemeObject): boolean;
8
+ static isAPIKeyAuth(authScheme: OpenAPIV3.SecuritySchemeObject): boolean;
9
+ static isOAuthWithAuthCodeFlow(authScheme: OpenAPIV3.SecuritySchemeObject): boolean;
10
+ static getAuthArray(securities: OpenAPIV3.SecurityRequirementObject[] | undefined, spec: OpenAPIV3.Document): AuthInfo[][];
27
11
  static updateFirstLetter(str: string): string;
28
- static getResponseJson(operationObject: OpenAPIV3.OperationObject | undefined): OpenAPIV3.MediaTypeObject;
12
+ static getResponseJson(operationObject: OpenAPIV3.OperationObject | undefined): {
13
+ json: OpenAPIV3.MediaTypeObject;
14
+ multipleMediaType: boolean;
15
+ };
29
16
  static convertPathToCamelCase(path: string): string;
30
17
  static getUrlProtocol(urlString: string): string | undefined;
31
- static resolveServerUrl(url: string): string;
18
+ static resolveEnv(str: string): string;
32
19
  static checkServerUrl(servers: OpenAPIV3.ServerObject[]): ErrorResult[];
33
- static validateServer(spec: OpenAPIV3.Document, allowMissingId: boolean, allowAPIKeyAuth: boolean, allowMultipleParameters: boolean, allowOauth2: boolean): ErrorResult[];
20
+ static validateServer(spec: OpenAPIV3.Document, options: ParseOptions): ErrorResult[];
34
21
  static isWellKnownName(name: string, wellknownNameList: string[]): boolean;
35
- static generateParametersFromSchema(schema: OpenAPIV3.SchemaObject, name: string, allowMultipleParameters: boolean, isRequired?: boolean): [Parameter[], Parameter[]];
36
- static updateParameterWithInputType(schema: OpenAPIV3.SchemaObject, param: Parameter): void;
37
- static parseApiInfo(operationItem: OpenAPIV3.OperationObject, allowMultipleParameters: boolean): [IMessagingExtensionCommand, WarningResult | undefined];
38
- static listSupportedAPIs(spec: OpenAPIV3.Document, allowMissingId: boolean, allowAPIKeyAuth: boolean, allowMultipleParameters: boolean, allowOauth2: boolean): {
39
- [key: string]: OpenAPIV3.OperationObject;
40
- };
41
- static validateSpec(spec: OpenAPIV3.Document, parser: SwaggerParser, isSwaggerFile: boolean, allowMissingId: boolean, allowAPIKeyAuth: boolean, allowMultipleParameters: boolean, allowOauth2: boolean): ValidateResult;
22
+ static generateParametersFromSchema(schema: OpenAPIV3.SchemaObject, name: string, allowMultipleParameters: boolean, isRequired?: boolean): [IParameter[], IParameter[]];
23
+ static updateParameterWithInputType(schema: OpenAPIV3.SchemaObject, param: IParameter): void;
24
+ static parseApiInfo(operationItem: OpenAPIV3.OperationObject, options: ParseOptions): IMessagingExtensionCommand;
42
25
  static format(str: string, ...args: string[]): string;
43
26
  static getSafeRegistrationIdEnvName(authName: string): string;
27
+ static getServerObject(spec: OpenAPIV3.Document, method: string, path: string): OpenAPIV3.ServerObject | undefined;
44
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/m365-spec-parser",
3
- "version": "0.1.1-alpha.78701ec6a.0",
3
+ "version": "0.1.1-alpha.87f45d762.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",
@@ -9,7 +9,7 @@
9
9
  "types": "dist/src/index.d.ts",
10
10
  "scripts": {
11
11
  "build": "rollup -c",
12
- "test:unit:node": "nyc --no-clean -- mocha \"test/*.test.ts\" -r config/mocha.env.ts --config config/.mocharc.json",
12
+ "test:unit:node": "nyc --no-clean -- mocha -r config/mocha.env.ts --config config/.mocharc.json",
13
13
  "test:unit:browser": "karma start karma.conf.cjs --single-run --unit",
14
14
  "test:unit": "npm run test:unit:node && npm run test:unit:browser ",
15
15
  "lint:staged": "lint-staged",
@@ -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.4-alpha.78701ec6a.0",
42
+ "@microsoft/teams-manifest": "0.1.4-alpha.87f45d762.0",
43
43
  "fs-extra": "^11.2.0",
44
44
  "js-yaml": "^4.1.0",
45
45
  "openapi-types": "^7.2.3",
@@ -148,5 +148,5 @@
148
148
  "npx eslint --cache --fix --quiet"
149
149
  ]
150
150
  },
151
- "gitHead": "98b6606ad0870ecd16aafcdb74b20f71ec6d49ec"
151
+ "gitHead": "b33ed9f3cebaa48a501c531cb269403d16b67f7e"
152
152
  }