@finos/legend-application-marketplace
Version:
Legend Marketplace application core
71 lines • 4.61 kB
TypeScript
/**
* 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 GeneratorFn, ActionState } from '@finos/legend-shared';
import { type V1_EnrichedUserApprovalStatus, type V1_LiteDataContract, type V1_LiteDataContractWithUserStatus, type V1_ContractUserEventRecord, type V1_DataRequestWithWorkflow } from '@finos/legend-graph';
import { type ContractErrorLayer } from '@finos/legend-extension-dsl-data-product';
import { type LakehouseEntitlementsStore } from './LakehouseEntitlementsStore.js';
export declare class ContractCreatedByUserDetails {
readonly contractResultLite: V1_LiteDataContract;
assignees: Set<string>;
members: Map<string, V1_EnrichedUserApprovalStatus>;
constructor(contract: V1_LiteDataContract);
get sortedAssigneeIds(): string[];
get sortedMemberIds(): string[];
addAssignees(assignees: string[]): void;
addMember(id: string, status: V1_EnrichedUserApprovalStatus): void;
}
export declare class EntitlementsDashboardState {
readonly lakehouseEntitlementsStore: LakehouseEntitlementsStore;
pendingTasks: V1_ContractUserEventRecord[] | undefined;
pendingTaskContractMap: Map<string, V1_LiteDataContract>;
allContractsForUser: V1_LiteDataContractWithUserStatus[] | undefined;
allContractsCreatedByUserMap: Map<string, ContractCreatedByUserDetails>;
dataRequestsCreatedByUser: V1_DataRequestWithWorkflow[] | undefined;
selectedTaskIds: Set<string>;
readonly initializationState: ActionState;
readonly fetchingPendingTasksState: ActionState;
readonly fetchingContractsForUserState: ActionState;
readonly fetchingContractsByUserState: ActionState;
readonly fetchingDataRequestsCreatedByUserState: ActionState;
readonly changingState: ActionState;
constructor(state: LakehouseEntitlementsStore);
get pendingTaskContracts(): V1_LiteDataContract[];
get allContractsCreatedByUser(): ContractCreatedByUserDetails[];
setSelectedTaskIds(ids: Set<string>): void;
init(token: string | undefined): GeneratorFn<void>;
fetchPendingTasks(token: string | undefined): GeneratorFn<V1_ContractUserEventRecord[]>;
fetchPendingTaskContracts(token: string | undefined, pendingTasks: V1_ContractUserEventRecord[]): GeneratorFn<Map<string, V1_LiteDataContract>>;
fetchContractsForUser(token: string | undefined): GeneratorFn<V1_LiteDataContractWithUserStatus[]>;
fetchContractsCreatedByUser(token: string | undefined): GeneratorFn<Map<string, ContractCreatedByUserDetails>>;
fetchDataRequestsCreatedByUser(token: string | undefined): GeneratorFn<V1_DataRequestWithWorkflow[]>;
fetchContractDeploymentEnvironments(allContracts: V1_LiteDataContract[], token: string | undefined): GeneratorFn<Map<number, string>>;
getContractIngestErrors(contractId: string, token: string | undefined): Promise<ContractErrorLayer | undefined>;
getContractSyncErrors(contractId: string, token: string | undefined): Promise<ContractErrorLayer | undefined>;
getContractErrors(contractId: string, token: string | undefined, checkSyncStatus?: boolean): Promise<ContractErrorLayer | undefined>;
filterByUserEnvironment(pendingData: {
tasks: V1_ContractUserEventRecord[];
taskContractMap: Map<string, V1_LiteDataContract>;
}, contractsForUser: V1_LiteDataContractWithUserStatus[], contractsCreatedByUserMap: Map<string, ContractCreatedByUserDetails>, dataRequests: V1_DataRequestWithWorkflow[], envMap: Map<number, string>): {
filteredTasks: V1_ContractUserEventRecord[];
filteredContractsForUser: V1_LiteDataContractWithUserStatus[];
filteredCreatedByUserMap: Map<string, ContractCreatedByUserDetails>;
filteredDataRequests: V1_DataRequestWithWorkflow[];
};
updateContract(contractId: string, token: string | undefined): GeneratorFn<void>;
approve(task: V1_ContractUserEventRecord, token: string | undefined): GeneratorFn<void>;
deny(task: V1_ContractUserEventRecord, token: string | undefined): GeneratorFn<void>;
}
//# sourceMappingURL=EntitlementsDashboardState.d.ts.map