UNPKG

@thedev132/yellowpages

Version:

HCB Yellow Pages for JS/TS

61 lines (57 loc) 1.42 kB
declare class Category { private static categoriesByCode; private static categoriesByKey; private code?; private key?; constructor({ code, key }: { code?: string; key?: string; }); static initialize(): Promise<void>; static lookup(params: { code?: string; key?: string; }): Category; private get category(); getCode(): string | undefined; getName(): string | undefined; getKey(): string | undefined; inDataset(): boolean; } declare class Merchant { private static merchants; private networkId; constructor({ networkId }: { networkId: string; }); static initialize(): Promise<void>; static lookup(params: { networkId: string; }): Merchant; private get merchant(); getName(): string | undefined; getIcon(): Promise<string | undefined>; inDataset(): boolean; } type CategoryData = { code: string; name: string; key: string; }; type MerchantData = { name: string; network_ids: string[]; }; type CategoriesMap = { [code: string]: CategoryData; }; type CategoriesByKeyMap = { [key: string]: CategoryData; }; type MerchantsMap = { [networkId: string]: { name: string; iconUrl: string; }; }; export { type CategoriesByKeyMap, type CategoriesMap, Category, type CategoryData, Merchant, type MerchantData, type MerchantsMap };