@happyvertical/smrt-commerce 0.60.8 → 0.60.10

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.
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-commerce",
5
- "packageVersion": "0.60.8",
5
+ "packageVersion": "0.60.10",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-commerce:ContractCollection": {
8
8
  "name": "contractcollection",
@@ -244,8 +244,14 @@
244
244
  ],
245
245
  "schema": {
246
246
  "tableName": "contracts",
247
- "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
247
+ "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
248
248
  "columns": {
249
+ "_sync_origin_device_id": {
250
+ "type": "TEXT"
251
+ },
252
+ "_sync_revision": {
253
+ "type": "INTEGER"
254
+ },
249
255
  "id": {
250
256
  "type": "UUID",
251
257
  "primaryKey": true,
@@ -446,7 +452,7 @@
446
452
  ]
447
453
  }
448
454
  ],
449
- "version": "0aadbada"
455
+ "version": "ff08ed4f"
450
456
  },
451
457
  "importPath": "@happyvertical/smrt-commerce"
452
458
  },
@@ -580,8 +586,14 @@
580
586
  ],
581
587
  "schema": {
582
588
  "tableName": "contract_line_items",
583
- "ddl": "CREATE TABLE IF NOT EXISTS \"contract_line_items\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_id\" UUID,\n \"description\" TEXT DEFAULT '',\n \"quantity\" REAL DEFAULT 1,\n \"unit_price\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"discount_type\" TEXT DEFAULT 'none',\n \"discount_rate\" REAL,\n \"tax_rate\" REAL DEFAULT 0,\n \"tax_mode\" TEXT DEFAULT 'inherit',\n \"tax_code_id\" UUID,\n \"tax_code_code\" TEXT,\n \"tax_code_name\" TEXT,\n \"tax_components_json\" TEXT,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"money_snapshot_id\" TEXT,\n \"amount\" INTEGER DEFAULT 0,\n \"product_id\" UUID,\n \"sku\" TEXT DEFAULT '',\n \"start_date\" TIMESTAMP,\n \"end_date\" TIMESTAMP,\n \"billing_period\" TEXT DEFAULT '',\n \"sort_order\" INTEGER DEFAULT 0\n);",
589
+ "ddl": "CREATE TABLE IF NOT EXISTS \"contract_line_items\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_id\" UUID,\n \"description\" TEXT DEFAULT '',\n \"quantity\" REAL DEFAULT 1,\n \"unit_price\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"discount_type\" TEXT DEFAULT 'none',\n \"discount_rate\" REAL,\n \"tax_rate\" REAL DEFAULT 0,\n \"tax_mode\" TEXT DEFAULT 'inherit',\n \"tax_code_id\" UUID,\n \"tax_code_code\" TEXT,\n \"tax_code_name\" TEXT,\n \"tax_components_json\" TEXT,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"money_snapshot_id\" TEXT,\n \"amount\" INTEGER DEFAULT 0,\n \"product_id\" UUID,\n \"sku\" TEXT DEFAULT '',\n \"start_date\" TIMESTAMP,\n \"end_date\" TIMESTAMP,\n \"billing_period\" TEXT DEFAULT '',\n \"sort_order\" INTEGER DEFAULT 0\n);",
584
590
  "columns": {
591
+ "_sync_origin_device_id": {
592
+ "type": "TEXT"
593
+ },
594
+ "_sync_revision": {
595
+ "type": "INTEGER"
596
+ },
585
597
  "id": {
586
598
  "type": "UUID",
587
599
  "primaryKey": true,
@@ -780,7 +792,7 @@
780
792
  ]
781
793
  }
782
794
  ],
783
- "version": "ef59fe1c"
795
+ "version": "89a3137e"
784
796
  },
785
797
  "importPath": "@happyvertical/smrt-commerce"
786
798
  },
@@ -916,8 +928,14 @@
916
928
  ],
917
929
  "schema": {
918
930
  "tableName": "customers",
919
- "ddl": "CREATE TABLE IF NOT EXISTS \"customers\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"profile_id\" UUID,\n \"credit_limit\" INTEGER DEFAULT 0,\n \"payment_terms\" TEXT DEFAULT '',\n \"tax_exempt\" BOOLEAN DEFAULT FALSE,\n \"tax_id\" TEXT DEFAULT '',\n \"default_tax_code_id\" UUID,\n \"default_shipping_address\" JSON,\n \"default_billing_address\" JSON,\n \"status\" TEXT,\n \"customer_type\" TEXT,\n \"notes\" TEXT DEFAULT '',\n \"contacts\" JSON DEFAULT '[]'\n);",
931
+ "ddl": "CREATE TABLE IF NOT EXISTS \"customers\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"profile_id\" UUID,\n \"credit_limit\" INTEGER DEFAULT 0,\n \"payment_terms\" TEXT DEFAULT '',\n \"tax_exempt\" BOOLEAN DEFAULT FALSE,\n \"tax_id\" TEXT DEFAULT '',\n \"default_tax_code_id\" UUID,\n \"default_shipping_address\" JSON,\n \"default_billing_address\" JSON,\n \"status\" TEXT,\n \"customer_type\" TEXT,\n \"notes\" TEXT DEFAULT '',\n \"contacts\" JSON DEFAULT '[]'\n);",
920
932
  "columns": {
933
+ "_sync_origin_device_id": {
934
+ "type": "TEXT"
935
+ },
936
+ "_sync_revision": {
937
+ "type": "INTEGER"
938
+ },
921
939
  "id": {
922
940
  "type": "UUID",
923
941
  "primaryKey": true,
@@ -1055,7 +1073,7 @@
1055
1073
  ]
1056
1074
  }
1057
1075
  ],
1058
- "version": "9b4354dc"
1076
+ "version": "9ee5fca5"
1059
1077
  },
1060
1078
  "importPath": "@happyvertical/smrt-commerce"
1061
1079
  },
@@ -1164,8 +1182,14 @@
1164
1182
  ],
1165
1183
  "schema": {
1166
1184
  "tableName": "document_taxes",
1167
- "ddl": "CREATE TABLE IF NOT EXISTS \"document_taxes\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"document_type\" TEXT NOT NULL DEFAULT 'invoice',\n \"document_id\" TEXT NOT NULL,\n \"currency\" TEXT NOT NULL,\n \"tax_code_id\" TEXT,\n \"tax_code_code\" TEXT,\n \"kind\" TEXT,\n \"tax_component_id\" TEXT,\n \"tax_component_name\" TEXT,\n \"percent\" REAL,\n \"liability_account_id\" TEXT,\n \"taxable_minor\" INTEGER NOT NULL DEFAULT 0,\n \"net_minor\" INTEGER,\n \"tax_minor\" INTEGER NOT NULL DEFAULT 0,\n \"recoverable_minor\" INTEGER NOT NULL DEFAULT 0\n);",
1185
+ "ddl": "CREATE TABLE IF NOT EXISTS \"document_taxes\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"document_type\" TEXT NOT NULL DEFAULT 'invoice',\n \"document_id\" TEXT NOT NULL,\n \"currency\" TEXT NOT NULL,\n \"tax_code_id\" TEXT,\n \"tax_code_code\" TEXT,\n \"kind\" TEXT,\n \"tax_component_id\" TEXT,\n \"tax_component_name\" TEXT,\n \"percent\" REAL,\n \"liability_account_id\" TEXT,\n \"taxable_minor\" INTEGER NOT NULL DEFAULT 0,\n \"net_minor\" INTEGER,\n \"tax_minor\" INTEGER NOT NULL DEFAULT 0,\n \"recoverable_minor\" INTEGER NOT NULL DEFAULT 0\n);",
1168
1186
  "columns": {
1187
+ "_sync_origin_device_id": {
1188
+ "type": "TEXT"
1189
+ },
1190
+ "_sync_revision": {
1191
+ "type": "INTEGER"
1192
+ },
1169
1193
  "id": {
1170
1194
  "type": "UUID",
1171
1195
  "primaryKey": true,
@@ -1299,7 +1323,7 @@
1299
1323
  ]
1300
1324
  }
1301
1325
  ],
1302
- "version": "4b91eda1"
1326
+ "version": "b35e53b9"
1303
1327
  },
1304
1328
  "importPath": "@happyvertical/smrt-commerce"
1305
1329
  },
@@ -1467,8 +1491,14 @@
1467
1491
  ],
1468
1492
  "schema": {
1469
1493
  "tableName": "fulfillments",
1470
- "ddl": "CREATE TABLE IF NOT EXISTS \"fulfillments\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_id\" UUID,\n \"fulfillment_type\" TEXT,\n \"status\" TEXT,\n \"tracking_number\" TEXT DEFAULT '',\n \"carrier\" TEXT DEFAULT '',\n \"shipping_address\" JSON,\n \"shipped_at\" TIMESTAMP,\n \"delivered_at\" TIMESTAMP,\n \"estimated_delivery\" TIMESTAMP,\n \"notes\" TEXT DEFAULT ''\n);",
1494
+ "ddl": "CREATE TABLE IF NOT EXISTS \"fulfillments\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_id\" UUID,\n \"fulfillment_type\" TEXT,\n \"status\" TEXT,\n \"tracking_number\" TEXT DEFAULT '',\n \"carrier\" TEXT DEFAULT '',\n \"shipping_address\" JSON,\n \"shipped_at\" TIMESTAMP,\n \"delivered_at\" TIMESTAMP,\n \"estimated_delivery\" TIMESTAMP,\n \"notes\" TEXT DEFAULT ''\n);",
1471
1495
  "columns": {
1496
+ "_sync_origin_device_id": {
1497
+ "type": "TEXT"
1498
+ },
1499
+ "_sync_revision": {
1500
+ "type": "INTEGER"
1501
+ },
1472
1502
  "id": {
1473
1503
  "type": "UUID",
1474
1504
  "primaryKey": true,
@@ -1586,7 +1616,7 @@
1586
1616
  ]
1587
1617
  }
1588
1618
  ],
1589
- "version": "2f708fc5"
1619
+ "version": "3970fcbd"
1590
1620
  },
1591
1621
  "importPath": "@happyvertical/smrt-commerce"
1592
1622
  },
@@ -1706,8 +1736,14 @@
1706
1736
  ],
1707
1737
  "schema": {
1708
1738
  "tableName": "fulfillment_line_items",
1709
- "ddl": "CREATE TABLE IF NOT EXISTS \"fulfillment_line_items\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"fulfillment_id\" UUID,\n \"contract_line_item_id\" UUID,\n \"quantity_fulfilled\" REAL DEFAULT 1,\n \"notes\" TEXT DEFAULT ''\n);",
1739
+ "ddl": "CREATE TABLE IF NOT EXISTS \"fulfillment_line_items\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"fulfillment_id\" UUID,\n \"contract_line_item_id\" UUID,\n \"quantity_fulfilled\" REAL DEFAULT 1,\n \"notes\" TEXT DEFAULT ''\n);",
1710
1740
  "columns": {
1741
+ "_sync_origin_device_id": {
1742
+ "type": "TEXT"
1743
+ },
1744
+ "_sync_revision": {
1745
+ "type": "INTEGER"
1746
+ },
1711
1747
  "id": {
1712
1748
  "type": "UUID",
1713
1749
  "primaryKey": true,
@@ -1807,7 +1843,7 @@
1807
1843
  ]
1808
1844
  }
1809
1845
  ],
1810
- "version": "14537dbe"
1846
+ "version": "acf1ca5f"
1811
1847
  },
1812
1848
  "importPath": "@happyvertical/smrt-commerce"
1813
1849
  },
@@ -1853,8 +1889,14 @@
1853
1889
  ],
1854
1890
  "schema": {
1855
1891
  "tableName": "historical_customer_funds",
1856
- "ddl": "CREATE TABLE IF NOT EXISTS \"historical_customer_funds\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"customer_id\" UUID,\n \"contract_id\" UUID,\n \"source_key_hash\" TEXT,\n \"kind\" TEXT DEFAULT 'receipt',\n \"origin\" TEXT DEFAULT 'historical',\n \"payment_id\" UUID,\n \"currency\" TEXT,\n \"amount_minor\" INTEGER NOT NULL DEFAULT 0,\n \"effective_on\" TEXT,\n \"source_receipt_id\" UUID,\n \"source_credit_note_id\" UUID,\n \"snapshot_json\" TEXT\n);",
1892
+ "ddl": "CREATE TABLE IF NOT EXISTS \"historical_customer_funds\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"customer_id\" UUID,\n \"contract_id\" UUID,\n \"source_key_hash\" TEXT,\n \"kind\" TEXT DEFAULT 'receipt',\n \"origin\" TEXT DEFAULT 'historical',\n \"payment_id\" UUID,\n \"currency\" TEXT,\n \"amount_minor\" INTEGER NOT NULL DEFAULT 0,\n \"effective_on\" TEXT,\n \"source_receipt_id\" UUID,\n \"source_credit_note_id\" UUID,\n \"snapshot_json\" TEXT\n);",
1857
1893
  "columns": {
1894
+ "_sync_origin_device_id": {
1895
+ "type": "TEXT"
1896
+ },
1897
+ "_sync_revision": {
1898
+ "type": "INTEGER"
1899
+ },
1858
1900
  "id": {
1859
1901
  "type": "UUID",
1860
1902
  "primaryKey": true,
@@ -2041,7 +2083,7 @@
2041
2083
  ]
2042
2084
  }
2043
2085
  ],
2044
- "version": "ffd7ccda"
2086
+ "version": "96a8006b"
2045
2087
  },
2046
2088
  "importPath": "@happyvertical/smrt-commerce"
2047
2089
  },
@@ -2087,8 +2129,14 @@
2087
2129
  ],
2088
2130
  "schema": {
2089
2131
  "tableName": "historical_customer_funds_allocations",
2090
- "ddl": "CREATE TABLE IF NOT EXISTS \"historical_customer_funds_allocations\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"receipt_id\" UUID,\n \"credit_note_id\" UUID,\n \"invoice_id\" UUID,\n \"source_key_hash\" TEXT,\n \"amount_minor\" INTEGER NOT NULL DEFAULT 0,\n \"effective_on\" TEXT,\n \"origin\" TEXT DEFAULT 'historical',\n \"effect\" TEXT DEFAULT 'payment',\n \"journal_id\" UUID,\n \"snapshot_json\" TEXT\n);",
2132
+ "ddl": "CREATE TABLE IF NOT EXISTS \"historical_customer_funds_allocations\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"receipt_id\" UUID,\n \"credit_note_id\" UUID,\n \"invoice_id\" UUID,\n \"source_key_hash\" TEXT,\n \"amount_minor\" INTEGER NOT NULL DEFAULT 0,\n \"effective_on\" TEXT,\n \"origin\" TEXT DEFAULT 'historical',\n \"effect\" TEXT DEFAULT 'payment',\n \"journal_id\" UUID,\n \"snapshot_json\" TEXT\n);",
2091
2133
  "columns": {
2134
+ "_sync_origin_device_id": {
2135
+ "type": "TEXT"
2136
+ },
2137
+ "_sync_revision": {
2138
+ "type": "INTEGER"
2139
+ },
2092
2140
  "id": {
2093
2141
  "type": "UUID",
2094
2142
  "primaryKey": true,
@@ -2246,7 +2294,7 @@
2246
2294
  ]
2247
2295
  }
2248
2296
  ],
2249
- "version": "c90b586e"
2297
+ "version": "6c92192c"
2250
2298
  },
2251
2299
  "importPath": "@happyvertical/smrt-commerce"
2252
2300
  },
@@ -2292,8 +2340,14 @@
2292
2340
  ],
2293
2341
  "schema": {
2294
2342
  "tableName": "historical_sales_lines",
2295
- "ddl": "CREATE TABLE IF NOT EXISTS \"historical_sales_lines\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"invoice_id\" UUID,\n \"credited_line_id\" UUID,\n \"source_key\" TEXT,\n \"source_key_hash\" TEXT,\n \"description\" TEXT,\n \"net_minor\" INTEGER NOT NULL DEFAULT 0,\n \"tax_minor\" INTEGER,\n \"gross_minor\" INTEGER,\n \"quantity_text\" TEXT,\n \"unit_rate_text\" TEXT,\n \"source_fields_json\" TEXT,\n \"money_snapshot_id\" TEXT\n);",
2343
+ "ddl": "CREATE TABLE IF NOT EXISTS \"historical_sales_lines\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"invoice_id\" UUID,\n \"credited_line_id\" UUID,\n \"source_key\" TEXT,\n \"source_key_hash\" TEXT,\n \"description\" TEXT,\n \"net_minor\" INTEGER NOT NULL DEFAULT 0,\n \"tax_minor\" INTEGER,\n \"gross_minor\" INTEGER,\n \"quantity_text\" TEXT,\n \"unit_rate_text\" TEXT,\n \"source_fields_json\" TEXT,\n \"money_snapshot_id\" TEXT\n);",
2296
2344
  "columns": {
2345
+ "_sync_origin_device_id": {
2346
+ "type": "TEXT"
2347
+ },
2348
+ "_sync_revision": {
2349
+ "type": "INTEGER"
2350
+ },
2297
2351
  "id": {
2298
2352
  "type": "UUID",
2299
2353
  "primaryKey": true,
@@ -2440,7 +2494,7 @@
2440
2494
  ]
2441
2495
  }
2442
2496
  ],
2443
- "version": "77f839ec"
2497
+ "version": "d5807042"
2444
2498
  },
2445
2499
  "importPath": "@happyvertical/smrt-commerce"
2446
2500
  },
@@ -2738,8 +2792,14 @@
2738
2792
  ],
