@microsoft/m365-spec-parser 0.1.1-alpha.cd2ba87f2.0 → 0.1.1-alpha.fccd8293a.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 +170 -2
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm2017.mjs +33 -13
- package/dist/index.esm2017.mjs.map +1 -1
- package/dist/index.esm5.js +172 -2
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +35 -12
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/src/index.browser.d.ts +2 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/interfaces.d.ts +1 -0
- package/dist/src/manifestUpdater.d.ts +1 -1
- package/dist/src/specParser.browser.d.ts +7 -1
- package/dist/src/specParser.d.ts +7 -1
- package/package.json +3 -3
package/dist/src/index.d.ts
CHANGED
|
@@ -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, } from "./interfaces";
|
|
4
4
|
export { ConstantString } from "./constants";
|
|
5
5
|
export { Utils } from "./utils";
|
|
6
|
+
export { AdaptiveCardGenerator } from "./adaptiveCardGenerator";
|
package/dist/src/interfaces.d.ts
CHANGED
|
@@ -75,6 +75,7 @@ export declare enum ErrorType {
|
|
|
75
75
|
GenerateAdaptiveCardFailed = "generate-adaptive-card-failed",
|
|
76
76
|
GenerateFailed = "generate-failed",
|
|
77
77
|
ValidateFailed = "validate-failed",
|
|
78
|
+
GetSpecFailed = "get-spec-failed",
|
|
78
79
|
Cancelled = "cancelled",
|
|
79
80
|
Unknown = "unknown"
|
|
80
81
|
}
|
|
@@ -2,7 +2,7 @@ import { OpenAPIV3 } from "openapi-types";
|
|
|
2
2
|
import { WarningResult } from "./interfaces";
|
|
3
3
|
import { IMessagingExtensionCommand, TeamsAppManifest } 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[]]>;
|
|
5
|
+
static updateManifest(manifestPath: string, outputSpecPath: string, adaptiveCardFolder: string, spec: OpenAPIV3.Document, allowMultipleParameters: boolean, auth?: OpenAPIV3.SecuritySchemeObject, isMe?: boolean): Promise<[TeamsAppManifest, WarningResult[]]>;
|
|
6
6
|
static generateCommands(spec: OpenAPIV3.Document, adaptiveCardFolder: string, manifestPath: string, allowMultipleParameters: boolean): Promise<[IMessagingExtensionCommand[], WarningResult[]]>;
|
|
7
7
|
static getRelativePath(from: string, to: string): string;
|
|
8
8
|
}
|
|
@@ -32,14 +32,20 @@ export declare class SpecParser {
|
|
|
32
32
|
* according to copilot plugin spec, only list get and post method without auth
|
|
33
33
|
*/
|
|
34
34
|
list(): Promise<ListAPIResult[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Generate specs according to the filters.
|
|
37
|
+
* @param filter An array of strings that represent the filters to apply when generating the artifacts. If filter is empty, it would process nothing.
|
|
38
|
+
*/
|
|
39
|
+
getFilteredSpecs(filter: string[], signal?: AbortSignal): Promise<[OpenAPIV3.Document, OpenAPIV3.Document]>;
|
|
35
40
|
/**
|
|
36
41
|
* Generates and update artifacts from the OpenAPI specification file. Generate Adaptive Cards, update Teams app manifest, and generate a new OpenAPI specification file.
|
|
37
42
|
* @param manifestPath A file path of the Teams app manifest file to update.
|
|
38
43
|
* @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
44
|
* @param outputSpecPath File path of the new OpenAPI specification file to generate. If not specified or empty, no spec file will be generated.
|
|
40
45
|
* @param adaptiveCardFolder Folder path where the Adaptive Card files will be generated. If not specified or empty, Adaptive Card files will not be generated.
|
|
46
|
+
* @param isMe Boolean that indicates whether the project is an Messaging Extension. For Messaging Extension, composeExtensions will be added in Teams app manifest.
|
|
41
47
|
*/
|
|
42
|
-
generate(manifestPath: string, filter: string[], outputSpecPath: string, adaptiveCardFolder: string, signal?: AbortSignal): Promise<GenerateResult>;
|
|
48
|
+
generate(manifestPath: string, filter: string[], outputSpecPath: string, adaptiveCardFolder: string, signal?: AbortSignal, isMe?: boolean): Promise<GenerateResult>;
|
|
43
49
|
private loadSpec;
|
|
44
50
|
private getAllSupportedAPIs;
|
|
45
51
|
}
|
package/dist/src/specParser.d.ts
CHANGED
|
@@ -32,14 +32,20 @@ export declare class SpecParser {
|
|
|
32
32
|
* according to copilot plugin spec, only list get and post method without auth
|
|
33
33
|
*/
|
|
34
34
|
list(): Promise<ListAPIResult[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Generate specs according to the filters.
|
|
37
|
+
* @param filter An array of strings that represent the filters to apply when generating the artifacts. If filter is empty, it would process nothing.
|
|
38
|
+
*/
|
|
39
|
+
getFilteredSpecs(filter: string[], signal?: AbortSignal): Promise<[OpenAPIV3.Document, OpenAPIV3.Document]>;
|
|
35
40
|
/**
|
|
36
41
|
* Generates and update artifacts from the OpenAPI specification file. Generate Adaptive Cards, update Teams app manifest, and generate a new OpenAPI specification file.
|
|
37
42
|
* @param manifestPath A file path of the Teams app manifest file to update.
|
|
38
43
|
* @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
44
|
* @param outputSpecPath File path of the new OpenAPI specification file to generate. If not specified or empty, no spec file will be generated.
|
|
40
45
|
* @param adaptiveCardFolder Folder path where the Adaptive Card files will be generated. If not specified or empty, Adaptive Card files will not be generated.
|
|
46
|
+
* @param isMe Boolean that indicates whether the project is an Messaging Extension. For Messaging Extension, composeExtensions will be added in Teams app manifest.
|
|
41
47
|
*/
|
|
42
|
-
generate(manifestPath: string, filter: string[], outputSpecPath: string, adaptiveCardFolder: string, signal?: AbortSignal): Promise<GenerateResult>;
|
|
48
|
+
generate(manifestPath: string, filter: string[], outputSpecPath: string, adaptiveCardFolder: string, signal?: AbortSignal, isMe?: boolean): Promise<GenerateResult>;
|
|
43
49
|
private loadSpec;
|
|
44
50
|
private getAllSupportedAPIs;
|
|
45
51
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/m365-spec-parser",
|
|
3
|
-
"version": "0.1.1-alpha.
|
|
3
|
+
"version": "0.1.1-alpha.fccd8293a.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.4-alpha.
|
|
42
|
+
"@microsoft/teams-manifest": "0.1.4-alpha.fccd8293a.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": "
|
|
151
|
+
"gitHead": "374a51e70e96453de68eb2f67f4a0378f96ece09"
|
|
152
152
|
}
|