@finos/legend-application-marketplace
Version:
Legend Marketplace application core
54 lines • 3.17 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 V1_AccessPointGroup, type V1_ContractUserEventRecord, type V1_DataContract, type V1_DataProduct, type V1_OrganizationalScope, V1_ContractState } from '@finos/legend-graph';
import { type LegendUser, type UserSearchService } from '@finos/legend-shared';
export declare enum GridTiemStatus {
SUCCESS = "success",
ERROR = "error",
INFO = "info"
}
export type GridItemDetail = {
name: string;
value: string | number;
onClick?: (() => void) | undefined;
status?: GridTiemStatus | undefined;
};
export declare const convertMutilGridItemDetail: (details: GridItemDetail[][]) => GridItemDetail[];
export declare const dataContractContainsDataProduct: (dataProduct: V1_DataProduct, dataProdcutDeploymentID: string | undefined, dataContract: V1_DataContract) => boolean;
export declare const dataContractContainsAccessGroup: (group: V1_AccessPointGroup, dataContract: V1_DataContract) => boolean;
export declare const isMemberOfContract: (user: string, contract: V1_DataContract) => boolean;
export declare const isContractCompleted: (contract: V1_DataContract) => boolean;
export declare const isContractInTerminalState: (contract: V1_DataContract) => boolean;
type ContractDetailOptions = {
openApplicationIdHandler?: ((user: string) => void) | undefined;
openDirectoryHandler?: ((id: string) => void) | undefined;
externalReference?: {
openContractHandler: ((id: string) => void) | undefined;
} | undefined;
};
export declare const buildDataContractDetail: (dataContract: V1_DataContract, options?: ContractDetailOptions | undefined) => GridItemDetail[];
export declare const TYPE_GRID_ITEM: Readonly<{
TASK_ID: "Task ID";
TASK_STATUS: "Task Status";
TASK_CONSUMER: "Task Consumer";
TASK_ASSIGNEE: "Task Assignee";
}>;
export declare const buildTaskGridItemDetail: (task: V1_ContractUserEventRecord, assignees?: string[] | undefined, contract?: V1_DataContract | undefined, openContractHandler?: ((id: string) => void) | undefined, openDirectoryHandler?: ((id: string) => void) | undefined, openApplicationIdHandler?: ((user: string) => void) | undefined) => GridItemDetail[];
export declare const getUserById: (userId: string, userSearchService: UserSearchService) => Promise<LegendUser | undefined>;
export declare const stringifyOrganizationalScope: (scope: V1_OrganizationalScope) => string;
export declare const isContractStateComplete: (currentContractState: V1_ContractState, stateToCheck: V1_ContractState) => boolean;
export {};
//# sourceMappingURL=LakehouseUtils.d.ts.map