@flowselections/floriday-authenticatie-module 1.0.14 → 1.0.15

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 (28) hide show
  1. package/dist-lib/integrations/supabase/auth-middleware.d.ts +231 -0
  2. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  3. package/dist-lib/integrations/supabase/client.d.ts +231 -0
  4. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  5. package/dist-lib/integrations/supabase/client.server.d.ts +231 -0
  6. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  7. package/dist-lib/integrations/supabase/types.d.ts +239 -0
  8. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  9. package/dist-lib/lib/floricode-product-features.d.ts.map +1 -1
  10. package/dist-lib/lib/floricode-product-features.js +59 -5
  11. package/dist-lib/lib/floricode-regulatory-features.d.ts +15 -0
  12. package/dist-lib/lib/floricode-regulatory-features.d.ts.map +1 -1
  13. package/dist-lib/lib/floricode-regulatory-features.js +77 -21
  14. package/dist-lib/lib/floriday-auction-letters.functions.d.ts +231 -0
  15. package/dist-lib/lib/floriday-auction-letters.functions.d.ts.map +1 -1
  16. package/dist-lib/lib/floriday-labels.functions.d.ts +231 -0
  17. package/dist-lib/lib/floriday-labels.functions.d.ts.map +1 -1
  18. package/dist-lib/lib/floriday-public.functions.d.ts +1386 -0
  19. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  20. package/dist-lib/lib/floriday-stickers.functions.d.ts +231 -0
  21. package/dist-lib/lib/floriday-stickers.functions.d.ts.map +1 -1
  22. package/dist-lib/lib/floriday-sync.functions.d.ts +7161 -0
  23. package/dist-lib/lib/floriday-sync.functions.d.ts.map +1 -1
  24. package/dist-lib/lib/floriday-writes.functions.d.ts +1386 -0
  25. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  26. package/dist-lib/lib/floriday.functions.d.ts +4158 -0
  27. package/dist-lib/lib/floriday.functions.d.ts.map +1 -1
  28. package/package.json +1 -1
@@ -2749,6 +2749,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
2749
2749
  };
2750
2750
  floricode_sync_state: {
2751
2751
  Row: {
2752
+ cursor_skip: number;
2752
2753
  error_message: string | null;
2753
2754
  last_change_date_time: string | null;
2754
2755
  last_sequence_number: number;
@@ -2758,6 +2759,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
2758
2759
  updated_at: string;
2759
2760
  };
2760
2761
  Insert: {
2762
+ cursor_skip?: number;
2761
2763
  error_message?: string | null;
2762
2764
  last_change_date_time?: string | null;
2763
2765
  last_sequence_number?: number;
@@ -2767,6 +2769,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
2767
2769
  updated_at?: string;
2768
2770
  };
2769
2771
  Update: {
2772
+ cursor_skip?: number;
2770
2773
  error_message?: string | null;
2771
2774
  last_change_date_time?: string | null;
2772
2775
  last_sequence_number?: number;
@@ -5114,6 +5117,93 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
5114
5117
  };
5115
5118
  Relationships: [];
5116
5119
  };
5120
+ manufacture_product_components: {
5121
+ Row: {
5122
+ component_type: string;
5123
+ created_at: string;
5124
+ id: string;
5125
+ manufacture_product_id: string;
5126
+ product_group_id: string | null;
5127
+ quantity: number;
5128
+ trade_item_id: string | null;
5129
+ unit: string;
5130
+ };
5131
+ Insert: {
5132
+ component_type: string;
5133
+ created_at?: string;
5134
+ id?: string;
5135
+ manufacture_product_id: string;
5136
+ product_group_id?: string | null;
5137
+ quantity?: number;
5138
+ trade_item_id?: string | null;
5139
+ unit?: string;
5140
+ };
5141
+ Update: {
5142
+ component_type?: string;
5143
+ created_at?: string;
5144
+ id?: string;
5145
+ manufacture_product_id?: string;
5146
+ product_group_id?: string | null;
5147
+ quantity?: number;
5148
+ trade_item_id?: string | null;
5149
+ unit?: string;
5150
+ };
5151
+ Relationships: [{
5152
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
5153
+ columns: ["manufacture_product_id"];
5154
+ isOneToOne: false;
5155
+ referencedRelation: "manufacture_product_possible_stock_view";
5156
+ referencedColumns: ["manufacture_product_id"];
5157
+ }, {
5158
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
5159
+ columns: ["manufacture_product_id"];
5160
+ isOneToOne: false;
5161
+ referencedRelation: "manufacture_products";
5162
+ referencedColumns: ["id"];
5163
+ }, {
5164
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
5165
+ columns: ["product_group_id"];
5166
+ isOneToOne: false;
5167
+ referencedRelation: "product_groups";
5168
+ referencedColumns: ["id"];
5169
+ }];
5170
+ };
5171
+ manufacture_products: {
5172
+ Row: {
5173
+ created_at: string;
5174
+ description: string | null;
5175
+ id: string;
5176
+ is_active: boolean;
5177
+ name: string;
5178
+ produced_stock: number;
5179
+ product_code: string;
5180
+ tenant_id: string;
5181
+ updated_at: string;
5182
+ };
5183
+ Insert: {
5184
+ created_at?: string;
5185
+ description?: string | null;
5186
+ id?: string;
5187
+ is_active?: boolean;
5188
+ name: string;
5189
+ produced_stock?: number;
5190
+ product_code: string;
5191
+ tenant_id: string;
5192
+ updated_at?: string;
5193
+ };
5194
+ Update: {
5195
+ created_at?: string;
5196
+ description?: string | null;
5197
+ id?: string;
5198
+ is_active?: boolean;
5199
+ name?: string;
5200
+ produced_stock?: number;
5201
+ product_code?: string;
5202
+ tenant_id?: string;
5203
+ updated_at?: string;
5204
+ };
5205
+ Relationships: [];
5206
+ };
5117
5207
  monteurs: {
5118
5208
  Row: {
5119
5209
  avatar_url: string | null;
@@ -6074,6 +6164,66 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
6074
6164
  };
6075
6165
  Relationships: [];
6076
6166
  };
6167
+ product_group_items: {
6168
+ Row: {
6169
+ created_at: string;
6170
+ id: string;
6171
+ product_group_id: string;
6172
+ quantity: number;
6173
+ trade_item_id: string;
6174
+ };
6175
+ Insert: {
6176
+ created_at?: string;
6177
+ id?: string;
6178
+ product_group_id: string;
6179
+ quantity?: number;
6180
+ trade_item_id: string;
6181
+ };
6182
+ Update: {
6183
+ created_at?: string;
6184
+ id?: string;
6185
+ product_group_id?: string;
6186
+ quantity?: number;
6187
+ trade_item_id?: string;
6188
+ };
6189
+ Relationships: [{
6190
+ foreignKeyName: "product_group_items_product_group_id_fkey";
6191
+ columns: ["product_group_id"];
6192
+ isOneToOne: false;
6193
+ referencedRelation: "product_groups";
6194
+ referencedColumns: ["id"];
6195
+ }];
6196
+ };
6197
+ product_groups: {
6198
+ Row: {
6199
+ created_at: string;
6200
+ description: string | null;
6201
+ id: string;
6202
+ is_active: boolean;
6203
+ name: string;
6204
+ tenant_id: string;
6205
+ updated_at: string;
6206
+ };
6207
+ Insert: {
6208
+ created_at?: string;
6209
+ description?: string | null;
6210
+ id?: string;
6211
+ is_active?: boolean;
6212
+ name: string;
6213
+ tenant_id: string;
6214
+ updated_at?: string;
6215
+ };
6216
+ Update: {
6217
+ created_at?: string;
6218
+ description?: string | null;
6219
+ id?: string;
6220
+ is_active?: boolean;
6221
+ name?: string;
6222
+ tenant_id?: string;
6223
+ updated_at?: string;
6224
+ };
6225
+ Relationships: [];
6226
+ };
6077
6227
  products: {
6078
6228
  Row: {
6079
6229
  barcode: string | null;
@@ -7235,6 +7385,48 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7235
7385
  };
7236
7386
  Relationships: [];
7237
7387
  };
