@pgflow/core 0.0.5 → 0.0.7
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.
- package/{CHANGELOG.md → dist/CHANGELOG.md} +6 -0
- package/package.json +8 -5
- package/__tests__/mocks/index.ts +0 -1
- package/__tests__/mocks/postgres.ts +0 -37
- package/__tests__/types/PgflowSqlClient.test-d.ts +0 -59
- package/docs/options_for_flow_and_steps.md +0 -75
- package/docs/pgflow-blob-reference-system.md +0 -179
- package/eslint.config.cjs +0 -22
- package/example-flow.mermaid +0 -5
- package/example-flow.svg +0 -1
- package/flow-lifecycle.mermaid +0 -83
- package/flow-lifecycle.svg +0 -1
- package/out-tsc/vitest/__tests__/mocks/index.d.ts +0 -2
- package/out-tsc/vitest/__tests__/mocks/index.d.ts.map +0 -1
- package/out-tsc/vitest/__tests__/mocks/postgres.d.ts +0 -15
- package/out-tsc/vitest/__tests__/mocks/postgres.d.ts.map +0 -1
- package/out-tsc/vitest/__tests__/types/PgflowSqlClient.test-d.d.ts +0 -2
- package/out-tsc/vitest/__tests__/types/PgflowSqlClient.test-d.d.ts.map +0 -1
- package/out-tsc/vitest/tsconfig.spec.tsbuildinfo +0 -1
- package/out-tsc/vitest/vite.config.d.ts +0 -3
- package/out-tsc/vitest/vite.config.d.ts.map +0 -1
- package/pkgs/core/dist/index.js +0 -54
- package/pkgs/core/dist/pkgs/core/LICENSE.md +0 -660
- package/pkgs/core/dist/pkgs/core/README.md +0 -373
- package/pkgs/dsl/dist/index.js +0 -123
- package/pkgs/dsl/dist/pkgs/dsl/README.md +0 -11
- package/pkgs/edge-worker/dist/index.js +0 -953
- package/pkgs/edge-worker/dist/index.js.map +0 -7
- package/pkgs/edge-worker/dist/pkgs/edge-worker/LICENSE.md +0 -660
- package/pkgs/edge-worker/dist/pkgs/edge-worker/README.md +0 -46
- package/pkgs/example-flows/dist/index.js +0 -152
- package/pkgs/example-flows/dist/pkgs/example-flows/README.md +0 -11
- package/project.json +0 -125
- package/prompts/architect.md +0 -87
- package/prompts/condition.md +0 -33
- package/prompts/declarative_sql.md +0 -15
- package/prompts/deps_in_payloads.md +0 -20
- package/prompts/dsl-multi-arg.ts +0 -48
- package/prompts/dsl-options.md +0 -39
- package/prompts/dsl-single-arg.ts +0 -51
- package/prompts/dsl-two-arg.ts +0 -61
- package/prompts/dsl.md +0 -119
- package/prompts/fanout_steps.md +0 -1
- package/prompts/json_schemas.md +0 -36
- package/prompts/one_shot.md +0 -286
- package/prompts/pgtap.md +0 -229
- package/prompts/sdk.md +0 -59
- package/prompts/step_types.md +0 -62
- package/prompts/versioning.md +0 -16
- package/queries/fail_permanently.sql +0 -17
- package/queries/fail_task.sql +0 -21
- package/queries/sequential.sql +0 -47
- package/queries/two_roots_left_right.sql +0 -59
- package/schema.svg +0 -1
- package/scripts/colorize-pgtap-output.awk +0 -72
- package/scripts/run-test-with-colors +0 -5
- package/scripts/watch-test +0 -7
- package/src/PgflowSqlClient.ts +0 -85
- package/src/database-types.ts +0 -759
- package/src/index.ts +0 -3
- package/src/types.ts +0 -103
- package/supabase/config.toml +0 -32
- package/supabase/seed.sql +0 -202
- package/supabase/tests/add_step/basic_step_addition.test.sql +0 -29
- package/supabase/tests/add_step/circular_dependency.test.sql +0 -21
- package/supabase/tests/add_step/flow_isolation.test.sql +0 -26
- package/supabase/tests/add_step/idempotent_step_addition.test.sql +0 -20
- package/supabase/tests/add_step/invalid_step_slug.test.sql +0 -16
- package/supabase/tests/add_step/nonexistent_dependency.test.sql +0 -16
- package/supabase/tests/add_step/nonexistent_flow.test.sql +0 -13
- package/supabase/tests/add_step/options.test.sql +0 -66
- package/supabase/tests/add_step/step_with_dependency.test.sql +0 -36
- package/supabase/tests/add_step/step_with_multiple_dependencies.test.sql +0 -46
- package/supabase/tests/complete_task/archives_message.test.sql +0 -67
- package/supabase/tests/complete_task/completes_run_if_no_more_remaining_steps.test.sql +0 -62
- package/supabase/tests/complete_task/completes_task_and_updates_dependents.test.sql +0 -64
- package/supabase/tests/complete_task/decrements_remaining_steps_if_completing_step.test.sql +0 -62
- package/supabase/tests/complete_task/saves_output_when_completing_run.test.sql +0 -57
- package/supabase/tests/create_flow/flow_creation.test.sql +0 -27
- package/supabase/tests/create_flow/idempotency_and_duplicates.test.sql +0 -26
- package/supabase/tests/create_flow/invalid_slug.test.sql +0 -13
- package/supabase/tests/create_flow/options.test.sql +0 -57
- package/supabase/tests/fail_task/exponential_backoff.test.sql +0 -70
- package/supabase/tests/fail_task/mark_as_failed_if_no_retries_available.test.sql +0 -49
- package/supabase/tests/fail_task/respects_flow_retry_settings.test.sql +0 -48
- package/supabase/tests/fail_task/respects_step_retry_settings.test.sql +0 -48
- package/supabase/tests/fail_task/retry_task_if_retries_available.test.sql +0 -39
- package/supabase/tests/is_valid_slug.test.sql +0 -72
- package/supabase/tests/poll_for_tasks/builds_proper_input_from_deps_outputs.test.sql +0 -35
- package/supabase/tests/poll_for_tasks/hides_messages.test.sql +0 -35
- package/supabase/tests/poll_for_tasks/increments_attempts_count.test.sql +0 -35
- package/supabase/tests/poll_for_tasks/multiple_task_processing.test.sql +0 -24
- package/supabase/tests/poll_for_tasks/polls_only_queued_tasks.test.sql +0 -35
- package/supabase/tests/poll_for_tasks/reads_messages.test.sql +0 -38
- package/supabase/tests/poll_for_tasks/returns_no_tasks_if_no_step_task_for_message.test.sql +0 -34
- package/supabase/tests/poll_for_tasks/returns_no_tasks_if_queue_is_empty.test.sql +0 -19
- package/supabase/tests/poll_for_tasks/returns_no_tasks_when_qty_set_to_0.test.sql +0 -22
- package/supabase/tests/poll_for_tasks/sets_vt_delay_based_on_opt_timeout.test.sql +0 -41
- package/supabase/tests/poll_for_tasks/tasks_reapppear_if_not_processed_in_time.test.sql +0 -59
- package/supabase/tests/start_flow/creates_run.test.sql +0 -24
- package/supabase/tests/start_flow/creates_step_states_for_all_steps.test.sql +0 -25
- package/supabase/tests/start_flow/creates_step_tasks_only_for_root_steps.test.sql +0 -54
- package/supabase/tests/start_flow/returns_run.test.sql +0 -24
- package/supabase/tests/start_flow/sends_messages_on_the_queue.test.sql +0 -50
- package/supabase/tests/start_flow/starts_only_root_steps.test.sql +0 -21
- package/supabase/tests/step_dsl_is_idempotent.test.sql +0 -34
- package/tsconfig.json +0 -16
- package/tsconfig.lib.json +0 -26
- package/tsconfig.spec.json +0 -35
- package/vite.config.ts +0 -57
package/src/database-types.ts
DELETED
|
@@ -1,759 +0,0 @@
|
|
|
1
|
-
export type Json =
|
|
2
|
-
| string
|
|
3
|
-
| number
|
|
4
|
-
| boolean
|
|
5
|
-
| null
|
|
6
|
-
| { [key: string]: Json | undefined }
|
|
7
|
-
| Json[]
|
|
8
|
-
|
|
9
|
-
export type Database = {
|
|
10
|
-
pgflow: {
|
|
11
|
-
Tables: {
|
|
12
|
-
deps: {
|
|
13
|
-
Row: {
|
|
14
|
-
dep_slug: string
|
|
15
|
-
flow_slug: string
|
|
16
|
-
step_slug: string
|
|
17
|
-
}
|
|
18
|
-
Insert: {
|
|
19
|
-
dep_slug: string
|
|
20
|
-
flow_slug: string
|
|
21
|
-
step_slug: string
|
|
22
|
-
}
|
|
23
|
-
Update: {
|
|
24
|
-
dep_slug?: string
|
|
25
|
-
flow_slug?: string
|
|
26
|
-
step_slug?: string
|
|
27
|
-
}
|
|
28
|
-
Relationships: [
|
|
29
|
-
{
|
|
30
|
-
foreignKeyName: "deps_flow_slug_dep_slug_fkey"
|
|
31
|
-
columns: ["flow_slug", "dep_slug"]
|
|
32
|
-
isOneToOne: false
|
|
33
|
-
referencedRelation: "steps"
|
|
34
|
-
referencedColumns: ["flow_slug", "step_slug"]
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
foreignKeyName: "deps_flow_slug_fkey"
|
|
38
|
-
columns: ["flow_slug"]
|
|
39
|
-
isOneToOne: false
|
|
40
|
-
referencedRelation: "flows"
|
|
41
|
-
referencedColumns: ["flow_slug"]
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
foreignKeyName: "deps_flow_slug_step_slug_fkey"
|
|
45
|
-
columns: ["flow_slug", "step_slug"]
|
|
46
|
-
isOneToOne: false
|
|
47
|
-
referencedRelation: "steps"
|
|
48
|
-
referencedColumns: ["flow_slug", "step_slug"]
|
|
49
|
-
},
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
flows: {
|
|
53
|
-
Row: {
|
|
54
|
-
flow_slug: string
|
|
55
|
-
opt_base_delay: number
|
|
56
|
-
opt_max_attempts: number
|
|
57
|
-
opt_timeout: number
|
|
58
|
-
}
|
|
59
|
-
Insert: {
|
|
60
|
-
flow_slug: string
|
|
61
|
-
opt_base_delay?: number
|
|
62
|
-
opt_max_attempts?: number
|
|
63
|
-
opt_timeout?: number
|
|
64
|
-
}
|
|
65
|
-
Update: {
|
|
66
|
-
flow_slug?: string
|
|
67
|
-
opt_base_delay?: number
|
|
68
|
-
opt_max_attempts?: number
|
|
69
|
-
opt_timeout?: number
|
|
70
|
-
}
|
|
71
|
-
Relationships: []
|
|
72
|
-
}
|
|
73
|
-
runs: {
|
|
74
|
-
Row: {
|
|
75
|
-
flow_slug: string
|
|
76
|
-
input: Json
|
|
77
|
-
output: Json | null
|
|
78
|
-
remaining_steps: number
|
|
79
|
-
run_id: string
|
|
80
|
-
status: string
|
|
81
|
-
}
|
|
82
|
-
Insert: {
|
|
83
|
-
flow_slug: string
|
|
84
|
-
input: Json
|
|
85
|
-
output?: Json | null
|
|
86
|
-
remaining_steps?: number
|
|
87
|
-
run_id?: string
|
|
88
|
-
status?: string
|
|
89
|
-
}
|
|
90
|
-
Update: {
|
|
91
|
-
flow_slug?: string
|
|
92
|
-
input?: Json
|
|
93
|
-
output?: Json | null
|
|
94
|
-
remaining_steps?: number
|
|
95
|
-
run_id?: string
|
|
96
|
-
status?: string
|
|
97
|
-
}
|
|
98
|
-
Relationships: [
|
|
99
|
-
{
|
|
100
|
-
foreignKeyName: "runs_flow_slug_fkey"
|
|
101
|
-
columns: ["flow_slug"]
|
|
102
|
-
isOneToOne: false
|
|
103
|
-
referencedRelation: "flows"
|
|
104
|
-
referencedColumns: ["flow_slug"]
|
|
105
|
-
},
|
|
106
|
-
]
|
|
107
|
-
}
|
|
108
|
-
step_states: {
|
|
109
|
-
Row: {
|
|
110
|
-
flow_slug: string
|
|
111
|
-
remaining_deps: number
|
|
112
|
-
remaining_tasks: number
|
|
113
|
-
run_id: string
|
|
114
|
-
status: string
|
|
115
|
-
step_slug: string
|
|
116
|
-
}
|
|
117
|
-
Insert: {
|
|
118
|
-
flow_slug: string
|
|
119
|
-
remaining_deps?: number
|
|
120
|
-
remaining_tasks?: number
|
|
121
|
-
run_id: string
|
|
122
|
-
status?: string
|
|
123
|
-
step_slug: string
|
|
124
|
-
}
|
|
125
|
-
Update: {
|
|
126
|
-
flow_slug?: string
|
|
127
|
-
remaining_deps?: number
|
|
128
|
-
remaining_tasks?: number
|
|
129
|
-
run_id?: string
|
|
130
|
-
status?: string
|
|
131
|
-
step_slug?: string
|
|
132
|
-
}
|
|
133
|
-
Relationships: [
|
|
134
|
-
{
|
|
135
|
-
foreignKeyName: "step_states_flow_slug_fkey"
|
|
136
|
-
columns: ["flow_slug"]
|
|
137
|
-
isOneToOne: false
|
|
138
|
-
referencedRelation: "flows"
|
|
139
|
-
referencedColumns: ["flow_slug"]
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
foreignKeyName: "step_states_flow_slug_step_slug_fkey"
|
|
143
|
-
columns: ["flow_slug", "step_slug"]
|
|
144
|
-
isOneToOne: false
|
|
145
|
-
referencedRelation: "steps"
|
|
146
|
-
referencedColumns: ["flow_slug", "step_slug"]
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
foreignKeyName: "step_states_run_id_fkey"
|
|
150
|
-
columns: ["run_id"]
|
|
151
|
-
isOneToOne: false
|
|
152
|
-
referencedRelation: "runs"
|
|
153
|
-
referencedColumns: ["run_id"]
|
|
154
|
-
},
|
|
155
|
-
]
|
|
156
|
-
}
|
|
157
|
-
step_tasks: {
|
|
158
|
-
Row: {
|
|
159
|
-
attempts_count: number
|
|
160
|
-
error_message: string | null
|
|
161
|
-
flow_slug: string
|
|
162
|
-
message_id: number | null
|
|
163
|
-
output: Json | null
|
|
164
|
-
run_id: string
|
|
165
|
-
status: string
|
|
166
|
-
step_slug: string
|
|
167
|
-
task_index: number
|
|
168
|
-
}
|
|
169
|
-
Insert: {
|
|
170
|
-
attempts_count?: number
|
|
171
|
-
error_message?: string | null
|
|
172
|
-
flow_slug: string
|
|
173
|
-
message_id?: number | null
|
|
174
|
-
output?: Json | null
|
|
175
|
-
run_id: string
|
|
176
|
-
status?: string
|
|
177
|
-
step_slug: string
|
|
178
|
-
task_index?: number
|
|
179
|
-
}
|
|
180
|
-
Update: {
|
|
181
|
-
attempts_count?: number
|
|
182
|
-
error_message?: string | null
|
|
183
|
-
flow_slug?: string
|
|
184
|
-
message_id?: number | null
|
|
185
|
-
output?: Json | null
|
|
186
|
-
run_id?: string
|
|
187
|
-
status?: string
|
|
188
|
-
step_slug?: string
|
|
189
|
-
task_index?: number
|
|
190
|
-
}
|
|
191
|
-
Relationships: [
|
|
192
|
-
{
|
|
193
|
-
foreignKeyName: "step_tasks_flow_slug_fkey"
|
|
194
|
-
columns: ["flow_slug"]
|
|
195
|
-
isOneToOne: false
|
|
196
|
-
referencedRelation: "flows"
|
|
197
|
-
referencedColumns: ["flow_slug"]
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
foreignKeyName: "step_tasks_run_id_fkey"
|
|
201
|
-
columns: ["run_id"]
|
|
202
|
-
isOneToOne: false
|
|
203
|
-
referencedRelation: "runs"
|
|
204
|
-
referencedColumns: ["run_id"]
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
foreignKeyName: "step_tasks_run_id_step_slug_fkey"
|
|
208
|
-
columns: ["run_id", "step_slug"]
|
|
209
|
-
isOneToOne: false
|
|
210
|
-
referencedRelation: "step_states"
|
|
211
|
-
referencedColumns: ["run_id", "step_slug"]
|
|
212
|
-
},
|
|
213
|
-
]
|
|
214
|
-
}
|
|
215
|
-
steps: {
|
|
216
|
-
Row: {
|
|
217
|
-
deps_count: number
|
|
218
|
-
flow_slug: string
|
|
219
|
-
opt_base_delay: number | null
|
|
220
|
-
opt_max_attempts: number | null
|
|
221
|
-
opt_timeout: number | null
|
|
222
|
-
step_slug: string
|
|
223
|
-
step_type: string
|
|
224
|
-
}
|
|
225
|
-
Insert: {
|
|
226
|
-
deps_count?: number
|
|
227
|
-
flow_slug: string
|
|
228
|
-
opt_base_delay?: number | null
|
|
229
|
-
opt_max_attempts?: number | null
|
|
230
|
-
opt_timeout?: number | null
|
|
231
|
-
step_slug: string
|
|
232
|
-
step_type?: string
|
|
233
|
-
}
|
|
234
|
-
Update: {
|
|
235
|
-
deps_count?: number
|
|
236
|
-
flow_slug?: string
|
|
237
|
-
opt_base_delay?: number | null
|
|
238
|
-
opt_max_attempts?: number | null
|
|
239
|
-
opt_timeout?: number | null
|
|
240
|
-
step_slug?: string
|
|
241
|
-
step_type?: string
|
|
242
|
-
}
|
|
243
|
-
Relationships: [
|
|
244
|
-
{
|
|
245
|
-
foreignKeyName: "steps_flow_slug_fkey"
|
|
246
|
-
columns: ["flow_slug"]
|
|
247
|
-
isOneToOne: false
|
|
248
|
-
referencedRelation: "flows"
|
|
249
|
-
referencedColumns: ["flow_slug"]
|
|
250
|
-
},
|
|
251
|
-
]
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
Views: {
|
|
255
|
-
[_ in never]: never
|
|
256
|
-
}
|
|
257
|
-
Functions: {
|
|
258
|
-
add_step:
|
|
259
|
-
| {
|
|
260
|
-
Args: {
|
|
261
|
-
flow_slug: string
|
|
262
|
-
step_slug: string
|
|
263
|
-
deps_slugs: string[]
|
|
264
|
-
max_attempts?: number
|
|
265
|
-
base_delay?: number
|
|
266
|
-
timeout?: number
|
|
267
|
-
}
|
|
268
|
-
Returns: {
|
|
269
|
-
deps_count: number
|
|
270
|
-
flow_slug: string
|
|
271
|
-
opt_base_delay: number | null
|
|
272
|
-
opt_max_attempts: number | null
|
|
273
|
-
opt_timeout: number | null
|
|
274
|
-
step_slug: string
|
|
275
|
-
step_type: string
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
| {
|
|
279
|
-
Args: {
|
|
280
|
-
flow_slug: string
|
|
281
|
-
step_slug: string
|
|
282
|
-
max_attempts?: number
|
|
283
|
-
base_delay?: number
|
|
284
|
-
timeout?: number
|
|
285
|
-
}
|
|
286
|
-
Returns: {
|
|
287
|
-
deps_count: number
|
|
288
|
-
flow_slug: string
|
|
289
|
-
opt_base_delay: number | null
|
|
290
|
-
opt_max_attempts: number | null
|
|
291
|
-
opt_timeout: number | null
|
|
292
|
-
step_slug: string
|
|
293
|
-
step_type: string
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
calculate_retry_delay: {
|
|
297
|
-
Args: {
|
|
298
|
-
base_delay: number
|
|
299
|
-
attempts_count: number
|
|
300
|
-
}
|
|
301
|
-
Returns: number
|
|
302
|
-
}
|
|
303
|
-
complete_task: {
|
|
304
|
-
Args: {
|
|
305
|
-
run_id: string
|
|
306
|
-
step_slug: string
|
|
307
|
-
task_index: number
|
|
308
|
-
output: Json
|
|
309
|
-
}
|
|
310
|
-
Returns: {
|
|
311
|
-
attempts_count: number
|
|
312
|
-
error_message: string | null
|
|
313
|
-
flow_slug: string
|
|
314
|
-
message_id: number | null
|
|
315
|
-
output: Json | null
|
|
316
|
-
run_id: string
|
|
317
|
-
status: string
|
|
318
|
-
step_slug: string
|
|
319
|
-
task_index: number
|
|
320
|
-
}[]
|
|
321
|
-
}
|
|
322
|
-
create_flow: {
|
|
323
|
-
Args: {
|
|
324
|
-
flow_slug: string
|
|
325
|
-
max_attempts?: number
|
|
326
|
-
base_delay?: number
|
|
327
|
-
timeout?: number
|
|
328
|
-
}
|
|
329
|
-
Returns: {
|
|
330
|
-
flow_slug: string
|
|
331
|
-
opt_base_delay: number
|
|
332
|
-
opt_max_attempts: number
|
|
333
|
-
opt_timeout: number
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
fail_task: {
|
|
337
|
-
Args: {
|
|
338
|
-
run_id: string
|
|
339
|
-
step_slug: string
|
|
340
|
-
task_index: number
|
|
341
|
-
error_message: string
|
|
342
|
-
}
|
|
343
|
-
Returns: {
|
|
344
|
-
attempts_count: number
|
|
345
|
-
error_message: string | null
|
|
346
|
-
flow_slug: string
|
|
347
|
-
message_id: number | null
|
|
348
|
-
output: Json | null
|
|
349
|
-
run_id: string
|
|
350
|
-
status: string
|
|
351
|
-
step_slug: string
|
|
352
|
-
task_index: number
|
|
353
|
-
}[]
|
|
354
|
-
}
|
|
355
|
-
is_valid_slug: {
|
|
356
|
-
Args: {
|
|
357
|
-
slug: string
|
|
358
|
-
}
|
|
359
|
-
Returns: boolean
|
|
360
|
-
}
|
|
361
|
-
maybe_complete_run: {
|
|
362
|
-
Args: {
|
|
363
|
-
run_id: string
|
|
364
|
-
}
|
|
365
|
-
Returns: undefined
|
|
366
|
-
}
|
|
367
|
-
poll_for_tasks: {
|
|
368
|
-
Args: {
|
|
369
|
-
queue_name: string
|
|
370
|
-
vt: number
|
|
371
|
-
qty: number
|
|
372
|
-
max_poll_seconds?: number
|
|
373
|
-
poll_interval_ms?: number
|
|
374
|
-
}
|
|
375
|
-
Returns: Database["pgflow"]["CompositeTypes"]["step_task_record"][]
|
|
376
|
-
}
|
|
377
|
-
read_with_poll: {
|
|
378
|
-
Args: {
|
|
379
|
-
queue_name: string
|
|
380
|
-
vt: number
|
|
381
|
-
qty: number
|
|
382
|
-
max_poll_seconds?: number
|
|
383
|
-
poll_interval_ms?: number
|
|
384
|
-
conditional?: Json
|
|
385
|
-
}
|
|
386
|
-
Returns: Database["pgmq"]["CompositeTypes"]["message_record"][]
|
|
387
|
-
}
|
|
388
|
-
start_flow: {
|
|
389
|
-
Args: {
|
|
390
|
-
flow_slug: string
|
|
391
|
-
input: Json
|
|
392
|
-
}
|
|
393
|
-
Returns: {
|
|
394
|
-
flow_slug: string
|
|
395
|
-
input: Json
|
|
396
|
-
output: Json | null
|
|
397
|
-
remaining_steps: number
|
|
398
|
-
run_id: string
|
|
399
|
-
status: string
|
|
400
|
-
}[]
|
|
401
|
-
}
|
|
402
|
-
start_ready_steps: {
|
|
403
|
-
Args: {
|
|
404
|
-
run_id: string
|
|
405
|
-
}
|
|
406
|
-
Returns: undefined
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
Enums: {
|
|
410
|
-
[_ in never]: never
|
|
411
|
-
}
|
|
412
|
-
CompositeTypes: {
|
|
413
|
-
step_task_record: {
|
|
414
|
-
flow_slug: string | null
|
|
415
|
-
run_id: string | null
|
|
416
|
-
step_slug: string | null
|
|
417
|
-
input: Json | null
|
|
418
|
-
msg_id: number | null
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
pgmq: {
|
|
423
|
-
Tables: {
|
|
424
|
-
meta: {
|
|
425
|
-
Row: {
|
|
426
|
-
created_at: string
|
|
427
|
-
is_partitioned: boolean
|
|
428
|
-
is_unlogged: boolean
|
|
429
|
-
queue_name: string
|
|
430
|
-
}
|
|
431
|
-
Insert: {
|
|
432
|
-
created_at?: string
|
|
433
|
-
is_partitioned: boolean
|
|
434
|
-
is_unlogged: boolean
|
|
435
|
-
queue_name: string
|
|
436
|
-
}
|
|
437
|
-
Update: {
|
|
438
|
-
created_at?: string
|
|
439
|
-
is_partitioned?: boolean
|
|
440
|
-
is_unlogged?: boolean
|
|
441
|
-
queue_name?: string
|
|
442
|
-
}
|
|
443
|
-
Relationships: []
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
Views: {
|
|
447
|
-
[_ in never]: never
|
|
448
|
-
}
|
|
449
|
-
Functions: {
|
|
450
|
-
_belongs_to_pgmq: {
|
|
451
|
-
Args: {
|
|
452
|
-
table_name: string
|
|
453
|
-
}
|
|
454
|
-
Returns: boolean
|
|
455
|
-
}
|
|
456
|
-
_ensure_pg_partman_installed: {
|
|
457
|
-
Args: Record<PropertyKey, never>
|
|
458
|
-
Returns: undefined
|
|
459
|
-
}
|
|
460
|
-
_get_partition_col: {
|
|
461
|
-
Args: {
|
|
462
|
-
partition_interval: string
|
|
463
|
-
}
|
|
464
|
-
Returns: string
|
|
465
|
-
}
|
|
466
|
-
_get_pg_partman_major_version: {
|
|
467
|
-
Args: Record<PropertyKey, never>
|
|
468
|
-
Returns: number
|
|
469
|
-
}
|
|
470
|
-
_get_pg_partman_schema: {
|
|
471
|
-
Args: Record<PropertyKey, never>
|
|
472
|
-
Returns: string
|
|
473
|
-
}
|
|
474
|
-
archive:
|
|
475
|
-
| {
|
|
476
|
-
Args: {
|
|
477
|
-
queue_name: string
|
|
478
|
-
msg_id: number
|
|
479
|
-
}
|
|
480
|
-
Returns: boolean
|
|
481
|
-
}
|
|
482
|
-
| {
|
|
483
|
-
Args: {
|
|
484
|
-
queue_name: string
|
|
485
|
-
msg_ids: number[]
|
|
486
|
-
}
|
|
487
|
-
Returns: number[]
|
|
488
|
-
}
|
|
489
|
-
convert_archive_partitioned: {
|
|
490
|
-
Args: {
|
|
491
|
-
table_name: string
|
|
492
|
-
partition_interval?: string
|
|
493
|
-
retention_interval?: string
|
|
494
|
-
leading_partition?: number
|
|
495
|
-
}
|
|
496
|
-
Returns: undefined
|
|
497
|
-
}
|
|
498
|
-
create: {
|
|
499
|
-
Args: {
|
|
500
|
-
queue_name: string
|
|
501
|
-
}
|
|
502
|
-
Returns: undefined
|
|
503
|
-
}
|
|
504
|
-
create_non_partitioned: {
|
|
505
|
-
Args: {
|
|
506
|
-
queue_name: string
|
|
507
|
-
}
|
|
508
|
-
Returns: undefined
|
|
509
|
-
}
|
|
510
|
-
create_partitioned: {
|
|
511
|
-
Args: {
|
|
512
|
-
queue_name: string
|
|
513
|
-
partition_interval?: string
|
|
514
|
-
retention_interval?: string
|
|
515
|
-
}
|
|
516
|
-
Returns: undefined
|
|
517
|
-
}
|
|
518
|
-
create_unlogged: {
|
|
519
|
-
Args: {
|
|
520
|
-
queue_name: string
|
|
521
|
-
}
|
|
522
|
-
Returns: undefined
|
|
523
|
-
}
|
|
524
|
-
delete:
|
|
525
|
-
| {
|
|
526
|
-
Args: {
|
|
527
|
-
queue_name: string
|
|
528
|
-
msg_id: number
|
|
529
|
-
}
|
|
530
|
-
Returns: boolean
|
|
531
|
-
}
|
|
532
|
-
| {
|
|
533
|
-
Args: {
|
|
534
|
-
queue_name: string
|
|
535
|
-
msg_ids: number[]
|
|
536
|
-
}
|
|
537
|
-
Returns: number[]
|
|
538
|
-
}
|
|
539
|
-
detach_archive: {
|
|
540
|
-
Args: {
|
|
541
|
-
queue_name: string
|
|
542
|
-
}
|
|
543
|
-
Returns: undefined
|
|
544
|
-
}
|
|
545
|
-
drop_queue: {
|
|
546
|
-
Args: {
|
|
547
|
-
queue_name: string
|
|
548
|
-
partitioned?: boolean
|
|
549
|
-
}
|
|
550
|
-
Returns: boolean
|
|
551
|
-
}
|
|
552
|
-
format_table_name: {
|
|
553
|
-
Args: {
|
|
554
|
-
queue_name: string
|
|
555
|
-
prefix: string
|
|
556
|
-
}
|
|
557
|
-
Returns: string
|
|
558
|
-
}
|
|
559
|
-
list_queues: {
|
|
560
|
-
Args: Record<PropertyKey, never>
|
|
561
|
-
Returns: Database["pgmq"]["CompositeTypes"]["queue_record"][]
|
|
562
|
-
}
|
|
563
|
-
metrics: {
|
|
564
|
-
Args: {
|
|
565
|
-
queue_name: string
|
|
566
|
-
}
|
|
567
|
-
Returns: Database["pgmq"]["CompositeTypes"]["metrics_result"]
|
|
568
|
-
}
|
|
569
|
-
metrics_all: {
|
|
570
|
-
Args: Record<PropertyKey, never>
|
|
571
|
-
Returns: Database["pgmq"]["CompositeTypes"]["metrics_result"][]
|
|
572
|
-
}
|
|
573
|
-
pop: {
|
|
574
|
-
Args: {
|
|
575
|
-
queue_name: string
|
|
576
|
-
}
|
|
577
|
-
Returns: Database["pgmq"]["CompositeTypes"]["message_record"][]
|
|
578
|
-
}
|
|
579
|
-
purge_queue: {
|
|
580
|
-
Args: {
|
|
581
|
-
queue_name: string
|
|
582
|
-
}
|
|
583
|
-
Returns: number
|
|
584
|
-
}
|
|
585
|
-
read: {
|
|
586
|
-
Args: {
|
|
587
|
-
queue_name: string
|
|
588
|
-
vt: number
|
|
589
|
-
qty: number
|
|
590
|
-
}
|
|
591
|
-
Returns: Database["pgmq"]["CompositeTypes"]["message_record"][]
|
|
592
|
-
}
|
|
593
|
-
read_with_poll: {
|
|
594
|
-
Args: {
|
|
595
|
-
queue_name: string
|
|
596
|
-
vt: number
|
|
597
|
-
qty: number
|
|
598
|
-
max_poll_seconds?: number
|
|
599
|
-
poll_interval_ms?: number
|
|
600
|
-
}
|
|
601
|
-
Returns: Database["pgmq"]["CompositeTypes"]["message_record"][]
|
|
602
|
-
}
|
|
603
|
-
send: {
|
|
604
|
-
Args: {
|
|
605
|
-
queue_name: string
|
|
606
|
-
msg: Json
|
|
607
|
-
delay?: number
|
|
608
|
-
}
|
|
609
|
-
Returns: number[]
|
|
610
|
-
}
|
|
611
|
-
send_batch: {
|
|
612
|
-
Args: {
|
|
613
|
-
queue_name: string
|
|
614
|
-
msgs: Json[]
|
|
615
|
-
delay?: number
|
|
616
|
-
}
|
|
617
|
-
Returns: number[]
|
|
618
|
-
}
|
|
619
|
-
set_vt: {
|
|
620
|
-
Args: {
|
|
621
|
-
queue_name: string
|
|
622
|
-
msg_id: number
|
|
623
|
-
vt: number
|
|
624
|
-
}
|
|
625
|
-
Returns: Database["pgmq"]["CompositeTypes"]["message_record"][]
|
|
626
|
-
}
|
|
627
|
-
validate_queue_name: {
|
|
628
|
-
Args: {
|
|
629
|
-
queue_name: string
|
|
630
|
-
}
|
|
631
|
-
Returns: undefined
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
Enums: {
|
|
635
|
-
[_ in never]: never
|
|
636
|
-
}
|
|
637
|
-
CompositeTypes: {
|
|
638
|
-
message_record: {
|
|
639
|
-
msg_id: number | null
|
|
640
|
-
read_ct: number | null
|
|
641
|
-
enqueued_at: string | null
|
|
642
|
-
vt: string | null
|
|
643
|
-
message: Json | null
|
|
644
|
-
}
|
|
645
|
-
metrics_result: {
|
|
646
|
-
queue_name: string | null
|
|
647
|
-
queue_length: number | null
|
|
648
|
-
newest_msg_age_sec: number | null
|
|
649
|
-
oldest_msg_age_sec: number | null
|
|
650
|
-
total_messages: number | null
|
|
651
|
-
scrape_time: string | null
|
|
652
|
-
}
|
|
653
|
-
queue_record: {
|
|
654
|
-
queue_name: string | null
|
|
655
|
-
is_partitioned: boolean | null
|
|
656
|
-
is_unlogged: boolean | null
|
|
657
|
-
created_at: string | null
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
type PublicSchema = Database[Extract<keyof Database, "public">]
|
|
664
|
-
|
|
665
|
-
export type Tables<
|
|
666
|
-
PublicTableNameOrOptions extends
|
|
667
|
-
| keyof (PublicSchema["Tables"] & PublicSchema["Views"])
|
|
668
|
-
| { schema: keyof Database },
|
|
669
|
-
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
670
|
-
? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
|
|
671
|
-
Database[PublicTableNameOrOptions["schema"]]["Views"])
|
|
672
|
-
: never = never,
|
|
673
|
-
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
674
|
-
? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
|
|
675
|
-
Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
|
|
676
|
-
Row: infer R
|
|
677
|
-
}
|
|
678
|
-
? R
|
|
679
|
-
: never
|
|
680
|
-
: PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
|
|
681
|
-
PublicSchema["Views"])
|
|
682
|
-
? (PublicSchema["Tables"] &
|
|
683
|
-
PublicSchema["Views"])[PublicTableNameOrOptions] extends {
|
|
684
|
-
Row: infer R
|
|
685
|
-
}
|
|
686
|
-
? R
|
|
687
|
-
: never
|
|
688
|
-
: never
|
|
689
|
-
|
|
690
|
-
export type TablesInsert<
|
|
691
|
-
PublicTableNameOrOptions extends
|
|
692
|
-
| keyof PublicSchema["Tables"]
|
|
693
|
-
| { schema: keyof Database },
|
|
694
|
-
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
695
|
-
? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
|
|
696
|
-
: never = never,
|
|
697
|
-
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
698
|
-
? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
699
|
-
Insert: infer I
|
|
700
|
-
}
|
|
701
|
-
? I
|
|
702
|
-
: never
|
|
703
|
-
: PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
|
|
704
|
-
? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
|
|
705
|
-
Insert: infer I
|
|
706
|
-
}
|
|
707
|
-
? I
|
|
708
|
-
: never
|
|
709
|
-
: never
|
|
710
|
-
|
|
711
|
-
export type TablesUpdate<
|
|
712
|
-
PublicTableNameOrOptions extends
|
|
713
|
-
| keyof PublicSchema["Tables"]
|
|
714
|
-
| { schema: keyof Database },
|
|
715
|
-
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
716
|
-
? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
|
|
717
|
-
: never = never,
|
|
718
|
-
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
719
|
-
? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
720
|
-
Update: infer U
|
|
721
|
-
}
|
|
722
|
-
? U
|
|
723
|
-
: never
|
|
724
|
-
: PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
|
|
725
|
-
? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
|
|
726
|
-
Update: infer U
|
|
727
|
-
}
|
|
728
|
-
? U
|
|
729
|
-
: never
|
|
730
|
-
: never
|
|
731
|
-
|
|
732
|
-
export type Enums<
|
|
733
|
-
PublicEnumNameOrOptions extends
|
|
734
|
-
| keyof PublicSchema["Enums"]
|
|
735
|
-
| { schema: keyof Database },
|
|
736
|
-
EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
|
|
737
|
-
? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
|
|
738
|
-
: never = never,
|
|
739
|
-
> = PublicEnumNameOrOptions extends { schema: keyof Database }
|
|
740
|
-
? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
|
|
741
|
-
: PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
|
|
742
|
-
? PublicSchema["Enums"][PublicEnumNameOrOptions]
|
|
743
|
-
: never
|
|
744
|
-
|
|
745
|
-
export type CompositeTypes<
|
|
746
|
-
PublicCompositeTypeNameOrOptions extends
|
|
747
|
-
| keyof PublicSchema["CompositeTypes"]
|
|
748
|
-
| { schema: keyof Database },
|
|
749
|
-
CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
|
|
750
|
-
schema: keyof Database
|
|
751
|
-
}
|
|
752
|
-
? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"]
|
|
753
|
-
: never = never,
|
|
754
|
-
> = PublicCompositeTypeNameOrOptions extends { schema: keyof Database }
|
|
755
|
-
? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName]
|
|
756
|
-
: PublicCompositeTypeNameOrOptions extends keyof PublicSchema["CompositeTypes"]
|
|
757
|
-
? PublicSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions]
|
|
758
|
-
: never
|
|
759
|
-
|