import type { Maybe } from '@takeshape/util';
import type { AgentExecution, AgentExecutionChat, AgentExecutionGenerate, AIGenerateTextResolver, AIResolverName, AllOfSchema, AnyServiceConfig, AwsLambdaResolver, BasicAuthentication, BasicResolver, BearerAuthentication, ComposeResolver, CustomAuthentication, DirectiveConfig, DirectiveMappingArray, DirectiveMappingMap, ExtendsSchema, GoogleAuthentication, GraphqlResolver, OAuth2Authentication, OAuth2BearerAuthentication, ObjectSchema, OneOfSchema, ParameterOp, ParameterOpMapping, ParameterOpNested, ParameterOpOp, ParameterOpValue, ParameterSerializeContentOptions, ParameterSerializeOptions, ParameterSerializeStyleOptions, ParameterSerializeStyleOptionsForPathParams, ParameterSerializeStyleOptionsForSearchParams, ProjectSchemaJSON, PropertySchema, RefSchema, RefSchemaLegacy, Resolver, RestResolver, ReturnShape, ReturnShapeArraySchema, SearchParamsAuthentication, ServiceAuthentication, ServiceResolver, ShapedbResolver, ShapeJSON, ShapeMap, ShapeSchemaEnum, TakeshapeResolver, UtilResolver } from '../project-schema/index.ts';
import type { CachedShape, EncryptedServiceConfig, GraphQLServiceConfig, LatestProjectSchemaWithServices, MeshShape, OpenAPIServiceConfig, PropertySchemaWithRelationship, RESTServiceConfig, ReferenceableShape, SchemaWithArgs, ServiceConfigWithCustomAuthentication, ServiceConfigWithOAuth2Authentication, ShopifyServiceConfig } from './types.ts';
import { ArgsType } from './types.ts';
/** Resolver Type Utils **/
/**
 * Only tests that the shape is right, not that the name is correct. That's a job for the validator.
 */
export declare function isBasicResolver(resolver: unknown): resolver is BasicResolver;
export declare function isServiceResolver(resolver: unknown): resolver is ServiceResolver;
export declare function isComposeResolver(resolver: unknown): resolver is ComposeResolver;
export declare function isTakeshapeResolver(resolver: unknown): resolver is TakeshapeResolver;
export declare function isShapedbResolver(resolver: unknown): resolver is ShapedbResolver;
export declare function isGraphqlResolver(resolver: unknown): resolver is GraphqlResolver;
export declare function isRestResolver(resolver: unknown): resolver is RestResolver;
export declare function isAwsLambdaResolver(resolver: unknown): resolver is AwsLambdaResolver;
export declare function isUtilResolver(resolver: unknown): resolver is UtilResolver;
export declare const aiResolverNames: AIResolverName[];
export declare function isAIResolverName(name: string | undefined): name is AIResolverName;
export declare function isAIResolver(resolver: unknown): resolver is AIGenerateTextResolver;
export declare function isAIAgentStateExecution(agentExecution: AgentExecution): agentExecution is AgentExecutionGenerate | AgentExecutionChat;
export declare function isProjectSchemaWithServices(schema: ProjectSchemaJSON): schema is LatestProjectSchemaWithServices;
export declare function containsResolver(resolver: Resolver, predicate: (resolver: BasicResolver) => boolean): boolean;
/** Directive Mapping Utils **/
/**
 * Determine whether the ambiguous Directive structure is a DirectiveMappingMap
 */
export declare function isDirectiveMappingMap(maybeMap: DirectiveMappingMap | DirectiveMappingArray | DirectiveConfig): maybeMap is DirectiveMappingMap;
/**
 * Determine whether the ambiguous Directive structure is a DirectiveMappingArray
 */
export declare function isDirectiveMappingArray(maybeArray: DirectiveMappingMap | DirectiveMappingArray | DirectiveConfig): maybeArray is DirectiveMappingArray;
/**
 * Determine whether the ambiguous Directive structure is a DirectiveConfig array
 */
export declare function isDirectiveConfig(maybeConfig: DirectiveMappingMap | DirectiveMappingArray | DirectiveConfig): maybeConfig is DirectiveConfig;
/**
 * Determine whether a ParameterSerializeOption is a content type serializer
 */
export declare function isParameterSerializeContentOptions(maybeContent: ParameterSerializeOptions): maybeContent is ParameterSerializeContentOptions;
/**
 * Determine whether an unknown variable is a `ParameterOp`
 */
export declare function isParameterOp(maybeOp: unknown): maybeOp is ParameterOp;
/**
 * Determine whether a `ParameterOp` is a `ParameterOpNested`
 */
export declare function isParameterOpNested(maybeOp: ParameterOp): maybeOp is ParameterOpNested;
/**
 * Determine whether a `ParameterOp` is a `ParameterOpMapping`
 */
export declare function isParameterOpMapping(maybeOp: ParameterOp): maybeOp is ParameterOpMapping;
/**
 * Determine whether a `ParameterOp` is a `ParameterOpValue`
 */