2739
2793
  "schema": {
2740
2794
  "tableName": "invoices",
2741
- "ddl": "CREATE TABLE IF NOT EXISTS \"invoices\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"historical_sales_money_json\" TEXT,\n \"historical_source_key_hash\" TEXT,\n \"kind\" TEXT DEFAULT 'invoice',\n \"credited_invoice_id\" UUID,\n \"credited_amount\" INTEGER NOT NULL DEFAULT 0,\n \"retention_state_json\" TEXT,\n \"retention_accounting_state_json\" TEXT,\n \"ordinary_accounting_state_json\" TEXT,\n \"tenant_id\" UUID,\n \"customer_id\" UUID,\n \"contract_id\" UUID,\n \"invoice_number\" TEXT DEFAULT '',\n \"reference\" TEXT DEFAULT '',\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"paid_date\" TIMESTAMP,\n \"subtotal\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"provider_tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"amount_paid\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'CAD',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"discount_total\" INTEGER NOT NULL DEFAULT 0,\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"status\" TEXT,\n \"ar_journal_id\" UUID,\n \"ar_reversal_journal_id\" UUID,\n \"revenue_journal_id\" UUID,\n \"external_id\" TEXT DEFAULT '',\n \"customer_external_id\" TEXT DEFAULT '',\n \"external_provider\" TEXT DEFAULT '',\n \"synced_at\" TIMESTAMP,\n \"accounting_sync_state_json\" TEXT,\n \"collection_method\" TEXT DEFAULT '',\n \"sent_at\" TIMESTAMP,\n \"viewed_at\" TIMESTAMP,\n \"reminders_sent\" INTEGER DEFAULT 0,\n \"last_reminder_at\" TIMESTAMP,\n \"notes\" TEXT DEFAULT '',\n \"customer_notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT ''\n);",
2795
+ "ddl": "CREATE TABLE IF NOT EXISTS \"invoices\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"historical_sales_money_json\" TEXT,\n \"historical_source_key_hash\" TEXT,\n \"kind\" TEXT DEFAULT 'invoice',\n \"credited_invoice_id\" UUID,\n \"credited_amount\" INTEGER NOT NULL DEFAULT 0,\n \"retention_state_json\" TEXT,\n \"retention_accounting_state_json\" TEXT,\n \"ordinary_accounting_state_json\" TEXT,\n \"tenant_id\" UUID,\n \"customer_id\" UUID,\n \"contract_id\" UUID,\n \"invoice_number\" TEXT DEFAULT '',\n \"reference\" TEXT DEFAULT '',\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"paid_date\" TIMESTAMP,\n \"subtotal\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"provider_tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"amount_paid\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'CAD',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"discount_total\" INTEGER NOT NULL DEFAULT 0,\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"status\" TEXT,\n \"ar_journal_id\" UUID,\n \"ar_reversal_journal_id\" UUID,\n \"revenue_journal_id\" UUID,\n \"external_id\" TEXT DEFAULT '',\n \"customer_external_id\" TEXT DEFAULT '',\n \"external_provider\" TEXT DEFAULT '',\n \"synced_at\" TIMESTAMP,\n \"accounting_sync_state_json\" TEXT,\n \"collection_method\" TEXT DEFAULT '',\n \"sent_at\" TIMESTAMP,\n \"viewed_at\" TIMESTAMP,\n \"reminders_sent\" INTEGER DEFAULT 0,\n \"last_reminder_at\" TIMESTAMP,\n \"notes\" TEXT DEFAULT '',\n \"customer_notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT ''\n);",
2742
2796
  "columns": {
2797
+ "_sync_origin_device_id": {
2798
+ "type": "TEXT"
2799
+ },
2800
+ "_sync_revision": {
2801
+ "type": "INTEGER"
2802
+ },
2743
2803
  "id": {
2744
2804
  "type": "UUID",
2745
2805
  "primaryKey": true,
@@ -3106,7 +3166,7 @@
3106
3166
  ]
3107
3167
  }
3108
3168
  ],
3109
- "version": "42f18d2b"
3169
+ "version": "20ebe916"
3110
3170
  },
3111
3171
  "importPath": "@happyvertical/smrt-commerce"
3112
3172
  },
@@ -3301,8 +3361,14 @@
3301
3361
  ],
3302
3362
  "schema": {
3303
3363
  "tableName": "invoice_line_items",
3304
- "ddl": "CREATE TABLE IF NOT EXISTS \"invoice_line_items\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"invoice_id\" UUID,\n \"credited_line_id\" UUID,\n \"credit_calculation_basis_json\" TEXT,\n \"description\" TEXT DEFAULT '',\n \"sku\" TEXT DEFAULT '',\n \"product_id\" UUID,\n \"quantity\" REAL DEFAULT 1,\n \"unit_price\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"discount_type\" TEXT DEFAULT 'none',\n \"discount_rate\" REAL,\n \"tax_rate\" REAL DEFAULT 0,\n \"tax_mode\" TEXT DEFAULT 'inherit',\n \"tax_code_id\" UUID,\n \"tax_code_code\" TEXT,\n \"tax_code_name\" TEXT,\n \"tax_components_json\" TEXT,\n \"tax_amount\" INTEGER NOT NULL DEFAULT 0,\n \"money_snapshot_id\" TEXT,\n \"amount\" INTEGER DEFAULT 0,\n \"source_type\" TEXT DEFAULT '',\n \"source_id\" TEXT DEFAULT '',\n \"period_start\" TIMESTAMP,\n \"period_end\" TIMESTAMP,\n \"revenue_account_id\" UUID,\n \"sort_order\" INTEGER DEFAULT 0\n);",
3364
+ "ddl": "CREATE TABLE IF NOT EXISTS \"invoice_line_items\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"invoice_id\" UUID,\n \"credited_line_id\" UUID,\n \"credit_calculation_basis_json\" TEXT,\n \"description\" TEXT DEFAULT '',\n \"sku\" TEXT DEFAULT '',\n \"product_id\" UUID,\n \"quantity\" REAL DEFAULT 1,\n \"unit_price\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"discount_type\" TEXT DEFAULT 'none',\n \"discount_rate\" REAL,\n \"tax_rate\" REAL DEFAULT 0,\n \"tax_mode\" TEXT DEFAULT 'inherit',\n \"tax_code_id\" UUID,\n \"tax_code_code\" TEXT,\n \"tax_code_name\" TEXT,\n \"tax_components_json\" TEXT,\n \"tax_amount\" INTEGER NOT NULL DEFAULT 0,\n \"money_snapshot_id\" TEXT,\n \"amount\" INTEGER DEFAULT 0,\n \"source_type\" TEXT DEFAULT '',\n \"source_id\" TEXT DEFAULT '',\n \"period_start\" TIMESTAMP,\n \"period_end\" TIMESTAMP,\n \"revenue_account_id\" UUID,\n \"sort_order\" INTEGER DEFAULT 0\n);",
3305
3365
  "columns": {
3366
+ "_sync_origin_device_id": {
3367
+ "type": "TEXT"
3368
+ },
3369
+ "_sync_revision": {
3370
+ "type": "INTEGER"
3371
+ },
3306
3372
  "id": {
3307
3373
  "type": "UUID",
3308
3374
  "primaryKey": true,
@@ -3550,7 +3616,7 @@
3550
3616
  ]
3551
3617
  }
3552
3618
  ],
3553
- "version": "9b493ddb"
3619
+ "version": "1f5dac5a"
3554
3620
  },
3555
3621
  "importPath": "@happyvertical/smrt-commerce"
3556
3622
  },
@@ -3792,8 +3858,14 @@
3792
3858
  ],
3793
3859
  "schema": {
3794
3860
  "tableName": "payment_allocations",
3795
- "ddl": "CREATE TABLE IF NOT EXISTS \"payment_allocations\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"payment_id\" UUID,\n \"invoice_id\" UUID,\n \"amount\" INTEGER DEFAULT 0,\n \"allocated_at\" TIMESTAMP,\n \"allocated_by\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT ''\n);",
3861
+ "ddl": "CREATE TABLE IF NOT EXISTS \"payment_allocations\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"payment_id\" UUID,\n \"invoice_id\" UUID,\n \"amount\" INTEGER DEFAULT 0,\n \"allocated_at\" TIMESTAMP,\n \"allocated_by\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT ''\n);",
3796
3862
  "columns": {
3863
+ "_sync_origin_device_id": {
3864
+ "type": "TEXT"
3865
+ },
3866
+ "_sync_revision": {
3867
+ "type": "INTEGER"
3868
+ },
3797
3869
  "id": {
3798
3870
  "type": "UUID",
3799
3871
  "primaryKey": true,
@@ -3904,7 +3976,7 @@
3904
3976
  ]
3905
3977
  }
3906
3978
  ],
3907
- "version": "102e6fbc"
3979
+ "version": "72c493d5"
3908
3980
  },
3909
3981
  "importPath": "@happyvertical/smrt-commerce"
3910
3982
  },
@@ -4114,8 +4186,14 @@
4114
4186
  ],
4115
4187
  "schema": {
4116
4188
  "tableName": "payments",
4117
- "ddl": "CREATE TABLE IF NOT EXISTS \"payments\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"kind\" TEXT DEFAULT 'payment',\n \"customer_funds_json\" TEXT,\n \"retention_accounting_binding_json\" TEXT,\n \"ordinary_accounting_binding_json\" TEXT,\n \"tenant_id\" UUID,\n \"contract_id\" UUID,\n \"customer_id\" UUID,\n \"amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"method\" TEXT,\n \"status\" TEXT,\n \"transaction_id\" TEXT DEFAULT '',\n \"reference\" TEXT DEFAULT '',\n \"journal_id\" UUID,\n \"paid_at\" TIMESTAMP,\n \"notes\" TEXT DEFAULT '',\n \"external_id\" TEXT DEFAULT '',\n \"external_provider\" TEXT DEFAULT '',\n \"synced_at\" TIMESTAMP,\n \"backend_id\" TEXT DEFAULT '',\n \"backend_tx_ref\" TEXT DEFAULT '',\n \"native_amount\" INTEGER DEFAULT 0,\n \"native_currency\" TEXT DEFAULT '',\n \"usd_at_quote\" INTEGER DEFAULT 0,\n \"usd_at_confirmation\" INTEGER DEFAULT 0,\n \"connected_account_id\" TEXT DEFAULT '',\n \"connected_fee_policy_ref\" TEXT DEFAULT '',\n \"application_fee_cents\" INTEGER DEFAULT 0,\n \"refund_of_payment_id\" TEXT DEFAULT '',\n \"connected_refund_state\" TEXT DEFAULT '',\n \"application_fee_refunded\" BOOLEAN DEFAULT FALSE\n);",
4189
+ "ddl": "CREATE TABLE IF NOT EXISTS \"payments\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"kind\" TEXT DEFAULT 'payment',\n \"customer_funds_json\" TEXT,\n \"retention_accounting_binding_json\" TEXT,\n \"ordinary_accounting_binding_json\" TEXT,\n \"tenant_id\" UUID,\n \"contract_id\" UUID,\n \"customer_id\" UUID,\n \"amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"method\" TEXT,\n \"status\" TEXT,\n \"transaction_id\" TEXT DEFAULT '',\n \"reference\" TEXT DEFAULT '',\n \"journal_id\" UUID,\n \"paid_at\" TIMESTAMP,\n \"notes\" TEXT DEFAULT '',\n \"external_id\" TEXT DEFAULT '',\n \"external_provider\" TEXT DEFAULT '',\n \"synced_at\" TIMESTAMP,\n \"backend_id\" TEXT DEFAULT '',\n \"backend_tx_ref\" TEXT DEFAULT '',\n \"native_amount\" INTEGER DEFAULT 0,\n \"native_currency\" TEXT DEFAULT '',\n \"usd_at_quote\" INTEGER DEFAULT 0,\n \"usd_at_confirmation\" INTEGER DEFAULT 0,\n \"connected_account_id\" TEXT DEFAULT '',\n \"connected_fee_policy_ref\" TEXT DEFAULT '',\n \"application_fee_cents\" INTEGER DEFAULT 0,\n \"refund_of_payment_id\" TEXT DEFAULT '',\n \"connected_refund_state\" TEXT DEFAULT '',\n \"application_fee_refunded\" BOOLEAN DEFAULT FALSE\n);",
4118
4190
  "columns": {
4191
+ "_sync_origin_device_id": {
4192
+ "type": "TEXT"
4193
+ },
4194
+ "_sync_revision": {
4195
+ "type": "INTEGER"
4196
+ },
4119
4197
  "id": {
4120
4198
  "type": "UUID",
4121
4199
  "primaryKey": true,
@@ -4370,7 +4448,7 @@
4370
4448
  ]
4371
4449
  }
4372
4450
  ],
4373
- "version": "56bc4d74"
4451
+ "version": "2f961b5b"
4374
4452
  },
4375
4453
  "importPath": "@happyvertical/smrt-commerce"
4376
4454
  },
@@ -4522,8 +4600,14 @@
4522
4600
  ],
4523
4601
  "schema": {
4524
4602
  "tableName": "payment_instruments",
4525
- "ddl": "CREATE TABLE IF NOT EXISTS \"payment_instruments\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"customer_id\" UUID,\n \"backend_id\" TEXT DEFAULT '',\n \"provider_customer_id\" TEXT DEFAULT '',\n \"provider_payment_method_id\" TEXT DEFAULT '',\n \"type\" TEXT DEFAULT 'card',\n \"brand\" TEXT DEFAULT '',\n \"last4\" TEXT DEFAULT '',\n \"exp_month\" INTEGER DEFAULT 0,\n \"exp_year\" INTEGER DEFAULT 0,\n \"is_default\" BOOLEAN DEFAULT FALSE,\n \"status\" TEXT\n);",
4603
+ "ddl": "CREATE TABLE IF NOT EXISTS \"payment_instruments\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"customer_id\" UUID,\n \"backend_id\" TEXT DEFAULT '',\n \"provider_customer_id\" TEXT DEFAULT '',\n \"provider_payment_method_id\" TEXT DEFAULT '',\n \"type\" TEXT DEFAULT 'card',\n \"brand\" TEXT DEFAULT '',\n \"last4\" TEXT DEFAULT '',\n \"exp_month\" INTEGER DEFAULT 0,\n \"exp_year\" INTEGER DEFAULT 0,\n \"is_default\" BOOLEAN DEFAULT FALSE,\n \"status\" TEXT\n);",
4526
4604
  "columns": {
4605
+ "_sync_origin_device_id": {
4606
+ "type": "TEXT"
4607
+ },
4608
+ "_sync_revision": {
4609
+ "type": "INTEGER"
4610
+ },
4527
4611
  "id": {
4528
4612
  "type": "UUID",
4529
4613
  "primaryKey": true,
@@ -4652,7 +4736,7 @@
4652
4736
  ]
4653
4737
  }
4654
4738
  ],
4655
- "version": "722393fe"
4739
+ "version": "fcbc59d5"
4656
4740
  },
4657
4741
  "importPath": "@happyvertical/smrt-commerce"
4658
4742
  },
@@ -4815,8 +4899,14 @@
4815
4899
  ],
4816
4900
  "schema": {
4817
4901
  "tableName": "payment_intents",
4818
- "ddl": "CREATE TABLE IF NOT EXISTS \"payment_intents\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"sku_id\" TEXT DEFAULT '',\n \"offering_ref\" TEXT DEFAULT '',\n \"licensee_email\" TEXT DEFAULT '',\n \"customer_id\" TEXT DEFAULT '',\n \"payment_options\" JSON DEFAULT '[]',\n \"usd_price_locked\" INTEGER DEFAULT 0,\n \"price_lock_window_ms\" INTEGER,\n \"price_lock_expires_at\" TIMESTAMP,\n \"status\" TEXT,\n \"idempotency_key\" TEXT DEFAULT '',\n \"paid_option_backend_id\" TEXT DEFAULT '',\n \"payment_id\" TEXT DEFAULT '',\n \"paid_at\" TIMESTAMP,\n \"issued_at\" TIMESTAMP,\n \"expired_at\" TIMESTAMP,\n \"cancelled_at\" TIMESTAMP,\n \"retired_at\" TIMESTAMP,\n \"notes\" TEXT DEFAULT '',\n \"connected_account_id\" TEXT DEFAULT '',\n \"connected_fee_policy_ref\" TEXT DEFAULT '',\n \"application_fee_cents\" INTEGER DEFAULT 0,\n \"connected_environment\" TEXT DEFAULT '',\n \"connected_amount\" INTEGER DEFAULT 0,\n \"connected_currency\" TEXT DEFAULT ''\n);",
4902
+ "ddl": "CREATE TABLE IF NOT EXISTS \"payment_intents\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"sku_id\" TEXT DEFAULT '',\n \"offering_ref\" TEXT DEFAULT '',\n \"licensee_email\" TEXT DEFAULT '',\n \"customer_id\" TEXT DEFAULT '',\n \"payment_options\" JSON DEFAULT '[]',\n \"usd_price_locked\" INTEGER DEFAULT 0,\n \"price_lock_window_ms\" INTEGER,\n \"price_lock_expires_at\" TIMESTAMP,\n \"status\" TEXT,\n \"idempotency_key\" TEXT DEFAULT '',\n \"paid_option_backend_id\" TEXT DEFAULT '',\n \"payment_id\" TEXT DEFAULT '',\n \"paid_at\" TIMESTAMP,\n \"issued_at\" TIMESTAMP,\n \"expired_at\" TIMESTAMP,\n \"cancelled_at\" TIMESTAMP,\n \"retired_at\" TIMESTAMP,\n \"notes\" TEXT DEFAULT '',\n \"connected_account_id\" TEXT DEFAULT '',\n \"connected_fee_policy_ref\" TEXT DEFAULT '',\n \"application_fee_cents\" INTEGER DEFAULT 0,\n \"connected_environment\" TEXT DEFAULT '',\n \"connected_amount\" INTEGER DEFAULT 0,\n \"connected_currency\" TEXT DEFAULT ''\n);",
4819
4903
  "columns": {
4904
+ "_sync_origin_device_id": {
4905
+ "type": "TEXT"
4906
+ },
4907
+ "_sync_revision": {
4908
+ "type": "INTEGER"
4909
+ },
4820
4910
  "id": {
4821
4911
  "type": "UUID",
4822
4912
  "primaryKey": true,
@@ -5012,7 +5102,7 @@
5012
5102
  ]
5013
5103
  }
5014
5104
  ],
5015
- "version": "e50abfb4"
5105
+ "version": "92f80d93"
5016
5106
  },
5017
5107
  "importPath": "@happyvertical/smrt-commerce"
5018
5108
  },
@@ -5194,8 +5284,14 @@
5194
5284
  ],
