@use-stall/core 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,86 +1,6 @@
1
- import { ConnectorModuleKey, UnifiedProductType, UnifiedVariantsType, UnifiedCollectionType, UnifiedCategoryType, UnifiedTagProductTag, UnifiedInventoryLevelType, UnifiedPromotion, UnifiedOrderType, UnifiedOrderNote, UnifiedOrderRefundType, UnifiedPaymentProviderType, UnifiedPaymentCollectionType, UnifiedTaxRate, UnifiedTaxClass, UnifiedCustomerType, UnifiedLocationType, UnifiedFulfillmentMethodType, UnifiedFulfillmentProviderConfigType, UnifiedFulfillmentType } from '@use-stall/types';
1
+ import { StallCoreConfigOptions, CoreConfig, UnifiedProductType, UnifiedOrderType, UnifiedCustomerType, UnifiedCollectionType, UnifiedCategoryType, UnifiedVariantsType, UnifiedInventoryLevelType, UnifiedPromotion, UnifiedOrderNote, UnifiedOrderRefundType, UnifiedPaymentProviderType, UnifiedPaymentCollectionType, UnifiedTaxRate, UnifiedTaxClass, UnifiedLocationType, UnifiedFulfillmentType, ConnectorModuleKey } from '@use-stall/types';
2
2
  import Dexie, { EntityTable } from 'dexie';
3
3
 
4
- interface StallCoreConfigOptions {
5
- connector_url: string;
6
- version: string;
7
- configuration: Record<string, any>;
8
- }
9
-
10
- interface CoreConfig {
11
- options: StallCoreConfigOptions;
12
- adapter: () => Promise<AdapterModuleType>;
13
- refreshAdapter: () => Promise<AdapterModuleType>;
14
- }
15
-
16
- type ModuleTypeMap = {
17
- products: UnifiedProductType;
18
- variants: UnifiedVariantsType;
19
- collections: UnifiedCollectionType;
20
- categories: UnifiedCategoryType;
21
- tags: UnifiedTagProductTag;
22
- inventory_levels: UnifiedInventoryLevelType;
23
- inventory_history: UnifiedInventoryLevelType;
24
- promotions: UnifiedPromotion;
25
- orders: UnifiedOrderType;
26
- order_notes: UnifiedOrderNote;
27
- refunds: UnifiedOrderRefundType;
28
- payment_providers: UnifiedPaymentProviderType;
29
- payments: UnifiedPaymentCollectionType;
30
- tax_rates: UnifiedTaxRate;
31
- tax_classes: UnifiedTaxClass;
32
- customers: UnifiedCustomerType;
33
- locations: UnifiedLocationType;
34
- fulfillment_types: UnifiedFulfillmentMethodType;
35
- fulfillment_providers: UnifiedFulfillmentProviderConfigType;
36
- fulfillments: UnifiedFulfillmentType;
37
- };
38
-
39
- // Extended module key that includes tax_classes
40
- type ExtendedModuleKey$1 = ConnectorModuleKey | "tax_classes";
41
-
42
- type GetModuleType<K extends ExtendedModuleKey$1> = K extends keyof ModuleTypeMap
43
- ? ModuleTypeMap[K]
44
- : never;
45
-
46
- type AdapterModuleType = {
47
- [K in ExtendedModuleKey$1]: {
48
- list: (props: {
49
- connector_config: Record<string, any>;
50
- query?: string;
51
- }) => Promise<GetModuleType<K>[]>;
52
- retrieve: (props: {
53
- connector_config: Record<string, any>;
54
- id: string;
55
- }) => Promise<GetModuleType<K>>;
56
- create: (props: {
57
- connector_config: Record<string, any>;
58
- data: GetModuleType<K>;
59
- }) => Promise<GetModuleType<K>>;
60
- update: (props: {
61
- connector_config: Record<string, any>;
62
- id: string;
63
- data: Partial<GetModuleType<K>>;
64
- }) => Promise<GetModuleType<K>>;
65
- delete: (props: {
66
- connector_config: Record<string, any>;
67
- id: string;
68
- }) => Promise<void>;
69
- bulk_create: (props: {
70
- connector_config: Record<string, any>;
71
- data: GetModuleType<K>[];
72
- }) => Promise<GetModuleType<K>[]>;
73
- bulk_update: (props: {
74
- connector_config: Record<string, any>;
75
- data: Array<{ id: string; data: Partial<GetModuleType<K>> }>;
76
- }) => Promise<GetModuleType<K>[]>;
77
- bulk_delete: (props: {
78
- connector_config: Record<string, any>;
79
- ids: string[];
80
- }) => Promise<void>;
81
- };
82
- };
83
-
84
4
  declare const initializeStallCore: (options: StallCoreConfigOptions) => CoreConfig;
