import { IAmfDocument, IAmfDomainElement, IAmfEndPoint, IAmfSecurityScheme, IAmfShape, IAmfWebApi, IAmfOperation, IAmfAsyncApi, IAmfServer, IAmfRequest } from './definitions/Amf.js';
export declare const findAmfType: unique symbol;
export declare const findReferenceObject: unique symbol;
export declare const getArrayItems: unique symbol;
export declare const computeReferenceSecurity: unique symbol;
export interface ServersQueryOptions {
    /**
     * An EndPoint to look for the servers in
     */
    endpointId?: string;
    /**
     * An Operation to look for the servers in
     */
    methodId?: string;
}
export interface ServerQueryOptions {
    /**
     * An EndPoint to look for the servers in. Required if Operation is provided
     */
    endpointId?: string;
    /**
     * An Operation to look for the servers in
     */
    methodId?: string;
    /**
     * Optional selected server id
     */
    id?: string;
}
type Constructor<T = object> = new (...args: any[]) => T;
export declare class AmfMixinInterface {
    amf?: IAmfDocument;
    _amf?: IAmfDocument;
    /**
     * This is an abstract method to be implemented by the components.
     * If, instead, the component uses `amf` setter you must use `super.amf` to
     * set the value.
     * @param amf Current AMF model. Can be undefined.
     */
    _amfChanged(amf?: IAmfDocument): void;
    /**
     * Expands flattened AMF model
     */
    _expand(amf: unknown): IAmfDocument;
    /**
     * Returns compact model key for given value.
     * @param property AMF original property
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns Compact model property name or the same value if value not found in the context.
     */
    _getAmfKey(property?: string, context?: Record<string, string>): string;
    /**
     * Ensures that the model is AMF object.
     *
     * @param amf AMF json/ld model
     * @returns The API spec
     */
    _ensureAmfModel(amf: unknown): IAmfDocument | undefined;
    /**
     * Ensures that the value is an array.
     * It returns undefined when there's no value.
     * It returns the same array if the value is already an array.
     * It returns new array of the item is not an array.
     *
     * @param value An item to test
     */
    _ensureArray(value?: any): unknown[] | undefined;
    /**
     * Gets a single scalar value from a model.
     * @param model Amf model to extract the value from.
     * @param untrustedKey Model key to search for the value
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns Value for key
     */
    _getValue(model: IAmfDomainElement, untrustedKey: string, context?: Record<string, string>): string | number | boolean | undefined | null;
    /**
     * Gets values from a model as an array of `@value` properties.
     * @param model Amf model to extract the value from.
     * @param untrustedKey Model key to search for the value
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns The value for key
     */
    _getValueArray(model: IAmfDomainElement, untrustedKey: string, context?: Record<string, string>): (string | number | boolean | null)[] | undefined;
    /**
     * Reads an array from the model.
     *
     * @param model Amf model to extract the value from.
     * @param untrustedKey Model key to search for the value
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns Value for the key
     */
    [getArrayItems](model?: IAmfDomainElement, untrustedKey?: string, context?: Record<string, string>): IAmfDomainElement[] | undefined;
    /**
     * Reads the value of the `@id` property.
     * @param model Amf model to extract the value from.
     * @param untrustedKey Model key to search for the @id
     * @param context A context to use. If not set, it looks for the context of the passed model
     */
    _getLinkValue(model: IAmfDomainElement, untrustedKey: string, context?: Record<string, string>): string | undefined;
    /**
     * Reads the list of value for the `@id` property.
     * @param model Amf model to extract the value from.
     * @param untrustedKey Model key to search for the @id
     * @param context A context to use. If not set, it looks for the context of the passed model
     */
    _getLinkValues(model: IAmfDomainElement, untrustedKey: string, context?: Record<string, string>): string[] | undefined;
    /**
     * Checks if a model has a type.
     * @param model Model to test
     * @param type Type name
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns True if model has a type.
     */
    _hasType(model?: IAmfDomainElement, type?: string, context?: Record<string, string>): boolean;
    /**
     * Checks if a shape has a property.
     * @param shape The shape to test
     * @param untrustedKey Property name to test
     * @param context A context to use. If not set, it looks for the context of the passed model
     */
    _hasProperty(shape: IAmfDomainElement, untrustedKey: string, context?: Record<string, string>): boolean;
    /**
     * Computes array value of a property in a model (shape).
     *
     * @param shape AMF shape object
     * @param untrustedKey Property name
     * @param context A context to use. If not set, it looks for the context of the passed model
     */
    _computePropertyArray(shape?: IAmfDomainElement, untrustedKey?: string, context?: Record<string, string>): (string | number | boolean | null | object)[] | undefined;
    /**
     * Computes API version from the AMF model.
     *
     * @param amf
     * @param context A context to use. If not set, it looks for the context of the passed model
     */
    _computeApiVersion(amf?: IAmfDocument, context?: Record<string, string>): string | undefined;
    /**
     * Computes model's `encodes` property.
     *
     * @param model AMF data model
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns List of encodes
     */
    _computeEncodes(model?: IAmfDocument, context?: Record<string, string>): IAmfDomainElement | undefined;
    /**
     * Computes list of declarations in the AMF api model.
     *
     * @param model AMF json/ld model for an API
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns List of declarations
     */
    _computeDeclares(model?: IAmfDocument, context?: Record<string, string>): IAmfDomainElement[] | undefined;
    /**
     * Computes list of references in the AMF api model.
     *
     * @param model AMF json/ld model for an API
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns List of declarations
     */
    _computeReferences(model?: IAmfDocument, context?: Record<string, string>): IAmfDomainElement[] | undefined;
    /**
     * Computes AMF's `http://schema.org/WebAPI` model
     *
     * @param model AMF json/ld model for an API
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns Web API declaration.
     */
    _computeWebApi(model?: IAmfDocument, context?: Record<string, string>): IAmfWebApi | undefined;
    /**
     * Computes AMF's `http://schema.org/API` model
     *
     * @param model AMF json/ld model for an API
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns  API declaration.
     */
    _computeApi(model?: IAmfDocument, context?: Record<string, string>): IAmfAsyncApi | IAmfWebApi | undefined;
    /**
     * Returns whether an AMF node is a WebAPI node
     *
     * @param model  AMF json/ld model for an API
     * @param context A context to use. If not set, it looks for the context of the passed model
     */
    _isWebAPI(model?: IAmfDocument, context?: Record<string, string>): boolean;
    /**
     * Returns whether an AMF node is an AsyncAPI node
     *
     * @param model  AMF json/ld model for an API
     * @param context A context to use. If not set, it looks for the context of the passed model
     */
    _isAsyncAPI(model?: IAmfDocument, context?: Record<string, string>): boolean;
    /**
     * Returns whether an AMF node is an API node
     *
     * @param model  AMF json/ld model for an API
     * @param context A context to use. If not set, it looks for the context of the passed model
     */
    _isAPI(model?: IAmfDocument, context?: Record<string, string>): boolean;
    /**
     * Determines whether a partial model is valid for reading servers from
     * Current valid values:
     * - Operation
     * - Endpoint
     * @param model The partial model to evaluate
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns Whether the model's type is part of the array of valid node types from which
     * to read servers
     * @private
     */
    _isValidServerPartial(model: IAmfDomainElement | IAmfDomainElement[], context?: Record<string, string>): boolean;
    /**
     * @param options Server query options
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns List of servers for method, if defined, or endpoint, if defined, or root level
     */
    _getServers(options?: ServersQueryOptions, context?: Record<string, string>): IAmfServer[] | undefined;
    /**
     * Computes value for the `expects` property.
     *
     * @param method AMF `supportedOperation` model
     * @param context A context to use. If not set, it looks for the context of the passed model
     */
    _computeExpects(method?: IAmfOperation, context?: Record<string, string>): IAmfRequest | undefined;
    /**
     * Computes list of endpoints from a WebApi model.
     * @param webApi
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns An array of endpoints.
     */
    _computeEndpoints(webApi?: IAmfWebApi, context?: Record<string, string>): IAmfEndPoint[] | undefined;
    /**
     * Computes model for an endpoint documentation.
     *
     * @param webApi Current value of `webApi` property
     * @param id Selected shape ID
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns An endpoint definition
     */
    _computeEndpointModel(webApi?: IAmfWebApi, id?: string, context?: Record<string, string>): IAmfEndPoint | undefined;
    /**
     * Computes method for the method documentation.
     *
     * @param webApi Current value of `webApi` property
     * @param selected Selected shape
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns A method definition
     */
    _computeMethodModel(webApi?: IAmfWebApi, selected?: string, context?: Record<string, string>): IAmfOperation | undefined;
    /**
     * Computes an endpoint for a method.
     * @param webApi The WebApi AMF model
     * @param methodId Method id
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns An endpoint model of undefined.
     */
    _computeMethodEndpoint(webApi?: IAmfWebApi, methodId?: string, context?: Record<string, string>): IAmfEndPoint | undefined;
    /**
     * Computes a list of methods for an endpoint that contains a method with
     * given id.
     *
     * @param webApi WebApi model
     * @param methodId Method id.
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns A list of sibling methods or undefined.
     */
    __computeMethodsListForMethod(webApi?: IAmfWebApi, methodId?: string, context?: Record<string, string>): IAmfOperation[] | undefined;
    /**
     * Computes a type documentation model.
     *
     * @param declares Current value of `declares` property
     * @param references Current value of `references` property
     * @param selected Selected shape
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns A type definition
     */
    _computeType(declares?: IAmfDomainElement[], references?: IAmfDomainElement[], selected?: string, context?: Record<string, string>): IAmfShape | undefined;
    /**
     * Finds a type in the model declares and references.
     * @param domainId The domain id of the type (AMF's shape).
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns The AMF shape or undefined when not found.
     */
    [findAmfType](domainId?: string, context?: Record<string, string>): IAmfShape | undefined;
    /**
     * Searches for an object in model's references list.
     * It does not resolve the object (useful for handling links correctly).
     *
     * @param domainId The domain of the object to find in the references.
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns The domain object or undefined.
     */
    [findReferenceObject](domainId: string, context?: Record<string, string>): IAmfDomainElement | undefined;
    /**
     * Computes a type model from a reference (library for example).
     * @param reference AMF model for a reference to extract the data from
     * @param selected Node ID to look for
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns Type definition or undefined if not found.
     */
    _computeReferenceType(reference?: IAmfDomainElement, selected?: string, context?: Record<string, string>): IAmfShape | undefined;
    /**
     * Computes a documentation model.
     *
     * @param webApi Current value of `webApi` property
     * @param selected Selected shape
     * @param context A context to use. If not set, it looks for the context of the passed model
     */
    _computeDocument(webApi?: IAmfDomainElement, selected?: string, context?: Record<string, string>): IAmfDomainElement | undefined;
    /**
     * Resolves a reference to an external fragment.
     *
     * @param shape A shape to resolve
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns Resolved shape.
     */
    _resolve(shape: any, context?: Record<string, string>): any;
    /**
     * @param amf References object to search in
     * @param id Id of the shape to resolve
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns Resolved shape for given reference, undefined otherwise
     */
    _getLinkTarget(amf?: IAmfDocument, id?: string, context?: Record<string, string>): IAmfDomainElement | undefined;
    /**
     * Resolves the shape of a given reference.
     *
     * @param references References object to search in
     * @param id Id of the shape to resolve
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns Resolved shape for given reference, undefined otherwise
     */
    _obtainShapeFromReferences(references?: IAmfDomainElement[], id?: string, context?: Record<string, string>): IAmfDomainElement | undefined;
    /**
     * Searches a node with a given ID in an array
     *
     * @param array Array to search for a given ID
     * @param id Id to search for
     * @returns Node with the given ID when found, undefined otherwise
     */
    _findById(array?: IAmfDomainElement[], id?: string): IAmfDomainElement | undefined;
    _getReferenceId(amf?: IAmfDocument, id?: string, context?: Record<string, string>): IAmfDomainElement | undefined;
    _resolveRecursive(shape: any, context?: Record<string, string>): void;
    /**
     * Merge two shapes together. If the resulting shape has one of the "special merge" keys,
     * then the special merge function for that key will be used to match that property
     * @param shapeA AMF node
     * @param shapeB AMF node
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns Merged AMF node
     */
    _mergeShapes(shapeA: any, shapeB: any, context?: Record<string, string>): any;
    /**
     * Obtains source map sources value from two shapes and returns the merged result
     * If neither shape has a sources node, then an empty object will be returned.
     * Result is wrapped in an array as per AMF model standard
     * @param shapeA AMF node
     * @param shapeB AMF node
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns Empty object or resulting merge, wrapped in an array
     * @private
     */
    _mergeSourceMapsSources(shapeA: any, shapeB: any, context?: Record<string, string>): (any | object)[];
    /**
     * Expands the key property from compacted mode to full mode.
     * @param value The value to process
     * @returns The expanded value.
     */
    _expandKey(value: string, context?: Record<string, string>): string;
    /**
     * Computes a security model from a reference (library for example).
     * @param domainId Domain id of the security requirement to find.
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns Type definition or undefined if not found.
     */
    findSecurityScheme(domainId: string, context?: Record<string, string>): IAmfSecurityScheme | undefined;
    /**
     * Computes a security model from a reference (library for example).
     * @param reference AMF model for a reference to extract the data from
     * @param selected Node ID to look for
     * @param context A context to use. If not set, it looks for the context of the passed model
     * @returns Type definition or undefined if not found.
     */
    [computeReferenceSecurity](reference: IAmfDomainElement, selected: string, context?: Record<string, string>): IAmfSecurityScheme | undefined;
    /**
     * Collects domain objects by a domain type.
     * @param source The element to search for declare/encoded objects.
     * @param type The domain type
     * @param context A context to use. If not set, it looks for the context of the passed model
     */
    getByType(source: IAmfDomainElement, type: string, context?: Record<string, string>): IAmfDomainElement[];
}
/**
 * Common functions used by AMF components to compute AMF values.
 */
export declare const AmfMixin: <T extends Constructor<any>>(superClass: T) => Constructor<AmfMixinInterface> & T;
export {};
//# sourceMappingURL=AmfMixin.d.ts.map