@pgflow/core 0.0.0-array-map-steps-cd94242a-20251008042921 → 0.0.0-compatible-flow-86a8ccf0-20260319202546

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.
@@ -123,9 +123,12 @@ export type Database = {
123
123
  failed_at: string | null;
124
124
  flow_slug: string;
125
125
  initial_tasks: number | null;
126
+ output: Json | null;
126
127
  remaining_deps: number;
127
128
  remaining_tasks: number | null;
128
129
  run_id: string;
130
+ skip_reason: string | null;
131
+ skipped_at: string | null;
129
132
  started_at: string | null;
130
133
  status: string;
131
134
  step_slug: string;
@@ -137,9 +140,12 @@ export type Database = {
137
140
  failed_at?: string | null;
138
141
  flow_slug: string;
139
142
  initial_tasks?: number | null;
143
+ output?: Json | null;
140
144
  remaining_deps?: number;
141
145
  remaining_tasks?: number | null;
142
146
  run_id: string;
147
+ skip_reason?: string | null;
148
+ skipped_at?: string | null;
143
149
  started_at?: string | null;
144
150
  status?: string;
145
151
  step_slug: string;
@@ -151,9 +157,12 @@ export type Database = {
151
157
  failed_at?: string | null;
152
158
  flow_slug?: string;
153
159
  initial_tasks?: number | null;
160
+ output?: Json | null;
154
161
  remaining_deps?: number;
155
162
  remaining_tasks?: number | null;
156
163
  run_id?: string;
164
+ skip_reason?: string | null;
165
+ skipped_at?: string | null;
157
166
  started_at?: string | null;
158
167
  status?: string;
159
168
  step_slug?: string;
@@ -189,10 +198,13 @@ export type Database = {
189
198
  error_message: string | null;
190
199
  failed_at: string | null;
191
200
  flow_slug: string;
201
+ last_requeued_at: string | null;
192
202
  last_worker_id: string | null;
193
203
  message_id: number | null;
194
204
  output: Json | null;
205
+ permanently_stalled_at: string | null;
195
206
  queued_at: string;
207
+ requeued_count: number;
196
208
  run_id: string;
197
209
  started_at: string | null;
198
210
  status: string;
@@ -205,10 +217,13 @@ export type Database = {
205
217
  error_message?: string | null;
206
218
  failed_at?: string | null;
207
219
  flow_slug: string;
220
+ last_requeued_at?: string | null;
208
221
  last_worker_id?: string | null;
209
222
  message_id?: number | null;
210
223
  output?: Json | null;
224
+ permanently_stalled_at?: string | null;
211
225
  queued_at?: string;
226
+ requeued_count?: number;
212
227
  run_id: string;
213
228
  started_at?: string | null;
214
229
  status?: string;
@@ -221,10 +236,13 @@ export type Database = {
221
236
  error_message?: string | null;
222
237
  failed_at?: string | null;
223
238
  flow_slug?: string;
239
+ last_requeued_at?: string | null;
224
240
  last_worker_id?: string | null;
225
241
  message_id?: number | null;
226
242
  output?: Json | null;
243
+ permanently_stalled_at?: string | null;
227
244
  queued_at?: string;
245
+ requeued_count?: number;
228
246
  run_id?: string;
229
247
  started_at?: string | null;
230
248
  status?: string;
@@ -267,37 +285,49 @@ export type Database = {
267
285
  created_at: string;
268
286
  deps_count: number;
269
287
  flow_slug: string;
288
+ forbidden_input_pattern: Json | null;
270
289
  opt_base_delay: number | null;
271
290
  opt_max_attempts: number | null;
272
291
  opt_start_delay: number | null;
273
292
  opt_timeout: number | null;
293
+ required_input_pattern: Json | null;
274
294
  step_index: number;
275
295
  step_slug: string;
276
296
  step_type: string;
297
+ when_exhausted: string;
298
+ when_unmet: string;
277
299
  };
278
300
  Insert: {
279
301
  created_at?: string;
280
302
  deps_count?: number;
281
303
  flow_slug: string;
304
+ forbidden_input_pattern?: Json | null;
282
305
  opt_base_delay?: number | null;
283
306
  opt_max_attempts?: number | null;
284
307
  opt_start_delay?: number | null;
285
308
  opt_timeout?: number | null;
309
+ required_input_pattern?: Json | null;
286
310
  step_index?: number;
287
311
  step_slug: string;
288
312
  step_type?: string;
313
+ when_exhausted?: string;
314
+ when_unmet?: string;
289
315
  };
290
316
  Update: {
291
317
  created_at?: string;
292
318
  deps_count?: number;
293
319
  flow_slug?: string;
320
+ forbidden_input_pattern?: Json | null;
294
321
  opt_base_delay?: number | null;
295
322
  opt_max_attempts?: number | null;
296
323
  opt_start_delay?: number | null;
297
324
  opt_timeout?: number | null;
325
+ required_input_pattern?: Json | null;
298
326
  step_index?: number;
299
327
  step_slug?: string;
300
328
  step_type?: string;
329
+ when_exhausted?: string;
330
+ when_unmet?: string;
301
331
  };
302
332
  Relationships: [
303
333
  {
@@ -309,6 +339,33 @@ export type Database = {
309
339
  }
310
340
  ];
311
341
  };
342
+ worker_functions: {
343
+ Row: {
344
+ created_at: string;
345
+ debounce: unknown;
346
+ enabled: boolean;
347
+ function_name: string;
348
+ last_invoked_at: string | null;
349
+ updated_at: string;
350
+ };
351
+ Insert: {
352
+ created_at?: string;
353
+ debounce?: unknown;
354
+ enabled?: boolean;
355
+ function_name: string;
356
+ last_invoked_at?: string | null;
357
+ updated_at?: string;
358
+ };
359
+ Update: {
360
+ created_at?: string;
361
+ debounce?: unknown;
362
+ enabled?: boolean;
363
+ function_name?: string;
364
+ last_invoked_at?: string | null;
365
+ updated_at?: string;
366
+ };
367
+ Relationships: [];
368
+ };
312
369
  workers: {
313
370
  Row: {
314
371
  deprecated_at: string | null;
@@ -316,6 +373,7 @@ export type Database = {
316
373
  last_heartbeat_at: string;
317
374
  queue_name: string;
318
375
  started_at: string;
376
+ stopped_at: string | null;
319
377
  worker_id: string;
320
378
  };
321
379
  Insert: {
@@ -324,6 +382,7 @@ export type Database = {
324
382
  last_heartbeat_at?: string;
325
383
  queue_name: string;
326
384
  started_at?: string;
385
+ stopped_at?: string | null;
327
386
  worker_id: string;
328
387
  };
329
388
  Update: {
@@ -332,6 +391,7 @@ export type Database = {
332
391
  last_heartbeat_at?: string;
333
392
  queue_name?: string;
334
393
  started_at?: string;
394
+ stopped_at?: string | null;
335
395
  worker_id?: string;
336
396
  };
337
397
  Relationships: [];
@@ -341,34 +401,84 @@ export type Database = {
341
401
  [_ in never]: never;
342
402
  };
343
403
  Functions: {
344
- add_step: {
404
+ _archive_task_message: {
345
405
  Args: {
346
- flow_slug: string;
406
+ p_run_id: string;
407
+ p_step_slug: string;
408
+ p_task_index: number;
409
+ };
410
+ Returns: undefined;
411
+ };
412
+ _cascade_force_skip_steps: {
413
+ Args: {
414
+ run_id: string;
415
+ skip_reason: string;
347
416
  step_slug: string;
417
+ };
418
+ Returns: number;
419
+ };
420
+ _compare_flow_shapes: {
421
+ Args: {
422
+ p_db: Json;
423
+ p_local: Json;
424
+ };
425
+ Returns: string[];
426
+ };
427
+ _create_flow_from_shape: {
428
+ Args: {
429
+ p_flow_slug: string;
430
+ p_shape: Json;
431
+ };
432
+ Returns: undefined;
433
+ };
434
+ _get_flow_shape: {
435
+ Args: {
436
+ p_flow_slug: string;
437
+ };
438
+ Returns: Json;
439
+ };
440
+ add_step: {
441
+ Args: {
442
+ base_delay?: number;
348
443
  deps_slugs?: string[];
444
+ flow_slug: string;
445
+ forbidden_input_pattern?: Json;
349
446
  max_attempts?: number;
350
- base_delay?: number;
351
- timeout?: number;
447
+ required_input_pattern?: Json;
352
448
  start_delay?: number;
449
+ step_slug: string;
353
450
  step_type?: string;
451
+ timeout?: number;
452
+ when_exhausted?: string;
453
+ when_unmet?: string;
354
454
  };
355
455
  Returns: {
356
456
  created_at: string;
357
457
  deps_count: number;
358
458
  flow_slug: string;
459
+ forbidden_input_pattern: Json | null;
359
460
  opt_base_delay: number | null;
360
461
  opt_max_attempts: number | null;
361
462
  opt_start_delay: number | null;
362
463
  opt_timeout: number | null;
464
+ required_input_pattern: Json | null;
363
465
  step_index: number;
364
466
  step_slug: string;
365
467
  step_type: string;
468
+ when_exhausted: string;
469
+ when_unmet: string;
470
+ };
471
+ SetofOptions: {
472
+ from: "*";
473
+ to: "steps";
474
+ isOneToOne: true;
475
+ isSetofReturn: false;
366
476
  };
367
477
  };
368
478
  calculate_retry_delay: {
369
479
  Args: {
370
- base_delay: number;
371
480
  attempts_count: number;
481
+ base_delay: number;
372
482
  };
373
483
  Returns: number;
374
484
  };
@@ -378,12 +488,26 @@ export type Database = {
378
488
  };
379
489
  Returns: number;
380
490
  };
491
+ cascade_resolve_conditions: {
492
+ Args: {
493
+ run_id: string;
494
+ };
495
+ Returns: boolean;
496
+ };
497
+ cleanup_ensure_workers_logs: {
498
+ Args: {
499
+ retention_hours?: number;
500
+ };
501
+ Returns: {
502
+ cron_deleted: number;
503
+ }[];
504
+ };
381
505
  complete_task: {
382
506
  Args: {
507
+ output: Json;
383
508
  run_id: string;
384
509
  step_slug: string;
385
510
  task_index: number;
386
- output: Json;
387
511
  };
388
512
  Returns: {
389
513
  attempts_count: number;
@@ -391,22 +515,31 @@ export type Database = {
391
515
  error_message: string | null;
392
516
  failed_at: string | null;
393
517
  flow_slug: string;
518
+ last_requeued_at: string | null;
394
519
  last_worker_id: string | null;
395
520
  message_id: number | null;
396
521
  output: Json | null;
522
+ permanently_stalled_at: string | null;
397
523
  queued_at: string;
524
+ requeued_count: number;
398
525
  run_id: string;
399
526
  started_at: string | null;
400
527
  status: string;
401
528
  step_slug: string;
402
529
  task_index: number;
403
530
  }[];
531
+ SetofOptions: {
532
+ from: "*";
533
+ to: "step_tasks";
534
+ isOneToOne: false;
535
+ isSetofReturn: true;
536
+ };
404
537
  };
405
538
  create_flow: {
406
539
  Args: {
540
+ base_delay?: number;
407
541
  flow_slug: string;
408
542
  max_attempts?: number;
409
- base_delay?: number;
410
543
  timeout?: number;
411
544
  };
412
545
  Returns: {
@@ -416,13 +549,41 @@ export type Database = {
416
549
  opt_max_attempts: number;
417
550
  opt_timeout: number;
418
551
  };
552
+ SetofOptions: {
553
+ from: "*";
554
+ to: "flows";
555
+ isOneToOne: true;
556
+ isSetofReturn: false;
557
+ };
558
+ };
559
+ delete_flow_and_data: {
560
+ Args: {
561
+ p_flow_slug: string;
562
+ };
563
+ Returns: undefined;
564
+ };
565
+ ensure_flow_compiled: {
566
+ Args: {
567
+ allow_data_loss?: boolean;
568
+ flow_slug: string;
569
+ shape: Json;
570
+ };
571
+ Returns: Json;
572
+ };
573
+ ensure_workers: {
574
+ Args: never;
575
+ Returns: {
576
+ function_name: string;
577
+ invoked: boolean;
578
+ request_id: number;
579
+ }[];
419
580
  };
420
581
  fail_task: {
421
582
  Args: {
583
+ error_message: string;
422
584
  run_id: string;
423
585
  step_slug: string;
424
586
  task_index: number;
425
- error_message: string;
426
587
  };
427
588
  Returns: {
428
589
  attempts_count: number;
@@ -430,16 +591,25 @@ export type Database = {
430
591
  error_message: string | null;
431
592
  failed_at: string | null;
432
593
  flow_slug: string;
594
+ last_requeued_at: string | null;
433
595
  last_worker_id: string | null;
434
596
  message_id: number | null;
435
597
  output: Json | null;
598
+ permanently_stalled_at: string | null;
436
599
  queued_at: string;
600
+ requeued_count: number;
437
601
  run_id: string;
438
602
  started_at: string | null;
439
603
  status: string;
440
604
  step_slug: string;
441
605
  task_index: number;
442
606
  }[];
607
+ SetofOptions: {
608
+ from: "*";
609
+ to: "step_tasks";
610
+ isOneToOne: false;
611
+ isSetofReturn: true;
612
+ };
443
613
  };
444
614
  get_run_with_states: {
445
615
  Args: {
@@ -447,12 +617,22 @@ export type Database = {
447
617
  };
448
618
  Returns: Json;
449
619
  };
620
+ is_local: {
621
+ Args: never;
622
+ Returns: boolean;
623
+ };
450
624
  is_valid_slug: {
451
625
  Args: {
452
626
  slug: string;
453
627
  };
454
628
  Returns: boolean;
455
629
  };
630
+ mark_worker_stopped: {
631
+ Args: {
632
+ worker_id: string;
633
+ };
634
+ Returns: undefined;
635
+ };
456
636
  maybe_complete_run: {
457
637
  Args: {
458
638
  run_id: string;
@@ -461,32 +641,50 @@ export type Database = {
461
641
  };
462
642
  poll_for_tasks: {
463
643
  Args: {
464
- queue_name: string;
465
- vt: number;
466
- qty: number;
467
644
  max_poll_seconds?: number;
468
645
  poll_interval_ms?: number;
469
- };
470
- Returns: Database["pgflow"]["CompositeTypes"]["step_task_record"][];
471
- };
472
- read_with_poll: {
473
- Args: {
646
+ qty: number;
474
647
  queue_name: string;
475
648
  vt: number;
476
- qty: number;
477
- max_poll_seconds?: number;
478
- poll_interval_ms?: number;
479
- conditional?: Json;
480
649
  };
481
- Returns: Database["pgmq"]["CompositeTypes"]["message_record"][];
650
+ Returns: Database["pgflow"]["CompositeTypes"]["step_task_record"][];
651
+ SetofOptions: {
652
+ from: "*";
653
+ to: "step_task_record";
654
+ isOneToOne: false;
655
+ isSetofReturn: true;
656
+ };
657
+ };
658
+ requeue_stalled_tasks: {
659
+ Args: never;
660
+ Returns: number;
482
661
  };
483
662
  set_vt_batch: {
484
663
  Args: {
485
- queue_name: string;
486
664
  msg_ids: number[];
665
+ queue_name: string;
487
666
  vt_offsets: number[];
488
667
  };
489
- Returns: Database["pgmq"]["CompositeTypes"]["message_record"][];
668
+ Returns: {
669
+ enqueued_at: string;
670
+ headers: Json;
671
+ message: Json;
672
+ msg_id: number;
673
+ read_ct: number;
674
+ vt: string;
675
+ }[];
676
+ };
677
+ setup_ensure_workers_cron: {
678
+ Args: {
679
+ cron_interval?: string;
680
+ };
681
+ Returns: string;
682
+ };
683
+ setup_requeue_stalled_tasks_cron: {
684
+ Args: {
685
+ cron_interval?: string;
686
+ };
687
+ Returns: string;
490
688
  };
491
689
  start_flow: {
492
690
  Args: {
@@ -505,6 +703,12 @@ export type Database = {
505
703
  started_at: string;
506
704
  status: string;
507
705
  }[];
706
+ SetofOptions: {
707
+ from: "*";
708
+ to: "runs";
709
+ isOneToOne: false;
710
+ isSetofReturn: true;
711
+ };
508
712
  };
509
713
  start_flow_with_states: {
510
714
  Args: {
@@ -527,6 +731,18 @@ export type Database = {
527
731
  worker_id: string;
528
732
  };
529
733
  Returns: Database["pgflow"]["CompositeTypes"]["step_task_record"][];
734
+ SetofOptions: {
735
+ from: "*";
736
+ to: "step_task_record";
737
+ isOneToOne: false;
738
+ isSetofReturn: true;
739
+ };
740
+ };
741
+ track_worker_function: {
742
+ Args: {
743
+ function_name: string;
744
+ };
745
+ Returns: undefined;
530
746
  };
531
747
  };
532
748
  Enums: {
@@ -540,6 +756,7 @@ export type Database = {
540
756
  input: Json | null;
541
757
  msg_id: number | null;
542
758
  task_index: number | null;
759
+ flow_input: Json | null;
543
760
  };
544
761
  };
545
762
  };
@@ -578,9 +795,15 @@ export type Database = {
578
795
  Returns: boolean;
579
796
  };
580
797
  _ensure_pg_partman_installed: {
581
- Args: Record<PropertyKey, never>;
798
+ Args: never;
582
799
  Returns: undefined;
583
800
  };
801
+ _extension_exists: {
802
+ Args: {
803
+ extension_name: string;
804
+ };
805
+ Returns: boolean;
806
+ };
584
807
  _get_partition_col: {
585
808
  Args: {
586
809
  partition_interval: string;
@@ -588,29 +811,32 @@ export type Database = {
588
811
  Returns: string;
589
812
  };
590
813
  _get_pg_partman_major_version: {
591
- Args: Record<PropertyKey, never>;
814
+ Args: never;
592
815
  Returns: number;
593
816
  };
594
817
  _get_pg_partman_schema: {
595
- Args: Record<PropertyKey, never>;
818
+ Args: never;
596
819
  Returns: string;
597
820
  };
598
821
  archive: {
599
822
  Args: {
600
- queue_name: string;
601
823
  msg_id: number;
602
- } | {
603
824
  queue_name: string;
604
- msg_ids: number[];
605
825
  };
606
826
  Returns: boolean;
827
+ } | {
828
+ Args: {
829
+ msg_ids: number[];
830
+ queue_name: string;
831
+ };
832
+ Returns: number[];
607
833
  };
608
834
  convert_archive_partitioned: {
609
835
  Args: {
610
- table_name: string;
836
+ leading_partition?: number;
611
837
  partition_interval?: string;
612
838
  retention_interval?: string;
613
- leading_partition?: number;
839
+ table_name: string;
614
840
  };
615
841
  Returns: undefined;
616
842
  };
@@ -628,8 +854,8 @@ export type Database = {
628
854
  };
629
855
  create_partitioned: {
630
856
  Args: {
631
- queue_name: string;
632
857
  partition_interval?: string;
858
+ queue_name: string;
633
859
  retention_interval?: string;
634
860
  };
635
861
  Returns: undefined;
@@ -642,13 +868,16 @@ export type Database = {
642
868
  };
643
869
  delete: {
644
870
  Args: {
645
- queue_name: string;
646
871
  msg_id: number;
647
- } | {
648
872
  queue_name: string;
649
- msg_ids: number[];
650
873
  };
651
874
  Returns: boolean;
875
+ } | {
876
+ Args: {
877
+ msg_ids: number[];
878
+ queue_name: string;
879
+ };
880
+ Returns: number[];
652
881
  };
653
882
  detach_archive: {
654
883
  Args: {
@@ -661,33 +890,63 @@ export type Database = {
661
890
  queue_name: string;
662
891
  };
663
892
  Returns: boolean;
893
+ } | {
894
+ Args: {
895
+ partitioned: boolean;
896
+ queue_name: string;
897
+ };
898
+ Returns: boolean;
664
899
  };
665
900
  format_table_name: {
666
901
  Args: {
667
- queue_name: string;
668
902
  prefix: string;
903
+ queue_name: string;
669
904
  };
670
905
  Returns: string;
671
906
  };
672
907
  list_queues: {
673
- Args: Record<PropertyKey, never>;
908
+ Args: never;
674
909
  Returns: Database["pgmq"]["CompositeTypes"]["queue_record"][];
910
+ SetofOptions: {
911
+ from: "*";
912
+ to: "queue_record";
913
+ isOneToOne: false;
914
+ isSetofReturn: true;
915
+ };
675
916
  };
676
917
  metrics: {
677
918
  Args: {
678
919
  queue_name: string;
679
920
  };
680
921
  Returns: Database["pgmq"]["CompositeTypes"]["metrics_result"];
922
+ SetofOptions: {
923
+ from: "*";
924
+ to: "metrics_result";
925
+ isOneToOne: true;
926
+ isSetofReturn: false;
927
+ };
681
928
  };
682
929
  metrics_all: {
683
- Args: Record<PropertyKey, never>;
930
+ Args: never;
684
931
  Returns: Database["pgmq"]["CompositeTypes"]["metrics_result"][];
932
+ SetofOptions: {
933
+ from: "*";
934
+ to: "metrics_result";
935
+ isOneToOne: false;
936
+ isSetofReturn: true;
937
+ };
685
938
  };
686
939
  pop: {
687
940
  Args: {
688
941
  queue_name: string;
689
942
  };
690
943
  Returns: Database["pgmq"]["CompositeTypes"]["message_record"][];
944
+ SetofOptions: {
945
+ from: "*";
946
+ to: "message_record";
947
+ isOneToOne: false;
948
+ isSetofReturn: true;
949
+ };
691
950
  };
692
951
  purge_queue: {
693
952
  Args: {
@@ -697,45 +956,137 @@ export type Database = {
697
956
  };
698
957
  read: {
699
958
  Args: {
959
+ conditional?: Json;
960
+ qty: number;
700
961
  queue_name: string;
701
962
  vt: number;
702
- qty: number;
703
963
  };
704
964
  Returns: Database["pgmq"]["CompositeTypes"]["message_record"][];
965
+ SetofOptions: {
966
+ from: "*";
967
+ to: "message_record";
968
+ isOneToOne: false;
969
+ isSetofReturn: true;
970
+ };
705
971
  };
706
972
  read_with_poll: {
707
973
  Args: {
708
- queue_name: string;
709
- vt: number;
710
- qty: number;
974
+ conditional?: Json;
711
975
  max_poll_seconds?: number;
712
976
  poll_interval_ms?: number;
977
+ qty: number;
978
+ queue_name: string;
979
+ vt: number;
713
980
  };
714
981
  Returns: Database["pgmq"]["CompositeTypes"]["message_record"][];
982
+ SetofOptions: {
983
+ from: "*";
984
+ to: "message_record";
985
+ isOneToOne: false;
986
+ isSetofReturn: true;
987
+ };
715
988
  };
716
989
  send: {
717
990
  Args: {
991
+ delay: string;
992
+ headers: Json;
993
+ msg: Json;
994
+ queue_name: string;
995
+ };
996
+ Returns: number[];
997
+ } | {
998
+ Args: {
999
+ delay: string;
1000
+ msg: Json;
1001
+ queue_name: string;
1002
+ };
1003
+ Returns: number[];
1004
+ } | {
1005
+ Args: {
1006
+ msg: Json;
1007
+ queue_name: string;
1008
+ };
1009
+ Returns: number[];
1010
+ } | {
1011
+ Args: {
1012
+ delay: number;
1013
+ msg: Json;
1014
+ queue_name: string;
1015
+ };
1016
+ Returns: number[];
1017
+ } | {
1018
+ Args: {
1019
+ headers: Json;
1020
+ msg: Json;
718
1021
  queue_name: string;
1022
+ };
1023
+ Returns: number[];
1024
+ } | {
1025
+ Args: {
1026
+ delay: number;
1027
+ headers: Json;
719
1028
  msg: Json;
720
- delay?: number;
1029
+ queue_name: string;
721
1030
  };
722
1031
  Returns: number[];
723
1032
  };
724
1033
  send_batch: {
725
1034
  Args: {
1035
+ delay: string;
1036
+ headers: Json[];
1037
+ msgs: Json[];
1038
+ queue_name: string;
1039
+ };
1040
+ Returns: number[];
1041
+ } | {
1042
+ Args: {
1043
+ delay: string;
1044
+ msgs: Json[];
1045
+ queue_name: string;
1046
+ };
1047
+ Returns: number[];
1048
+ } | {
1049
+ Args: {
1050
+ msgs: Json[];
1051
+ queue_name: string;
1052
+ };
1053
+ Returns: number[];
1054
+ } | {
1055
+ Args: {
1056
+ delay: number;
1057
+ msgs: Json[];
1058
+ queue_name: string;
1059
+ };
1060
+ Returns: number[];
1061
+ } | {
1062
+ Args: {
1063
+ headers: Json[];
1064
+ msgs: Json[];
726
1065
  queue_name: string;
1066
+ };
1067
+ Returns: number[];
1068
+ } | {
1069
+ Args: {
1070
+ delay: number;
1071
+ headers: Json[];
727
1072
  msgs: Json[];
728
- delay?: number;
1073
+ queue_name: string;
729
1074
  };
730
1075
  Returns: number[];
731
1076
  };
732
1077
  set_vt: {
733
1078
  Args: {
734
- queue_name: string;
735
1079
  msg_id: number;
1080
+ queue_name: string;
736
1081
  vt: number;
737
1082
  };
738
1083
  Returns: Database["pgmq"]["CompositeTypes"]["message_record"][];
1084
+ SetofOptions: {
1085
+ from: "*";
1086
+ to: "message_record";
1087
+ isOneToOne: false;
1088
+ isSetofReturn: true;
1089
+ };
739
1090
  };
740
1091
  validate_queue_name: {
741
1092
  Args: {
@@ -754,6 +1105,7 @@ export type Database = {
754
1105
  enqueued_at: string | null;
755
1106
  vt: string | null;
756
1107
  message: Json | null;
1108
+ headers: Json | null;
757
1109
  };
758
1110
  metrics_result: {
759
1111
  queue_name: string | null;
@@ -762,6 +1114,7 @@ export type Database = {
762
1114
  oldest_msg_age_sec: number | null;
763
1115
  total_messages: number | null;
764
1116
  scrape_time: string | null;
1117
+ queue_visible_length: number | null;
765
1118
  };
766
1119
  queue_record: {
767
1120
  queue_name: string | null;
@@ -772,54 +1125,55 @@ export type Database = {
772
1125
  };
773
1126
  };
774
1127
  };
775
- type DefaultSchema = Database[Extract<keyof Database, "public">];
1128
+ type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">;
1129
+ type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">];
776
1130
  export type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
777
- schema: keyof Database;
1131
+ schema: keyof DatabaseWithoutInternals;
778
1132
  }, TableName extends DefaultSchemaTableNameOrOptions extends {
779
- schema: keyof Database;
780
- } ? keyof (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
781
- schema: keyof Database;
782
- } ? (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
1133
+ schema: keyof DatabaseWithoutInternals;
1134
+ } ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
1135
+ schema: keyof DatabaseWithoutInternals;
1136
+ } ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
783
1137
  Row: infer R;
784
1138
  } ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) ? (DefaultSchema["Tables"] & DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
785
1139
  Row: infer R;
786
1140
  } ? R : never : never;
787
1141
  export type TablesInsert<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
788
- schema: keyof Database;
1142
+ schema: keyof DatabaseWithoutInternals;
789
1143
  }, TableName extends DefaultSchemaTableNameOrOptions extends {
790
- schema: keyof Database;
791
- } ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
792
- schema: keyof Database;
793
- } ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
1144
+ schema: keyof DatabaseWithoutInternals;
1145
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
1146
+ schema: keyof DatabaseWithoutInternals;
1147
+ } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
794
1148
  Insert: infer I;
795
1149
  } ? I : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
796
1150
  Insert: infer I;
797
1151
  } ? I : never : never;
798
1152
  export type TablesUpdate<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
799
- schema: keyof Database;
1153
+ schema: keyof DatabaseWithoutInternals;
800
1154
  }, TableName extends DefaultSchemaTableNameOrOptions extends {
801
- schema: keyof Database;
802
- } ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
803
- schema: keyof Database;
804
- } ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
1155
+ schema: keyof DatabaseWithoutInternals;
1156
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
1157
+ schema: keyof DatabaseWithoutInternals;
1158
+ } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
805
1159
  Update: infer U;
806
1160
  } ? U : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
807
1161
  Update: infer U;
808
1162
  } ? U : never : never;
809
1163
  export type Enums<DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] | {
810
- schema: keyof Database;
1164
+ schema: keyof DatabaseWithoutInternals;
811
1165
  }, EnumName extends DefaultSchemaEnumNameOrOptions extends {
812
- schema: keyof Database;
813
- } ? keyof Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never = never> = DefaultSchemaEnumNameOrOptions extends {
814
- schema: keyof Database;
815
- } ? Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] : never;
1166
+ schema: keyof DatabaseWithoutInternals;
1167
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never = never> = DefaultSchemaEnumNameOrOptions extends {
1168
+ schema: keyof DatabaseWithoutInternals;
1169
+ } ? DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] : never;
816
1170
  export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] | {
817
- schema: keyof Database;
1171
+ schema: keyof DatabaseWithoutInternals;
818
1172
  }, CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
819
- schema: keyof Database;
820
- } ? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] : never = never> = PublicCompositeTypeNameOrOptions extends {
821
- schema: keyof Database;
822
- } ? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] : never;
1173
+ schema: keyof DatabaseWithoutInternals;
1174
+ } ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] : never = never> = PublicCompositeTypeNameOrOptions extends {
1175
+ schema: keyof DatabaseWithoutInternals;
1176
+ } ? DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] : never;
823
1177
  export declare const Constants: {
824
1178
  readonly pgflow: {
825
1179
  readonly Enums: {};