5195
5285
  "schema": {
5196
5286
  "tableName": "payouts",
5197
- "ddl": "CREATE TABLE IF NOT EXISTS \"payouts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"payment_id\" TEXT DEFAULT '',\n \"vendor_id\" UUID,\n \"gross_amount\" INTEGER DEFAULT 0,\n \"operator_fee\" INTEGER DEFAULT 0,\n \"supplier_net\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT '',\n \"backend_id\" TEXT DEFAULT '',\n \"backend_tx_ref\" TEXT DEFAULT '',\n \"status\" TEXT,\n \"sent_at\" TIMESTAMP,\n \"confirmed_at\" TIMESTAMP,\n \"failed_at\" TIMESTAMP,\n \"failure_reason\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT ''\n);",
5287
+ "ddl": "CREATE TABLE IF NOT EXISTS \"payouts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"payment_id\" TEXT DEFAULT '',\n \"vendor_id\" UUID,\n \"gross_amount\" INTEGER DEFAULT 0,\n \"operator_fee\" INTEGER DEFAULT 0,\n \"supplier_net\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT '',\n \"backend_id\" TEXT DEFAULT '',\n \"backend_tx_ref\" TEXT DEFAULT '',\n \"status\" TEXT,\n \"sent_at\" TIMESTAMP,\n \"confirmed_at\" TIMESTAMP,\n \"failed_at\" TIMESTAMP,\n \"failure_reason\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT ''\n);",
5198
5288
  "columns": {
5289
+ "_sync_origin_device_id": {
5290
+ "type": "TEXT"
5291
+ },
5292
+ "_sync_revision": {
5293
+ "type": "INTEGER"
5294
+ },
5199
5295
  "id": {
5200
5296
  "type": "UUID",
5201
5297
  "primaryKey": true,
@@ -5339,7 +5435,7 @@
5339
5435
  ]
5340
5436
  }
5341
5437
  ],
5342
- "version": "98fa81d5"
5438
+ "version": "777cae02"
5343
5439
  },
5344
5440
  "importPath": "@happyvertical/smrt-commerce"
5345
5441
  },
@@ -5416,8 +5512,14 @@
5416
5512
  ],
5417
5513
  "schema": {
5418
5514
  "tableName": "contracts",
5419
- "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
5515
+ "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
5420
5516
  "columns": {
5517
+ "_sync_origin_device_id": {
5518
+ "type": "TEXT"
5519
+ },
5520
+ "_sync_revision": {
5521
+ "type": "INTEGER"
5522
+ },
5421
5523
  "id": {
5422
5524
  "type": "UUID",
5423
5525
  "primaryKey": true,
@@ -5618,7 +5720,7 @@
5618
5720
  ]
5619
5721
  }
5620
5722
  ],
5621
- "version": "7ce53239"
5723
+ "version": "fee54480"
5622
5724
  },
5623
5725
  "importPath": "@happyvertical/smrt-commerce"
5624
5726
  },
@@ -5648,8 +5750,14 @@
5648
5750
  ],
5649
5751
  "schema": {
5650
5752
  "tableName": "purchase_price_observations",
5651
- "ddl": "CREATE TABLE IF NOT EXISTS \"purchase_price_observations\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"source_identity\" TEXT,\n \"vendor_id\" TEXT,\n \"snapshot_json\" TEXT,\n \"completion_json\" TEXT\n);",
5753
+ "ddl": "CREATE TABLE IF NOT EXISTS \"purchase_price_observations\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"source_identity\" TEXT,\n \"vendor_id\" TEXT,\n \"snapshot_json\" TEXT,\n \"completion_json\" TEXT\n);",
5652
5754
  "columns": {
5755
+ "_sync_origin_device_id": {
5756
+ "type": "TEXT"
5757
+ },
5758
+ "_sync_revision": {
5759
+ "type": "INTEGER"
5760
+ },
5653
5761
  "id": {
5654
5762
  "type": "UUID",
5655
5763
  "primaryKey": true,
@@ -5720,7 +5828,7 @@
5720
5828
  ]
5721
5829
  }
5722
5830
  ],
5723
- "version": "ad798d0c"
5831
+ "version": "2a855c4b"
5724
5832
  },
5725
5833
  "importPath": "@happyvertical/smrt-commerce"
5726
5834
  },
@@ -5797,8 +5905,14 @@
5797
5905
  ],
5798
5906
  "schema": {
5799
5907
  "tableName": "contracts",
5800
- "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
5908
+ "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
5801
5909
  "columns": {
5910
+ "_sync_origin_device_id": {
5911
+ "type": "TEXT"
5912
+ },
5913
+ "_sync_revision": {
5914
+ "type": "INTEGER"
5915
+ },
5802
5916
  "id": {
5803
5917
  "type": "UUID",
5804
5918
  "primaryKey": true,
@@ -5999,7 +6113,7 @@
5999
6113
  ]
6000
6114
  }
6001
6115
  ],
6002
- "version": "3b81860a"
6116
+ "version": "c54df156"
6003
6117
  },
6004
6118
  "importPath": "@happyvertical/smrt-commerce"
6005
6119
  },
@@ -6059,8 +6173,14 @@
6059
6173
  ],
6060
6174
  "schema": {
6061
6175
  "tableName": "tax_codes",
6062
- "ddl": "CREATE TABLE IF NOT EXISTS \"tax_codes\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"code\" TEXT,\n \"name\" TEXT,\n \"kind\" TEXT DEFAULT 'taxable',\n \"applies_to\" TEXT DEFAULT 'both',\n \"components_json\" TEXT,\n \"active\" BOOLEAN NOT NULL DEFAULT TRUE\n);",
6176
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tax_codes\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"code\" TEXT,\n \"name\" TEXT,\n \"kind\" TEXT DEFAULT 'taxable',\n \"applies_to\" TEXT DEFAULT 'both',\n \"components_json\" TEXT,\n \"active\" BOOLEAN NOT NULL DEFAULT TRUE\n);",
6063
6177
  "columns": {
6178
+ "_sync_origin_device_id": {
6179
+ "type": "TEXT"
6180
+ },
6181
+ "_sync_revision": {
6182
+ "type": "INTEGER"
6183
+ },
6064
6184
  "id": {
6065
6185
  "type": "UUID",
6066
6186
  "primaryKey": true,
@@ -6151,7 +6271,7 @@
6151
6271
  ]
6152
6272
  }
6153
6273
  ],
6154
- "version": "164dff70"
6274
+ "version": "583dc2f0"
6155
6275
  },
6156
6276
  "importPath": "@happyvertical/smrt-commerce"
6157
6277
  },
@@ -6191,8 +6311,14 @@
6191
6311
  ],
6192
6312
  "schema": {
6193
6313
  "tableName": "tax_components",
6194
- "ddl": "CREATE TABLE IF NOT EXISTS \"tax_components\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"name\" TEXT,\n \"percent\" REAL,\n \"liability_account_id\" UUID,\n \"recoverable\" BOOLEAN NOT NULL DEFAULT FALSE,\n \"active\" BOOLEAN NOT NULL DEFAULT TRUE\n);",
6314
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tax_components\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"name\" TEXT,\n \"percent\" REAL,\n \"liability_account_id\" UUID,\n \"recoverable\" BOOLEAN NOT NULL DEFAULT FALSE,\n \"active\" BOOLEAN NOT NULL DEFAULT TRUE\n);",
6195
6315
  "columns": {
6316
+ "_sync_origin_device_id": {
6317
+ "type": "TEXT"
6318
+ },
6319
+ "_sync_revision": {
6320
+ "type": "INTEGER"
6321
+ },
6196
6322
  "id": {
6197
6323
  "type": "UUID",
6198
6324
  "primaryKey": true,
@@ -6277,7 +6403,7 @@
6277
6403
  ]
6278
6404
  }
6279
6405
  ],
6280
- "version": "bdad2124"
6406
+ "version": "79db2a87"
6281
6407
  },
6282
6408
  "importPath": "@happyvertical/smrt-commerce"
6283
6409
  },
@@ -6358,8 +6484,14 @@
6358
6484
  ],
6359
6485
  "schema": {
6360
6486
  "tableName": "tax_settings",
6361
- "ddl": "CREATE TABLE IF NOT EXISTS \"tax_settings\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"default_sales_tax_code_id\" UUID,\n \"default_purchase_tax_code_id\" UUID,\n \"default_line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"tax_registrations_json\" TEXT\n);",
6487
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tax_settings\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"default_sales_tax_code_id\" UUID,\n \"default_purchase_tax_code_id\" UUID,\n \"default_line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"tax_registrations_json\" TEXT\n);",
6362
6488
  "columns": {
6489
+ "_sync_origin_device_id": {
6490
+ "type": "TEXT"
6491
+ },
6492
+ "_sync_revision": {
6493
+ "type": "INTEGER"
6494
+ },
6363
6495
  "id": {
6364
6496
  "type": "UUID",
6365
6497
  "primaryKey": true,
@@ -6468,7 +6600,7 @@
6468
6600
  ]
6469
6601
  }
6470
6602
  ],
6471
- "version": "2af5863d"
6603
+ "version": "e8ebb46e"
6472
6604
  },
6473
6605
  "importPath": "@happyvertical/smrt-commerce"
6474
6606
  },
@@ -6621,8 +6753,14 @@
6621
6753
  ],
6622
6754
  "schema": {
6623
6755
  "tableName": "tax_summary_reports",
6624
- "ddl": "CREATE TABLE IF NOT EXISTS \"tax_summary_reports\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"refreshed_at\" TIMESTAMP,\n \"tenant_id\" UUID NOT NULL,\n \"period_from\" TIMESTAMP,\n \"period_to\" TIMESTAMP,\n \"currency\" TEXT,\n \"row_kind\" TEXT DEFAULT 'component',\n \"dimension_key\" TEXT,\n \"direction\" TEXT,\n \"tax_component_id\" TEXT,\n \"tax_code_kind\" TEXT,\n \"liability_account_id\" TEXT,\n \"taxable_minor\" INTEGER NOT NULL DEFAULT 0,\n \"tax_minor\" INTEGER NOT NULL DEFAULT 0,\n \"recoverable_minor\" INTEGER,\n \"ledger_movement_minor\" INTEGER,\n \"net_tax_minor\" INTEGER,\n \"difference_minor\" INTEGER,\n \"document_count\" INTEGER NOT NULL DEFAULT 0,\n \"source_scopes\" TEXT,\n \"complete\" BOOLEAN NOT NULL DEFAULT TRUE,\n \"warning_code\" TEXT,\n \"warning_source_type\" TEXT,\n \"warning_source_id\" TEXT,\n \"warning_message\" TEXT\n);",
6756
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tax_summary_reports\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"refreshed_at\" TIMESTAMP,\n \"tenant_id\" UUID NOT NULL,\n \"period_from\" TIMESTAMP,\n \"period_to\" TIMESTAMP,\n \"currency\" TEXT,\n \"row_kind\" TEXT DEFAULT 'component',\n \"dimension_key\" TEXT,\n \"direction\" TEXT,\n \"tax_component_id\" TEXT,\n \"tax_code_kind\" TEXT,\n \"liability_account_id\" TEXT,\n \"taxable_minor\" INTEGER NOT NULL DEFAULT 0,\n \"tax_minor\" INTEGER NOT NULL DEFAULT 0,\n \"recoverable_minor\" INTEGER,\n \"ledger_movement_minor\" INTEGER,\n \"net_tax_minor\" INTEGER,\n \"difference_minor\" INTEGER,\n \"document_count\" INTEGER NOT NULL DEFAULT 0,\n \"source_scopes\" TEXT,\n \"complete\" BOOLEAN NOT NULL DEFAULT TRUE,\n \"warning_code\" TEXT,\n \"warning_source_type\" TEXT,\n \"warning_source_id\" TEXT,\n \"warning_message\" TEXT\n);",
6625
6757
  "columns": {
6758
+ "_sync_origin_device_id": {
6759
+ "type": "TEXT"
6760
+ },
6761
+ "_sync_revision": {
6762
+ "type": "INTEGER"
6763
+ },
6626
6764
  "id": {
6627
6765
  "type": "UUID",
6628
6766
  "primaryKey": true,
@@ -6804,7 +6942,7 @@
6804
6942
  ]
6805
6943
  }
6806
6944
  ],
6807
- "version": "3815f9c0"
6945
+ "version": "d4d5ebbe"
6808
6946
  },
6809
6947
  "importPath": "@happyvertical/smrt-commerce"
6810
6948
  },
@@ -6885,8 +7023,14 @@
6885
7023
  ],
6886
7024
  "schema": {
6887
7025
  "tableName": "tenant_payment_accounts",
6888
- "ddl": "CREATE TABLE IF NOT EXISTS \"tenant_payment_accounts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"backend_id\" TEXT NOT NULL DEFAULT 'stripe',\n \"environment\" TEXT NOT NULL DEFAULT 'test',\n \"provider_account_id\" TEXT NOT NULL DEFAULT '',\n \"status\" TEXT DEFAULT 'pending',\n \"charges_enabled\" BOOLEAN DEFAULT FALSE,\n \"details_submitted\" BOOLEAN DEFAULT FALSE,\n \"payouts_enabled\" BOOLEAN DEFAULT FALSE,\n \"capabilities_json\" TEXT,\n \"capabilities_observed_at\" TIMESTAMP,\n \"fee_policy_ref\" TEXT DEFAULT '',\n \"disabled_at\" TIMESTAMP,\n \"disabled_reason\" TEXT DEFAULT ''\n);",
7026
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tenant_payment_accounts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"backend_id\" TEXT NOT NULL DEFAULT 'stripe',\n \"environment\" TEXT NOT NULL DEFAULT 'test',\n \"provider_account_id\" TEXT NOT NULL DEFAULT '',\n \"status\" TEXT DEFAULT 'pending',\n \"charges_enabled\" BOOLEAN DEFAULT FALSE,\n \"details_submitted\" BOOLEAN DEFAULT FALSE,\n \"payouts_enabled\" BOOLEAN DEFAULT FALSE,\n \"capabilities_json\" TEXT,\n \"capabilities_observed_at\" TIMESTAMP,\n \"fee_policy_ref\" TEXT DEFAULT '',\n \"disabled_at\" TIMESTAMP,\n \"disabled_reason\" TEXT DEFAULT ''\n);",
6889
7027
  "columns": {
7028
+ "_sync_origin_device_id": {
7029
+ "type": "TEXT"
7030
+ },
7031
+ "_sync_revision": {
7032
+ "type": "INTEGER"
7033
+ },
6890
7034
  "id": {
6891
7035
  "type": "UUID",
6892
7036
  "primaryKey": true,
@@ -7024,7 +7168,7 @@
7024
7168
  ]
7025
7169
  }
7026
7170
  ],
7027
- "version": "7559c6fe"
7171
+ "version": "ea6f5edc"
7028
7172
  },
7029
7173
  "importPath": "@happyvertical/smrt-commerce"
7030
7174
  },
@@ -7160,8 +7304,14 @@
7160
7304
  ],
7161
7305
  "schema": {
7162
7306
  "tableName": "vendors",
7163
- "ddl": "CREATE TABLE IF NOT EXISTS \"vendors\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"profile_id\" UUID,\n \"lead_time_days\" INTEGER DEFAULT 0,\n \"minimum_order_amount\" INTEGER DEFAULT 0,\n \"payment_terms\" TEXT DEFAULT '',\n \"currency\" TEXT DEFAULT 'USD',\n \"tax_id\" TEXT DEFAULT '',\n \"default_tax_code_id\" UUID,\n \"default_contact_email\" TEXT DEFAULT '',\n \"default_contact_phone\" TEXT DEFAULT '',\n \"status\" TEXT,\n \"notes\" TEXT DEFAULT '',\n \"payout_addresses\" JSON DEFAULT '{}',\n \"contacts\" JSON DEFAULT '[]'\n);",
7307
+ "ddl": "CREATE TABLE IF NOT EXISTS \"vendors\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"profile_id\" UUID,\n \"lead_time_days\" INTEGER DEFAULT 0,\n \"minimum_order_amount\" INTEGER DEFAULT 0,\n \"payment_terms\" TEXT DEFAULT '',\n \"currency\" TEXT DEFAULT 'USD',\n \"tax_id\" TEXT DEFAULT '',\n \"default_tax_code_id\" UUID,\n \"default_contact_email\" TEXT DEFAULT '',\n \"default_contact_phone\" TEXT DEFAULT '',\n \"status\" TEXT,\n \"notes\" TEXT DEFAULT '',\n \"payout_addresses\" JSON DEFAULT '{}',\n \"contacts\" JSON DEFAULT '[]'\n);",
7164
7308
  "columns": {
7309
+ "_sync_origin_device_id": {
7310
+ "type": "TEXT"
7311
+ },
7312
+ "_sync_revision": {
7313
+ "type": "INTEGER"
7314
+ },
7165
7315
  "id": {
7166
7316
  "type": "UUID",
7167
7317
  "primaryKey": true,
@@ -7308,7 +7458,7 @@
7308
7458
  ]
7309
7459
  }
7310
7460
  ],
7311
- "version": "89258cc8"
7461
+ "version": "6cac701f"
7312
7462
  },
7313
7463
  "importPath": "@happyvertical/smrt-commerce"
7314
7464
  },
@@ -7750,8 +7900,14 @@
7750
7900
  "collectionExportName": "ContractCollection",
7751
7901
  "schema": {
7752
7902
  "tableName": "contracts",
7753
- "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
7903
+ "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
7754
7904
  "columns": {
7905
+ "_sync_origin_device_id": {
7906
+ "type": "TEXT"
7907
+ },
7908
+ "_sync_revision": {
7909
+ "type": "INTEGER"
7910
+ },
7755
7911
  "id": {
7756
7912
  "type": "UUID",
7757
7913
  "primaryKey": true,
@@ -7952,7 +8108,7 @@
7952
8108
  ]
7953
8109
  }
7954
8110
  ],
7955
- "version": "0aadbada"
8111
+ "version": "ff08ed4f"
7956
8112
  },
7957
8113
  "importPath": "@happyvertical/smrt-commerce"
7958
8114
  },
@@ -8447,8 +8603,14 @@
8447
8603
  "abstractDeclaredApi": null,
8448
8604
  "schema": {
8449
8605
  "tableName": "contracts",
8450
- "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
8606
+ "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
8451
8607
  "columns": {
8608
+ "_sync_origin_device_id": {
8609
+ "type": "TEXT"
8610
+ },
8611
+ "_sync_revision": {
8612
+ "type": "INTEGER"
8613
+ },
8452
8614
  "id": {
8453
8615
  "type": "UUID",
8454
8616
  "primaryKey": true,
@@ -8649,7 +8811,7 @@
8649
8811
  ]
8650
8812
  }
8651
8813
  ],
8652
- "version": "3b81860a"
8814
+ "version": "c54df156"
8653
8815
  },
8654
8816
  "importPath": "@happyvertical/smrt-commerce"
8655
8817
  },
@@ -9144,8 +9306,14 @@
9144
9306
  "abstractDeclaredApi": null,
