@sanoma-ai/workflows 0.11.15 → 0.11.16

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 (89) hide show
  1. package/README.md +10 -3
  2. package/dist/app-steps.d.ts +17 -0
  3. package/dist/app-steps.js +43 -0
  4. package/dist/app-steps.js.map +1 -0
  5. package/dist/app-workflows.d.ts +170 -0
  6. package/dist/app-workflows.js +107 -0
  7. package/dist/app-workflows.js.map +1 -0
  8. package/dist/apply-steps.js +3 -9
  9. package/dist/apply-steps.js.map +1 -1
  10. package/dist/approvals.d.ts +1 -1
  11. package/dist/approvals.js +3 -0
  12. package/dist/approvals.js.map +1 -1
  13. package/dist/call.d.ts +2 -1
  14. package/dist/call.js +2 -1
  15. package/dist/call.js.map +1 -1
  16. package/dist/change-steps.js +11 -17
  17. package/dist/change-steps.js.map +1 -1
  18. package/dist/chat-steps.d.ts +5 -0
  19. package/dist/chat-steps.js +107 -0
  20. package/dist/chat-steps.js.map +1 -0
  21. package/dist/chat-workflow.d.ts +43 -0
  22. package/dist/chat-workflow.js +47 -0
  23. package/dist/chat-workflow.js.map +1 -0
  24. package/dist/chats.d.ts +23 -4
  25. package/dist/chats.js +54 -7
  26. package/dist/chats.js.map +1 -1
  27. package/dist/client.d.ts +42 -31
  28. package/dist/client.js +118 -105
  29. package/dist/client.js.map +1 -1
  30. package/dist/config.js +14 -1
  31. package/dist/config.js.map +1 -1
  32. package/dist/db/company.d.ts +259 -2
  33. package/dist/db/company.js +32 -1
  34. package/dist/db/company.js.map +1 -1
  35. package/dist/db.d.ts +15 -0
  36. package/dist/db.js +42 -2
  37. package/dist/db.js.map +1 -1
  38. package/dist/follow-steps.d.ts +8 -0
  39. package/dist/follow-steps.js +113 -0
  40. package/dist/follow-steps.js.map +1 -0
  41. package/dist/follow-workflow.d.ts +56 -0
  42. package/dist/follow-workflow.js +50 -0
  43. package/dist/follow-workflow.js.map +1 -0
  44. package/dist/index.d.ts +5 -2
  45. package/dist/index.js +4 -1
  46. package/dist/index.js.map +1 -1
  47. package/dist/run.d.ts +39 -0
  48. package/dist/run.js +15 -0
  49. package/dist/run.js.map +1 -1
  50. package/dist/sandbox.d.ts +10 -0
  51. package/dist/sandbox.js +42 -4
  52. package/dist/sandbox.js.map +1 -1
  53. package/dist/scenario.d.ts +19 -0
  54. package/dist/scenario.js.map +1 -1
  55. package/dist/seal.d.ts +7 -0
  56. package/dist/seal.js +14 -2
  57. package/dist/seal.js.map +1 -1
  58. package/dist/shared.d.ts +34 -2
  59. package/dist/shared.js +39 -2
  60. package/dist/shared.js.map +1 -1
  61. package/dist/worker.d.ts +8 -0
  62. package/dist/worker.js +116 -10
  63. package/dist/worker.js.map +1 -1
  64. package/drizzle/company/0002_runs_tell_the_app.sql +27 -0
  65. package/drizzle/company/meta/0002_snapshot.json +819 -0
  66. package/drizzle/company/meta/_journal.json +7 -0
  67. package/package.json +1 -1
  68. package/src/app-steps.ts +67 -0
  69. package/src/app-workflows.ts +251 -0
  70. package/src/apply-steps.ts +3 -9
  71. package/src/approvals.ts +3 -1
  72. package/src/call.ts +2 -1
  73. package/src/change-steps.ts +10 -17
  74. package/src/chat-steps.ts +117 -0
  75. package/src/chat-workflow.ts +69 -0
  76. package/src/chats.ts +80 -14
  77. package/src/client.ts +154 -109
  78. package/src/config.ts +14 -0
  79. package/src/db/company.ts +49 -2
  80. package/src/db.ts +51 -3
  81. package/src/follow-steps.ts +129 -0
  82. package/src/follow-workflow.ts +88 -0
  83. package/src/index.ts +19 -1
  84. package/src/run.ts +41 -0
  85. package/src/sandbox.ts +41 -4
  86. package/src/scenario.ts +17 -0
  87. package/src/seal.ts +16 -2
  88. package/src/shared.ts +47 -2
  89. package/src/worker.ts +149 -10
