genuka-api
Version:
Javascript(TS) Package to use Genuka API for a StoreFront website
447 lines (424 loc) • 10.4 kB
text/typescript
declare class CompanyService {
retrieve(): Promise<any>;
}
declare class ShopService {
model: string;
page: number;
limit: number;
filter: {};
sort: any[];
include: any[];
queries: {};
count(): Promise<any>;
list(props: any): Promise<any>;
retrieve({ id, handle }: {
id: any;
handle: any;
}): Promise<any>;
}
declare class SubscriptionService {
model: string;
page: number;
limit: number;
filter: {};
sort: any[];
include: any[];
queries: {};
retrieve({ id }: {
id: any;
}): Promise<any>;
list(props: any): Promise<any>;
}
declare class DiscountService {
model: string;
page: number;
limit: number;
filter: {};
sort: any[];
include: any[];
queries: {};
count(): Promise<any>;
retrieve({ id, code }: {
id: any;
code: any;
}): Promise<any>;
getAutomatics(data: any): Promise<any>;
}
declare class DeliveryService {
model: string;
page: number;
limit: number;
filter: {};
sort: any[];
include: any[];
queries: {};
count(isAdmin?: boolean): Promise<any>;
list(props: any): Promise<any>;
retrieve(id: any, isAdmin?: boolean): Promise<any>;
create({ isAdmin, ...data }: {
[x: string]: any;
isAdmin?: boolean | undefined;
}): Promise<any>;
}
declare class BillService {
model: string;
page: number;
limit: number;
filter: {};
sort: any[];
include: any[];
queries: {};
count(): Promise<any>;
list(props: any): Promise<any>;
retrieve(id: any): Promise<any>;
create({ ...data }: {
[x: string]: any;
}): Promise<any>;
}
declare class ReturnsService {
model: string;
page: number;
limit: number;
filter: {};
sort: any[];
include: any[];
queries: {};
count(): Promise<any>;
list(props: any): Promise<any>;
retrieve(id: any): Promise<any>;
create({ ...data }: {
[x: string]: any;
}): Promise<any>;
}
declare class InvoicesService {
model: string;
page: number;
limit: number;
filter: {};
sort: any[];
include: any[];
queries: {};
count(): Promise<any>;
list(props: any): Promise<any>;
retrieve(id: any): Promise<any>;
create({ ...data }: {
[x: string]: any;
}): Promise<any>;
}
declare class ProductVariantService {
model: string;
page: number;
limit: number;
filter: {};
sort: any[];
include: any[];
queries: {};
count(): Promise<any>;
list(props: any): Promise<any>;
retrieve({ id, handle, queries }: {
id: any;
handle: any;
queries: any;
}): Promise<any>;
}
declare class ProductService {
productVariantService: ProductVariantService;
page: number;
limit: number;
filter: {};
sort: any[];
include: any[];
queries: {};
get variants(): ProductVariantService;
count(): Promise<any>;
list(props: any): Promise<any>;
retrieve({ id, handle, queries }: {
id: any;
handle: any;
queries: any;
}): Promise<any>;
similar({ id, handle, limit }: {
id: any;
handle: any;
limit: any;
}): Promise<any>;
}
declare class PageService {
model: string;
page: number;
limit: number;
filter: {};
sort: any[];
include: any[];
queries: {};
count(): Promise<any>;
list(props: any): Promise<any>;
retrieve({ id, handle }: {
id: any;
handle: any;
}): Promise<any>;
similar({ id, handle, limit }: {
id: any;
handle: any;
limit: any;
}): Promise<any>;
}
declare class BlogService {
model: string;
page: number;
limit: number;
filter: {};
sort: any[];
include: any[];
queries: {};
count(): Promise<any>;
list(props: any): Promise<any>;
retrieve({ id, handle }: {
id: any;
handle: any;
}): Promise<any>;
similar({ id, handle, limit }: {
id: any;
handle: any;
limit: any;
}): Promise<any>;
}
declare class ArticleService {
model: string;
page: number;
limit: number;
filter: {};
sort: any[];
include: any[];
queries: {};
count(): Promise<any>;
list(props: any): Promise<any>;
retrieve({ id, handle }: {
id: any;
handle: any;
}): Promise<any>;
similar({ id, handle, limit }: {
id: any;
handle: any;
limit: any;
}): Promise<any>;
}
declare class CollectionService {
model: string;
page: number;
limit: number;
filter: {};
sort: any[];
include: any[];
queries: {};
count(): Promise<any>;
list(props: any): Promise<any>;
retrieve({ id, handle }: {
id: any;
handle: any;
}): Promise<any>;
similar({ id, handle, limit }: {
id: any;
handle: any;
limit: any;
}): Promise<any>;
}
declare class PaymentMethodService {
model: string;
page: number;
limit: number;
filter: {};
sort: any[];
include: any[];
queries: {};
count(): Promise<any>;
list(props: any): Promise<any>;
retrieve({ id, handle }: {
id: any;
handle: any;
}): Promise<any>;
}
declare class CustomerService {
register({ first_name, last_name, email, phone, gender, password, password_confirmation, }: {
first_name: any;
last_name: any;
email: any;
phone: any;
gender: any;
password: any;
password_confirmation: any;
}): Promise<any>;
login({ email, phone, password }: {
email: any;
phone: any;
password: any;
}): Promise<any>;
getResetLinkToken({ email }: {
email: any;
}): Promise<any>;
resetPassword({ email, token, password, password_confirmation }: {
email: any;
token: any;
password: any;
password_confirmation: any;
}): Promise<any>;
me(): Promise<any>;
retrieve(): Promise<any>;
update({ first_name, last_name, email, phone, gender, password, password_confirmation, }: {
first_name: any;
last_name: any;
email: any;
phone: any;
gender: any;
password: any;
password_confirmation: any;
}): Promise<any>;
changePassword({ current_password, new_password }: {
current_password: any;
new_password: any;
}): Promise<any>;
logout(): Promise<any>;
}
declare class OrderService {
model: string;
page: number;
limit: number;
filter: {};
sort: any[];
include: any[];
queries: {};
count(isAdmin?: boolean): Promise<any>;
list(props: any): Promise<any>;
retrieve(id: any, isAdmin?: boolean): Promise<any>;
create({ isAdmin, ...data }: {
[x: string]: any;
isAdmin?: boolean | undefined;
}): Promise<any>;
}
declare class AddressService {
page: number;
limit: number;
filter: {};
sort: any[];
include: any[];
queries: {};
list(props: any): Promise<any>;
retrieve({ id }: {
id: any;
}): Promise<any>;
create(data: any): Promise<any>;
update({ id, ...data }: {
[x: string]: any;
id: any;
}): Promise<any>;
delete({ id }: {
id: any;
}): Promise<any>;
}
declare class CartService {
items: any[];
total: number;
evaluateTotal(): void;
set(items?: any[]): void;
add(item: any): void;
checkAvailability(item: any): Promise<boolean>;
remove(variant_id: any): void;
clear(): void;
retrieve(): any[];
update(variant_id: any, itemObj: any): void;
}
declare class ShippingService {
model: string;
page: number;
limit: number;
filter: {};
sort: any[];
include: any[];
queries: {};
count(): Promise<any>;
list(props: any): Promise<any>;
retrieve({ id, handle }: {
id: any;
handle: any;
}): Promise<any>;
similar({ id, handle, limit }: {
id: any;
handle: any;
limit: any;
}): Promise<any>;
}
declare class PickupService {
model: string;
page: number;
limit: number;
filter: {};
sort: any[];
include: any[];
queries: {};
count(): Promise<any>;
list(props: any): Promise<any>;
retrieve({ id, handle }: {
id: any;
handle: any;
}): Promise<any>;
similar({ id, handle, limit }: {
id: any;
handle: any;
limit: any;
}): Promise<any>;
}
declare class Genuka {
static instance: null;
static initialize(config?: {}): Promise<Genuka>;
constructor(props: any);
companyService: CompanyService;
shopService: ShopService;
subscriptionService: SubscriptionService;
discountService: DiscountService;
deliveryService: DeliveryService;
billService: BillService;
returnService: ReturnsService;
invoicesService: InvoicesService;
productService: ProductService;
pageService: PageService;
blogService: BlogService;
articleService: ArticleService;
collectionService: CollectionService;
paymentMethodService: PaymentMethodService;
customerService: CustomerService;
orderService: OrderService;
addressService: AddressService;
cartService: CartService;
shippingsService: ShippingService;
pickupsService: PickupService;
companyId: null;
shopId: null;
setup({ domain }: {
domain: any;
}): Promise<void>;
getCompanyIdByDomain(domain: any): Promise<any>;
setToken(token: any): void;
setShopId(shopId: any): void;
setCompanyId(companyId: any): void;
get company(): CompanyService;
get shops(): ShopService;
get subscriptions(): SubscriptionService;
get discounts(): DiscountService;
get deliveries(): DeliveryService;
get bills(): BillService;
get returns(): ReturnsService;
get invoices(): InvoicesService;
get products(): ProductService;
get pages(): PageService;
get shippings(): ShippingService;
get pickups(): PickupService;
get articles(): ArticleService;
get blogs(): BlogService;
get collections(): CollectionService;
get paymentMethods(): PaymentMethodService;
get customers(): CustomerService;
get orders(): OrderService;
get addresses(): AddressService;
get cart(): CartService;
}
export { Genuka as default };