import { AaiChannelItem } from '../../asyncapi/models/AaiChannelItem'; import { AaiMessage } from '../../asyncapi/models/AaiMessage'; import { AaiOperation } from '../../asyncapi/models/AaiOperation'; import { Aai20Document } from '../../asyncapi/v2/models/Aai20Document'; import { Aai20Server } from '../../asyncapi/v2/models/Aai20Server'; import { ICommand } from '../ICommand'; import { SimplifiedParameterType } from '../models/SimplifiedParameterType'; import { SimplifiedPropertyType } from '../models/SimplifiedPropertyType'; import { SimplifiedType } from '../models/SimplifiedType'; import { Document } from '../../core/models/Document'; import { DocumentType } from '../../core/models/DocumentType'; import { ExtensibleNode } from '../../core/models/ExtensibleNode'; import { Extension } from '../../core/models/Extension'; import { Node } from '../../core/models/Node'; import { NodePath } from '../../core/models/NodePath'; import { IDefinition } from '../../core/models/common/IDefinition'; import { IExampleParent } from '../../core/models/common/IExampleParent'; import { IPropertySchema } from '../../core/models/common/IPropertySchema'; import { ISecurityRequirementParent } from '../../core/models/common/ISecurityRequirementParent'; import { IServerParent } from '../../core/models/common/IServerParent'; import { Info } from '../../core/models/common/Info'; import { Parameter } from '../../core/models/common/Parameter'; import { Schema } from '../../core/models/common/Schema'; import { SecurityRequirement } from '../../core/models/common/SecurityRequirement'; import { SecurityScheme } from '../../core/models/common/SecurityScheme'; import { Server } from '../../core/models/common/Server'; import { IOasHeaderParent } from '../../openapi/models/IOasHeaderParent'; import { IOasParameterParent } from '../../openapi/models/IOasParameterParent'; import { OasHeader } from '../../openapi/models/OasHeader'; import { OasOperation } from '../../openapi/models/OasOperation'; import { OasParameter } from '../../openapi/models/OasParameter'; import { OasPathItem } from '../../openapi/models/OasPathItem'; import { OasResponse } from '../../openapi/models/OasResponse'; import { OasSchema } from '../../openapi/models/OasSchema'; import { Oas20Response } from '../../openapi/v2/models/Oas20Response'; import { Oas20ResponseDefinition } from '../../openapi/v2/models/Oas20ResponseDefinition'; import { IOas30MediaTypeParent } from '../../openapi/v3/models/IOas30MediaTypeParent'; import { Oas30Example } from '../../openapi/v3/models/Oas30Example'; import { Oas30Header } from '../../openapi/v3/models/Oas30Header'; import { Oas30MediaType } from '../../openapi/v3/models/Oas30MediaType'; import { Oas30Operation } from '../../openapi/v3/models/Oas30Operation'; import { Oas30Parameter } from '../../openapi/v3/models/Oas30Parameter'; /** * This factory is used to create an instance of {@link ICommand} given a "type" that was previously * serialized as part of the marshalling of a command to a JS object (and ultimately a JSON string). * The type of command is typically its short classname, but not always. * @author eric.wittmann@gmail.com * @class */ export declare class CommandFactory { /** * Called to create a command of a given type. * @param {string} cmdType * @return {*} */ static create(cmdType: string): ICommand; static createAggregateCommand(name: string, info: any, commands: Array): ICommand; static createAddExampleCommand$io_apicurio_datamodels_openapi_v3_models_Oas30MediaType$java_lang_Object$java_lang_String$java_lang_String$java_lang_String(mediaType: Oas30MediaType, example: any, exampleName: string, exampleSummary: string, exampleDescription: string): ICommand; static createAddExampleCommand(mediaType?: any, example?: any, exampleName?: any, exampleSummary?: any, exampleDescription?: any): any; static createAddExampleCommand$io_apicurio_datamodels_openapi_v3_models_Oas30Header$java_lang_Object$java_lang_String$java_lang_String$java_lang_String(header: Oas30Header, example: any, exampleName: string, exampleSummary: string, exampleDescription: string): ICommand; static createAddOneOfInMessageCommand(message: AaiMessage, parentMessage: AaiMessage): ICommand; static createAddParameterExampleCommand(parameter: Oas30Parameter, example: any, exampleName: string, exampleSummary: string, exampleDescription: string): ICommand; static createAddMessageExampleCommand_Aai20(operation: AaiOperation, exampleValue: any): ICommand; static createAddSchemaDefinitionCommand(docType: DocumentType, definitionName: string, from: any): ICommand; static createAddResponseDefinitionCommand(docType: DocumentType, definitionName: string, from: any): ICommand; static createAddPathItemCommand(pathItemName: string, from: any): ICommand; static createAddSecurityRequirementCommand(parent: ISecurityRequirementParent, requirement: SecurityRequirement): ICommand; static createAddChildSchemaCommand(schema: OasSchema, childSchema: OasSchema, childType: string): ICommand; static createAddChannelItemCommand(channelItemName: string, from: any): ICommand; static createChangePropertyCommand(node: Node, property: string, newValue: T): ICommand; static createChangeTitleCommand(newTitle: string): ICommand; static createChangeDescriptionCommand(newDescription: string): ICommand; static createChangeVersionCommand(newVersion: string): ICommand; static createChangeLicenseCommand(name: string, url: string): ICommand; static createChangeSchemaInheritanceCommand(schema: OasSchema, inheritanceType: string): ICommand; static createChangeContactCommand(name: string, email: string, url: string): ICommand; static createChangeHeaderCommand(header: OasHeader, newHeader: OasHeader): ICommand; static createChangeHeaderTypeCommand(header: Oas30Header, newType: SimplifiedType): ICommand; static createChangeMediaTypeTypeCommand(mediaType: Oas30MediaType, newType: SimplifiedType): ICommand; static createChangeParameterTypeCommand(docType: DocumentType, parameter: Parameter, newType: SimplifiedParameterType): ICommand; static createChangeParameterDefinitionTypeCommand(docType: DocumentType, parameter: Parameter, newType: SimplifiedParameterType): ICommand; static createChangePropertyTypeCommand(property: IPropertySchema, newType: SimplifiedPropertyType): ICommand; static createChangeSchemaTypeCommand(schema: OasSchema, newType: SimplifiedType): ICommand; static createChangeResponseTypeCommand(response: Oas20Response, newType: SimplifiedType): ICommand; static createChangeResponseDefinitionTypeCommand(response: Oas20ResponseDefinition, newType: SimplifiedType): ICommand; static createChangeSecuritySchemeCommand(docType: DocumentType, scheme: SecurityScheme): ICommand; static createChangeServerCommand(server: Server): ICommand; static createChangeServerCommand_Aai20(server: Aai20Server): ICommand; static createChangePayloadRefCommand_Aai20$java_lang_String$io_apicurio_datamodels_asyncapi_models_AaiOperation(payloadRef: string, operation: AaiOperation): ICommand; /** * @deprecated Use the AaiMessage variant * @param {string} payloadRef * @param {AaiOperation} operation * @return {*} */ static createChangePayloadRefCommand_Aai20(payloadRef?: any, operation?: any): any; static createChangePayloadRefCommand_Aai20$java_lang_String$io_apicurio_datamodels_asyncapi_models_AaiMessage(payloadRef: string, message: AaiMessage): ICommand; /** * @deprecated Use createChangePropertyCommand instead * @param {string} headersRef * @param {AaiOperation} operation * @return {*} */ static createChangeHeadersRefCommand_Aai20(headersRef: string, operation: AaiOperation): ICommand; static createDeleteContactCommand(info: Info): ICommand; static createDeleteChildSchemaCommand(schema: OasSchema): ICommand; static createDeleteAllExtensionsCommand(fromNode: ExtensibleNode): ICommand; static createDeleteAllExamplesCommand(mediaType: Oas30MediaType): ICommand; static createDeleteAllParameterExamplesCommand(parameter: Oas30Parameter): ICommand; static createDeleteAllMessageExamplesCommand_Aai20(operation: AaiOperation): ICommand; static createDeleteAllOperationsCommand(pathItem: OasPathItem): ICommand; static createDeleteAllHeadersCommand(header: IOasHeaderParent): ICommand; static createDeleteAllOperationsCommand_Aai20(pathItem: AaiChannelItem): ICommand; static createDeleteAllParametersCommand(parent: IOasParameterParent, type: string): ICommand; static createDeleteAllPropertiesCommand(schema: OasSchema): ICommand; static createDeleteAllResponsesCommand(operation: OasOperation): ICommand; static createDeleteAllSecurityRequirementsCommand(parent: ISecurityRequirementParent): ICommand; static createDeleteAllSecuritySchemesCommand(): ICommand; static createDeleteAllServersCommand(parent: IServerParent): ICommand; static createDeleteAllServersCommand_Aai20(): ICommand; static createDeleteAllTagsCommand(): ICommand; static createDeleteAllChildSchemasCommand(parent: OasSchema, type: string): ICommand; static createDelete20ExampleCommand(response: Oas20Response, contentType: string): ICommand; static createDeleteExampleCommand(example: Oas30Example): ICommand; static createDeleteParameterExampleCommand(example: Oas30Example): ICommand; static createDeleteMessageExampleCommand_Aai20(operation: AaiOperation, exampleValue: any): ICommand; static createDeleteExtensionCommand(extension: Extension): ICommand; static createDeleteLicenseCommand(info: Info): ICommand; static createDeleteMediaTypeCommand(mediaType: Oas30MediaType): ICommand; static createDeleteHeaderCommand(header: OasHeader): ICommand; static createDeleteOperationCommand(opMethod: string, pathItem: OasPathItem): ICommand; static createDeleteOperationCommand_Aai20(opType: string, channelItem: AaiChannelItem): ICommand; static createDeleteParameterCommand(parameter: OasParameter): ICommand; static createDeletePathCommand(path: string): ICommand; static createDeletePropertyCommand(property: IPropertySchema): ICommand; static createDeleteOneOfMessageCommand(message: AaiMessage, idx: number): ICommand; static createDeleteRequestBodyCommand(operation: Oas30Operation): ICommand; static createDeleteResponseCommand(response: OasResponse): ICommand; static createDeleteSchemaDefinitionCommand(docType: DocumentType, definitionName: string): ICommand; static createDeleteResponseDefinitionCommand(docType: DocumentType, definitionName: string): ICommand; static createDeleteSecurityRequirementCommand(parent: ISecurityRequirementParent, requirement: SecurityRequirement): ICommand; static createDeleteSecuritySchemeCommand(docType: DocumentType, schemeName: string): ICommand; static createDeleteServerCommand(server: Server): ICommand; static createDeleteServerCommand_Aai20(server: Aai20Server): ICommand; static createDeleteTagCommand(tagName: string): ICommand; static createDeleteChannelCommand(channelName: string): ICommand; static createDeleteMessageDefinitionCommand(name: string): ICommand; static createDeleteMessageTraitDefinitionCommand(name: string): ICommand; static createDeleteOperationTraitDefinitionCommand(name: string): ICommand; /** * New Commands * @param {*} parent * @param {string} newMediaType * @return {*} */ static createNewMediaTypeCommand(parent: IOas30MediaTypeParent, newMediaType: string): ICommand; static createNewHeaderCommand(parent: IOasHeaderParent, name: string): ICommand; static createNewOperationCommand(path: string, method: string): ICommand; static createNewOperationCommand_Aai20(channel: string, opType: string): ICommand; static createNewParamCommand(parent: IOasParameterParent, paramName: string, paramType: string, description: string, newType: SimplifiedParameterType, override: boolean): ICommand; static createNewPathCommand(newPath: string): ICommand; static createNewRequestBodyCommand(docType: DocumentType, operation: OasOperation): ICommand; static createNewResponseCommand(operation: OasOperation, statusCode: string, sourceResponse: OasResponse): ICommand; static createNewSchemaDefinitionCommand(docType: DocumentType, definitionName: string, example: any, description: string): ICommand; static createNewResponseDefinitionCommand(docType: DocumentType, definitionName: string, description: string): ICommand; static createNewSchemaPropertyCommand(schema: Schema, propertyName: string, description: string, newType: SimplifiedPropertyType): ICommand; static createNewSecuritySchemeCommand(docType: DocumentType, scheme: SecurityScheme): ICommand; static createNewServerCommand(parent: IServerParent, server: Server): ICommand; static createNewServerCommand_Aai20(parent: Aai20Document, server: Aai20Server): ICommand; static createNewTagCommand(name: string, description: string): ICommand; static createNewExtensionCommand(parent: ExtensibleNode, name: string, value: any): ICommand; static createNewChannelCommand(name: string): ICommand; static createNewSchemaDefinitionCommand_Aai20(name: string, example: any, descriptioon: string): ICommand; static createNewMessageDefinitionCommand(name: string, description: string): ICommand; static createNewMessageTraitDefinitionCommand(name: string, description: string): ICommand; static createNewOperationTraitDefinitionCommand(name: string, description: string): ICommand; /** * Rename Commands * @param {*} parent * @param {string} oldParamName * @param {string} newParamName * @param {string} paramIn * @return {*} */ static createRenameParameterCommand(parent: IOasParameterParent, oldParamName: string, newParamName: string, paramIn: string): ICommand; static createRenameHeaderCommand(parent: OasHeader, oldHeaderName: string, newHeaderName: string): ICommand; static createRenameChannelItemCommand(oldChannelName: string, newChannelName: string): ICommand; static createRenamePathItemCommand(oldPath: string, newPath: string, alsoRenameSubpaths: boolean): ICommand; static createRenamePropertyCommand(parent: OasSchema, oldPropertyName: string, newPropertyName: string): ICommand; static createRenameSchemaDefinitionCommand(docType: DocumentType, oldName: string, newName: string): ICommand; static createRenameResponseDefinitionCommand(docType: DocumentType, oldName: string, newName: string): ICommand; static createRenameSecuritySchemeCommand(oldSchemeName: string, newSchemeName: string): ICommand; static createRenameServerCommand(docType: DocumentType, oldServerName: string, newServerName: string): ICommand; static createRenameTagDefinitionCommand(oldTag: string, newTag: string): ICommand; static createRenameMessageDefinitionCommand(oldName: string, newName: string): ICommand; static createRenameMessageTraitDefinitionCommand(oldName: string, newName: string): ICommand; static createRenameOperationTraitDefinitionCommand(oldName: string, newName: string): ICommand; static createReplaceOperationCommand(old: OasOperation, replacement: OasOperation): ICommand; static createReplaceDocumentCommand(old: Document, replacement: Document): ICommand; static createReplacePathItemCommand(old: OasPathItem, replacement: OasPathItem): ICommand; static createReplaceChannelItemCommand(old: AaiChannelItem, replacement: AaiChannelItem): ICommand; static createReplaceSchemaDefinitionCommand(docType: DocumentType, old: IDefinition, replacement: IDefinition): ICommand; static createReplaceResponseDefinitionCommand(docType: DocumentType, old: IDefinition, replacement: IDefinition): ICommand; static createReplaceSecurityRequirementCommand(old: SecurityRequirement, replacement: SecurityRequirement): ICommand; /** * Set Commands * @param {NodePath} path * @param {string} property * @param {*} newValue * @return {*} */ static createSetPropertyCommand(path: NodePath, property: string, newValue: T): ICommand; static createSetExampleCommand(docType: DocumentType, parent: IExampleParent, example: any, nameOrContentType: string): ICommand; static createSetParameterExampleCommand(parent: IExampleParent, example: any, exampleName: string): ICommand; static createSetExtensionCommand(parent: ExtensibleNode, name: string, value: any): ICommand; }