7388
+ trade_item_stock: {
7389
+ Row: {
7390
+ connection_id: string;
7391
+ created_at: string;
7392
+ id: string;
7393
+ incoming_stock: number;
7394
+ minimum_stock: number;
7395
+ notes: string | null;
7396
+ physical_stock: number;
7397
+ reserved_stock: number;
7398
+ trade_item_key: string;
7399
+ updated_at: string;
7400
+ user_id: string;
7401
+ };
7402
+ Insert: {
7403
+ connection_id: string;
7404
+ created_at?: string;
7405
+ id?: string;
7406
+ incoming_stock?: number;
7407
+ minimum_stock?: number;
7408
+ notes?: string | null;
7409
+ physical_stock?: number;
7410
+ reserved_stock?: number;
7411
+ trade_item_key: string;
7412
+ updated_at?: string;
7413
+ user_id: string;
7414
+ };
7415
+ Update: {
7416
+ connection_id?: string;
7417
+ created_at?: string;
7418
+ id?: string;
7419
+ incoming_stock?: number;
7420
+ minimum_stock?: number;
7421
+ notes?: string | null;
7422
+ physical_stock?: number;
7423
+ reserved_stock?: number;
7424
+ trade_item_key?: string;
7425
+ updated_at?: string;
7426
+ user_id?: string;
7427
+ };
7428
+ Relationships: [];
7429
+ };
7238
7430
  twinfield_connections: {
7239
7431
  Row: {
7240
7432
  access_token: string | null;
@@ -8419,6 +8611,35 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
8419
8611
  };
8420
8612
  Relationships: [];
8421
8613
  };
8614
+ manufacture_product_possible_stock_view: {
8615
+ Row: {
8616
+ component_count: number | null;
8617
+ manufacture_product_id: string | null;
8618
+ possible_stock: number | null;
8619
+ };
8620
+ Relationships: [];
8621
+ };
8622
+ product_group_stock_view: {
8623
+ Row: {
8624
+ item_count: number | null;
8625
+ product_group_id: string | null;
8626
+ total_stock: number | null;
8627
+ };
8628
+ Relationships: [{
8629
+ foreignKeyName: "product_group_items_product_group_id_fkey";
8630
+ columns: ["product_group_id"];
8631
+ isOneToOne: false;
8632
+ referencedRelation: "product_groups";
8633
+ referencedColumns: ["id"];
8634
+ }];
8635
+ };
8636
+ trade_item_stock_view: {
8637
+ Row: {
8638
+ stock: number | null;
8639
+ trade_item_id: string | null;
8640
+ };
8641
+ Relationships: [];
8642
+ };
8422
8643
  v_external_customers_exact: {
8423
8644
  Row: {
8424
8645
  account_number: string | null;
@@ -8693,6 +8914,10 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
8693
8914
  Args: never;
8694
8915
  Returns: number;
8695
8916
  };
8917
+ count_distinct_regulatory_products: {
8918
+ Args: never;
8919
+ Returns: number;
8920
+ };
8696
8921
  current_monteur_id: {
8697
8922
  Args: never;
8698
8923
  Returns: string;
@@ -8989,6 +9214,12 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
8989
9214
  row_count: number;
8990
9215
  }[];
8991
9216
  };
