@microsoft/m365-spec-parser 0.2.1 → 0.2.2-alpha.288b4cdfa.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.
- package/dist/index.esm2017.js +52 -4
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm2017.mjs +103 -24
- package/dist/index.esm2017.mjs.map +1 -1
- package/dist/index.esm5.js +52 -4
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +103 -24
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/src/adaptiveCardGenerator.d.ts +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/interfaces.d.ts +6 -1
- package/dist/src/specParser.d.ts +1 -0
- package/dist/src/utils.d.ts +5 -5
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
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): [AdaptiveCard, string];
|
|
4
|
+
static generateAdaptiveCard(operationItem: OpenAPIV3.OperationObject, allowMultipleMediaType?: boolean): [AdaptiveCard, string];
|
|
5
5
|
static generateCardFromResponse(schema: OpenAPIV3.SchemaObject, name: string, parentArrayName?: string): Array<TextBlockElement | ImageElement | ArrayElement>;
|
|
6
6
|
static getResponseJsonPathFromSchema(schema: OpenAPIV3.SchemaObject): string;
|
|
7
7
|
static isImageUrlProperty(schema: OpenAPIV3.NonArraySchemaObject, name: string, parentArrayName: string): boolean;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -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, } from "./interfaces";
|
|
3
|
+
export { ValidationStatus, WarningType, ErrorType, WarningResult, ErrorResult, ListAPIResult, APIInfo, ValidateResult, ParseOptions, AdaptiveCard, ProjectType, InvalidAPIInfo, AuthType, } from "./interfaces";
|
|
4
4
|
export { ConstantString } from "./constants";
|
|
5
5
|
export { Utils } from "./utils";
|
|
6
6
|
export { AdaptiveCardGenerator } from "./adaptiveCardGenerator";
|
package/dist/src/interfaces.d.ts
CHANGED
|
@@ -76,10 +76,12 @@ export declare enum ErrorType {
|
|
|
76
76
|
RelativeServerUrlNotSupported = "relative-server-url-not-supported",
|
|
77
77
|
NoSupportedApi = "no-supported-api",
|
|
78
78
|
NoExtraAPICanBeAdded = "no-extra-api-can-be-added",
|
|
79
|
+
AddedAPINotInOriginalSpec = "added-api-not-in-original-spec",
|
|
79
80
|
ResolveServerUrlFailed = "resolve-server-url-failed",
|
|
80
81
|
SwaggerNotSupported = "swagger-not-supported",
|
|
81
82
|
MultipleAuthNotSupported = "multiple-auth-not-supported",
|
|
82
83
|
SpecVersionNotSupported = "spec-version-not-supported",
|
|
84
|
+
CircularReferenceNotSupported = "circular-reference-not-supported",
|
|
83
85
|
ListFailed = "list-failed",
|
|
84
86
|
listSupportedAPIInfoFailed = "list-supported-api-info-failed",
|
|
85
87
|
FilterSpecFailed = "filter-spec-failed",
|
|
@@ -257,8 +259,11 @@ export interface ListAPIResult {
|
|
|
257
259
|
validAPICount: number;
|
|
258
260
|
APIs: ListAPIInfo[];
|
|
259
261
|
}
|
|
262
|
+
export declare type AuthType = OpenAPIV3.SecuritySchemeObject | {
|
|
263
|
+
type: "multipleAuth";
|
|
264
|
+
};
|
|
260
265
|
export interface AuthInfo {
|
|
261
|
-
authScheme:
|
|
266
|
+
authScheme: AuthType;
|
|
262
267
|
name: string;
|
|
263
268
|
}
|
|
264
269
|
export interface InvalidAPIInfo {
|
package/dist/src/specParser.d.ts
CHANGED
package/dist/src/utils.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { OpenAPIV3 } from "openapi-types";
|
|
2
|
-
import { AuthInfo, 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
6
|
static containMultipleMediaTypes(bodyObject: OpenAPIV3.RequestBodyObject | OpenAPIV3.ResponseObject): boolean;
|
|
7
|
-
static isBearerTokenAuth(authScheme:
|
|
8
|
-
static isAPIKeyAuth(authScheme:
|
|
9
|
-
static isOAuthWithAuthCodeFlow(authScheme:
|
|
7
|
+
static isBearerTokenAuth(authScheme: AuthType): boolean;
|
|
8
|
+
static isAPIKeyAuth(authScheme: AuthType): boolean;
|
|
9
|
+
static isOAuthWithAuthCodeFlow(authScheme: AuthType): boolean;
|
|
10
10
|
static getAuthArray(securities: OpenAPIV3.SecurityRequirementObject[] | undefined, spec: OpenAPIV3.Document): AuthInfo[][];
|
|
11
11
|
static getAuthInfo(spec: OpenAPIV3.Document): AuthInfo | undefined;
|
|
12
12
|
static updateFirstLetter(str: string): string;
|
|
13
|
-
static getResponseJson(operationObject: OpenAPIV3.OperationObject | undefined): {
|
|
13
|
+
static getResponseJson(operationObject: OpenAPIV3.OperationObject | undefined, allowMultipleMediaType?: boolean): {
|
|
14
14
|
json: OpenAPIV3.MediaTypeObject;
|
|
15
15
|
multipleMediaType: boolean;
|
|
16
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/m365-spec-parser",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2-alpha.288b4cdfa.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.
|
|
42
|
+
"@microsoft/teams-manifest": "0.1.6-alpha.288b4cdfa.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": "
|
|
150
|
+
"gitHead": "042c3d07092028ca3d557bb89143593cb9d1be02"
|
|
151
151
|
}
|