@flowselections/floriday-voorraad 1.0.28 → 1.0.29

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.
Files changed (107) hide show
  1. package/dist-lib/components/voorraad/ArtikelWizard.d.ts +2 -1
  2. package/dist-lib/components/voorraad/ArtikelWizard.d.ts.map +1 -1
  3. package/dist-lib/components/voorraad/ArtikelWizard.js +555 -316
  4. package/dist-lib/components/voorraad/EditArtikelPage.d.ts +2 -1
  5. package/dist-lib/components/voorraad/EditArtikelPage.d.ts.map +1 -1
  6. package/dist-lib/components/voorraad/EditArtikelPage.js +3 -3
  7. package/dist-lib/components/voorraad/FustenPage.d.ts +2 -0
  8. package/dist-lib/components/voorraad/FustenPage.d.ts.map +1 -0
  9. package/dist-lib/components/voorraad/FustenPage.js +97 -0
  10. package/dist-lib/components/voorraad/LogistiekTakenCard.d.ts +2 -0
  11. package/dist-lib/components/voorraad/LogistiekTakenCard.d.ts.map +1 -0
  12. package/dist-lib/components/voorraad/LogistiekTakenCard.js +54 -0
  13. package/dist-lib/components/voorraad/PublicatiesPage.d.ts +2 -0
  14. package/dist-lib/components/voorraad/PublicatiesPage.d.ts.map +1 -0
  15. package/dist-lib/components/voorraad/PublicatiesPage.js +60 -0
  16. package/dist-lib/components/voorraad/PublishProgressCard.d.ts +12 -0
  17. package/dist-lib/components/voorraad/PublishProgressCard.d.ts.map +1 -0
  18. package/dist-lib/components/voorraad/PublishProgressCard.js +30 -0
  19. package/dist-lib/components/voorraad/PublishReadinessCard.d.ts +10 -0
  20. package/dist-lib/components/voorraad/PublishReadinessCard.d.ts.map +1 -0
  21. package/dist-lib/components/voorraad/PublishReadinessCard.js +12 -0
  22. package/dist-lib/components/voorraad/StockSyncStatus.d.ts +2 -0
  23. package/dist-lib/components/voorraad/StockSyncStatus.d.ts.map +1 -0
  24. package/dist-lib/components/voorraad/StockSyncStatus.js +23 -0
  25. package/dist-lib/components/voorraad/VoorraadPage.d.ts.map +1 -1
  26. package/dist-lib/components/voorraad/VoorraadPage.js +5 -1
  27. package/dist-lib/components/voorraad/VoorraadTable.d.ts.map +1 -1
  28. package/dist-lib/components/voorraad/VoorraadTable.js +1 -1
  29. package/dist-lib/hooks/useFusten.d.ts +17 -0
  30. package/dist-lib/hooks/useFusten.d.ts.map +1 -0
  31. package/dist-lib/hooks/useFusten.js +81 -0
  32. package/dist-lib/hooks/useLocalTradeItems.d.ts +14 -4
  33. package/dist-lib/hooks/useLocalTradeItems.d.ts.map +1 -1
  34. package/dist-lib/hooks/useLocalTradeItems.js +83 -5
  35. package/dist-lib/hooks/useLogisticsTasks.d.ts +13 -0
  36. package/dist-lib/hooks/useLogisticsTasks.d.ts.map +1 -0
  37. package/dist-lib/hooks/useLogisticsTasks.js +155 -0
  38. package/dist-lib/hooks/usePublishJob.d.ts +13 -0
  39. package/dist-lib/hooks/usePublishJob.d.ts.map +1 -0
  40. package/dist-lib/hooks/usePublishJob.js +67 -0
  41. package/dist-lib/hooks/useRegisterModuleBaseUrl.d.ts +2 -0
  42. package/dist-lib/hooks/useRegisterModuleBaseUrl.d.ts.map +1 -0
  43. package/dist-lib/hooks/useRegisterModuleBaseUrl.js +31 -0
  44. package/dist-lib/hooks/useStockSyncHealth.d.ts +8 -0
  45. package/dist-lib/hooks/useStockSyncHealth.d.ts.map +1 -0
  46. package/dist-lib/hooks/useStockSyncHealth.js +42 -0
  47. package/dist-lib/hooks/useTradeItemStock.d.ts.map +1 -1
  48. package/dist-lib/hooks/useTradeItemStock.js +37 -1
  49. package/dist-lib/index.d.ts.map +1 -1
  50. package/dist-lib/index.js +5 -1
  51. package/dist-lib/integrations/supabase/auth-middleware.d.ts +1849 -50
  52. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  53. package/dist-lib/integrations/supabase/client.d.ts +1849 -50
  54. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  55. package/dist-lib/integrations/supabase/client.server.d.ts +1849 -50
  56. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  57. package/dist-lib/integrations/supabase/types.d.ts +1870 -41
  58. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  59. package/dist-lib/lib/floricode-required-features.functions.d.ts +1849 -50
  60. package/dist-lib/lib/floricode-required-features.functions.d.ts.map +1 -1
  61. package/dist-lib/lib/floriday-client.d.ts +1 -1
  62. package/dist-lib/lib/floriday-client.d.ts.map +1 -1
  63. package/dist-lib/lib/floriday-client.js +1 -2
  64. package/dist-lib/lib/floriday-customer-offer.functions.d.ts +1849 -50
  65. package/dist-lib/lib/floriday-customer-offer.functions.d.ts.map +1 -1
  66. package/dist-lib/lib/floriday-customer-offer.functions.js +14 -19
  67. package/dist-lib/lib/floriday-env.functions.d.ts +35712 -0
  68. package/dist-lib/lib/floriday-env.functions.d.ts.map +1 -0
  69. package/dist-lib/lib/floriday-env.functions.js +16 -0
  70. package/dist-lib/lib/floriday-env.server.d.ts +12 -0
  71. package/dist-lib/lib/floriday-env.server.d.ts.map +1 -1
  72. package/dist-lib/lib/floriday-env.server.js +15 -2
  73. package/dist-lib/lib/floriday-gateway.functions.d.ts +26934 -82
  74. package/dist-lib/lib/floriday-gateway.functions.d.ts.map +1 -1
  75. package/dist-lib/lib/floriday-gateway.functions.js +12 -3
  76. package/dist-lib/lib/floriday-readiness.server.d.ts +11 -0
  77. package/dist-lib/lib/floriday-readiness.server.d.ts.map +1 -0
  78. package/dist-lib/lib/floriday-readiness.server.js +43 -0
  79. package/dist-lib/lib/floriday-vbn-required.functions.d.ts +3698 -100
  80. package/dist-lib/lib/floriday-vbn-required.functions.d.ts.map +1 -1
  81. package/dist-lib/lib/floriday-warehouse.functions.d.ts +5442 -45
  82. package/dist-lib/lib/floriday-warehouse.functions.d.ts.map +1 -1
  83. package/dist-lib/lib/floriday-warehouse.functions.js +3 -0
  84. package/dist-lib/lib/floriday-writes.functions.d.ts +3698 -100
  85. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  86. package/dist-lib/lib/fusten.d.ts +87 -0
  87. package/dist-lib/lib/fusten.d.ts.map +1 -0
  88. package/dist-lib/lib/fusten.js +389 -0
  89. package/dist-lib/lib/logistics-engine.d.ts +63 -0
  90. package/dist-lib/lib/logistics-engine.d.ts.map +1 -0
  91. package/dist-lib/lib/logistics-engine.js +57 -0
  92. package/dist-lib/lib/logistics-events.d.ts +18 -0
  93. package/dist-lib/lib/logistics-events.d.ts.map +1 -0
  94. package/dist-lib/lib/logistics-events.js +61 -0
  95. package/dist-lib/lib/module-runtime-config.functions.d.ts +14 -0
  96. package/dist-lib/lib/module-runtime-config.functions.d.ts.map +1 -0
  97. package/dist-lib/lib/module-runtime-config.functions.js +107 -0
  98. package/dist-lib/lib/publish-errors.d.ts +37 -0
  99. package/dist-lib/lib/publish-errors.d.ts.map +1 -0
  100. package/dist-lib/lib/publish-errors.js +183 -0
  101. package/dist-lib/lib/publish-pipeline.d.ts +91 -0
  102. package/dist-lib/lib/publish-pipeline.d.ts.map +1 -0
  103. package/dist-lib/lib/publish-pipeline.js +212 -0
  104. package/dist-lib/lib/publish-readiness.d.ts +42 -0
  105. package/dist-lib/lib/publish-readiness.d.ts.map +1 -0
  106. package/dist-lib/lib/publish-readiness.js +102 -0
  107. package/package.json +2 -2
@@ -1656,15 +1656,7 @@ export type Database = {
1656
1656
  id?: string;
1657
1657
  user_id?: string | null;
1658
1658
  };
1659
- Relationships: [
1660
- {
1661
- foreignKeyName: "customer_audit_log_customer_id_fkey";
1662
- columns: ["customer_id"];
1663
- isOneToOne: false;
1664
- referencedRelation: "customers";
1665
- referencedColumns: ["id"];
1666
- }
1667
- ];
1659
+ Relationships: [];
1668
1660
  };
