UNPKG

@apistudio/apim-cli

Version:

CLI for API Management Products

38 lines (34 loc) 3.86 kB
/** * Copyright Super iPaaS Integration LLC, an IBM Company 2024 */ import { OpenAPIV3_1 } from "openapi-types"; import { FileAccessType, OpenApiPathItemObject, OpenApiDocumentObject, OpenApiTagObject, OpenAPISpecComponentsSchema, OpenAPISpecComponentsSchemaObject, OpenApiSpecServer, OpenApiSpecV3_1Components, OpenAPIExamples, OpenApiSpecExampleObj } from "./api-spec-handler.interface.js"; import { VCSFileInfo } from "../../vcs/models/vcs-file-info.model.js"; export interface IOpenApiV3_1Handler { setInfo(file: FileSystemFileHandle | VCSFileInfo, info: OpenAPIV3_1.InfoObject): Promise<OpenAPIV3_1.InfoObject>; addComponentExample(file: FileAccessType, Key: string, ExampleObject: OpenApiSpecExampleObj): Promise<OpenAPIExamples>; updateComponentExample(file: FileAccessType, PrevKey: string, CurrentKey: string, ExampleObject: OpenApiSpecExampleObj): Promise<OpenAPIExamples>; deleteComponentExample(file: FileAccessType, Key: string): Promise<OpenAPIExamples>; setInfo(file: FileAccessType, info: OpenAPIV3_1.InfoObject): Promise<OpenAPIV3_1.InfoObject>; addServer(file: FileAccessType, newServer: OpenApiSpecServer): Promise<OpenAPIV3_1.ServerObject[]>; updateServer(file: FileAccessType, prevServer: OpenApiSpecServer, newServer: OpenApiSpecServer): Promise<OpenAPIV3_1.ServerObject[]>; deleteServer(file: FileAccessType, server: OpenApiSpecServer): Promise<OpenAPIV3_1.ServerObject[]>; addPath(file: FileAccessType, key: string, newPath: OpenApiPathItemObject): Promise<OpenAPIV3_1.Document>; updatePath(file: FileAccessType, prevKey: string, newKey: string, newPath: OpenApiPathItemObject): Promise<OpenAPIV3_1.Document>; deletePath(file: FileAccessType, path: string): Promise<OpenAPIV3_1.Document>; addComponentsSchema(file: FileAccessType, key: string, newSchema: OpenAPISpecComponentsSchemaObject): Promise<OpenAPISpecComponentsSchema>; deleteComponentsSchema(file: FileAccessType, key: string): Promise<OpenAPISpecComponentsSchema>; updateComponentsSchema(file: FileAccessType, prevKey: string, newKey: string, updatedSchema: OpenAPISpecComponentsSchemaObject): Promise<OpenAPISpecComponentsSchema>; addTag(file: FileAccessType, tag: OpenApiTagObject): Promise<OpenAPIV3_1.TagObject[]>; updateTag(file: FileAccessType, prevKey: string, tag: OpenApiTagObject): Promise<OpenAPIV3_1.TagObject[]>; deleteTag(file: FileAccessType, tag: string): Promise<OpenAPIV3_1.TagObject[]>; addOrUpdateDocument(file: FileAccessType, document: OpenApiDocumentObject): Promise<OpenAPIV3_1.ExternalDocumentationObject>; deleteDocument(file: FileAccessType): Promise<undefined>; addComponent(file: FileAccessType, key: string, object: OpenApiSpecV3_1Components, typeOfComponent: keyof OpenAPIV3_1.ComponentsObject): Promise<OpenApiSpecV3_1Components>; updateComponent(file: FileAccessType, prevKey: string, currentKey: string, object: OpenApiSpecV3_1Components, typeOfComponent: keyof OpenAPIV3_1.ComponentsObject): Promise<OpenApiSpecV3_1Components>; deleteComponent(file: FileAccessType, key: string, typeOfComponent: keyof OpenAPIV3_1.ComponentsObject): Promise<OpenApiSpecV3_1Components>; setComponent: (file: FileAccessType, data: Record<string, OpenApiSpecV3_1Components>, typeOfComponent: keyof OpenAPIV3_1.ComponentsObject) => Promise<OpenAPIV3_1.Document>; addSecurityRequirement(file: FileAccessType, securityRequirementObj: OpenAPIV3_1.SecurityRequirementObject[]): Promise<OpenAPIV3_1.SecurityRequirementObject[]>; updateSecurityRequirement(file: FileAccessType, prevsecurityRequirementName: string, securityRequirementObj: OpenAPIV3_1.SecurityRequirementObject): Promise<OpenAPIV3_1.SecurityRequirementObject[]>; deleteSecurityRequirement(file: FileAccessType, securityRequirementName: string): Promise<OpenAPIV3_1.SecurityRequirementObject[]>; }