9145
9307
  "schema": {
9146
9308
  "tableName": "contracts",
9147
- "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
9309
+ "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
9148
9310
  "columns": {
9311
+ "_sync_origin_device_id": {
9312
+ "type": "TEXT"
9313
+ },
9314
+ "_sync_revision": {
9315
+ "type": "INTEGER"
9316
+ },
9149
9317
  "id": {
9150
9318
  "type": "UUID",
9151
9319
  "primaryKey": true,
@@ -9346,7 +9514,7 @@
9346
9514
  ]
9347
9515
  }
9348
9516
  ],
9349
- "version": "7ce53239"
9517
+ "version": "fee54480"
9350
9518
  },
9351
9519
  "importPath": "@happyvertical/smrt-commerce"
9352
9520
  },
@@ -9798,8 +9966,14 @@
9798
9966
  ],
9799
9967
  "schema": {
9800
9968
  "tableName": "contracts",
9801
- "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
9969
+ "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
9802
9970
  "columns": {
9971
+ "_sync_origin_device_id": {
9972
+ "type": "TEXT"
9973
+ },
9974
+ "_sync_revision": {
9975
+ "type": "INTEGER"
9976
+ },
9803
9977
  "id": {
9804
9978
  "type": "UUID",
9805
9979
  "primaryKey": true,
@@ -10000,7 +10174,7 @@
10000
10174
  ]
10001
10175
  }
10002
10176
  ],
10003
- "version": "1241e8c4"
10177
+ "version": "024e587f"
10004
10178
  },
10005
10179
  "importPath": "@happyvertical/smrt-commerce"
10006
10180
  },
@@ -10452,8 +10626,14 @@
10452
10626
  ],
10453
10627
  "schema": {
10454
10628
  "tableName": "contracts",
10455
- "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
10629
+ "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
10456
10630
  "columns": {
10631
+ "_sync_origin_device_id": {
10632
+ "type": "TEXT"
10633
+ },
10634
+ "_sync_revision": {
10635
+ "type": "INTEGER"
10636
+ },
10457
10637
  "id": {
10458
10638
  "type": "UUID",
10459
10639
  "primaryKey": true,
@@ -10654,7 +10834,7 @@
10654
10834
  ]
10655
10835
  }
10656
10836
  ],
10657
- "version": "676dd80d"
10837
+ "version": "e87e7d82"
10658
10838
  },
10659
10839
  "importPath": "@happyvertical/smrt-commerce"
10660
10840
  },
@@ -11106,8 +11286,14 @@
11106
11286
  ],
11107
11287
  "schema": {
11108
11288
  "tableName": "contracts",
11109
- "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
11289
+ "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
11110
11290
  "columns": {
11291
+ "_sync_origin_device_id": {
11292
+ "type": "TEXT"
11293
+ },
11294
+ "_sync_revision": {
11295
+ "type": "INTEGER"
11296
+ },
11111
11297
  "id": {
11112
11298
  "type": "UUID",
11113
11299
  "primaryKey": true,
@@ -11308,7 +11494,7 @@
11308
11494
  ]
11309
11495
  }
11310
11496
  ],
11311
- "version": "a5c13e17"
11497
+ "version": "bdf1e524"
11312
11498
  },
11313
11499
  "importPath": "@happyvertical/smrt-commerce"
11314
11500
  },
@@ -11760,8 +11946,14 @@
11760
11946
  ],
11761
11947
  "schema": {
11762
11948
  "tableName": "contracts",
11763
- "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
11949
+ "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
11764
11950
  "columns": {
11951
+ "_sync_origin_device_id": {
11952
+ "type": "TEXT"
11953
+ },
11954
+ "_sync_revision": {
11955
+ "type": "INTEGER"
11956
+ },
11765
11957
  "id": {
11766
11958
  "type": "UUID",
11767
11959
  "primaryKey": true,
@@ -11962,7 +12154,7 @@
11962
12154
  ]
11963
12155
  }
11964
12156
  ],
11965
- "version": "38bc3d3c"
12157
+ "version": "4dee0abb"
11966
12158
  },
11967
12159
  "importPath": "@happyvertical/smrt-commerce"
11968
12160
  },
@@ -12414,8 +12606,14 @@
12414
12606
  ],
12415
12607
  "schema": {
12416
12608
  "tableName": "contracts",
12417
- "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
12609
+ "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
12418
12610
  "columns": {
12611
+ "_sync_origin_device_id": {
12612
+ "type": "TEXT"
12613
+ },
12614
+ "_sync_revision": {
12615
+ "type": "INTEGER"
12616
+ },
12419
12617
  "id": {
12420
12618
  "type": "UUID",
12421
12619
  "primaryKey": true,
@@ -12616,7 +12814,7 @@
12616
12814
  ]
12617
12815
  }
12618
12816
  ],
12619
- "version": "5c718175"
12817
+ "version": "d7b900cd"
12620
12818
  },
12621
12819
  "importPath": "@happyvertical/smrt-commerce"
12622
12820
  },
@@ -13088,8 +13286,14 @@
13088
13286
  ],
13089
13287
  "schema": {
13090
13288
  "tableName": "contracts",
13091
- "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
13289
+ "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
13092
13290
  "columns": {
13291
+ "_sync_origin_device_id": {
13292
+ "type": "TEXT"
13293
+ },
13294
+ "_sync_revision": {
13295
+ "type": "INTEGER"
13296
+ },
13093
13297
  "id": {
13094
13298
  "type": "UUID",
13095
13299
  "primaryKey": true,
@@ -13290,7 +13494,7 @@
13290
13494
  ]
13291
13495
  }
13292
13496
  ],
13293
- "version": "3c02fa0f"
13497
+ "version": "a4e35ea7"
13294
13498
  },
13295
13499
  "importPath": "@happyvertical/smrt-commerce"
13296
13500
  },
@@ -13742,8 +13946,14 @@
13742
13946
  ],
13743
13947
  "schema": {
13744
13948
  "tableName": "contracts",
13745
- "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
13949
+ "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
13746
13950
  "columns": {
13951
+ "_sync_origin_device_id": {
13952
+ "type": "TEXT"
13953
+ },
13954
+ "_sync_revision": {
13955
+ "type": "INTEGER"
13956
+ },
13747
13957
  "id": {
13748
13958
  "type": "UUID",
13749
13959
  "primaryKey": true,
@@ -13944,7 +14154,7 @@
13944
14154
  ]
13945
14155
  }
13946
14156
  ],
13947
- "version": "5a3127e9"
14157
+ "version": "ad0e890c"
13948
14158
  },
13949
14159
  "importPath": "@happyvertical/smrt-commerce"
13950
14160
  },
@@ -14405,8 +14615,14 @@
14405
14615
  "collectionExportName": "ProductionOrderCollection",
14406
14616
  "schema": {
14407
14617
  "tableName": "contracts",
14408
- "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
14618
+ "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
14409
14619
  "columns": {
14620
+ "_sync_origin_device_id": {
14621
+ "type": "TEXT"
14622
+ },
14623
+ "_sync_revision": {
14624
+ "type": "INTEGER"
14625
+ },
14410
14626
  "id": {
14411
14627
  "type": "UUID",
14412
14628
  "primaryKey": true,
@@ -14607,7 +14823,7 @@
14607
14823
  ]
14608
14824
  }
14609
14825
  ],
14610
- "version": "3270e4fe"
14826
+ "version": "8a4deffc"
14611
14827
  },
14612
14828
  "importPath": "@happyvertical/smrt-commerce"
14613
14829
  },
@@ -15052,8 +15268,14 @@
15052
15268
  "collectionExportName": "CartCollection",
15053
15269
  "schema": {
15054
15270
  "tableName": "contracts",
15055
- "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
15271
+ "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
15056
15272
  "columns": {
15273
+ "_sync_origin_device_id": {
15274
+ "type": "TEXT"
15275
+ },
15276
+ "_sync_revision": {
15277
+ "type": "INTEGER"
15278
+ },
15057
15279
  "id": {
15058
15280
  "type": "UUID",
15059
15281
  "primaryKey": true,
@@ -15254,7 +15476,7 @@
15254
15476
  ]
15255
15477
  }
15256
15478
  ],
15257
- "version": "37e4ec59"
15479
+ "version": "c96e872a"
15258
15480
  },
15259
15481
  "importPath": "@happyvertical/smrt-commerce"
15260
15482
  },
@@ -15835,8 +16057,14 @@
15835
16057
  "collectionExportName": "LicenseSaleCollection",
15836
16058
  "schema": {
15837
16059
  "tableName": "contracts",
15838
- "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
16060
+ "ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"received_purchase_money_json\" TEXT,\n \"billing_schedule_json\" TEXT DEFAULT '',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
15839
16061
  "columns": {
16062
+ "_sync_origin_device_id": {
16063
+ "type": "TEXT"
16064
+ },
16065
+ "_sync_revision": {
16066
+ "type": "INTEGER"
16067
+ },
15840
16068
  "id": {
15841
16069
  "type": "UUID",
15842
16070
  "primaryKey": true,
@@ -16037,7 +16265,7 @@
16037
16265
  ]
16038
16266
  }
16039
16267
  ],
16040
- "version": "05d74d70"
16268
+ "version": "05161a85"
16041
16269
  },
16042
16270
  "importPath": "@happyvertical/smrt-commerce"
16043
16271
  },
@@ -16397,8 +16625,14 @@
16397
16625
  ],
16398
16626
  "schema": {
16399
16627
  "tableName": "contract_line_items",
16400
- "ddl": "CREATE TABLE IF NOT EXISTS \"contract_line_items\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_id\" UUID,\n \"description\" TEXT DEFAULT '',\n \"quantity\" REAL DEFAULT 1,\n \"unit_price\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"discount_type\" TEXT DEFAULT 'none',\n \"discount_rate\" REAL,\n \"tax_rate\" REAL DEFAULT 0,\n \"tax_mode\" TEXT DEFAULT 'inherit',\n \"tax_code_id\" UUID,\n \"tax_code_code\" TEXT,\n \"tax_code_name\" TEXT,\n \"tax_components_json\" TEXT,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"money_snapshot_id\" TEXT,\n \"amount\" INTEGER DEFAULT 0,\n \"product_id\" UUID,\n \"sku\" TEXT DEFAULT '',\n \"start_date\" TIMESTAMP,\n \"end_date\" TIMESTAMP,\n \"billing_period\" TEXT DEFAULT '',\n \"sort_order\" INTEGER DEFAULT 0\n);",
16628
+ "ddl": "CREATE TABLE IF NOT EXISTS \"contract_line_items\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_id\" UUID,\n \"description\" TEXT DEFAULT '',\n \"quantity\" REAL DEFAULT 1,\n \"unit_price\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"discount_type\" TEXT DEFAULT 'none',\n \"discount_rate\" REAL,\n \"tax_rate\" REAL DEFAULT 0,\n \"tax_mode\" TEXT DEFAULT 'inherit',\n \"tax_code_id\" UUID,\n \"tax_code_code\" TEXT,\n \"tax_code_name\" TEXT,\n \"tax_components_json\" TEXT,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"money_snapshot_id\" TEXT,\n \"amount\" INTEGER DEFAULT 0,\n \"product_id\" UUID,\n \"sku\" TEXT DEFAULT '',\n \"start_date\" TIMESTAMP,\n \"end_date\" TIMESTAMP,\n \"billing_period\" TEXT DEFAULT '',\n \"sort_order\" INTEGER DEFAULT 0\n);",
16401
16629
  "columns": {
16630
+ "_sync_origin_device_id": {
16631
+ "type": "TEXT"
16632
+ },
16633
+ "_sync_revision": {
16634
+ "type": "INTEGER"
16635
+ },
16402
16636
  "id": {
16403
16637
  "type": "UUID",
16404
16638
  "primaryKey": true,
@@ -16597,7 +16831,7 @@
16597
16831
  ]
16598
16832
  }
16599
16833
  ],
16600
- "version": "ef59fe1c"
16834
+ "version": "89a3137e"
16601
16835
  },
16602
16836
  "importPath": "@happyvertical/smrt-commerce"
16603
16837
  },
@@ -16843,8 +17077,14 @@
16843
17077
  "collectionExportName": "CustomerCollection",
16844
17078
  "schema": {
16845
17079
  "tableName": "customers",
16846
- "ddl": "CREATE TABLE IF NOT EXISTS \"customers\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"profile_id\" UUID,\n \"credit_limit\" INTEGER DEFAULT 0,\n \"payment_terms\" TEXT DEFAULT '',\n \"tax_exempt\" BOOLEAN DEFAULT FALSE,\n \"tax_id\" TEXT DEFAULT '',\n \"default_tax_code_id\" UUID,\n \"default_shipping_address\" JSON,\n \"default_billing_address\" JSON,\n \"status\" TEXT,\n \"customer_type\" TEXT,\n \"notes\" TEXT DEFAULT '',\n \"contacts\" JSON DEFAULT '[]'\n);",
17080
+ "ddl": "CREATE TABLE IF NOT EXISTS \"customers\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"profile_id\" UUID,\n \"credit_limit\" INTEGER DEFAULT 0,\n \"payment_terms\" TEXT DEFAULT '',\n \"tax_exempt\" BOOLEAN DEFAULT FALSE,\n \"tax_id\" TEXT DEFAULT '',\n \"default_tax_code_id\" UUID,\n \"default_shipping_address\" JSON,\n \"default_billing_address\" JSON,\n \"status\" TEXT,\n \"customer_type\" TEXT,\n \"notes\" TEXT DEFAULT '',\n \"contacts\" JSON DEFAULT '[]'\n);",
16847
17081
  "columns": {
17082
+ "_sync_origin_device_id": {
17083
+ "type": "TEXT"
17084
+ },
17085
+ "_sync_revision": {
17086
+ "type": "INTEGER"
17087
+ },
16848
17088
  "id": {
16849
17089
  "type": "UUID",
16850
17090
  "primaryKey": true,
@@ -16982,7 +17222,7 @@
16982
17222
  ]
16983
17223
  }
16984
17224
  ],
16985
- "version": "9b4354dc"
17225
+ "version": "9ee5fca5"
16986
17226
  },
16987
17227
  "importPath": "@happyvertical/smrt-commerce"
16988
17228
  },
@@ -17283,8 +17523,14 @@
17283
17523
  ],
17284
17524
  "schema": {
17285
17525
  "tableName": "document_taxes",
17286
- "ddl": "CREATE TABLE IF NOT EXISTS \"document_taxes\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"document_type\" TEXT NOT NULL DEFAULT 'invoice',\n \"document_id\" TEXT NOT NULL,\n \"currency\" TEXT NOT NULL,\n \"tax_code_id\" TEXT,\n \"tax_code_code\" TEXT,\n \"kind\" TEXT,\n \"tax_component_id\" TEXT,\n \"tax_component_name\" TEXT,\n \"percent\" REAL,\n \"liability_account_id\" TEXT,\n \"taxable_minor\" INTEGER NOT NULL DEFAULT 0,\n \"net_minor\" INTEGER,\n \"tax_minor\" INTEGER NOT NULL DEFAULT 0,\n \"recoverable_minor\" INTEGER NOT NULL DEFAULT 0\n);",
17526
+ "ddl": "CREATE TABLE IF NOT EXISTS \"document_taxes\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"document_type\" TEXT NOT NULL DEFAULT 'invoice',\n \"document_id\" TEXT NOT NULL,\n \"currency\" TEXT NOT NULL,\n \"tax_code_id\" TEXT,\n \"tax_code_code\" TEXT,\n \"kind\" TEXT,\n \"tax_component_id\" TEXT,\n \"tax_component_name\" TEXT,\n \"percent\" REAL,\n \"liability_account_id\" TEXT,\n \"taxable_minor\" INTEGER NOT NULL DEFAULT 0,\n \"net_minor\" INTEGER,\n \"tax_minor\" INTEGER NOT NULL DEFAULT 0,\n \"recoverable_minor\" INTEGER NOT NULL DEFAULT 0\n);",
17287
17527
  "columns": {
17528
+ "_sync_origin_device_id": {
17529
+ "type": "TEXT"
17530
+ },
17531
+ "_sync_revision": {
17532
+ "type": "INTEGER"
17533
+ },
17288
17534
  "id": {
17289
17535
  "type": "UUID",
17290
17536
  "primaryKey": true,
@@ -17418,7 +17664,7 @@
17418
17664
  ]
17419
17665
  }
17420
17666
  ],
17421
- "version": "4b91eda1"
17667
+ "version": "b35e53b9"
17422
17668
  },
17423
17669
  "importPath": "@happyvertical/smrt-commerce"
17424
17670
  },
@@ -17656,8 +17902,14 @@
17656
17902
  "collectionExportName": "FulfillmentCollection",
17657
17903
  "schema": {
17658
17904
  "tableName": "fulfillments",
17659
- "ddl": "CREATE TABLE IF NOT EXISTS \"fulfillments\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_id\" UUID,\n \"fulfillment_type\" TEXT,\n \"status\" TEXT,\n \"tracking_number\" TEXT DEFAULT '',\n \"carrier\" TEXT DEFAULT '',\n \"shipping_address\" JSON,\n \"shipped_at\" TIMESTAMP,\n \"delivered_at\" TIMESTAMP,\n \"estimated_delivery\" TIMESTAMP,\n \"notes\" TEXT DEFAULT ''\n);",
17905
+ "ddl": "CREATE TABLE IF NOT EXISTS \"fulfillments\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_id\" UUID,\n \"fulfillment_type\" TEXT,\n \"status\" TEXT,\n \"tracking_number\" TEXT DEFAULT '',\n \"carrier\" TEXT DEFAULT '',\n \"shipping_address\" JSON,\n \"shipped_at\" TIMESTAMP,\n \"delivered_at\" TIMESTAMP,\n \"estimated_delivery\" TIMESTAMP,\n \"notes\" TEXT DEFAULT ''\n);",
17660
17906
  "columns": {
17907
+ "_sync_origin_device_id": {
17908
+ "type": "TEXT"
17909
+ },
17910
+ "_sync_revision": {
17911
+ "type": "INTEGER"
17912
+ },
17661
17913
  "id": {
17662
17914
  "type": "UUID",
17663
17915
  "primaryKey": true,
@@ -17775,7 +18027,7 @@
17775
18027
  ]
17776
18028
  }
17777
18029
  ],
17778
- "version": "2f708fc5"
18030
+ "version": "3970fcbd"
17779
18031
  },