export declare function isParameterOpValue(maybeOp: ParameterOp): maybeOp is ParameterOpValue;
/**
 * Determine whether a `ParameterOp` is a `ParameterOpOp`
 */
export declare function isParameterOpOp(maybeOp: ParameterOp): maybeOp is ParameterOpOp;
export declare function isParameterSerializeStyleForSearchParams(maybeParam: Maybe<string>): maybeParam is ParameterSerializeStyleOptionsForSearchParams['style'];
export declare function isParameterSerializeStyleForPathParams(maybeParam: Maybe<string>): maybeParam is ParameterSerializeStyleOptionsForPathParams['style'];
/**
 * Determine whether a ParameterSerializeOption is a style serializer
 */
export declare function isParameterSerializeStyleOptions(maybeStyle: ParameterSerializeOptions): maybeStyle is ParameterSerializeStyleOptions;
/** Typeguards for different types of shape schemas **/
export declare function isRefSchema(propertySchema: PropertySchema): propertySchema is RefSchema | RefSchemaLegacy;
export declare function isRefSchemaLegacy(propertySchema: PropertySchema): propertySchema is RefSchemaLegacy;
export declare function isAllOfSchema(propertySchema: PropertySchema): propertySchema is AllOfSchema;
export declare function isExtendsSchema(propertySchema: unknown): propertySchema is ExtendsSchema;
export declare function isOneOfSchema(propertySchema: PropertySchema): propertySchema is OneOfSchema;
export declare function isEnumSchema(obj: PropertySchema): obj is ShapeSchemaEnum;
export declare function isArraySchema(propertySchema: PropertySchema): propertySchema is ReturnShapeArraySchema;
export declare function isReturnShapeArraySchema(returnShape: ReturnShape): returnShape is ReturnShapeArraySchema;
export declare function isObjectSchema(propertySchema: unknown): propertySchema is ObjectSchema;
/** Service Config Utils **/
/**
 * Test all required props, currently:
 * "name", "slug", "provider", "serviceType", "authenticationType"
 */
export declare function isAnyServiceConfig(maybeConfig: any): maybeConfig is AnyServiceConfig;
export declare function isGraphQLServiceConfig(maybeConfig: any): maybeConfig is GraphQLServiceConfig;
export declare function isRESTServiceConfig(maybeConfig: any): maybeConfig is RESTServiceConfig;
export declare function isOpenAPIServiceConfig(maybeConfig: any): maybeConfig is OpenAPIServiceConfig;
export declare function isShopifyServiceConfig(maybeShopify: AnyServiceConfig): maybeShopify is ShopifyServiceConfig;
export declare function isEncryptedServiceConfig(maybeConfig: any): maybeConfig is EncryptedServiceConfig;
export declare function isServiceConfigWithOAuth2Authentication(maybeServiceConfig: any): maybeServiceConfig is ServiceConfigWithOAuth2Authentication;
export declare function isServiceConfigWithCustomAuthentication(maybeServiceConfig: any): maybeServiceConfig is ServiceConfigWithCustomAuthentication;
/** Authentication Utils **/
export declare function isServiceAuthentication(maybeAuthentication: any): maybeAuthentication is ServiceAuthentication;
export declare function isBearerAuthentication(authentication: ServiceAuthentication): authentication is BearerAuthentication;
export declare function isBasicAuthentication(authentication: ServiceAuthentication): authentication is BasicAuthentication;
export declare function isSearchParamsAuthentication(authentication: ServiceAuthentication): authentication is SearchParamsAuthentication;
export declare function isOAuth2Authentication(authentication: ServiceAuthentication): authentication is OAuth2Authentication;
export declare function isOAuth2BearerAuthentication(authentication: ServiceAuthentication): authentication is OAuth2BearerAuthentication;
export declare function isGoogleAuthentication(authentication: ServiceAuthentication): authentication is GoogleAuthentication;
export declare function isCustomAuthentication(authentication: ServiceAuthentication): authentication is CustomAuthentication;
/** Miscellaneous Utils **/
/**
 * A utility to return the type of args present on a schema.
 *
 * @param argsSchema Any schema that may have an `args` property.
 */
export declare const getArgsType: (argsSchema: SchemaWithArgs) => Maybe<ArgsType>;
export declare function isPropertySchemaWithRelationship(schema: PropertySchema): schema is PropertySchemaWithRelationship;
export declare function isModelShape(shape: ShapeJSON): boolean;
export declare function isCachedShape(shape: ShapeJSON): shape is CachedShape;
export declare function isReferenceableShape(shape: ShapeJSON): shape is ReferenceableShape;
export declare function listCachedShapes(shapes: ShapeMap): CachedShape[];
export declare function getCachedShapeMap(shapes: ShapeMap): Record<string, CachedShape>;
export declare function isMeshShape(shape: ShapeJSON): shape is MeshShape;
