@microsoft/m365-spec-parser 0.2.2-alpha.2c5119322.0 → 0.2.2-alpha.2f6f18b3b.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.map +1 -1
- package/dist/index.esm2017.mjs +29 -5
- package/dist/index.esm2017.mjs.map +1 -1
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +29 -5
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/src/interfaces.d.ts +5 -0
- package/dist/src/manifestUpdater.d.ts +3 -3
- package/dist/src/specParser.d.ts +1 -1
- package/package.json +3 -3
package/dist/src/interfaces.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export interface ValidateResult {
|
|
|
16
16
|
* An array of error results generated during validation.
|
|
17
17
|
*/
|
|
18
18
|
errors: ErrorResult[];
|
|
19
|
+
specHash?: string;
|
|
19
20
|
}
|
|
20
21
|
export interface SpecValidationResult {
|
|
21
22
|
/**
|
|
@@ -277,3 +278,7 @@ export interface InferredProperties {
|
|
|
277
278
|
subtitle?: string;
|
|
278
279
|
imageUrl?: string;
|
|
279
280
|
}
|
|
281
|
+
export interface ExistingPluginManifestInfo {
|
|
282
|
+
manifestPath: string;
|
|
283
|
+
specPath: string;
|
|
284
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { OpenAPIV3 } from "openapi-types";
|
|
2
|
-
import { AuthInfo, ParseOptions, WarningResult } from "./interfaces";
|
|
2
|
+
import { AuthInfo, ExistingPluginManifestInfo, 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): Promise<[TeamsAppManifest, PluginManifestSchema, WarningResult[]]>;
|
|
5
|
+
static updateManifestWithAiPlugin(manifestPath: string, outputSpecPath: string, apiPluginFilePath: string, spec: OpenAPIV3.Document, options: ParseOptions, authInfo?: AuthInfo, 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): Promise<[PluginManifestSchema, WarningResult[]]>;
|
|
8
|
+
static generatePluginManifestSchema(spec: OpenAPIV3.Document, specRelativePath: string, apiPluginFilePath: string, appName: string, authInfo: AuthInfo | undefined, 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;
|
package/dist/src/specParser.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export declare class SpecParser {
|
|
|
44
44
|
* @param outputSpecPath File path of the new OpenAPI specification file to generate. If not specified or empty, no spec file will be generated.
|
|
45
45
|
* @param pluginFilePath File path of the api plugin file to generate.
|
|
46
46
|
*/
|
|
47
|
-
generateForCopilot(manifestPath: string, filter: string[], outputSpecPath: string, pluginFilePath: string, signal?: AbortSignal): Promise<GenerateResult>;
|
|
47
|
+
generateForCopilot(manifestPath: string, filter: string[], outputSpecPath: string, pluginFilePath: string, existingPluginFilePath?: string, signal?: AbortSignal): Promise<GenerateResult>;
|
|
48
48
|
/**
|
|
49
49
|
* Generates and update artifacts from the OpenAPI specification file. Generate Adaptive Cards, update Teams app manifest, and generate a new OpenAPI specification file.
|
|
50
50
|
* @param manifestPath A file path of the Teams app manifest file to update.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/m365-spec-parser",
|
|
3
|
-
"version": "0.2.2-alpha.
|
|
3
|
+
"version": "0.2.2-alpha.2f6f18b3b.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.6-alpha.
|
|
42
|
+
"@microsoft/teams-manifest": "0.1.6-alpha.2f6f18b3b.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": "cc64ad9f64536ce997eeb5d6a2535eff29e07b76"
|
|
151
151
|
}
|