17780
18032
  "importPath": "@happyvertical/smrt-commerce"
17781
18033
  },
@@ -17887,8 +18139,14 @@
17887
18139
  "collectionExportName": "FulfillmentLineItemCollection",
17888
18140
  "schema": {
17889
18141
  "tableName": "fulfillment_line_items",
17890
- "ddl": "CREATE TABLE IF NOT EXISTS \"fulfillment_line_items\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"fulfillment_id\" UUID,\n \"contract_line_item_id\" UUID,\n \"quantity_fulfilled\" REAL DEFAULT 1,\n \"notes\" TEXT DEFAULT ''\n);",
18142
+ "ddl": "CREATE TABLE IF NOT EXISTS \"fulfillment_line_items\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"fulfillment_id\" UUID,\n \"contract_line_item_id\" UUID,\n \"quantity_fulfilled\" REAL DEFAULT 1,\n \"notes\" TEXT DEFAULT ''\n);",
17891
18143
  "columns": {
18144
+ "_sync_origin_device_id": {
18145
+ "type": "TEXT"
18146
+ },
18147
+ "_sync_revision": {
18148
+ "type": "INTEGER"
18149
+ },
17892
18150
  "id": {
17893
18151
  "type": "UUID",
17894
18152
  "primaryKey": true,
@@ -17988,7 +18246,7 @@
17988
18246
  ]
17989
18247
  }
17990
18248
  ],
17991
- "version": "14537dbe"
18249
+ "version": "acf1ca5f"
17992
18250
  },
17993
18251
  "importPath": "@happyvertical/smrt-commerce"
17994
18252
  },
@@ -18175,8 +18433,14 @@
18175
18433
  ],
18176
18434
  "schema": {
18177
18435
  "tableName": "historical_customer_funds",
18178
- "ddl": "CREATE TABLE IF NOT EXISTS \"historical_customer_funds\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"customer_id\" UUID,\n \"contract_id\" UUID,\n \"source_key_hash\" TEXT,\n \"kind\" TEXT DEFAULT 'receipt',\n \"origin\" TEXT DEFAULT 'historical',\n \"payment_id\" UUID,\n \"currency\" TEXT,\n \"amount_minor\" INTEGER NOT NULL DEFAULT 0,\n \"effective_on\" TEXT,\n \"source_receipt_id\" UUID,\n \"source_credit_note_id\" UUID,\n \"snapshot_json\" TEXT\n);",
18436
+ "ddl": "CREATE TABLE IF NOT EXISTS \"historical_customer_funds\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"customer_id\" UUID,\n \"contract_id\" UUID,\n \"source_key_hash\" TEXT,\n \"kind\" TEXT DEFAULT 'receipt',\n \"origin\" TEXT DEFAULT 'historical',\n \"payment_id\" UUID,\n \"currency\" TEXT,\n \"amount_minor\" INTEGER NOT NULL DEFAULT 0,\n \"effective_on\" TEXT,\n \"source_receipt_id\" UUID,\n \"source_credit_note_id\" UUID,\n \"snapshot_json\" TEXT\n);",
18179
18437
  "columns": {
18438
+ "_sync_origin_device_id": {
18439
+ "type": "TEXT"
18440
+ },
18441
+ "_sync_revision": {
18442
+ "type": "INTEGER"
18443
+ },
18180
18444
  "id": {
18181
18445
  "type": "UUID",
18182
18446
  "primaryKey": true,
@@ -18363,7 +18627,7 @@
18363
18627
  ]
18364
18628
  }
18365
18629
  ],
18366
- "version": "ffd7ccda"
18630
+ "version": "96a8006b"
18367
18631
  },
18368
18632
  "importPath": "@happyvertical/smrt-commerce"
18369
18633
  },
@@ -18539,8 +18803,14 @@
18539
18803
  ],
18540
18804
  "schema": {
18541
18805
  "tableName": "historical_customer_funds_allocations",
18542
- "ddl": "CREATE TABLE IF NOT EXISTS \"historical_customer_funds_allocations\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"receipt_id\" UUID,\n \"credit_note_id\" UUID,\n \"invoice_id\" UUID,\n \"source_key_hash\" TEXT,\n \"amount_minor\" INTEGER NOT NULL DEFAULT 0,\n \"effective_on\" TEXT,\n \"origin\" TEXT DEFAULT 'historical',\n \"effect\" TEXT DEFAULT 'payment',\n \"journal_id\" UUID,\n \"snapshot_json\" TEXT\n);",
18806
+ "ddl": "CREATE TABLE IF NOT EXISTS \"historical_customer_funds_allocations\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"receipt_id\" UUID,\n \"credit_note_id\" UUID,\n \"invoice_id\" UUID,\n \"source_key_hash\" TEXT,\n \"amount_minor\" INTEGER NOT NULL DEFAULT 0,\n \"effective_on\" TEXT,\n \"origin\" TEXT DEFAULT 'historical',\n \"effect\" TEXT DEFAULT 'payment',\n \"journal_id\" UUID,\n \"snapshot_json\" TEXT\n);",
18543
18807
  "columns": {
18808
+ "_sync_origin_device_id": {
18809
+ "type": "TEXT"
18810
+ },
18811
+ "_sync_revision": {
18812
+ "type": "INTEGER"
18813
+ },
18544
18814
  "id": {
18545
18815
  "type": "UUID",
18546
18816
  "primaryKey": true,
@@ -18698,7 +18968,7 @@
18698
18968
  ]
18699
18969
  }
18700
18970
  ],
18701
- "version": "c90b586e"
18971
+ "version": "6c92192c"
18702
18972
  },
18703
18973
  "importPath": "@happyvertical/smrt-commerce"
18704
18974
  },
@@ -18882,8 +19152,14 @@
18882
19152
  ],
18883
19153
  "schema": {
18884
19154
  "tableName": "historical_sales_lines",
18885
- "ddl": "CREATE TABLE IF NOT EXISTS \"historical_sales_lines\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"invoice_id\" UUID,\n \"credited_line_id\" UUID,\n \"source_key\" TEXT,\n \"source_key_hash\" TEXT,\n \"description\" TEXT,\n \"net_minor\" INTEGER NOT NULL DEFAULT 0,\n \"tax_minor\" INTEGER,\n \"gross_minor\" INTEGER,\n \"quantity_text\" TEXT,\n \"unit_rate_text\" TEXT,\n \"source_fields_json\" TEXT,\n \"money_snapshot_id\" TEXT\n);",
19155
+ "ddl": "CREATE TABLE IF NOT EXISTS \"historical_sales_lines\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"invoice_id\" UUID,\n \"credited_line_id\" UUID,\n \"source_key\" TEXT,\n \"source_key_hash\" TEXT,\n \"description\" TEXT,\n \"net_minor\" INTEGER NOT NULL DEFAULT 0,\n \"tax_minor\" INTEGER,\n \"gross_minor\" INTEGER,\n \"quantity_text\" TEXT,\n \"unit_rate_text\" TEXT,\n \"source_fields_json\" TEXT,\n \"money_snapshot_id\" TEXT\n);",
18886
19156
  "columns": {
19157
+ "_sync_origin_device_id": {
19158
+ "type": "TEXT"
19159
+ },
19160
+ "_sync_revision": {
19161
+ "type": "INTEGER"
19162
+ },
18887
19163
  "id": {
18888
19164
  "type": "UUID",
18889
19165
  "primaryKey": true,
@@ -19030,7 +19306,7 @@
19030
19306
  ]
19031
19307
  }
19032
19308
  ],
19033
- "version": "77f839ec"
19309
+ "version": "d5807042"
19034
19310
  },
19035
19311
  "importPath": "@happyvertical/smrt-commerce"
19036
19312
  },
@@ -19773,8 +20049,14 @@
19773
20049
  ],
19774
20050
  "schema": {
19775
20051
  "tableName": "invoices",
19776
- "ddl": "CREATE TABLE IF NOT EXISTS \"invoices\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"historical_sales_money_json\" TEXT,\n \"historical_source_key_hash\" TEXT,\n \"kind\" TEXT DEFAULT 'invoice',\n \"credited_invoice_id\" UUID,\n \"credited_amount\" INTEGER NOT NULL DEFAULT 0,\n \"retention_state_json\" TEXT,\n \"retention_accounting_state_json\" TEXT,\n \"ordinary_accounting_state_json\" TEXT,\n \"tenant_id\" UUID,\n \"customer_id\" UUID,\n \"contract_id\" UUID,\n \"invoice_number\" TEXT DEFAULT '',\n \"reference\" TEXT DEFAULT '',\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"paid_date\" TIMESTAMP,\n \"subtotal\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"provider_tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"amount_paid\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'CAD',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"discount_total\" INTEGER NOT NULL DEFAULT 0,\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"status\" TEXT,\n \"ar_journal_id\" UUID,\n \"ar_reversal_journal_id\" UUID,\n \"revenue_journal_id\" UUID,\n \"external_id\" TEXT DEFAULT '',\n \"customer_external_id\" TEXT DEFAULT '',\n \"external_provider\" TEXT DEFAULT '',\n \"synced_at\" TIMESTAMP,\n \"accounting_sync_state_json\" TEXT,\n \"collection_method\" TEXT DEFAULT '',\n \"sent_at\" TIMESTAMP,\n \"viewed_at\" TIMESTAMP,\n \"reminders_sent\" INTEGER DEFAULT 0,\n \"last_reminder_at\" TIMESTAMP,\n \"notes\" TEXT DEFAULT '',\n \"customer_notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT ''\n);",
20052
+ "ddl": "CREATE TABLE IF NOT EXISTS \"invoices\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"money_authority\" TEXT DEFAULT 'calculated',\n \"historical_sales_money_json\" TEXT,\n \"historical_source_key_hash\" TEXT,\n \"kind\" TEXT DEFAULT 'invoice',\n \"credited_invoice_id\" UUID,\n \"credited_amount\" INTEGER NOT NULL DEFAULT 0,\n \"retention_state_json\" TEXT,\n \"retention_accounting_state_json\" TEXT,\n \"ordinary_accounting_state_json\" TEXT,\n \"tenant_id\" UUID,\n \"customer_id\" UUID,\n \"contract_id\" UUID,\n \"invoice_number\" TEXT DEFAULT '',\n \"reference\" TEXT DEFAULT '',\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"paid_date\" TIMESTAMP,\n \"subtotal\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"provider_tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"amount_paid\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'CAD',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"discount_total\" INTEGER NOT NULL DEFAULT 0,\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"status\" TEXT,\n \"ar_journal_id\" UUID,\n \"ar_reversal_journal_id\" UUID,\n \"revenue_journal_id\" UUID,\n \"external_id\" TEXT DEFAULT '',\n \"customer_external_id\" TEXT DEFAULT '',\n \"external_provider\" TEXT DEFAULT '',\n \"synced_at\" TIMESTAMP,\n \"accounting_sync_state_json\" TEXT,\n \"collection_method\" TEXT DEFAULT '',\n \"sent_at\" TIMESTAMP,\n \"viewed_at\" TIMESTAMP,\n \"reminders_sent\" INTEGER DEFAULT 0,\n \"last_reminder_at\" TIMESTAMP,\n \"notes\" TEXT DEFAULT '',\n \"customer_notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT ''\n);",
19777
20053
  "columns": {
20054
+ "_sync_origin_device_id": {
20055
+ "type": "TEXT"
20056
+ },
20057
+ "_sync_revision": {
20058
+ "type": "INTEGER"
20059
+ },
19778
20060
  "id": {
19779
20061
  "type": "UUID",
19780
20062
  "primaryKey": true,
@@ -20141,7 +20423,7 @@
20141
20423
  ]
20142
20424
  }
20143
20425
  ],
20144
- "version": "42f18d2b"
20426
+ "version": "20ebe916"
20145
20427
  },
20146
20428
  "importPath": "@happyvertical/smrt-commerce"
20147
20429
  },
@@ -20539,8 +20821,14 @@
20539
20821
  ],
20540
20822
  "schema": {
20541
20823
  "tableName": "invoice_line_items",
20542
- "ddl": "CREATE TABLE IF NOT EXISTS \"invoice_line_items\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"invoice_id\" UUID,\n \"credited_line_id\" UUID,\n \"credit_calculation_basis_json\" TEXT,\n \"description\" TEXT DEFAULT '',\n \"sku\" TEXT DEFAULT '',\n \"product_id\" UUID,\n \"quantity\" REAL DEFAULT 1,\n \"unit_price\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"discount_type\" TEXT DEFAULT 'none',\n \"discount_rate\" REAL,\n \"tax_rate\" REAL DEFAULT 0,\n \"tax_mode\" TEXT DEFAULT 'inherit',\n \"tax_code_id\" UUID,\n \"tax_code_code\" TEXT,\n \"tax_code_name\" TEXT,\n \"tax_components_json\" TEXT,\n \"tax_amount\" INTEGER NOT NULL DEFAULT 0,\n \"money_snapshot_id\" TEXT,\n \"amount\" INTEGER DEFAULT 0,\n \"source_type\" TEXT DEFAULT '',\n \"source_id\" TEXT DEFAULT '',\n \"period_start\" TIMESTAMP,\n \"period_end\" TIMESTAMP,\n \"revenue_account_id\" UUID,\n \"sort_order\" INTEGER DEFAULT 0\n);",
20824
+ "ddl": "CREATE TABLE IF NOT EXISTS \"invoice_line_items\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"invoice_id\" UUID,\n \"credited_line_id\" UUID,\n \"credit_calculation_basis_json\" TEXT,\n \"description\" TEXT DEFAULT '',\n \"sku\" TEXT DEFAULT '',\n \"product_id\" UUID,\n \"quantity\" REAL DEFAULT 1,\n \"unit_price\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"discount_type\" TEXT DEFAULT 'none',\n \"discount_rate\" REAL,\n \"tax_rate\" REAL DEFAULT 0,\n \"tax_mode\" TEXT DEFAULT 'inherit',\n \"tax_code_id\" UUID,\n \"tax_code_code\" TEXT,\n \"tax_code_name\" TEXT,\n \"tax_components_json\" TEXT,\n \"tax_amount\" INTEGER NOT NULL DEFAULT 0,\n \"money_snapshot_id\" TEXT,\n \"amount\" INTEGER DEFAULT 0,\n \"source_type\" TEXT DEFAULT '',\n \"source_id\" TEXT DEFAULT '',\n \"period_start\" TIMESTAMP,\n \"period_end\" TIMESTAMP,\n \"revenue_account_id\" UUID,\n \"sort_order\" INTEGER DEFAULT 0\n);",
20543
20825
  "columns": {
20826
+ "_sync_origin_device_id": {
20827
+ "type": "TEXT"
20828
+ },
20829
+ "_sync_revision": {
20830
+ "type": "INTEGER"
20831
+ },
20544
20832
  "id": {
20545
20833
  "type": "UUID",
20546
20834
  "primaryKey": true,
@@ -20788,7 +21076,7 @@
20788
21076
  ]
20789
21077
  }
20790
21078
  ],
20791
- "version": "9b493ddb"
21079
+ "version": "1f5dac5a"
20792
21080
  },
20793
21081
  "importPath": "@happyvertical/smrt-commerce"
20794
21082
  },
@@ -21223,8 +21511,14 @@
21223
21511
  "collectionExportName": "PaymentCollection",
21224
21512
  "schema": {
21225
21513
  "tableName": "payments",
21226
- "ddl": "CREATE TABLE IF NOT EXISTS \"payments\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"kind\" TEXT DEFAULT 'payment',\n \"customer_funds_json\" TEXT,\n \"retention_accounting_binding_json\" TEXT,\n \"ordinary_accounting_binding_json\" TEXT,\n \"tenant_id\" UUID,\n \"contract_id\" UUID,\n \"customer_id\" UUID,\n \"amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"method\" TEXT,\n \"status\" TEXT,\n \"transaction_id\" TEXT DEFAULT '',\n \"reference\" TEXT DEFAULT '',\n \"journal_id\" UUID,\n \"paid_at\" TIMESTAMP,\n \"notes\" TEXT DEFAULT '',\n \"external_id\" TEXT DEFAULT '',\n \"external_provider\" TEXT DEFAULT '',\n \"synced_at\" TIMESTAMP,\n \"backend_id\" TEXT DEFAULT '',\n \"backend_tx_ref\" TEXT DEFAULT '',\n \"native_amount\" INTEGER DEFAULT 0,\n \"native_currency\" TEXT DEFAULT '',\n \"usd_at_quote\" INTEGER DEFAULT 0,\n \"usd_at_confirmation\" INTEGER DEFAULT 0,\n \"connected_account_id\" TEXT DEFAULT '',\n \"connected_fee_policy_ref\" TEXT DEFAULT '',\n \"application_fee_cents\" INTEGER DEFAULT 0,\n \"refund_of_payment_id\" TEXT DEFAULT '',\n \"connected_refund_state\" TEXT DEFAULT '',\n \"application_fee_refunded\" BOOLEAN DEFAULT FALSE\n);",
21514
+ "ddl": "CREATE TABLE IF NOT EXISTS \"payments\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"kind\" TEXT DEFAULT 'payment',\n \"customer_funds_json\" TEXT,\n \"retention_accounting_binding_json\" TEXT,\n \"ordinary_accounting_binding_json\" TEXT,\n \"tenant_id\" UUID,\n \"contract_id\" UUID,\n \"customer_id\" UUID,\n \"amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"method\" TEXT,\n \"status\" TEXT,\n \"transaction_id\" TEXT DEFAULT '',\n \"reference\" TEXT DEFAULT '',\n \"journal_id\" UUID,\n \"paid_at\" TIMESTAMP,\n \"notes\" TEXT DEFAULT '',\n \"external_id\" TEXT DEFAULT '',\n \"external_provider\" TEXT DEFAULT '',\n \"synced_at\" TIMESTAMP,\n \"backend_id\" TEXT DEFAULT '',\n \"backend_tx_ref\" TEXT DEFAULT '',\n \"native_amount\" INTEGER DEFAULT 0,\n \"native_currency\" TEXT DEFAULT '',\n \"usd_at_quote\" INTEGER DEFAULT 0,\n \"usd_at_confirmation\" INTEGER DEFAULT 0,\n \"connected_account_id\" TEXT DEFAULT '',\n \"connected_fee_policy_ref\" TEXT DEFAULT '',\n \"application_fee_cents\" INTEGER DEFAULT 0,\n \"refund_of_payment_id\" TEXT DEFAULT '',\n \"connected_refund_state\" TEXT DEFAULT '',\n \"application_fee_refunded\" BOOLEAN DEFAULT FALSE\n);",
21227
21515
  "columns": {
21516
+ "_sync_origin_device_id": {
21517
+ "type": "TEXT"
21518
+ },
21519
+ "_sync_revision": {
21520
+ "type": "INTEGER"
21521
+ },
21228
21522
  "id": {
21229
21523
  "type": "UUID",
21230
21524
  "primaryKey": true,
@@ -21479,7 +21773,7 @@
21479
21773
  ]
21480
21774
  }
21481
21775
  ],
