import { ConstrainedObjectPropertyModel } from '@asyncapi/modelina'; import { AsyncAPIDocumentInterface, ChannelInterface, MessageInterface, SpecTypesV2 } from '@asyncapi/parser'; export declare function getRelativeDir(from: string, to: string): string; export declare function getMessageTitle(message: MessageInterface): string; export declare function createDummyReservedKeywordsChecker(): (name: string) => string; /** * Retrieve Service Title from AsyncAPI document. * As Title returned value set in info.title property of document. * @param asyncAPIDocument - AsyncAPI document. */ export declare function getServiceTitle(asyncAPIDocument: AsyncAPIDocumentInterface): string; /** * Retrieve Service Id from AsyncAPI document. * As Id returned value set in extension property `x-service-id`. * If extension property is not set - returned Service Title in lower-kebab-case. * @param asyncAPIDocument - AsyncAPI document. */ export declare function getServiceId(asyncAPIDocument: AsyncAPIDocumentInterface): string; /** * Retrieves whether a channel is for subscribing or publishing. * Currently, only channels with a single operation are supported. * @param channel - Channel object. */ export declare function getChannelAction(channel: ChannelInterface): 'subscribe' | 'publish'; /** * Takes the aggregate type from the (single) channel message from a tag * starting with "aggregate-type:" * @param channel - Channel object. */ export declare function getChannelAggregateType(channel: ChannelInterface): string; /** * Takes the aggregate ID field name from the (single) channel message from a * tag starting with "aggregate-id-field:" * @param channel - Channel object. */ export declare function getChannelAggregateIdField(channel: ChannelInterface): string; /** * Retrieves the payload model name for a channel. * Currently, only channels with a single message are supported. * @param channel - Channel object. */ export declare function getPayloadTitle(channel: ChannelInterface): string | undefined; /** * Converts a path into a POSIX path by replacing current path separator with `/`. * @param p - Path to convert. */ export declare function toPosixPath(p: string): string; /** * Generating the path prefix for model. * model name ends with "command" - prefix "commands" * model name ends with "event" - prefix "events" * default prefix "types" * @param modelName - name of the model, defined in json schema, or AsyncAPI document */ export declare function getModelPathPrefix(modelName: string): string; export declare function removeXParserProperties(obj: SpecTypesV2.AsyncAPISchemaObject): SpecTypesV2.AsyncAPISchemaObject; /** * Replaces the `any` type in a type string. */ export declare function replaceAnyType(type: string, replacement: string): string; export declare function indexOfNullPlain(model: ConstrainedObjectPropertyModel): number; export declare function indexOfNullUnion(model: ConstrainedObjectPropertyModel): number; export declare function indexOfNullOneOf(model: ConstrainedObjectPropertyModel): number; export declare function indexOfNullArrayPlain(model: ConstrainedObjectPropertyModel): number; export declare function indexOfNullArrayUnion(model: ConstrainedObjectPropertyModel): number; export declare function indexOfNullArrayOneOf(model: ConstrainedObjectPropertyModel): number; export declare function getArrayItemNonNullTypes(model: ConstrainedObjectPropertyModel): string[] | null; export declare function indexOfNullObjectProperty(model: ConstrainedObjectPropertyModel): number; export declare function indexOfNullArrayProperty(model: ConstrainedObjectPropertyModel): number; export declare function ensureNullable(type: string, index: number): string;