@microsoft/m365-spec-parser 0.1.1-alpha.ded43fb2d.0 → 0.1.1-alpha.e1b11d5b2.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.
@@ -5,7 +5,7 @@ export declare class ConstantString {
5
5
  static readonly MissingOperationId = "Missing operationIds: %s.";
6
6
  static readonly NoSupportedApi = "No supported API is found in the OpenAPI description document: only GET and POST methods are supported, additionally, there can be at most one required parameter, and no auth is allowed.";
7
7
  static readonly AdditionalPropertiesNotSupported = "'additionalProperties' is not supported, and will be ignored.";
8
- static readonly SchemaNotSupported = "'oneOf', 'anyOf', and 'not' schema are not supported: %s.";
8
+ static readonly SchemaNotSupported = "'oneOf', 'allOf', 'anyOf', and 'not' schema are not supported: %s.";
9
9
  static readonly UnknownSchema = "Unknown schema: %s.";
10
10
  static readonly UrlProtocolNotSupported = "Server url is not correct: protocol %s is not supported, you should use https protocol instead.";
11
11
  static readonly RelativeServerUrlNotSupported = "Server url is not correct: relative server url is not supported.";
@@ -27,8 +27,9 @@ export declare class ConstantString {
27
27
  static readonly TextBlockType = "TextBlock";
28
28
  static readonly ImageType = "Image";
29
29
  static readonly ContainerType = "Container";
30
- static readonly RegistrationIdPostfix = "REGISTRATION_ID";
31
- static readonly OAuthRegistrationIdPostFix = "OAUTH_REGISTRATION_ID";
30
+ static readonly RegistrationIdPostfix: {
31
+ [key: string]: string;
32
+ };
32
33
  static readonly ResponseCodeFor20X: string[];
33
34
  static readonly AllOperationMethods: string[];
34
35
  static readonly WellknownResultNames: string[];
@@ -39,6 +40,7 @@ export declare class ConstantString {
39
40
  static readonly FullDescriptionMaxLens = 4000;
40
41
  static readonly CommandDescriptionMaxLens = 128;
41
42
  static readonly ParameterDescriptionMaxLens = 128;
43
+ static readonly ConversationStarterMaxLens = 50;
42
44
  static readonly CommandTitleMaxLens = 32;
43
45
  static readonly ParameterTitleMaxLens = 32;
44
46
  static readonly SMERequiredParamsMaxNum = 5;
@@ -214,6 +214,10 @@ export interface ParseOptions {
214
214
  * Project can be SME/Copilot/TeamsAi
215
215
  */
216
216
  projectType?: ProjectType;
217
+ /**
218
+ * If true, we will generate files of plugin for GPT (Declarative Extensions in a Copilot Extension). Otherwise, we will generate files of plugin for Copilot.
219
+ */
220
+ isGptPlugin?: boolean;
217
221
  }
218
222
  export declare enum ProjectType {
219
223
  Copilot = 0,
@@ -1,10 +1,10 @@
1
1
  import { OpenAPIV3 } from "openapi-types";
2
2
  import { AuthInfo, ParseOptions, WarningResult } from "./interfaces";
3
- import { IMessagingExtensionCommand, TeamsAppManifest, PluginManifestSchema, FunctionParameter } from "@microsoft/teams-manifest";
3
+ import { IMessagingExtensionCommand, TeamsAppManifest, PluginManifestSchema } from "@microsoft/teams-manifest";
4
4
  export declare class ManifestUpdater {
5
5
  static updateManifestWithAiPlugin(manifestPath: string, outputSpecPath: string, apiPluginFilePath: string, spec: OpenAPIV3.Document, options: ParseOptions, authInfo?: AuthInfo): Promise<[TeamsAppManifest, PluginManifestSchema]>;
6
6
  static updateManifestDescription(manifest: TeamsAppManifest, spec: OpenAPIV3.Document): void;
7
- static mapOpenAPISchemaToFuncParam(schema: OpenAPIV3.SchemaObject, method: string, pathUrl: string): FunctionParameter;
7
+ static checkSchema(schema: OpenAPIV3.SchemaObject, method: string, pathUrl: string): void;
8
8
  static generatePluginManifestSchema(spec: OpenAPIV3.Document, specRelativePath: string, apiPluginFilePath: string, appName: string, authInfo: AuthInfo | undefined, options: ParseOptions): Promise<PluginManifestSchema>;
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[]]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/m365-spec-parser",
3
- "version": "0.1.1-alpha.ded43fb2d.0",
3
+ "version": "0.1.1-alpha.e1b11d5b2.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.ded43fb2d.0",
42
+ "@microsoft/teams-manifest": "0.1.4-alpha.e1b11d5b2.0",
43
43
  "fs-extra": "^11.2.0",
44
44
  "js-yaml": "^4.1.0",
45
45
  "openapi-types": "^7.2.3",
@@ -94,7 +94,6 @@
94
94
  "has-symbols": "1.0.3",
95
95
  "has-tostringtag": "1.0.2",
96
96
  "he": "1.2.0",
97
- "http": "^0.0.1-security",
98
97
  "https-browserify": "^1.0.0",
99
98
  "is-arguments": "1.1.1",
100
99
  "is-callable": "1.2.7",
@@ -148,5 +147,5 @@
148
147
  "npx eslint --cache --fix --quiet"
149
148
  ]
150
149
  },
151
- "gitHead": "9ef7847e0976ff5ac94920010082c802c5226530"
150
+ "gitHead": "022cca2e11e1d10411fbfad7074b46b63f8d6287"
152
151
  }