21482
- "version": "56bc4d74"
21776
+ "version": "2f961b5b"
21483
21777
  },
21484
21778
  "importPath": "@happyvertical/smrt-commerce"
21485
21779
  },
@@ -21626,8 +21920,14 @@
21626
21920
  "collectionExportName": "PaymentAllocationCollection",
21627
21921
  "schema": {
21628
21922
  "tableName": "payment_allocations",
21629
- "ddl": "CREATE TABLE IF NOT EXISTS \"payment_allocations\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"payment_id\" UUID,\n \"invoice_id\" UUID,\n \"amount\" INTEGER DEFAULT 0,\n \"allocated_at\" TIMESTAMP,\n \"allocated_by\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT ''\n);",
21923
+ "ddl": "CREATE TABLE IF NOT EXISTS \"payment_allocations\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"payment_id\" UUID,\n \"invoice_id\" UUID,\n \"amount\" INTEGER DEFAULT 0,\n \"allocated_at\" TIMESTAMP,\n \"allocated_by\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT ''\n);",
21630
21924
  "columns": {
21925
+ "_sync_origin_device_id": {
21926
+ "type": "TEXT"
21927
+ },
21928
+ "_sync_revision": {
21929
+ "type": "INTEGER"
21930
+ },
21631
21931
  "id": {
21632
21932
  "type": "UUID",
21633
21933
  "primaryKey": true,
@@ -21738,7 +22038,7 @@
21738
22038
  ]
21739
22039
  }
21740
22040
  ],
21741
- "version": "102e6fbc"
22041
+ "version": "72c493d5"
21742
22042
  },
21743
22043
  "importPath": "@happyvertical/smrt-commerce"
21744
22044
  },
@@ -21915,8 +22215,14 @@
21915
22215
  "collectionExportName": "PaymentInstrumentCollection",
21916
22216
  "schema": {
21917
22217
  "tableName": "payment_instruments",
21918
- "ddl": "CREATE TABLE IF NOT EXISTS \"payment_instruments\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"customer_id\" UUID,\n \"backend_id\" TEXT DEFAULT '',\n \"provider_customer_id\" TEXT DEFAULT '',\n \"provider_payment_method_id\" TEXT DEFAULT '',\n \"type\" TEXT DEFAULT 'card',\n \"brand\" TEXT DEFAULT '',\n \"last4\" TEXT DEFAULT '',\n \"exp_month\" INTEGER DEFAULT 0,\n \"exp_year\" INTEGER DEFAULT 0,\n \"is_default\" BOOLEAN DEFAULT FALSE,\n \"status\" TEXT\n);",
22218
+ "ddl": "CREATE TABLE IF NOT EXISTS \"payment_instruments\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"customer_id\" UUID,\n \"backend_id\" TEXT DEFAULT '',\n \"provider_customer_id\" TEXT DEFAULT '',\n \"provider_payment_method_id\" TEXT DEFAULT '',\n \"type\" TEXT DEFAULT 'card',\n \"brand\" TEXT DEFAULT '',\n \"last4\" TEXT DEFAULT '',\n \"exp_month\" INTEGER DEFAULT 0,\n \"exp_year\" INTEGER DEFAULT 0,\n \"is_default\" BOOLEAN DEFAULT FALSE,\n \"status\" TEXT\n);",
21919
22219
  "columns": {
22220
+ "_sync_origin_device_id": {
22221
+ "type": "TEXT"
22222
+ },
22223
+ "_sync_revision": {
22224
+ "type": "INTEGER"
22225
+ },
21920
22226
  "id": {
21921
22227
  "type": "UUID",
21922
22228
  "primaryKey": true,
@@ -22045,7 +22351,7 @@
22045
22351
  ]
22046
22352
  }
22047
22353
  ],
22048
- "version": "722393fe"
22354
+ "version": "fcbc59d5"
22049
22355
  },
22050
22356
  "importPath": "@happyvertical/smrt-commerce"
22051
22357
  },
@@ -22434,8 +22740,14 @@
22434
22740
  "collectionExportName": "PaymentIntentCollection",
22435
22741
  "schema": {
22436
22742
  "tableName": "payment_intents",
22437
- "ddl": "CREATE TABLE IF NOT EXISTS \"payment_intents\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"sku_id\" TEXT DEFAULT '',\n \"offering_ref\" TEXT DEFAULT '',\n \"licensee_email\" TEXT DEFAULT '',\n \"customer_id\" TEXT DEFAULT '',\n \"payment_options\" JSON DEFAULT '[]',\n \"usd_price_locked\" INTEGER DEFAULT 0,\n \"price_lock_window_ms\" INTEGER,\n \"price_lock_expires_at\" TIMESTAMP,\n \"status\" TEXT,\n \"idempotency_key\" TEXT DEFAULT '',\n \"paid_option_backend_id\" TEXT DEFAULT '',\n \"payment_id\" TEXT DEFAULT '',\n \"paid_at\" TIMESTAMP,\n \"issued_at\" TIMESTAMP,\n \"expired_at\" TIMESTAMP,\n \"cancelled_at\" TIMESTAMP,\n \"retired_at\" TIMESTAMP,\n \"notes\" TEXT DEFAULT '',\n \"connected_account_id\" TEXT DEFAULT '',\n \"connected_fee_policy_ref\" TEXT DEFAULT '',\n \"application_fee_cents\" INTEGER DEFAULT 0,\n \"connected_environment\" TEXT DEFAULT '',\n \"connected_amount\" INTEGER DEFAULT 0,\n \"connected_currency\" TEXT DEFAULT ''\n);",
22743
+ "ddl": "CREATE TABLE IF NOT EXISTS \"payment_intents\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"sku_id\" TEXT DEFAULT '',\n \"offering_ref\" TEXT DEFAULT '',\n \"licensee_email\" TEXT DEFAULT '',\n \"customer_id\" TEXT DEFAULT '',\n \"payment_options\" JSON DEFAULT '[]',\n \"usd_price_locked\" INTEGER DEFAULT 0,\n \"price_lock_window_ms\" INTEGER,\n \"price_lock_expires_at\" TIMESTAMP,\n \"status\" TEXT,\n \"idempotency_key\" TEXT DEFAULT '',\n \"paid_option_backend_id\" TEXT DEFAULT '',\n \"payment_id\" TEXT DEFAULT '',\n \"paid_at\" TIMESTAMP,\n \"issued_at\" TIMESTAMP,\n \"expired_at\" TIMESTAMP,\n \"cancelled_at\" TIMESTAMP,\n \"retired_at\" TIMESTAMP,\n \"notes\" TEXT DEFAULT '',\n \"connected_account_id\" TEXT DEFAULT '',\n \"connected_fee_policy_ref\" TEXT DEFAULT '',\n \"application_fee_cents\" INTEGER DEFAULT 0,\n \"connected_environment\" TEXT DEFAULT '',\n \"connected_amount\" INTEGER DEFAULT 0,\n \"connected_currency\" TEXT DEFAULT ''\n);",
22438
22744
  "columns": {
22745
+ "_sync_origin_device_id": {
22746
+ "type": "TEXT"
22747
+ },
22748
+ "_sync_revision": {
22749
+ "type": "INTEGER"
22750
+ },
22439
22751
  "id": {
22440
22752
  "type": "UUID",
22441
22753
  "primaryKey": true,
@@ -22631,7 +22943,7 @@
22631
22943
  ]
22632
22944
  }
22633
22945
  ],
22634
- "version": "e50abfb4"
22946
+ "version": "92f80d93"
22635
22947
  },
22636
22948
  "importPath": "@happyvertical/smrt-commerce"
22637
22949
  },
@@ -22875,8 +23187,14 @@
22875
23187
  "collectionExportName": "PayoutCollection",
22876
23188
  "schema": {
22877
23189
  "tableName": "payouts",
22878
- "ddl": "CREATE TABLE IF NOT EXISTS \"payouts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"payment_id\" TEXT DEFAULT '',\n \"vendor_id\" UUID,\n \"gross_amount\" INTEGER DEFAULT 0,\n \"operator_fee\" INTEGER DEFAULT 0,\n \"supplier_net\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT '',\n \"backend_id\" TEXT DEFAULT '',\n \"backend_tx_ref\" TEXT DEFAULT '',\n \"status\" TEXT,\n \"sent_at\" TIMESTAMP,\n \"confirmed_at\" TIMESTAMP,\n \"failed_at\" TIMESTAMP,\n \"failure_reason\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT ''\n);",
23190
+ "ddl": "CREATE TABLE IF NOT EXISTS \"payouts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"payment_id\" TEXT DEFAULT '',\n \"vendor_id\" UUID,\n \"gross_amount\" INTEGER DEFAULT 0,\n \"operator_fee\" INTEGER DEFAULT 0,\n \"supplier_net\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT '',\n \"backend_id\" TEXT DEFAULT '',\n \"backend_tx_ref\" TEXT DEFAULT '',\n \"status\" TEXT,\n \"sent_at\" TIMESTAMP,\n \"confirmed_at\" TIMESTAMP,\n \"failed_at\" TIMESTAMP,\n \"failure_reason\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT ''\n);",
22879
23191
  "columns": {
23192
+ "_sync_origin_device_id": {
23193
+ "type": "TEXT"
23194
+ },
23195
+ "_sync_revision": {
23196
+ "type": "INTEGER"
23197
+ },
22880
23198
  "id": {
22881
23199
  "type": "UUID",
22882
23200
  "primaryKey": true,
@@ -23020,7 +23338,7 @@
23020
23338
  ]
23021
23339
  }
23022
23340
  ],
23023
- "version": "98fa81d5"
23341
+ "version": "777cae02"
23024
23342
  },
23025
23343
  "importPath": "@happyvertical/smrt-commerce"
23026
23344
  },
@@ -23134,8 +23452,14 @@
23134
23452
  "validationRules": [],
23135
23453
  "schema": {
23136
23454
  "tableName": "purchase_price_observations",
23137
- "ddl": "CREATE TABLE IF NOT EXISTS \"purchase_price_observations\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"source_identity\" TEXT,\n \"vendor_id\" TEXT,\n \"snapshot_json\" TEXT,\n \"completion_json\" TEXT\n);",
23455
+ "ddl": "CREATE TABLE IF NOT EXISTS \"purchase_price_observations\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"source_identity\" TEXT,\n \"vendor_id\" TEXT,\n \"snapshot_json\" TEXT,\n \"completion_json\" TEXT\n);",
23138
23456
  "columns": {
23457
+ "_sync_origin_device_id": {
23458
+ "type": "TEXT"
23459
+ },
23460
+ "_sync_revision": {
23461
+ "type": "INTEGER"
23462
+ },
23139
23463
  "id": {
23140
23464
  "type": "UUID",
23141
23465
  "primaryKey": true,
@@ -23206,7 +23530,7 @@
23206
23530
  ]
23207
23531
  }
23208
23532
  ],
23209
- "version": "ad798d0c"
23533
+ "version": "2a855c4b"
23210
23534
  },
23211
23535
  "importPath": "@happyvertical/smrt-commerce"
23212
23536
  },
@@ -23358,8 +23682,14 @@
23358
23682
  ],
23359
23683
  "schema": {
23360
23684
  "tableName": "tax_codes",
23361
- "ddl": "CREATE TABLE IF NOT EXISTS \"tax_codes\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"code\" TEXT,\n \"name\" TEXT,\n \"kind\" TEXT DEFAULT 'taxable',\n \"applies_to\" TEXT DEFAULT 'both',\n \"components_json\" TEXT,\n \"active\" BOOLEAN NOT NULL DEFAULT TRUE\n);",
23685
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tax_codes\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"code\" TEXT,\n \"name\" TEXT,\n \"kind\" TEXT DEFAULT 'taxable',\n \"applies_to\" TEXT DEFAULT 'both',\n \"components_json\" TEXT,\n \"active\" BOOLEAN NOT NULL DEFAULT TRUE\n);",
23362
23686
  "columns": {
23687
+ "_sync_origin_device_id": {
23688
+ "type": "TEXT"
23689
+ },
23690
+ "_sync_revision": {
23691
+ "type": "INTEGER"
23692
+ },
23363
23693
  "id": {
23364
23694
  "type": "UUID",
23365
23695
  "primaryKey": true,
@@ -23450,7 +23780,7 @@
23450
23780
  ]
23451
23781
  }
23452
23782
  ],
23453
- "version": "164dff70"
23783
+ "version": "583dc2f0"
23454
23784
  },
23455
23785
  "importPath": "@happyvertical/smrt-commerce"
23456
23786
  },
@@ -23599,8 +23929,14 @@
23599
23929
  ],
23600
23930
  "schema": {
23601
23931
  "tableName": "tax_components",
23602
- "ddl": "CREATE TABLE IF NOT EXISTS \"tax_components\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"name\" TEXT,\n \"percent\" REAL,\n \"liability_account_id\" UUID,\n \"recoverable\" BOOLEAN NOT NULL DEFAULT FALSE,\n \"active\" BOOLEAN NOT NULL DEFAULT TRUE\n);",
23932
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tax_components\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"name\" TEXT,\n \"percent\" REAL,\n \"liability_account_id\" UUID,\n \"recoverable\" BOOLEAN NOT NULL DEFAULT FALSE,\n \"active\" BOOLEAN NOT NULL DEFAULT TRUE\n);",
23603
23933
  "columns": {
23934
+ "_sync_origin_device_id": {
23935
+ "type": "TEXT"
23936
+ },
23937
+ "_sync_revision": {
23938
+ "type": "INTEGER"
23939
+ },
23604
23940
  "id": {
23605
23941
  "type": "UUID",
23606
23942
  "primaryKey": true,
@@ -23685,7 +24021,7 @@
23685
24021
  ]
23686
24022
  }
23687
24023
  ],
23688
- "version": "bdad2124"
24024
+ "version": "79db2a87"
23689
24025
  },
23690
24026
  "importPath": "@happyvertical/smrt-commerce"
23691
24027
  },
@@ -23815,8 +24151,14 @@
23815
24151
  "validationRules": [],
23816
24152
  "schema": {
23817
24153
  "tableName": "tax_settings",
23818
- "ddl": "CREATE TABLE IF NOT EXISTS \"tax_settings\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"default_sales_tax_code_id\" UUID,\n \"default_purchase_tax_code_id\" UUID,\n \"default_line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"tax_registrations_json\" TEXT\n);",
24154
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tax_settings\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"default_sales_tax_code_id\" UUID,\n \"default_purchase_tax_code_id\" UUID,\n \"default_line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"tax_registrations_json\" TEXT\n);",
23819
24155
  "columns": {
24156
+ "_sync_origin_device_id": {
24157
+ "type": "TEXT"
24158
+ },
24159
+ "_sync_revision": {
24160
+ "type": "INTEGER"
24161
+ },
23820
24162
  "id": {
23821
24163
  "type": "UUID",
23822
24164
  "primaryKey": true,
@@ -23925,7 +24267,7 @@
23925
24267
  ]
23926
24268
  }
23927
24269
  ],
23928
- "version": "2af5863d"
24270
+ "version": "e8ebb46e"
23929
24271
  },
23930
24272
  "importPath": "@happyvertical/smrt-commerce"
23931
24273
  },
@@ -24341,8 +24683,14 @@
24341
24683
  ],
24342
24684
  "schema": {
24343
24685
  "tableName": "tax_summary_reports",
24344
- "ddl": "CREATE TABLE IF NOT EXISTS \"tax_summary_reports\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"refreshed_at\" TIMESTAMP,\n \"tenant_id\" UUID NOT NULL,\n \"period_from\" TIMESTAMP,\n \"period_to\" TIMESTAMP,\n \"currency\" TEXT,\n \"row_kind\" TEXT DEFAULT 'component',\n \"dimension_key\" TEXT,\n \"direction\" TEXT,\n \"tax_component_id\" TEXT,\n \"tax_code_kind\" TEXT,\n \"liability_account_id\" TEXT,\n \"taxable_minor\" INTEGER NOT NULL DEFAULT 0,\n \"tax_minor\" INTEGER NOT NULL DEFAULT 0,\n \"recoverable_minor\" INTEGER,\n \"ledger_movement_minor\" INTEGER,\n \"net_tax_minor\" INTEGER,\n \"difference_minor\" INTEGER,\n \"document_count\" INTEGER NOT NULL DEFAULT 0,\n \"source_scopes\" TEXT,\n \"complete\" BOOLEAN NOT NULL DEFAULT TRUE,\n \"warning_code\" TEXT,\n \"warning_source_type\" TEXT,\n \"warning_source_id\" TEXT,\n \"warning_message\" TEXT\n);",
24686
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tax_summary_reports\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"refreshed_at\" TIMESTAMP,\n \"tenant_id\" UUID NOT NULL,\n \"period_from\" TIMESTAMP,\n \"period_to\" TIMESTAMP,\n \"currency\" TEXT,\n \"row_kind\" TEXT DEFAULT 'component',\n \"dimension_key\" TEXT,\n \"direction\" TEXT,\n \"tax_component_id\" TEXT,\n \"tax_code_kind\" TEXT,\n \"liability_account_id\" TEXT,\n \"taxable_minor\" INTEGER NOT NULL DEFAULT 0,\n \"tax_minor\" INTEGER NOT NULL DEFAULT 0,\n \"recoverable_minor\" INTEGER,\n \"ledger_movement_minor\" INTEGER,\n \"net_tax_minor\" INTEGER,\n \"difference_minor\" INTEGER,\n \"document_count\" INTEGER NOT NULL DEFAULT 0,\n \"source_scopes\" TEXT,\n \"complete\" BOOLEAN NOT NULL DEFAULT TRUE,\n \"warning_code\" TEXT,\n \"warning_source_type\" TEXT,\n \"warning_source_id\" TEXT,\n \"warning_message\" TEXT\n);",
24345
24687
  "columns": {
24688
+ "_sync_origin_device_id": {
24689
+ "type": "TEXT"
24690
+ },
24691
+ "_sync_revision": {
24692
+ "type": "INTEGER"
24693
+ },
24346
24694
  "id": {
24347
24695
  "type": "UUID",
24348
24696
  "primaryKey": true,
@@ -24524,7 +24872,7 @@
24524
24872
  ]
24525
24873
  }
24526
24874
  ],
