@flowselections/floriday-klanten-module 1.0.30 → 1.0.31

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 (47) hide show
  1. package/dist-lib/integrations/supabase/auth-middleware.d.ts +255 -0
  2. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  3. package/dist-lib/integrations/supabase/client.d.ts +255 -0
  4. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  5. package/dist-lib/integrations/supabase/client.server.d.ts +255 -0
  6. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  7. package/dist-lib/integrations/supabase/types.d.ts +255 -0
  8. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  9. package/dist-lib/lib/accounting/twinfield/worker.functions.d.ts +765 -0
  10. package/dist-lib/lib/accounting/twinfield/worker.functions.d.ts.map +1 -1
  11. package/dist-lib/lib/accounting.functions.d.ts +765 -0
  12. package/dist-lib/lib/accounting.functions.d.ts.map +1 -1
  13. package/dist-lib/lib/customer-analytics.functions.d.ts +255 -0
  14. package/dist-lib/lib/customer-analytics.functions.d.ts.map +1 -1
  15. package/dist-lib/lib/customer-notes.functions.d.ts +510 -0
  16. package/dist-lib/lib/customer-notes.functions.d.ts.map +1 -1
  17. package/dist-lib/lib/customer-revenue.functions.d.ts +255 -0
  18. package/dist-lib/lib/customer-revenue.functions.d.ts.map +1 -1
  19. package/dist-lib/lib/customers.functions.d.ts +2370 -75
  20. package/dist-lib/lib/customers.functions.d.ts.map +1 -1
  21. package/dist-lib/lib/delivery-locations.functions.d.ts +1095 -75
  22. package/dist-lib/lib/delivery-locations.functions.d.ts.map +1 -1
  23. package/dist-lib/lib/external-customers.functions.d.ts +1095 -75
  24. package/dist-lib/lib/external-customers.functions.d.ts.map +1 -1
  25. package/dist-lib/lib/floriday-assortment.functions.d.ts +255 -0
  26. package/dist-lib/lib/floriday-assortment.functions.d.ts.map +1 -1
  27. package/dist-lib/lib/floriday-discounts.functions.d.ts +510 -0
  28. package/dist-lib/lib/floriday-discounts.functions.d.ts.map +1 -1
  29. package/dist-lib/lib/floriday-trade-items.functions.d.ts +255 -0
  30. package/dist-lib/lib/floriday-trade-items.functions.d.ts.map +1 -1
  31. package/dist-lib/lib/local-discounts.functions.d.ts +1860 -75
  32. package/dist-lib/lib/local-discounts.functions.d.ts.map +1 -1
  33. package/dist-lib/lib/logistics-events.functions.d.ts +255 -0
  34. package/dist-lib/lib/logistics-events.functions.d.ts.map +1 -1
  35. package/dist-lib/lib/logistics-strategy.functions.d.ts +1095 -75
  36. package/dist-lib/lib/logistics-strategy.functions.d.ts.map +1 -1
  37. package/dist-lib/lib/overdue-invoices.functions.d.ts +255 -0
  38. package/dist-lib/lib/overdue-invoices.functions.d.ts.map +1 -1
  39. package/dist-lib/lib/price-groups-local.functions.d.ts +1860 -75
  40. package/dist-lib/lib/price-groups-local.functions.d.ts.map +1 -1
  41. package/dist-lib/lib/price-groups.functions.d.ts +255 -0
  42. package/dist-lib/lib/price-groups.functions.d.ts.map +1 -1
  43. package/dist-lib/lib/twinfield-adopt.functions.d.ts +510 -0
  44. package/dist-lib/lib/twinfield-adopt.functions.d.ts.map +1 -1
  45. package/dist-lib/lib/twinfield-ledger.functions.d.ts +255 -0
  46. package/dist-lib/lib/twinfield-ledger.functions.d.ts.map +1 -1
  47. package/package.json +1 -1
@@ -5694,12 +5694,17 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
5694
5694
  attempts: number;
5695
5695
  connection_id: string;
5696
5696
  created_at: string;
5697
+ desired_available: boolean | null;
5697
5698
  gateway_attempt_id: string | null;
5698
5699
  id: string;
5699
5700
  last_error: string | null;
5701
+ locked_at: string | null;
5702
+ locked_by: string | null;
5703
+ next_attempt_at: string;
5700
5704
  number_of_pieces: number;
5701
5705
  sent_at: string | null;
5702
5706
  status: string;
5707
+ superseded_by: string | null;
5703
5708
  trade_item_id: string;
5704
5709
  updated_at: string;
5705
5710
  user_id: string;
@@ -5708,12 +5713,17 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
5708
5713
  attempts?: number;
