@flowselections/floriday-klanten-module 1.0.10 → 1.0.12

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 (31) hide show
  1. package/dist-lib/components/klanten/GroupedKlantDetail.js +1 -1
  2. package/dist-lib/components/klanten/GroupedKlantDetailRoute.d.ts +2 -0
  3. package/dist-lib/components/klanten/GroupedKlantDetailRoute.d.ts.map +1 -0
  4. package/dist-lib/components/klanten/GroupedKlantDetailRoute.js +8 -0
  5. package/dist-lib/components/klanten/KlantDetail.js +1 -1
  6. package/dist-lib/components/klanten/KlantDetailRoute.d.ts +2 -0
  7. package/dist-lib/components/klanten/KlantDetailRoute.d.ts.map +1 -0
  8. package/dist-lib/components/klanten/KlantDetailRoute.js +8 -0
  9. package/dist-lib/components/klanten/KlantenOverzicht.js +1 -1
  10. package/dist-lib/index.d.ts +2 -0
  11. package/dist-lib/index.d.ts.map +1 -1
  12. package/dist-lib/index.js +2 -0
  13. package/dist-lib/integrations/supabase/auth-middleware.d.ts +227 -0
  14. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  15. package/dist-lib/integrations/supabase/client.d.ts +227 -0
  16. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  17. package/dist-lib/integrations/supabase/client.server.d.ts +227 -0
  18. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  19. package/dist-lib/integrations/supabase/types.d.ts +235 -0
  20. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  21. package/dist-lib/lib/accounting.functions.d.ts +681 -0
  22. package/dist-lib/lib/accounting.functions.d.ts.map +1 -1
  23. package/dist-lib/lib/customer-analytics.functions.d.ts +227 -0
  24. package/dist-lib/lib/customer-analytics.functions.d.ts.map +1 -1
  25. package/dist-lib/lib/customers.functions.d.ts +1589 -0
  26. package/dist-lib/lib/customers.functions.d.ts.map +1 -1
  27. package/dist-lib/lib/delivery-locations.functions.d.ts +908 -0
  28. package/dist-lib/lib/delivery-locations.functions.d.ts.map +1 -1
  29. package/dist-lib/lib/external-customers.functions.d.ts +908 -0
  30. package/dist-lib/lib/external-customers.functions.d.ts.map +1 -1
  31. package/package.json +25 -1
@@ -2734,6 +2734,7 @@ export declare const listCustomers: import("@tanstack/start-client-core").Requir
2734
2734
  };
2735
2735
  floricode_sync_state: {
2736
2736
  Row: {
2737
+ cursor_skip: number;
2737
2738
  error_message: string | null;
2738
2739
  last_change_date_time: string | null;
2739
2740
  last_sequence_number: number;
@@ -2743,6 +2744,7 @@ export declare const listCustomers: import("@tanstack/start-client-core").Requir
2743
2744
  updated_at: string;
2744
2745
  };
2745
2746
  Insert: {
2747
+ cursor_skip?: number;
2746
2748
  error_message?: string | null;
2747
2749
  last_change_date_time?: string | null;
2748
2750
  last_sequence_number?: number;
@@ -2752,6 +2754,7 @@ export declare const listCustomers: import("@tanstack/start-client-core").Requir
2752
2754
  updated_at?: string;
2753
2755
  };
2754
2756
  Update: {
2757
+ cursor_skip?: number;
2755
2758
  error_message?: string | null;
2756
2759
  last_change_date_time?: string | null;
2757
2760
  last_sequence_number?: number;
@@ -5099,6 +5102,93 @@ export declare const listCustomers: import("@tanstack/start-client-core").Requir
5099
5102
  };
5100
5103
  Relationships: [];
5101
5104
  };
5105
+ manufacture_product_components: {
5106
+ Row: {
5107
+ component_type: string;
5108
+ created_at: string;
5109
+ id: string;
5110
+ manufacture_product_id: string;
5111
+ product_group_id: string | null;
5112
+ quantity: number;
5113
+ trade_item_id: string | null;
5114
+ unit: string;
5115
+ };
5116
+ Insert: {
5117
+ component_type: string;
5118
+ created_at?: string;
5119
+ id?: string;
5120
+ manufacture_product_id: string;
5121
+ product_group_id?: string | null;
5122
+ quantity?: number;
5123
+ trade_item_id?: string | null;
5124
+ unit?: string;
5125
+ };
5126
+ Update: {
5127
+ component_type?: string;
5128
+ created_at?: string;
5129
+ id?: string;
5130
+ manufacture_product_id?: string;
5131
+ product_group_id?: string | null;
5132
+ quantity?: number;
5133
+ trade_item_id?: string | null;
5134
+ unit?: string;
5135
+ };
5136
+ Relationships: [{
5137
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
5138
+ columns: ["manufacture_product_id"];
5139
+ isOneToOne: false;
5140
+ referencedRelation: "manufacture_product_possible_stock_view";
5141
+ referencedColumns: ["manufacture_product_id"];
5142
+ }, {
5143
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
5144
+ columns: ["manufacture_product_id"];
5145
+ isOneToOne: false;
5146
+ referencedRelation: "manufacture_products";
5147
+ referencedColumns: ["id"];
5148
+ }, {
5149
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
5150
+ columns: ["product_group_id"];
5151
+ isOneToOne: false;
5152
+ referencedRelation: "product_groups";
5153
+ referencedColumns: ["id"];
5154
+ }];
5155
+ };
5156
+ manufacture_products: {
5157
+ Row: {
5158
+ created_at: string;
5159
+ description: string | null;
5160
+ id: string;
5161
+ is_active: boolean;
5162
+ name: string;
5163
+ produced_stock: number;
5164
+ product_code: string;
5165
+ tenant_id: string;
5166
+ updated_at: string;
5167
+ };
5168
+ Insert: {
5169
+ created_at?: string;
5170
+ description?: string | null;
5171
+ id?: string;
5172
+ is_active?: boolean;
5173
+ name: string;
5174
+ produced_stock?: number;
5175
+ product_code: string;
5176
+ tenant_id: string;
5177
+ updated_at?: string;
5178
+ };
5179
+ Update: {
5180
+ created_at?: string;
5181
+ description?: string | null;
5182
+ id?: string;
5183
+ is_active?: boolean;
5184
+ name?: string;
5185
+ produced_stock?: number;
5186
+ product_code?: string;
5187
+ tenant_id?: string;
5188
+ updated_at?: string;
5189
+ };
5190
+ Relationships: [];
5191
+ };
5102
5192
  monteurs: {
5103
5193
  Row: {
5104
5194
  avatar_url: string | null;
@@ -6059,6 +6149,66 @@ export declare const listCustomers: import("@tanstack/start-client-core").Requir
6059
6149
  };
6060
6150
  Relationships: [];
6061
6151
  };
6152
+ product_group_items: {
6153
+ Row: {
6154
+ created_at: string;
6155
+ id: string;
6156
+ product_group_id: string;
6157
+ quantity: number;
6158
+ trade_item_id: string;
6159
+ };
6160
+ Insert: {
6161
+ created_at?: string;
6162
+ id?: string;
6163
+ product_group_id: string;
6164
+ quantity?: number;
6165
+ trade_item_id: string;
6166
+ };
6167
+ Update: {
6168
+ created_at?: string;
6169
+ id?: string;
6170
+ product_group_id?: string;
6171
+ quantity?: number;
6172
+ trade_item_id?: string;
6173
+ };
6174
+ Relationships: [{
6175
+ foreignKeyName: "product_group_items_product_group_id_fkey";
6176
+ columns: ["product_group_id"];
6177
+ isOneToOne: false;
6178
+ referencedRelation: "product_groups";
6179
+ referencedColumns: ["id"];
6180
+ }];
6181
+ };
6182
+ product_groups: {
6183
+ Row: {
6184
+ created_at: string;
6185
+ description: string | null;
6186
+ id: string;
6187
+ is_active: boolean;
6188
+ name: string;
6189
+ tenant_id: string;
6190
+ updated_at: string;
6191
+ };
6192
+ Insert: {
6193
+ created_at?: string;
6194
+ description?: string | null;
6195
+ id?: string;
6196
+ is_active?: boolean;
6197
+ name: string;
6198
+ tenant_id: string;
6199
+ updated_at?: string;
6200
+ };
6201
+ Update: {
6202
+ created_at?: string;
6203
+ description?: string | null;
6204
+ id?: string;
6205
+ is_active?: boolean;
6206
+ name?: string;
6207
+ tenant_id?: string;
6208
+ updated_at?: string;
6209
+ };
6210
+ Relationships: [];
6211
+ };
6062
6212
  products: {
6063
6213
  Row: {
6064
6214
  barcode: string | null;
@@ -7220,6 +7370,48 @@ export declare const listCustomers: import("@tanstack/start-client-core").Requir
7220
7370
  };
7221
7371
  Relationships: [];
7222
7372
  };