24527
- "version": "3815f9c0"
24875
+ "version": "d4d5ebbe"
24528
24876
  },
24529
24877
  "importPath": "@happyvertical/smrt-commerce"
24530
24878
  },
@@ -24777,8 +25125,14 @@
24777
25125
  ],
24778
25126
  "schema": {
24779
25127
  "tableName": "tenant_payment_accounts",
24780
- "ddl": "CREATE TABLE IF NOT EXISTS \"tenant_payment_accounts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"backend_id\" TEXT NOT NULL DEFAULT 'stripe',\n \"environment\" TEXT NOT NULL DEFAULT 'test',\n \"provider_account_id\" TEXT NOT NULL DEFAULT '',\n \"status\" TEXT DEFAULT 'pending',\n \"charges_enabled\" BOOLEAN DEFAULT FALSE,\n \"details_submitted\" BOOLEAN DEFAULT FALSE,\n \"payouts_enabled\" BOOLEAN DEFAULT FALSE,\n \"capabilities_json\" TEXT,\n \"capabilities_observed_at\" TIMESTAMP,\n \"fee_policy_ref\" TEXT DEFAULT '',\n \"disabled_at\" TIMESTAMP,\n \"disabled_reason\" TEXT DEFAULT ''\n);",
25128
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tenant_payment_accounts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"backend_id\" TEXT NOT NULL DEFAULT 'stripe',\n \"environment\" TEXT NOT NULL DEFAULT 'test',\n \"provider_account_id\" TEXT NOT NULL DEFAULT '',\n \"status\" TEXT DEFAULT 'pending',\n \"charges_enabled\" BOOLEAN DEFAULT FALSE,\n \"details_submitted\" BOOLEAN DEFAULT FALSE,\n \"payouts_enabled\" BOOLEAN DEFAULT FALSE,\n \"capabilities_json\" TEXT,\n \"capabilities_observed_at\" TIMESTAMP,\n \"fee_policy_ref\" TEXT DEFAULT '',\n \"disabled_at\" TIMESTAMP,\n \"disabled_reason\" TEXT DEFAULT ''\n);",
24781
25129
  "columns": {
25130
+ "_sync_origin_device_id": {
25131
+ "type": "TEXT"
25132
+ },
25133
+ "_sync_revision": {
25134
+ "type": "INTEGER"
25135
+ },
24782
25136
  "id": {
24783
25137
  "type": "UUID",
24784
25138
  "primaryKey": true,
@@ -24916,7 +25270,7 @@
24916
25270
  ]
24917
25271
  }
24918
25272
  ],
24919
- "version": "7559c6fe"
25273
+ "version": "ea6f5edc"
24920
25274
  },
24921
25275
  "importPath": "@happyvertical/smrt-commerce"
24922
25276
  },
@@ -25036,8 +25390,14 @@
25036
25390
  "validationRules": [],
25037
25391
  "schema": {
25038
25392
  "tableName": "tenant_payment_disputes",
25039
- "ddl": "CREATE TABLE IF NOT EXISTS \"tenant_payment_disputes\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"backend_id\" TEXT DEFAULT '',\n \"environment\" TEXT DEFAULT 'test',\n \"provider_account_id\" TEXT DEFAULT '',\n \"dispute_id\" TEXT DEFAULT '',\n \"payment_id\" UUID,\n \"status\" TEXT DEFAULT 'unknown',\n \"snapshot_json\" TEXT\n);",
25393
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tenant_payment_disputes\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"backend_id\" TEXT DEFAULT '',\n \"environment\" TEXT DEFAULT 'test',\n \"provider_account_id\" TEXT DEFAULT '',\n \"dispute_id\" TEXT DEFAULT '',\n \"payment_id\" UUID,\n \"status\" TEXT DEFAULT 'unknown',\n \"snapshot_json\" TEXT\n);",
25040
25394
  "columns": {
25395
+ "_sync_origin_device_id": {
25396
+ "type": "TEXT"
25397
+ },
25398
+ "_sync_revision": {
25399
+ "type": "INTEGER"
25400
+ },
25041
25401
  "id": {
25042
25402
  "type": "UUID",
25043
25403
  "primaryKey": true,
@@ -25141,7 +25501,7 @@
25141
25501
  ]
25142
25502
  }
25143
25503
  ],
25144
- "version": "c39176b7"
25504
+ "version": "fd77af5e"
25145
25505
  },
25146
25506
  "importPath": "@happyvertical/smrt-commerce"
25147
25507
  },
@@ -25172,8 +25532,14 @@
25172
25532
  ],
25173
25533
  "schema": {
25174
25534
  "tableName": "tenant_payment_disputes",
25175
- "ddl": "CREATE TABLE IF NOT EXISTS \"tenant_payment_disputes\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"backend_id\" TEXT DEFAULT '',\n \"environment\" TEXT DEFAULT 'test',\n \"provider_account_id\" TEXT DEFAULT '',\n \"dispute_id\" TEXT DEFAULT '',\n \"payment_id\" UUID,\n \"status\" TEXT DEFAULT 'unknown',\n \"snapshot_json\" TEXT\n);",
25535
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tenant_payment_disputes\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"backend_id\" TEXT DEFAULT '',\n \"environment\" TEXT DEFAULT 'test',\n \"provider_account_id\" TEXT DEFAULT '',\n \"dispute_id\" TEXT DEFAULT '',\n \"payment_id\" UUID,\n \"status\" TEXT DEFAULT 'unknown',\n \"snapshot_json\" TEXT\n);",
25176
25536
  "columns": {
25537
+ "_sync_origin_device_id": {
25538
+ "type": "TEXT"
25539
+ },
25540
+ "_sync_revision": {
25541
+ "type": "INTEGER"
25542
+ },
25177
25543
  "id": {
25178
25544
  "type": "UUID",
25179
25545
  "primaryKey": true,
@@ -25277,7 +25643,7 @@
25277
25643
  ]
25278
25644
  }
25279
25645
  ],
25280
- "version": "c39176b7"
25646
+ "version": "fd77af5e"
25281
25647
  },
25282
25648
  "importPath": "@happyvertical/smrt-commerce"
25283
25649
  },
@@ -25429,8 +25795,14 @@
25429
25795
  ],
25430
25796
  "schema": {
25431
25797
  "tableName": "_smrt_tenant_payment_webhook_events",
25432
- "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_tenant_payment_webhook_events\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"backend_id\" TEXT NOT NULL DEFAULT '',\n \"environment\" TEXT NOT NULL DEFAULT '',\n \"event_id\" TEXT NOT NULL DEFAULT '',\n \"event_type\" TEXT DEFAULT '',\n \"endpoint\" TEXT DEFAULT '',\n \"tenant_id\" UUID NOT NULL,\n \"provider_account_id\" TEXT DEFAULT '',\n \"outcome\" TEXT DEFAULT 'ignored',\n \"payment_intent_id\" TEXT DEFAULT '',\n \"payment_id\" TEXT DEFAULT '',\n \"application_fee_json\" TEXT,\n \"processed_at\" TIMESTAMP\n);",
25798
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_tenant_payment_webhook_events\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"backend_id\" TEXT NOT NULL DEFAULT '',\n \"environment\" TEXT NOT NULL DEFAULT '',\n \"event_id\" TEXT NOT NULL DEFAULT '',\n \"event_type\" TEXT DEFAULT '',\n \"endpoint\" TEXT DEFAULT '',\n \"tenant_id\" UUID NOT NULL,\n \"provider_account_id\" TEXT DEFAULT '',\n \"outcome\" TEXT DEFAULT 'ignored',\n \"payment_intent_id\" TEXT DEFAULT '',\n \"payment_id\" TEXT DEFAULT '',\n \"application_fee_json\" TEXT,\n \"processed_at\" TIMESTAMP\n);",
25433
25799
  "columns": {
25800
+ "_sync_origin_device_id": {
25801
+ "type": "TEXT"
25802
+ },
25803
+ "_sync_revision": {
25804
+ "type": "INTEGER"
25805
+ },
25434
25806
  "id": {
25435
25807
  "type": "UUID",
25436
25808
  "primaryKey": true,
@@ -25553,7 +25925,7 @@
25553
25925
  ]
25554
25926
  }
25555
25927
  ],
25556
- "version": "798cf27e"
25928
+ "version": "be527ce0"
25557
25929
  },
25558
25930
  "importPath": "@happyvertical/smrt-commerce"
25559
25931
  },
@@ -25600,8 +25972,14 @@
25600
25972
  ],
25601
25973
  "schema": {
25602
25974
  "tableName": "_smrt_tenant_payment_webhook_events",
25603
- "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_tenant_payment_webhook_events\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"backend_id\" TEXT NOT NULL DEFAULT '',\n \"environment\" TEXT NOT NULL DEFAULT '',\n \"event_id\" TEXT NOT NULL DEFAULT '',\n \"event_type\" TEXT DEFAULT '',\n \"endpoint\" TEXT DEFAULT '',\n \"tenant_id\" UUID NOT NULL,\n \"provider_account_id\" TEXT DEFAULT '',\n \"outcome\" TEXT DEFAULT 'ignored',\n \"payment_intent_id\" TEXT DEFAULT '',\n \"payment_id\" TEXT DEFAULT '',\n \"application_fee_json\" TEXT,\n \"processed_at\" TIMESTAMP\n);",
25975
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_tenant_payment_webhook_events\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"backend_id\" TEXT NOT NULL DEFAULT '',\n \"environment\" TEXT NOT NULL DEFAULT '',\n \"event_id\" TEXT NOT NULL DEFAULT '',\n \"event_type\" TEXT DEFAULT '',\n \"endpoint\" TEXT DEFAULT '',\n \"tenant_id\" UUID NOT NULL,\n \"provider_account_id\" TEXT DEFAULT '',\n \"outcome\" TEXT DEFAULT 'ignored',\n \"payment_intent_id\" TEXT DEFAULT '',\n \"payment_id\" TEXT DEFAULT '',\n \"application_fee_json\" TEXT,\n \"processed_at\" TIMESTAMP\n);",
25604
25976
  "columns": {
25977
+ "_sync_origin_device_id": {
25978
+ "type": "TEXT"
25979
+ },
25980
+ "_sync_revision": {
25981
+ "type": "INTEGER"
25982
+ },
25605
25983
  "id": {
25606
25984
  "type": "UUID",
25607
25985
  "primaryKey": true,
@@ -25724,7 +26102,7 @@
25724
26102
  ]
25725
26103
  }
25726
26104
  ],
25727
- "version": "798cf27e"
26105
+ "version": "be527ce0"
25728
26106
  },
25729
26107
  "importPath": "@happyvertical/smrt-commerce"
25730
26108
  },
@@ -26027,8 +26405,14 @@
26027
26405
  "collectionExportName": "VendorCollection",
26028
26406
  "schema": {
26029
26407
  "tableName": "vendors",
26030
- "ddl": "CREATE TABLE IF NOT EXISTS \"vendors\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"profile_id\" UUID,\n \"lead_time_days\" INTEGER DEFAULT 0,\n \"minimum_order_amount\" INTEGER DEFAULT 0,\n \"payment_terms\" TEXT DEFAULT '',\n \"currency\" TEXT DEFAULT 'USD',\n \"tax_id\" TEXT DEFAULT '',\n \"default_tax_code_id\" UUID,\n \"default_contact_email\" TEXT DEFAULT '',\n \"default_contact_phone\" TEXT DEFAULT '',\n \"status\" TEXT,\n \"notes\" TEXT DEFAULT '',\n \"payout_addresses\" JSON DEFAULT '{}',\n \"contacts\" JSON DEFAULT '[]'\n);",
26408
+ "ddl": "CREATE TABLE IF NOT EXISTS \"vendors\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"profile_id\" UUID,\n \"lead_time_days\" INTEGER DEFAULT 0,\n \"minimum_order_amount\" INTEGER DEFAULT 0,\n \"payment_terms\" TEXT DEFAULT '',\n \"currency\" TEXT DEFAULT 'USD',\n \"tax_id\" TEXT DEFAULT '',\n \"default_tax_code_id\" UUID,\n \"default_contact_email\" TEXT DEFAULT '',\n \"default_contact_phone\" TEXT DEFAULT '',\n \"status\" TEXT,\n \"notes\" TEXT DEFAULT '',\n \"payout_addresses\" JSON DEFAULT '{}',\n \"contacts\" JSON DEFAULT '[]'\n);",
26031
26409
  "columns": {
26410
+ "_sync_origin_device_id": {
26411
+ "type": "TEXT"
26412
+ },
26413
+ "_sync_revision": {
26414
+ "type": "INTEGER"
26415
+ },
26032
26416
  "id": {
26033
26417
  "type": "UUID",
26034
26418
  "primaryKey": true,
@@ -26175,7 +26559,7 @@
26175
26559
  ]
26176
26560
  }
26177
26561
  ],
26178
- "version": "89258cc8"
26562
+ "version": "6cac701f"
26179
26563
  },
26180
26564
  "importPath": "@happyvertical/smrt-commerce"
26181
26565
  },
@@ -26296,8 +26680,14 @@
26296
26680
  ],
26297
26681
  "schema": {
26298
26682
  "tableName": "_smrt_billing_accounts",
26299
- "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_billing_accounts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"seller_tenant_id\" UUID NOT NULL,\n \"payer_tenant_id\" UUID NOT NULL,\n \"customer_id\" UUID,\n \"name\" TEXT DEFAULT '',\n \"email\" TEXT DEFAULT '',\n \"provider\" TEXT DEFAULT '',\n \"provider_customer_id\" TEXT DEFAULT '',\n \"automatic_tax\" BOOLEAN DEFAULT TRUE,\n \"flat_discount_basis_points\" INTEGER DEFAULT 0,\n \"payment_terms_days\" INTEGER DEFAULT 30,\n \"standing\" TEXT DEFAULT 'current',\n \"billing_anchor_at\" TIMESTAMP,\n \"prorate_flat_plans\" BOOLEAN DEFAULT FALSE\n);",
26683
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_billing_accounts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"seller_tenant_id\" UUID NOT NULL,\n \"payer_tenant_id\" UUID NOT NULL,\n \"customer_id\" UUID,\n \"name\" TEXT DEFAULT '',\n \"email\" TEXT DEFAULT '',\n \"provider\" TEXT DEFAULT '',\n \"provider_customer_id\" TEXT DEFAULT '',\n \"automatic_tax\" BOOLEAN DEFAULT TRUE,\n \"flat_discount_basis_points\" INTEGER DEFAULT 0,\n \"payment_terms_days\" INTEGER DEFAULT 30,\n \"standing\" TEXT DEFAULT 'current',\n \"billing_anchor_at\" TIMESTAMP,\n \"prorate_flat_plans\" BOOLEAN DEFAULT FALSE\n);",
26300
26684
  "columns": {
26685
+ "_sync_origin_device_id": {
26686
+ "type": "TEXT"
26687
+ },
26688
+ "_sync_revision": {
26689
+ "type": "INTEGER"
26690
+ },
26301
26691
  "id": {
26302
26692
  "type": "UUID",
26303
26693
  "primaryKey": true,
@@ -26442,7 +26832,7 @@
26442
26832
  ]
26443
26833
  }
26444
26834
  ],
26445
- "version": "58124e47"
26835
+ "version": "01922629"
26446
26836
  },
26447
26837
  "importPath": "@happyvertical/smrt-commerce"
26448
26838
  },
@@ -26631,8 +27021,14 @@
26631
27021
  ],
26632
27022
  "schema": {
26633
27023
  "tableName": "_smrt_billing_period_closes",
26634
- "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_billing_period_closes\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"seller_tenant_id\" UUID NOT NULL,\n \"kind\" TEXT DEFAULT 'provider',\n \"payer_tenant_id\" UUID NOT NULL,\n \"currency\" TEXT DEFAULT 'USD',\n \"period_start\" TIMESTAMP,\n \"period_end\" TIMESTAMP,\n \"billing_account_id\" UUID,\n \"status\" TEXT DEFAULT 'collecting',\n \"invoice_id\" UUID,\n \"provider_invoice_id\" TEXT DEFAULT '',\n \"subtotal\" INTEGER DEFAULT 0,\n \"line_count\" INTEGER DEFAULT 0,\n \"issued_at\" TIMESTAMP,\n \"lease_token\" TEXT,\n \"lease_expires_at\" TIMESTAMP,\n \"attempts\" INTEGER DEFAULT 0,\n \"last_error\" TEXT DEFAULT ''\n);",
27024
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_billing_period_closes\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"seller_tenant_id\" UUID NOT NULL,\n \"kind\" TEXT DEFAULT 'provider',\n \"payer_tenant_id\" UUID NOT NULL,\n \"currency\" TEXT DEFAULT 'USD',\n \"period_start\" TIMESTAMP,\n \"period_end\" TIMESTAMP,\n \"billing_account_id\" UUID,\n \"status\" TEXT DEFAULT 'collecting',\n \"invoice_id\" UUID,\n \"provider_invoice_id\" TEXT DEFAULT '',\n \"subtotal\" INTEGER DEFAULT 0,\n \"line_count\" INTEGER DEFAULT 0,\n \"issued_at\" TIMESTAMP,\n \"lease_token\" TEXT,\n \"lease_expires_at\" TIMESTAMP,\n \"attempts\" INTEGER DEFAULT 0,\n \"last_error\" TEXT DEFAULT ''\n);",
26635
27025
  "columns": {
27026
+ "_sync_origin_device_id": {
27027
+ "type": "TEXT"
27028
+ },
27029
+ "_sync_revision": {
27030
+ "type": "INTEGER"
27031
+ },
26636
27032
  "id": {
26637
27033
  "type": "UUID",
26638
27034
  "primaryKey": true,
@@ -26814,7 +27210,7 @@
26814
27210
  ]
26815
27211
  }
26816
27212
  ],
26817
- "version": "753d2e86"
27213
+ "version": "5b8a7e8f"
26818
27214
  },
26819
27215
  "importPath": "@happyvertical/smrt-commerce"
26820
27216
  },
@@ -26933,8 +27329,14 @@
26933
27329
  ],