1669
1661
  customer_contacts: {
1670
1662
  Row: {
@@ -1727,9 +1719,12 @@ export type Database = {
1727
1719
  city: string | null;
1728
1720
  country: string | null;
1729
1721
  created_at: string;
1730
- customer_id: string;
1722
+ customer_id: string | null;
1723
+ external_key: string | null;
1724
+ external_provider: string | null;
1731
1725
  floriday_location_id: string | null;
1732
1726
  gln: string | null;
1727
+ group_key: string | null;
1733
1728
  house_number: string | null;
1734
1729
  id: string;
1735
1730
  is_primary: boolean;
@@ -1748,9 +1743,12 @@ export type Database = {
1748
1743
  city?: string | null;
1749
1744
  country?: string | null;
1750
1745
  created_at?: string;
1751
- customer_id: string;
1746
+ customer_id?: string | null;
1747
+ external_key?: string | null;
1748
+ external_provider?: string | null;
1752
1749
  floriday_location_id?: string | null;
1753
1750
  gln?: string | null;
1751
+ group_key?: string | null;
1754
1752
  house_number?: string | null;
1755
1753
  id?: string;
1756
1754
  is_primary?: boolean;
@@ -1769,9 +1767,12 @@ export type Database = {
1769
1767
  city?: string | null;
1770
1768
  country?: string | null;
1771
1769
  created_at?: string;
1772
- customer_id?: string;
1770
+ customer_id?: string | null;
1771
+ external_key?: string | null;
1772
+ external_provider?: string | null;
1773
1773
  floriday_location_id?: string | null;
1774
1774
  gln?: string | null;
1775
+ group_key?: string | null;
1775
1776
  house_number?: string | null;
1776
1777
  id?: string;
1777
1778
  is_primary?: boolean;
@@ -1865,6 +1866,41 @@ export type Database = {
1865
1866
  };
1866
1867
  Relationships: [];
1867
1868
  };
1869
+ customer_logistics_strategy: {
1870
+ Row: {
1871
+ created_at: string;
1872
+ id: string;
1873
+ ref_key: string;
1874
+ scope: string;
1875
+ strategy_id: string | null;
1876
+ updated_at: string;
1877
+ };
1878
+ Insert: {
1879
+ created_at?: string;
1880
+ id?: string;
1881
+ ref_key: string;
1882
+ scope: string;
1883
+ strategy_id?: string | null;
1884
+ updated_at?: string;
1885
+ };
1886
+ Update: {
1887
+ created_at?: string;
1888
+ id?: string;
1889
+ ref_key?: string;
1890
+ scope?: string;
1891
+ strategy_id?: string | null;
1892
+ updated_at?: string;
1893
+ };
1894
+ Relationships: [
1895
+ {
1896
+ foreignKeyName: "customer_logistics_strategy_strategy_id_fkey";
1897
+ columns: ["strategy_id"];
1898
+ isOneToOne: false;
1899
+ referencedRelation: "logistics_strategies";
1900
+ referencedColumns: ["id"];
1901
+ }
1902
+ ];
1903
+ };
1868
1904
  customer_price_group_members: {
1869
1905
  Row: {
1870
1906
  created_at: string;
@@ -2082,6 +2118,7 @@ export type Database = {
2082
2118
  bank_state: string | null;
2083
2119
  billing_email: string | null;
2084
2120
  bio: string | null;
2121
+ blocked: boolean;
2085
2122
  city: string | null;
2086
2123
  coc_number: string | null;
2087
2124
  commercial_name: string | null;
@@ -2090,11 +2127,14 @@ export type Database = {
2090
2127
  contact_person: string | null;
2091
2128
  country: string | null;
2092
2129
  created_at: string;
2130
+ credit_limit: number;
2093
2131
  custom_fields: Json;
2094
2132
  customer_class: string | null;
2095
2133
  customer_number: string | null;
2096
2134
  discount_days: number | null;
2097
2135
  discount_percentage: number | null;
2136
+ discount_surcharge: string;
2137
+ e_invoicing: boolean;
2098
2138
  email: string | null;
2099
2139
  external_id: string | null;
2100
2140
  fax: string | null;
@@ -2105,19 +2145,23 @@ export type Database = {
2105
2145
  house_number: string | null;
2106
2146
  icp_country_code: string | null;
2107
2147
  id: string;
2148
+ invoice_send_as: string;
2108
2149
  is_active: boolean;
2109
2150
  language: string | null;
2110
2151
  last_synced_at: string | null;
2152
+ ledger_account: string | null;
2111
2153
  logo_url: string | null;
2112
2154
  markets: string[];
2113
2155
  notes: string | null;
2114
2156
  organization_type: string | null;
2115
2157
  payment_methods: string[];
2158
+ payment_spec_method: string;
2116
2159
  payment_term_days: number | null;
2117
2160
  phone: string | null;
2118
2161
  postal_code: string | null;
2119
2162
  product_groups: string[];
2120
2163
  segments: string[];
2164
+ send_reminder: string;
2121
2165
  source: string;
2122
2166
  street: string | null;
2123
2167
  sync_error: string | null;
@@ -2153,6 +2197,7 @@ export type Database = {
2153
2197
  bank_state?: string | null;
2154
2198
  billing_email?: string | null;
2155
2199
  bio?: string | null;
2200
+ blocked?: boolean;
2156
2201
  city?: string | null;
2157
2202
  coc_number?: string | null;
2158
2203
  commercial_name?: string | null;
@@ -2161,11 +2206,14 @@ export type Database = {
2161
2206
  contact_person?: string | null;
2162
2207
  country?: string | null;
2163
2208
  created_at?: string;
2209
+ credit_limit?: number;
2164
2210
  custom_fields?: Json;
2165
2211
  customer_class?: string | null;
2166
2212
  customer_number?: string | null;
2167
2213
  discount_days?: number | null;
2168
2214
  discount_percentage?: number | null;
2215
+ discount_surcharge?: string;
2216
+ e_invoicing?: boolean;
2169
2217
  email?: string | null;
2170
2218
  external_id?: string | null;
2171
2219
  fax?: string | null;
@@ -2176,19 +2224,23 @@ export type Database = {
2176
2224
  house_number?: string | null;
2177
2225
  icp_country_code?: string | null;
2178
2226
  id?: string;
2227
+ invoice_send_as?: string;
2179
2228
  is_active?: boolean;
2180
2229
  language?: string | null;
2181
2230
  last_synced_at?: string | null;
2231
+ ledger_account?: string | null;
2182
2232
  logo_url?: string | null;
2183
2233
  markets?: string[];
2184
2234
  notes?: string | null;
2185
2235
  organization_type?: string | null;
2186
2236
  payment_methods?: string[];
2237
+ payment_spec_method?: string;
2187
2238
  payment_term_days?: number | null;
2188
2239
  phone?: string | null;
2189
2240
  postal_code?: string | null;
2190
2241
  product_groups?: string[];
2191
2242
  segments?: string[];
2243
+ send_reminder?: string;
2192
2244
  source?: string;
2193
2245
  street?: string | null;
2194
2246
  sync_error?: string | null;
@@ -2224,6 +2276,7 @@ export type Database = {
2224
2276
  bank_state?: string | null;
2225
2277
  billing_email?: string | null;
2226
2278
  bio?: string | null;
2279
+ blocked?: boolean;
2227
2280
  city?: string | null;
2228
2281
  coc_number?: string | null;
2229
2282
  commercial_name?: string | null;
@@ -2232,11 +2285,14 @@ export type Database = {
2232
2285
  contact_person?: string | null;
2233
2286
  country?: string | null;
2234
2287
  created_at?: string;
2288
+ credit_limit?: number;
2235
2289
  custom_fields?: Json;
2236
2290
  customer_class?: string | null;
2237
2291
  customer_number?: string | null;
2238
2292
  discount_days?: number | null;
2239
2293
  discount_percentage?: number | null;
2294
+ discount_surcharge?: string;
2295
+ e_invoicing?: boolean;
2240
2296
  email?: string | null;
2241
2297
  external_id?: string | null;
2242
2298
  fax?: string | null;
@@ -2247,19 +2303,23 @@ export type Database = {
2247
2303
  house_number?: string | null;
2248
2304
  icp_country_code?: string | null;
2249
2305
  id?: string;
2306
+ invoice_send_as?: string;
2250
2307
  is_active?: boolean;
2251
2308
  language?: string | null;
2252
2309
  last_synced_at?: string | null;
2310
+ ledger_account?: string | null;
2253
2311
  logo_url?: string | null;
2254
2312
  markets?: string[];
2255
2313
  notes?: string | null;
2256
2314
  organization_type?: string | null;
2257
2315
  payment_methods?: string[];
2316
+ payment_spec_method?: string;
2258
2317
  payment_term_days?: number | null;
2259
2318
  phone?: string | null;
2260
2319
  postal_code?: string | null;
2261
2320
  product_groups?: string[];
2262
2321
  segments?: string[];
2322
+ send_reminder?: string;
2263
2323
  source?: string;
2264
2324
  street?: string | null;
2265
2325
  sync_error?: string | null;
@@ -3000,6 +3060,7 @@ export type Database = {
3000
3060
  status: string;
3001
3061
  token_expires_at: string | null;
3002
3062
  updated_at: string;
3063
+ watch_scope: string;
3003
3064
  webhook_last_attempt_at: string | null;
3004
3065
  webhook_last_error: string | null;
3005
3066
  webhook_status: string;
@@ -3042,6 +3103,7 @@ export type Database = {
3042
3103
  status?: string;
3043
3104
  token_expires_at?: string | null;
3044
3105
  updated_at?: string;
3106
+ watch_scope?: string;
3045
3107
  webhook_last_attempt_at?: string | null;
3046
3108
  webhook_last_error?: string | null;
3047
3109
  webhook_status?: string;
@@ -3084,6 +3146,7 @@ export type Database = {
3084
3146
  status?: string;
3085
3147
  token_expires_at?: string | null;
3086
3148
  updated_at?: string;
3149
+ watch_scope?: string;
3087
3150
  webhook_last_attempt_at?: string | null;
3088
3151
  webhook_last_error?: string | null;
3089
3152
  webhook_status?: string;
@@ -3291,6 +3354,75 @@ export type Database = {
3291
3354
  }
3292
3355
  ];
3293
3356
  };
3357
+ email_auth_watch_folders: {
3358
+ Row: {
3359
+ connection_id: string;
3360
+ created_at: string;
3361
+ folder_id: string;
3362
+ folder_name: string | null;
3363
+ gmail_history_id: string | null;
3364
+ graph_subscription_expires_at: string | null;
3365
+ graph_subscription_id: string | null;
3366
+ id: string;
3367
+ imap_last_uid: number | null;
3368
+ imap_uid_validity: number | null;
3369
+ mailbox: string;
3370
+ provider: string;
3371
+ updated_at: string;
3372
+ webhook_last_error: string | null;
3373
+ webhook_status: string | null;
3374
+ };
3375
+ Insert: {
3376
+ connection_id: string;
3377
+ created_at?: string;
3378
+ folder_id: string;
3379
+ folder_name?: string | null;
3380
+ gmail_history_id?: string | null;
3381
+ graph_subscription_expires_at?: string | null;
3382
+ graph_subscription_id?: string | null;
3383
+ id?: string;
3384
+ imap_last_uid?: number | null;
3385
+ imap_uid_validity?: number | null;
3386
+ mailbox?: string;
3387
+ provider: string;
3388
+ updated_at?: string;
3389
+ webhook_last_error?: string | null;
3390
+ webhook_status?: string | null;
3391
+ };
3392
+ Update: {
3393
+ connection_id?: string;
3394
+ created_at?: string;
3395
+ folder_id?: string;
3396
+ folder_name?: string | null;
3397
+ gmail_history_id?: string | null;
3398
+ graph_subscription_expires_at?: string | null;
3399
+ graph_subscription_id?: string | null;
3400
+ id?: string;
3401
+ imap_last_uid?: number | null;
3402
+ imap_uid_validity?: number | null;
3403
+ mailbox?: string;
3404
+ provider?: string;
3405
+ updated_at?: string;
3406
+ webhook_last_error?: string | null;
3407
+ webhook_status?: string | null;
3408
+ };
3409
+ Relationships: [
3410
+ {
3411
+ foreignKeyName: "email_auth_watch_folders_connection_id_fkey";
3412
+ columns: ["connection_id"];
3413
+ isOneToOne: false;
3414
+ referencedRelation: "email_auth_connections";
3415
+ referencedColumns: ["id"];
3416
+ },
3417
+ {
3418
+ foreignKeyName: "email_auth_watch_folders_connection_id_fkey";
3419
+ columns: ["connection_id"];
3420
+ isOneToOne: false;
3421
+ referencedRelation: "email_auth_connections_safe";
3422
+ referencedColumns: ["id"];
3423
+ }
3424
+ ];
3425
+ };
3294
3426
  email_auth_webhook_log: {
3295
3427
  Row: {
3296
3428
  body_sample: string | null;
@@ -6486,6 +6618,110 @@ export type Database = {
6486
6618
  };
6487
6619
  Relationships: [];
6488
6620
  };
6621
+ fust_stock_mutations: {
6622
+ Row: {
6623
+ created_at: string;
6624
+ delta: number;
6625
+ fust_type_id: string;
6626
+ id: string;
6627
+ note: string | null;
6628
+ reason: string;
6629
+ trade_item_key: string | null;
6630
+ user_id: string;
6631
+ };
6632
+ Insert: {
6633
+ created_at?: string;
6634
+ delta: number;
6635
+ fust_type_id: string;
6636
+ id?: string;
6637
+ note?: string | null;
6638
+ reason?: string;
6639
+ trade_item_key?: string | null;
6640
+ user_id: string;
6641
+ };
6642
+ Update: {
6643
+ created_at?: string;
6644
+ delta?: number;
6645
+ fust_type_id?: string;
6646
+ id?: string;
6647
+ note?: string | null;
6648
+ reason?: string;
6649
+ trade_item_key?: string | null;
6650
+ user_id?: string;
6651
+ };
6652
+ Relationships: [
6653
+ {
6654
+ foreignKeyName: "fust_stock_mutations_fust_type_id_fkey";
6655
+ columns: ["fust_type_id"];
6656
+ isOneToOne: false;
6657
+ referencedRelation: "fust_types";
6658
+ referencedColumns: ["id"];
6659
+ }
6660
+ ];
6661
+ };
6662
+ fust_types: {
6663
+ Row: {
6664
+ connection_id: string | null;
6665
+ created_at: string;
6666
+ custom_package_id: string | null;
6667
+ fust_key: string;
6668
+ height_mm: number | null;
6669
+ id: string;
6670
+ in_use: boolean;
6671
+ length_mm: number | null;
6672
+ minimum_stock: number;
6673
+ name: string;
6674
+ notes: string | null;
6675
+ source: string;
6676
+ stock: number;
6677
+ updated_at: string;
6678
+ used_by_count: number;
6679
+ user_id: string;
6680
+ vbn_code: number | null;
6681
+ width_mm: number | null;
6682
+ };
6683
+ Insert: {
6684
+ connection_id?: string | null;
6685
+ created_at?: string;
6686
+ custom_package_id?: string | null;
6687
+ fust_key: string;
6688
+ height_mm?: number | null;
6689
+ id?: string;
6690
+ in_use?: boolean;
6691
+ length_mm?: number | null;
6692
+ minimum_stock?: number;
6693
+ name: string;
6694
+ notes?: string | null;
6695
+ source?: string;
6696
+ stock?: number;
6697
+ updated_at?: string;
6698
+ used_by_count?: number;
6699
+ user_id: string;
6700
+ vbn_code?: number | null;
6701
+ width_mm?: number | null;
6702
+ };
6703
+ Update: {
6704
+ connection_id?: string | null;
6705
+ created_at?: string;
6706
+ custom_package_id?: string | null;
6707
+ fust_key?: string;
6708
+ height_mm?: number | null;
6709
+ id?: string;
6710
+ in_use?: boolean;
6711
+ length_mm?: number | null;
6712
+ minimum_stock?: number;
6713
+ name?: string;
6714
+ notes?: string | null;
6715
+ source?: string;
6716
+ stock?: number;
6717
+ updated_at?: string;
6718
+ used_by_count?: number;
6719
+ user_id?: string;
6720
+ vbn_code?: number | null;
6721
+ width_mm?: number | null;
6722
+ };
6723
+ Relationships: [];
6724
+ };
6489
6725
  imap_accounts: {
6490
6726
  Row: {
6491
6727
  created_at: string;
@@ -7196,6 +7432,72 @@ export type Database = {
7196
7432
  }
7197
7433
  ];
7198
7434
  };
7435
+ load_carrier_types: {
7436
+ Row: {
7437
+ allow_mixing: boolean;
7438
+ capacity_model: string;
7439
+ code: string;
7440
+ created_at: string;
7441
+ id: string;
7442
+ is_active: boolean;
7443
+ is_default: boolean;
7444
+ layer_length_cm: number;
7445
+ layer_width_cm: number;
7446
+ layers_per_carrier: number;
7447
+ max_boxes: number | null;
7448
+ max_crates_per_layer: number | null;
7449
+ max_customers: number | null;
7450
+ max_height_cm: number | null;
7451
+ max_orders: number | null;
7452
+ max_weight_kg: number | null;
7453
+ name: string;
7454
+ sort_order: number;
7455
+ updated_at: string;
7456
+ };
7457
+ Insert: {
7458
+ allow_mixing?: boolean;
7459
+ capacity_model?: string;
7460
+ code: string;
7461
+ created_at?: string;
7462
+ id?: string;
7463
+ is_active?: boolean;
7464
+ is_default?: boolean;
7465
+ layer_length_cm?: number;
7466
+ layer_width_cm?: number;
7467
+ layers_per_carrier?: number;
7468
+ max_boxes?: number | null;
7469
+ max_crates_per_layer?: number | null;
7470
+ max_customers?: number | null;
7471
+ max_height_cm?: number | null;
7472
+ max_orders?: number | null;
7473
+ max_weight_kg?: number | null;
7474
+ name: string;
7475
+ sort_order?: number;
7476
+ updated_at?: string;
7477
+ };
7478
+ Update: {
7479
+ allow_mixing?: boolean;
7480
+ capacity_model?: string;
7481
+ code?: string;
7482
+ created_at?: string;
7483
+ id?: string;
7484
+ is_active?: boolean;
7485
+ is_default?: boolean;
7486
+ layer_length_cm?: number;
7487
+ layer_width_cm?: number;
7488
+ layers_per_carrier?: number;
7489
+ max_boxes?: number | null;
7490
+ max_crates_per_layer?: number | null;
7491
+ max_customers?: number | null;
7492
+ max_height_cm?: number | null;
7493
+ max_orders?: number | null;
7494
+ max_weight_kg?: number | null;
7495
+ name?: string;
7496
+ sort_order?: number;
7497
+ updated_at?: string;
7498
+ };
7499
+ Relationships: [];
7500
+ };
7199
7501
  local_customer_agreements: {
7200
7502
  Row: {
7201
7503
  base_price: number | null;
@@ -7540,6 +7842,63 @@ export type Database = {
7540
7842
  }
7541
7843
  ];
7542
7844
  };
7845
+ logistics_events: {
7846
+ Row: {
7847
+ created_at: string;
7848
+ error: string | null;
7849
+ event_type: string;
7850
+ id: string;
7851
+ idempotency_key: string | null;
7852
+ order_ref: string;
7853
+ payload: Json;
7854
+ plan_run_id: string | null;
7855
+ priority: number;
7856
+ processed_at: string | null;
7857
+ shadow: boolean;
7858
+ source_module: string;
7859
+ status: string;
7860
+ strategy_id: string | null;
7861
+ updated_at: string;
7862
+ user_id: string;
7863
+ };
7864
+ Insert: {
7865
+ created_at?: string;
7866
+ error?: string | null;
7867
+ event_type?: string;
7868
+ id?: string;
7869
+ idempotency_key?: string | null;
7870
+ order_ref: string;
7871
+ payload?: Json;
7872
+ plan_run_id?: string | null;
7873
+ priority?: number;
7874
+ processed_at?: string | null;
7875
+ shadow?: boolean;
7876
+ source_module: string;
7877
+ status?: string;
7878
+ strategy_id?: string | null;
7879
+ updated_at?: string;
7880
+ user_id?: string;
7881
+ };
7882
+ Update: {
7883
+ created_at?: string;
7884
+ error?: string | null;
7885
+ event_type?: string;
7886
+ id?: string;
7887
+ idempotency_key?: string | null;
7888
+ order_ref?: string;
7889
+ payload?: Json;
7890
+ plan_run_id?: string | null;
7891
+ priority?: number;
7892
+ processed_at?: string | null;
7893
+ shadow?: boolean;
7894
+ source_module?: string;
7895
+ status?: string;
7896
+ strategy_id?: string | null;
7897
+ updated_at?: string;
7898
+ user_id?: string;
7899
+ };
7900
+ Relationships: [];
7901
+ };
7543
7902
  logistics_formulas: {
7544
7903
  Row: {
7545
7904
  created_at: string;
@@ -7584,13 +7943,290 @@ export type Database = {
7584
7943
  }
7585
7944
  ];
7586
7945
  };
7587
- logistics_strategies: {
7946
+ logistics_plan_runs: {
7588
7947
  Row: {
7589
- color: string;
7590
7948
  created_at: string;
7591
- description: string | null;
7949
+ error: string | null;
7592
7950
  id: string;
7593
- is_active: boolean;
7951
+ input: Json;
7952
+ order_ref: string;
7953
+ rule_config_id: string | null;
7954
+ rule_version: number | null;
7955
+ settings_hash: string | null;
7956
+ settings_snapshot: Json;
7957
+ source_module: string | null;
7958
+ status: string;
7959
+ strategy_id: string | null;
7960
+ tasks_created: number;
7961
+ tasks_revised: number;
7962
+ trigger: string;
7963
+ updated_at: string;
7964
+ user_id: string;
7965
+ warnings: Json;
7966
+ };
7967
+ Insert: {
7968
+ created_at?: string;
7969
+ error?: string | null;
7970
+ id?: string;
7971
+ input?: Json;
7972
+ order_ref: string;
7973
+ rule_config_id?: string | null;
7974
+ rule_version?: number | null;
7975
+ settings_hash?: string | null;
7976
+ settings_snapshot?: Json;
7977
+ source_module?: string | null;
7978
+ status?: string;
7979
+ strategy_id?: string | null;
7980
+ tasks_created?: number;
7981
+ tasks_revised?: number;
7982
+ trigger?: string;
7983
+ updated_at?: string;
7984
+ user_id?: string;
7985
+ warnings?: Json;
7986
+ };
7987
+ Update: {
7988
+ created_at?: string;
7989
+ error?: string | null;
7990
+ id?: string;
7991
+ input?: Json;
7992
+ order_ref?: string;
7993
+ rule_config_id?: string | null;
7994
+ rule_version?: number | null;
7995
+ settings_hash?: string | null;
7996
+ settings_snapshot?: Json;
7997
+ source_module?: string | null;
7998
+ status?: string;
7999
+ strategy_id?: string | null;
8000
+ tasks_created?: number;
8001
+ tasks_revised?: number;
8002
+ trigger?: string;
8003
+ updated_at?: string;
8004
+ user_id?: string;
8005
+ warnings?: Json;
8006
+ };
8007
+ Relationships: [
8008
+ {
8009
+ foreignKeyName: "logistics_plan_runs_rule_config_id_fkey";
8010
+ columns: ["rule_config_id"];
8011
+ isOneToOne: false;
8012
+ referencedRelation: "logistics_rule_configs";
8013
+ referencedColumns: ["id"];
8014
+ },
8015
+ {
8016
+ foreignKeyName: "logistics_plan_runs_strategy_id_fkey";
8017
+ columns: ["strategy_id"];
8018
+ isOneToOne: false;
8019
+ referencedRelation: "logistics_strategies";
8020
+ referencedColumns: ["id"];
8021
+ }
8022
+ ];
8023
+ };
8024
+ logistics_rebuffer_state: {
8025
+ Row: {
8026
+ created_at: string;
8027
+ id: boolean;
8028
+ last_checked: number;
8029
+ last_duration_ms: number;
8030
+ last_run_at: string | null;
8031
+ last_updated: number;
8032
+ pending: boolean;
8033
+ requested_at: string | null;
8034
+ updated_at: string;
8035
+ };
8036
+ Insert: {
8037
+ created_at?: string;
8038
+ id?: boolean;
8039
+ last_checked?: number;
8040
+ last_duration_ms?: number;
8041
+ last_run_at?: string | null;
8042
+ last_updated?: number;
8043
+ pending?: boolean;
8044
+ requested_at?: string | null;
8045
+ updated_at?: string;
8046
+ };
8047
+ Update: {
8048
+ created_at?: string;
8049
+ id?: boolean;
8050
+ last_checked?: number;
8051
+ last_duration_ms?: number;
8052
+ last_run_at?: string | null;
8053
+ last_updated?: number;
8054
+ pending?: boolean;
8055
+ requested_at?: string | null;
8056
+ updated_at?: string;
8057
+ };
8058
+ Relationships: [];
8059
+ };
8060
+ logistics_rule_configs: {
8061
+ Row: {
8062
+ created_at: string;
8063
+ current_version: number;
8064
+ description: string | null;
8065
+ id: string;
8066
+ is_active: boolean;
8067
+ name: string;
8068
+ settings: Json;
8069
+ status: string;
8070
+ strategy_id: string | null;
8071
+ updated_at: string;
8072
+ user_id: string;
8073
+ };
8074
+ Insert: {
8075
+ created_at?: string;
8076
+ current_version?: number;
8077
+ description?: string | null;
8078
+ id?: string;
8079
+ is_active?: boolean;
8080
+ name: string;
8081
+ settings?: Json;
8082
+ status?: string;
8083
+ strategy_id?: string | null;
8084
+ updated_at?: string;
8085
+ user_id?: string;
8086
+ };
8087
+ Update: {
8088
+ created_at?: string;
8089
+ current_version?: number;
8090
+ description?: string | null;
8091
+ id?: string;
8092
+ is_active?: boolean;
8093
+ name?: string;
8094
+ settings?: Json;
8095
+ status?: string;
8096
+ strategy_id?: string | null;
8097
+ updated_at?: string;
8098
+ user_id?: string;
8099
+ };
8100
+ Relationships: [
8101
+ {
8102
+ foreignKeyName: "logistics_rule_configs_strategy_id_fkey";
8103
+ columns: ["strategy_id"];
8104
+ isOneToOne: false;
8105
+ referencedRelation: "logistics_strategies";
8106
+ referencedColumns: ["id"];
8107
+ }
8108
+ ];
8109
+ };
8110
+ logistics_rule_versions: {
8111
+ Row: {
8112
+ config_id: string;
8113
+ created_at: string;
8114
+ id: string;
8115
+ label: string | null;
8116
+ note: string | null;
8117
+ settings: Json;
8118
+ status: string;
8119
+ user_id: string;
8120
+ version: number;
8121
+ };
8122
+ Insert: {
8123
+ config_id: string;
8124
+ created_at?: string;
8125
+ id?: string;
8126
+ label?: string | null;
8127
+ note?: string | null;
8128
+ settings?: Json;
8129
+ status?: string;
8130
+ user_id?: string;
8131
+ version: number;
8132
+ };
8133
+ Update: {
8134
+ config_id?: string;
8135
+ created_at?: string;
8136
+ id?: string;
8137
+ label?: string | null;
8138
+ note?: string | null;
8139
+ settings?: Json;
8140
+ status?: string;
8141
+ user_id?: string;
8142
+ version?: number;
8143
+ };
8144
+ Relationships: [
8145
+ {
8146
+ foreignKeyName: "logistics_rule_versions_config_id_fkey";
8147
+ columns: ["config_id"];
8148
+ isOneToOne: false;
8149
+ referencedRelation: "logistics_rule_configs";
8150
+ referencedColumns: ["id"];
8151
+ }
8152
+ ];
8153
+ };
8154
+ logistics_stock_alerts: {
8155
+ Row: {
8156
+ created_at: string;
8157
+ customer_name: string | null;
8158
+ delivery_date: string | null;
8159
+ email_enabled: boolean;
8160
+ email_error: string | null;
8161
+ email_outbox_id: string | null;
8162
+ email_recipients: string[];
8163
+ email_sent_at: string | null;
8164
+ email_status: string;
8165
+ id: string;
8166
+ notification_id: string | null;
8167
+ order_id: string | null;
8168
+ order_ref: string;
8169
+ priority: number;
8170
+ resolved_at: string | null;
8171
+ resolved_by: string | null;
8172
+ shortages: Json;
8173
+ status: string;
8174
+ updated_at: string;
8175
+ user_id: string;
8176
+ };
8177
+ Insert: {
8178
+ created_at?: string;
8179
+ customer_name?: string | null;
8180
+ delivery_date?: string | null;
8181
+ email_enabled?: boolean;
8182
+ email_error?: string | null;
8183
+ email_outbox_id?: string | null;
8184
+ email_recipients?: string[];
8185
+ email_sent_at?: string | null;
8186
+ email_status?: string;
8187
+ id?: string;
8188
+ notification_id?: string | null;
8189
+ order_id?: string | null;
8190
+ order_ref: string;
8191
+ priority?: number;
8192
+ resolved_at?: string | null;
8193
+ resolved_by?: string | null;
8194
+ shortages?: Json;
8195
+ status?: string;
8196
+ updated_at?: string;
8197
+ user_id: string;
8198
+ };
8199
+ Update: {
8200
+ created_at?: string;
8201
+ customer_name?: string | null;
8202
+ delivery_date?: string | null;
8203
+ email_enabled?: boolean;
8204
+ email_error?: string | null;
8205
+ email_outbox_id?: string | null;
8206
+ email_recipients?: string[];
8207
+ email_sent_at?: string | null;
8208
+ email_status?: string;
8209
+ id?: string;
8210
+ notification_id?: string | null;
8211
+ order_id?: string | null;
8212
+ order_ref?: string;
8213
+ priority?: number;
8214
+ resolved_at?: string | null;
8215
+ resolved_by?: string | null;
8216
+ shortages?: Json;
8217
+ status?: string;
8218
+ updated_at?: string;
8219
+ user_id?: string;
8220
+ };
8221
+ Relationships: [];
8222
+ };
8223
+ logistics_strategies: {
8224
+ Row: {
8225
+ color: string;
8226
+ created_at: string;
8227
+ description: string | null;
8228
+ id: string;
8229
+ is_active: boolean;
7594
8230
  name: string;
7595
8231
  priority: number;
7596
8232
  updated_at: string;
@@ -7676,6 +8312,118 @@ export type Database = {
7676
8312
  }
7677
8313
  ];
7678
8314
  };
8315
+ logistics_tasks: {
8316
+ Row: {
8317
+ buffer_ref: string | null;
8318
+ claimed_at: string | null;
8319
+ claimed_by: string | null;
8320
+ completed_at: string | null;
8321
+ created_at: string;
8322
+ depends_on: string[];
8323
+ due_at: string | null;
8324
+ error: string | null;
8325
+ id: string;
8326
+ order_ref: string;
8327
+ owner_module: string;
8328
+ payload: Json;
8329
+ plan_run_id: string | null;
8330
+ planned_end: string | null;
8331
+ planned_start: string | null;
8332
+ priority: number;
8333
+ result: Json | null;
8334
+ rule_config_id: string | null;
8335
+ rule_version: number | null;
8336
+ sequence: number;
8337
+ shadow: boolean;
8338
+ started_at: string | null;
8339
+ status: string;
8340
+ strategy_id: string | null;
8341
+ task_type: string;
8342
+ updated_at: string;
8343
+ user_id: string;
8344
+ };
8345
+ Insert: {
8346
+ buffer_ref?: string | null;
8347
+ claimed_at?: string | null;
8348
+ claimed_by?: string | null;
8349
+ completed_at?: string | null;
8350
+ created_at?: string;
8351
+ depends_on?: string[];
8352
+ due_at?: string | null;
8353
+ error?: string | null;
8354
+ id?: string;
8355
+ order_ref: string;
8356
+ owner_module: string;
8357
+ payload?: Json;
8358
+ plan_run_id?: string | null;
8359
+ planned_end?: string | null;
8360
+ planned_start?: string | null;
8361
+ priority?: number;
8362
+ result?: Json | null;
8363
+ rule_config_id?: string | null;
8364
+ rule_version?: number | null;
8365
+ sequence?: number;
8366
+ shadow?: boolean;
8367
+ started_at?: string | null;
8368
+ status?: string;
8369
+ strategy_id?: string | null;
8370
+ task_type: string;
8371
+ updated_at?: string;
8372
+ user_id?: string;
8373
+ };
8374
+ Update: {
8375
+ buffer_ref?: string | null;
8376
+ claimed_at?: string | null;
8377
+ claimed_by?: string | null;
8378
+ completed_at?: string | null;
8379
+ created_at?: string;
8380
+ depends_on?: string[];
8381
+ due_at?: string | null;
8382
+ error?: string | null;
8383
+ id?: string;
8384
+ order_ref?: string;
8385
+ owner_module?: string;
8386
+ payload?: Json;
8387
+ plan_run_id?: string | null;
8388
+ planned_end?: string | null;
8389
+ planned_start?: string | null;
8390
+ priority?: number;
8391
+ result?: Json | null;
8392
+ rule_config_id?: string | null;
8393
+ rule_version?: number | null;
8394
+ sequence?: number;
8395
+ shadow?: boolean;
8396
+ started_at?: string | null;
8397
+ status?: string;
8398
+ strategy_id?: string | null;
8399
+ task_type?: string;
8400
+ updated_at?: string;
8401
+ user_id?: string;
8402
+ };
8403
+ Relationships: [
8404
+ {
8405
+ foreignKeyName: "logistics_tasks_plan_run_id_fkey";
8406
+ columns: ["plan_run_id"];
8407
+ isOneToOne: false;
8408
+ referencedRelation: "logistics_plan_runs";
8409
+ referencedColumns: ["id"];
8410
+ },
8411
+ {
8412
+ foreignKeyName: "logistics_tasks_rule_config_id_fkey";
8413
+ columns: ["rule_config_id"];
8414
+ isOneToOne: false;
8415
+ referencedRelation: "logistics_rule_configs";
8416
+ referencedColumns: ["id"];
8417
+ },
8418
+ {
8419
+ foreignKeyName: "logistics_tasks_strategy_id_fkey";
8420
+ columns: ["strategy_id"];
8421
+ isOneToOne: false;
8422
+ referencedRelation: "logistics_strategies";
8423
+ referencedColumns: ["id"];
8424
+ }
8425
+ ];
8426
+ };
7679
8427
  logistics_variables: {
7680
8428
  Row: {
7681
8429
  created_at: string;
@@ -8287,6 +9035,24 @@ export type Database = {
8287
9035
  };
8288
9036
  Relationships: [];
8289
9037
  };
9038
+ module_runtime_config: {
9039
+ Row: {
9040
+ key: string;
9041
+ updated_at: string;
9042
+ value: string;
9043
+ };
9044
+ Insert: {
9045
+ key: string;
9046
+ updated_at?: string;
9047
+ value: string;
9048
+ };
9049
+ Update: {
9050
+ key?: string;
9051
+ updated_at?: string;
9052
+ value?: string;
9053
+ };
9054
+ Relationships: [];
9055
+ };
8290
9056
  modules: {
8291
9057
  Row: {
8292
9058
  created_at: string;
@@ -9112,6 +9878,7 @@ export type Database = {
9112
9878
  };
9113
9879
  order_cart_items: {
9114
9880
  Row: {
9881
+ boxes: number | null;
9115
9882
  cart_id: string;
9116
9883
  crates: number;
9117
9884
  crates_per_layer: number;
@@ -9124,8 +9891,10 @@ export type Database = {
9124
9891
  plants_per_crate: number;
9125
9892
  product_id: string | null;
9126
9893
  product_name: string;
9894
+ weight_kg: number | null;
9127
9895
  };
9128
9896
  Insert: {
9897
+ boxes?: number | null;
9129
9898
  cart_id: string;
9130
9899
  crates: number;
9131
9900
  crates_per_layer?: number;
@@ -9138,8 +9907,10 @@ export type Database = {
9138
9907
  plants_per_crate?: number;
9139
9908
  product_id?: string | null;
9140
9909
  product_name: string;
9910
+ weight_kg?: number | null;
9141
9911
  };
9142
9912
  Update: {
9913
+ boxes?: number | null;
9143
9914
  cart_id?: string;
9144
9915
  crates?: number;
9145
9916
  crates_per_layer?: number;
@@ -9152,6 +9923,7 @@ export type Database = {
9152
9923
  plants_per_crate?: number;
9153
9924
  product_id?: string | null;
9154
9925
  product_name?: string;
9926
+ weight_kg?: number | null;
9155
9927
  };
9156
9928
  Relationships: [
9157
9929
  {
@@ -9181,47 +9953,59 @@ export type Database = {
9181
9953
  Row: {
9182
9954
  algorithm_version: number;
9183
9955
  buffer_id: string | null;
9956
+ carrier_type: string;
9957
+ carrier_type_id: string | null;
9184
9958
  cart_number: number;
9185
9959
  created_at: string;
9186
9960
  id: string;
9187
9961
  is_auto: boolean;
9188
9962
  is_complete: boolean;
9963
+ max_layers: number | null;
9189
9964
  notes: string | null;
9190
9965
  occupancy_pct: number;
9191
9966
  order_id: string | null;
9192
9967
  source: string;
9193
9968
  total_layers_used: number;
9194
9969
  updated_at: string;
9970
+ weight_kg: number | null;
9195
9971
  };
9196
9972
  Insert: {
9197
9973
  algorithm_version?: number;
9198
9974
  buffer_id?: string | null;
9975
+ carrier_type?: string;
9976
+ carrier_type_id?: string | null;
9199
9977
  cart_number: number;
9200
9978
  created_at?: string;
9201
9979
  id?: string;
9202
9980
  is_auto?: boolean;
9203
9981
  is_complete?: boolean;
9982
+ max_layers?: number | null;
9204
9983
  notes?: string | null;
9205
9984
  occupancy_pct?: number;
9206
9985
  order_id?: string | null;
9207
9986
  source?: string;
9208
9987
  total_layers_used?: number;
9209
9988
  updated_at?: string;
9989
+ weight_kg?: number | null;
9210
9990
  };
9211
9991
  Update: {
9212
9992
  algorithm_version?: number;
9213
9993
  buffer_id?: string | null;
9994
+ carrier_type?: string;
9995
+ carrier_type_id?: string | null;
9214
9996
  cart_number?: number;
9215
9997
  created_at?: string;
9216
9998
  id?: string;
9217
9999
  is_auto?: boolean;
9218
10000
  is_complete?: boolean;
10001
+ max_layers?: number | null;
9219
10002
  notes?: string | null;
9220
10003
  occupancy_pct?: number;
9221
10004
  order_id?: string | null;
9222
10005
  source?: string;
9223
10006
  total_layers_used?: number;
9224
10007
  updated_at?: string;
10008
+ weight_kg?: number | null;
9225
10009
  };
9226
10010
  Relationships: [
9227
10011
  {
@@ -9231,6 +10015,13 @@ export type Database = {
9231
10015
  referencedRelation: "order_buffers";
9232
10016
  referencedColumns: ["id"];
9233
10017
  },
10018
+ {
10019
+ foreignKeyName: "order_carts_carrier_type_id_fkey";
10020
+ columns: ["carrier_type_id"];
10021
+ isOneToOne: false;
10022
+ referencedRelation: "load_carrier_types";
10023
+ referencedColumns: ["id"];
10024
+ },
9234
10025
  {
9235
10026
  foreignKeyName: "order_carts_order_id_fkey";
9236
10027
  columns: ["order_id"];
@@ -10412,6 +11203,7 @@ export type Database = {
10412
11203
  lock_timeout_seconds: number;
10413
11204
  name: string;
10414
11205
  require_country_selection: boolean;
11206
+ slug: string | null;
10415
11207
  sort_order: number;
10416
11208
  sort_rules: Json;
10417
11209
  task_id: string | null;
@@ -10432,6 +11224,7 @@ export type Database = {
10432
11224
  lock_timeout_seconds?: number;
10433
11225
  name: string;
10434
11226
  require_country_selection?: boolean;
11227
+ slug?: string | null;
10435
11228
  sort_order?: number;
10436
11229
  sort_rules?: Json;
10437
11230
  task_id?: string | null;
@@ -10452,6 +11245,7 @@ export type Database = {
10452
11245
  lock_timeout_seconds?: number;
10453
11246
  name?: string;
10454
11247
  require_country_selection?: boolean;
11248
+ slug?: string | null;
10455
11249
  sort_order?: number;
10456
11250
  sort_rules?: Json;
10457
11251
  task_id?: string | null;
@@ -11009,6 +11803,56 @@ export type Database = {
11009
11803
  };
11010
11804
  Relationships: [];
11011
11805
  };
11806
+ product_bom_external_items: {
11807
+ Row: {
11808
+ created_at: string;
11809
+ id: string;
11810
+ name: string;
11811
+ packing_configuration_id: string | null;
11812
+ parent_product_id: string | null;
11813
+ parent_trade_item_floriday_id: string | null;
11814
+ quantity: number;
11815
+ sort_order: number;
11816
+ tenant_id: string;
11817
+ unit: string;
11818
+ updated_at: string;
11819
+ };
11820
+ Insert: {
11821
+ created_at?: string;
11822
+ id?: string;
11823
+ name: string;
11824
+ packing_configuration_id?: string | null;
11825
+ parent_product_id?: string | null;
11826
+ parent_trade_item_floriday_id?: string | null;
11827
+ quantity?: number;
11828
+ sort_order?: number;
11829
+ tenant_id: string;
11830
+ unit?: string;
11831
+ updated_at?: string;
11832
+ };
11833
+ Update: {
11834
+ created_at?: string;
11835
+ id?: string;
11836
+ name?: string;
11837
+ packing_configuration_id?: string | null;
11838
+ parent_product_id?: string | null;
11839
+ parent_trade_item_floriday_id?: string | null;
11840
+ quantity?: number;
11841
+ sort_order?: number;
11842
+ tenant_id?: string;
11843
+ unit?: string;
11844
+ updated_at?: string;
11845
+ };
11846
+ Relationships: [
11847
+ {
11848
+ foreignKeyName: "product_bom_external_items_parent_product_id_fkey";
11849
+ columns: ["parent_product_id"];
11850
+ isOneToOne: false;
11851
+ referencedRelation: "products";
11852
+ referencedColumns: ["id"];
11853
+ }
11854
+ ];
11855
+ };
11012
11856
  product_bom_items: {
11013
11857
  Row: {
11014
11858
  component_product_id: string | null;
@@ -12258,34 +13102,307 @@ export type Database = {
12258
13102
  capacity: number;
12259
13103
  color_code: string | null;
12260
13104
  created_at: string;
12261
- description: string | null;
12262
- hourly_rate: number;
13105
+ description: string | null;
13106
+ hourly_rate: number;
13107
+ id: string;
13108
+ image_url: string | null;
13109
+ is_active: boolean;
13110
+ name: string;
13111
+ };
13112
+ Insert: {
13113
+ capacity?: number;
13114
+ color_code?: string | null;
13115
+ created_at?: string;
13116
+ description?: string | null;
13117
+ hourly_rate?: number;
13118
+ id?: string;
13119
+ image_url?: string | null;
13120
+ is_active?: boolean;
13121
+ name: string;
13122
+ };
13123
+ Update: {
13124
+ capacity?: number;
13125
+ color_code?: string | null;
13126
+ created_at?: string;
13127
+ description?: string | null;
13128
+ hourly_rate?: number;
13129
+ id?: string;
13130
+ image_url?: string | null;
13131
+ is_active?: boolean;
13132
+ name?: string;
13133
+ };
13134
+ Relationships: [];
13135
+ };
13136
+ scan_kar_items: {
13137
+ Row: {
13138
+ barcode: string;
13139
+ id: string;
13140
+ kar_id: string;
13141
+ pakbon_id: string;
13142
+ pakbon_item_id: string;
13143
+ product_id: string | null;
13144
+ product_name: string;
13145
+ quantity: number;
13146
+ scanned_at: string;
13147
+ scanned_by: string | null;
13148
+ };
13149
+ Insert: {
13150
+ barcode: string;
13151
+ id?: string;
13152
+ kar_id: string;
13153
+ pakbon_id: string;
13154
+ pakbon_item_id: string;
13155
+ product_id?: string | null;
13156
+ product_name: string;
13157
+ quantity?: number;
13158
+ scanned_at?: string;
13159
+ scanned_by?: string | null;
13160
+ };
13161
+ Update: {
13162
+ barcode?: string;
13163
+ id?: string;
13164
+ kar_id?: string;
13165
+ pakbon_id?: string;
13166
+ pakbon_item_id?: string;
13167
+ product_id?: string | null;
13168
+ product_name?: string;
13169
+ quantity?: number;
13170
+ scanned_at?: string;
13171
+ scanned_by?: string | null;
13172
+ };
13173
+ Relationships: [
13174
+ {
13175
+ foreignKeyName: "scan_kar_items_kar_id_fkey";
13176
+ columns: ["kar_id"];
13177
+ isOneToOne: false;
13178
+ referencedRelation: "scan_karren";
13179
+ referencedColumns: ["id"];
13180
+ },
13181
+ {
13182
+ foreignKeyName: "scan_kar_items_pakbon_id_fkey";
13183
+ columns: ["pakbon_id"];
13184
+ isOneToOne: false;
13185
+ referencedRelation: "scan_pakbonnen";
13186
+ referencedColumns: ["id"];
13187
+ },
13188
+ {
13189
+ foreignKeyName: "scan_kar_items_pakbon_item_id_fkey";
13190
+ columns: ["pakbon_item_id"];
13191
+ isOneToOne: false;
13192
+ referencedRelation: "scan_pakbon_items";
13193
+ referencedColumns: ["id"];
13194
+ }
13195
+ ];
13196
+ };
13197
+ scan_kar_pakbonnen: {
13198
+ Row: {
13199
+ created_at: string;
13200
+ id: string;
13201
+ kar_id: string;
13202
+ pakbon_id: string;
13203
+ };
13204
+ Insert: {
13205
+ created_at?: string;
13206
+ id?: string;
13207
+ kar_id: string;
13208
+ pakbon_id: string;
13209
+ };
13210
+ Update: {
13211
+ created_at?: string;
13212
+ id?: string;
13213
+ kar_id?: string;
13214
+ pakbon_id?: string;
13215
+ };
13216
+ Relationships: [
13217
+ {
13218
+ foreignKeyName: "scan_kar_pakbonnen_kar_id_fkey";
13219
+ columns: ["kar_id"];
13220
+ isOneToOne: false;
13221
+ referencedRelation: "scan_karren";
13222
+ referencedColumns: ["id"];
13223
+ },
13224
+ {
13225
+ foreignKeyName: "scan_kar_pakbonnen_pakbon_id_fkey";
13226
+ columns: ["pakbon_id"];
13227
+ isOneToOne: false;
13228
+ referencedRelation: "scan_pakbonnen";
13229
+ referencedColumns: ["id"];
13230
+ }
13231
+ ];
13232
+ };
13233
+ scan_karren: {
13234
+ Row: {
13235
+ afgerond_op: string | null;
13236
+ buffer_key: string | null;
13237
+ created_at: string;
13238
+ customer_names: string[];
13239
+ geprint: boolean;
13240
+ geprint_op: string | null;
13241
+ id: string;
13242
+ kar_nummer: string;
13243
+ medewerker_id: string | null;
13244
+ medewerker_naam: string | null;
13245
+ naar_pickstation: boolean;
13246
+ naar_pickstation_op: string | null;
13247
+ order_number: string | null;
13248
+ scanner_key: string;
13249
+ status: string;
13250
+ totaal_producten: number;
13251
+ updated_at: string;
13252
+ };
13253
+ Insert: {
13254
+ afgerond_op?: string | null;
13255
+ buffer_key?: string | null;
13256
+ created_at?: string;
13257
+ customer_names?: string[];
13258
+ geprint?: boolean;
13259
+ geprint_op?: string | null;
13260
+ id?: string;
13261
+ kar_nummer?: string;
13262
+ medewerker_id?: string | null;
13263
+ medewerker_naam?: string | null;
13264
+ naar_pickstation?: boolean;
13265
+ naar_pickstation_op?: string | null;
13266
+ order_number?: string | null;
13267
+ scanner_key?: string;
13268
+ status?: string;
13269
+ totaal_producten?: number;
13270
+ updated_at?: string;
13271
+ };
13272
+ Update: {
13273
+ afgerond_op?: string | null;
13274
+ buffer_key?: string | null;
13275
+ created_at?: string;
13276
+ customer_names?: string[];
13277
+ geprint?: boolean;
13278
+ geprint_op?: string | null;
13279
+ id?: string;
13280
+ kar_nummer?: string;
13281
+ medewerker_id?: string | null;
13282
+ medewerker_naam?: string | null;
13283
+ naar_pickstation?: boolean;
13284
+ naar_pickstation_op?: string | null;
13285
+ order_number?: string | null;
13286
+ scanner_key?: string;
13287
+ status?: string;
13288
+ totaal_producten?: number;
13289
+ updated_at?: string;
13290
+ };
13291
+ Relationships: [];
13292
+ };
13293
+ scan_logs: {
13294
+ Row: {
13295
+ code: string;
13296
+ created_at: string;
13297
+ id: string;
13298
+ kar_id: string | null;
13299
+ message: string | null;
13300
+ result: string;
13301
+ scanner_key: string;
13302
+ user_id: string | null;
13303
+ };
13304
+ Insert: {
13305
+ code: string;
13306
+ created_at?: string;
13307
+ id?: string;
13308
+ kar_id?: string | null;
13309
+ message?: string | null;
13310
+ result: string;
13311
+ scanner_key?: string;
13312
+ user_id?: string | null;
13313
+ };
13314
+ Update: {
13315
+ code?: string;
13316
+ created_at?: string;
13317
+ id?: string;
13318
+ kar_id?: string | null;
13319
+ message?: string | null;
13320
+ result?: string;
13321
+ scanner_key?: string;
13322
+ user_id?: string | null;
13323
+ };
13324
+ Relationships: [];
13325
+ };
13326
+ scan_pakbon_items: {
13327
+ Row: {
13328
+ barcode: string;
13329
+ created_at: string;
13330
+ id: string;
13331
+ pakbon_id: string;
13332
+ product_id: string | null;
13333
+ product_name: string;
13334
+ quantity: number;
13335
+ scanned_quantity: number;
13336
+ };
13337
+ Insert: {
13338
+ barcode: string;
13339
+ created_at?: string;
13340
+ id?: string;
13341
+ pakbon_id: string;
13342
+ product_id?: string | null;
13343
+ product_name: string;
13344
+ quantity?: number;
13345
+ scanned_quantity?: number;
13346
+ };
13347
+ Update: {
13348
+ barcode?: string;
13349
+ created_at?: string;
13350
+ id?: string;
13351
+ pakbon_id?: string;
13352
+ product_id?: string | null;
13353
+ product_name?: string;
13354
+ quantity?: number;
13355
+ scanned_quantity?: number;
13356
+ };
13357
+ Relationships: [
13358
+ {
13359
+ foreignKeyName: "scan_pakbon_items_pakbon_id_fkey";
13360
+ columns: ["pakbon_id"];
13361
+ isOneToOne: false;
13362
+ referencedRelation: "scan_pakbonnen";
13363
+ referencedColumns: ["id"];
13364
+ }
13365
+ ];
13366
+ };
13367
+ scan_pakbonnen: {
13368
+ Row: {
13369
+ barcode: string;
13370
+ buffer_key: string | null;
13371
+ created_at: string;
13372
+ customer_name: string;
12263
13373
  id: string;
12264
- image_url: string | null;
12265
- is_active: boolean;
12266
- name: string;
13374
+ order_id: string | null;
13375
+ order_number: string;
13376
+ pakbon_nummer: string;
13377
+ printed_at: string;
13378
+ status: string;
13379
+ updated_at: string;
12267
13380
  };
12268
13381
  Insert: {
12269
- capacity?: number;
12270
- color_code?: string | null;
13382
+ barcode: string;
13383
+ buffer_key?: string | null;
12271
13384
  created_at?: string;
12272
- description?: string | null;
12273
- hourly_rate?: number;
13385
+ customer_name: string;
12274
13386
  id?: string;
12275
- image_url?: string | null;
12276
- is_active?: boolean;
12277
- name: string;
13387
+ order_id?: string | null;
13388
+ order_number: string;
13389
+ pakbon_nummer: string;
13390
+ printed_at?: string;
13391
+ status?: string;
13392
+ updated_at?: string;
12278
13393
  };
12279
13394
  Update: {
12280
- capacity?: number;
12281
- color_code?: string | null;
13395
+ barcode?: string;
13396
+ buffer_key?: string | null;
12282
13397
  created_at?: string;
12283
- description?: string | null;
12284
- hourly_rate?: number;
13398
+ customer_name?: string;
12285
13399
  id?: string;
12286
- image_url?: string | null;
12287
- is_active?: boolean;
12288
- name?: string;
13400
+ order_id?: string | null;
13401
+ order_number?: string;
13402
+ pakbon_nummer?: string;
13403
+ printed_at?: string;
13404
+ status?: string;
13405
+ updated_at?: string;
12289
13406
  };
12290
13407
  Relationships: [];
12291
13408
  };
@@ -12977,6 +14094,24 @@ export type Database = {
12977
14094
  };
12978
14095
  Relationships: [];
12979
14096
  };
14097
+ twinfield_cron_auth: {
14098
+ Row: {
14099
+ created_at: string;
14100
+ id: number;
14101
+ secret: string;
14102
+ };
14103
+ Insert: {
14104
+ created_at?: string;
14105
+ id?: number;
14106
+ secret?: string;
14107
+ };
14108
+ Update: {
14109
+ created_at?: string;
14110
+ id?: number;
14111
+ secret?: string;
14112
+ };
14113
+ Relationships: [];
14114
+ };
12980
14115
  twinfield_customers: {
12981
14116
  Row: {
12982
14117
  address: string | null;
@@ -13246,6 +14381,7 @@ export type Database = {
13246
14381
  default_invoice_type: string;
13247
14382
  default_payment_term_days: number;
13248
14383
  default_vat_code: string;
14384
+ home_country_code: string;
13249
14385
  invoice_enabled_ao: boolean;
13250
14386
  invoice_enabled_fo: boolean;
13251
14387
  invoice_enabled_ho: boolean;
@@ -13254,6 +14390,8 @@ export type Database = {
13254
14390
  payment_journal_code: string;
13255
14391
  updated_at: string;
13256
14392
  user_id: string;
14393
+ vat_code_eu_reverse: string | null;
14394
+ vat_code_export: string | null;
13257
14395
  };
13258
14396
  Insert: {
13259
14397
  created_at?: string;
@@ -13263,6 +14401,7 @@ export type Database = {
13263
14401
  default_invoice_type?: string;
13264
14402
  default_payment_term_days?: number;
13265
14403
  default_vat_code?: string;
14404
+ home_country_code?: string;
13266
14405
  invoice_enabled_ao?: boolean;
13267
14406
  invoice_enabled_fo?: boolean;
13268
14407
  invoice_enabled_ho?: boolean;
@@ -13271,6 +14410,8 @@ export type Database = {
13271
14410
  payment_journal_code?: string;
13272
14411
  updated_at?: string;
13273
14412
  user_id: string;
14413
+ vat_code_eu_reverse?: string | null;
14414
+ vat_code_export?: string | null;
13274
14415
  };
13275
14416
  Update: {
13276
14417
  created_at?: string;
@@ -13280,6 +14421,7 @@ export type Database = {
13280
14421
  default_invoice_type?: string;
13281
14422
  default_payment_term_days?: number;
13282
14423
  default_vat_code?: string;
14424
+ home_country_code?: string;
13283
14425
  invoice_enabled_ao?: boolean;
13284
14426
  invoice_enabled_fo?: boolean;
13285
14427
  invoice_enabled_ho?: boolean;
@@ -13288,6 +14430,8 @@ export type Database = {
13288
14430
  payment_journal_code?: string;
13289
14431
  updated_at?: string;
13290
14432
  user_id?: string;
14433
+ vat_code_eu_reverse?: string | null;
14434
+ vat_code_export?: string | null;
13291
14435
  };
13292
14436
  Relationships: [];
13293
14437
  };
@@ -13491,11 +14635,89 @@ export type Database = {
13491
14635
  }
13492
14636
  ];
13493
14637
  };
14638
+ twinfield_ledger_accounts_cache: {
14639
+ Row: {
14640
+ code: string;
14641
+ connection_id: string | null;
14642
+ created_at: string;
14643
+ dim_type: string;
14644
+ fetched_at: string;
14645
+ id: string;
14646
+ is_active: boolean;
14647
+ name: string | null;
14648
+ office_code: string;
14649
+ updated_at: string;
14650
+ };
14651
+ Insert: {
14652
+ code: string;
14653
+ connection_id?: string | null;
14654
+ created_at?: string;
14655
+ dim_type?: string;
14656
+ fetched_at?: string;
14657
+ id?: string;
14658
+ is_active?: boolean;
14659
+ name?: string | null;
14660
+ office_code: string;
14661
+ updated_at?: string;
14662
+ };
14663
+ Update: {
14664
+ code?: string;
14665
+ connection_id?: string | null;
14666
+ created_at?: string;
14667
+ dim_type?: string;
14668
+ fetched_at?: string;
14669
+ id?: string;
14670
+ is_active?: boolean;
14671
+ name?: string | null;
14672
+ office_code?: string;
14673
+ updated_at?: string;
14674
+ };
14675
+ Relationships: [];
14676
+ };
14677
+ twinfield_push_log: {
14678
+ Row: {
14679
+ created_at: string;
14680
+ customer_id: string | null;
14681
+ id: string;
14682
+ message: string | null;
14683
+ office_code: string | null;
14684
+ ok: boolean;
14685
+ queue_id: string | null;
14686
+ request_xml: string | null;
14687
+ response_raw: string | null;
14688
+ twinfield_code: string | null;
14689
+ };
14690
+ Insert: {
14691
+ created_at?: string;
14692
+ customer_id?: string | null;
14693
+ id?: string;
14694
+ message?: string | null;
14695
+ office_code?: string | null;
14696
+ ok?: boolean;
14697
+ queue_id?: string | null;
14698
+ request_xml?: string | null;
14699
+ response_raw?: string | null;
14700
+ twinfield_code?: string | null;
14701
+ };
14702
+ Update: {
14703
+ created_at?: string;
14704
+ customer_id?: string | null;
14705
+ id?: string;
14706
+ message?: string | null;
14707
+ office_code?: string | null;
14708
+ ok?: boolean;
14709
+ queue_id?: string | null;
14710
+ request_xml?: string | null;
14711
+ response_raw?: string | null;
14712
+ twinfield_code?: string | null;
14713
+ };
14714
+ Relationships: [];
14715
+ };
13494
14716
  twinfield_push_queue: {
13495
14717
  Row: {
13496
14718
  action: string;
13497
14719
  attempts: number;
13498
- connection_id: string;
14720
+ connection_id: string | null;
13499
14721
  created_at: string;
13500
14722
  customer_id: string | null;
13501
14723
  external_id: string | null;
@@ -13511,7 +14733,7 @@ export type Database = {
13511
14733
  Insert: {
13512
14734
  action?: string;
13513
14735
  attempts?: number;
13514
- connection_id: string;
14736
+ connection_id?: string | null;
13515
14737
  created_at?: string;
13516
14738
  customer_id?: string | null;
13517
14739
  external_id?: string | null;
@@ -13527,7 +14749,7 @@ export type Database = {
13527
14749
  Update: {
13528
14750
  action?: string;
13529
14751
  attempts?: number;
13530
- connection_id?: string;
14752
+ connection_id?: string | null;
13531
14753
  created_at?: string;
13532
14754
  customer_id?: string | null;
13533
14755
  external_id?: string | null;
@@ -13584,6 +14806,27 @@ export type Database = {
13584
14806
  };
13585
14807
  Relationships: [];
13586
14808
  };
14809
+ twinfield_revoked_accounts: {
14810
+ Row: {
14811
+ account_key: string;
14812
+ last_revoke_error: string | null;
14813
+ revoked_at: string;
14814
+ user_id: string;
14815
+ };
14816
+ Insert: {
14817
+ account_key: string;
14818
+ last_revoke_error?: string | null;
14819
+ revoked_at?: string;
14820
+ user_id: string;
14821
+ };
14822
+ Update: {
14823
+ account_key?: string;
14824
+ last_revoke_error?: string | null;
14825
+ revoked_at?: string;
14826
+ user_id?: string;
14827
+ };
14828
+ Relationships: [];
14829
+ };
13587
14830
  twinfield_session_cache: {
13588
14831
  Row: {
13589
14832
  cluster: string;
@@ -13841,7 +15084,165 @@ export type Database = {
13841
15084
  trade_item_id?: string | null;
13842
15085
  user_id?: string;
13843
15086
  };
13844
- Relationships: [];
15087
+ Relationships: [];
15088
+ };
15089
+ voorraad_publish_jobs: {
15090
+ Row: {
15091
+ connection_id: string | null;
15092
+ created_at: string;
15093
+ environment: string;
15094
+ finished_at: string | null;
15095
+ id: string;
15096
+ intent: string;
15097
+ product_id: string | null;
15098
+ reference_code: string;
15099
+ snapshot: Json;
15100
+ status: string;
15101
+ summary: Json;
15102
+ title: string | null;
15103
+ trade_item_id: string | null;
15104
+ trade_item_key: string | null;
15105
+ updated_at: string;
15106
+ user_id: string;
15107
+ };
15108
+ Insert: {
15109
+ connection_id?: string | null;
15110
+ created_at?: string;
15111
+ environment?: string;
15112
+ finished_at?: string | null;
15113
+ id?: string;
15114
+ intent?: string;
15115
+ product_id?: string | null;
15116
+ reference_code?: string;
15117
+ snapshot?: Json;
15118
+ status?: string;
15119
+ summary?: Json;
15120
+ title?: string | null;
15121
+ trade_item_id?: string | null;
15122
+ trade_item_key?: string | null;
15123
+ updated_at?: string;
15124
+ user_id: string;
15125
+ };
15126
+ Update: {
15127
+ connection_id?: string | null;
15128
+ created_at?: string;
15129
+ environment?: string;
15130
+ finished_at?: string | null;
15131
+ id?: string;
15132
+ intent?: string;
15133
+ product_id?: string | null;
15134
+ reference_code?: string;
15135
+ snapshot?: Json;
15136
+ status?: string;
15137
+ summary?: Json;
15138
+ title?: string | null;
15139
+ trade_item_id?: string | null;
15140
+ trade_item_key?: string | null;
15141
+ updated_at?: string;
15142
+ user_id?: string;
15143
+ };
15144
+ Relationships: [];
15145
+ };
15146
+ voorraad_publish_learnings: {
15147
+ Row: {
15148
+ created_at: string;
15149
+ field_key: string;
15150
+ hits: number;
15151
+ id: string;
15152
+ label: string | null;
15153
+ last_error: string | null;
15154
+ scope: string;
15155
+ updated_at: string;
15156
+ vbn_code: string;
15157
+ };
15158
+ Insert: {
15159
+ created_at?: string;
15160
+ field_key: string;
15161
+ hits?: number;
15162
+ id?: string;
15163
+ label?: string | null;
15164
+ last_error?: string | null;
15165
+ scope?: string;
15166
+ updated_at?: string;
15167
+ vbn_code: string;
15168
+ };
15169
+ Update: {
15170
+ created_at?: string;
15171
+ field_key?: string;
15172
+ hits?: number;
15173
+ id?: string;
15174
+ label?: string | null;
15175
+ last_error?: string | null;
15176
+ scope?: string;
15177
+ updated_at?: string;
15178
+ vbn_code?: string;
15179
+ };
15180
+ Relationships: [];
15181
+ };
15182
+ voorraad_publish_steps: {
15183
+ Row: {
15184
+ attempts: number;
15185
+ created_at: string;
15186
+ error_code: string | null;
15187
+ error_detail: string | null;
15188
+ error_message: string | null;
15189
+ finished_at: string | null;
15190
+ id: string;
15191
+ job_id: string;
15192
+ label: string;
15193
+ position: number;
15194
+ result: Json | null;
15195
+ started_at: string | null;
15196
+ status: string;
15197
+ step_key: string;
15198
+ updated_at: string;
15199
+ user_id: string;
15200
+ };
15201
+ Insert: {
15202
+ attempts?: number;
15203
+ created_at?: string;
15204
+ error_code?: string | null;
15205
+ error_detail?: string | null;
15206
+ error_message?: string | null;
15207
+ finished_at?: string | null;
15208
+ id?: string;
15209
+ job_id: string;
15210
+ label: string;
15211
+ position?: number;
15212
+ result?: Json | null;
15213
+ started_at?: string | null;
15214
+ status?: string;
15215
+ step_key: string;
15216
+ updated_at?: string;
15217
+ user_id: string;
15218
+ };
15219
+ Update: {
15220
+ attempts?: number;
15221
+ created_at?: string;
15222
+ error_code?: string | null;
15223
+ error_detail?: string | null;
15224
+ error_message?: string | null;
15225
+ finished_at?: string | null;
15226
+ id?: string;
15227
+ job_id?: string;
15228
+ label?: string;
15229
+ position?: number;
15230
+ result?: Json | null;
15231
+ started_at?: string | null;
15232
+ status?: string;
15233
+ step_key?: string;
15234
+ updated_at?: string;
15235
+ user_id?: string;
15236
+ };
15237
+ Relationships: [
15238
+ {
15239
+ foreignKeyName: "voorraad_publish_steps_job_id_fkey";
15240
+ columns: ["job_id"];
15241
+ isOneToOne: false;
15242
+ referencedRelation: "voorraad_publish_jobs";
15243
+ referencedColumns: ["id"];
15244
+ }
15245
+ ];
13845
15246
  };
13846
15247
  werkbon_package_ai_rules: {
13847
15248
  Row: {
@@ -15138,12 +16539,13 @@ export type Database = {
15138
16539
  };
15139
16540
  claim_twinfield_push_batch: {
15140
16541
  Args: {
16542
+ _customer_id?: string;
15141
16543
  _limit?: number;
15142
16544
  };
15143
16545
  Returns: {
15144
16546
  action: string;
15145
16547
  attempts: number;
15146
- connection_id: string;
16548
+ connection_id: string | null;
15147
16549
  created_at: string;
15148
16550
  customer_id: string | null;
15149
16551
  external_id: string | null;
@@ -15227,6 +16629,15 @@ export type Database = {
15227
16629
  };
15228
16630
  Returns: Json;
15229
16631
  };
16632
+ customer_soft_key: {
16633
+ Args: {
16634
+ _email: string;
16635
+ _house: string;
16636
+ _name: string;
16637
+ _postal: string;
16638
+ };
16639
+ Returns: string;
16640
+ };
15230
16641
  dashboard_alert_counts: {
15231
16642
  Args: never;
15232
16643
  Returns: Json;
@@ -15692,6 +17103,403 @@ export type Database = {
15692
17103
  };
15693
17104
  Returns: string;
15694
17105
  };
17106
+ logistics_address_key: {
17107
+ Args: {
17108
+ p_location: string;
17109
+ };
17110
+ Returns: string;
17111
+ };
17112
+ logistics_allowed_load_carriers: {
17113
+ Args: {
17114
+ p_strategy_id?: string;
17115
+ p_user_id?: string;
17116
+ };
17117
+ Returns: Json;
17118
+ };
17119
+ logistics_apply_buffer_decision: {
17120
+ Args: {
17121
+ p_order_id: string;
17122
+ };
17123
+ Returns: string;
17124
+ };
17125
+ logistics_apply_order_buffer: {
17126
+ Args: {
17127
+ p_order_id: string;
17128
+ };
17129
+ Returns: Json;
17130
+ };
17131
+ logistics_backorder_allowed: {
17132
+ Args: {
17133
+ p_strategy_id?: string;
17134
+ };
17135
+ Returns: boolean;
17136
+ };
17137
+ logistics_buffer_criteria: {
17138
+ Args: {
17139
+ p_settings: Json;
17140
+ };
17141
+ Returns: string[];
17142
+ };
17143
+ logistics_buffer_decision: {
17144
+ Args: {
17145
+ p_order?: Json;
17146
+ p_strategy_id?: string;
17147
+ p_user_id?: string;
17148
+ };
17149
+ Returns: Json;
17150
+ };
17151
+ logistics_buffer_simulate: {
17152
+ Args: {
17153
+ p_orders?: Json;
17154
+ p_strategy_id?: string;
17155
+ };
17156
+ Returns: Json;
17157
+ };
17158
+ logistics_buffer_value: {
17159
+ Args: {
17160
+ p_criterion: string;
17161
+ p_order: Json;
17162
+ };
17163
+ Returns: string;
17164
+ };
17165
+ logistics_cancel_order: {
17166
+ Args: {
17167
+ p_order_ref: string;
17168
+ p_reason?: string;
17169
+ p_user_id?: string;
17170
+ };
17171
+ Returns: number;
17172
+ };
17173
+ logistics_check_order_allowed: {
17174
+ Args: {
17175
+ p_lines: Json;
17176
+ p_strategy_id?: string;
17177
+ };
17178
+ Returns: Json;
17179
+ };
17180
+ logistics_check_order_stock: {
17181
+ Args: {
17182
+ p_event_id: string;
17183
+ };
17184
+ Returns: string;
17185
+ };
17186
+ logistics_claim_next_task: {
17187
+ Args: {
17188
+ p_owner_module: string;
17189
+ p_worker?: string;
17190
+ };
17191
+ Returns: {
17192
+ buffer_ref: string | null;
17193
+ claimed_at: string | null;
17194
+ claimed_by: string | null;
17195
+ completed_at: string | null;
17196
+ created_at: string;
17197
+ depends_on: string[];
17198
+ due_at: string | null;
17199
+ error: string | null;
17200
+ id: string;
17201
+ order_ref: string;
17202
+ owner_module: string;
17203
+ payload: Json;
17204
+ plan_run_id: string | null;
17205
+ planned_end: string | null;
17206
+ planned_start: string | null;
17207
+ priority: number;
17208
+ result: Json | null;
17209
+ rule_config_id: string | null;
17210
+ rule_version: number | null;
17211
+ sequence: number;
17212
+ shadow: boolean;
17213
+ started_at: string | null;
17214
+ status: string;
17215
+ strategy_id: string | null;
17216
+ task_type: string;
17217
+ updated_at: string;
17218
+ user_id: string;
17219
+ };
17220
+ SetofOptions: {
17221
+ from: "*";
17222
+ to: "logistics_tasks";
17223
+ isOneToOne: true;
17224
+ isSetofReturn: false;
17225
+ };
17226
+ };
17227
+ logistics_claim_task: {
17228
+ Args: {
17229
+ p_task_id: string;
17230
+ p_worker?: string;
17231
+ };
17232
+ Returns: {
17233
+ buffer_ref: string | null;
17234
+ claimed_at: string | null;
17235
+ claimed_by: string | null;
17236
+ completed_at: string | null;
17237
+ created_at: string;
17238
+ depends_on: string[];
17239
+ due_at: string | null;
17240
+ error: string | null;
17241
+ id: string;
17242
+ order_ref: string;
17243
+ owner_module: string;
17244
+ payload: Json;
17245
+ plan_run_id: string | null;
17246
+ planned_end: string | null;
17247
+ planned_start: string | null;
17248
+ priority: number;
17249
+ result: Json | null;
17250
+ rule_config_id: string | null;
17251
+ rule_version: number | null;
17252
+ sequence: number;
17253
+ shadow: boolean;
17254
+ started_at: string | null;
17255
+ status: string;
17256
+ strategy_id: string | null;
17257
+ task_type: string;
17258
+ updated_at: string;
17259
+ user_id: string;
17260
+ };
17261
+ SetofOptions: {
17262
+ from: "*";
17263
+ to: "logistics_tasks";
17264
+ isOneToOne: true;
17265
+ isSetofReturn: false;
17266
+ };
17267
+ };
17268
+ logistics_complete_task: {
17269
+ Args: {
17270
+ p_result?: Json;
17271
+ p_task_id: string;
17272
+ };
17273
+ Returns: {
17274
+ buffer_ref: string | null;
17275
+ claimed_at: string | null;
17276
+ claimed_by: string | null;
17277
+ completed_at: string | null;
17278
+ created_at: string;
17279
+ depends_on: string[];
17280
+ due_at: string | null;
17281
+ error: string | null;
17282
+ id: string;
17283
+ order_ref: string;
17284
+ owner_module: string;
17285
+ payload: Json;
17286
+ plan_run_id: string | null;
17287
+ planned_end: string | null;
17288
+ planned_start: string | null;
17289
+ priority: number;
17290
+ result: Json | null;
17291
+ rule_config_id: string | null;
17292
+ rule_version: number | null;
17293
+ sequence: number;
17294
+ shadow: boolean;
17295
+ started_at: string | null;
17296
+ status: string;
17297
+ strategy_id: string | null;
17298
+ task_type: string;
17299
+ updated_at: string;
17300
+ user_id: string;
17301
+ };
17302
+ SetofOptions: {
17303
+ from: "*";
17304
+ to: "logistics_tasks";
17305
+ isOneToOne: true;
17306
+ isSetofReturn: false;
17307
+ };
17308
+ };
17309
+ logistics_emit_event: {
17310
+ Args: {
17311
+ p_event_type: string;
17312
+ p_idempotency_key?: string;
17313
+ p_order_ref: string;
17314
+ p_payload?: Json;
17315
+ p_shadow?: boolean;
17316
+ p_source_module: string;
17317
+ p_strategy_id?: string;
17318
+ };
17319
+ Returns: Json;
17320
+ } | {
17321
+ Args: {
17322
+ p_event_type: string;
17323
+ p_idempotency_key?: string;
17324
+ p_order_ref: string;
17325
+ p_payload?: Json;
17326
+ p_priority?: number;
17327
+ p_shadow?: boolean;
17328
+ p_source_module: string;
17329
+ p_strategy_id?: string;
17330
+ };
17331
+ Returns: Json;
17332
+ };
17333
+ logistics_fail_task: {
17334
+ Args: {
17335
+ p_error: string;
17336
+ p_task_id: string;
17337
+ };
17338
+ Returns: {
17339
+ buffer_ref: string | null;
17340
+ claimed_at: string | null;
17341
+ claimed_by: string | null;
17342
+ completed_at: string | null;
17343
+ created_at: string;
17344
+ depends_on: string[];
17345
+ due_at: string | null;
17346
+ error: string | null;
17347
+ id: string;
17348
+ order_ref: string;
17349
+ owner_module: string;
17350
+ payload: Json;
17351
+ plan_run_id: string | null;
17352
+ planned_end: string | null;
17353
+ planned_start: string | null;
17354
+ priority: number;
17355
+ result: Json | null;
17356
+ rule_config_id: string | null;
17357
+ rule_version: number | null;
17358
+ sequence: number;
17359
+ shadow: boolean;
17360
+ started_at: string | null;
17361
+ status: string;
17362
+ strategy_id: string | null;
17363
+ task_type: string;
17364
+ updated_at: string;
17365
+ user_id: string;
17366
+ };
17367
+ SetofOptions: {
17368
+ from: "*";
17369
+ to: "logistics_tasks";
17370
+ isOneToOne: true;
17371
+ isSetofReturn: false;
17372
+ };
17373
+ };
17374
+ logistics_not_past: {
17375
+ Args: {
17376
+ p_ts: string;
17377
+ };
17378
+ Returns: string;
17379
+ };
17380
+ logistics_queue_stock_email: {
17381
+ Args: {
17382
+ p_alert_id: string;
17383
+ };
17384
+ Returns: string;
17385
+ };
17386
+ logistics_reapply_buffer_decisions: {
17387
+ Args: never;
17388
+ Returns: number;
17389
+ };
17390
+ logistics_rebuffer_open_orders: {
17391
+ Args: {
17392
+ p_strategy_id?: string;
17393
+ };
17394
+ Returns: Json;
17395
+ };
17396
+ logistics_rebuffer_orders: {
17397
+ Args: {
17398
+ p_days?: number;
17399
+ };
17400
+ Returns: Json;
17401
+ };
17402
+ logistics_rebuffer_pending: {
17403
+ Args: never;
17404
+ Returns: Json;
17405
+ };
17406
+ logistics_rescan_orders: {
17407
+ Args: {
17408
+ p_days?: number;
17409
+ };
17410
+ Returns: number;
17411
+ };
17412
+ logistics_resolve_settings: {
17413
+ Args: {
17414
+ p_config_id: string;
17415
+ p_user_id: string;
17416
+ p_version: number;
17417
+ };
17418
+ Returns: Json;
17419
+ };
17420
+ logistics_rule_bool: {
17421
+ Args: {
17422
+ p_default: boolean;
17423
+ p_key: string;
17424
+ p_settings: Json;
17425
+ p_step: string;
17426
+ };
17427
+ Returns: boolean;
17428
+ };
17429
+ logistics_rule_num: {
17430
+ Args: {
17431
+ p_default: number;
17432
+ p_key: string;
17433
+ p_settings: Json;
17434
+ p_step: string;
17435
+ };
17436
+ Returns: number;
17437
+ };
17438
+ logistics_rule_text: {
17439
+ Args: {
17440
+ p_default: string;
17441
+ p_key: string;
17442
+ p_settings: Json;
17443
+ p_step: string;
17444
+ };
17445
+ Returns: string;
17446
+ };
17447
+ logistics_rule_value: {
17448
+ Args: {
17449
+ p_key: string;
17450
+ p_settings: Json;
17451
+ p_step: string;
17452
+ };
17453
+ Returns: Json;
17454
+ };
17455
+ logistics_scan_order_stock: {
17456
+ Args: {
17457
+ p_order_id: string;
17458
+ };
17459
+ Returns: string;
17460
+ };
17461
+ logistics_set_order_priority: {
17462
+ Args: {
17463
+ p_order_ref: string;
17464
+ p_priority: number;
17465
+ p_user_id?: string;
17466
+ };
17467
+ Returns: number;
17468
+ };
17469
+ logistics_supersede_stale_tasks: {
17470
+ Args: {
17471
+ p_keep: string[];
17472
+ p_order_ref: string;
17473
+ p_run_id: string;
17474
+ p_user_id: string;
17475
+ };
17476
+ Returns: number;
17477
+ };
17478
+ logistics_task_owner: {
17479
+ Args: {
17480
+ p_task_type: string;
17481
+ };
17482
+ Returns: string;
17483
+ };
17484
+ logistics_upsert_task: {
17485
+ Args: {
17486
+ p_buffer_ref: string;
17487
+ p_end: string;
17488
+ p_order_ref: string;
17489
+ p_owner: string;
17490
+ p_payload: Json;
17491
+ p_rule_config_id: string;
17492
+ p_rule_version: number;
17493
+ p_run_id: string;
17494
+ p_sequence: number;
17495
+ p_shadow: boolean;
17496
+ p_start: string;
17497
+ p_strategy_id: string;
17498
+ p_task_type: string;
17499
+ p_user_id: string;
17500
+ };
17501
+ Returns: string;
17502
+ };
15695
17503
  mark_offer_clicked: {
15696
17504
  Args: {
15697
17505
  p_code: string;
@@ -15945,6 +17753,13 @@ export type Database = {
15945
17753
  waiting: number;
15946
17754
  }[];
15947
17755
  };
17756
+ pick_station_slugify: {
17757
+ Args: {
17758
+ _id: string;
17759
+ _name: string;
17760
+ };
17761
+ Returns: string;
17762
+ };
15948
17763
  pickstation_get_orders_raw: {
15949
17764
  Args: never;
15950
17765
  Returns: Json;
@@ -15985,6 +17800,12 @@ export type Database = {
15985
17800
  };
15986
17801
  Returns: undefined;
15987
17802
  };
17803
+ process_logistics_event: {
17804
+ Args: {
17805
+ p_event_id: string;
17806
+ };
17807
+ Returns: string;
17808
+ };
15988
17809
  produce_designed_product: {
15989
17810
  Args: {
15990
17811
  p_parent_id: string;
@@ -16110,6 +17931,14 @@ export type Database = {
16110
17931
  };
16111
17932
  Returns: Json;
16112
17933
  };
17934
+ run_floriday_continuous_stock_sync: {
17935
+ Args: never;
17936
+ Returns: undefined;
17937
+ };
17938
+ run_twinfield_queue_tick: {
17939
+ Args: never;
17940
+ Returns: undefined;
17941
+ };
16113
17942
  schedule_floriday_additional_services_sync: {
16114
17943
  Args: {
16115
17944
  p_apikey: string;
@@ -16441,7 +18270,7 @@ export type Database = {
16441
18270
  };
16442
18271
  twinfield_register_cron: {
16443
18272
  Args: {
16444
- apikey: string;
18273
+ apikey?: string;
16445
18274
  base_url: string;
16446
18275
  };
16447
18276
  Returns: Json;