@@ -0,0 +1,819 @@
1
+ {
2
+ "id": "74ad8f94-1d95-46c2-89c2-0263af5bcc8b",
3
+ "prevId": "4eeb061d-222d-4dd5-bef6-c719b07f0556",
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
+ },
678
+ "indexes": {
679
+ "sanoma_ledger_run_seq": {
680
+ "name": "sanoma_ledger_run_seq",
681
+ "columns": [
682
+ {
683
+ "expression": "run_id",
684
+ "isExpression": false,
685
+ "asc": true,
686
+ "nulls": "last"
687
+ },
688
+ {
689
+ "expression": "seq",
690
+ "isExpression": false,
691
+ "asc": true,
692
+ "nulls": "last"
693
+ },
694
+ {
695
+ "expression": "n",
696
+ "isExpression": false,
697
+ "asc": true,
698
+ "nulls": "last"
699
+ }
700
+ ],
701
+ "isUnique": false,
702
+ "concurrently": false,
703
+ "method": "btree",
704
+ "with": {}
705
+ }
706
+ },
707
+ "foreignKeys": {},
708
+ "compositePrimaryKeys": {},
709
+ "uniqueConstraints": {
710
+ "sanoma_ledger_id_unique": {
711
+ "name": "sanoma_ledger_id_unique",
712
+ "nullsNotDistinct": false,
713
+ "columns": [
714
+ "id"
715
+ ]
716
+ }
717
+ },
718
+ "policies": {},
719
+ "checkConstraints": {},
720
+ "isRLSEnabled": false
721
+ },
722
+ "public.sanoma_run_checks": {
723
+ "name": "sanoma_run_checks",
724
+ "schema": "",
725
+ "columns": {
726
+ "run_id": {
727
+ "name": "run_id",
728
+ "type": "text",
729
+ "primaryKey": true,
730
+ "notNull": true
731
+ },
732
+ "checks": {
733
+ "name": "checks",
734
+ "type": "jsonb",
735
+ "primaryKey": false,
736
+ "notNull": false
737
+ },
738
+ "error": {
739
+ "name": "error",
740
+ "type": "text",
741
+ "primaryKey": false,
742
+ "notNull": false
743
+ },
744
+ "checked_at": {
745
+ "name": "checked_at",
746
+ "type": "timestamp with time zone",
747
+ "primaryKey": false,
748
+ "notNull": true,
749
+ "default": "now()"
750
+ }
751
+ },
752
+ "indexes": {},
753
+ "foreignKeys": {},
754
+ "compositePrimaryKeys": {},
755
+ "uniqueConstraints": {},
756
+ "policies": {},
757
+ "checkConstraints": {
758
+ "sanoma_run_checks_one_answer": {
759
+ "name": "sanoma_run_checks_one_answer",
760
+ "value": "(\"sanoma_run_checks\".\"checks\" IS NULL) <> (\"sanoma_run_checks\".\"error\" IS NULL)"
761
+ }
762
+ },
763
+ "isRLSEnabled": false
764
+ },
765
+ "public.sanoma_wakeup": {
766
+ "name": "sanoma_wakeup",
767
+ "schema": "",
768
+ "columns": {
769
+ "id": {
770
+ "name": "id",
771
+ "type": "integer",
772
+ "primaryKey": true,
773
+ "notNull": true
774
+ },
775
+ "at": {
776
+ "name": "at",
777
+ "type": "timestamp with time zone",
778
+ "primaryKey": false,
779
+ "notNull": false
780
+ },
781
+ "stopped_at": {
782
+ "name": "stopped_at",
783
+ "type": "timestamp with time zone",
784
+ "primaryKey": false,
785
+ "notNull": false
786
+ },
787
+ "last_error": {
788
+ "name": "last_error",
789
+ "type": "text",
790
+ "primaryKey": false,
791
+ "notNull": false
792
+ }
793
+ },
794
+ "indexes": {},
795
+ "foreignKeys": {},
796
+ "compositePrimaryKeys": {},
797
+ "uniqueConstraints": {},
798
+ "policies": {},
799
+ "checkConstraints": {
800
+ "sanoma_wakeup_one_row": {
801
+ "name": "sanoma_wakeup_one_row",
802
+ "value": "\"sanoma_wakeup\".\"id\" = 1"
803
+ }
804
+ },
805
+ "isRLSEnabled": false
806
+ }
807
+ },
808
+ "enums": {},
809
+ "schemas": {},
810
+ "sequences": {},
811
+ "roles": {},
812
+ "policies": {},
813
+ "views": {},
814
+ "_meta": {
815
+ "columns": {},
816
+ "schemas": {},
817
+ "tables": {}
818
+ }
819
+ }