9217
+ refresh_floricode_derived_for_product: {
9218
+ Args: {
9219
+ p_product_code: string;
9220
+ };
9221
+ Returns: number;
9222
+ };
8992
9223
  reset_floriday_sync_cursor: {
8993
9224
  Args: {
8994
9225
  p_connection_id: string;
@@ -12050,6 +12281,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
12050
12281
  };
12051
12282
  floricode_sync_state: {
12052
12283
  Row: {
12284
+ cursor_skip: number;
12053
12285
  error_message: string | null;
12054
12286
  last_change_date_time: string | null;
12055
12287
  last_sequence_number: number;
@@ -12059,6 +12291,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
12059
12291
  updated_at: string;
12060
12292
  };
12061
12293
  Insert: {
12294
+ cursor_skip?: number;
12062
12295
  error_message?: string | null;
12063
12296
  last_change_date_time?: string | null;
12064
12297
  last_sequence_number?: number;
@@ -12068,6 +12301,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
12068
12301
  updated_at?: string;
12069
12302
  };
12070
12303
  Update: {
12304
+ cursor_skip?: number;
12071
12305
  error_message?: string | null;
12072
12306
  last_change_date_time?: string | null;
12073
12307
  last_sequence_number?: number;
@@ -14415,6 +14649,93 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
14415
14649
  };
14416
14650
  Relationships: [];
14417
14651
  };
14652
+ manufacture_product_components: {
14653
+ Row: {
14654
+ component_type: string;
14655
+ created_at: string;
14656
+ id: string;
14657
+ manufacture_product_id: string;
14658
+ product_group_id: string | null;
14659
+ quantity: number;
14660
+ trade_item_id: string | null;
14661
+ unit: string;
14662
+ };
14663
+ Insert: {
14664
+ component_type: string;
14665
+ created_at?: string;
14666
+ id?: string;
14667
+ manufacture_product_id: string;
14668
+ product_group_id?: string | null;
14669
+ quantity?: number;
14670
+ trade_item_id?: string | null;
14671
+ unit?: string;
14672
+ };
14673
+ Update: {
14674
+ component_type?: string;
14675
+ created_at?: string;
14676
+ id?: string;
14677
+ manufacture_product_id?: string;
14678
+ product_group_id?: string | null;
14679
+ quantity?: number;
14680
+ trade_item_id?: string | null;
14681
+ unit?: string;
14682
+ };
14683
+ Relationships: [{
14684
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
14685
+ columns: ["manufacture_product_id"];
14686
+ isOneToOne: false;
14687
+ referencedRelation: "manufacture_product_possible_stock_view";
14688
+ referencedColumns: ["manufacture_product_id"];
14689
+ }, {
14690
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
14691
+ columns: ["manufacture_product_id"];
14692
+ isOneToOne: false;
14693
+ referencedRelation: "manufacture_products";
14694
+ referencedColumns: ["id"];
14695
+ }, {
14696
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
14697
+ columns: ["product_group_id"];
14698
+ isOneToOne: false;
14699
+ referencedRelation: "product_groups";
14700
+ referencedColumns: ["id"];
14701
+ }];
14702
+ };
14703
+ manufacture_products: {
14704
+ Row: {
14705
+ created_at: string;
14706
+ description: string | null;
14707
+ id: string;
14708
+ is_active: boolean;
14709
+ name: string;
14710
+ produced_stock: number;
14711
+ product_code: string;
14712
+ tenant_id: string;
14713
+ updated_at: string;
14714
+ };
14715
+ Insert: {
14716
+ created_at?: string;
14717
+ description?: string | null;
14718
+ id?: string;
14719
+ is_active?: boolean;
14720
+ name: string;
14721
+ produced_stock?: number;
14722
+ product_code: string;
14723
+ tenant_id: string;
14724
+ updated_at?: string;
14725
+ };
14726
+ Update: {
14727
+ created_at?: string;
14728
+ description?: string | null;
14729
+ id?: string;
14730
+ is_active?: boolean;
14731
+ name?: string;
14732
+ produced_stock?: number;
14733
+ product_code?: string;
14734
+ tenant_id?: string;
14735
+ updated_at?: string;
14736
+ };
14737
+ Relationships: [];
14738
+ };
14418
14739
  monteurs: {
14419
14740
  Row: {
14420
14741
  avatar_url: string | null;
@@ -15375,6 +15696,66 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
15375
15696
  };
15376
15697
  Relationships: [];
15377
15698
  };
15699
+ product_group_items: {
15700
+ Row: {
15701
+ created_at: string;
15702
+ id: string;
15703
+ product_group_id: string;
15704
+ quantity: number;
15705
+ trade_item_id: string;
15706
+ };
15707
+ Insert: {
15708
+ created_at?: string;
15709
+ id?: string;
15710
+ product_group_id: string;
15711
+ quantity?: number;
15712
+ trade_item_id: string;
15713
+ };
15714
+ Update: {
15715
+ created_at?: string;
15716
+ id?: string;
15717
+ product_group_id?: string;
15718
+ quantity?: number;
15719
+ trade_item_id?: string;
15720
+ };
15721
+ Relationships: [{
15722
+ foreignKeyName: "product_group_items_product_group_id_fkey";
15723
+ columns: ["product_group_id"];
15724
+ isOneToOne: false;
15725
+ referencedRelation: "product_groups";
15726
+ referencedColumns: ["id"];
15727
+ }];
15728
+ };
15729
+ product_groups: {
15730
+ Row: {
15731
+ created_at: string;
15732
+ description: string | null;
15733
+ id: string;
15734
+ is_active: boolean;
15735
+ name: string;
15736
+ tenant_id: string;
15737
+ updated_at: string;
15738
+ };
15739
+ Insert: {
15740
+ created_at?: string;
15741
+ description?: string | null;
15742
+ id?: string;
15743
+ is_active?: boolean;
15744
+ name: string;
15745
+ tenant_id: string;
15746
+ updated_at?: string;
15747
+ };
15748
+ Update: {
15749
+ created_at?: string;
15750
+ description?: string | null;
15751
+ id?: string;
15752
+ is_active?: boolean;
15753
+ name?: string;
15754
+ tenant_id?: string;
15755
+ updated_at?: string;
15756
+ };
15757
+ Relationships: [];
15758
+ };
15378
15759
  products: {
15379
15760
  Row: {
15380
15761
  barcode: string | null;
@@ -16536,6 +16917,48 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
16536
16917
  };
16537
16918
  Relationships: [];
16538
16919
  };
16920
+ trade_item_stock: {
16921
+ Row: {
16922
+ connection_id: string;
16923
+ created_at: string;
16924
+ id: string;
16925
+ incoming_stock: number;
16926
+ minimum_stock: number;
16927
+ notes: string | null;
16928
+ physical_stock: number;
16929
+ reserved_stock: number;
16930
+ trade_item_key: string;
16931
+ updated_at: string;
16932
+ user_id: string;
16933
+ };
16934
+ Insert: {
16935
+ connection_id: string;
16936
+ created_at?: string;
16937
+ id?: string;
16938
+ incoming_stock?: number;
16939
+ minimum_stock?: number;
16940
+ notes?: string | null;
16941
+ physical_stock?: number;
16942
+ reserved_stock?: number;
16943
+ trade_item_key: string;
16944
+ updated_at?: string;
16945
+ user_id: string;
16946
+ };
16947
+ Update: {
16948
+ connection_id?: string;
16949
+ created_at?: string;
16950
+ id?: string;
16951
+ incoming_stock?: number;
16952
+ minimum_stock?: number;
16953
+ notes?: string | null;
16954
+ physical_stock?: number;
16955
+ reserved_stock?: number;
16956
+ trade_item_key?: string;
16957
+ updated_at?: string;
16958
+ user_id?: string;
16959
+ };
16960
+ Relationships: [];
16961
+ };
16539
16962
  twinfield_connections: {
16540
16963
  Row: {
16541
16964
  access_token: string | null;
@@ -17720,6 +18143,35 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
17720
18143
  };
17721
18144
  Relationships: [];
17722
18145
  };
18146
+ manufacture_product_possible_stock_view: {
18147
+ Row: {
18148
+ component_count: number | null;
18149
+ manufacture_product_id: string | null;
18150
+ possible_stock: number | null;
18151
+ };
18152
+ Relationships: [];
18153
+ };
18154
+ product_group_stock_view: {
18155
+ Row: {
18156
+ item_count: number | null;
18157
+ product_group_id: string | null;
18158
+ total_stock: number | null;
18159
+ };
18160
+ Relationships: [{
18161
+ foreignKeyName: "product_group_items_product_group_id_fkey";
18162
+ columns: ["product_group_id"];
18163
+ isOneToOne: false;
18164
+ referencedRelation: "product_groups";
18165
+ referencedColumns: ["id"];
18166
+ }];
18167
+ };
18168
+ trade_item_stock_view: {
18169
+ Row: {
18170
+ stock: number | null;
18171
+ trade_item_id: string | null;
18172
+ };
18173
+ Relationships: [];
18174
+ };
17723
18175
  v_external_customers_exact: {
17724
18176
  Row: {
17725
18177
  account_number: string | null;
@@ -17994,6 +18446,10 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
17994
18446
  Args: never;
17995
18447
  Returns: number;
17996
18448
  };
18449
+ count_distinct_regulatory_products: {
18450
+ Args: never;
18451
+ Returns: number;
18452
+ };
17997
18453
  current_monteur_id: {
17998
18454
  Args: never;
17999
18455
  Returns: string;
@@ -18290,6 +18746,12 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
18290
18746
  row_count: number;
18291
18747
  }[];
18292
18748
  };
18749
+ refresh_floricode_derived_for_product: {
18750
+ Args: {
18751
+ p_product_code: string;
18752
+ };
18753
+ Returns: number;
18754
+ };
18293
18755
  reset_floriday_sync_cursor: {
18294
18756
  Args: {
18295
18757
  p_connection_id: string;
@@ -21343,6 +21805,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
21343
21805
  };
21344
21806
  floricode_sync_state: {
21345
21807
  Row: {
21808
+ cursor_skip: number;
21346
21809
  error_message: string | null;
21347
21810
  last_change_date_time: string | null;
21348
21811
  last_sequence_number: number;
@@ -21352,6 +21815,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
21352
21815
  updated_at: string;
21353
21816
  };
21354
21817
  Insert: {
21818
+ cursor_skip?: number;
21355
21819
  error_message?: string | null;
21356
21820
  last_change_date_time?: string | null;
21357
21821
  last_sequence_number?: number;
@@ -21361,6 +21825,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
21361
21825
  updated_at?: string;
21362
21826
  };
21363
21827
  Update: {
21828
+ cursor_skip?: number;
21364
21829
  error_message?: string | null;
21365
21830
  last_change_date_time?: string | null;
21366
21831
  last_sequence_number?: number;
@@ -23708,6 +24173,93 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
23708
24173
  };
23709
24174
  Relationships: [];
23710
24175
  };
24176
+ manufacture_product_components: {
24177
+ Row: {
24178
+ component_type: string;
24179
+ created_at: string;
24180
+ id: string;
24181
+ manufacture_product_id: string;
24182
+ product_group_id: string | null;
24183
+ quantity: number;
24184
+ trade_item_id: string | null;
24185
+ unit: string;
24186
+ };
24187
+ Insert: {
24188
+ component_type: string;
24189
+ created_at?: string;
24190
+ id?: string;
24191
+ manufacture_product_id: string;
24192
+ product_group_id?: string | null;
24193
+ quantity?: number;
24194
+ trade_item_id?: string | null;
24195
+ unit?: string;
24196
+ };
24197
+ Update: {
24198
+ component_type?: string;
24199
+ created_at?: string;
24200
+ id?: string;
24201
+ manufacture_product_id?: string;
24202
+ product_group_id?: string | null;
24203
+ quantity?: number;
24204
+ trade_item_id?: string | null;
24205
+ unit?: string;
24206
+ };
24207
+ Relationships: [{
24208
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
24209
+ columns: ["manufacture_product_id"];
24210
+ isOneToOne: false;
24211
+ referencedRelation: "manufacture_product_possible_stock_view";
24212
+ referencedColumns: ["manufacture_product_id"];
24213
+ }, {
24214
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
24215
+ columns: ["manufacture_product_id"];
24216
+ isOneToOne: false;
24217
+ referencedRelation: "manufacture_products";
24218
+ referencedColumns: ["id"];
24219
+ }, {
24220
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
24221
+ columns: ["product_group_id"];
24222
+ isOneToOne: false;
24223
+ referencedRelation: "product_groups";
24224
+ referencedColumns: ["id"];
24225
+ }];
24226
+ };
24227
+ manufacture_products: {
24228
+ Row: {
24229
+ created_at: string;
24230
+ description: string | null;
24231
+ id: string;
24232
+ is_active: boolean;
24233
+ name: string;
24234
+ produced_stock: number;
24235
+ product_code: string;
24236
+ tenant_id: string;
24237
+ updated_at: string;
24238
+ };
24239
+ Insert: {
24240
+ created_at?: string;
24241
+ description?: string | null;
24242
+ id?: string;
24243
+ is_active?: boolean;
24244
+ name: string;
24245
+ produced_stock?: number;
24246
+ product_code: string;
24247
+ tenant_id: string;
24248
+ updated_at?: string;
24249
+ };
24250
+ Update: {
24251
+ created_at?: string;
24252
+ description?: string | null;
24253
+ id?: string;
24254
+ is_active?: boolean;
24255
+ name?: string;
24256
+ produced_stock?: number;
24257
+ product_code?: string;
24258
+ tenant_id?: string;
24259
+ updated_at?: string;
24260
+ };
24261
+ Relationships: [];
24262
+ };
23711
24263
  monteurs: {
23712
24264
  Row: {
23713
24265
  avatar_url: string | null;
@@ -24668,6 +25220,66 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
24668
25220
  };
24669
25221
  Relationships: [];
24670
25222
  };
25223
+ product_group_items: {
25224
+ Row: {
25225
+ created_at: string;
25226
+ id: string;
25227
+ product_group_id: string;
25228
+ quantity: number;
25229
+ trade_item_id: string;
25230
+ };
25231
+ Insert: {
25232
+ created_at?: string;
25233
+ id?: string;
25234
+ product_group_id: string;
25235
+ quantity?: number;
25236
+ trade_item_id: string;
25237
+ };
25238
+ Update: {
25239
+ created_at?: string;
25240
+ id?: string;
25241
+ product_group_id?: string;
25242
+ quantity?: number;
25243
+ trade_item_id?: string;
25244
+ };
25245
+ Relationships: [{
25246
+ foreignKeyName: "product_group_items_product_group_id_fkey";
25247
+ columns: ["product_group_id"];
25248
+ isOneToOne: false;
25249
+ referencedRelation: "product_groups";
25250
+ referencedColumns: ["id"];
25251
+ }];
25252
+ };
25253
+ product_groups: {
25254
+ Row: {
25255
+ created_at: string;
25256
+ description: string | null;
25257
+ id: string;
25258
+ is_active: boolean;
25259
+ name: string;
25260
+ tenant_id: string;
25261
+ updated_at: string;
25262
+ };
25263
+ Insert: {
25264
+ created_at?: string;
25265
+ description?: string | null;
25266
+ id?: string;
25267
+ is_active?: boolean;
25268
+ name: string;
25269
+ tenant_id: string;
25270
+ updated_at?: string;
25271
+ };
25272
+ Update: {
25273
+ created_at?: string;
25274
+ description?: string | null;
25275
+ id?: string;
25276
+ is_active?: boolean;
25277
+ name?: string;
25278
+ tenant_id?: string;
25279
+ updated_at?: string;
25280
+ };
25281
+ Relationships: [];
25282
+ };
24671
25283
  products: {
24672
25284
  Row: {
24673
25285
  barcode: string | null;
@@ -25829,6 +26441,48 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
25829
26441
  };
25830
26442
  Relationships: [];
25831
26443
  };
26444
+ trade_item_stock: {
26445
+ Row: {
26446
+ connection_id: string;
26447
+ created_at: string;
26448
+ id: string;
26449
+ incoming_stock: number;
26450
+ minimum_stock: number;
26451
+ notes: string | null;
26452
+ physical_stock: number;
26453
+ reserved_stock: number;
26454
+ trade_item_key: string;
26455
+ updated_at: string;
26456
+ user_id: string;
26457
+ };
26458
+ Insert: {
26459
+ connection_id: string;
26460
+ created_at?: string;
26461
+ id?: string;
26462
+ incoming_stock?: number;
26463
+ minimum_stock?: number;
26464
+ notes?: string | null;
26465
+ physical_stock?: number;
26466
+ reserved_stock?: number;
26467
+ trade_item_key: string;
26468
+ updated_at?: string;
26469
+ user_id: string;
26470
+ };
26471
+ Update: {
26472
+ connection_id?: string;
26473
+ created_at?: string;
26474
+ id?: string;
26475
+ incoming_stock?: number;
26476
+ minimum_stock?: number;
26477
+ notes?: string | null;
26478
+ physical_stock?: number;
26479
+ reserved_stock?: number;
26480
+ trade_item_key?: string;
26481
+ updated_at?: string;
26482
+ user_id?: string;
26483
+ };
26484
+ Relationships: [];
26485
+ };
25832
26486
  twinfield_connections: {
25833
26487
  Row: {
25834
26488
  access_token: string | null;
@@ -27013,6 +27667,35 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
27013
27667
  };
27014
27668
  Relationships: [];
27015
27669
  };
27670
+ manufacture_product_possible_stock_view: {
27671
+ Row: {
27672
+ component_count: number | null;
27673
+ manufacture_product_id: string | null;
27674
+ possible_stock: number | null;
27675
+ };
27676
+ Relationships: [];
27677
+ };
27678
+ product_group_stock_view: {
27679
+ Row: {
27680
+ item_count: number | null;
27681
+ product_group_id: string | null;
27682
+ total_stock: number | null;
27683
+ };
27684
+ Relationships: [{
27685
+ foreignKeyName: "product_group_items_product_group_id_fkey";
27686
+ columns: ["product_group_id"];
27687
+ isOneToOne: false;
27688
+ referencedRelation: "product_groups";
27689
+ referencedColumns: ["id"];
27690
+ }];
27691
+ };
27692
+ trade_item_stock_view: {
27693
+ Row: {
27694
+ stock: number | null;
27695
+ trade_item_id: string | null;
27696
+ };
27697
+ Relationships: [];
27698
+ };
27016
27699
  v_external_customers_exact: {
27017
27700
  Row: {
27018
27701
  account_number: string | null;
@@ -27287,6 +27970,10 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
27287
27970
  Args: never;
27288
27971
  Returns: number;
27289
27972
  };
27973
+ count_distinct_regulatory_products: {
27974
+ Args: never;
27975
+ Returns: number;
27976
+ };
27290
27977
  current_monteur_id: {
27291
27978
  Args: never;
27292
27979
  Returns: string;
@@ -27583,6 +28270,12 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
27583
28270
  row_count: number;
27584
28271
  }[];
27585
28272
  };
28273
+ refresh_floricode_derived_for_product: {
28274
+ Args: {
28275
+ p_product_code: string;
28276
+ };
28277
+ Returns: number;
28278
+ };
27586
28279
  reset_floriday_sync_cursor: {
27587
28280
  Args: {
27588
28281
  p_connection_id: string;
@@ -30644,6 +31337,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
30644
31337
  };
30645
31338
  floricode_sync_state: {
30646
31339
  Row: {
31340
+ cursor_skip: number;
30647
31341
  error_message: string | null;
30648
31342
  last_change_date_time: string | null;
30649
31343
  last_sequence_number: number;
@@ -30653,6 +31347,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
30653
31347
  updated_at: string;
30654
31348
  };
30655
31349
  Insert: {
31350
+ cursor_skip?: number;
30656
31351
  error_message?: string | null;
30657
31352
  last_change_date_time?: string | null;
30658
31353
  last_sequence_number?: number;
@@ -30662,6 +31357,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
30662
31357
  updated_at?: string;
30663
31358
  };
30664
31359
  Update: {
31360
+ cursor_skip?: number;
30665
31361
  error_message?: string | null;
30666
31362
  last_change_date_time?: string | null;
30667
31363
  last_sequence_number?: number;
@@ -33009,6 +33705,93 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
33009
33705
  };
33010
33706
  Relationships: [];
33011
33707
  };
33708
+ manufacture_product_components: {
33709
+ Row: {
33710
+ component_type: string;
33711
+ created_at: string;
33712
+ id: string;
33713
+ manufacture_product_id: string;
33714
+ product_group_id: string | null;
33715
+ quantity: number;
33716
+ trade_item_id: string | null;
33717
+ unit: string;
33718
+ };
33719
+ Insert: {
33720
+ component_type: string;
33721
+ created_at?: string;
33722
+ id?: string;
33723
+ manufacture_product_id: string;
33724
+ product_group_id?: string | null;
33725
+ quantity?: number;
33726
+ trade_item_id?: string | null;
33727
+ unit?: string;
33728
+ };
33729
+ Update: {
33730
+ component_type?: string;
33731
+ created_at?: string;
33732
+ id?: string;
33733
+ manufacture_product_id?: string;
33734
+ product_group_id?: string | null;
33735
+ quantity?: number;
33736
+ trade_item_id?: string | null;
33737
+ unit?: string;
33738
+ };
33739
+ Relationships: [{
33740
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
33741
+ columns: ["manufacture_product_id"];
33742
+ isOneToOne: false;
33743
+ referencedRelation: "manufacture_product_possible_stock_view";
33744
+ referencedColumns: ["manufacture_product_id"];
33745
+ }, {
33746
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
33747
+ columns: ["manufacture_product_id"];
33748
+ isOneToOne: false;
33749
+ referencedRelation: "manufacture_products";
33750
+ referencedColumns: ["id"];
33751
+ }, {
33752
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
33753
+ columns: ["product_group_id"];
33754
+ isOneToOne: false;
33755
+ referencedRelation: "product_groups";
33756
+ referencedColumns: ["id"];
33757
+ }];
33758
+ };
33759
+ manufacture_products: {
33760
+ Row: {
33761
+ created_at: string;
33762
+ description: string | null;
33763
+ id: string;
33764
+ is_active: boolean;
33765
+ name: string;
33766
+ produced_stock: number;
33767
+ product_code: string;
33768
+ tenant_id: string;
33769
+ updated_at: string;
33770
+ };
33771
+ Insert: {
33772
+ created_at?: string;
33773
+ description?: string | null;
33774
+ id?: string;
33775
+ is_active?: boolean;
33776
+ name: string;
33777
+ produced_stock?: number;
33778
+ product_code: string;
33779
+ tenant_id: string;
33780
+ updated_at?: string;
33781
+ };
33782
+ Update: {
33783
+ created_at?: string;
33784
+ description?: string | null;
33785
+ id?: string;
33786
+ is_active?: boolean;
33787
+ name?: string;
33788
+ produced_stock?: number;
33789
+ product_code?: string;
33790
+ tenant_id?: string;
33791
+ updated_at?: string;
33792
+ };
33793
+ Relationships: [];
33794
+ };
33012
33795
  monteurs: {
33013
33796
  Row: {
33014
33797
  avatar_url: string | null;
@@ -33969,6 +34752,66 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
33969
34752
  };
33970
34753
  Relationships: [];
33971
34754
  };
34755
+ product_group_items: {
34756
+ Row: {
34757
+ created_at: string;
34758
+ id: string;
34759
+ product_group_id: string;
34760
+ quantity: number;
34761
+ trade_item_id: string;
34762
+ };
34763
+ Insert: {
34764
+ created_at?: string;
34765
+ id?: string;
34766
+ product_group_id: string;
34767
+ quantity?: number;
34768
+ trade_item_id: string;
34769
+ };
34770
+ Update: {
34771
+ created_at?: string;
34772
+ id?: string;
34773
+ product_group_id?: string;
34774
+ quantity?: number;
34775
+ trade_item_id?: string;
34776
+ };
34777
+ Relationships: [{
34778
+ foreignKeyName: "product_group_items_product_group_id_fkey";
34779
+ columns: ["product_group_id"];
34780
+ isOneToOne: false;
34781
+ referencedRelation: "product_groups";
34782
+ referencedColumns: ["id"];
34783
+ }];
34784
+ };
34785
+ product_groups: {
34786
+ Row: {
34787
+ created_at: string;
34788
+ description: string | null;
34789
+ id: string;
34790
+ is_active: boolean;
34791
+ name: string;
34792
+ tenant_id: string;
34793
+ updated_at: string;
34794
+ };
34795
+ Insert: {
34796
+ created_at?: string;
34797
+ description?: string | null;
34798
+ id?: string;
34799
+ is_active?: boolean;
34800
+ name: string;
34801
+ tenant_id: string;
34802
+ updated_at?: string;
34803
+ };
34804
+ Update: {
34805
+ created_at?: string;
34806
+ description?: string | null;
34807
+ id?: string;
34808
+ is_active?: boolean;
34809
+ name?: string;
34810
+ tenant_id?: string;
34811
+ updated_at?: string;
34812
+ };
34813
+ Relationships: [];
34814
+ };
33972
34815
  products: {
33973
34816
  Row: {
33974
34817
  barcode: string | null;
@@ -35130,6 +35973,48 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
35130
35973
  };
35131
35974
  Relationships: [];
35132
35975
  };
35976
+ trade_item_stock: {
35977
+ Row: {
35978
+ connection_id: string;
35979
+ created_at: string;
35980
+ id: string;
35981
+ incoming_stock: number;
35982
+ minimum_stock: number;
35983
+ notes: string | null;
35984
+ physical_stock: number;
35985
+ reserved_stock: number;
35986
+ trade_item_key: string;
35987
+ updated_at: string;
35988
+ user_id: string;
35989
+ };
35990
+ Insert: {
35991
+ connection_id: string;
35992
+ created_at?: string;
35993
+ id?: string;
35994
+ incoming_stock?: number;
35995
+ minimum_stock?: number;
35996
+ notes?: string | null;
35997
+ physical_stock?: number;
35998
+ reserved_stock?: number;
35999
+ trade_item_key: string;
36000
+ updated_at?: string;
36001
+ user_id: string;
36002
+ };
36003
+ Update: {
36004
+ connection_id?: string;
36005
+ created_at?: string;
36006
+ id?: string;
36007
+ incoming_stock?: number;
36008
+ minimum_stock?: number;
36009
+ notes?: string | null;
36010
+ physical_stock?: number;
36011
+ reserved_stock?: number;
36012
+ trade_item_key?: string;
36013
+ updated_at?: string;
36014
+ user_id?: string;
36015
+ };
36016
+ Relationships: [];
36017
+ };
35133
36018
  twinfield_connections: {
35134
36019
  Row: {
35135
36020
  access_token: string | null;
@@ -36314,6 +37199,35 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
36314
37199
  };
36315
37200
  Relationships: [];
36316
37201
  };
37202
+ manufacture_product_possible_stock_view: {
37203
+ Row: {
37204
+ component_count: number | null;
37205
+ manufacture_product_id: string | null;
37206
+ possible_stock: number | null;
37207
+ };
37208
+ Relationships: [];
37209
+ };
37210
+ product_group_stock_view: {
37211
+ Row: {
37212
+ item_count: number | null;
37213
+ product_group_id: string | null;
37214
+ total_stock: number | null;
37215
+ };
37216
+ Relationships: [{
37217
+ foreignKeyName: "product_group_items_product_group_id_fkey";
37218
+ columns: ["product_group_id"];
37219
+ isOneToOne: false;
37220
+ referencedRelation: "product_groups";
37221
+ referencedColumns: ["id"];
37222
+ }];
37223
+ };
37224
+ trade_item_stock_view: {
37225
+ Row: {
37226
+ stock: number | null;
37227
+ trade_item_id: string | null;
37228
+ };
37229
+ Relationships: [];
37230
+ };
36317
37231
  v_external_customers_exact: {
36318
37232
  Row: {
36319
37233
  account_number: string | null;
@@ -36588,6 +37502,10 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
36588
37502
  Args: never;
36589
37503
  Returns: number;
36590
37504
  };
37505
+ count_distinct_regulatory_products: {
37506
+ Args: never;
37507
+ Returns: number;
37508
+ };
36591
37509
  current_monteur_id: {
36592
37510
  Args: never;
36593
37511
  Returns: string;
@@ -36884,6 +37802,12 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
36884
37802
  row_count: number;
36885
37803
  }[];
36886
37804
  };
37805
+ refresh_floricode_derived_for_product: {
37806
+ Args: {
37807
+ p_product_code: string;
37808
+ };
37809
+ Returns: number;
37810
+ };
36887
37811
  reset_floriday_sync_cursor: {
36888
37812
  Args: {
36889
37813
  p_connection_id: string;
@@ -39937,6 +40861,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
39937
40861
  };
39938
40862
  floricode_sync_state: {
39939
40863
  Row: {
40864
+ cursor_skip: number;
39940
40865
  error_message: string | null;
39941
40866
  last_change_date_time: string | null;
39942
40867
  last_sequence_number: number;
@@ -39946,6 +40871,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
39946
40871
  updated_at: string;
39947
40872
  };
39948
40873
  Insert: {
40874
+ cursor_skip?: number;
39949
40875
  error_message?: string | null;
39950
40876
  last_change_date_time?: string | null;
39951
40877
  last_sequence_number?: number;
@@ -39955,6 +40881,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
39955
40881
  updated_at?: string;
39956
40882
  };
39957
40883
  Update: {
40884
+ cursor_skip?: number;
39958
40885
  error_message?: string | null;
39959
40886
  last_change_date_time?: string | null;
39960
40887
  last_sequence_number?: number;
@@ -42302,6 +43229,93 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
42302
43229
  };
42303
43230
  Relationships: [];
42304
43231
  };
43232
+ manufacture_product_components: {
43233
+ Row: {
43234
+ component_type: string;
43235
+ created_at: string;
43236
+ id: string;
43237
+ manufacture_product_id: string;
43238
+ product_group_id: string | null;
43239
+ quantity: number;
43240
+ trade_item_id: string | null;
43241
+ unit: string;
43242
+ };
43243
+ Insert: {
43244
+ component_type: string;
43245
+ created_at?: string;
43246
+ id?: string;
43247
+ manufacture_product_id: string;
43248
+ product_group_id?: string | null;
43249
+ quantity?: number;
43250
+ trade_item_id?: string | null;
43251
+ unit?: string;
43252
+ };
43253
+ Update: {
43254
+ component_type?: string;
43255
+ created_at?: string;
43256
+ id?: string;
43257
+ manufacture_product_id?: string;
43258
+ product_group_id?: string | null;
43259
+ quantity?: number;
43260
+ trade_item_id?: string | null;
43261
+ unit?: string;
43262
+ };
43263
+ Relationships: [{
43264
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
43265
+ columns: ["manufacture_product_id"];
43266
+ isOneToOne: false;
43267
+ referencedRelation: "manufacture_product_possible_stock_view";
43268
+ referencedColumns: ["manufacture_product_id"];
43269
+ }, {
43270
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
43271
+ columns: ["manufacture_product_id"];
43272
+ isOneToOne: false;
43273
+ referencedRelation: "manufacture_products";
43274
+ referencedColumns: ["id"];
43275
+ }, {
43276
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
43277
+ columns: ["product_group_id"];
43278
+ isOneToOne: false;
43279
+ referencedRelation: "product_groups";
43280
+ referencedColumns: ["id"];
43281
+ }];
43282
+ };
43283
+ manufacture_products: {
43284
+ Row: {
43285
+ created_at: string;
43286
+ description: string | null;
43287
+ id: string;
43288
+ is_active: boolean;
43289
+ name: string;
43290
+ produced_stock: number;
43291
+ product_code: string;
43292
+ tenant_id: string;
43293
+ updated_at: string;
43294
+ };
43295
+ Insert: {
43296
+ created_at?: string;
43297
+ description?: string | null;
43298
+ id?: string;
43299
+ is_active?: boolean;
43300
+ name: string;
43301
+ produced_stock?: number;
43302
+ product_code: string;
43303
+ tenant_id: string;
43304
+ updated_at?: string;
43305
+ };
43306
+ Update: {
43307
+ created_at?: string;
43308
+ description?: string | null;
43309
+ id?: string;
43310
+ is_active?: boolean;
43311
+ name?: string;
43312
+ produced_stock?: number;
43313
+ product_code?: string;
43314
+ tenant_id?: string;
43315
+ updated_at?: string;
43316
+ };
43317
+ Relationships: [];
43318
+ };
42305
43319
  monteurs: {
42306
43320
  Row: {
42307
43321
  avatar_url: string | null;
@@ -43262,6 +44276,66 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
43262
44276
  };
43263
44277
  Relationships: [];
43264
44278
  };
44279
+ product_group_items: {
44280
+ Row: {
44281
+ created_at: string;
44282
+ id: string;
44283
+ product_group_id: string;
44284
+ quantity: number;
44285
+ trade_item_id: string;
44286
+ };
44287
+ Insert: {
44288
+ created_at?: string;
44289
+ id?: string;
44290
+ product_group_id: string;
44291
+ quantity?: number;
44292
+ trade_item_id: string;
44293
+ };
44294
+ Update: {
44295
+ created_at?: string;
44296
+ id?: string;
44297
+ product_group_id?: string;
44298
+ quantity?: number;
44299
+ trade_item_id?: string;
44300
+ };
44301
+ Relationships: [{
44302
+ foreignKeyName: "product_group_items_product_group_id_fkey";
44303
+ columns: ["product_group_id"];
44304
+ isOneToOne: false;
44305
+ referencedRelation: "product_groups";
44306
+ referencedColumns: ["id"];
44307
+ }];
44308
+ };
44309
+ product_groups: {
44310
+ Row: {
44311
+ created_at: string;
44312
+ description: string | null;
44313
+ id: string;
44314
+ is_active: boolean;
44315
+ name: string;
44316
+ tenant_id: string;
44317
+ updated_at: string;
44318
+ };
44319
+ Insert: {
44320
+ created_at?: string;
44321
+ description?: string | null;
44322
+ id?: string;
44323
+ is_active?: boolean;
44324
+ name: string;
44325
+ tenant_id: string;
44326
+ updated_at?: string;
44327
+ };
44328
+ Update: {
44329
+ created_at?: string;
44330
+ description?: string | null;
44331
+ id?: string;
44332
+ is_active?: boolean;
44333
+ name?: string;
44334
+ tenant_id?: string;
44335
+ updated_at?: string;
44336
+ };
44337
+ Relationships: [];
44338
+ };
43265
44339
  products: {
43266
44340
  Row: {
43267
44341
  barcode: string | null;
@@ -44423,6 +45497,48 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
44423
45497
  };
44424
45498
  Relationships: [];
44425
45499
  };
45500
+ trade_item_stock: {
45501
+ Row: {
45502
+ connection_id: string;
45503
+ created_at: string;
45504
+ id: string;
45505
+ incoming_stock: number;
45506
+ minimum_stock: number;
45507
+ notes: string | null;
45508
+ physical_stock: number;
45509
+ reserved_stock: number;
45510
+ trade_item_key: string;
45511
+ updated_at: string;
45512
+ user_id: string;
45513
+ };
45514
+ Insert: {
45515
+ connection_id: string;
45516
+ created_at?: string;
45517
+ id?: string;
45518
+ incoming_stock?: number;
45519
+ minimum_stock?: number;
45520
+ notes?: string | null;
45521
+ physical_stock?: number;
45522
+ reserved_stock?: number;
45523
+ trade_item_key: string;
45524
+ updated_at?: string;
45525
+ user_id: string;
45526
+ };
45527
+ Update: {
45528
+ connection_id?: string;
45529
+ created_at?: string;
45530
+ id?: string;
45531
+ incoming_stock?: number;
45532
+ minimum_stock?: number;
45533
+ notes?: string | null;
45534
+ physical_stock?: number;
45535
+ reserved_stock?: number;
45536
+ trade_item_key?: string;
45537
+ updated_at?: string;
45538
+ user_id?: string;
45539
+ };
45540
+ Relationships: [];
45541
+ };
44426
45542
  twinfield_connections: {
44427
45543
  Row: {
44428
45544
  access_token: string | null;
@@ -45607,6 +46723,35 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
45607
46723
  };
45608
46724
  Relationships: [];
45609
46725
  };
46726
+ manufacture_product_possible_stock_view: {
46727
+ Row: {
46728
+ component_count: number | null;
46729
+ manufacture_product_id: string | null;
46730
+ possible_stock: number | null;
46731
+ };
46732
+ Relationships: [];
46733
+ };
46734
+ product_group_stock_view: {
46735
+ Row: {
46736
+ item_count: number | null;
46737
+ product_group_id: string | null;
46738
+ total_stock: number | null;
46739
+ };
46740
+ Relationships: [{
46741
+ foreignKeyName: "product_group_items_product_group_id_fkey";
46742
+ columns: ["product_group_id"];
46743
+ isOneToOne: false;
46744
+ referencedRelation: "product_groups";
46745
+ referencedColumns: ["id"];
46746
+ }];
46747
+ };
46748
+ trade_item_stock_view: {
46749
+ Row: {
46750
+ stock: number | null;
46751
+ trade_item_id: string | null;
46752
+ };
46753
+ Relationships: [];
46754
+ };
45610
46755
  v_external_customers_exact: {
45611
46756
  Row: {
45612
46757
  account_number: string | null;
@@ -45881,6 +47026,10 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
45881
47026
  Args: never;
45882
47027
  Returns: number;
45883
47028
  };
47029
+ count_distinct_regulatory_products: {
47030
+ Args: never;
47031
+ Returns: number;
47032
+ };
45884
47033
  current_monteur_id: {
45885
47034
  Args: never;
45886
47035
  Returns: string;
@@ -46177,6 +47326,12 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
46177
47326
  row_count: number;
46178
47327
  }[];
46179
47328
  };
47329
+ refresh_floricode_derived_for_product: {
47330
+ Args: {
47331
+ p_product_code: string;
47332
+ };
47333
+ Returns: number;
47334
+ };
46180
47335
  reset_floriday_sync_cursor: {
46181
47336
  Args: {
46182
47337
  p_connection_id: string;
@@ -49235,6 +50390,7 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
49235
50390
  };
49236
50391
  floricode_sync_state: {
49237
50392
  Row: {
50393
+ cursor_skip: number;
49238
50394
  error_message: string | null;
49239
50395
  last_change_date_time: string | null;
49240
50396
  last_sequence_number: number;
@@ -49244,6 +50400,7 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
49244
50400
  updated_at: string;
49245
50401
  };
49246
50402
  Insert: {
50403
+ cursor_skip?: number;
49247
50404
  error_message?: string | null;
49248
50405
  last_change_date_time?: string | null;
49249
50406
  last_sequence_number?: number;
@@ -49253,6 +50410,7 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
49253
50410
  updated_at?: string;
49254
50411
  };
49255
50412
  Update: {
50413
+ cursor_skip?: number;
49256
50414
  error_message?: string | null;
49257
50415
  last_change_date_time?: string | null;
49258
50416
  last_sequence_number?: number;
@@ -51600,6 +52758,93 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
51600
52758
  };
51601
52759
  Relationships: [];
51602
52760
  };
52761
+ manufacture_product_components: {
52762
+ Row: {
52763
+ component_type: string;
52764
+ created_at: string;
52765
+ id: string;
52766
+ manufacture_product_id: string;
52767
+ product_group_id: string | null;
52768
+ quantity: number;
52769
+ trade_item_id: string | null;
52770
+ unit: string;
52771
+ };
52772
+ Insert: {
52773
+ component_type: string;
52774
+ created_at?: string;
52775
+ id?: string;
52776
+ manufacture_product_id: string;
52777
+ product_group_id?: string | null;
52778
+ quantity?: number;
52779
+ trade_item_id?: string | null;
52780
+ unit?: string;
52781
+ };
52782
+ Update: {
52783
+ component_type?: string;
52784
+ created_at?: string;
52785
+ id?: string;
52786
+ manufacture_product_id?: string;
52787
+ product_group_id?: string | null;
52788
+ quantity?: number;
52789
+ trade_item_id?: string | null;
52790
+ unit?: string;
52791
+ };
52792
+ Relationships: [{
52793
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
52794
+ columns: ["manufacture_product_id"];
52795
+ isOneToOne: false;
52796
+ referencedRelation: "manufacture_product_possible_stock_view";
52797
+ referencedColumns: ["manufacture_product_id"];
52798
+ }, {
52799
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
52800
+ columns: ["manufacture_product_id"];
52801
+ isOneToOne: false;
52802
+ referencedRelation: "manufacture_products";
52803
+ referencedColumns: ["id"];
52804
+ }, {
52805
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
52806
+ columns: ["product_group_id"];
52807
+ isOneToOne: false;
52808
+ referencedRelation: "product_groups";
52809
+ referencedColumns: ["id"];
52810
+ }];
52811
+ };
52812
+ manufacture_products: {
52813
+ Row: {
52814
+ created_at: string;
52815
+ description: string | null;
52816
+ id: string;
52817
+ is_active: boolean;
52818
+ name: string;
52819
+ produced_stock: number;
52820
+ product_code: string;
52821
+ tenant_id: string;
52822
+ updated_at: string;
52823
+ };
52824
+ Insert: {
52825
+ created_at?: string;
52826
+ description?: string | null;
52827
+ id?: string;
52828
+ is_active?: boolean;
52829
+ name: string;
52830
+ produced_stock?: number;
52831
+ product_code: string;
52832
+ tenant_id: string;
52833
+ updated_at?: string;
52834
+ };
52835
+ Update: {
52836
+ created_at?: string;
52837
+ description?: string | null;
52838
+ id?: string;
52839
+ is_active?: boolean;
52840
+ name?: string;
52841
+ produced_stock?: number;
52842
+ product_code?: string;
52843
+ tenant_id?: string;
52844
+ updated_at?: string;
52845
+ };
52846
+ Relationships: [];
52847
+ };
51603
52848
  monteurs: {
51604
52849
  Row: {
51605
52850
  avatar_url: string | null;
@@ -52560,6 +53805,66 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
52560
53805
  };
52561
53806
  Relationships: [];
52562
53807
  };
53808
+ product_group_items: {
53809
+ Row: {
53810
+ created_at: string;
53811
+ id: string;
53812
+ product_group_id: string;
53813
+ quantity: number;
53814
+ trade_item_id: string;
53815
+ };
53816
+ Insert: {
53817
+ created_at?: string;
53818
+ id?: string;
53819
+ product_group_id: string;
53820
+ quantity?: number;
53821
+ trade_item_id: string;
53822
+ };
53823
+ Update: {
53824
+ created_at?: string;
53825
+ id?: string;
53826
+ product_group_id?: string;
53827
+ quantity?: number;
53828
+ trade_item_id?: string;
53829
+ };
53830
+ Relationships: [{
53831
+ foreignKeyName: "product_group_items_product_group_id_fkey";
53832
+ columns: ["product_group_id"];
53833
+ isOneToOne: false;
53834
+ referencedRelation: "product_groups";
53835
+ referencedColumns: ["id"];
53836
+ }];
53837
+ };
53838
+ product_groups: {
53839
+ Row: {
53840
+ created_at: string;
53841
+ description: string | null;
53842
+ id: string;
53843
+ is_active: boolean;
53844
+ name: string;
53845
+ tenant_id: string;
53846
+ updated_at: string;
53847
+ };
53848
+ Insert: {
53849
+ created_at?: string;
53850
+ description?: string | null;
53851
+ id?: string;
53852
+ is_active?: boolean;
53853
+ name: string;
53854
+ tenant_id: string;
53855
+ updated_at?: string;
53856
+ };
53857
+ Update: {
53858
+ created_at?: string;
53859
+ description?: string | null;
53860
+ id?: string;
53861
+ is_active?: boolean;
53862
+ name?: string;
53863
+ tenant_id?: string;
53864
+ updated_at?: string;
53865
+ };
53866
+ Relationships: [];
53867
+ };
52563
53868
  products: {
52564
53869
  Row: {
52565
53870
  barcode: string | null;
@@ -53721,6 +55026,48 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
53721
55026
  };
53722
55027
  Relationships: [];
53723
55028
  };
55029
+ trade_item_stock: {
55030
+ Row: {
55031
+ connection_id: string;
55032
+ created_at: string;
55033
+ id: string;
55034
+ incoming_stock: number;
55035
+ minimum_stock: number;
55036
+ notes: string | null;
55037
+ physical_stock: number;
55038
+ reserved_stock: number;
55039
+ trade_item_key: string;
55040
+ updated_at: string;
55041
+ user_id: string;
55042
+ };
55043
+ Insert: {
55044
+ connection_id: string;
55045
+ created_at?: string;
55046
+ id?: string;
55047
+ incoming_stock?: number;
55048
+ minimum_stock?: number;
55049
+ notes?: string | null;
55050
+ physical_stock?: number;
55051
+ reserved_stock?: number;
55052
+ trade_item_key: string;
55053
+ updated_at?: string;
55054
+ user_id: string;
55055
+ };
55056
+ Update: {
55057
+ connection_id?: string;
55058
+ created_at?: string;
55059
+ id?: string;
55060
+ incoming_stock?: number;
55061
+ minimum_stock?: number;
55062
+ notes?: string | null;
55063
+ physical_stock?: number;
55064
+ reserved_stock?: number;
55065
+ trade_item_key?: string;
55066
+ updated_at?: string;
55067
+ user_id?: string;
55068
+ };
55069
+ Relationships: [];
55070
+ };
53724
55071
  twinfield_connections: {
53725
55072
  Row: {
53726
55073
  access_token: string | null;
@@ -54905,6 +56252,35 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
54905
56252
  };
54906
56253
  Relationships: [];
54907
56254
  };
56255
+ manufacture_product_possible_stock_view: {
56256
+ Row: {
56257
+ component_count: number | null;
56258
+ manufacture_product_id: string | null;
56259
+ possible_stock: number | null;
56260
+ };
56261
+ Relationships: [];
56262
+ };
56263
+ product_group_stock_view: {
56264
+ Row: {
56265
+ item_count: number | null;
56266
+ product_group_id: string | null;
56267
+ total_stock: number | null;
56268
+ };
56269
+ Relationships: [{
56270
+ foreignKeyName: "product_group_items_product_group_id_fkey";
56271
+ columns: ["product_group_id"];
56272
+ isOneToOne: false;
56273
+ referencedRelation: "product_groups";
56274
+ referencedColumns: ["id"];
56275
+ }];
56276
+ };
56277
+ trade_item_stock_view: {
56278
+ Row: {
56279
+ stock: number | null;
56280
+ trade_item_id: string | null;
56281
+ };
56282
+ Relationships: [];
56283
+ };
54908
56284
  v_external_customers_exact: {
54909
56285
  Row: {
54910
56286
  account_number: string | null;
@@ -55179,6 +56555,10 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
55179
56555
  Args: never;
55180
56556
  Returns: number;
55181
56557
  };
56558
+ count_distinct_regulatory_products: {
56559
+ Args: never;
56560
+ Returns: number;
56561
+ };
55182
56562
  current_monteur_id: {
55183
56563
  Args: never;
55184
56564
  Returns: string;
@@ -55475,6 +56855,12 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
55475
56855
  row_count: number;
55476
56856
  }[];
55477
56857
  };
56858
+ refresh_floricode_derived_for_product: {
56859
+ Args: {
56860
+ p_product_code: string;
56861
+ };
56862
+ Returns: number;
56863
+ };
55478
56864
  reset_floriday_sync_cursor: {
55479
56865
  Args: {
55480
56866
  p_connection_id: string;