UNPKG

@finos/legend-server-marketplace

Version:
93 lines 3.48 kB
/** * Copyright (c) 2026-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 { customListWithSchema, SerializationFactory, usingModelSchema, } from '@finos/legend-shared'; import { createModelSchema, optional, primitive } from 'serializr'; export var FieldSearchType; (function (FieldSearchType) { FieldSearchType["HYBRID"] = "hybrid"; })(FieldSearchType || (FieldSearchType = {})); // ============================================================================ // Grouped Field Search API Models // ============================================================================ export class GroupedFieldSearchDataProduct { path; productType; datasetName; datasetDescription; defaultExecutionContext; groupId; artifactId; versionId; modelPath; dataProductId; deploymentId; static serialization = new SerializationFactory(createModelSchema(GroupedFieldSearchDataProduct, { path: primitive(), productType: primitive(), datasetName: optional(primitive()), datasetDescription: optional(primitive()), defaultExecutionContext: optional(primitive()), groupId: optional(primitive()), artifactId: optional(primitive()), versionId: optional(primitive()), modelPath: optional(primitive()), dataProductId: optional(primitive()), deploymentId: optional(primitive()), })); } export class GroupedFieldSearchResultEntry { fieldName; fieldType; fieldDescription; dataProducts; static serialization = new SerializationFactory(createModelSchema(GroupedFieldSearchResultEntry, { fieldName: primitive(), fieldType: optional(primitive()), fieldDescription: optional(primitive()), dataProducts: customListWithSchema(GroupedFieldSearchDataProduct.serialization.schema), })); } export class GroupedFieldSearchResponseMetadata { total_count; num_pages; page_size; page_number; lakehouse_count; legacy_count; total_field_matches; next_page_number; prev_page_number; static serialization = new SerializationFactory(createModelSchema(GroupedFieldSearchResponseMetadata, { total_count: primitive(), num_pages: primitive(), page_size: primitive(), page_number: primitive(), lakehouse_count: primitive(), legacy_count: primitive(), total_field_matches: primitive(), next_page_number: optional(primitive()), prev_page_number: optional(primitive()), })); } export class GroupedFieldSearchResponse { results; metadata; static serialization = new SerializationFactory(createModelSchema(GroupedFieldSearchResponse, { results: customListWithSchema(GroupedFieldSearchResultEntry.serialization.schema), metadata: usingModelSchema(GroupedFieldSearchResponseMetadata.serialization.schema), })); } //# sourceMappingURL=FieldSearch.js.map