Initial commit

This commit is contained in:
2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 changed files with 5280367 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
import { OpenAPIV3 } from "openapi-types";
import { AuthInfo, AuthType, ErrorResult, ParseOptions } from "./interfaces";
import { IMessagingExtensionCommand, IParameter } from "@microsoft/teams-manifest";
export declare class Utils {
static hasNestedObjectInSchema(schema: OpenAPIV3.SchemaObject): boolean;
static isObjectSchema(schema: OpenAPIV3.SchemaObject): boolean;
static containMultipleMediaTypes(bodyObject: OpenAPIV3.RequestBodyObject | OpenAPIV3.ResponseObject): boolean;
static isBearerTokenAuth(authScheme: AuthType): boolean;
static isAPIKeyAuth(authScheme: AuthType): boolean;
static isOAuthWithAuthCodeFlow(authScheme: AuthType): boolean;
static getAuthArray(securities: OpenAPIV3.SecurityRequirementObject[] | undefined, spec: OpenAPIV3.Document): AuthInfo[][];
static getAuthInfo(spec: OpenAPIV3.Document): AuthInfo | undefined;
static updateFirstLetter(str: string): string;
static getResponseJson(operationObject: OpenAPIV3.OperationObject | undefined, allowMultipleMediaType?: boolean): {
json: OpenAPIV3.MediaTypeObject;
multipleMediaType: boolean;
};
static convertPathToCamelCase(path: string): string;
static getUrlProtocol(urlString: string): string | undefined;
static resolveEnv(str: string): string;
static checkServerUrl(servers: OpenAPIV3.ServerObject[]): ErrorResult[];
static validateServer(spec: OpenAPIV3.Document, options: ParseOptions): ErrorResult[];
static isWellKnownName(name: string, wellknownNameList: string[]): boolean;
static generateParametersFromSchema(schema: OpenAPIV3.SchemaObject, name: string, allowMultipleParameters: boolean, isRequired?: boolean): [IParameter[], IParameter[]];
static updateParameterWithInputType(schema: OpenAPIV3.SchemaObject, param: IParameter): void;
static parseApiInfo(operationItem: OpenAPIV3.OperationObject, options: ParseOptions): IMessagingExtensionCommand;
static format(str: string, ...args: string[]): string;
static getSafeRegistrationIdEnvName(authName: string): string;
static getServerObject(spec: OpenAPIV3.Document, method: string, path: string): OpenAPIV3.ServerObject | undefined;
}