@sanoma-ai/workflows 0.11.17 → 0.11.18

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 (94) hide show
  1. package/README.md +13 -9
  2. package/dist/call.d.ts +35 -4
  3. package/dist/call.js +128 -40
  4. package/dist/call.js.map +1 -1
  5. package/dist/client.d.ts +17 -8
  6. package/dist/client.js +90 -51
  7. package/dist/client.js.map +1 -1
  8. package/dist/collection.d.ts +25 -7
  9. package/dist/collection.js +236 -91
  10. package/dist/collection.js.map +1 -1
  11. package/dist/config.d.ts +8 -5
  12. package/dist/config.js +10 -10
  13. package/dist/config.js.map +1 -1
  14. package/dist/db/company.d.ts +20 -0
  15. package/dist/db/company.js +9 -1
  16. package/dist/db/company.js.map +1 -1
  17. package/dist/describe.js +1 -1
  18. package/dist/describe.js.map +1 -1
  19. package/dist/description.js +1 -1
  20. package/dist/description.js.map +1 -1
  21. package/dist/errors.d.ts +2 -1
  22. package/dist/errors.js +3 -2
  23. package/dist/errors.js.map +1 -1
  24. package/dist/grid.js +3 -2
  25. package/dist/grid.js.map +1 -1
  26. package/dist/host-derive.d.ts +13 -8
  27. package/dist/host-derive.js +26 -13
  28. package/dist/host-derive.js.map +1 -1
  29. package/dist/index.d.ts +2 -0
  30. package/dist/index.js +2 -0
  31. package/dist/index.js.map +1 -1
  32. package/dist/ledger.d.ts +7 -0
  33. package/dist/ledger.js +32 -2
  34. package/dist/ledger.js.map +1 -1
  35. package/dist/local-sandbox.d.ts +8 -1
  36. package/dist/local-sandbox.js +3 -2
  37. package/dist/local-sandbox.js.map +1 -1
  38. package/dist/op.d.ts +3 -2
  39. package/dist/op.js.map +1 -1
  40. package/dist/resources.d.ts +1 -1
  41. package/dist/resources.js +9 -6
  42. package/dist/resources.js.map +1 -1
  43. package/dist/runner-box.d.ts +23 -0
  44. package/dist/runner-box.js +181 -0
  45. package/dist/runner-box.js.map +1 -0
  46. package/dist/runner-protocol.d.ts +73 -0
  47. package/dist/runner-protocol.js +34 -0
  48. package/dist/runner-protocol.js.map +1 -0
  49. package/dist/sandbox-contract.d.ts +14 -5
  50. package/dist/sandbox-contract.js.map +1 -1
  51. package/dist/sandbox-runner.cjs +7 -0
  52. package/dist/scenario.js +16 -7
  53. package/dist/scenario.js.map +1 -1
  54. package/dist/schema.js +6 -3
  55. package/dist/schema.js.map +1 -1
  56. package/dist/secret.d.ts +2 -1
  57. package/dist/secret.js +3 -2
  58. package/dist/secret.js.map +1 -1
  59. package/dist/shared.d.ts +39 -5
  60. package/dist/shared.js +13 -1
  61. package/dist/shared.js.map +1 -1
  62. package/dist/sites.js +10 -8
  63. package/dist/sites.js.map +1 -1
  64. package/dist/source.d.ts +21 -0
  65. package/dist/source.js.map +1 -1
  66. package/drizzle/company/0003_ledger_target.sql +2 -0
  67. package/drizzle/company/meta/0003_snapshot.json +845 -0
  68. package/drizzle/company/meta/_journal.json +7 -0
  69. package/package.json +5 -2
  70. package/src/call.ts +181 -60
  71. package/src/client.ts +118 -67
  72. package/src/collection.ts +265 -97
  73. package/src/config.ts +20 -20
  74. package/src/db/company.ts +9 -1
  75. package/src/describe.ts +1 -1
  76. package/src/description.ts +1 -1
  77. package/src/errors.ts +3 -2
  78. package/src/grid.ts +3 -1
  79. package/src/host-derive.ts +38 -18
  80. package/src/index.ts +2 -0
  81. package/src/ledger.ts +42 -2
  82. package/src/local-sandbox.ts +3 -2
  83. package/src/op.ts +3 -2
  84. package/src/resources.ts +8 -6
  85. package/src/runner-box.ts +218 -0
  86. package/src/runner-protocol.ts +61 -0
  87. package/src/sandbox-contract.ts +11 -4
  88. package/src/sandbox-runner.ts +187 -0
  89. package/src/scenario.ts +16 -6
  90. package/src/schema.ts +14 -3
  91. package/src/secret.ts +6 -2
  92. package/src/shared.ts +40 -4
  93. package/src/sites.ts +11 -7
  94. package/src/source.ts +14 -0
