UNPKG

@finos/legend-server-marketplace

Version:
116 lines 6.36 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 PlainObject, AbstractServerClient } from '@finos/legend-shared'; import type { LightProvider, TerminalServicesResponse, FetchProductsParams } from './models/Provider.js'; import type { DataProductSearchResponse } from './models/DataProductSearchResult.js'; import type { SubscriptionRequest, SubscriptionResponse } from './models/Subscription.js'; import type { CartItem, CartItemRequest, CartItemResponse, CartSummary, DeleteCartItemResponse, VendorAddonsSearchParams, VendorAddonsSearchResponse } from './models/Cart.js'; import type { OrderDetails } from './models/Order.js'; import type { FeedbackRequest, FeedbackResponse } from './models/Feedback.js'; import type { V1_EntitlementsLakehouseEnvironmentType } from '@finos/legend-graph'; import { type TerminalProductOrderResponse, OrderStatusCategory } from './models/TerminalProductOrder.js'; import type { AutosuggestResponse } from './models/AutosuggestResult.js'; import type { TaxonomyTreeResponse } from './models/Taxonomy.js'; import { type FieldSearchRequest, type GroupedFieldSearchResponse } from './models/FieldSearch.js'; import type { DatasetSearchResponse, FieldSearchResponse } from './models/DatasetSearchResult.js'; import type { EntitySearchResponse } from './models/EntitySearchResult.js'; export interface TrendingDataProductEntry { dataProductId?: string; deploymentId?: string; dataProductType: string; productName: string; productDescription?: string; dataProductName?: string; groupId?: string; artifactId?: string; versionId?: string; dataProductPath?: string; originType?: string; producerEnvironmentName?: string; producerEnvironmentType?: string; dataProductSource?: string; licenseTo?: string; } export interface MarketplaceServerClientConfig { serverUrl: string; subscriptionUrl: string; } export declare class MarketplaceServerClient extends AbstractServerClient { subscriptionUrl: string; constructor(config: MarketplaceServerClientConfig); private _vendors; getVendors: () => Promise<PlainObject<LightProvider>[]>; private _products; fetchProducts: (params: FetchProductsParams) => Promise<PlainObject<TerminalServicesResponse>>; private _search; private _autosuggest; dataProductSearch: (query: string, lakehouseEnv: V1_EntitlementsLakehouseEnvironmentType, searchType?: string, searchFilters?: string[], pageSize?: number, pageNumber?: number, showAll?: boolean) => Promise<PlainObject<DataProductSearchResponse>>; fieldSearch: (lakehouseEnv: V1_EntitlementsLakehouseEnvironmentType, params: FieldSearchRequest, signal?: AbortSignal) => Promise<PlainObject<GroupedFieldSearchResponse>>; getAutosuggestions: (query: string, environment: string, limit?: number, signal?: AbortSignal) => Promise<AutosuggestResponse>; datasetSearch: (lakehouseEnv: V1_EntitlementsLakehouseEnvironmentType, groupId: string, artifactId: string, versionId: string, path: string, query: string, options?: { searchType?: string; pageSize?: number; pageNumber?: number; }) => Promise<PlainObject<DatasetSearchResponse>>; legacyFieldSearch: (lakehouseEnv: V1_EntitlementsLakehouseEnvironmentType, groupId: string, artifactId: string, versionId: string, path: string, options?: { searchType?: string; pageSize?: number; pageNumber?: number; }) => Promise<PlainObject<FieldSearchResponse>>; entitySearch: (lakehouseEnv: V1_EntitlementsLakehouseEnvironmentType, query: string, options?: { groupId?: string; artifactId?: string; versionId?: string; path?: string; dataProductId?: string; deploymentId?: string; searchType?: string; pageSize?: number; pageNumber?: number; includePrimitiveFields?: boolean; }) => Promise<PlainObject<EntitySearchResponse>>; private readonly _analytics; getTrendingDataProducts: (lakehouseEnv: V1_EntitlementsLakehouseEnvironmentType) => Promise<TrendingDataProductEntry[]>; private _taxonomyTree; getTaxonomyTree: (lakehouseEnv: V1_EntitlementsLakehouseEnvironmentType, searchQuery?: string | undefined, refresh?: boolean) => Promise<TaxonomyTreeResponse>; private _subscriptions; getSubscriptions: (user: string) => Promise<PlainObject<SubscriptionResponse>>; cancelSubscriptions: (cancellationRequest: SubscriptionRequest) => Promise<PlainObject<{ message: string; }>>; private _cart; getCart: (user: string) => Promise<PlainObject<Record<number, CartItem[]>>>; getCartSummary: (user: string) => Promise<PlainObject<CartSummary>>; clearCart: (user: string) => Promise<void>; deleteCartItem: (user: string, cartId: number, confirmDelete?: boolean) => Promise<PlainObject<DeleteCartItemResponse>>; addToCart: (user: string, cartItemData: CartItemRequest) => Promise<PlainObject<CartItemResponse>>; searchVendorAddons: (user: string, providerName: string, params?: VendorAddonsSearchParams, signal?: AbortSignal) => Promise<PlainObject<VendorAddonsSearchResponse>>; submitOrder: (user: string, orderData: OrderDetails) => Promise<PlainObject<unknown>>; private _orders; fetchOrders: (user: string, category?: OrderStatusCategory) => Promise<PlainObject<TerminalProductOrderResponse>>; cancelOrder: (cancelData: { order_id: string; kerberos: string; comments: string; process_instance_id: string; }) => Promise<PlainObject<{ status_code: number; message: string; }>>; private _feedback; submitFeedback: (feedbackData: FeedbackRequest) => Promise<PlainObject<FeedbackResponse>>; } //# sourceMappingURL=MarketplaceServerClient.d.ts.map