7373
+ trade_item_stock: {
7374
+ Row: {
7375
+ connection_id: string;
7376
+ created_at: string;
7377
+ id: string;
7378
+ incoming_stock: number;
7379
+ minimum_stock: number;
7380
+ notes: string | null;
7381
+ physical_stock: number;
7382
+ reserved_stock: number;
7383
+ trade_item_key: string;
7384
+ updated_at: string;
7385
+ user_id: string;
7386
+ };
7387
+ Insert: {
7388
+ connection_id: string;
7389
+ created_at?: string;
7390
+ id?: string;
7391
+ incoming_stock?: number;
7392
+ minimum_stock?: number;
7393
+ notes?: string | null;
7394
+ physical_stock?: number;
7395
+ reserved_stock?: number;
7396
+ trade_item_key: string;
7397
+ updated_at?: string;
7398
+ user_id: string;
7399
+ };
7400
+ Update: {
7401
+ connection_id?: string;
7402
+ created_at?: string;
7403
+ id?: string;
7404
+ incoming_stock?: number;
7405
+ minimum_stock?: number;
7406
+ notes?: string | null;
7407
+ physical_stock?: number;
7408
+ reserved_stock?: number;
7409
+ trade_item_key?: string;
7410
+ updated_at?: string;
7411
+ user_id?: string;
7412
+ };
7413
+ Relationships: [];
7414
+ };
7223
7415
  twinfield_connections: {
7224
7416
  Row: {
7225
7417
  access_token: string | null;
@@ -8404,6 +8596,35 @@ export declare const listCustomers: import("@tanstack/start-client-core").Requir
8404
8596
  };
8405
8597
  Relationships: [];
8406
8598
  };
8599
+ manufacture_product_possible_stock_view: {
8600
+ Row: {
8601
+ component_count: number | null;
8602
+ manufacture_product_id: string | null;
8603
+ possible_stock: number | null;
8604
+ };
8605
+ Relationships: [];
8606
+ };
8607
+ product_group_stock_view: {
8608
+ Row: {
8609
+ item_count: number | null;
8610
+ product_group_id: string | null;
8611
+ total_stock: number | null;
8612
+ };
8613
+ Relationships: [{
8614
+ foreignKeyName: "product_group_items_product_group_id_fkey";
8615
+ columns: ["product_group_id"];
8616
+ isOneToOne: false;
8617
+ referencedRelation: "product_groups";
8618
+ referencedColumns: ["id"];
8619
+ }];
8620
+ };
8621
+ trade_item_stock_view: {
8622
+ Row: {
8623
+ stock: number | null;
8624
+ trade_item_id: string | null;
8625
+ };
8626
+ Relationships: [];
8627
+ };
8407
8628
  v_external_customers_exact: {
8408
8629
  Row: {
8409
8630
  account_number: string | null;
@@ -8974,6 +9195,12 @@ export declare const listCustomers: import("@tanstack/start-client-core").Requir
8974
9195
  row_count: number;
8975
9196
  }[];
8976
9197
  };