5709
5714
  connection_id: string;
5710
5715
  created_at?: string;
5716
+ desired_available?: boolean | null;
5711
5717
  gateway_attempt_id?: string | null;
5712
5718
  id?: string;
5713
5719
  last_error?: string | null;
5720
+ locked_at?: string | null;
5721
+ locked_by?: string | null;
5722
+ next_attempt_at?: string;
5714
5723
  number_of_pieces?: number;
5715
5724
  sent_at?: string | null;
5716
5725
  status?: string;
5726
+ superseded_by?: string | null;
5717
5727
  trade_item_id: string;
5718
5728
  updated_at?: string;
5719
5729
  user_id: string;
@@ -5722,12 +5732,17 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
5722
5732
  attempts?: number;
5723
5733
  connection_id?: string;
5724
5734
  created_at?: string;
5735
+ desired_available?: boolean | null;
5725
5736
  gateway_attempt_id?: string | null;
5726
5737
  id?: string;
5727
5738
  last_error?: string | null;
5739
+ locked_at?: string | null;
5740
+ locked_by?: string | null;
5741
+ next_attempt_at?: string;
5728
5742
  number_of_pieces?: number;
5729
5743
  sent_at?: string | null;
5730
5744
  status?: string;
5745
+ superseded_by?: string | null;
5731
5746
  trade_item_id?: string;
5732
5747
  updated_at?: string;
5733
5748
  user_id?: string;
@@ -8476,6 +8491,69 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
8476
8491
  };
8477
8492
  Relationships: [];
8478
8493
  };
