import type { FieldKind, FieldNullability, FieldOptionsFromKind, InferredFieldOptionKeys, InputFieldMap, InputShapeFromFields, MaybePromise, Normalize, Resolver, RootName, SchemaTypes, ShapeFromTypeParam, TypeParam } from '@pothos/core'; import type { PothosScopeAuthPlugin } from './index.js'; import type { AuthScopeMap, ContextForAuth, FieldAuthScopes, FieldGrantScopes, ForbiddenResult, ReplaceContext, ScopeAuthInitializer, ScopeAuthPluginOptions, TypeAuthScopes, TypeGrantScopes, UnauthorizedOptions } from './types.js'; declare global { export namespace PothosSchemaTypes { interface Plugins { scopeAuth: PothosScopeAuthPlugin; } interface SchemaBuilderOptions { scopeAuth: ScopeAuthPluginOptions; } interface V3SchemaBuilderOptions { scopeAuth: never; scopeAuthOptions?: Omit, "authScopes">; authScopes: ScopeAuthInitializer; } interface SchemaBuilder { runAuthScopes: (context: Types["Context"], scopes: AuthScopeMap, unauthorizedError?: (result: ForbiddenResult) => Error | string) => MaybePromise; } interface BuildSchemaOptions { disableScopeAuth?: boolean; } interface UserSchemaTypes { AuthScopes: {}; AuthContexts: {}; DefaultAuthStrategy: "all" | "any"; } interface ExtendDefaultTypes> { AuthScopes: PartialTypes["AuthScopes"] & {}; AuthContexts: PartialTypes["AuthContexts"] & {}; DefaultAuthStrategy: undefined extends PartialTypes["DefaultAuthStrategy"] ? "any" : PartialTypes["DefaultAuthStrategy"] & string; } interface RootTypeOptions { authScopes?: TypeAuthScopes; grantScopes?: TypeGrantScopes; } interface ObjectTypeOptions { authScopes?: TypeAuthScopes; grantScopes?: TypeGrantScopes; runScopesOnType?: boolean; skipInterfaceScopes?: boolean; } interface InterfaceTypeOptions { authScopes?: TypeAuthScopes; grantScopes?: TypeGrantScopes; runScopesOnType?: boolean; } interface FieldOptions, Nullable extends FieldNullability, Args extends InputFieldMap, ResolveShape, ResolveReturnShape> extends UnauthorizedOptions { authScopes?: FieldAuthScopes>; grantScopes?: FieldGrantScopes>; skipTypeScopes?: boolean; } interface ObjectFieldOptions, Nullable extends FieldNullability, Args extends InputFieldMap, ResolveReturnShape> extends FieldOptions { skipInterfaceScopes?: boolean; } interface InterfaceFieldOptions, Nullable extends FieldNullability, Args extends InputFieldMap, ResolveReturnShape> extends FieldOptions { skipInterfaceScopes?: boolean; } interface RootFieldBuilder { authField: , Scopes extends FieldAuthScopes>, ResolveShape, ResolveReturnShape, Nullable extends FieldNullability = Types["DefaultFieldNullability"]>(options: Normalize, InferredFieldOptionKeys> & { authScopes: Scopes; resolve: Resolver, ContextForAuth, ShapeFromTypeParam, ResolveReturnShape>; }>) => FieldRef, Kind>; } interface QueryFieldBuilder { withAuth: >>(scopes: Scopes) => QueryFieldBuilder & object>, ParentShape>; } interface MutationFieldBuilder { withAuth: >>(scopes: Scopes) => MutationFieldBuilder & object>, ParentShape>; } interface SubscriptionFieldBuilder { withAuth: >>(scopes: Scopes) => SubscriptionFieldBuilder & object>, ParentShape>; } interface ObjectFieldBuilder { withAuth: >>(scopes: Scopes) => ObjectFieldBuilder & object>, ParentShape>; } interface InterfaceFieldBuilder { withAuth: >>(scopes: Scopes) => InterfaceFieldBuilder & object>, ParentShape>; } interface ScopeAuthFieldAuthScopes { Scopes: FieldAuthScopes; } interface ScopeAuthContextForAuth { Context: ContextForAuth; } } } //# sourceMappingURL=global-types.d.ts.map