UNPKG

@fabrix/spool-cart

Version:

Spool - eCommerce Spool for Fabrix

206 lines (205 loc) 5.7 kB
import { FabrixModel as Model } from '@fabrix/fabrix/dist/common'; import { SequelizeResolver } from '@fabrix/spool-sequelize'; export declare class CollectionResolver extends SequelizeResolver { findByIdDefault(id: any, options?: {}): any; findByHandleDefault(handle: any, options?: {}): any; findOneDefault(options?: {}): any; findAllDefault(options?: {}): any; findAndCountDefault(options?: {}): any; resolveByInstance(collection: any, options?: { [key: string]: any; }): Promise<any>; resolveById(collection: any, options?: { [key: string]: any; }): any; resolveByHandle(collection: any, options?: { [key: string]: any; }): any; resolveByNumber(collection: any, options?: { [key: string]: any; }): any; resolveByString(collection: any, options?: { [key: string]: any; }): any; resolve(collection: any, options?: { [key: string]: any; }): any; resolveOrCreate(collection: any, options?: { [key: string]: any; }): any; transformCollections(collections?: any[], options?: { [key: string]: any; }): any; reverseTransformCollections(collections: any): any; } export declare class Collection extends Model { static readonly resolver: typeof CollectionResolver; static config(app: any, Sequelize: any): { options: { underscored: boolean; enums: { COLLECTION_SORT_ORDER: { ALPHA_ASC: string; ALPHA_DESC: string; BEST_SELLING: string; CREATED: string; CREATED_DESC: string; MANUAL: string; PRICE_ASC: string; PRICE_DESC: string; }; COLLECTION_PURPOSE: { NAVIGATION: string; VENDOR: string; GROUP: string; DISCOUNT: string; SHIPPING: string; TAXES: string; }; COLLECTION_DISCOUNT_SCOPE: { INDIVIDUAL: string; GLOBAL: string; }; COLLECTION_DISCOUNT_TYPE: { PERCENTAGE: string; FIXED: string; RATE: string; }; COLLECTION_TAX_TYPE: { PERCENTAGE: string; FIXED: string; }; }; scopes: { live: { where: { live_mode: boolean; }; }; }; hooks: { beforeValidate: ((collection: any, options: any) => void)[]; beforeCreate: ((collection: any, options: any) => void)[]; beforeUpdate: ((collection: any, options: any) => void)[]; }; }; }; static schema(app: any, Sequelize: any): { handle: { type: any; allowNull: boolean; unique: boolean; set: (val: any) => void; }; title: { type: any; allowNull: boolean; set: (val: any) => void; }; seo_title: { type: any; set: (val: any) => void; }; seo_description: { type: any; set: (val: any) => void; }; primary_purpose: { type: any; values: string[]; defaultValue: string; }; shop_id: { type: any; }; description: { type: any; }; excerpt: { type: any; }; excerpt_html: { type: any; }; body: { type: any; }; body_html: { type: any; }; published: { type: any; defaultValue: boolean; }; published_at: { type: any; defaultValue: any; }; published_scope: { type: any; defaultValue: string; }; unpublished_at: { type: any; }; position: { type: any; defaultValue: number; }; sort_order: { type: any; values: string[]; defaultValue: string; }; tax_type: { type: any; values: string[]; defaultValue: string; }; tax_rate: { type: any; defaultValue: number; }; tax_percentage: { type: any; defaultValue: number; }; tax_name: { type: any; }; shipping_type: { type: any; values: string[]; defaultValue: string; }; shipping_rate: { type: any; defaultValue: number; }; shipping_percentage: { type: any; defaultValue: number; }; shipping_name: { type: any; }; shipping_product_exclude: { type: any; defaultValue: any[]; }; tax_product_exclude: { type: any; defaultValue: any[]; }; live_mode: { type: any; defaultValue: any; }; }; static associate(models: any): void; } export interface Collection { toJSON(): any; resolveMetadata(options: any): any; resolveDiscounts(options: any): any; }