@microsoft/m365-spec-parser 0.2.3-alpha.09af212fe.0 → 0.2.3-alpha.1e0763330.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 +163 -41
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm2017.mjs +197 -74
- package/dist/index.esm2017.mjs.map +1 -1
- package/dist/index.esm5.js +163 -41
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +197 -74
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/src/adaptiveCardGenerator.d.ts +2 -2
- package/dist/src/constants.d.ts +1 -0
- package/dist/src/interfaces.d.ts +1 -2
- package/dist/src/jsonDataGenerator.d.ts +6 -0
- package/dist/src/utils.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OpenAPIV3 } from "openapi-types";
|
|
2
|
-
import { AdaptiveCard, ArrayElement, ImageElement, TextBlockElement } from "./interfaces";
|
|
2
|
+
import { AdaptiveCard, ArrayElement, ImageElement, TextBlockElement, WarningResult } from "./interfaces";
|
|
3
3
|
export declare class AdaptiveCardGenerator {
|
|
4
|
-
static generateAdaptiveCard(operationItem: OpenAPIV3.OperationObject, allowMultipleMediaType?: boolean, maxElementCount?: number): [AdaptiveCard, string];
|
|
4
|
+
static generateAdaptiveCard(operationItem: OpenAPIV3.OperationObject, allowMultipleMediaType?: boolean, maxElementCount?: number): [AdaptiveCard, string, any, WarningResult[]];
|
|
5
5
|
static generateCardFromResponse(schema: OpenAPIV3.SchemaObject, name: string, parentArrayName?: string, maxElementCount?: number, counter?: {
|
|
6
6
|
count: number;
|
|
7
7
|
}): Array<TextBlockElement | ImageElement | ArrayElement>;
|
package/dist/src/constants.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export declare class ConstantString {
|
|
|
18
18
|
static readonly OperationIdContainsSpecialCharacters = "Operation id '%s' in OpenAPI description document contained special characters and was renamed to '%s'.";
|
|
19
19
|
static readonly UnsupportedSchema = "Unsupported schema in %s %s: %s";
|
|
20
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.";
|
|
21
|
+
static readonly GenerateJsonDataFailed = "Failed to generate JSON data for api: %s due to %s.";
|
|
21
22
|
static readonly WrappedCardVersion = "devPreview";
|
|
22
23
|
static readonly WrappedCardSchema = "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.ResponseRenderingTemplate.schema.json";
|
|
23
24
|
static readonly WrappedCardResponseLayout = "list";
|
package/dist/src/interfaces.d.ts
CHANGED
|
@@ -99,8 +99,6 @@ export declare enum ErrorType {
|
|
|
99
99
|
PostBodySchemaIsNotJson = "post-body-schema-is-not-json",
|
|
100
100
|
PostBodyContainsRequiredUnsupportedSchema = "post-body-contains-required-unsupported-schema",
|
|
101
101
|
ParamsContainRequiredUnsupportedSchema = "params-contain-required-unsupported-schema",
|
|
102
|
-
ParamsContainsNestedObject = "params-contains-nested-object",
|
|
103
|
-
RequestBodyContainsNestedObject = "request-body-contains-nested-object",
|
|
104
102
|
ExceededRequiredParamsLimit = "exceeded-required-params-limit",
|
|
105
103
|
NoParameter = "no-parameter",
|
|
106
104
|
NoAPIInfo = "no-api-info",
|
|
@@ -119,6 +117,7 @@ export declare enum WarningType {
|
|
|
119
117
|
ConvertSwaggerToOpenAPI = "convert-swagger-to-openapi",
|
|
120
118
|
FuncDescriptionTooLong = "function-description-too-long",
|
|
121
119
|
OperationIdContainsSpecialCharacters = "operationid-contains-special-characters",
|
|
120
|
+
GenerateJsonDataFailed = "generate-json-data-failed",
|
|
122
121
|
Unknown = "unknown"
|
|
123
122
|
}
|
|
124
123
|
/**
|
package/dist/src/utils.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { OpenAPIV3 } from "openapi-types";
|
|
|
2
2
|
import { AuthInfo, AuthType, ErrorResult, ParseOptions } from "./interfaces";
|
|
3
3
|
import { IMessagingExtensionCommand, IParameter } from "@microsoft/teams-manifest";
|
|
4
4
|
export declare class Utils {
|
|
5
|
-
static hasNestedObjectInSchema(schema: OpenAPIV3.SchemaObject): boolean;
|
|
6
5
|
static isObjectSchema(schema: OpenAPIV3.SchemaObject): boolean;
|
|
7
6
|
static containMultipleMediaTypes(bodyObject: OpenAPIV3.RequestBodyObject | OpenAPIV3.ResponseObject): boolean;
|
|
8
7
|
static isBearerTokenAuth(authScheme: AuthType): boolean;
|
|
@@ -15,6 +14,7 @@ export declare class Utils {
|
|
|
15
14
|
json: OpenAPIV3.MediaTypeObject;
|
|
16
15
|
multipleMediaType: boolean;
|
|
17
16
|
};
|
|
17
|
+
static getJsonContentType(responseObject: OpenAPIV3.ResponseObject | OpenAPIV3.RequestBodyObject): OpenAPIV3.MediaTypeObject;
|
|
18
18
|
static convertPathToCamelCase(path: string): string;
|
|
19
19
|
static getUrlProtocol(urlString: string): string | undefined;
|
|
20
20
|
static resolveEnv(str: string): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/m365-spec-parser",
|
|
3
|
-
"version": "0.2.3-alpha.
|
|
3
|
+
"version": "0.2.3-alpha.1e0763330.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.7-alpha.
|
|
42
|
+
"@microsoft/teams-manifest": "0.1.7-alpha.1e0763330.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": "c57937eca8661c95d0cddb195d8c4ed724592534"
|
|
151
151
|
}
|