UNPKG

@fabrix/spool-cart

Version:

Spool - eCommerce Spool for Fabrix

254 lines (253 loc) 6.53 kB
import { FabrixApp } from '@fabrix/fabrix'; import { FabrixModel as Model } from '@fabrix/fabrix/dist/common'; import { SequelizeResolver } from '@fabrix/spool-sequelize'; export declare class OrderItemResolver extends SequelizeResolver { resolve(item: any, options?: { [key: string]: any; }): any; } export declare class OrderItem extends Model { static readonly resolver: typeof OrderItemResolver; static config(app: any, Sequelize: any): { options: { underscored: boolean; enums: { INTERVALS: { NONE: any; DAY: string; WEEK: string; BIWEEK: string; MONTH: string; BIMONTH: string; YEAR: string; BIYEAR: string; }; FULFILLMENT_STATUS: { PENDING: string; FULFILLED: string; SENT: string; NONE: string; PARTIAL: string; CANCELLED: string; }; FULFILLMENT_SERVICE: { MANUAL: string; }; }; scopes: { live: { where: { live_mode: boolean; }; }; }; hooks: { beforeCreate: ((orderItem: any, options: any) => any)[]; beforeSave: ((orderItem: any, options: any) => any)[]; beforeUpdate: ((orderItem: any, options: any) => any)[]; afterCreate: ((orderItem: any, options: any) => any)[]; afterUpdate: ((orderItem: any, options: any) => any)[]; afterDestroy: ((orderItem: any, options: any) => any)[]; }; }; }; static schema(app: any, Sequelize: any): { order_id: { type: any; allowNull: boolean; }; customer_id: { type: any; }; fulfillment_id: { type: any; }; product_id: { type: any; allowNull: boolean; }; product_handle: { type: any; allowNull: boolean; }; variant_id: { type: any; allowNull: boolean; }; subscription_id: { type: any; }; refund_id: { type: any; }; gift_card_id: { type: any; }; shop_id: { type: any; }; option: { type: any; defaultValue: {}; }; fulfillable_quantity: { type: any; defaultValue: number; }; max_quantity: { type: any; defaultValue: number; }; fulfillment_service: { type: any; defaultValue: string; }; fulfillment_status: { type: any; values: string[]; defaultValue: string; }; grams: { type: any; defaultValue: number; }; compare_at_price: { type: any; defaultValue: number; }; price: { type: any; defaultValue: number; }; calculated_price: { type: any; defaultValue: number; }; price_per_unit: { type: any; defaultValue: number; }; quantity: { type: any; }; requires_taxes: { type: any; defaultValue: boolean; }; requires_shipping: { type: any; defaultValue: boolean; }; requires_subscription: { type: any; defaultValue: boolean; }; subscription_interval: { type: any; defaultValue: number; }; subscription_unit: { type: any; values: any[]; defaultValue: any; }; sku: { type: any; }; type: { type: any; }; title: { type: any; }; variant_title: { type: any; }; vendor_id: { type: any; }; name: { type: any; }; gift_card: { type: any; }; properties: { type: any; defaultValue: {}; }; property_pricing: { type: any; defaultValue: {}; }; taxable: { type: any; }; tax_code: { type: any; defaultValue: string; }; discounted_lines: { type: any; defaultValue: any[]; }; coupon_lines: { type: any; defaultValue: any[]; }; shipping_lines: { type: any; defaultValue: any[]; }; tax_lines: { type: any; defaultValue: any[]; }; total_discounts: { type: any; defaultValue: number; }; total_coupons: { type: any; defaultValue: number; }; total_shipping: { type: any; defaultValue: number; }; total_taxes: { type: any; defaultValue: number; }; average_shipping: { type: any; defaultValue: number; }; exclude_payment_types: { type: any; defaultValue: any[]; }; images: { type: any; defaultValue: any[]; }; live_mode: { type: any; defaultValue: any; }; }; static associate(models: any): void; } export interface OrderItem { resetDefaults(app: FabrixApp): any; addShipping(shipping: any, options: any): any; removeShipping(shipping: any, options: any): any; setItemsShippingLines(shippingLine: any): any; setShippingLines(lines: any): any; setItemsTaxLines(taxedLine: any): any; setTaxLines(lines: any): any; setProperties(prev: any): any; setTotals(app: FabrixApp): any; recalculate(options: any): any; reconcileFulfillment(options: any): any; }