@darkpay/dark-api
Version:
JavaScript API for Darkdot blockchain.
40 lines (39 loc) • 5.47 kB
TypeScript
import { BasicDarkdotApi } from './basic-darkdot';
import { ProductWithSomeDetails, ProductWithAllDetails, AnyStorefrontId, AnyProductId, AnyOrderingId } from '@darkpay/dark-types';
import { FindProductsQuery, FindProductsWithDetailsQuery, FindProductWithDetailsQuery } from '../utils/types';
export declare class DarkdotApi extends BasicDarkdotApi {
private structFinders;
findAllStorefronts(ids: AnyStorefrontId[]): Promise<import("/dark-types").CommonData<import("/dark-types/build/substrate/interfaces").Storefront, import("/dark-types").StorefrontContent>[]>;
/** Find and load public storefronts that have `hidden == false` field in Substrate struct and their IPFS content is not empty. */
findPublicStorefronts(ids: AnyStorefrontId[]): Promise<import("/dark-types").CommonData<import("/dark-types/build/substrate/interfaces").Storefront, import("/dark-types").StorefrontContent>[]>;
/** Find and load unlisted storefronts that have either `hidden == true` field in Substrate struct or their IPFS content is empty. */
findUnlistedStorefronts(ids: AnyStorefrontId[]): Promise<import("/dark-types").CommonData<import("/dark-types/build/substrate/interfaces").Storefront, import("/dark-types").StorefrontContent>[]>;
findAllProducts(ids: AnyStorefrontId[]): Promise<import("/dark-types").CommonData<import("/dark-types/build/substrate/interfaces").Product, import("/dark-types").ProductContent>[]>;
findAllOrderings(ids: AnyOrderingId[]): Promise<import("/dark-types").CommonData<import("/dark-types/build/substrate/interfaces").Ordering, import("/dark-types").OrderingContent>[]>;
/** Find and load public products that have `hidden == false` field in Substrate struct and their IPFS content is not empty. */
findPublicProducts(ids: AnyStorefrontId[]): Promise<import("/dark-types").CommonData<import("/dark-types/build/substrate/interfaces").Product, import("/dark-types").ProductContent>[]>;
/** Find and load unlisted products that have either `hidden == true` field in Substrate struct or their IPFS content is empty. */
findUnlistedProducts(ids: AnyStorefrontId[]): Promise<import("/dark-types").CommonData<import("/dark-types/build/substrate/interfaces").Product, import("/dark-types").ProductContent>[]>;
/** Find and load products with their extension and owner's profile (if defined). */
findProductsWithSomeDetails(filter: FindProductsWithDetailsQuery): Promise<ProductWithSomeDetails[]>;
findPublicProductsWithSomeDetails(filter: FindProductsWithDetailsQuery): Promise<ProductWithSomeDetails[]>;
findUnlistedProductsWithSomeDetails(filter: FindProductsWithDetailsQuery): Promise<ProductWithSomeDetails[]>;
findProductsWithAllDetails({ ids, visibility }: FindProductsQuery): Promise<ProductWithAllDetails[]>;
findPublicProductsWithAllDetails(ids: AnyProductId[]): Promise<ProductWithAllDetails[]>;
findUnlistedProductsWithAllDetails(ids: AnyProductId[]): Promise<ProductWithAllDetails[]>;
findOrdering(id: AnyOrderingId): Promise<import("/dark-types").CommonData<import("/dark-types/build/substrate/interfaces").Ordering, import("/dark-types").OrderingContent> | undefined>;
/** Find and load a public storefront that has `hidden == false` field in Substrate struct and its IPFS content is not empty. */
findPublicStorefront(id: AnyStorefrontId): Promise<import("/dark-types").CommonData<import("/dark-types/build/substrate/interfaces").Storefront, import("/dark-types").StorefrontContent> | undefined>;
/** Find and load an unlisted storefront that has either `hidden == true` field in Substrate struct or its IPFS content is empty. */
findUnlistedStorefront(id: AnyStorefrontId): Promise<import("/dark-types").CommonData<import("/dark-types/build/substrate/interfaces").Storefront, import("/dark-types").StorefrontContent> | undefined>;
/** Find and load a public product that has `hidden == false` field in Substrate struct and its IPFS content is not empty. */
findPublicProduct(id: AnyStorefrontId): Promise<import("/dark-types").CommonData<import("/dark-types/build/substrate/interfaces").Product, import("/dark-types").ProductContent> | undefined>;
/** Find and load an unlisted storefront that has either `hidden == true` field in Substrate struct or its IPFS content is empty. */
findUnlistedProduct(id: AnyStorefrontId): Promise<import("/dark-types").CommonData<import("/dark-types/build/substrate/interfaces").Product, import("/dark-types").ProductContent> | undefined>;
findProductWithSomeDetails({ id, ...opts }: FindProductWithDetailsQuery): Promise<ProductWithSomeDetails | undefined>;
findPublicProductWithSomeDetails({ id, ...opts }: FindProductWithDetailsQuery): Promise<ProductWithSomeDetails | undefined>;
findUnlistedProductWithSomeDetails({ id, ...opts }: FindProductWithDetailsQuery): Promise<ProductWithSomeDetails | undefined>;
findProductWithAllDetails(id: AnyProductId): Promise<ProductWithAllDetails | undefined>;
findPublicProductWithAllDetails(id: AnyProductId): Promise<ProductWithAllDetails | undefined>;
findUnlistedProductWithAllDetails(id: AnyProductId): Promise<ProductWithAllDetails | undefined>;
}