// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 import { __modelMeta__, ExtractModelMeta, } from '@aws-amplify/data-schema-types'; export { __modelMeta__, ExtractModelMeta, } from '@aws-amplify/data-schema-types'; export type ModelTypes< _T extends Record = never, _Context extends string = 'CLIENT', _ModelMeta extends Record = any, > = any; export type EnumTypes< _T extends Record = never, _ModelMeta extends Record = any, > = any; export type SelectionSet<_Model, _Path> = any; /** * Custom headers that can be passed either to the client or to individual * model operations, either as a static object or a function that returns a * promise. */ export type CustomHeaders = | Record | (() => Promise>); /** * Request options that are passed to custom header functions. * `method` and `headers` are not included in custom header functions passed to * subscriptions. */ export type RequestOptions = { url: string; queryString: string; method?: string; }; export type CustomQueries< Schema extends Record, _Context extends string = 'CLIENT', _ModelMeta extends Record = ExtractModelMeta, > = any; export type CustomMutations< Schema extends Record, _Context extends string = 'CLIENT', _ModelMeta extends Record = ExtractModelMeta, > = any; export type CustomSubscriptions< Schema extends Record, _Context extends string = 'CLIENT', _ModelMeta extends Record = ExtractModelMeta, > = any; export type ModelSortDirection = 'ASC' | 'DESC'; export type ClientExtensions = never> = { models: ModelTypes; enums: EnumTypes; queries: CustomQueries; mutations: CustomMutations; subscriptions: CustomSubscriptions; }; export type ClientExtensionsSSRRequest = never> = { models: ModelTypes; enums: EnumTypes; queries: CustomQueries; mutations: CustomMutations; }; export type ClientExtensionsSSRCookies = never> = { models: ModelTypes; enums: EnumTypes; queries: CustomQueries; mutations: CustomMutations; }; export type ClientInternals = { amplify: any; authMode: any; authToken: string | undefined; headers: CustomHeaders | undefined; }; export type BaseClient = { graphql(...args: any): Promise>; cancel(promise: Promise, message?: string): boolean; isCancelError(error: any): boolean; };