26934
27330
  "schema": {
26935
27331
  "tableName": "_smrt_billing_line_sources",
26936
- "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_billing_line_sources\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"seller_tenant_id\" UUID NOT NULL,\n \"period_close_id\" UUID,\n \"source_type\" TEXT DEFAULT 'client_charge',\n \"source_id\" TEXT DEFAULT '',\n \"line_key\" TEXT DEFAULT '',\n \"line_description\" TEXT DEFAULT '',\n \"amount\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"quantity\" REAL DEFAULT 0,\n \"chain_sequence\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"period_start\" TIMESTAMP,\n \"period_end\" TIMESTAMP\n);",
27332
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_billing_line_sources\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"seller_tenant_id\" UUID NOT NULL,\n \"period_close_id\" UUID,\n \"source_type\" TEXT DEFAULT 'client_charge',\n \"source_id\" TEXT DEFAULT '',\n \"line_key\" TEXT DEFAULT '',\n \"line_description\" TEXT DEFAULT '',\n \"amount\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"quantity\" REAL DEFAULT 0,\n \"chain_sequence\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"period_start\" TIMESTAMP,\n \"period_end\" TIMESTAMP\n);",
26937
27333
  "columns": {
27334
+ "_sync_origin_device_id": {
27335
+ "type": "TEXT"
27336
+ },
27337
+ "_sync_revision": {
27338
+ "type": "INTEGER"
27339
+ },
26938
27340
  "id": {
26939
27341
  "type": "UUID",
26940
27342
  "primaryKey": true,
@@ -27086,7 +27488,7 @@
27086
27488
  ]
27087
27489
  }
27088
27490
  ],
27089
- "version": "35e3aaa7"
27491
+ "version": "618b2817"
27090
27492
  },
27091
27493
  "importPath": "@happyvertical/smrt-commerce"
27092
27494
  },
@@ -27342,8 +27744,14 @@
27342
27744
  ],
27343
27745
  "schema": {
27344
27746
  "tableName": "_smrt_billing_payment_attempts",
27345
- "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_billing_payment_attempts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"seller_tenant_id\" UUID NOT NULL,\n \"payer_tenant_id\" UUID NOT NULL,\n \"billing_account_id\" TEXT DEFAULT '',\n \"purpose\" TEXT DEFAULT 'credit_purchase',\n \"invoice_id\" TEXT DEFAULT '',\n \"spending_policy_id\" TEXT DEFAULT '',\n \"provider\" TEXT DEFAULT '',\n \"order_id\" TEXT DEFAULT '',\n \"checkout_id\" TEXT DEFAULT '',\n \"status\" TEXT DEFAULT 'open',\n \"exception\" TEXT DEFAULT 'none',\n \"flag\" TEXT DEFAULT '',\n \"amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"amount_paid\" INTEGER DEFAULT 0,\n \"native_currency\" TEXT DEFAULT '',\n \"native_amount_due\" INTEGER DEFAULT 0,\n \"native_amount_paid\" INTEGER DEFAULT 0,\n \"rate\" TEXT DEFAULT '',\n \"rate_source\" TEXT DEFAULT '',\n \"checkout_url\" TEXT DEFAULT '',\n \"expires_at\" TIMESTAMP,\n \"payments\" JSON DEFAULT '[]',\n \"timeline\" JSON DEFAULT '[]',\n \"settled_at\" TIMESTAMP,\n \"payment_id\" TEXT DEFAULT '',\n \"credit_grant_id\" TEXT DEFAULT '',\n \"resolution\" TEXT DEFAULT '',\n \"resolved_at\" TIMESTAMP,\n \"out_of_band_requested_at\" TIMESTAMP,\n \"paused_standing\" TEXT DEFAULT '',\n \"excess_amount\" INTEGER DEFAULT 0,\n \"excess_revision\" INTEGER DEFAULT 0,\n \"settlement_outcome\" TEXT DEFAULT '',\n \"refunded_amount\" INTEGER DEFAULT 0,\n \"refunded_principal\" INTEGER DEFAULT 0,\n \"refunds\" JSON DEFAULT '[]'\n);",
27747
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_billing_payment_attempts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"seller_tenant_id\" UUID NOT NULL,\n \"payer_tenant_id\" UUID NOT NULL,\n \"billing_account_id\" TEXT DEFAULT '',\n \"purpose\" TEXT DEFAULT 'credit_purchase',\n \"invoice_id\" TEXT DEFAULT '',\n \"spending_policy_id\" TEXT DEFAULT '',\n \"provider\" TEXT DEFAULT '',\n \"order_id\" TEXT DEFAULT '',\n \"checkout_id\" TEXT DEFAULT '',\n \"status\" TEXT DEFAULT 'open',\n \"exception\" TEXT DEFAULT 'none',\n \"flag\" TEXT DEFAULT '',\n \"amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"amount_paid\" INTEGER DEFAULT 0,\n \"native_currency\" TEXT DEFAULT '',\n \"native_amount_due\" INTEGER DEFAULT 0,\n \"native_amount_paid\" INTEGER DEFAULT 0,\n \"rate\" TEXT DEFAULT '',\n \"rate_source\" TEXT DEFAULT '',\n \"checkout_url\" TEXT DEFAULT '',\n \"expires_at\" TIMESTAMP,\n \"payments\" JSON DEFAULT '[]',\n \"timeline\" JSON DEFAULT '[]',\n \"settled_at\" TIMESTAMP,\n \"payment_id\" TEXT DEFAULT '',\n \"credit_grant_id\" TEXT DEFAULT '',\n \"resolution\" TEXT DEFAULT '',\n \"resolved_at\" TIMESTAMP,\n \"out_of_band_requested_at\" TIMESTAMP,\n \"paused_standing\" TEXT DEFAULT '',\n \"excess_amount\" INTEGER DEFAULT 0,\n \"excess_revision\" INTEGER DEFAULT 0,\n \"settlement_outcome\" TEXT DEFAULT '',\n \"refunded_amount\" INTEGER DEFAULT 0,\n \"refunded_principal\" INTEGER DEFAULT 0,\n \"refunds\" JSON DEFAULT '[]'\n);",
27346
27748
  "columns": {
27749
+ "_sync_origin_device_id": {
27750
+ "type": "TEXT"
27751
+ },
27752
+ "_sync_revision": {
27753
+ "type": "INTEGER"
27754
+ },
27347
27755
  "id": {
27348
27756
  "type": "UUID",
27349
27757
  "primaryKey": true,
@@ -27624,7 +28032,7 @@
27624
28032
  ]
27625
28033
  }
27626
28034
  ],
27627
- "version": "43aceca7"
28035
+ "version": "eff3952d"
27628
28036
  },
27629
28037
  "importPath": "@happyvertical/smrt-commerce"
27630
28038
  },
@@ -27655,8 +28063,14 @@
27655
28063
  ],
27656
28064
  "schema": {
27657
28065
  "tableName": "_smrt_billing_accounts",
27658
- "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_billing_accounts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"seller_tenant_id\" UUID NOT NULL,\n \"payer_tenant_id\" UUID NOT NULL,\n \"customer_id\" UUID,\n \"name\" TEXT DEFAULT '',\n \"email\" TEXT DEFAULT '',\n \"provider\" TEXT DEFAULT '',\n \"provider_customer_id\" TEXT DEFAULT '',\n \"automatic_tax\" BOOLEAN DEFAULT TRUE,\n \"flat_discount_basis_points\" INTEGER DEFAULT 0,\n \"payment_terms_days\" INTEGER DEFAULT 30,\n \"standing\" TEXT DEFAULT 'current',\n \"billing_anchor_at\" TIMESTAMP,\n \"prorate_flat_plans\" BOOLEAN DEFAULT FALSE\n);",
28066
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_billing_accounts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"seller_tenant_id\" UUID NOT NULL,\n \"payer_tenant_id\" UUID NOT NULL,\n \"customer_id\" UUID,\n \"name\" TEXT DEFAULT '',\n \"email\" TEXT DEFAULT '',\n \"provider\" TEXT DEFAULT '',\n \"provider_customer_id\" TEXT DEFAULT '',\n \"automatic_tax\" BOOLEAN DEFAULT TRUE,\n \"flat_discount_basis_points\" INTEGER DEFAULT 0,\n \"payment_terms_days\" INTEGER DEFAULT 30,\n \"standing\" TEXT DEFAULT 'current',\n \"billing_anchor_at\" TIMESTAMP,\n \"prorate_flat_plans\" BOOLEAN DEFAULT FALSE\n);",
27659
28067
  "columns": {
28068
+ "_sync_origin_device_id": {
28069
+ "type": "TEXT"
28070
+ },
28071
+ "_sync_revision": {
28072
+ "type": "INTEGER"
28073
+ },
27660
28074
  "id": {
27661
28075
  "type": "UUID",
27662
28076
  "primaryKey": true,
@@ -27801,7 +28215,7 @@
27801
28215
  ]
27802
28216
  }
27803
28217
  ],
27804
- "version": "58124e47"
28218
+ "version": "01922629"
27805
28219
  },
27806
28220
  "importPath": "@happyvertical/smrt-commerce"
27807
28221
  },
@@ -27832,8 +28246,14 @@
27832
28246
  ],
27833
28247
  "schema": {
27834
28248
  "tableName": "_smrt_billing_period_closes",
27835
- "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_billing_period_closes\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"seller_tenant_id\" UUID NOT NULL,\n \"kind\" TEXT DEFAULT 'provider',\n \"payer_tenant_id\" UUID NOT NULL,\n \"currency\" TEXT DEFAULT 'USD',\n \"period_start\" TIMESTAMP,\n \"period_end\" TIMESTAMP,\n \"billing_account_id\" UUID,\n \"status\" TEXT DEFAULT 'collecting',\n \"invoice_id\" UUID,\n \"provider_invoice_id\" TEXT DEFAULT '',\n \"subtotal\" INTEGER DEFAULT 0,\n \"line_count\" INTEGER DEFAULT 0,\n \"issued_at\" TIMESTAMP,\n \"lease_token\" TEXT,\n \"lease_expires_at\" TIMESTAMP,\n \"attempts\" INTEGER DEFAULT 0,\n \"last_error\" TEXT DEFAULT ''\n);",
28249
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_billing_period_closes\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"seller_tenant_id\" UUID NOT NULL,\n \"kind\" TEXT DEFAULT 'provider',\n \"payer_tenant_id\" UUID NOT NULL,\n \"currency\" TEXT DEFAULT 'USD',\n \"period_start\" TIMESTAMP,\n \"period_end\" TIMESTAMP,\n \"billing_account_id\" UUID,\n \"status\" TEXT DEFAULT 'collecting',\n \"invoice_id\" UUID,\n \"provider_invoice_id\" TEXT DEFAULT '',\n \"subtotal\" INTEGER DEFAULT 0,\n \"line_count\" INTEGER DEFAULT 0,\n \"issued_at\" TIMESTAMP,\n \"lease_token\" TEXT,\n \"lease_expires_at\" TIMESTAMP,\n \"attempts\" INTEGER DEFAULT 0,\n \"last_error\" TEXT DEFAULT ''\n);",
27836
28250
  "columns": {
28251
+ "_sync_origin_device_id": {
28252
+ "type": "TEXT"
28253
+ },
28254
+ "_sync_revision": {
28255
+ "type": "INTEGER"
28256
+ },
27837
28257
  "id": {
27838
28258
  "type": "UUID",
27839
28259
  "primaryKey": true,
@@ -28015,7 +28435,7 @@
28015
28435
  ]
28016
28436
  }
28017
28437
  ],
28018
- "version": "753d2e86"
28438
+ "version": "5b8a7e8f"
28019
28439
  },
28020
28440
  "importPath": "@happyvertical/smrt-commerce"
28021
28441
  },
@@ -28046,8 +28466,14 @@
28046
28466
  ],
28047
28467
  "schema": {
28048
28468
  "tableName": "_smrt_billing_line_sources",
28049
- "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_billing_line_sources\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"seller_tenant_id\" UUID NOT NULL,\n \"period_close_id\" UUID,\n \"source_type\" TEXT DEFAULT 'client_charge',\n \"source_id\" TEXT DEFAULT '',\n \"line_key\" TEXT DEFAULT '',\n \"line_description\" TEXT DEFAULT '',\n \"amount\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"quantity\" REAL DEFAULT 0,\n \"chain_sequence\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"period_start\" TIMESTAMP,\n \"period_end\" TIMESTAMP\n);",
28469
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_billing_line_sources\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"seller_tenant_id\" UUID NOT NULL,\n \"period_close_id\" UUID,\n \"source_type\" TEXT DEFAULT 'client_charge',\n \"source_id\" TEXT DEFAULT '',\n \"line_key\" TEXT DEFAULT '',\n \"line_description\" TEXT DEFAULT '',\n \"amount\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"quantity\" REAL DEFAULT 0,\n \"chain_sequence\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"period_start\" TIMESTAMP,\n \"period_end\" TIMESTAMP\n);",
28050
28470
  "columns": {
28471
+ "_sync_origin_device_id": {
28472
+ "type": "TEXT"
28473
+ },
28474
+ "_sync_revision": {
28475
+ "type": "INTEGER"
28476
+ },
28051
28477
  "id": {
28052
28478
  "type": "UUID",
28053
28479
  "primaryKey": true,
@@ -28199,7 +28625,7 @@
28199
28625
  ]
28200
28626
  }
28201
28627
  ],
28202
- "version": "35e3aaa7"
28628
+ "version": "618b2817"
28203
28629
  },
28204
28630
  "importPath": "@happyvertical/smrt-commerce"
28205
28631
  },
@@ -28230,8 +28656,14 @@
28230
28656
  ],
28231
28657
  "schema": {
28232
28658
  "tableName": "_smrt_billing_payment_attempts",
28233
- "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_billing_payment_attempts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"seller_tenant_id\" UUID NOT NULL,\n \"payer_tenant_id\" UUID NOT NULL,\n \"billing_account_id\" TEXT DEFAULT '',\n \"purpose\" TEXT DEFAULT 'credit_purchase',\n \"invoice_id\" TEXT DEFAULT '',\n \"spending_policy_id\" TEXT DEFAULT '',\n \"provider\" TEXT DEFAULT '',\n \"order_id\" TEXT DEFAULT '',\n \"checkout_id\" TEXT DEFAULT '',\n \"status\" TEXT DEFAULT 'open',\n \"exception\" TEXT DEFAULT 'none',\n \"flag\" TEXT DEFAULT '',\n \"amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"amount_paid\" INTEGER DEFAULT 0,\n \"native_currency\" TEXT DEFAULT '',\n \"native_amount_due\" INTEGER DEFAULT 0,\n \"native_amount_paid\" INTEGER DEFAULT 0,\n \"rate\" TEXT DEFAULT '',\n \"rate_source\" TEXT DEFAULT '',\n \"checkout_url\" TEXT DEFAULT '',\n \"expires_at\" TIMESTAMP,\n \"payments\" JSON DEFAULT '[]',\n \"timeline\" JSON DEFAULT '[]',\n \"settled_at\" TIMESTAMP,\n \"payment_id\" TEXT DEFAULT '',\n \"credit_grant_id\" TEXT DEFAULT '',\n \"resolution\" TEXT DEFAULT '',\n \"resolved_at\" TIMESTAMP,\n \"out_of_band_requested_at\" TIMESTAMP,\n \"paused_standing\" TEXT DEFAULT '',\n \"excess_amount\" INTEGER DEFAULT 0,\n \"excess_revision\" INTEGER DEFAULT 0,\n \"settlement_outcome\" TEXT DEFAULT '',\n \"refunded_amount\" INTEGER DEFAULT 0,\n \"refunded_principal\" INTEGER DEFAULT 0,\n \"refunds\" JSON DEFAULT '[]'\n);",
28659
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_billing_payment_attempts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"seller_tenant_id\" UUID NOT NULL,\n \"payer_tenant_id\" UUID NOT NULL,\n \"billing_account_id\" TEXT DEFAULT '',\n \"purpose\" TEXT DEFAULT 'credit_purchase',\n \"invoice_id\" TEXT DEFAULT '',\n \"spending_policy_id\" TEXT DEFAULT '',\n \"provider\" TEXT DEFAULT '',\n \"order_id\" TEXT DEFAULT '',\n \"checkout_id\" TEXT DEFAULT '',\n \"status\" TEXT DEFAULT 'open',\n \"exception\" TEXT DEFAULT 'none',\n \"flag\" TEXT DEFAULT '',\n \"amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"amount_paid\" INTEGER DEFAULT 0,\n \"native_currency\" TEXT DEFAULT '',\n \"native_amount_due\" INTEGER DEFAULT 0,\n \"native_amount_paid\" INTEGER DEFAULT 0,\n \"rate\" TEXT DEFAULT '',\n \"rate_source\" TEXT DEFAULT '',\n \"checkout_url\" TEXT DEFAULT '',\n \"expires_at\" TIMESTAMP,\n \"payments\" JSON DEFAULT '[]',\n \"timeline\" JSON DEFAULT '[]',\n \"settled_at\" TIMESTAMP,\n \"payment_id\" TEXT DEFAULT '',\n \"credit_grant_id\" TEXT DEFAULT '',\n \"resolution\" TEXT DEFAULT '',\n \"resolved_at\" TIMESTAMP,\n \"out_of_band_requested_at\" TIMESTAMP,\n \"paused_standing\" TEXT DEFAULT '',\n \"excess_amount\" INTEGER DEFAULT 0,\n \"excess_revision\" INTEGER DEFAULT 0,\n \"settlement_outcome\" TEXT DEFAULT '',\n \"refunded_amount\" INTEGER DEFAULT 0,\n \"refunded_principal\" INTEGER DEFAULT 0,\n \"refunds\" JSON DEFAULT '[]'\n);",
28234
28660
  "columns": {
28661
+ "_sync_origin_device_id": {
28662
+ "type": "TEXT"
28663
+ },
28664
+ "_sync_revision": {
28665
+ "type": "INTEGER"
28666
+ },
28235
28667
  "id": {
28236
28668
  "type": "UUID",
28237
28669
  "primaryKey": true,
@@ -28512,7 +28944,7 @@
28512
28944
  ]
28513
28945
  }
28514
28946
  ],
28515
- "version": "43aceca7"
28947
+ "version": "eff3952d"
28516
28948
  },
28517
28949
  "importPath": "@happyvertical/smrt-commerce"
28518
28950
  }