import * as i0 from '@angular/core'; import { InjectionToken, Type, Provider, DestroyRef } from '@angular/core'; import * as rxjs from 'rxjs'; import { Observable, ReplaySubject } from 'rxjs'; import { QueryService } from '@xxmachina/common/services/query'; import * as _angular_forms from '@angular/forms'; import { AuthService } from '@xxmachina/common/auth'; import { Query } from '@xxmachina/common/domain/models'; import { AppService } from '@ng-atomic/common/services/app'; import { EditingStateManager } from '@ng-atomic/common'; import { VariablesFromService } from '@xxmachina/components/services/forms/variables'; import * as _ng_atomic_common_stores_entities from '@ng-atomic/common/stores/entities'; import { Query as Query$1 } from '@xxmachina/common/domain'; declare enum ActionId { クエリの実行 = "\u30AF\u30A8\u30EA\u306E\u5B9F\u884C", クエリの生成 = "\u30AF\u30A8\u30EA\u306E\u751F\u6210", クエリの更新 = "\u30AF\u30A8\u30EA\u306E\u66F4\u65B0" } interface QueryResult { [key: string]: any[]; } interface QueryResolver { /** * このResolverが指定されたクエリを処理できるか判定 */ canResolve(query: Query): boolean; /** * データを取得・購読(Resolver内部でquery/subscriptionを判定) */ resolve(query: Query): Observable; } declare const QUERY_RESOLVERS: InjectionToken; /** * QueryResolverを登録する(multi: trueパターン) * * @example * // app.config.ts * providers: [ * provideQueryResolver(GraphqlResolver), * provideQueryResolver(MachinaResolver), * provideQueryResolver(HttpResolver), * ] */ declare function provideQueryResolver(resolver: Type): Provider[]; /** * GraphQLクエリ文字列がquery型かどうかを判定 * subscription型以外はquery型として扱う */ declare function isQuery(query: string): boolean; declare class GraphqlResolver implements QueryResolver { private readonly queryService; canResolve(query: Query): boolean; resolve(query: Query): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class QueryFeature { static readonly ActionId: typeof ActionId; static provideDefault(): Provider[]; static provideDefaultEffects(): Provider[]; static provideExecuteQueryEffect(): Provider; static provideGenerateQueryEffect(): Provider; protected readonly app: AppService; protected readonly auth: AuthService; protected readonly service: QueryService; protected readonly editingStateManager: EditingStateManager; protected readonly resolvers: QueryResolver[]; readonly form: _angular_forms.FormGroup<{ id: _angular_forms.FormControl; title: _angular_forms.FormControl; type: _angular_forms.FormControl; graphql: _angular_forms.FormGroup<{ endpoint: _angular_forms.FormControl; query: _angular_forms.FormControl; variablesJson: _angular_forms.FormControl; headersJson: _angular_forms.FormControl; transformerTs: _angular_forms.FormControl; transformer: _angular_forms.FormControl; }>; }>; protected readonly refresh$: ReplaySubject; protected readonly formValue$: rxjs.Observable; }>>; readonly formValue: i0.Signal; }> | undefined>; readonly query$: rxjs.Observable>; readonly query: i0.Signal | undefined>; readonly destroyRef: DestroyRef; readonly result$: rxjs.Observable; readonly result: i0.Signal<(Record & Record<`${string}Length`, number> & { __meta__?: { title?: string; } & any; }) | undefined>; constructor(); refresh(): void; protected executeQuery(query: Query): rxjs.Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class QueryGraphqlSchemaFeature { protected readonly feature: QueryFeature; protected readonly service: QueryService; protected readonly graphqlSchema$: rxjs.Observable; readonly graphqlSchema: i0.Signal; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class QueryGraphqlVariablesFormFeature { protected readonly feature: QueryFeature; protected readonly variablesFromService: VariablesFromService; protected readonly queryGraphqlVariables$: rxjs.Observable; protected readonly variablesValue$: rxjs.Observable>; readonly variablesValue: i0.Signal | {}>; protected readonly variablesForm$: rxjs.Observable<_angular_forms.FormGroup>; readonly variablesForm: i0.Signal<_angular_forms.FormGroup | undefined>; readonly variablesFormValue$: rxjs.Observable>; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class QueryUpdateFeature { static provideUpdateQueryEffect(): Provider[]; protected readonly queryEntityStore: _ng_atomic_common_stores_entities.EntityStore>; protected readonly app: AppService; protected readonly feature: QueryFeature; update(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { ActionId, GraphqlResolver, QUERY_RESOLVERS, QueryFeature, QueryGraphqlSchemaFeature, QueryGraphqlVariablesFormFeature, QueryUpdateFeature, isQuery, provideQueryResolver }; export type { QueryResolver, QueryResult }; //# sourceMappingURL=xxmachina-components-features-query.d.ts.map