UNPKG

@finos/legend-application-studio

Version:
85 lines 4.06 kB
/** * Copyright (c) 2020-present, Goldman Sachs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { type Service, PostValidation, PostValidationAssertion, RawLambda, type PostValidationAssertionResult } from '@finos/legend-graph'; import type { ServiceEditorState } from './ServiceEditorState.js'; import type { EditorStore } from '../../../EditorStore.js'; import { LambdaEditorState } from '@finos/legend-query-builder'; import { type GeneratorFn, ActionState } from '@finos/legend-shared'; export declare class PostValidationAssertionState extends LambdaEditorState { readonly editorStore: EditorStore; postValidationState: PostValidationState; assertion: PostValidationAssertion; constructor(assertion: PostValidationAssertion, validation: PostValidationState, editorStore: EditorStore); get lambdaId(): string; convertLambdaGrammarStringToObject(): GeneratorFn<void>; convertLambdaObjectToGrammarString(options?: { pretty?: boolean | undefined; preserveCompilationError?: boolean | undefined; }): GeneratorFn<void>; } export declare class PostValidationParameterState extends LambdaEditorState { readonly editorStore: EditorStore; postValidationState: PostValidationState; parameters: RawLambda[]; idx: number; constructor(validationState: PostValidationState, idx: number, editorStore: EditorStore); get validation(): PostValidation; reProcess(parameters: RawLambda[], idx: number): void; setLambda(val: RawLambda): void; get lambda(): RawLambda; get lambdaId(): string; convertLambdaGrammarStringToObject(): GeneratorFn<void>; convertLambdaObjectToGrammarString(options?: { pretty?: boolean | undefined; preserveCompilationError?: boolean | undefined; }): GeneratorFn<void>; } export declare class PostValidationState { readonly servicePostValidationState: ServicePostValidationsState; validation: PostValidation; assertionStates: PostValidationAssertionState[]; parametersState: PostValidationParameterState[]; isConvertingParameterLambdasState: ActionState; isConvertingAssertionLambdasState: ActionState; constructor(validation: PostValidation, servicePostValidationState: ServicePostValidationsState); get hasParserError(): boolean; get isRunningLambdaConversion(): boolean; reprocessParamState(): void; convertAssertionsLambdas(): GeneratorFn<void>; convertParameterLambdas(): GeneratorFn<void>; addParameter(): GeneratorFn<void>; deleteParam(paramState: PostValidationParameterState): void; addAssertion(): GeneratorFn<void>; deleteAssertion(assertion: PostValidationAssertion): void; } export declare class ServicePostValidationsState { readonly serviceEditorState: ServiceEditorState; readonly editorStore: EditorStore; selectedPostValidationState: PostValidationState | undefined; runningPostValidationAction: ActionState; postValidationAssertionResults: PostValidationAssertionResult[] | undefined; constructor(serviceEditorState: ServiceEditorState); get service(): Service; get postValidations(): PostValidation[]; init(): void; buildPostValidationState(validation: PostValidation): PostValidationState; deleteValidation(validation: PostValidation): void; addValidation(): void; changeValidation(validation: PostValidation): void; fetchValidationResult(): Promise<PostValidationAssertionResult[]>; runVal(): GeneratorFn<void>; } //# sourceMappingURL=ServicePostValidationState.d.ts.map