8494
+ logistics_floriday_pushes: {
8495
+ Row: {
8496
+ attempts: number;
8497
+ created_at: string;
8498
+ first_queued_at: string;
8499
+ fulfillment_order_id: string | null;
8500
+ id: string;
8501
+ last_error: string | null;
8502
+ last_error_at: string | null;
8503
+ last_sent_hash: string | null;
8504
+ locked_by: string | null;
8505
+ locked_until: string | null;
8506
+ next_attempt_at: string;
8507
+ order_ref: string;
8508
+ payload: import("../integrations/supabase/types").Json;
8509
+ payload_hash: string | null;
8510
+ revision: number;
8511
+ sent_at: string | null;
8512
+ status: string;
8513
+ updated_at: string;
8514
+ };
8515
+ Insert: {
8516
+ attempts?: number;
8517
+ created_at?: string;
8518
+ first_queued_at?: string;
8519
+ fulfillment_order_id?: string | null;
8520
+ id?: string;
8521
+ last_error?: string | null;
8522
+ last_error_at?: string | null;
8523
+ last_sent_hash?: string | null;
8524
+ locked_by?: string | null;
8525
+ locked_until?: string | null;
8526
+ next_attempt_at?: string;
8527
+ order_ref: string;
8528
+ payload?: import("../integrations/supabase/types").Json;
8529
+ payload_hash?: string | null;
8530
+ revision?: number;
8531
+ sent_at?: string | null;
8532
+ status?: string;
8533
+ updated_at?: string;
8534
+ };
8535
+ Update: {
8536
+ attempts?: number;
8537
+ created_at?: string;
8538
+ first_queued_at?: string;
8539
+ fulfillment_order_id?: string | null;
8540
+ id?: string;
8541
+ last_error?: string | null;
8542
+ last_error_at?: string | null;
8543
+ last_sent_hash?: string | null;
8544
+ locked_by?: string | null;
8545
+ locked_until?: string | null;
8546
+ next_attempt_at?: string;
8547
+ order_ref?: string;
8548
+ payload?: import("../integrations/supabase/types").Json;
8549
+ payload_hash?: string | null;
8550
+ revision?: number;
8551
+ sent_at?: string | null;
8552
+ status?: string;
8553
+ updated_at?: string;
8554
+ };
8555
+ Relationships: [];
8556
+ };
8479
8557
  logistics_formulas: {
8480
8558
  Row: {
8481
8559
  created_at: string;
@@ -9087,6 +9165,8 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
9087
9165
  };
9088
9166
  logistics_tasks: {
9089
9167
  Row: {
9168
+ attempt_log: import("../integrations/supabase/types").Json;
9169
+ attempts: number;
9090
9170
  buffer_ref: string | null;
9091
9171
  claimed_at: string | null;
9092
9172
  claimed_by: string | null;
@@ -9096,6 +9176,8 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
9096
9176
  due_at: string | null;
9097
9177
  error: string | null;
9098
9178
  id: string;
9179
+ last_error: string | null;
9180
+ next_attempt_at: string | null;
9099
9181
  order_ref: string;
9100
9182
  owner_module: string;
9101
9183
  payload: import("../integrations/supabase/types").Json;
@@ -9116,6 +9198,8 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
9116
9198
  user_id: string;
9117
9199
  };
9118
9200
  Insert: {
9201
+ attempt_log?: import("../integrations/supabase/types").Json;
9202
+ attempts?: number;
9119
9203
  buffer_ref?: string | null;
9120
9204
  claimed_at?: string | null;
9121
9205
  claimed_by?: string | null;
@@ -9125,6 +9209,8 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
9125
9209
  due_at?: string | null;
9126
9210
  error?: string | null;
9127
9211
  id?: string;
9212
+ last_error?: string | null;
9213
+ next_attempt_at?: string | null;
9128
9214
  order_ref: string;
9129
9215
  owner_module: string;
9130
9216
  payload?: import("../integrations/supabase/types").Json;
@@ -9145,6 +9231,8 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
9145
9231
  user_id?: string;
9146
9232
  };
9147
9233
  Update: {
9234
+ attempt_log?: import("../integrations/supabase/types").Json;
9235
+ attempts?: number;
9148
9236
  buffer_ref?: string | null;
9149
9237
  claimed_at?: string | null;
9150
9238
  claimed_by?: string | null;
@@ -9154,6 +9242,8 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
9154
9242
  due_at?: string | null;
9155
9243
  error?: string | null;
9156
9244
  id?: string;
9245
+ last_error?: string | null;
9246
+ next_attempt_at?: string | null;
9157
9247
  order_ref?: string;
9158
9248
  owner_module?: string;
9159
9249
  payload?: import("../integrations/supabase/types").Json;
@@ -18158,6 +18248,85 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
18158
18248
  };
18159
18249
  Returns: import("../integrations/supabase/types").Json;
18160
18250
  };
18251
+ claim_floriday_stock_queue: {
18252
+ Args: {
18253
+ p_limit?: number;
18254
+ p_worker?: string;
18255
+ };
18256
+ Returns: {
18257
+ attempts: number;
18258
+ connection_id: string;
18259
+ created_at: string;
18260
+ desired_available: boolean | null;
18261
+ gateway_attempt_id: string | null;
18262
+ id: string;
18263
+ last_error: string | null;
18264
+ locked_at: string | null;
18265
+ locked_by: string | null;
18266
+ next_attempt_at: string;
18267
+ number_of_pieces: number;
18268
+ sent_at: string | null;
18269
+ status: string;
18270
+ superseded_by: string | null;
18271
+ trade_item_id: string;
18272
+ updated_at: string;
18273
+ user_id: string;
18274
+ }[];
18275
+ SetofOptions: {
18276
+ from: "*";
18277
+ to: "floriday_continuous_stock_queue";
18278
+ isOneToOne: false;
18279
+ isSetofReturn: true;
18280
+ };
18281
+ };
18282
+ claim_logistics_tasks: {
18283
+ Args: {
18284
+ _limit?: number;
18285
+ _owner_module: string;
18286
+ _stale_minutes?: number;
18287
+ _task_type: string;
18288
+ _worker: string;
18289
+ };
18290
+ Returns: {
18291
+ attempt_log: import("../integrations/supabase/types").Json;
18292
+ attempts: number;
18293
+ buffer_ref: string | null;
18294
+ claimed_at: string | null;
18295
+ claimed_by: string | null;
18296
+ completed_at: string | null;
18297
+ created_at: string;
18298
+ depends_on: string[];
18299
+ due_at: string | null;
18300
+ error: string | null;
18301
+ id: string;
18302
+ last_error: string | null;
18303
+ next_attempt_at: string | null;
18304
+ order_ref: string;
18305
+ owner_module: string;
18306
+ payload: import("../integrations/supabase/types").Json;
18307
+ plan_run_id: string | null;
18308
+ planned_end: string | null;
18309
+ planned_start: string | null;
18310
+ priority: number;
18311
+ result: import("../integrations/supabase/types").Json | null;
18312
+ rule_config_id: string | null;
18313
+ rule_version: number | null;
18314
+ sequence: number;
18315
+ shadow: boolean;
18316
+ started_at: string | null;
18317
+ status: string;
18318
+ strategy_id: string | null;
18319
+ task_type: string;
18320
+ updated_at: string;
18321
+ user_id: string;
18322
+ }[];
18323
+ SetofOptions: {
18324
+ from: "*";
18325
+ to: "logistics_tasks";
18326
+ isOneToOne: false;
18327
+ isSetofReturn: true;
18328
+ };
18329
+ };
18161
18330
  claim_print_jobs: {
18162
18331
  Args: {
18163
18332
  _agent_id: string;
@@ -18222,10 +18391,24 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
18222
18391
  isSetofReturn: true;
18223
18392
  };
18224
18393
  };
18394
+ cleanup_floriday_stock_queue: {
18395
+ Args: never;
18396
+ Returns: undefined;
18397
+ };
18225
18398
  cleanup_old_bookings: {
18226
18399
  Args: never;
18227
18400
  Returns: undefined;
18228
18401
  };
18402
+ complete_floriday_stock_queue: {
18403
+ Args: {
18404
+ p_attempt_id?: string;
18405
+ p_error?: string;
18406
+ p_id: string;
18407
+ p_ok: boolean;
18408
+ p_permanent?: boolean;
18409
+ };
18410
+ Returns: undefined;
18411
+ };
18229
18412
  consume_bom_for_production: {
18230
18413
  Args: {
18231
18414
  p_connection_id: string;
@@ -18917,6 +19100,8 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
18917
19100
  p_worker?: string;
18918
19101
  };
18919
19102
  Returns: {
19103
+ attempt_log: import("../integrations/supabase/types").Json;
19104
+ attempts: number;
18920
19105
  buffer_ref: string | null;
18921
19106
  claimed_at: string | null;
18922
19107
  claimed_by: string | null;
@@ -18926,6 +19111,8 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
18926
19111
  due_at: string | null;
18927
19112
  error: string | null;
18928
19113
  id: string;
19114
+ last_error: string | null;
19115
+ next_attempt_at: string | null;
18929
19116
  order_ref: string;
18930
19117
  owner_module: string;
18931
19118
  payload: import("../integrations/supabase/types").Json;
@@ -18958,6 +19145,8 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
18958
19145
  p_worker?: string;
18959
19146
  };
18960
19147
  Returns: {
19148
+ attempt_log: import("../integrations/supabase/types").Json;
19149
+ attempts: number;
18961
19150
  buffer_ref: string | null;
18962
19151
  claimed_at: string | null;
18963
19152
  claimed_by: string | null;
@@ -18967,6 +19156,8 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
18967
19156
  due_at: string | null;
18968
19157
  error: string | null;
18969
19158
  id: string;
19159
+ last_error: string | null;
19160
+ next_attempt_at: string | null;
18970
19161
  order_ref: string;
18971
19162
  owner_module: string;
18972
19163
  payload: import("../integrations/supabase/types").Json;
@@ -18999,6 +19190,8 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
18999
19190
  p_task_id: string;
19000
19191
  };
19001
19192
  Returns: {
19193
+ attempt_log: import("../integrations/supabase/types").Json;
19194
+ attempts: number;
19002
19195
  buffer_ref: string | null;
19003
19196
  claimed_at: string | null;
19004
19197
  claimed_by: string | null;
@@ -19008,6 +19201,8 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
19008
19201
  due_at: string | null;
19009
19202
  error: string | null;
19010
19203
  id: string;
19204
+ last_error: string | null;
19205
+ next_attempt_at: string | null;
19011
19206
  order_ref: string;
19012
19207
  owner_module: string;
19013
19208
  payload: import("../integrations/supabase/types").Json;
@@ -19089,6 +19284,8 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
19089
19284
  p_task_id: string;
19090
19285
  };
19091
19286
  Returns: {
19287
+ attempt_log: import("../integrations/supabase/types").Json;
19288
+ attempts: number;
19092
19289
  buffer_ref: string | null;
19093
19290
  claimed_at: string | null;
19094
19291
  claimed_by: string | null;
@@ -19098,6 +19295,8 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
19098
19295
  due_at: string | null;
19099
19296
  error: string | null;
19100
19297
  id: string;
19298
+ last_error: string | null;
19299
+ next_attempt_at: string | null;
19101
19300
  order_ref: string;
19102
19301
  owner_module: string;
19103
19302
  payload: import("../integrations/supabase/types").Json;
@@ -19124,6 +19323,51 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
19124
19323
  isSetofReturn: false;
19125
19324
  };
19126
19325
  };
19326
+ logistics_floriday_claim_pushes: {
19327
+ Args: {
19328
+ _lease_seconds?: number;
19329
+ _limit?: number;
19330
+ _worker?: string;
19331
+ };
19332
+ Returns: {
19333
+ attempts: number;
19334
+ fulfillment_order_id: string;
19335
+ id: string;
19336
+ last_sent_hash: string;
19337
+ order_ref: string;
19338
+ payload: import("../integrations/supabase/types").Json;
19339
+ payload_hash: string;
19340
+ revision: number;
19341
+ }[];
19342
+ };
19343
+ logistics_floriday_finish_push: {
19344
+ Args: {
19345
+ _error?: string;
19346
+ _fulfillment_order_id?: string;
19347
+ _id: string;
19348
+ _max_age_hours?: number;
19349
+ _max_attempts?: number;
19350
+ _ok: boolean;
19351
+ _permanent?: boolean;
19352
+ _revision: number;
19353
+ _sent_hash?: string;
19354
+ };
19355
+ Returns: string;
19356
+ };
19357
+ logistics_floriday_prune_pushes: {
19358
+ Args: {
19359
+ _days?: number;
19360
+ };
19361
+ Returns: number;
19362
+ };
19363
+ logistics_floriday_queue_push: {
19364
+ Args: {
19365
+ _order_ref: string;
19366
+ _payload?: import("../integrations/supabase/types").Json;
19367
+ _payload_hash?: string;
19368
+ };
19369
+ Returns: string;
19370
+ };
19127
19371
  logistics_live_carriers: {
19128
19372
  Args: {
19129
19373
  p_order_ref: string;
@@ -19851,6 +20095,10 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
19851
20095
  Args: never;
19852
20096
  Returns: undefined;
19853
20097
  };
20098
+ run_logistics_tasks_dispatch: {
20099
+ Args: never;
20100
+ Returns: undefined;
20101
+ };
19854
20102
  run_twinfield_queue_tick: {
19855
20103
  Args: never;
19856
20104
  Returns: undefined;
@@ -20091,6 +20339,13 @@ export declare const getCustomerNote: import("@tanstack/start-client-core").Opti
20091
20339
  };
20092
20340
  Returns: number;
20093
20341
  };
20342
+ schedule_floriday_stock_queue_process: {
20343
+ Args: {
20344
+ p_apikey: string;
20345
+ p_url: string;
20346
+ };
20347
+ Returns: number;
20348
+ };
20094
20349
  schedule_floriday_token_refresh: {
20095
20350
  Args: {
20096
20351
  p_apikey: string;
@@ -26002,12 +26257,17 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
26002
26257
  attempts: number;
26003
26258
  connection_id: string;
26004
26259
  created_at: string;
26260
+ desired_available: boolean | null;
26005
26261
  gateway_attempt_id: string | null;
26006
26262
  id: string;
26007
26263
  last_error: string | null;
26264
+ locked_at: string | null;
26265
+ locked_by: string | null;
26266
+ next_attempt_at: string;
26008
26267
  number_of_pieces: number;
26009
26268
  sent_at: string | null;
26010
26269
  status: string;
26270
+ superseded_by: string | null;
26011
26271
  trade_item_id: string;
26012
26272
  updated_at: string;
26013
26273
  user_id: string;
@@ -26016,12 +26276,17 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
26016
26276
  attempts?: number;
26017
26277
  connection_id: string;
26018
26278
  created_at?: string;
26279
+ desired_available?: boolean | null;
26019
26280
  gateway_attempt_id?: string | null;
26020
26281
  id?: string;
26021
26282
  last_error?: string | null;
26283
+ locked_at?: string | null;
26284
+ locked_by?: string | null;
26285
+ next_attempt_at?: string;
26022
26286
  number_of_pieces?: number;
26023
26287
  sent_at?: string | null;
26024
26288
  status?: string;
26289
+ superseded_by?: string | null;
26025
26290
  trade_item_id: string;
26026
26291
  updated_at?: string;
26027
26292
  user_id: string;
@@ -26030,12 +26295,17 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
26030
26295
  attempts?: number;
26031
26296
  connection_id?: string;
26032
26297
  created_at?: string;
26298
+ desired_available?: boolean | null;
26033
26299
  gateway_attempt_id?: string | null;
26034
26300
  id?: string;
26035
26301
  last_error?: string | null;
26302
+ locked_at?: string | null;
26303
+ locked_by?: string | null;
26304
+ next_attempt_at?: string;
26036
26305
  number_of_pieces?: number;
26037
26306
  sent_at?: string | null;
26038
26307
  status?: string;
26308
+ superseded_by?: string | null;
26039
26309
  trade_item_id?: string;
26040
26310
  updated_at?: string;
26041
26311
  user_id?: string;
@@ -28784,6 +29054,69 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
28784
29054
  };
28785
29055
  Relationships: [];
28786
29056
  };
29057
+ logistics_floriday_pushes: {
29058
+ Row: {
29059
+ attempts: number;
29060
+ created_at: string;
29061
+ first_queued_at: string;
29062
+ fulfillment_order_id: string | null;
29063
+ id: string;
29064
+ last_error: string | null;
29065
+ last_error_at: string | null;
29066
+ last_sent_hash: string | null;
29067
+ locked_by: string | null;
29068
+ locked_until: string | null;
29069
+ next_attempt_at: string;
29070
+ order_ref: string;
29071
+ payload: import("../integrations/supabase/types").Json;
29072
+ payload_hash: string | null;
29073
+ revision: number;
29074
+ sent_at: string | null;
29075
+ status: string;
29076
+ updated_at: string;
29077
+ };
29078
+ Insert: {
29079
+ attempts?: number;
29080
+ created_at?: string;
29081
+ first_queued_at?: string;
29082
+ fulfillment_order_id?: string | null;
29083
+ id?: string;
29084
+ last_error?: string | null;
29085
+ last_error_at?: string | null;
29086
+ last_sent_hash?: string | null;
29087
+ locked_by?: string | null;
29088
+ locked_until?: string | null;
29089
+ next_attempt_at?: string;
29090
+ order_ref: string;
29091
+ payload?: import("../integrations/supabase/types").Json;
29092
+ payload_hash?: string | null;
29093
+ revision?: number;
29094
+ sent_at?: string | null;
29095
+ status?: string;
29096
+ updated_at?: string;
29097
+ };
29098
+ Update: {
29099
+ attempts?: number;
29100
+ created_at?: string;
29101
+ first_queued_at?: string;
29102
+ fulfillment_order_id?: string | null;
29103
+ id?: string;
29104
+ last_error?: string | null;
29105
+ last_error_at?: string | null;
29106
+ last_sent_hash?: string | null;
29107
+ locked_by?: string | null;
29108
+ locked_until?: string | null;
29109
+ next_attempt_at?: string;
29110
+ order_ref?: string;
29111
+ payload?: import("../integrations/supabase/types").Json;
29112
+ payload_hash?: string | null;
29113
+ revision?: number;
29114
+ sent_at?: string | null;
29115
+ status?: string;
29116
+ updated_at?: string;
29117
+ };
29118
+ Relationships: [];
29119
+ };
28787
29120
  logistics_formulas: {
28788
29121
  Row: {
28789
29122
  created_at: string;
@@ -29395,6 +29728,8 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
29395
29728
  };
29396
29729
  logistics_tasks: {
29397
29730
  Row: {
29731
+ attempt_log: import("../integrations/supabase/types").Json;
29732
+ attempts: number;
29398
29733
  buffer_ref: string | null;
29399
29734
  claimed_at: string | null;
29400
29735
  claimed_by: string | null;
@@ -29404,6 +29739,8 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
29404
29739
  due_at: string | null;
29405
29740
  error: string | null;
29406
29741
  id: string;
29742
+ last_error: string | null;
29743
+ next_attempt_at: string | null;
29407
29744
  order_ref: string;
29408
29745
  owner_module: string;
29409
29746
  payload: import("../integrations/supabase/types").Json;
@@ -29424,6 +29761,8 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
29424
29761
  user_id: string;
29425
29762
  };
29426
29763
  Insert: {
29764
+ attempt_log?: import("../integrations/supabase/types").Json;
29765
+ attempts?: number;
29427
29766
  buffer_ref?: string | null;
29428
29767
  claimed_at?: string | null;
29429
29768
  claimed_by?: string | null;
@@ -29433,6 +29772,8 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
29433
29772
  due_at?: string | null;
29434
29773
  error?: string | null;
29435
29774
  id?: string;
29775
+ last_error?: string | null;
29776
+ next_attempt_at?: string | null;
29436
29777
  order_ref: string;
29437
29778
  owner_module: string;
29438
29779
  payload?: import("../integrations/supabase/types").Json;
@@ -29453,6 +29794,8 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
29453
29794
  user_id?: string;
29454
29795
  };
29455
29796
  Update: {
29797
+ attempt_log?: import("../integrations/supabase/types").Json;
29798
+ attempts?: number;
29456
29799
  buffer_ref?: string | null;
29457
29800
  claimed_at?: string | null;
29458
29801
  claimed_by?: string | null;
@@ -29462,6 +29805,8 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
29462
29805
  due_at?: string | null;
29463
29806
  error?: string | null;
29464
29807
  id?: string;
29808
+ last_error?: string | null;
29809
+ next_attempt_at?: string | null;
29465
29810
  order_ref?: string;
29466
29811
  owner_module?: string;
29467
29812
  payload?: import("../integrations/supabase/types").Json;
@@ -38466,6 +38811,85 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
38466
38811
  };
38467
38812
  Returns: import("../integrations/supabase/types").Json;
38468
38813
  };
38814
+ claim_floriday_stock_queue: {
38815
+ Args: {
38816
+ p_limit?: number;
38817
+ p_worker?: string;
38818
+ };
38819
+ Returns: {
38820
+ attempts: number;
38821
+ connection_id: string;
38822
+ created_at: string;
38823
+ desired_available: boolean | null;
38824
+ gateway_attempt_id: string | null;
38825
+ id: string;
38826
+ last_error: string | null;
38827
+ locked_at: string | null;
38828
+ locked_by: string | null;
38829
+ next_attempt_at: string;
38830
+ number_of_pieces: number;
38831
+ sent_at: string | null;
38832
+ status: string;
38833
+ superseded_by: string | null;
38834
+ trade_item_id: string;
38835
+ updated_at: string;
38836
+ user_id: string;
38837
+ }[];
38838
+ SetofOptions: {
38839
+ from: "*";
38840
+ to: "floriday_continuous_stock_queue";
38841
+ isOneToOne: false;
38842
+ isSetofReturn: true;
38843
+ };
38844
+ };
38845
+ claim_logistics_tasks: {
38846
+ Args: {
38847
+ _limit?: number;
38848
+ _owner_module: string;
38849
+ _stale_minutes?: number;
38850
+ _task_type: string;
38851
+ _worker: string;
38852
+ };
38853
+ Returns: {
38854
+ attempt_log: import("../integrations/supabase/types").Json;
38855
+ attempts: number;
38856
+ buffer_ref: string | null;
38857
+ claimed_at: string | null;
38858
+ claimed_by: string | null;
38859
+ completed_at: string | null;
38860
+ created_at: string;
38861
+ depends_on: string[];
38862
+ due_at: string | null;
38863
+ error: string | null;
38864
+ id: string;
38865
+ last_error: string | null;
38866
+ next_attempt_at: string | null;
38867
+ order_ref: string;
38868
+ owner_module: string;
38869
+ payload: import("../integrations/supabase/types").Json;
38870
+ plan_run_id: string | null;
38871
+ planned_end: string | null;
38872
+ planned_start: string | null;
38873
+ priority: number;
38874
+ result: import("../integrations/supabase/types").Json | null;
38875
+ rule_config_id: string | null;
38876
+ rule_version: number | null;
38877
+ sequence: number;
38878
+ shadow: boolean;
38879
+ started_at: string | null;
38880
+ status: string;
38881
+ strategy_id: string | null;
38882
+ task_type: string;
38883
+ updated_at: string;
38884
+ user_id: string;
38885
+ }[];
38886
+ SetofOptions: {
38887
+ from: "*";
38888
+ to: "logistics_tasks";
38889
+ isOneToOne: false;
38890
+ isSetofReturn: true;
38891
+ };
38892
+ };
38469
38893
  claim_print_jobs: {
38470
38894
  Args: {
38471
38895
  _agent_id: string;
@@ -38530,10 +38954,24 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
38530
38954
  isSetofReturn: true;
38531
38955
  };
38532
38956
  };
38957
+ cleanup_floriday_stock_queue: {
38958
+ Args: never;
38959
+ Returns: undefined;
38960
+ };
38533
38961
  cleanup_old_bookings: {
38534
38962
  Args: never;
38535
38963
  Returns: undefined;
38536
38964
  };
38965
+ complete_floriday_stock_queue: {
38966
+ Args: {
38967
+ p_attempt_id?: string;
38968
+ p_error?: string;
38969
+ p_id: string;
38970
+ p_ok: boolean;
38971
+ p_permanent?: boolean;
38972
+ };
38973
+ Returns: undefined;
38974
+ };
38537
38975
  consume_bom_for_production: {
38538
38976
  Args: {
38539
38977
  p_connection_id: string;
@@ -39225,6 +39663,8 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
39225
39663
  p_worker?: string;
39226
39664
  };
39227
39665
  Returns: {
39666
+ attempt_log: import("../integrations/supabase/types").Json;
39667
+ attempts: number;
39228
39668
  buffer_ref: string | null;
39229
39669
  claimed_at: string | null;
39230
39670
  claimed_by: string | null;
@@ -39234,6 +39674,8 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
39234
39674
  due_at: string | null;
39235
39675
  error: string | null;
39236
39676
  id: string;
39677
+ last_error: string | null;
39678
+ next_attempt_at: string | null;
39237
39679
  order_ref: string;
39238
39680
  owner_module: string;
39239
39681
  payload: import("../integrations/supabase/types").Json;
@@ -39266,6 +39708,8 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
39266
39708
  p_worker?: string;
39267
39709
  };
39268
39710
  Returns: {
39711
+ attempt_log: import("../integrations/supabase/types").Json;
39712
+ attempts: number;
39269
39713
  buffer_ref: string | null;
39270
39714
  claimed_at: string | null;
39271
39715
  claimed_by: string | null;
@@ -39275,6 +39719,8 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
39275
39719
  due_at: string | null;
39276
39720
  error: string | null;
39277
39721
  id: string;
39722
+ last_error: string | null;
39723
+ next_attempt_at: string | null;
39278
39724
  order_ref: string;
39279
39725
  owner_module: string;
39280
39726
  payload: import("../integrations/supabase/types").Json;
@@ -39307,6 +39753,8 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
39307
39753
  p_task_id: string;
39308
39754
  };
39309
39755
  Returns: {
39756
+ attempt_log: import("../integrations/supabase/types").Json;
39757
+ attempts: number;
39310
39758
  buffer_ref: string | null;
39311
39759
  claimed_at: string | null;
39312
39760
  claimed_by: string | null;
@@ -39316,6 +39764,8 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
39316
39764
  due_at: string | null;
39317
39765
  error: string | null;
39318
39766
  id: string;
39767
+ last_error: string | null;
39768
+ next_attempt_at: string | null;
39319
39769
  order_ref: string;
39320
39770
  owner_module: string;
39321
39771
  payload: import("../integrations/supabase/types").Json;
@@ -39397,6 +39847,8 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
39397
39847
  p_task_id: string;
39398
39848
  };
39399
39849
  Returns: {
39850
+ attempt_log: import("../integrations/supabase/types").Json;
39851
+ attempts: number;
39400
39852
  buffer_ref: string | null;
39401
39853
  claimed_at: string | null;
39402
39854
  claimed_by: string | null;
@@ -39406,6 +39858,8 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
39406
39858
  due_at: string | null;
39407
39859
  error: string | null;
39408
39860
  id: string;
39861
+ last_error: string | null;
39862
+ next_attempt_at: string | null;
39409
39863
  order_ref: string;
39410
39864
  owner_module: string;
39411
39865
  payload: import("../integrations/supabase/types").Json;
@@ -39432,6 +39886,51 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
39432
39886
  isSetofReturn: false;
39433
39887
  };
39434
39888
  };
39889
+ logistics_floriday_claim_pushes: {
39890
+ Args: {
39891
+ _lease_seconds?: number;
39892
+ _limit?: number;
39893
+ _worker?: string;
39894
+ };
39895
+ Returns: {
39896
+ attempts: number;
39897
+ fulfillment_order_id: string;
39898
+ id: string;
39899
+ last_sent_hash: string;
39900
+ order_ref: string;
39901
+ payload: import("../integrations/supabase/types").Json;
39902
+ payload_hash: string;
39903
+ revision: number;
39904
+ }[];
39905
+ };
39906
+ logistics_floriday_finish_push: {
39907
+ Args: {
39908
+ _error?: string;
39909
+ _fulfillment_order_id?: string;
39910
+ _id: string;
39911
+ _max_age_hours?: number;
39912
+ _max_attempts?: number;
39913
+ _ok: boolean;
39914
+ _permanent?: boolean;
39915
+ _revision: number;
39916
+ _sent_hash?: string;
39917
+ };
39918
+ Returns: string;
39919
+ };
39920
+ logistics_floriday_prune_pushes: {
39921
+ Args: {
39922
+ _days?: number;
39923
+ };
39924
+ Returns: number;
39925
+ };
39926
+ logistics_floriday_queue_push: {
39927
+ Args: {
39928
+ _order_ref: string;
39929
+ _payload?: import("../integrations/supabase/types").Json;
39930
+ _payload_hash?: string;
39931
+ };
39932
+ Returns: string;
39933
+ };
39435
39934
  logistics_live_carriers: {
39436
39935
  Args: {
39437
39936
  p_order_ref: string;
@@ -40159,6 +40658,10 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
40159
40658
  Args: never;
40160
40659
  Returns: undefined;
40161
40660
  };
40661
+ run_logistics_tasks_dispatch: {
40662
+ Args: never;
40663
+ Returns: undefined;
40664
+ };
40162
40665
  run_twinfield_queue_tick: {
40163
40666
  Args: never;
40164
40667
  Returns: undefined;
@@ -40399,6 +40902,13 @@ export declare const upsertCustomerNote: import("@tanstack/start-client-core").O
40399
40902
  };
40400
40903
  Returns: number;
40401
40904
  };
40905
+ schedule_floriday_stock_queue_process: {
40906
+ Args: {
40907
+ p_apikey: string;
40908
+ p_url: string;
40909
+ };
40910
+ Returns: number;
40911
+ };
40402
40912
  schedule_floriday_token_refresh: {
40403
40913
  Args: {
40404
40914
  p_apikey: string;