85
5
 
86
6
  declare const products: {
@@ -904,4 +824,4 @@ declare const is_online: () => boolean;
904
824
  */
905
825
  declare const is_offline: () => boolean;
906
826
 
907
- export { type CoreConfig, type StallCoreConfigOptions, add_sync_log, add_to_sync_queue, categories, cleanup_old_sync_logs, collections, customers, fulfillments, generate_offline_id, get_pending_sync_queue, get_recent_sync_logs, get_sync_logs_by_batch, initializeStallCore, inventory_levels, is_offline, is_online, is_sync_queue_empty, local_db, locations, order_notes, orders, payment_providers, payments, products, promotions, refunds, remove_from_sync_queue, save_bulk_data, sync_service, tax_classes, tax_rates, update_sync_queue_status, variants };
827
+ export { add_sync_log, add_to_sync_queue, categories, cleanup_old_sync_logs, collections, customers, fulfillments, generate_offline_id, get_pending_sync_queue, get_recent_sync_logs, get_sync_logs_by_batch, initializeStallCore, inventory_levels, is_offline, is_online, is_sync_queue_empty, local_db, locations, order_notes, orders, payment_providers, payments, products, promotions, refunds, remove_from_sync_queue, save_bulk_data, sync_service, tax_classes, tax_rates, update_sync_queue_status, variants };
package/dist/index.d.ts CHANGED
@@ -1,86 +1,6 @@
1
- import { ConnectorModuleKey, UnifiedProductType, UnifiedVariantsType, UnifiedCollectionType, UnifiedCategoryType, UnifiedTagProductTag, UnifiedInventoryLevelType, UnifiedPromotion, UnifiedOrderType, UnifiedOrderNote, UnifiedOrderRefundType, UnifiedPaymentProviderType, UnifiedPaymentCollectionType, UnifiedTaxRate, UnifiedTaxClass, UnifiedCustomerType, UnifiedLocationType, UnifiedFulfillmentMethodType, UnifiedFulfillmentProviderConfigType, UnifiedFulfillmentType } from '@use-stall/types';
1
+ import { StallCoreConfigOptions, CoreConfig, UnifiedProductType, UnifiedOrderType, UnifiedCustomerType, UnifiedCollectionType, UnifiedCategoryType, UnifiedVariantsType, UnifiedInventoryLevelType, UnifiedPromotion, UnifiedOrderNote, UnifiedOrderRefundType, UnifiedPaymentProviderType, UnifiedPaymentCollectionType, UnifiedTaxRate, UnifiedTaxClass, UnifiedLocationType, UnifiedFulfillmentType, ConnectorModuleKey } from '@use-stall/types';
2
2
  import Dexie, { EntityTable } from 'dexie';
3
3
 
4
- interface StallCoreConfigOptions {
5
- connector_url: string;
6
- version: string;
7
- configuration: Record<string, any>;
8
- }
9
-
10
- interface CoreConfig {
11
- options: StallCoreConfigOptions;
12
- adapter: () => Promise<AdapterModuleType>;
13
- refreshAdapter: () => Promise<AdapterModuleType>;
14
- }
15
-
16
- type ModuleTypeMap = {
17
- products: UnifiedProductType;
18
- variants: UnifiedVariantsType;
19
- collections: UnifiedCollectionType;
20
- categories: UnifiedCategoryType;
21
- tags: UnifiedTagProductTag;
22
- inventory_levels: UnifiedInventoryLevelType;
23
- inventory_history: UnifiedInventoryLevelType;
24
- promotions: UnifiedPromotion;
25
- orders: UnifiedOrderType;
26
- order_notes: UnifiedOrderNote;
27
- refunds: UnifiedOrderRefundType;
28
- payment_providers: UnifiedPaymentProviderType;
29
- payments: UnifiedPaymentCollectionType;
30
- tax_rates: UnifiedTaxRate;
31
- tax_classes: UnifiedTaxClass;
32
- customers: UnifiedCustomerType;
33
- locations: UnifiedLocationType;
34
- fulfillment_types: UnifiedFulfillmentMethodType;
35
- fulfillment_providers: UnifiedFulfillmentProviderConfigType;
36
- fulfillments: UnifiedFulfillmentType;
37
- };
38
-
39
- // Extended module key that includes tax_classes
40
- type ExtendedModuleKey$1 = ConnectorModuleKey | "tax_classes";
41
-
42
- type GetModuleType<K extends ExtendedModuleKey$1> = K extends keyof ModuleTypeMap
43
- ? ModuleTypeMap[K]
44
- : never;
45
-
46
- type AdapterModuleType = {
47
- [K in ExtendedModuleKey$1]: {
48
- list: (props: {
49
- connector_config: Record<string, any>;
50
- query?: string;
51
- }) => Promise<GetModuleType<K>[]>;
52
- retrieve: (props: {
53
- connector_config: Record<string, any>;
54
- id: string;
55
- }) => Promise<GetModuleType<K>>;
56
- create: (props: {
57
- connector_config: Record<string, any>;
58
- data: GetModuleType<K>;
59
- }) => Promise<GetModuleType<K>>;
60
- update: (props: {
61
- connector_config: Record<string, any>;
62
- id: string;
63
- data: Partial<GetModuleType<K>>;
64
- }) => Promise<GetModuleType<K>>;
65
- delete: (props: {
66
- connector_config: Record<string, any>;
67
- id: string;
68
- }) => Promise<void>;
69
- bulk_create: (props: {
70
- connector_config: Record<string, any>;
71
- data: GetModuleType<K>[];
72
- }) => Promise<GetModuleType<K>[]>;
73
- bulk_update: (props: {
74
- connector_config: Record<string, any>;
75
- data: Array<{ id: string; data: Partial<GetModuleType<K>> }>;
76
- }) => Promise<GetModuleType<K>[]>;
77
- bulk_delete: (props: {
78
- connector_config: Record<string, any>;
79
- ids: string[];
80
- }) => Promise<void>;
81
- };
82
- };
83
-
84
4
  declare const initializeStallCore: (options: StallCoreConfigOptions) => CoreConfig;
85
5
 
86
6
  declare const products: {
@@ -904,4 +824,4 @@ declare const is_online: () => boolean;
904
824
  */
905
825
  declare const is_offline: () => boolean;
906
826
 
907
- export { type CoreConfig, type StallCoreConfigOptions, add_sync_log, add_to_sync_queue, categories, cleanup_old_sync_logs, collections, customers, fulfillments, generate_offline_id, get_pending_sync_queue, get_recent_sync_logs, get_sync_logs_by_batch, initializeStallCore, inventory_levels, is_offline, is_online, is_sync_queue_empty, local_db, locations, order_notes, orders, payment_providers, payments, products, promotions, refunds, remove_from_sync_queue, save_bulk_data, sync_service, tax_classes, tax_rates, update_sync_queue_status, variants };
827
+ export { add_sync_log, add_to_sync_queue, categories, cleanup_old_sync_logs, collections, customers, fulfillments, generate_offline_id, get_pending_sync_queue, get_recent_sync_logs, get_sync_logs_by_batch, initializeStallCore, inventory_levels, is_offline, is_online, is_sync_queue_empty, local_db, locations, order_notes, orders, payment_providers, payments, products, promotions, refunds, remove_from_sync_queue, save_bulk_data, sync_service, tax_classes, tax_rates, update_sync_queue_status, variants };
package/dist/index.js CHANGED
@@ -70,26 +70,26 @@ var import_dexie = __toESM(require("dexie"));
70
70
 
71
71
  // src/db/schema.ts
72
72
  var schemas = {
73
- connector_cache: "id",
74
- sync_queue: "++id, status, timestamp, priority, table, stall_offline_id, action, retry_count",
75
- sync_logs: "++id, sync_batch_id, timestamp, table, action, status, stall_offline_id",
76
- products: "++id, sku, barcode, title, handle, description, body_html, created_at, updated_at, deleted_at, status, type, thumbnail, brand, tags, categories, attributes, collections, variants, price, sale_price, price_currency, cost_price, taxable, tax_class, on_sale, track_inventory, unavailable, committed, in_stock, on_hand, low_stock_threshold, locations, weight, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
73
+ connector_cache: "id, code, timestamp",
74
+ sync_queue: "++id, action, table, document_id, stall_offline_id, data, timestamp, status, error, retry_count, last_retry_at, priority",
75
+ sync_logs: "++id, sync_batch_id, table, action, document_id, stall_offline_id, connector_id, status, error, timestamp, duration_ms",
76
+ products: "++id, sku, barcode, title, handle, description, body_html, created_at, updated_at, deleted_at, channels, status, type, thumbnail, images, brand, tags, categories, attributes, collections, variants, price, sale_price, price_currency, cost_price, taxable, tax_class, on_sale, track_inventory, unavailable, committed, in_stock, on_hand, low_stock_threshold, locations, weight, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
77
77
  variants: "++id, sku, barcode, product_id, date, title, description, price, cost_price, sale_price, on_sale, status, track_inventory, unavailable, committed, in_stock, on_hand, low_stock_threshold, weight, thumbnail, attributes, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
78
78
  collections: "++id, name, description, thumbnail, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at, linked_products, linked_categories, createAt, lastUpdatedAt",
79
79
  categories: "++id, name, description, thumbnail, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at, date, count, parent_id",
80
80
  inventory_levels: "++id, location_id, product_id, variant_id, unavailable, committed, in_stock, on_hand, low_stock_threshold, last_updatedAt, created_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
81
81
  inventory_history: "++id, location_id, product_id, variant_id, unavailable, committed, in_stock, on_hand, low_stock_threshold, last_updatedAt, created_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
82
- promotions: "++id, name, type, active, start_date, end_date, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at",
83
- orders: "++id, order_number, customer_id, location_id, status, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at",
84
- order_notes: "++id, order_id, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at",
85
- refunds: "++id, order_id, payment_id, status, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at",
86
- payment_providers: "++id, name, type, active, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at",
87
- payments: "++id, order_id, status, method, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at",
88
- tax_rates: "++id,name,class,jurisdiction.country,jurisdiction.states,jurisdiction.postcode,jurisdiction.locations,rate,type,calculation_base,application,priority,compound,rules,metadata.stall_offline_id,metadata.stall_offline_created_at,metadata.stall_offline_updated_at,metadata.stall_offline_deleted_at",
89
- tax_classes: "++id, name, tax_calculation, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
90
- customers: "++id, email, phone, name, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at",
91
- locations: "++id, name, city, country, region, active, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at",
92
- fulfillments: "++id, order_id, status, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at"
82
+ promotions: "++id, title, code, status, is_automatic, usage_limit, usage_limit_per_customer, usage_count, starts_at, ends_at, priority, is_stackable, eligibility_rules, application.type, application.value, application.currency, application.target_type, application.allocation, application.max_quantity, application.balance, application.buy_x_get_y.buy_quantity, application.buy_x_get_y.get_quantity, application.buy_x_get_y.buy_rules, application.buy_x_get_y.get_rules, application.buy_x_get_y.discount_percentage, application.buy_x_get_y.max_applications, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
83
+ orders: "++id, location_id, organization_id, channel_id, device_id, staff_id, order_number, status, created_at, updated_at, origin.name, origin.id, origin.version, checkout_token, customer_id, customer_note, billing.address_name, billing.company, billing.first_name, billing.last_name, billing.address_1, billing.address_2, billing.city, billing.country_code, billing.province, billing.postal_code, shipping_address.address_name, shipping_address.company, shipping_address.first_name, shipping_address.last_name, shipping_address.address_1, shipping_address.address_2, shipping_address.city, shipping_address.country_code, shipping_address.province, shipping_address.postal_code, line_items, currency, payment.total_amount, payment.tip_amount, payment.overcharge_amount, payment.currency, payment.date, payment.timestamp, payment.payments, payment.status, subtotal, total, tax, tax_lines, discount, discounts, fulfillment.status, fulfillment.fulfillments, refunds, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
84
+ order_notes: "++id, order_id, note, visibility, source, created_by, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
85
+ refunds: "++id, amount, reason, date, status, restock, refund_type, line_items, payments, staff_id, device_id, location_id, organization_id, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
86
+ payment_providers: "++id, title, description, logo, supported_methods, supported_countries, integration_url, integration_docs, active, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
87
+ payments: "++id, order_id, user_id, session_id, organization, location, created_at, updated_at, status, type, amount.currency, amount.value, provider_id, payment_method.type, payment_method.offline_support, payment_method.instant_clear, note, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
88
+ tax_rates: "++id, name, class, jurisdiction.country, jurisdiction.states, jurisdiction.postcode, jurisdiction.locations, rate, type, calculation_base, application, priority, compound, rules, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
89
+ tax_classes: "++id, name, tax_calculation, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
90
+ customers: "++id, email, company_name, first_name, last_name, billing_address.address_name, billing_address.company, billing_address.first_name, billing_address.last_name, billing_address.address_1, billing_address.address_2, billing_address.city, billing_address.country_code, billing_address.province, billing_address.postal_code, shipping_address.address_name, shipping_address.company, shipping_address.first_name, shipping_address.last_name, shipping_address.address_1, shipping_address.address_2, shipping_address.city, shipping_address.country_code, shipping_address.province, shipping_address.postal_code, phone, created_at, updated_at, deleted_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
91
+ locations: "++id, name, address, city, country, region, base_currency, timezone, organization_id, created_at, updated_at, active, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
92
+ fulfillments: "++id, order_id, tracking_number, method, provider, status, created_at, updated_at, delivered_at, line_items, fees.subtotal, fees.total, fees.currency, address.destination.address_name, address.destination.company, address.destination.first_name, address.destination.last_name, address.destination.address_1, address.destination.address_2, address.destination.city, address.destination.country_code, address.destination.province, address.destination.postal_code, address.departure.address_name, address.departure.company, address.departure.first_name, address.departure.last_name, address.departure.address_1, address.departure.address_2, address.departure.city, address.departure.country_code, address.departure.province, address.departure.postal_code, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at"
93
93
  };
94
94
 
95
95
  // src/db/db.ts
package/dist/index.mjs CHANGED
@@ -3,26 +3,26 @@ import Dexie from "dexie";
3
3
 
4
4
  // src/db/schema.ts
5
5
  var schemas = {
6
- connector_cache: "id",
7
- sync_queue: "++id, status, timestamp, priority, table, stall_offline_id, action, retry_count",
8
- sync_logs: "++id, sync_batch_id, timestamp, table, action, status, stall_offline_id",
9
- products: "++id, sku, barcode, title, handle, description, body_html, created_at, updated_at, deleted_at, status, type, thumbnail, brand, tags, categories, attributes, collections, variants, price, sale_price, price_currency, cost_price, taxable, tax_class, on_sale, track_inventory, unavailable, committed, in_stock, on_hand, low_stock_threshold, locations, weight, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
6
+ connector_cache: "id, code, timestamp",
7
+ sync_queue: "++id, action, table, document_id, stall_offline_id, data, timestamp, status, error, retry_count, last_retry_at, priority",
8
+ sync_logs: "++id, sync_batch_id, table, action, document_id, stall_offline_id, connector_id, status, error, timestamp, duration_ms",
9
+ products: "++id, sku, barcode, title, handle, description, body_html, created_at, updated_at, deleted_at, channels, status, type, thumbnail, images, brand, tags, categories, attributes, collections, variants, price, sale_price, price_currency, cost_price, taxable, tax_class, on_sale, track_inventory, unavailable, committed, in_stock, on_hand, low_stock_threshold, locations, weight, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
10
10
  variants: "++id, sku, barcode, product_id, date, title, description, price, cost_price, sale_price, on_sale, status, track_inventory, unavailable, committed, in_stock, on_hand, low_stock_threshold, weight, thumbnail, attributes, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
11
11
  collections: "++id, name, description, thumbnail, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at, linked_products, linked_categories, createAt, lastUpdatedAt",
12
12
  categories: "++id, name, description, thumbnail, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at, date, count, parent_id",
13
13
  inventory_levels: "++id, location_id, product_id, variant_id, unavailable, committed, in_stock, on_hand, low_stock_threshold, last_updatedAt, created_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
14
14
  inventory_history: "++id, location_id, product_id, variant_id, unavailable, committed, in_stock, on_hand, low_stock_threshold, last_updatedAt, created_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
15
- promotions: "++id, name, type, active, start_date, end_date, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at",
16
- orders: "++id, order_number, customer_id, location_id, status, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at",
17
- order_notes: "++id, order_id, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at",
18
- refunds: "++id, order_id, payment_id, status, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at",
19
- payment_providers: "++id, name, type, active, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at",
20
- payments: "++id, order_id, status, method, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at",
21
- tax_rates: "++id,name,class,jurisdiction.country,jurisdiction.states,jurisdiction.postcode,jurisdiction.locations,rate,type,calculation_base,application,priority,compound,rules,metadata.stall_offline_id,metadata.stall_offline_created_at,metadata.stall_offline_updated_at,metadata.stall_offline_deleted_at",
22
- tax_classes: "++id, name, tax_calculation, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
23
- customers: "++id, email, phone, name, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at",
24
- locations: "++id, name, city, country, region, active, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at",
25
- fulfillments: "++id, order_id, status, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at"
15
+ promotions: "++id, title, code, status, is_automatic, usage_limit, usage_limit_per_customer, usage_count, starts_at, ends_at, priority, is_stackable, eligibility_rules, application.type, application.value, application.currency, application.target_type, application.allocation, application.max_quantity, application.balance, application.buy_x_get_y.buy_quantity, application.buy_x_get_y.get_quantity, application.buy_x_get_y.buy_rules, application.buy_x_get_y.get_rules, application.buy_x_get_y.discount_percentage, application.buy_x_get_y.max_applications, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
16
+ orders: "++id, location_id, organization_id, channel_id, device_id, staff_id, order_number, status, created_at, updated_at, origin.name, origin.id, origin.version, checkout_token, customer_id, customer_note, billing.address_name, billing.company, billing.first_name, billing.last_name, billing.address_1, billing.address_2, billing.city, billing.country_code, billing.province, billing.postal_code, shipping_address.address_name, shipping_address.company, shipping_address.first_name, shipping_address.last_name, shipping_address.address_1, shipping_address.address_2, shipping_address.city, shipping_address.country_code, shipping_address.province, shipping_address.postal_code, line_items, currency, payment.total_amount, payment.tip_amount, payment.overcharge_amount, payment.currency, payment.date, payment.timestamp, payment.payments, payment.status, subtotal, total, tax, tax_lines, discount, discounts, fulfillment.status, fulfillment.fulfillments, refunds, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
17
+ order_notes: "++id, order_id, note, visibility, source, created_by, created_at, updated_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
18
+ refunds: "++id, amount, reason, date, status, restock, refund_type, line_items, payments, staff_id, device_id, location_id, organization_id, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
19
+ payment_providers: "++id, title, description, logo, supported_methods, supported_countries, integration_url, integration_docs, active, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
20
+ payments: "++id, order_id, user_id, session_id, organization, location, created_at, updated_at, status, type, amount.currency, amount.value, provider_id, payment_method.type, payment_method.offline_support, payment_method.instant_clear, note, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
21
+ tax_rates: "++id, name, class, jurisdiction.country, jurisdiction.states, jurisdiction.postcode, jurisdiction.locations, rate, type, calculation_base, application, priority, compound, rules, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
22
+ tax_classes: "++id, name, tax_calculation, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
23
+ customers: "++id, email, company_name, first_name, last_name, billing_address.address_name, billing_address.company, billing_address.first_name, billing_address.last_name, billing_address.address_1, billing_address.address_2, billing_address.city, billing_address.country_code, billing_address.province, billing_address.postal_code, shipping_address.address_name, shipping_address.company, shipping_address.first_name, shipping_address.last_name, shipping_address.address_1, shipping_address.address_2, shipping_address.city, shipping_address.country_code, shipping_address.province, shipping_address.postal_code, phone, created_at, updated_at, deleted_at, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
24
+ locations: "++id, name, address, city, country, region, base_currency, timezone, organization_id, created_at, updated_at, active, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at",
25
+ fulfillments: "++id, order_id, tracking_number, method, provider, status, created_at, updated_at, delivered_at, line_items, fees.subtotal, fees.total, fees.currency, address.destination.address_name, address.destination.company, address.destination.first_name, address.destination.last_name, address.destination.address_1, address.destination.address_2, address.destination.city, address.destination.country_code, address.destination.province, address.destination.postal_code, address.departure.address_name, address.departure.company, address.departure.first_name, address.departure.last_name, address.departure.address_1, address.departure.address_2, address.departure.city, address.departure.country_code, address.departure.province, address.departure.postal_code, metadata.stall_offline_id, metadata.stall_offline_created_at, metadata.stall_offline_updated_at, metadata.stall_offline_deleted_at"
26
26
  };
27
27
 
28
28
  // src/db/db.ts
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@use-stall/core",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "author": "Stall",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
7
7
  "devDependencies": {
8
8
  "@types/node": "^24.10.2",
9
- "@use-stall/types": "^0.2.15",
9
+ "@use-stall/types": "^0.3.5",
10
10
  "dexie": "^4.2.1",
11
11
  "tsup": "^8.5.1",
12
12
  "typescript": "^5.9.3"