UNPKG

943 BTypeScriptView Raw
1import { Context } from "./Context";
2import { Strategy } from "./Strategy";
3import { GraphQLFieldConfig, GraphQLNamedType } from "graphql";
4import { Authority, AuthorityData, Credential, CredentialData } from "./model";
5export declare class StrategyCollection {
6 map: {
7 [name: string]: Strategy;
8 };
9 authorityMap: {
10 readonly [name: string]: {
11 new (data: AuthorityData<any>): Authority<any>;
12 };
13 };
14 credentialMap: {
15 readonly [name: string]: {
16 new (data: CredentialData<any>): Credential<any>;
17 };
18 };
19 queryFields: {
20 readonly [field: string]: GraphQLFieldConfig<any, any, Context>;
21 };
22 mutationFields: {
23 readonly [field: string]: GraphQLFieldConfig<any, any, Context>;
24 };
25 types: GraphQLNamedType[];
26 constructor(strategies?: Iterable<Strategy>);
27 add(s: Strategy): StrategyCollection;
28 delete(s: Strategy): boolean;
29}