@microsoft/m365-spec-parser 0.2.11 → 0.2.12-alpha.0a63a75aae.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.
@@ -1,300 +1,300 @@
1
- import { IParameter } from "@microsoft/app-manifest";
2
- import { OpenAPIV3 } from "openapi-types";
3
- /**
4
- * An interface that represents the result of validating an OpenAPI specification file.
5
- */
6
- export interface ValidateResult {
7
- /**
8
- * The validation status of the OpenAPI specification file.
9
- */
10
- status: ValidationStatus;
11
- /**
12
- * An array of warning results generated during validation.
13
- */
14
- warnings: WarningResult[];
15
- /**
16
- * An array of error results generated during validation.
17
- */
18
- errors: ErrorResult[];
19
- specHash?: string;
20
- }
21
- export interface SpecValidationResult {
22
- /**
23
- * An array of warning results generated during validation.
24
- */
25
- warnings: WarningResult[];
26
- /**
27
- * An array of error results generated during validation.
28
- */
29
- errors: ErrorResult[];
30
- }
31
- /**
32
- * An interface that represents a warning result generated during validation.
33
- */
34
- export interface WarningResult {
35
- /**
36
- * The type of warning.
37
- */
38
- type: WarningType;
39
- /**
40
- * The content of the warning.
41
- */
42
- content: string;
43
- /**
44
- * data of the warning.
45
- */
46
- data?: any;
47
- }
48
- /**
49
- * An interface that represents an error result generated during validation.
50
- */
51
- export interface ErrorResult {
52
- /**
53
- * The type of error.
54
- */
55
- type: ErrorType;
56
- /**
57
- * The content of the error.
58
- */
59
- content: string;
60
- /**
61
- * data of the error.
62
- */
63
- data?: any;
64
- }
65
- export interface GenerateResult {
66
- allSuccess: boolean;
67
- warnings: WarningResult[];
68
- }
69
- /**
70
- * An enum that represents the types of errors that can occur during validation.
71
- */
72
- export declare enum ErrorType {
73
- SpecNotValid = "spec-not-valid",
74
- RemoteRefNotSupported = "remote-ref-not-supported",
75
- NoServerInformation = "no-server-information",
76
- UrlProtocolNotSupported = "url-protocol-not-supported",
77
- RelativeServerUrlNotSupported = "relative-server-url-not-supported",
78
- NoSupportedApi = "no-supported-api",
79
- NoExtraAPICanBeAdded = "no-extra-api-can-be-added",
80
- AddedAPINotInOriginalSpec = "added-api-not-in-original-spec",
81
- ResolveServerUrlFailed = "resolve-server-url-failed",
82
- SwaggerNotSupported = "swagger-not-supported",
83
- MultipleAuthNotSupported = "multiple-auth-not-supported",
84
- SpecVersionNotSupported = "spec-version-not-supported",
85
- CircularReferenceNotSupported = "circular-reference-not-supported",
86
- ListFailed = "list-failed",
87
- listSupportedAPIInfoFailed = "list-supported-api-info-failed",
88
- FilterSpecFailed = "filter-spec-failed",
89
- UpdateManifestFailed = "update-manifest-failed",
90
- GenerateAdaptiveCardFailed = "generate-adaptive-card-failed",
91
- GenerateFailed = "generate-failed",
92
- ValidateFailed = "validate-failed",
93
- GetSpecFailed = "get-spec-failed",
94
- AuthTypeIsNotSupported = "auth-type-is-not-supported",
95
- MissingOperationId = "missing-operation-id",
96
- PostBodyContainMultipleMediaTypes = "post-body-contain-multiple-media-types",
97
- ResponseContainMultipleMediaTypes = "response-contain-multiple-media-types",
98
- ResponseJsonIsEmpty = "response-json-is-empty",
99
- PostBodyContainsRequiredUnsupportedSchema = "post-body-contains-required-unsupported-schema",
100
- ParamsContainRequiredUnsupportedSchema = "params-contain-required-unsupported-schema",
101
- ExceededRequiredParamsLimit = "exceeded-required-params-limit",
102
- NoParameter = "no-parameter",
103
- NoAPIInfo = "no-api-info",
104
- MethodNotAllowed = "method-not-allowed",
105
- UrlPathNotExist = "url-path-not-exist",
106
- Cancelled = "cancelled",
107
- Unknown = "unknown",
108
- AddAuthFailed = "add-auth-failed"
109
- }
110
- /**
111
- * An enum that represents the types of warnings that can occur during validation.
112
- */
113
- export declare enum WarningType {
114
- OperationIdMissing = "operationid-missing",
115
- GenerateCardFailed = "generate-card-failed",
116
- OperationOnlyContainsOptionalParam = "operation-only-contains-optional-param",
117
- ConvertSwaggerToOpenAPI = "convert-swagger-to-openapi",
118
- OpenAPI31ConvertTo30 = "openapi31-convert-to-30",
119
- OperationIdContainsSpecialCharacters = "operationid-contains-special-characters",
120
- UnsupportedAuthType = "unsupported-auth-type",
121
- GenerateJsonDataFailed = "generate-json-data-failed",
122
- Unknown = "unknown"
123
- }
124
- /**
125
- * An enum that represents the validation status of an OpenAPI specification file.
126
- */
127
- export declare enum ValidationStatus {
128
- Valid = 0,
129
- Warning = 1,
130
- Error = 2
131
- }
132
- export interface TextBlockElement {
133
- type: string;
134
- text: string;
135
- wrap: boolean;
136
- }
137
- export interface ImageElement {
138
- type: string;
139
- url: string;
140
- $when: string;
141
- }
142
- export declare type AdaptiveCardBody = Array<TextBlockElement | ImageElement | ArrayElement>;
143
- export interface ArrayElement {
144
- type: string;
145
- $data: string;
146
- items: AdaptiveCardBody;
147
- }
148
- export interface AdaptiveCard {
149
- type: string;
150
- $schema: string;
151
- version: string;
152
- body: AdaptiveCardBody;
153
- }
154
- export interface PreviewCardTemplate {
155
- title: string;
156
- subtitle?: string;
157
- image?: {
158
- url: string;
159
- alt?: string;
160
- $when?: string;
161
- };
162
- }
163
- export interface WrappedAdaptiveCard {
164
- version: string;
165
- $schema?: string;
166
- jsonPath?: string;
167
- responseLayout: string;
168
- responseCardTemplate: AdaptiveCard;
169
- previewCardTemplate: PreviewCardTemplate;
170
- }
171
- export interface CheckParamResult {
172
- requiredNum: number;
173
- optionalNum: number;
174
- isValid: boolean;
175
- reason: ErrorType[];
176
- }
177
- export interface ParseOptions {
178
- /**
179
- * If true, the parser will not throw an error if an ID is missing the spec file.
180
- */
181
- allowMissingId?: boolean;
182
- /**
183
- * If true, the parser will allow parsing of Swagger specifications.
184
- */
185
- allowSwagger?: boolean;
186
- /**
187
- * If true, the parser will allow API Key authentication in the spec file.
188
- */
189
- allowAPIKeyAuth?: boolean;
190
- /**
191
- * If true, the parser will allow Bearer Token authentication in the spec file.
192
- */
193
- allowBearerTokenAuth?: boolean;
194
- /**
195
- * If true, the parser will allow multiple parameters in the spec file. Teams AI project would ignore this parameters and always true
196
- */
197
- allowMultipleParameters?: boolean;
198
- /**
199
- * If true, the parser will allow OAuth2 authentication in the spec file. Currently only support OAuth2 with auth code flow.
200
- */
201
- allowOauth2?: boolean;
202
- /**
203
- * An array of HTTP methods that the parser will allow in the spec file.
204
- */
205
- allowMethods?: string[];
206
- /**
207
- * If true, the parser will allow conversation starters in plugin file. Only take effect in Copilot project
208
- */
209
- allowConversationStarters?: boolean;
210
- /**
211
- * If true, the parser will allow response semantics in plugin file. Only take effect in Copilot project
212
- */
213
- allowResponseSemantics?: boolean;
214
- /**
215
- * If true, the paser will allow confirmation in plugin file. Only take effect in Copilot project
216
- */
217
- allowConfirmation?: boolean;
218
- /**
219
- * The type of project that the parser is being used for.
220
- * Project can be SME/Copilot/TeamsAi
221
- */
222
- projectType?: ProjectType;
223
- /**
224
- * 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.
225
- */
226
- isGptPlugin?: boolean;
227
- }
228
- export declare enum ProjectType {
229
- Copilot = 0,
230
- SME = 1,
231
- TeamsAi = 2
232
- }
233
- export declare enum AdaptiveCardUpdateStrategy {
234
- CreateNew = 0,
235
- KeepExisting = 1
236
- }
237
- export interface APIInfo {
238
- method: string;
239
- path: string;
240
- title: string;
241
- id: string;
242
- parameters: IParameter[];
243
- description: string;
244
- warning?: WarningResult;
245
- }
246
- export interface ListAPIInfo {
247
- api: string;
248
- server: string;
249
- operationId: string;
250
- isValid: boolean;
251
- reason: ErrorType[];
252
- auth?: AuthInfo;
253
- summary?: string;
254
- description?: string;
255
- }
256
- export interface APIMap {
257
- [key: string]: {
258
- operation: OpenAPIV3.OperationObject;
259
- isValid: boolean;
260
- reason: ErrorType[];
261
- };
262
- }
263
- export interface APIValidationResult {
264
- isValid: boolean;
265
- reason: ErrorType[];
266
- }
267
- export interface ListAPIResult {
268
- allAPICount: number;
269
- validAPICount: number;
270
- APIs: ListAPIInfo[];
271
- }
272
- export declare type AuthType = OpenAPIV3.SecuritySchemeObject | {
273
- type: "multipleAuth";
274
- };
275
- export interface AuthInfo {
276
- authScheme: AuthType;
277
- name: string;
278
- }
279
- export interface InvalidAPIInfo {
280
- api: string;
281
- reason: ErrorType[];
282
- }
283
- export interface InferredProperties {
284
- title?: string;
285
- subtitle?: string;
286
- imageUrl?: string;
287
- }
288
- export interface ExistingPluginManifestInfo {
289
- manifestPath: string;
290
- specPath: string;
291
- }
292
- export interface OperationAuthInfoMap {
293
- [operationId: string]: AuthInfo;
294
- }
295
- export interface FunctionClassificationMap {
296
- [authType: string]: {
297
- functionNames: string[];
298
- authName: string;
299
- };
300
- }
1
+ import { IParameter } from "@microsoft/app-manifest";
2
+ import { OpenAPIV3 } from "openapi-types";
3
+ /**
4
+ * An interface that represents the result of validating an OpenAPI specification file.
5
+ */
6
+ export interface ValidateResult {
7
+ /**
8
+ * The validation status of the OpenAPI specification file.
9
+ */
10
+ status: ValidationStatus;
11
+ /**
12
+ * An array of warning results generated during validation.
13
+ */
14
+ warnings: WarningResult[];
15
+ /**
16
+ * An array of error results generated during validation.
17
+ */
18
+ errors: ErrorResult[];
19
+ specHash?: string;
20
+ }
21
+ export interface SpecValidationResult {
22
+ /**
23
+ * An array of warning results generated during validation.
24
+ */
25
+ warnings: WarningResult[];
26
+ /**
27
+ * An array of error results generated during validation.
28
+ */
29
+ errors: ErrorResult[];
30
+ }
31
+ /**
32
+ * An interface that represents a warning result generated during validation.
33
+ */
34
+ export interface WarningResult {
35
+ /**
36
+ * The type of warning.
37
+ */
38
+ type: WarningType;
39
+ /**
40
+ * The content of the warning.
41
+ */
42
+ content: string;
43
+ /**
44
+ * data of the warning.
45
+ */
46
+ data?: any;
47
+ }
48
+ /**
49
+ * An interface that represents an error result generated during validation.
50
+ */
51
+ export interface ErrorResult {
52
+ /**
53
+ * The type of error.
54
+ */
55
+ type: ErrorType;
56
+ /**
57
+ * The content of the error.
58
+ */
59
+ content: string;
60
+ /**
61
+ * data of the error.
62
+ */
63
+ data?: any;
64
+ }
65
+ export interface GenerateResult {
66
+ allSuccess: boolean;
67
+ warnings: WarningResult[];
68
+ }
69
+ /**
70
+ * An enum that represents the types of errors that can occur during validation.
71
+ */
72
+ export declare enum ErrorType {
73
+ SpecNotValid = "spec-not-valid",
74
+ RemoteRefNotSupported = "remote-ref-not-supported",
75
+ NoServerInformation = "no-server-information",
76
+ UrlProtocolNotSupported = "url-protocol-not-supported",
77
+ RelativeServerUrlNotSupported = "relative-server-url-not-supported",
78
+ NoSupportedApi = "no-supported-api",
79
+ NoExtraAPICanBeAdded = "no-extra-api-can-be-added",
80
+ AddedAPINotInOriginalSpec = "added-api-not-in-original-spec",
81
+ ResolveServerUrlFailed = "resolve-server-url-failed",
82
+ SwaggerNotSupported = "swagger-not-supported",
83
+ MultipleAuthNotSupported = "multiple-auth-not-supported",
84
+ SpecVersionNotSupported = "spec-version-not-supported",
85
+ CircularReferenceNotSupported = "circular-reference-not-supported",
86
+ ListFailed = "list-failed",
87
+ listSupportedAPIInfoFailed = "list-supported-api-info-failed",
88
+ FilterSpecFailed = "filter-spec-failed",
89
+ UpdateManifestFailed = "update-manifest-failed",
90
+ GenerateAdaptiveCardFailed = "generate-adaptive-card-failed",
91
+ GenerateFailed = "generate-failed",
92
+ ValidateFailed = "validate-failed",
93
+ GetSpecFailed = "get-spec-failed",
94
+ AuthTypeIsNotSupported = "auth-type-is-not-supported",
95
+ MissingOperationId = "missing-operation-id",
96
+ PostBodyContainMultipleMediaTypes = "post-body-contain-multiple-media-types",
97
+ ResponseContainMultipleMediaTypes = "response-contain-multiple-media-types",
98
+ ResponseJsonIsEmpty = "response-json-is-empty",
99
+ PostBodyContainsRequiredUnsupportedSchema = "post-body-contains-required-unsupported-schema",
100
+ ParamsContainRequiredUnsupportedSchema = "params-contain-required-unsupported-schema",
101
+ ExceededRequiredParamsLimit = "exceeded-required-params-limit",
102
+ NoParameter = "no-parameter",
103
+ NoAPIInfo = "no-api-info",
104
+ MethodNotAllowed = "method-not-allowed",
105
+ UrlPathNotExist = "url-path-not-exist",
106
+ Cancelled = "cancelled",
107
+ Unknown = "unknown",
108
+ AddAuthFailed = "add-auth-failed"
109
+ }
110
+ /**
111
+ * An enum that represents the types of warnings that can occur during validation.
112
+ */
113
+ export declare enum WarningType {
114
+ OperationIdMissing = "operationid-missing",
115
+ GenerateCardFailed = "generate-card-failed",
116
+ OperationOnlyContainsOptionalParam = "operation-only-contains-optional-param",
117
+ ConvertSwaggerToOpenAPI = "convert-swagger-to-openapi",
118
+ OpenAPI31ConvertTo30 = "openapi31-convert-to-30",
119
+ OperationIdContainsSpecialCharacters = "operationid-contains-special-characters",
120
+ UnsupportedAuthType = "unsupported-auth-type",
121
+ GenerateJsonDataFailed = "generate-json-data-failed",
122
+ Unknown = "unknown"
123
+ }
124
+ /**
125
+ * An enum that represents the validation status of an OpenAPI specification file.
126
+ */
127
+ export declare enum ValidationStatus {
128
+ Valid = 0,
129
+ Warning = 1,// If there are any warnings, the file is still valid
130
+ Error = 2
131
+ }
132
+ export interface TextBlockElement {
133
+ type: string;
134
+ text: string;
135
+ wrap: boolean;
136
+ }
137
+ export interface ImageElement {
138
+ type: string;
139
+ url: string;
140
+ $when: string;
141
+ }
142
+ export type AdaptiveCardBody = Array<TextBlockElement | ImageElement | ArrayElement>;
143
+ export interface ArrayElement {
144
+ type: string;
145
+ $data: string;
146
+ items: AdaptiveCardBody;
147
+ }
148
+ export interface AdaptiveCard {
149
+ type: string;
150
+ $schema: string;
151
+ version: string;
152
+ body: AdaptiveCardBody;
153
+ }
154
+ export interface PreviewCardTemplate {
155
+ title: string;
156
+ subtitle?: string;
157
+ image?: {
158
+ url: string;
159
+ alt?: string;
160
+ $when?: string;
161
+ };
162
+ }
163
+ export interface WrappedAdaptiveCard {
164
+ version: string;
165
+ $schema?: string;
166
+ jsonPath?: string;
167
+ responseLayout: string;
168
+ responseCardTemplate: AdaptiveCard;
169
+ previewCardTemplate: PreviewCardTemplate;
170
+ }
171
+ export interface CheckParamResult {
172
+ requiredNum: number;
173
+ optionalNum: number;
174
+ isValid: boolean;
175
+ reason: ErrorType[];
176
+ }
177
+ export interface ParseOptions {
178
+ /**
179
+ * If true, the parser will not throw an error if an ID is missing the spec file.
180
+ */
181
+ allowMissingId?: boolean;
182
+ /**
183
+ * If true, the parser will allow parsing of Swagger specifications.
184
+ */
185
+ allowSwagger?: boolean;
186
+ /**
187
+ * If true, the parser will allow API Key authentication in the spec file.
188
+ */
189
+ allowAPIKeyAuth?: boolean;
190
+ /**
191
+ * If true, the parser will allow Bearer Token authentication in the spec file.
192
+ */
193
+ allowBearerTokenAuth?: boolean;
194
+ /**
195
+ * If true, the parser will allow multiple parameters in the spec file. Teams AI project would ignore this parameters and always true
196
+ */
197
+ allowMultipleParameters?: boolean;
198
+ /**
199
+ * If true, the parser will allow OAuth2 authentication in the spec file. Currently only support OAuth2 with auth code flow.
200
+ */
201
+ allowOauth2?: boolean;
202
+ /**
203
+ * An array of HTTP methods that the parser will allow in the spec file.
204
+ */
205
+ allowMethods?: string[];
206
+ /**
207
+ * If true, the parser will allow conversation starters in plugin file. Only take effect in Copilot project
208
+ */
209
+ allowConversationStarters?: boolean;
210
+ /**
211
+ * If true, the parser will allow response semantics in plugin file. Only take effect in Copilot project
212
+ */
213
+ allowResponseSemantics?: boolean;
214
+ /**
215
+ * If true, the paser will allow confirmation in plugin file. Only take effect in Copilot project
216
+ */
217
+ allowConfirmation?: boolean;
218
+ /**
219
+ * The type of project that the parser is being used for.
220
+ * Project can be SME/Copilot/TeamsAi
221
+ */
222
+ projectType?: ProjectType;
223
+ /**
224
+ * 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.
225
+ */
226
+ isGptPlugin?: boolean;
227
+ }
228
+ export declare enum ProjectType {
229
+ Copilot = 0,
230
+ SME = 1,
231
+ TeamsAi = 2
232
+ }
233
+ export declare enum AdaptiveCardUpdateStrategy {
234
+ CreateNew = 0,// Add a new adaptive card with a new name
235
+ KeepExisting = 1
236
+ }
237
+ export interface APIInfo {
238
+ method: string;
239
+ path: string;
240
+ title: string;
241
+ id: string;
242
+ parameters: IParameter[];
243
+ description: string;
244
+ warning?: WarningResult;
245
+ }
246
+ export interface ListAPIInfo {
247
+ api: string;
248
+ server: string;
249
+ operationId: string;
250
+ isValid: boolean;
251
+ reason: ErrorType[];
252
+ auth?: AuthInfo;
253
+ summary?: string;
254
+ description?: string;
255
+ }
256
+ export interface APIMap {
257
+ [key: string]: {
258
+ operation: OpenAPIV3.OperationObject;
259
+ isValid: boolean;
260
+ reason: ErrorType[];
261
+ };
262
+ }
263
+ export interface APIValidationResult {
264
+ isValid: boolean;
265
+ reason: ErrorType[];
266
+ }
267
+ export interface ListAPIResult {
268
+ allAPICount: number;
269
+ validAPICount: number;
270
+ APIs: ListAPIInfo[];
271
+ }
272
+ export type AuthType = OpenAPIV3.SecuritySchemeObject | {
273
+ type: "multipleAuth";
274
+ };
275
+ export interface AuthInfo {
276
+ authScheme: AuthType;
277
+ name: string;
278
+ }
279
+ export interface InvalidAPIInfo {
280
+ api: string;
281
+ reason: ErrorType[];
282
+ }
283
+ export interface InferredProperties {
284
+ title?: string;
285
+ subtitle?: string;
286
+ imageUrl?: string;
287
+ }
288
+ export interface ExistingPluginManifestInfo {
289
+ manifestPath: string;
290
+ specPath: string;
291
+ }
292
+ export interface OperationAuthInfoMap {
293
+ [operationId: string]: AuthInfo;
294
+ }
295
+ export interface FunctionClassificationMap {
296
+ [authType: string]: {
297
+ functionNames: string[];
298
+ authName: string;
299
+ };
300
+ }
@@ -1,6 +1,6 @@
1
- import { OpenAPIV3 } from "openapi-types";
2
- export declare class JsonDataGenerator {
3
- private static visitedSchemas;
4
- static generate(schema: OpenAPIV3.SchemaObject): any;
5
- static generateMockData(schema: OpenAPIV3.SchemaObject): any;
6
- }
1
+ import { OpenAPIV3 } from "openapi-types";
2
+ export declare class JsonDataGenerator {
3
+ private static visitedSchemas;
4
+ static generate(schema: OpenAPIV3.SchemaObject): any;
5
+ static generateMockData(schema: OpenAPIV3.SchemaObject): any;
6
+ }
@@ -1,16 +1,16 @@
1
- import { OpenAPIV3 } from "openapi-types";
2
- import { AuthInfo, ExistingPluginManifestInfo, OperationAuthInfoMap, ParseOptions, WarningResult } from "./interfaces";
3
- import { IMessagingExtensionCommand, TeamsAppManifest, PluginManifestSchema } from "@microsoft/app-manifest";
4
- export declare class ManifestUpdater {
5
- static useCopilotExtensionsInSchema(manifest: TeamsAppManifest): Promise<boolean>;
6
- static updateManifestWithAiPlugin(manifestPath: string, outputSpecPath: string, apiPluginFilePath: string, spec: OpenAPIV3.Document, options: ParseOptions, authMap: OperationAuthInfoMap, existingPluginManifestInfo?: ExistingPluginManifestInfo): Promise<[TeamsAppManifest, PluginManifestSchema, WarningResult[], Record<string, any>]>;
7
- static updateManifestDescription(manifest: TeamsAppManifest, spec: OpenAPIV3.Document): void;
8
- static checkSchema(schema: OpenAPIV3.SchemaObject, method: string, pathUrl: string): void;
9
- static generatePluginManifestSchema(spec: OpenAPIV3.Document, specRelativePath: string, apiPluginFilePath: string, appName: string, authMap: OperationAuthInfoMap, options: ParseOptions, existingPluginManifestInfo?: ExistingPluginManifestInfo): Promise<[PluginManifestSchema, WarningResult[], Record<string, any>]>;
10
- static updateManifest(manifestPath: string, outputSpecPath: string, spec: OpenAPIV3.Document, options: ParseOptions, adaptiveCardFolder?: string, authInfo?: AuthInfo): Promise<[TeamsAppManifest, WarningResult[]]>;
11
- static generateCommands(spec: OpenAPIV3.Document, manifestPath: string, options: ParseOptions, adaptiveCardFolder?: string): Promise<[IMessagingExtensionCommand[], WarningResult[]]>;
12
- static getRelativePath(from: string, to: string): string;
13
- static removeEnvs(str: string): string;
14
- static removeAllSpecialCharacters(str: string): string;
15
- static getConfirmationBodyItem(paramName: string): string;
16
- }
1
+ import { OpenAPIV3 } from "openapi-types";
2
+ import { AuthInfo, ExistingPluginManifestInfo, OperationAuthInfoMap, ParseOptions, WarningResult } from "./interfaces";
3
+ import { IMessagingExtensionCommand, TeamsAppManifest, PluginManifestSchema } from "@microsoft/app-manifest";
4
+ export declare class ManifestUpdater {
5
+ static useCopilotExtensionsInSchema(manifest: TeamsAppManifest): Promise<boolean>;
6
+ static updateManifestWithAiPlugin(manifestPath: string, outputSpecPath: string, apiPluginFilePath: string, spec: OpenAPIV3.Document, options: ParseOptions, authMap: OperationAuthInfoMap, existingPluginManifestInfo?: ExistingPluginManifestInfo): Promise<[TeamsAppManifest, PluginManifestSchema, WarningResult[], Record<string, any>]>;
7
+ static updateManifestDescription(manifest: TeamsAppManifest, spec: OpenAPIV3.Document): void;
8
+ static checkSchema(schema: OpenAPIV3.SchemaObject, method: string, pathUrl: string): void;
9
+ static generatePluginManifestSchema(spec: OpenAPIV3.Document, specRelativePath: string, apiPluginFilePath: string, appName: string, authMap: OperationAuthInfoMap, options: ParseOptions, existingPluginManifestInfo?: ExistingPluginManifestInfo): Promise<[PluginManifestSchema, WarningResult[], Record<string, any>]>;
10
+ static updateManifest(manifestPath: string, outputSpecPath: string, spec: OpenAPIV3.Document, options: ParseOptions, adaptiveCardFolder?: string, authInfo?: AuthInfo): Promise<[TeamsAppManifest, WarningResult[]]>;
11
+ static generateCommands(spec: OpenAPIV3.Document, manifestPath: string, options: ParseOptions, adaptiveCardFolder?: string): Promise<[IMessagingExtensionCommand[], WarningResult[]]>;
12
+ static getRelativePath(from: string, to: string): string;
13
+ static removeEnvs(str: string): string;
14
+ static removeAllSpecialCharacters(str: string): string;
15
+ static getConfirmationBodyItem(paramName: string): string;
16
+ }
@@ -1,5 +1,5 @@
1
- import { OpenAPIV3 } from "openapi-types";
2
- import { ParseOptions } from "./interfaces";
3
- export declare class SpecFilter {
4
- static specFilter(filter: string[], unResolveSpec: OpenAPIV3.Document, resolvedSpec: OpenAPIV3.Document, options: ParseOptions): OpenAPIV3.Document;
5
- }
1
+ import { OpenAPIV3 } from "openapi-types";
2
+ import { ParseOptions } from "./interfaces";
3
+ export declare class SpecFilter {
4
+ static specFilter(filter: string[], unResolveSpec: OpenAPIV3.Document, resolvedSpec: OpenAPIV3.Document, options: ParseOptions): OpenAPIV3.Document;
5
+ }