@@ -0,0 +1,845 @@
1
+ {
2
+ "id": "9a5a7571-6909-45a6-9209-62ed01ac6877",
3
+ "prevId": "74ad8f94-1d95-46c2-89c2-0263af5bcc8b",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.sanoma_api_tokens": {
8
+ "name": "sanoma_api_tokens",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "hash": {
18
+ "name": "hash",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "subject": {
24
+ "name": "subject",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "groups": {
30
+ "name": "groups",
31
+ "type": "jsonb",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "created_at": {
36
+ "name": "created_at",
37
+ "type": "timestamp with time zone",
38
+ "primaryKey": false,
39
+ "notNull": true,
40
+ "default": "now()"
41
+ },
42
+ "revoked_at": {
43
+ "name": "revoked_at",
44
+ "type": "timestamp with time zone",
45
+ "primaryKey": false,
46
+ "notNull": false
47
+ }
48
+ },
49
+ "indexes": {},
50
+ "foreignKeys": {},
51
+ "compositePrimaryKeys": {},
52
+ "uniqueConstraints": {
53
+ "sanoma_api_tokens_hash_unique": {
54
+ "name": "sanoma_api_tokens_hash_unique",
55
+ "nullsNotDistinct": false,
56
+ "columns": [
57
+ "hash"
58
+ ]
59
+ }
60
+ },
61
+ "policies": {},
62
+ "checkConstraints": {},
63
+ "isRLSEnabled": false
64
+ },
65
+ "public.sanoma_app_behind": {
66
+ "name": "sanoma_app_behind",
67
+ "schema": "",
68
+ "columns": {
69
+ "folder": {
70
+ "name": "folder",
71
+ "type": "text",
72
+ "primaryKey": true,
73
+ "notNull": true
74
+ },
75
+ "behind": {
76
+ "name": "behind",
77
+ "type": "integer",
78
+ "primaryKey": false,
79
+ "notNull": false
80
+ },
81
+ "error": {
82
+ "name": "error",
83
+ "type": "text",
84
+ "primaryKey": false,
85
+ "notNull": false
86
+ },
87
+ "checked_at": {
88
+ "name": "checked_at",
89
+ "type": "timestamp with time zone",
90
+ "primaryKey": false,
91
+ "notNull": true,
92
+ "default": "now()"
93
+ }
94
+ },
95
+ "indexes": {},
96
+ "foreignKeys": {},
97
+ "compositePrimaryKeys": {},
98
+ "uniqueConstraints": {},
99
+ "policies": {},
100
+ "checkConstraints": {
101
+ "sanoma_app_behind_one_answer": {
102
+ "name": "sanoma_app_behind_one_answer",
103
+ "value": "(\"sanoma_app_behind\".\"behind\" IS NULL) <> (\"sanoma_app_behind\".\"error\" IS NULL)"
104
+ }
105
+ },
106
+ "isRLSEnabled": false
107
+ },
108
+ "public.sanoma_chat_chunks": {
109
+ "name": "sanoma_chat_chunks",
110
+ "schema": "",
111
+ "columns": {
112
+ "chat_id": {
113
+ "name": "chat_id",
114
+ "type": "text",
115
+ "primaryKey": false,
116
+ "notNull": true
117
+ },
118
+ "run_id": {
119
+ "name": "run_id",
120
+ "type": "text",
121
+ "primaryKey": false,
122
+ "notNull": true
123
+ },
124
+ "seq": {
125
+ "name": "seq",
126
+ "type": "integer",
127
+ "primaryKey": false,
128
+ "notNull": true
129
+ },
130
+ "chunk": {
131
+ "name": "chunk",
132
+ "type": "jsonb",
133
+ "primaryKey": false,
134
+ "notNull": false
135
+ }
136
+ },
137
+ "indexes": {
138
+ "sanoma_chat_chunks_chat": {
139
+ "name": "sanoma_chat_chunks_chat",
140
+ "columns": [
141
+ {
142
+ "expression": "chat_id",
143
+ "isExpression": false,
144
+ "asc": true,
145
+ "nulls": "last"
146
+ }
147
+ ],
148
+ "isUnique": false,
149
+ "concurrently": false,
150
+ "method": "btree",
151
+ "with": {}
152
+ }
153
+ },
154
+ "foreignKeys": {
155
+ "sanoma_chat_chunks_chat_id_sanoma_chats_id_fk": {
156
+ "name": "sanoma_chat_chunks_chat_id_sanoma_chats_id_fk",
157
+ "tableFrom": "sanoma_chat_chunks",
158
+ "tableTo": "sanoma_chats",
159
+ "columnsFrom": [
160
+ "chat_id"
161
+ ],
162
+ "columnsTo": [
163
+ "id"
164
+ ],
165
+ "onDelete": "cascade",
166
+ "onUpdate": "no action"
167
+ }
168
+ },
169
+ "compositePrimaryKeys": {
170
+ "sanoma_chat_chunks_run_id_seq_pk": {
171
+ "name": "sanoma_chat_chunks_run_id_seq_pk",
172
+ "columns": [
173
+ "run_id",
174
+ "seq"
175
+ ]
176
+ }
177
+ },
178
+ "uniqueConstraints": {},
179
+ "policies": {},
180
+ "checkConstraints": {},
181
+ "isRLSEnabled": false
182
+ },
183
+ "public.sanoma_chat_messages": {
184
+ "name": "sanoma_chat_messages",
185
+ "schema": "",
186
+ "columns": {
187
+ "chat_id": {
188
+ "name": "chat_id",
189
+ "type": "text",
190
+ "primaryKey": false,
191
+ "notNull": true
192
+ },
193
+ "id": {
194
+ "name": "id",
195
+ "type": "text",
196
+ "primaryKey": false,
197
+ "notNull": true
198
+ },
199
+ "seq": {
200
+ "name": "seq",
201
+ "type": "integer",
202
+ "primaryKey": false,
203
+ "notNull": true
204
+ },
205
+ "message": {
206
+ "name": "message",
207
+ "type": "jsonb",
208
+ "primaryKey": false,
209
+ "notNull": true
210
+ }
211
+ },
212
+ "indexes": {},
213
+ "foreignKeys": {
214
+ "sanoma_chat_messages_chat_id_sanoma_chats_id_fk": {
215
+ "name": "sanoma_chat_messages_chat_id_sanoma_chats_id_fk",
216
+ "tableFrom": "sanoma_chat_messages",
217
+ "tableTo": "sanoma_chats",
218
+ "columnsFrom": [
219
+ "chat_id"
220
+ ],
221
+ "columnsTo": [
222
+ "id"
223
+ ],
224
+ "onDelete": "cascade",
225
+ "onUpdate": "no action"
226
+ }
227
+ },
228
+ "compositePrimaryKeys": {
229
+ "sanoma_chat_messages_chat_id_id_pk": {
230
+ "name": "sanoma_chat_messages_chat_id_id_pk",
231
+ "columns": [
232
+ "chat_id",
233
+ "id"
234
+ ]
235
+ }
236
+ },
237
+ "uniqueConstraints": {},
238
+ "policies": {},
239
+ "checkConstraints": {},
240
+ "isRLSEnabled": false
241
+ },
242
+ "public.sanoma_chats": {
243
+ "name": "sanoma_chats",
244
+ "schema": "",
245
+ "columns": {
246
+ "id": {
247
+ "name": "id",
248
+ "type": "text",
249
+ "primaryKey": true,
250
+ "notNull": true
251
+ },
252
+ "person": {
253
+ "name": "person",
254
+ "type": "text",
255
+ "primaryKey": false,
256
+ "notNull": true
257
+ },
258
+ "engine": {
259
+ "name": "engine",
260
+ "type": "text",
261
+ "primaryKey": false,
262
+ "notNull": true
263
+ },
264
+ "draft_id": {
265
+ "name": "draft_id",
266
+ "type": "text",
267
+ "primaryKey": false,
268
+ "notNull": false
269
+ },
270
+ "title": {
271
+ "name": "title",
272
+ "type": "text",
273
+ "primaryKey": false,
274
+ "notNull": true
275
+ },
276
+ "created_at": {
277
+ "name": "created_at",
278
+ "type": "timestamp with time zone",
279
+ "primaryKey": false,
280
+ "notNull": true,
281
+ "default": "now()"
282
+ },
283
+ "turn": {
284
+ "name": "turn",
285
+ "type": "text",
286
+ "primaryKey": false,
287
+ "notNull": false
288
+ }
289
+ },
290
+ "indexes": {
291
+ "sanoma_chats_person": {
292
+ "name": "sanoma_chats_person",
293
+ "columns": [
294
+ {
295
+ "expression": "person",
296
+ "isExpression": false,
297
+ "asc": true,
298
+ "nulls": "last"
299
+ },
300
+ {
301
+ "expression": "created_at",
302
+ "isExpression": false,
303
+ "asc": true,
304
+ "nulls": "last"
305
+ }
306
+ ],
307
+ "isUnique": false,
308
+ "concurrently": false,
309
+ "method": "btree",
310
+ "with": {}
311
+ }
312
+ },
313
+ "foreignKeys": {},
314
+ "compositePrimaryKeys": {},
315
+ "uniqueConstraints": {},
316
+ "policies": {},
317
+ "checkConstraints": {},
318
+ "isRLSEnabled": false
319
+ },
320
+ "public.sanoma_connection_health": {
321
+ "name": "sanoma_connection_health",
322
+ "schema": "",
323
+ "columns": {
324
+ "connection_id": {
325
+ "name": "connection_id",
326
+ "type": "text",
327
+ "primaryKey": true,
328
+ "notNull": true
329
+ },
330
+ "revision": {
331
+ "name": "revision",
332
+ "type": "text",
333
+ "primaryKey": false,
334
+ "notNull": true
335
+ },
336
+ "health": {
337
+ "name": "health",
338
+ "type": "text",
339
+ "primaryKey": false,
340
+ "notNull": true
341
+ },
342
+ "credential_version": {
343
+ "name": "credential_version",
344
+ "type": "text",
345
+ "primaryKey": false,
346
+ "notNull": false
347
+ },
348
+ "externally_renewed": {
349
+ "name": "externally_renewed",
350
+ "type": "boolean",
351
+ "primaryKey": false,
352
+ "notNull": true
353
+ },
354
+ "checked_at": {
355
+ "name": "checked_at",
356
+ "type": "timestamp with time zone",
357
+ "primaryKey": false,
358
+ "notNull": true,
359
+ "default": "now()"
360
+ }
361
+ },
362
+ "indexes": {},
363
+ "foreignKeys": {},
364
+ "compositePrimaryKeys": {},
365
+ "uniqueConstraints": {},
366
+ "policies": {},
367
+ "checkConstraints": {},
368
+ "isRLSEnabled": false
369
+ },
370
+ "public.sanoma_connection_setups": {
371
+ "name": "sanoma_connection_setups",
372
+ "schema": "",
373
+ "columns": {
374
+ "connection_id": {
375
+ "name": "connection_id",
376
+ "type": "text",
377
+ "primaryKey": false,
378
+ "notNull": true
379
+ },
380
+ "revision": {
381
+ "name": "revision",
382
+ "type": "text",
383
+ "primaryKey": false,
384
+ "notNull": true
385
+ },
386
+ "credential_version": {
387
+ "name": "credential_version",
388
+ "type": "text",
389
+ "primaryKey": false,
390
+ "notNull": true
391
+ }
392
+ },
393
+ "indexes": {},
394
+ "foreignKeys": {},
395
+ "compositePrimaryKeys": {
396
+ "sanoma_connection_setups_connection_id_revision_pk": {
397
+ "name": "sanoma_connection_setups_connection_id_revision_pk",
398
+ "columns": [
399
+ "connection_id",
400
+ "revision"
401
+ ]
402
+ }
403
+ },
404
+ "uniqueConstraints": {},
405
+ "policies": {},
406
+ "checkConstraints": {},
407
+ "isRLSEnabled": false
408
+ },
409
+ "public.sanoma_connections": {
410
+ "name": "sanoma_connections",
411
+ "schema": "",
412
+ "columns": {
413
+ "id": {
414
+ "name": "id",
415
+ "type": "text",
416
+ "primaryKey": true,
417
+ "notNull": true
418
+ },
419
+ "vendor": {
420
+ "name": "vendor",
421
+ "type": "text",
422
+ "primaryKey": false,
423
+ "notNull": true
424
+ },
425
+ "method": {
426
+ "name": "method",
427
+ "type": "text",
428
+ "primaryKey": false,
429
+ "notNull": true
430
+ },
431
+ "owner": {
432
+ "name": "owner",
433
+ "type": "text",
434
+ "primaryKey": false,
435
+ "notNull": false
436
+ },
437
+ "rule": {
438
+ "name": "rule",
439
+ "type": "text",
440
+ "primaryKey": false,
441
+ "notNull": false
442
+ },
443
+ "account": {
444
+ "name": "account",
445
+ "type": "text",
446
+ "primaryKey": false,
447
+ "notNull": true
448
+ },
449
+ "scopes": {
450
+ "name": "scopes",
451
+ "type": "jsonb",
452
+ "primaryKey": false,
453
+ "notNull": true
454
+ },
455
+ "revision": {
456
+ "name": "revision",
457
+ "type": "text",
458
+ "primaryKey": false,
459
+ "notNull": true
460
+ },
461
+ "definition": {
462
+ "name": "definition",
463
+ "type": "text",
464
+ "primaryKey": false,
465
+ "notNull": true
466
+ },
467
+ "credential": {
468
+ "name": "credential",
469
+ "type": "text",
470
+ "primaryKey": false,
471
+ "notNull": false
472
+ },
473
+ "location": {
474
+ "name": "location",
475
+ "type": "jsonb",
476
+ "primaryKey": false,
477
+ "notNull": false
478
+ },
479
+ "status": {
480
+ "name": "status",
481
+ "type": "text",
482
+ "primaryKey": false,
483
+ "notNull": true,
484
+ "default": "'connected'"
485
+ },
486
+ "updated_by": {
487
+ "name": "updated_by",
488
+ "type": "text",
489
+ "primaryKey": false,
490
+ "notNull": true
491
+ },
492
+ "updated_at": {
493
+ "name": "updated_at",
494
+ "type": "timestamp with time zone",
495
+ "primaryKey": false,
496
+ "notNull": true,
497
+ "default": "now()"
498
+ }
499
+ },
500
+ "indexes": {},
501
+ "foreignKeys": {},
502
+ "compositePrimaryKeys": {},
503
+ "uniqueConstraints": {},
504
+ "policies": {},
505
+ "checkConstraints": {},
506
+ "isRLSEnabled": false
507
+ },
508
+ "public.sanoma_credentials": {
509
+ "name": "sanoma_credentials",
510
+ "schema": "",
511
+ "columns": {
512
+ "namespace": {
513
+ "name": "namespace",
514
+ "type": "text",
515
+ "primaryKey": false,
516
+ "notNull": true
517
+ },
518
+ "name": {
519
+ "name": "name",
520
+ "type": "text",
521
+ "primaryKey": false,
522
+ "notNull": true
523
+ },
524
+ "value": {
525
+ "name": "value",
526
+ "type": "text",
527
+ "primaryKey": false,
528
+ "notNull": true
529
+ },
530
+ "version": {
531
+ "name": "version",
532
+ "type": "text",
533
+ "primaryKey": false,
534
+ "notNull": true
535
+ },
536
+ "set_by": {
537
+ "name": "set_by",
538
+ "type": "text",
539
+ "primaryKey": false,
540
+ "notNull": true
541
+ },
542
+ "set_at": {
543
+ "name": "set_at",
544
+ "type": "timestamp with time zone",
545
+ "primaryKey": false,
546
+ "notNull": true,
547
+ "default": "now()"
548
+ }
549
+ },
550
+ "indexes": {},
551
+ "foreignKeys": {},
552
+ "compositePrimaryKeys": {
553
+ "sanoma_credentials_namespace_name_pk": {
554
+ "name": "sanoma_credentials_namespace_name_pk",
555
+ "columns": [
556
+ "namespace",
557
+ "name"
558
+ ]
559
+ }
560
+ },
561
+ "uniqueConstraints": {},
562
+ "policies": {},
563
+ "checkConstraints": {},
564
+ "isRLSEnabled": false
565
+ },
566
+ "public.sanoma_data": {
567
+ "name": "sanoma_data",
568
+ "schema": "",
569
+ "columns": {
570
+ "collection": {
571
+ "name": "collection",
572
+ "type": "text",
573
+ "primaryKey": false,
574
+ "notNull": true
575
+ },
576
+ "key": {
577
+ "name": "key",
578
+ "type": "text",
579
+ "primaryKey": false,
580
+ "notNull": true
581
+ },
582
+ "record": {
583
+ "name": "record",
584
+ "type": "jsonb",
585
+ "primaryKey": false,
586
+ "notNull": true
587
+ },
588
+ "updated_at": {
589
+ "name": "updated_at",
590
+ "type": "timestamp with time zone",
591
+ "primaryKey": false,
592
+ "notNull": true,
593
+ "default": "now()"
594
+ },
595
+ "updated_by": {
596
+ "name": "updated_by",
597
+ "type": "text",
598
+ "primaryKey": false,
599
+ "notNull": true
600
+ }
601
+ },
602
+ "indexes": {},
603
+ "foreignKeys": {},
604
+ "compositePrimaryKeys": {
605
+ "sanoma_data_collection_key_pk": {
606
+ "name": "sanoma_data_collection_key_pk",
607
+ "columns": [
608
+ "collection",
609
+ "key"
610
+ ]
611
+ }
612
+ },
613
+ "uniqueConstraints": {},
614
+ "policies": {},
615
+ "checkConstraints": {},
616
+ "isRLSEnabled": false
617
+ },
618
+ "public.sanoma_invite_requests": {
619
+ "name": "sanoma_invite_requests",
620
+ "schema": "",
621
+ "columns": {
622
+ "nonce": {
623
+ "name": "nonce",
624
+ "type": "text",
625
+ "primaryKey": true,
626
+ "notNull": true
627
+ },
628
+ "expires_at": {
629
+ "name": "expires_at",
630
+ "type": "timestamp with time zone",
631
+ "primaryKey": false,
632
+ "notNull": true
633
+ }
634
+ },
635
+ "indexes": {},
636
+ "foreignKeys": {},
637
+ "compositePrimaryKeys": {},
638
+ "uniqueConstraints": {},
639
+ "policies": {},
640
+ "checkConstraints": {},
641
+ "isRLSEnabled": false
642
+ },
643
+ "public.sanoma_ledger": {
644
+ "name": "sanoma_ledger",
645
+ "schema": "",
646
+ "columns": {
647
+ "n": {
648
+ "name": "n",
649
+ "type": "bigserial",
650
+ "primaryKey": true,
651
+ "notNull": true
652
+ },
653
+ "id": {
654
+ "name": "id",
655
+ "type": "text",
656
+ "primaryKey": false,
657
+ "notNull": true
658
+ },
659
+ "run_id": {
660
+ "name": "run_id",
661
+ "type": "text",
662
+ "primaryKey": false,
663
+ "notNull": true
664
+ },
665
+ "seq": {
666
+ "name": "seq",
667
+ "type": "integer",
668
+ "primaryKey": false,
669
+ "notNull": true
670
+ },
671
+ "record": {
672
+ "name": "record",
673
+ "type": "jsonb",
674
+ "primaryKey": false,
675
+ "notNull": true
676
+ },
677
+ "target": {
678
+ "name": "target",
679
+ "type": "text",
680
+ "primaryKey": false,
681
+ "notNull": false,
682
+ "generated": {
683
+ "as": "\"record\" ->> 'target'",
684
+ "type": "stored"
685
+ }
686
+ }
687
+ },
688
+ "indexes": {
689
+ "sanoma_ledger_run_seq": {
690
+ "name": "sanoma_ledger_run_seq",
691
+ "columns": [
692
+ {
693
+ "expression": "run_id",
694
+ "isExpression": false,
695
+ "asc": true,
696
+ "nulls": "last"
697
+ },
698
+ {
699
+ "expression": "seq",
700
+ "isExpression": false,
701
+ "asc": true,
702
+ "nulls": "last"
703
+ },
704
+ {
705
+ "expression": "n",
706
+ "isExpression": false,
707
+ "asc": true,
708
+ "nulls": "last"
709
+ }
710
+ ],
711
+ "isUnique": false,
712
+ "concurrently": false,
713
+ "method": "btree",
714
+ "with": {}
715
+ },
716
+ "sanoma_ledger_target": {
717
+ "name": "sanoma_ledger_target",
718
+ "columns": [
719
+ {
720
+ "expression": "target",
721
+ "isExpression": false,
722
+ "asc": true,
723
+ "nulls": "last"
724
+ }
725
+ ],
726
+ "isUnique": false,
727
+ "where": "\"sanoma_ledger\".\"target\" is not null",
728
+ "concurrently": false,
729
+ "method": "btree",
730
+ "with": {}
731
+ }
732
+ },
733
+ "foreignKeys": {},
734
+ "compositePrimaryKeys": {},
735
+ "uniqueConstraints": {
736
+ "sanoma_ledger_id_unique": {
737
+ "name": "sanoma_ledger_id_unique",
738
+ "nullsNotDistinct": false,
739
+ "columns": [
740
+ "id"
741
+ ]
742
+ }
743
+ },
744
+ "policies": {},
745
+ "checkConstraints": {},
746
+ "isRLSEnabled": false
747
+ },
748
+ "public.sanoma_run_checks": {
749
+ "name": "sanoma_run_checks",
750
+ "schema": "",
751
+ "columns": {
752
+ "run_id": {
753
+ "name": "run_id",
754
+ "type": "text",
755
+ "primaryKey": true,
756
+ "notNull": true
757
+ },
758
+ "checks": {
759
+ "name": "checks",
760
+ "type": "jsonb",
761
+ "primaryKey": false,
762
+ "notNull": false
763
+ },
764
+ "error": {
765
+ "name": "error",
766
+ "type": "text",
767
+ "primaryKey": false,
768
+ "notNull": false
769
+ },
770
+ "checked_at": {
771
+ "name": "checked_at",
772
+ "type": "timestamp with time zone",
773
+ "primaryKey": false,
774
+ "notNull": true,
775
+ "default": "now()"
776
+ }
777
+ },
778
+ "indexes": {},
779
+ "foreignKeys": {},
780
+ "compositePrimaryKeys": {},
781
+ "uniqueConstraints": {},
782
+ "policies": {},
783
+ "checkConstraints": {
784
+ "sanoma_run_checks_one_answer": {
785
+ "name": "sanoma_run_checks_one_answer",
786
+ "value": "(\"sanoma_run_checks\".\"checks\" IS NULL) <> (\"sanoma_run_checks\".\"error\" IS NULL)"
787
+ }
788
+ },
789
+ "isRLSEnabled": false
790
+ },
791
+ "public.sanoma_wakeup": {
792
+ "name": "sanoma_wakeup",
793
+ "schema": "",
794
+ "columns": {
795
+ "id": {
796
+ "name": "id",
797
+ "type": "integer",
798
+ "primaryKey": true,
799
+ "notNull": true
800
+ },
801
+ "at": {
802
+ "name": "at",
803
+ "type": "timestamp with time zone",
804
+ "primaryKey": false,
805
+ "notNull": false
806
+ },
807
+ "stopped_at": {
808
+ "name": "stopped_at",
809
+ "type": "timestamp with time zone",
810
+ "primaryKey": false,
811
+ "notNull": false
812
+ },
813
+ "last_error": {
814
+ "name": "last_error",
815
+ "type": "text",
816
+ "primaryKey": false,
817
+ "notNull": false
818
+ }
819
+ },
820
+ "indexes": {},
821
+ "foreignKeys": {},
822
+ "compositePrimaryKeys": {},
823
+ "uniqueConstraints": {},
824
+ "policies": {},
825
+ "checkConstraints": {
826
+ "sanoma_wakeup_one_row": {
827
+ "name": "sanoma_wakeup_one_row",
828
+ "value": "\"sanoma_wakeup\".\"id\" = 1"
829
+ }
830
+ },
831
+ "isRLSEnabled": false
832
+ }
833
+ },
834
+ "enums": {},
835
+ "schemas": {},
836
+ "sequences": {},
837
+ "roles": {},
838
+ "policies": {},
839
+ "views": {},
840
+ "_meta": {
841
+ "columns": {},
842
+ "schemas": {},
843
+ "tables": {}
844
+ }
845
+ }