@use-stall/core 0.1.5 → 0.1.6

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/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@use-stall/core",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
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.0",
10
10
  "dexie": "^4.2.1",
11
11
  "tsup": "^8.5.1",
12
12
  "typescript": "^5.9.3"