9198
+ refresh_floricode_derived_for_product: {
9199
+ Args: {
9200
+ p_product_code: string;
9201
+ };
9202
+ Returns: number;
9203
+ };
8977
9204
  reset_floriday_sync_cursor: {
8978
9205
  Args: {
8979
9206
  p_connection_id: string;
@@ -12066,6 +12293,7 @@ export declare const getCustomer: import("@tanstack/start-client-core").Required
12066
12293
  };
12067
12294
  floricode_sync_state: {
12068
12295
  Row: {
12296
+ cursor_skip: number;
12069
12297
  error_message: string | null;
12070
12298
  last_change_date_time: string | null;
12071
12299
  last_sequence_number: number;
@@ -12075,6 +12303,7 @@ export declare const getCustomer: import("@tanstack/start-client-core").Required
12075
12303
  updated_at: string;
12076
12304
  };
12077
12305
  Insert: {
12306
+ cursor_skip?: number;
12078
12307
  error_message?: string | null;
12079
12308
  last_change_date_time?: string | null;
12080
12309
  last_sequence_number?: number;
@@ -12084,6 +12313,7 @@ export declare const getCustomer: import("@tanstack/start-client-core").Required
12084
12313
  updated_at?: string;
12085
12314
  };
12086
12315
  Update: {
12316
+ cursor_skip?: number;
12087
12317
  error_message?: string | null;
12088
12318
  last_change_date_time?: string | null;
12089
12319
  last_sequence_number?: number;
@@ -14431,6 +14661,93 @@ export declare const getCustomer: import("@tanstack/start-client-core").Required
14431
14661
  };
14432
14662
  Relationships: [];
14433
14663
  };
14664
+ manufacture_product_components: {
14665
+ Row: {
14666
+ component_type: string;
14667
+ created_at: string;
14668
+ id: string;
14669
+ manufacture_product_id: string;
14670
+ product_group_id: string | null;
14671
+ quantity: number;
14672
+ trade_item_id: string | null;
14673
+ unit: string;
14674
+ };
14675
+ Insert: {
14676
+ component_type: string;
14677
+ created_at?: string;
14678
+ id?: string;
14679
+ manufacture_product_id: string;
14680
+ product_group_id?: string | null;
14681
+ quantity?: number;
14682
+ trade_item_id?: string | null;
14683
+ unit?: string;
14684
+ };
14685
+ Update: {
14686
+ component_type?: string;
14687
+ created_at?: string;
14688
+ id?: string;
14689
+ manufacture_product_id?: string;
14690
+ product_group_id?: string | null;
14691
+ quantity?: number;
14692
+ trade_item_id?: string | null;
14693
+ unit?: string;
14694
+ };
14695
+ Relationships: [{
14696
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
14697
+ columns: ["manufacture_product_id"];
14698
+ isOneToOne: false;
14699
+ referencedRelation: "manufacture_product_possible_stock_view";
14700
+ referencedColumns: ["manufacture_product_id"];
14701
+ }, {
14702
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
14703
+ columns: ["manufacture_product_id"];
14704
+ isOneToOne: false;
14705
+ referencedRelation: "manufacture_products";
14706
+ referencedColumns: ["id"];
14707
+ }, {
14708
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
14709
+ columns: ["product_group_id"];
14710
+ isOneToOne: false;
14711
+ referencedRelation: "product_groups";
14712
+ referencedColumns: ["id"];
14713
+ }];
14714
+ };
14715
+ manufacture_products: {
14716
+ Row: {
14717
+ created_at: string;
14718
+ description: string | null;
14719
+ id: string;
14720
+ is_active: boolean;
14721
+ name: string;
14722
+ produced_stock: number;
14723
+ product_code: string;
14724
+ tenant_id: string;
14725
+ updated_at: string;
14726
+ };
14727
+ Insert: {
14728
+ created_at?: string;
14729
+ description?: string | null;
14730
+ id?: string;
14731
+ is_active?: boolean;
14732
+ name: string;
14733
+ produced_stock?: number;
14734
+ product_code: string;
14735
+ tenant_id: string;
14736
+ updated_at?: string;
14737
+ };
14738
+ Update: {
14739
+ created_at?: string;
14740
+ description?: string | null;
14741
+ id?: string;
14742
+ is_active?: boolean;
14743
+ name?: string;
14744
+ produced_stock?: number;
14745
+ product_code?: string;
14746
+ tenant_id?: string;
14747
+ updated_at?: string;
14748
+ };
14749
+ Relationships: [];
14750
+ };
14434
14751
  monteurs: {
14435
14752
  Row: {
14436
14753
  avatar_url: string | null;
@@ -15391,6 +15708,66 @@ export declare const getCustomer: import("@tanstack/start-client-core").Required
15391
15708
  };
15392
15709
  Relationships: [];
15393
15710
  };
15711
+ product_group_items: {
15712
+ Row: {
15713
+ created_at: string;
15714
+ id: string;
15715
+ product_group_id: string;
15716
+ quantity: number;
15717
+ trade_item_id: string;
15718
+ };
15719
+ Insert: {
15720
+ created_at?: string;
15721
+ id?: string;
15722
+ product_group_id: string;
15723
+ quantity?: number;
15724
+ trade_item_id: string;
15725
+ };
15726
+ Update: {
15727
+ created_at?: string;
15728
+ id?: string;
15729
+ product_group_id?: string;
15730
+ quantity?: number;
15731
+ trade_item_id?: string;
15732
+ };
15733
+ Relationships: [{
15734
+ foreignKeyName: "product_group_items_product_group_id_fkey";
15735
+ columns: ["product_group_id"];
15736
+ isOneToOne: false;
15737
+ referencedRelation: "product_groups";
15738
+ referencedColumns: ["id"];
15739
+ }];
15740
+ };
15741
+ product_groups: {
15742
+ Row: {
15743
+ created_at: string;
15744
+ description: string | null;
15745
+ id: string;
15746
+ is_active: boolean;
15747
+ name: string;
15748
+ tenant_id: string;
15749
+ updated_at: string;
15750
+ };
15751
+ Insert: {
15752
+ created_at?: string;
15753
+ description?: string | null;
15754
+ id?: string;
15755
+ is_active?: boolean;
15756
+ name: string;
15757
+ tenant_id: string;
15758
+ updated_at?: string;
15759
+ };
15760
+ Update: {
15761
+ created_at?: string;
15762
+ description?: string | null;
15763
+ id?: string;
15764
+ is_active?: boolean;
15765
+ name?: string;
15766
+ tenant_id?: string;
15767
+ updated_at?: string;
15768
+ };
15769
+ Relationships: [];
15770
+ };
15394
15771
  products: {
15395
15772
  Row: {
15396
15773
  barcode: string | null;
@@ -16552,6 +16929,48 @@ export declare const getCustomer: import("@tanstack/start-client-core").Required
16552
16929
  };
16553
16930
  Relationships: [];
16554
16931
  };
16932
+ trade_item_stock: {
16933
+ Row: {
16934
+ connection_id: string;
16935
+ created_at: string;
16936
+ id: string;
16937
+ incoming_stock: number;
16938
+ minimum_stock: number;
16939
+ notes: string | null;
16940
+ physical_stock: number;
16941
+ reserved_stock: number;
16942
+ trade_item_key: string;
16943
+ updated_at: string;
16944
+ user_id: string;
16945
+ };
16946
+ Insert: {
16947
+ connection_id: string;
16948
+ created_at?: string;
16949
+ id?: string;
16950
+ incoming_stock?: number;
16951
+ minimum_stock?: number;
16952
+ notes?: string | null;
16953
+ physical_stock?: number;
16954
+ reserved_stock?: number;
16955
+ trade_item_key: string;
16956
+ updated_at?: string;
16957
+ user_id: string;
16958
+ };
16959
+ Update: {
16960
+ connection_id?: string;
16961
+ created_at?: string;
16962
+ id?: string;
16963
+ incoming_stock?: number;
16964
+ minimum_stock?: number;
16965
+ notes?: string | null;
16966
+ physical_stock?: number;
16967
+ reserved_stock?: number;
16968
+ trade_item_key?: string;
16969
+ updated_at?: string;
16970
+ user_id?: string;
16971
+ };
16972
+ Relationships: [];
16973
+ };
16555
16974
  twinfield_connections: {
16556
16975
  Row: {
16557
16976
  access_token: string | null;
@@ -17736,6 +18155,35 @@ export declare const getCustomer: import("@tanstack/start-client-core").Required
17736
18155
  };
17737
18156
  Relationships: [];
17738
18157
  };
18158
+ manufacture_product_possible_stock_view: {
18159
+ Row: {
18160
+ component_count: number | null;
18161
+ manufacture_product_id: string | null;
18162
+ possible_stock: number | null;
18163
+ };
18164
+ Relationships: [];
18165
+ };
18166
+ product_group_stock_view: {
18167
+ Row: {
18168
+ item_count: number | null;
18169
+ product_group_id: string | null;
18170
+ total_stock: number | null;
18171
+ };
18172
+ Relationships: [{
18173
+ foreignKeyName: "product_group_items_product_group_id_fkey";
18174
+ columns: ["product_group_id"];
18175
+ isOneToOne: false;
18176
+ referencedRelation: "product_groups";
18177
+ referencedColumns: ["id"];
18178
+ }];
18179
+ };
18180
+ trade_item_stock_view: {
18181
+ Row: {
18182
+ stock: number | null;
18183
+ trade_item_id: string | null;
18184
+ };
18185
+ Relationships: [];
18186
+ };
17739
18187
  v_external_customers_exact: {
17740
18188
  Row: {
17741
18189
  account_number: string | null;
@@ -18306,6 +18754,12 @@ export declare const getCustomer: import("@tanstack/start-client-core").Required
18306
18754
  row_count: number;
18307
18755
  }[];
18308
18756
  };
18757
+ refresh_floricode_derived_for_product: {
18758
+ Args: {
18759
+ p_product_code: string;
18760
+ };
18761
+ Returns: number;
18762
+ };
18309
18763
  reset_floriday_sync_cursor: {
18310
18764
  Args: {
18311
18765
  p_connection_id: string;
@@ -21470,6 +21924,7 @@ export declare const createCustomer: import("@tanstack/start-client-core").Requi
21470
21924
  };
21471
21925
  floricode_sync_state: {
21472
21926
  Row: {
21927
+ cursor_skip: number;
21473
21928
  error_message: string | null;
21474
21929
  last_change_date_time: string | null;
21475
21930
  last_sequence_number: number;
@@ -21479,6 +21934,7 @@ export declare const createCustomer: import("@tanstack/start-client-core").Requi
21479
21934
  updated_at: string;
21480
21935
  };
21481
21936
  Insert: {
21937
+ cursor_skip?: number;
21482
21938
  error_message?: string | null;
21483
21939
  last_change_date_time?: string | null;
21484
21940
  last_sequence_number?: number;
@@ -21488,6 +21944,7 @@ export declare const createCustomer: import("@tanstack/start-client-core").Requi
21488
21944
  updated_at?: string;
21489
21945
  };
21490
21946
  Update: {
21947
+ cursor_skip?: number;
21491
21948
  error_message?: string | null;
21492
21949
  last_change_date_time?: string | null;
21493
21950
  last_sequence_number?: number;
@@ -23835,6 +24292,93 @@ export declare const createCustomer: import("@tanstack/start-client-core").Requi
23835
24292
  };
23836
24293
  Relationships: [];
23837
24294
  };
24295
+ manufacture_product_components: {
24296
+ Row: {
24297
+ component_type: string;
24298
+ created_at: string;
24299
+ id: string;
24300
+ manufacture_product_id: string;
24301
+ product_group_id: string | null;
24302
+ quantity: number;
24303
+ trade_item_id: string | null;
24304
+ unit: string;
24305
+ };
24306
+ Insert: {
24307
+ component_type: string;
24308
+ created_at?: string;
24309
+ id?: string;
24310
+ manufacture_product_id: string;
24311
+ product_group_id?: string | null;
24312
+ quantity?: number;
24313
+ trade_item_id?: string | null;
24314
+ unit?: string;
24315
+ };
24316
+ Update: {
24317
+ component_type?: string;
24318
+ created_at?: string;
24319
+ id?: string;
24320
+ manufacture_product_id?: string;
24321
+ product_group_id?: string | null;
24322
+ quantity?: number;
24323
+ trade_item_id?: string | null;
24324
+ unit?: string;
24325
+ };
24326
+ Relationships: [{
24327
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
24328
+ columns: ["manufacture_product_id"];
24329
+ isOneToOne: false;
24330
+ referencedRelation: "manufacture_product_possible_stock_view";
24331
+ referencedColumns: ["manufacture_product_id"];
24332
+ }, {
24333
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
24334
+ columns: ["manufacture_product_id"];
24335
+ isOneToOne: false;
24336
+ referencedRelation: "manufacture_products";
24337
+ referencedColumns: ["id"];
24338
+ }, {
24339
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
24340
+ columns: ["product_group_id"];
24341
+ isOneToOne: false;
24342
+ referencedRelation: "product_groups";
24343
+ referencedColumns: ["id"];
24344
+ }];
24345
+ };
24346
+ manufacture_products: {
24347
+ Row: {
24348
+ created_at: string;
24349
+ description: string | null;
24350
+ id: string;
24351
+ is_active: boolean;
24352
+ name: string;
24353
+ produced_stock: number;
24354
+ product_code: string;
24355
+ tenant_id: string;
24356
+ updated_at: string;
24357
+ };
24358
+ Insert: {
24359
+ created_at?: string;
24360
+ description?: string | null;
24361
+ id?: string;
24362
+ is_active?: boolean;
24363
+ name: string;
24364
+ produced_stock?: number;
24365
+ product_code: string;
24366
+ tenant_id: string;
24367
+ updated_at?: string;
24368
+ };
24369
+ Update: {
24370
+ created_at?: string;
24371
+ description?: string | null;
24372
+ id?: string;
24373
+ is_active?: boolean;
24374
+ name?: string;
24375
+ produced_stock?: number;
24376
+ product_code?: string;
24377
+ tenant_id?: string;
24378
+ updated_at?: string;
24379
+ };
24380
+ Relationships: [];
24381
+ };
23838
24382
  monteurs: {
23839
24383
  Row: {
23840
24384
  avatar_url: string | null;
@@ -24795,6 +25339,66 @@ export declare const createCustomer: import("@tanstack/start-client-core").Requi
24795
25339
  };
24796
25340
  Relationships: [];
24797
25341
  };
25342
+ product_group_items: {
25343
+ Row: {
25344
+ created_at: string;
25345
+ id: string;
25346
+ product_group_id: string;
25347
+ quantity: number;
25348
+ trade_item_id: string;
25349
+ };
25350
+ Insert: {
25351
+ created_at?: string;
25352
+ id?: string;
25353
+ product_group_id: string;
25354
+ quantity?: number;
25355
+ trade_item_id: string;
25356
+ };
25357
+ Update: {
25358
+ created_at?: string;
25359
+ id?: string;
25360
+ product_group_id?: string;
25361
+ quantity?: number;
25362
+ trade_item_id?: string;
25363
+ };
25364
+ Relationships: [{
25365
+ foreignKeyName: "product_group_items_product_group_id_fkey";
25366
+ columns: ["product_group_id"];
25367
+ isOneToOne: false;
25368
+ referencedRelation: "product_groups";
25369
+ referencedColumns: ["id"];
25370
+ }];
25371
+ };
25372
+ product_groups: {
25373
+ Row: {
25374
+ created_at: string;
25375
+ description: string | null;
25376
+ id: string;
25377
+ is_active: boolean;
25378
+ name: string;
25379
+ tenant_id: string;
25380
+ updated_at: string;
25381
+ };
25382
+ Insert: {
25383
+ created_at?: string;
25384
+ description?: string | null;
25385
+ id?: string;
25386
+ is_active?: boolean;
25387
+ name: string;
25388
+ tenant_id: string;
25389
+ updated_at?: string;
25390
+ };
25391
+ Update: {
25392
+ created_at?: string;
25393
+ description?: string | null;
25394
+ id?: string;
25395
+ is_active?: boolean;
25396
+ name?: string;
25397
+ tenant_id?: string;
25398
+ updated_at?: string;
25399
+ };
25400
+ Relationships: [];
25401
+ };
24798
25402
  products: {
24799
25403
  Row: {
24800
25404
  barcode: string | null;
@@ -25956,6 +26560,48 @@ export declare const createCustomer: import("@tanstack/start-client-core").Requi
25956
26560
  };
25957
26561
  Relationships: [];
25958
26562
  };
26563
+ trade_item_stock: {
26564
+ Row: {
26565
+ connection_id: string;
26566
+ created_at: string;
26567
+ id: string;
26568
+ incoming_stock: number;
26569
+ minimum_stock: number;
26570
+ notes: string | null;
26571
+ physical_stock: number;
26572
+ reserved_stock: number;
26573
+ trade_item_key: string;
26574
+ updated_at: string;
26575
+ user_id: string;
26576
+ };
26577
+ Insert: {
26578
+ connection_id: string;
26579
+ created_at?: string;
26580
+ id?: string;
26581
+ incoming_stock?: number;
26582
+ minimum_stock?: number;
26583
+ notes?: string | null;
26584
+ physical_stock?: number;
26585
+ reserved_stock?: number;
26586
+ trade_item_key: string;
26587
+ updated_at?: string;
26588
+ user_id: string;
26589
+ };
26590
+ Update: {
26591
+ connection_id?: string;
26592
+ created_at?: string;
26593
+ id?: string;
26594
+ incoming_stock?: number;
26595
+ minimum_stock?: number;
26596
+ notes?: string | null;
26597
+ physical_stock?: number;
26598
+ reserved_stock?: number;
26599
+ trade_item_key?: string;
26600
+ updated_at?: string;
26601
+ user_id?: string;
26602
+ };
26603
+ Relationships: [];
26604
+ };
25959
26605
  twinfield_connections: {
25960
26606
  Row: {
25961
26607
  access_token: string | null;
@@ -27140,6 +27786,35 @@ export declare const createCustomer: import("@tanstack/start-client-core").Requi
27140
27786
  };
27141
27787
  Relationships: [];
27142
27788
  };
27789
+ manufacture_product_possible_stock_view: {
27790
+ Row: {
27791
+ component_count: number | null;
27792
+ manufacture_product_id: string | null;
27793
+ possible_stock: number | null;
27794
+ };
27795
+ Relationships: [];
27796
+ };
27797
+ product_group_stock_view: {
27798
+ Row: {
27799
+ item_count: number | null;
27800
+ product_group_id: string | null;
27801
+ total_stock: number | null;
27802
+ };
27803
+ Relationships: [{
27804
+ foreignKeyName: "product_group_items_product_group_id_fkey";
27805
+ columns: ["product_group_id"];
27806
+ isOneToOne: false;
27807
+ referencedRelation: "product_groups";
27808
+ referencedColumns: ["id"];
27809
+ }];
27810
+ };
27811
+ trade_item_stock_view: {
27812
+ Row: {
27813
+ stock: number | null;
27814
+ trade_item_id: string | null;
27815
+ };
27816
+ Relationships: [];
27817
+ };
27143
27818
  v_external_customers_exact: {
27144
27819
  Row: {
27145
27820
  account_number: string | null;
@@ -27710,6 +28385,12 @@ export declare const createCustomer: import("@tanstack/start-client-core").Requi
27710
28385
  row_count: number;
27711
28386
  }[];
27712
28387
  };
28388
+ refresh_floricode_derived_for_product: {
28389
+ Args: {
28390
+ p_product_code: string;
28391
+ };
28392
+ Returns: number;
28393
+ };
27713
28394
  reset_floriday_sync_cursor: {
27714
28395
  Args: {
27715
28396
  p_connection_id: string;
@@ -30819,6 +31500,7 @@ export declare const updateCustomer: import("@tanstack/start-client-core").Optio
30819
31500
  };
30820
31501
  floricode_sync_state: {
30821
31502
  Row: {
31503
+ cursor_skip: number;
30822
31504
  error_message: string | null;
30823
31505
  last_change_date_time: string | null;
30824
31506
  last_sequence_number: number;
@@ -30828,6 +31510,7 @@ export declare const updateCustomer: import("@tanstack/start-client-core").Optio
30828
31510
  updated_at: string;
30829
31511
  };
30830
31512
  Insert: {
31513
+ cursor_skip?: number;
30831
31514
  error_message?: string | null;
30832
31515
  last_change_date_time?: string | null;
30833
31516
  last_sequence_number?: number;
@@ -30837,6 +31520,7 @@ export declare const updateCustomer: import("@tanstack/start-client-core").Optio
30837
31520
  updated_at?: string;
30838
31521
  };
30839
31522
  Update: {
31523
+ cursor_skip?: number;
30840
31524
  error_message?: string | null;
30841
31525
  last_change_date_time?: string | null;
30842
31526
  last_sequence_number?: number;
@@ -33184,6 +33868,93 @@ export declare const updateCustomer: import("@tanstack/start-client-core").Optio
33184
33868
  };
33185
33869
  Relationships: [];
33186
33870
  };
33871
+ manufacture_product_components: {
33872
+ Row: {
33873
+ component_type: string;
33874
+ created_at: string;
33875
+ id: string;
33876
+ manufacture_product_id: string;
33877
+ product_group_id: string | null;
33878
+ quantity: number;
33879
+ trade_item_id: string | null;
33880
+ unit: string;
33881
+ };
33882
+ Insert: {
33883
+ component_type: string;
33884
+ created_at?: string;
33885
+ id?: string;
33886
+ manufacture_product_id: string;
33887
+ product_group_id?: string | null;
33888
+ quantity?: number;
33889
+ trade_item_id?: string | null;
33890
+ unit?: string;
33891
+ };
33892
+ Update: {
33893
+ component_type?: string;
33894
+ created_at?: string;
33895
+ id?: string;
33896
+ manufacture_product_id?: string;
33897
+ product_group_id?: string | null;
33898
+ quantity?: number;
33899
+ trade_item_id?: string | null;
33900
+ unit?: string;
33901
+ };
33902
+ Relationships: [{
33903
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
33904
+ columns: ["manufacture_product_id"];
33905
+ isOneToOne: false;
33906
+ referencedRelation: "manufacture_product_possible_stock_view";
33907
+ referencedColumns: ["manufacture_product_id"];
33908
+ }, {
33909
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
33910
+ columns: ["manufacture_product_id"];
33911
+ isOneToOne: false;
33912
+ referencedRelation: "manufacture_products";
33913
+ referencedColumns: ["id"];
33914
+ }, {
33915
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
33916
+ columns: ["product_group_id"];
33917
+ isOneToOne: false;
33918
+ referencedRelation: "product_groups";
33919
+ referencedColumns: ["id"];
33920
+ }];
33921
+ };
33922
+ manufacture_products: {
33923
+ Row: {
33924
+ created_at: string;
33925
+ description: string | null;
33926
+ id: string;
33927
+ is_active: boolean;
33928
+ name: string;
33929
+ produced_stock: number;
33930
+ product_code: string;
33931
+ tenant_id: string;
33932
+ updated_at: string;
33933
+ };
33934
+ Insert: {
33935
+ created_at?: string;
33936
+ description?: string | null;
33937
+ id?: string;
33938
+ is_active?: boolean;
33939
+ name: string;
33940
+ produced_stock?: number;
33941
+ product_code: string;
33942
+ tenant_id: string;
33943
+ updated_at?: string;
33944
+ };
33945
+ Update: {
33946
+ created_at?: string;
33947
+ description?: string | null;
33948
+ id?: string;
33949
+ is_active?: boolean;
33950
+ name?: string;
33951
+ produced_stock?: number;
33952
+ product_code?: string;
33953
+ tenant_id?: string;
33954
+ updated_at?: string;
33955
+ };
33956
+ Relationships: [];
33957
+ };
33187
33958
  monteurs: {
33188
33959
  Row: {
33189
33960
  avatar_url: string | null;
@@ -34144,6 +34915,66 @@ export declare const updateCustomer: import("@tanstack/start-client-core").Optio
34144
34915
  };
34145
34916
  Relationships: [];
34146
34917
  };
34918
+ product_group_items: {
34919
+ Row: {
34920
+ created_at: string;
34921
+ id: string;
34922
+ product_group_id: string;
34923
+ quantity: number;
34924
+ trade_item_id: string;
34925
+ };
34926
+ Insert: {
34927
+ created_at?: string;
34928
+ id?: string;
34929
+ product_group_id: string;
34930
+ quantity?: number;
34931
+ trade_item_id: string;
34932
+ };
34933
+ Update: {
34934
+ created_at?: string;
34935
+ id?: string;
34936
+ product_group_id?: string;
34937
+ quantity?: number;
34938
+ trade_item_id?: string;
34939
+ };
34940
+ Relationships: [{
34941
+ foreignKeyName: "product_group_items_product_group_id_fkey";
34942
+ columns: ["product_group_id"];
34943
+ isOneToOne: false;
34944
+ referencedRelation: "product_groups";
34945
+ referencedColumns: ["id"];
34946
+ }];
34947
+ };
34948
+ product_groups: {
34949
+ Row: {
34950
+ created_at: string;
34951
+ description: string | null;
34952
+ id: string;
34953
+ is_active: boolean;
34954
+ name: string;
34955
+ tenant_id: string;
34956
+ updated_at: string;
34957
+ };
34958
+ Insert: {
34959
+ created_at?: string;
34960
+ description?: string | null;
34961
+ id?: string;
34962
+ is_active?: boolean;
34963
+ name: string;
34964
+ tenant_id: string;
34965
+ updated_at?: string;
34966
+ };
34967
+ Update: {
34968
+ created_at?: string;
34969
+ description?: string | null;
34970
+ id?: string;
34971
+ is_active?: boolean;
34972
+ name?: string;
34973
+ tenant_id?: string;
34974
+ updated_at?: string;
34975
+ };
34976
+ Relationships: [];
34977
+ };
34147
34978
  products: {
34148
34979
  Row: {
34149
34980
  barcode: string | null;
@@ -35305,6 +36136,48 @@ export declare const updateCustomer: import("@tanstack/start-client-core").Optio
35305
36136
  };
35306
36137
  Relationships: [];
35307
36138
  };
36139
+ trade_item_stock: {
36140
+ Row: {
36141
+ connection_id: string;
36142
+ created_at: string;
36143
+ id: string;
36144
+ incoming_stock: number;
36145
+ minimum_stock: number;
36146
+ notes: string | null;
36147
+ physical_stock: number;
36148
+ reserved_stock: number;
36149
+ trade_item_key: string;
36150
+ updated_at: string;
36151
+ user_id: string;
36152
+ };
36153
+ Insert: {
36154
+ connection_id: string;
36155
+ created_at?: string;
36156
+ id?: string;
36157
+ incoming_stock?: number;
36158
+ minimum_stock?: number;
36159
+ notes?: string | null;
36160
+ physical_stock?: number;
36161
+ reserved_stock?: number;
36162
+ trade_item_key: string;
36163
+ updated_at?: string;
36164
+ user_id: string;
36165
+ };
36166
+ Update: {
36167
+ connection_id?: string;
36168
+ created_at?: string;
36169
+ id?: string;
36170
+ incoming_stock?: number;
36171
+ minimum_stock?: number;
36172
+ notes?: string | null;
36173
+ physical_stock?: number;
36174
+ reserved_stock?: number;
36175
+ trade_item_key?: string;
36176
+ updated_at?: string;
36177
+ user_id?: string;
36178
+ };
36179
+ Relationships: [];
36180
+ };
35308
36181
  twinfield_connections: {
35309
36182
  Row: {
35310
36183
  access_token: string | null;
@@ -36489,6 +37362,35 @@ export declare const updateCustomer: import("@tanstack/start-client-core").Optio
36489
37362
  };
36490
37363
  Relationships: [];
36491
37364
  };
37365
+ manufacture_product_possible_stock_view: {
37366
+ Row: {
37367
+ component_count: number | null;
37368
+ manufacture_product_id: string | null;
37369
+ possible_stock: number | null;
37370
+ };
37371
+ Relationships: [];
37372
+ };
37373
+ product_group_stock_view: {
37374
+ Row: {
37375
+ item_count: number | null;
37376
+ product_group_id: string | null;
37377
+ total_stock: number | null;
37378
+ };
37379
+ Relationships: [{
37380
+ foreignKeyName: "product_group_items_product_group_id_fkey";
37381
+ columns: ["product_group_id"];
37382
+ isOneToOne: false;
37383
+ referencedRelation: "product_groups";
37384
+ referencedColumns: ["id"];
37385
+ }];
37386
+ };
37387
+ trade_item_stock_view: {
37388
+ Row: {
37389
+ stock: number | null;
37390
+ trade_item_id: string | null;
37391
+ };
37392
+ Relationships: [];
37393
+ };
36492
37394
  v_external_customers_exact: {
36493
37395
  Row: {
36494
37396
  account_number: string | null;
@@ -37059,6 +37961,12 @@ export declare const updateCustomer: import("@tanstack/start-client-core").Optio
37059
37961
  row_count: number;
37060
37962
  }[];
37061
37963
  };
37964
+ refresh_floricode_derived_for_product: {
37965
+ Args: {
37966
+ p_product_code: string;
37967
+ };
37968
+ Returns: number;
37969
+ };
37062
37970
  reset_floriday_sync_cursor: {
37063
37971
  Args: {
37064
37972
  p_connection_id: string;
@@ -40161,6 +41069,7 @@ export declare const deleteCustomer: import("@tanstack/start-client-core").Requi
40161
41069
  };
40162
41070
  floricode_sync_state: {
40163
41071
  Row: {
41072
+ cursor_skip: number;
40164
41073
  error_message: string | null;
40165
41074
  last_change_date_time: string | null;
40166
41075
  last_sequence_number: number;
@@ -40170,6 +41079,7 @@ export declare const deleteCustomer: import("@tanstack/start-client-core").Requi
40170
41079
  updated_at: string;
40171
41080
  };
40172
41081
  Insert: {
41082
+ cursor_skip?: number;
40173
41083
  error_message?: string | null;
40174
41084
  last_change_date_time?: string | null;
40175
41085
  last_sequence_number?: number;
@@ -40179,6 +41089,7 @@ export declare const deleteCustomer: import("@tanstack/start-client-core").Requi
40179
41089
  updated_at?: string;
40180
41090
  };
40181
41091
  Update: {
41092
+ cursor_skip?: number;
40182
41093
  error_message?: string | null;
40183
41094
  last_change_date_time?: string | null;
40184
41095
  last_sequence_number?: number;
@@ -42526,6 +43437,93 @@ export declare const deleteCustomer: import("@tanstack/start-client-core").Requi
42526
43437
  };
42527
43438
  Relationships: [];
42528
43439
  };
43440
+ manufacture_product_components: {
43441
+ Row: {
43442
+ component_type: string;
43443
+ created_at: string;
43444
+ id: string;
43445
+ manufacture_product_id: string;
43446
+ product_group_id: string | null;
43447
+ quantity: number;
43448
+ trade_item_id: string | null;
43449
+ unit: string;
43450
+ };
43451
+ Insert: {
43452
+ component_type: string;
43453
+ created_at?: string;
43454
+ id?: string;
43455
+ manufacture_product_id: string;
43456
+ product_group_id?: string | null;
43457
+ quantity?: number;
43458
+ trade_item_id?: string | null;
43459
+ unit?: string;
43460
+ };
43461
+ Update: {
43462
+ component_type?: string;
43463
+ created_at?: string;
43464
+ id?: string;
43465
+ manufacture_product_id?: string;
43466
+ product_group_id?: string | null;
43467
+ quantity?: number;
43468
+ trade_item_id?: string | null;
43469
+ unit?: string;
43470
+ };
43471
+ Relationships: [{
43472
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
43473
+ columns: ["manufacture_product_id"];
43474
+ isOneToOne: false;
43475
+ referencedRelation: "manufacture_product_possible_stock_view";
43476
+ referencedColumns: ["manufacture_product_id"];
43477
+ }, {
43478
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
43479
+ columns: ["manufacture_product_id"];
43480
+ isOneToOne: false;
43481
+ referencedRelation: "manufacture_products";
43482
+ referencedColumns: ["id"];
43483
+ }, {
43484
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
43485
+ columns: ["product_group_id"];
43486
+ isOneToOne: false;
43487
+ referencedRelation: "product_groups";
43488
+ referencedColumns: ["id"];
43489
+ }];
43490
+ };
43491
+ manufacture_products: {
43492
+ Row: {
43493
+ created_at: string;
43494
+ description: string | null;
43495
+ id: string;
43496
+ is_active: boolean;
43497
+ name: string;
43498
+ produced_stock: number;
43499
+ product_code: string;
43500
+ tenant_id: string;
43501
+ updated_at: string;
43502
+ };
43503
+ Insert: {
43504
+ created_at?: string;
43505
+ description?: string | null;
43506
+ id?: string;
43507
+ is_active?: boolean;
43508
+ name: string;
43509
+ produced_stock?: number;
43510
+ product_code: string;
43511
+ tenant_id: string;
43512
+ updated_at?: string;
43513
+ };
43514
+ Update: {
43515
+ created_at?: string;
43516
+ description?: string | null;
43517
+ id?: string;
43518
+ is_active?: boolean;
43519
+ name?: string;
43520
+ produced_stock?: number;
43521
+ product_code?: string;
43522
+ tenant_id?: string;
43523
+ updated_at?: string;
43524
+ };
43525
+ Relationships: [];
43526
+ };
42529
43527
  monteurs: {
42530
43528
  Row: {
42531
43529
  avatar_url: string | null;
@@ -43486,6 +44484,66 @@ export declare const deleteCustomer: import("@tanstack/start-client-core").Requi
43486
44484
  };
43487
44485
  Relationships: [];
43488
44486
  };
44487
+ product_group_items: {
44488
+ Row: {
44489
+ created_at: string;
44490
+ id: string;
44491
+ product_group_id: string;
44492
+ quantity: number;
44493
+ trade_item_id: string;
44494
+ };
44495
+ Insert: {
44496
+ created_at?: string;
44497
+ id?: string;
44498
+ product_group_id: string;
44499
+ quantity?: number;
44500
+ trade_item_id: string;
44501
+ };
44502
+ Update: {
44503
+ created_at?: string;
44504
+ id?: string;
44505
+ product_group_id?: string;
44506
+ quantity?: number;
44507
+ trade_item_id?: string;
44508
+ };
44509
+ Relationships: [{
44510
+ foreignKeyName: "product_group_items_product_group_id_fkey";
44511
+ columns: ["product_group_id"];
44512
+ isOneToOne: false;
44513
+ referencedRelation: "product_groups";
44514
+ referencedColumns: ["id"];
44515
+ }];
44516
+ };
44517
+ product_groups: {
44518
+ Row: {
44519
+ created_at: string;
44520
+ description: string | null;
44521
+ id: string;
44522
+ is_active: boolean;
44523
+ name: string;
44524
+ tenant_id: string;
44525
+ updated_at: string;
44526
+ };
44527
+ Insert: {
44528
+ created_at?: string;
44529
+ description?: string | null;
44530
+ id?: string;
44531
+ is_active?: boolean;
44532
+ name: string;
44533
+ tenant_id: string;
44534
+ updated_at?: string;
44535
+ };
44536
+ Update: {
44537
+ created_at?: string;
44538
+ description?: string | null;
44539
+ id?: string;
44540
+ is_active?: boolean;
44541
+ name?: string;
44542
+ tenant_id?: string;
44543
+ updated_at?: string;
44544
+ };
44545
+ Relationships: [];
44546
+ };
43489
44547
  products: {
43490
44548
  Row: {
43491
44549
  barcode: string | null;
@@ -44647,6 +45705,48 @@ export declare const deleteCustomer: import("@tanstack/start-client-core").Requi
44647
45705
  };
44648
45706
  Relationships: [];
44649
45707
  };
45708
+ trade_item_stock: {
45709
+ Row: {
45710
+ connection_id: string;
45711
+ created_at: string;
45712
+ id: string;
45713
+ incoming_stock: number;
45714
+ minimum_stock: number;
45715
+ notes: string | null;
45716
+ physical_stock: number;
45717
+ reserved_stock: number;
45718
+ trade_item_key: string;
45719
+ updated_at: string;
45720
+ user_id: string;
45721
+ };
45722
+ Insert: {
45723
+ connection_id: string;
45724
+ created_at?: string;
45725
+ id?: string;
45726
+ incoming_stock?: number;
45727
+ minimum_stock?: number;
45728
+ notes?: string | null;
45729
+ physical_stock?: number;
45730
+ reserved_stock?: number;
45731
+ trade_item_key: string;
45732
+ updated_at?: string;
45733
+ user_id: string;
45734
+ };
45735
+ Update: {
45736
+ connection_id?: string;
45737
+ created_at?: string;
45738
+ id?: string;
45739
+ incoming_stock?: number;
45740
+ minimum_stock?: number;
45741
+ notes?: string | null;
45742
+ physical_stock?: number;
45743
+ reserved_stock?: number;
45744
+ trade_item_key?: string;
45745
+ updated_at?: string;
45746
+ user_id?: string;
45747
+ };
45748
+ Relationships: [];
45749
+ };
44650
45750
  twinfield_connections: {
44651
45751
  Row: {
44652
45752
  access_token: string | null;
@@ -45831,6 +46931,35 @@ export declare const deleteCustomer: import("@tanstack/start-client-core").Requi
45831
46931
  };
45832
46932
  Relationships: [];
45833
46933
  };
46934
+ manufacture_product_possible_stock_view: {
46935
+ Row: {
46936
+ component_count: number | null;
46937
+ manufacture_product_id: string | null;
46938
+ possible_stock: number | null;
46939
+ };
46940
+ Relationships: [];
46941
+ };
46942
+ product_group_stock_view: {
46943
+ Row: {
46944
+ item_count: number | null;
46945
+ product_group_id: string | null;
46946
+ total_stock: number | null;
46947
+ };
46948
+ Relationships: [{
46949
+ foreignKeyName: "product_group_items_product_group_id_fkey";
46950
+ columns: ["product_group_id"];
46951
+ isOneToOne: false;
46952
+ referencedRelation: "product_groups";
46953
+ referencedColumns: ["id"];
46954
+ }];
46955
+ };
46956
+ trade_item_stock_view: {
46957
+ Row: {
46958
+ stock: number | null;
46959
+ trade_item_id: string | null;
46960
+ };
46961
+ Relationships: [];
46962
+ };
45834
46963
  v_external_customers_exact: {
45835
46964
  Row: {
45836
46965
  account_number: string | null;
@@ -46401,6 +47530,12 @@ export declare const deleteCustomer: import("@tanstack/start-client-core").Requi
46401
47530
  row_count: number;
46402
47531
  }[];
46403
47532
  };
47533
+ refresh_floricode_derived_for_product: {
47534
+ Args: {
47535
+ p_product_code: string;
47536
+ };
47537
+ Returns: number;
47538
+ };
46404
47539
  reset_floriday_sync_cursor: {
46405
47540
  Args: {
46406
47541
  p_connection_id: string;
@@ -49452,6 +50587,7 @@ export declare const listFloridayNetwork: import("@tanstack/start-client-core").
49452
50587
  };
49453
50588
  floricode_sync_state: {
49454
50589
  Row: {
50590
+ cursor_skip: number;
49455
50591
  error_message: string | null;
49456
50592
  last_change_date_time: string | null;
49457
50593
  last_sequence_number: number;
@@ -49461,6 +50597,7 @@ export declare const listFloridayNetwork: import("@tanstack/start-client-core").
49461
50597
  updated_at: string;
49462
50598
  };
49463
50599
  Insert: {
50600
+ cursor_skip?: number;
49464
50601
  error_message?: string | null;
49465
50602
  last_change_date_time?: string | null;
49466
50603
  last_sequence_number?: number;
@@ -49470,6 +50607,7 @@ export declare const listFloridayNetwork: import("@tanstack/start-client-core").
49470
50607
  updated_at?: string;
49471
50608
  };
49472
50609
  Update: {
50610
+ cursor_skip?: number;
49473
50611
  error_message?: string | null;
49474
50612
  last_change_date_time?: string | null;
49475
50613
  last_sequence_number?: number;
@@ -51817,6 +52955,93 @@ export declare const listFloridayNetwork: import("@tanstack/start-client-core").
51817
52955
  };
51818
52956
  Relationships: [];
51819
52957
  };
52958
+ manufacture_product_components: {
52959
+ Row: {
52960
+ component_type: string;
52961
+ created_at: string;
52962
+ id: string;
52963
+ manufacture_product_id: string;
52964
+ product_group_id: string | null;
52965
+ quantity: number;
52966
+ trade_item_id: string | null;
52967
+ unit: string;
52968
+ };
52969
+ Insert: {
52970
+ component_type: string;
52971
+ created_at?: string;
52972
+ id?: string;
52973
+ manufacture_product_id: string;
52974
+ product_group_id?: string | null;
52975
+ quantity?: number;
52976
+ trade_item_id?: string | null;
52977
+ unit?: string;
52978
+ };
52979
+ Update: {
52980
+ component_type?: string;
52981
+ created_at?: string;
52982
+ id?: string;
52983
+ manufacture_product_id?: string;
52984
+ product_group_id?: string | null;
52985
+ quantity?: number;
52986
+ trade_item_id?: string | null;
52987
+ unit?: string;
52988
+ };
52989
+ Relationships: [{
52990
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
52991
+ columns: ["manufacture_product_id"];
52992
+ isOneToOne: false;
52993
+ referencedRelation: "manufacture_product_possible_stock_view";
52994
+ referencedColumns: ["manufacture_product_id"];
52995
+ }, {
52996
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
52997
+ columns: ["manufacture_product_id"];
52998
+ isOneToOne: false;
52999
+ referencedRelation: "manufacture_products";
53000
+ referencedColumns: ["id"];
53001
+ }, {
53002
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
53003
+ columns: ["product_group_id"];
53004
+ isOneToOne: false;
53005
+ referencedRelation: "product_groups";
53006
+ referencedColumns: ["id"];
53007
+ }];
53008
+ };
53009
+ manufacture_products: {
53010
+ Row: {
53011
+ created_at: string;
53012
+ description: string | null;
53013
+ id: string;
53014
+ is_active: boolean;
53015
+ name: string;
53016
+ produced_stock: number;
53017
+ product_code: string;
53018
+ tenant_id: string;
53019
+ updated_at: string;
53020
+ };
53021
+ Insert: {
53022
+ created_at?: string;
53023
+ description?: string | null;
53024
+ id?: string;
53025
+ is_active?: boolean;
53026
+ name: string;
53027
+ produced_stock?: number;
53028
+ product_code: string;
53029
+ tenant_id: string;
53030
+ updated_at?: string;
53031
+ };
53032
+ Update: {
53033
+ created_at?: string;
53034
+ description?: string | null;
53035
+ id?: string;
53036
+ is_active?: boolean;
53037
+ name?: string;
53038
+ produced_stock?: number;
53039
+ product_code?: string;
53040
+ tenant_id?: string;
53041
+ updated_at?: string;
53042
+ };
53043
+ Relationships: [];
53044
+ };
51820
53045
  monteurs: {
51821
53046
  Row: {
51822
53047
  avatar_url: string | null;
@@ -52777,6 +54002,66 @@ export declare const listFloridayNetwork: import("@tanstack/start-client-core").
52777
54002
  };
52778
54003
  Relationships: [];
52779
54004
  };
54005
+ product_group_items: {
54006
+ Row: {
54007
+ created_at: string;
54008
+ id: string;
54009
+ product_group_id: string;
54010
+ quantity: number;
54011
+ trade_item_id: string;
54012
+ };
54013
+ Insert: {
54014
+ created_at?: string;
54015
+ id?: string;
54016
+ product_group_id: string;
54017
+ quantity?: number;
54018
+ trade_item_id: string;
54019
+ };
54020
+ Update: {
54021
+ created_at?: string;
54022
+ id?: string;
54023
+ product_group_id?: string;
54024
+ quantity?: number;
54025
+ trade_item_id?: string;
54026
+ };
54027
+ Relationships: [{
54028
+ foreignKeyName: "product_group_items_product_group_id_fkey";
54029
+ columns: ["product_group_id"];
54030
+ isOneToOne: false;
54031
+ referencedRelation: "product_groups";
54032
+ referencedColumns: ["id"];
54033
+ }];
54034
+ };
54035
+ product_groups: {
54036
+ Row: {
54037
+ created_at: string;
54038
+ description: string | null;
54039
+ id: string;
54040
+ is_active: boolean;
54041
+ name: string;
54042
+ tenant_id: string;
54043
+ updated_at: string;
54044
+ };
54045
+ Insert: {
54046
+ created_at?: string;
54047
+ description?: string | null;
54048
+ id?: string;
54049
+ is_active?: boolean;
54050
+ name: string;
54051
+ tenant_id: string;
54052
+ updated_at?: string;
54053
+ };
54054
+ Update: {
54055
+ created_at?: string;
54056
+ description?: string | null;
54057
+ id?: string;
54058
+ is_active?: boolean;
54059
+ name?: string;
54060
+ tenant_id?: string;
54061
+ updated_at?: string;
54062
+ };
54063
+ Relationships: [];
54064
+ };
52780
54065
  products: {
52781
54066
  Row: {
52782
54067
  barcode: string | null;
@@ -53938,6 +55223,48 @@ export declare const listFloridayNetwork: import("@tanstack/start-client-core").
53938
55223
  };
53939
55224
  Relationships: [];
53940
55225
  };
55226
+ trade_item_stock: {
55227
+ Row: {
55228
+ connection_id: string;
55229
+ created_at: string;
55230
+ id: string;
55231
+ incoming_stock: number;
55232
+ minimum_stock: number;
55233
+ notes: string | null;
55234
+ physical_stock: number;
55235
+ reserved_stock: number;
55236
+ trade_item_key: string;
55237
+ updated_at: string;
55238
+ user_id: string;
55239
+ };
55240
+ Insert: {
55241
+ connection_id: string;
55242
+ created_at?: string;
55243
+ id?: string;
55244
+ incoming_stock?: number;
55245
+ minimum_stock?: number;
55246
+ notes?: string | null;
55247
+ physical_stock?: number;
55248
+ reserved_stock?: number;
55249
+ trade_item_key: string;
55250
+ updated_at?: string;
55251
+ user_id: string;
55252
+ };
55253
+ Update: {
55254
+ connection_id?: string;
55255
+ created_at?: string;
55256
+ id?: string;
55257
+ incoming_stock?: number;
55258
+ minimum_stock?: number;
55259
+ notes?: string | null;
55260
+ physical_stock?: number;
55261
+ reserved_stock?: number;
55262
+ trade_item_key?: string;
55263
+ updated_at?: string;
55264
+ user_id?: string;
55265
+ };
55266
+ Relationships: [];
55267
+ };
53941
55268
  twinfield_connections: {
53942
55269
  Row: {
53943
55270
  access_token: string | null;
@@ -55122,6 +56449,35 @@ export declare const listFloridayNetwork: import("@tanstack/start-client-core").
55122
56449
  };
55123
56450
  Relationships: [];
55124
56451
  };
56452
+ manufacture_product_possible_stock_view: {
56453
+ Row: {
56454
+ component_count: number | null;
56455
+ manufacture_product_id: string | null;
56456
+ possible_stock: number | null;
56457
+ };
56458
+ Relationships: [];
56459
+ };
56460
+ product_group_stock_view: {
56461
+ Row: {
56462
+ item_count: number | null;
56463
+ product_group_id: string | null;
56464
+ total_stock: number | null;
56465
+ };
56466
+ Relationships: [{
56467
+ foreignKeyName: "product_group_items_product_group_id_fkey";
56468
+ columns: ["product_group_id"];
56469
+ isOneToOne: false;
56470
+ referencedRelation: "product_groups";
56471
+ referencedColumns: ["id"];
56472
+ }];
56473
+ };
56474
+ trade_item_stock_view: {
56475
+ Row: {
56476
+ stock: number | null;
56477
+ trade_item_id: string | null;
56478
+ };
56479
+ Relationships: [];
56480
+ };
55125
56481
  v_external_customers_exact: {
55126
56482
  Row: {
55127
56483
  account_number: string | null;
@@ -55692,6 +57048,12 @@ export declare const listFloridayNetwork: import("@tanstack/start-client-core").
55692
57048
  row_count: number;
55693
57049
  }[];
55694
57050
  };
57051
+ refresh_floricode_derived_for_product: {
57052
+ Args: {
57053
+ p_product_code: string;
57054
+ };
57055
+ Returns: number;
57056
+ };
55695
57057
  reset_floriday_sync_cursor: {
55696
57058
  Args: {
55697
57059
  p_connection_id: string;
@@ -58751,6 +60113,7 @@ export declare const listCustomerClasses: import("@tanstack/start-client-core").
58751
60113
  };
58752
60114
  floricode_sync_state: {
58753
60115
  Row: {
60116
+ cursor_skip: number;
58754
60117
  error_message: string | null;
58755
60118
  last_change_date_time: string | null;
58756
60119
  last_sequence_number: number;
@@ -58760,6 +60123,7 @@ export declare const listCustomerClasses: import("@tanstack/start-client-core").
58760
60123
  updated_at: string;
58761
60124
  };
58762
60125
  Insert: {
60126
+ cursor_skip?: number;
58763
60127
  error_message?: string | null;
58764
60128
  last_change_date_time?: string | null;
58765
60129
  last_sequence_number?: number;
@@ -58769,6 +60133,7 @@ export declare const listCustomerClasses: import("@tanstack/start-client-core").
58769
60133
  updated_at?: string;
58770
60134
  };
58771
60135
  Update: {
60136
+ cursor_skip?: number;
58772
60137
  error_message?: string | null;
58773
60138
  last_change_date_time?: string | null;
58774
60139
  last_sequence_number?: number;
@@ -61116,6 +62481,93 @@ export declare const listCustomerClasses: import("@tanstack/start-client-core").
61116
62481
  };
61117
62482
  Relationships: [];
61118
62483
  };
62484
+ manufacture_product_components: {
62485
+ Row: {
62486
+ component_type: string;
62487
+ created_at: string;
62488
+ id: string;
62489
+ manufacture_product_id: string;
62490
+ product_group_id: string | null;
62491
+ quantity: number;
62492
+ trade_item_id: string | null;
62493
+ unit: string;
62494
+ };
62495
+ Insert: {
62496
+ component_type: string;
62497
+ created_at?: string;
62498
+ id?: string;
62499
+ manufacture_product_id: string;
62500
+ product_group_id?: string | null;
62501
+ quantity?: number;
62502
+ trade_item_id?: string | null;
62503
+ unit?: string;
62504
+ };
62505
+ Update: {
62506
+ component_type?: string;
62507
+ created_at?: string;
62508
+ id?: string;
62509
+ manufacture_product_id?: string;
62510
+ product_group_id?: string | null;
62511
+ quantity?: number;
62512
+ trade_item_id?: string | null;
62513
+ unit?: string;
62514
+ };
62515
+ Relationships: [{
62516
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
62517
+ columns: ["manufacture_product_id"];
62518
+ isOneToOne: false;
62519
+ referencedRelation: "manufacture_product_possible_stock_view";
62520
+ referencedColumns: ["manufacture_product_id"];
62521
+ }, {
62522
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
62523
+ columns: ["manufacture_product_id"];
62524
+ isOneToOne: false;
62525
+ referencedRelation: "manufacture_products";
62526
+ referencedColumns: ["id"];
62527
+ }, {
62528
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
62529
+ columns: ["product_group_id"];
62530
+ isOneToOne: false;
62531
+ referencedRelation: "product_groups";
62532
+ referencedColumns: ["id"];
62533
+ }];
62534
+ };
62535
+ manufacture_products: {
62536
+ Row: {
62537
+ created_at: string;
62538
+ description: string | null;
62539
+ id: string;
62540
+ is_active: boolean;
62541
+ name: string;
62542
+ produced_stock: number;
62543
+ product_code: string;
62544
+ tenant_id: string;
62545
+ updated_at: string;
62546
+ };
62547
+ Insert: {
62548
+ created_at?: string;
62549
+ description?: string | null;
62550
+ id?: string;
62551
+ is_active?: boolean;
62552
+ name: string;
62553
+ produced_stock?: number;
62554
+ product_code: string;
62555
+ tenant_id: string;
62556
+ updated_at?: string;
62557
+ };
62558
+ Update: {
62559
+ created_at?: string;
62560
+ description?: string | null;
62561
+ id?: string;
62562
+ is_active?: boolean;
62563
+ name?: string;
62564
+ produced_stock?: number;
62565
+ product_code?: string;
62566
+ tenant_id?: string;
62567
+ updated_at?: string;
62568
+ };
62569
+ Relationships: [];
62570
+ };
61119
62571
  monteurs: {
61120
62572
  Row: {
61121
62573
  avatar_url: string | null;
@@ -62076,6 +63528,66 @@ export declare const listCustomerClasses: import("@tanstack/start-client-core").
62076
63528
  };
62077
63529
  Relationships: [];
62078
63530
  };
63531
+ product_group_items: {
63532
+ Row: {
63533
+ created_at: string;
63534
+ id: string;
63535
+ product_group_id: string;
63536
+ quantity: number;
63537
+ trade_item_id: string;
63538
+ };
63539
+ Insert: {
63540
+ created_at?: string;
63541
+ id?: string;
63542
+ product_group_id: string;
63543
+ quantity?: number;
63544
+ trade_item_id: string;
63545
+ };
63546
+ Update: {
63547
+ created_at?: string;
63548
+ id?: string;
63549
+ product_group_id?: string;
63550
+ quantity?: number;
63551
+ trade_item_id?: string;
63552
+ };
63553
+ Relationships: [{
63554
+ foreignKeyName: "product_group_items_product_group_id_fkey";
63555
+ columns: ["product_group_id"];
63556
+ isOneToOne: false;
63557
+ referencedRelation: "product_groups";
63558
+ referencedColumns: ["id"];
63559
+ }];
63560
+ };
63561
+ product_groups: {
63562
+ Row: {
63563
+ created_at: string;
63564
+ description: string | null;
63565
+ id: string;
63566
+ is_active: boolean;
63567
+ name: string;
63568
+ tenant_id: string;
63569
+ updated_at: string;
63570
+ };
63571
+ Insert: {
63572
+ created_at?: string;
63573
+ description?: string | null;
63574
+ id?: string;
63575
+ is_active?: boolean;
63576
+ name: string;
63577
+ tenant_id: string;
63578
+ updated_at?: string;
63579
+ };
63580
+ Update: {
63581
+ created_at?: string;
63582
+ description?: string | null;
63583
+ id?: string;
63584
+ is_active?: boolean;
63585
+ name?: string;
63586
+ tenant_id?: string;
63587
+ updated_at?: string;
63588
+ };
63589
+ Relationships: [];
63590
+ };
62079
63591
  products: {
62080
63592
  Row: {
62081
63593
  barcode: string | null;
@@ -63237,6 +64749,48 @@ export declare const listCustomerClasses: import("@tanstack/start-client-core").
63237
64749
  };
63238
64750
  Relationships: [];
63239
64751
  };
64752
+ trade_item_stock: {
64753
+ Row: {
64754
+ connection_id: string;
64755
+ created_at: string;
64756
+ id: string;
64757
+ incoming_stock: number;
64758
+ minimum_stock: number;
64759
+ notes: string | null;
64760
+ physical_stock: number;
64761
+ reserved_stock: number;
64762
+ trade_item_key: string;
64763
+ updated_at: string;
64764
+ user_id: string;
64765
+ };
64766
+ Insert: {
64767
+ connection_id: string;
64768
+ created_at?: string;
64769
+ id?: string;
64770
+ incoming_stock?: number;
64771
+ minimum_stock?: number;
64772
+ notes?: string | null;
64773
+ physical_stock?: number;
64774
+ reserved_stock?: number;
64775
+ trade_item_key: string;
64776
+ updated_at?: string;
64777
+ user_id: string;
64778
+ };
64779
+ Update: {
64780
+ connection_id?: string;
64781
+ created_at?: string;
64782
+ id?: string;
64783
+ incoming_stock?: number;
64784
+ minimum_stock?: number;
64785
+ notes?: string | null;
64786
+ physical_stock?: number;
64787
+ reserved_stock?: number;
64788
+ trade_item_key?: string;
64789
+ updated_at?: string;
64790
+ user_id?: string;
64791
+ };
64792
+ Relationships: [];
64793
+ };
63240
64794
  twinfield_connections: {
63241
64795
  Row: {
63242
64796
  access_token: string | null;
@@ -64421,6 +65975,35 @@ export declare const listCustomerClasses: import("@tanstack/start-client-core").
64421
65975
  };
64422
65976
  Relationships: [];
64423
65977
  };
65978
+ manufacture_product_possible_stock_view: {
65979
+ Row: {
65980
+ component_count: number | null;
65981
+ manufacture_product_id: string | null;
65982
+ possible_stock: number | null;
65983
+ };
65984
+ Relationships: [];
65985
+ };
65986
+ product_group_stock_view: {
65987
+ Row: {
65988
+ item_count: number | null;
65989
+ product_group_id: string | null;
65990
+ total_stock: number | null;
65991
+ };
65992
+ Relationships: [{
65993
+ foreignKeyName: "product_group_items_product_group_id_fkey";
65994
+ columns: ["product_group_id"];
65995
+ isOneToOne: false;
65996
+ referencedRelation: "product_groups";
65997
+ referencedColumns: ["id"];
65998
+ }];
65999
+ };
66000
+ trade_item_stock_view: {
66001
+ Row: {
66002
+ stock: number | null;
66003
+ trade_item_id: string | null;
66004
+ };
66005
+ Relationships: [];
66006
+ };
64424
66007
  v_external_customers_exact: {
64425
66008
  Row: {
64426
66009
  account_number: string | null;
@@ -64991,6 +66574,12 @@ export declare const listCustomerClasses: import("@tanstack/start-client-core").
64991
66574
  row_count: number;
64992
66575
  }[];
64993
66576
  };
66577
+ refresh_floricode_derived_for_product: {
66578
+ Args: {
66579
+ p_product_code: string;
66580
+ };
66581
+ Returns: number;
66582
+ };
64994
66583
  reset_floriday_sync_cursor: {
64995
66584
  Args: {
64996
66585
  p_connection_id: string;