UNPKG

@darkpay/dark-api

Version:

JavaScript API for Darkdot blockchain.

40 lines (39 loc) 5.47 kB
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("@darkpay/dark-types").CommonData<import("@darkpay/dark-types/build/substrate/interfaces").Storefront, import("@darkpay/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("@darkpay/dark-types").CommonData<import("@darkpay/dark-types/build/substrate/interfaces").Storefront, import("@darkpay/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("@darkpay/dark-types").CommonData<import("@darkpay/dark-types/build/substrate/interfaces").Storefront, import("@darkpay/dark-types").StorefrontContent>[]>; findAllProducts(ids: AnyStorefrontId[]): Promise<import("@darkpay/dark-types").CommonData<import("@darkpay/dark-types/build/substrate/interfaces").Product, import("@darkpay/dark-types").ProductContent>[]>; findAllOrderings(ids: AnyOrderingId[]): Promise<import("@darkpay/dark-types").CommonData<import("@darkpay/dark-types/build/substrate/interfaces").Ordering, import("@darkpay/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("@darkpay/dark-types").CommonData<import("@darkpay/dark-types/build/substrate/interfaces").Product, import("@darkpay/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("@darkpay/dark-types").CommonData<import("@darkpay/dark-types/build/substrate/interfaces").Product, import("@darkpay/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("@darkpay/dark-types").CommonData<import("@darkpay/dark-types/build/substrate/interfaces").Ordering, import("@darkpay/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("@darkpay/dark-types").CommonData<import("@darkpay/dark-types/build/substrate/interfaces").Storefront, import("@darkpay/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("@darkpay/dark-types").CommonData<import("@darkpay/dark-types/build/substrate/interfaces").Storefront, import("@darkpay/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("@darkpay/dark-types").CommonData<import("@darkpay/dark-types/build/substrate/interfaces").Product, import("@darkpay/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("@darkpay/dark-types").CommonData<import("@darkpay/dark-types/build/substrate/interfaces").Product, import("@darkpay/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>; }