@secondlayer/shared 11.6.1 → 11.7.1
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/dist/src/archive/range-digest.d.ts +46 -27
- package/dist/src/archive/semantic-digest-builder.d.ts +46 -27
- package/dist/src/coverage/index.d.ts +46 -27
- package/dist/src/db/index.d.ts +57 -39
- package/dist/src/db/index.js +5 -4
- package/dist/src/db/index.js.map +3 -3
- package/dist/src/db/queries/chain-reorgs.d.ts +46 -27
- package/dist/src/db/queries/chain-reorgs.js +5 -4
- package/dist/src/db/queries/chain-reorgs.js.map +3 -3
- package/dist/src/db/queries/contracts.d.ts +46 -27
- package/dist/src/db/queries/instance.d.ts +46 -27
- package/dist/src/db/queries/integrity.d.ts +47 -28
- package/dist/src/db/queries/integrity.js +4 -3
- package/dist/src/db/queries/integrity.js.map +3 -3
- package/dist/src/db/queries/subgraph-gaps.d.ts +46 -27
- package/dist/src/db/queries/subgraph-operations.d.ts +46 -27
- package/dist/src/db/queries/subgraphs.d.ts +47 -33
- package/dist/src/db/queries/subgraphs.js +1 -10
- package/dist/src/db/queries/subgraphs.js.map +3 -3
- package/dist/src/db/queries/sync-scope.d.ts +46 -27
- package/dist/src/db/queries/webhooks.d.ts +46 -27
- package/dist/src/db/schema.d.ts +53 -36
- package/dist/src/index-http.d.ts +23 -0
- package/dist/src/index-http.js +9 -2
- package/dist/src/index-http.js.map +3 -3
- package/dist/src/index.d.ts +86 -42
- package/dist/src/index.js +58 -6
- package/dist/src/index.js.map +5 -5
- package/dist/src/node/local-client.d.ts +67 -28
- package/dist/src/node/local-client.js +41 -2
- package/dist/src/node/local-client.js.map +5 -4
- package/dist/src/schemas/index.d.ts +23 -1
- package/dist/src/schemas/index.js +38 -1
- package/dist/src/schemas/index.js.map +3 -3
- package/dist/src/schemas/webhooks.d.ts +23 -1
- package/dist/src/schemas/webhooks.js +38 -1
- package/dist/src/schemas/webhooks.js.map +3 -3
- package/dist/src/streams-rows/index.d.ts +43 -1
- package/dist/src/streams-rows/index.js +14 -3
- package/dist/src/streams-rows/index.js.map +3 -3
- package/dist/src/types.d.ts +12 -1
- package/migrations/0131_vm_events.ts +81 -0
- package/migrations/0132_vm_events_type_ordinal_idx.ts +21 -0
- package/migrations/0133_vm_events_fk_cascade.ts +47 -0
- package/migrations/0134_waitlists.ts +64 -0
- package/migrations/0135_drop_hosted_play_and_meters.ts +58 -0
- package/package.json +2 -2
|
@@ -82,6 +82,27 @@ interface EventsArchiveTable {
|
|
|
82
82
|
orphaned_block_hash: string | null;
|
|
83
83
|
archived_at: Generated<Date>;
|
|
84
84
|
}
|
|
85
|
+
interface VmEventsTable {
|
|
86
|
+
id: Generated<string>;
|
|
87
|
+
tx_id: string;
|
|
88
|
+
block_height: number;
|
|
89
|
+
ordinal: number;
|
|
90
|
+
type: string;
|
|
91
|
+
data: unknown;
|
|
92
|
+
created_at: Generated<Date>;
|
|
93
|
+
}
|
|
94
|
+
interface VmEventsArchiveTable {
|
|
95
|
+
archive_id: Generated<string>;
|
|
96
|
+
id: string;
|
|
97
|
+
tx_id: string;
|
|
98
|
+
block_height: number;
|
|
99
|
+
ordinal: number;
|
|
100
|
+
type: string;
|
|
101
|
+
data: unknown;
|
|
102
|
+
created_at: Date;
|
|
103
|
+
orphaned_block_hash: string | null;
|
|
104
|
+
archived_at: Generated<Date>;
|
|
105
|
+
}
|
|
85
106
|
interface DeadLetterEventsTable {
|
|
86
107
|
id: Generated<string>;
|
|
87
108
|
block_height: number;
|
|
@@ -262,21 +283,6 @@ interface MagicLinksTable {
|
|
|
262
283
|
failed_attempts: Generated<number>;
|
|
263
284
|
created_at: Generated<Date>;
|
|
264
285
|
}
|
|
265
|
-
/** One-shot hashed tokens that attach a play ghost to an email at claim. */
|
|
266
|
-
interface ClaimTokensTable {
|
|
267
|
-
id: Generated<string>;
|
|
268
|
-
account_id: string;
|
|
269
|
-
token_hash: string;
|
|
270
|
-
created_at: Generated<Date>;
|
|
271
|
-
expires_at: Date;
|
|
272
|
-
used_at: Date | null;
|
|
273
|
-
}
|
|
274
|
-
/** 3 play provisions per IP per UTC day. PK (ip_hash, day); `count` caps at 3. */
|
|
275
|
-
interface PlayProvisionsTable {
|
|
276
|
-
ip_hash: string;
|
|
277
|
-
day: string;
|
|
278
|
-
count: Generated<number>;
|
|
279
|
-
}
|
|
280
286
|
interface SubgraphProcessingStatsTable {
|
|
281
287
|
id: Generated<string>;
|
|
282
288
|
subgraph_name: string;
|
|
@@ -724,8 +730,10 @@ interface Database {
|
|
|
724
730
|
blocks: BlocksTable;
|
|
725
731
|
transactions: TransactionsTable;
|
|
726
732
|
events: EventsTable;
|
|
733
|
+
vm_events: VmEventsTable;
|
|
727
734
|
transactions_archive: TransactionsArchiveTable;
|
|
728
735
|
events_archive: EventsArchiveTable;
|
|
736
|
+
vm_events_archive: VmEventsArchiveTable;
|
|
729
737
|
dead_letter_events: DeadLetterEventsTable;
|
|
730
738
|
mempool_transactions: MempoolTransactionsTable;
|
|
731
739
|
index_progress: IndexProgressTable;
|
|
@@ -736,8 +744,6 @@ interface Database {
|
|
|
736
744
|
accounts: AccountsTable;
|
|
737
745
|
sessions: SessionsTable;
|
|
738
746
|
magic_links: MagicLinksTable;
|
|
739
|
-
claim_tokens: ClaimTokensTable;
|
|
740
|
-
play_provisions: PlayProvisionsTable;
|
|
741
747
|
subgraph_health_snapshots: SubgraphHealthSnapshotsTable;
|
|
742
748
|
subgraph_processing_stats: SubgraphProcessingStatsTable;
|
|
743
749
|
subgraph_gaps: SubgraphGapsTable;
|
|
@@ -746,7 +752,6 @@ interface Database {
|
|
|
746
752
|
processed_stripe_events: ProcessedStripeEventsTable;
|
|
747
753
|
account_spend_caps: AccountSpendCapsTable;
|
|
748
754
|
account_credits: AccountCreditsTable;
|
|
749
|
-
hosted_meter_days: HostedMeterDaysTable;
|
|
750
755
|
webhooks: WebhooksTable;
|
|
751
756
|
webhook_outbox: WebhookOutboxTable;
|
|
752
757
|
webhook_deliveries: WebhookDeliveriesTable;
|
|
@@ -777,6 +782,8 @@ interface Database {
|
|
|
777
782
|
coverage_segments: CoverageSegmentsTable;
|
|
778
783
|
stage_failures: StageFailuresTable;
|
|
779
784
|
archive_fetches: ArchiveFetchesTable;
|
|
785
|
+
waitlists: WaitlistsTable;
|
|
786
|
+
waitlist_signups: WaitlistSignupsTable;
|
|
780
787
|
}
|
|
781
788
|
interface ServiceHeartbeatsTable {
|
|
782
789
|
name: string;
|
|
@@ -805,15 +812,6 @@ interface AccountCreditsTable {
|
|
|
805
812
|
refill_last_at: Date | null;
|
|
806
813
|
updated_at: Generated<Date>;
|
|
807
814
|
}
|
|
808
|
-
/** Daily idempotency ledger for hosted subgraph running + storage meters. */
|
|
809
|
-
interface HostedMeterDaysTable {
|
|
810
|
-
day: string;
|
|
811
|
-
account_id: string;
|
|
812
|
-
subgraph_name: string;
|
|
813
|
-
kind: string;
|
|
814
|
-
usd_micros: string | number | bigint;
|
|
815
|
-
billed_at: Generated<Date>;
|
|
816
|
-
}
|
|
817
815
|
/**
|
|
818
816
|
* Archive fetch charge log (design-f089 gate). Append-only: one row per
|
|
819
817
|
* priced attempt to fetch a partition object. `usd_micros` is 0 for
|
|
@@ -916,6 +914,27 @@ interface TriggerEvaluatorStateTable {
|
|
|
916
914
|
last_settlement_scan_at: ColumnType<Date | null, Date | null | undefined, Date | null>;
|
|
917
915
|
updated_at: Generated<Date>;
|
|
918
916
|
}
|
|
917
|
+
/** A public waitlist page: what it is for and whether it takes signups. */
|
|
918
|
+
interface WaitlistsTable {
|
|
919
|
+
slug: string;
|
|
920
|
+
title: string;
|
|
921
|
+
description: string;
|
|
922
|
+
url: string;
|
|
923
|
+
opened_at: Generated<Date>;
|
|
924
|
+
/** Null while the list is open. */
|
|
925
|
+
closed_at: Date | null;
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* One signup per (list, contact, token). `answers` holds the list's own
|
|
929
|
+
* questions, validated per list by the API before insert.
|
|
930
|
+
*/
|
|
931
|
+
interface WaitlistSignupsTable {
|
|
932
|
+
id: Generated<string>;
|
|
933
|
+
list: string;
|
|
934
|
+
contact: string;
|
|
935
|
+
answers: Record<string, unknown>;
|
|
936
|
+
created_at: Generated<Date>;
|
|
937
|
+
}
|
|
919
938
|
import { Kysely } from "kysely";
|
|
920
939
|
/**
|
|
921
940
|
* Cheap, SQL-computed digests over a height range — the basis of a verify that
|
|
@@ -82,6 +82,27 @@ interface EventsArchiveTable {
|
|
|
82
82
|
orphaned_block_hash: string | null;
|
|
83
83
|
archived_at: Generated<Date>;
|
|
84
84
|
}
|
|
85
|
+
interface VmEventsTable {
|
|
86
|
+
id: Generated<string>;
|
|
87
|
+
tx_id: string;
|
|
88
|
+
block_height: number;
|
|
89
|
+
ordinal: number;
|
|
90
|
+
type: string;
|
|
91
|
+
data: unknown;
|
|
92
|
+
created_at: Generated<Date>;
|
|
93
|
+
}
|
|
94
|
+
interface VmEventsArchiveTable {
|
|
95
|
+
archive_id: Generated<string>;
|
|
96
|
+
id: string;
|
|
97
|
+
tx_id: string;
|
|
98
|
+
block_height: number;
|
|
99
|
+
ordinal: number;
|
|
100
|
+
type: string;
|
|
101
|
+
data: unknown;
|
|
102
|
+
created_at: Date;
|
|
103
|
+
orphaned_block_hash: string | null;
|
|
104
|
+
archived_at: Generated<Date>;
|
|
105
|
+
}
|
|
85
106
|
interface DeadLetterEventsTable {
|
|
86
107
|
id: Generated<string>;
|
|
87
108
|
block_height: number;
|
|
@@ -262,21 +283,6 @@ interface MagicLinksTable {
|
|
|
262
283
|
failed_attempts: Generated<number>;
|
|
263
284
|
created_at: Generated<Date>;
|
|
264
285
|
}
|
|
265
|
-
/** One-shot hashed tokens that attach a play ghost to an email at claim. */
|
|
266
|
-
interface ClaimTokensTable {
|
|
267
|
-
id: Generated<string>;
|
|
268
|
-
account_id: string;
|
|
269
|
-
token_hash: string;
|
|
270
|
-
created_at: Generated<Date>;
|
|
271
|
-
expires_at: Date;
|
|
272
|
-
used_at: Date | null;
|
|
273
|
-
}
|
|
274
|
-
/** 3 play provisions per IP per UTC day. PK (ip_hash, day); `count` caps at 3. */
|
|
275
|
-
interface PlayProvisionsTable {
|
|
276
|
-
ip_hash: string;
|
|
277
|
-
day: string;
|
|
278
|
-
count: Generated<number>;
|
|
279
|
-
}
|
|
280
286
|
interface SubgraphProcessingStatsTable {
|
|
281
287
|
id: Generated<string>;
|
|
282
288
|
subgraph_name: string;
|
|
@@ -724,8 +730,10 @@ interface Database {
|
|
|
724
730
|
blocks: BlocksTable;
|
|
725
731
|
transactions: TransactionsTable;
|
|
726
732
|
events: EventsTable;
|
|
733
|
+
vm_events: VmEventsTable;
|
|
727
734
|
transactions_archive: TransactionsArchiveTable;
|
|
728
735
|
events_archive: EventsArchiveTable;
|
|
736
|
+
vm_events_archive: VmEventsArchiveTable;
|
|
729
737
|
dead_letter_events: DeadLetterEventsTable;
|
|
730
738
|
mempool_transactions: MempoolTransactionsTable;
|
|
731
739
|
index_progress: IndexProgressTable;
|
|
@@ -736,8 +744,6 @@ interface Database {
|
|
|
736
744
|
accounts: AccountsTable;
|
|
737
745
|
sessions: SessionsTable;
|
|
738
746
|
magic_links: MagicLinksTable;
|
|
739
|
-
claim_tokens: ClaimTokensTable;
|
|
740
|
-
play_provisions: PlayProvisionsTable;
|
|
741
747
|
subgraph_health_snapshots: SubgraphHealthSnapshotsTable;
|
|
742
748
|
subgraph_processing_stats: SubgraphProcessingStatsTable;
|
|
743
749
|
subgraph_gaps: SubgraphGapsTable;
|
|
@@ -746,7 +752,6 @@ interface Database {
|
|
|
746
752
|
processed_stripe_events: ProcessedStripeEventsTable;
|
|
747
753
|
account_spend_caps: AccountSpendCapsTable;
|
|
748
754
|
account_credits: AccountCreditsTable;
|
|
749
|
-
hosted_meter_days: HostedMeterDaysTable;
|
|
750
755
|
webhooks: WebhooksTable;
|
|
751
756
|
webhook_outbox: WebhookOutboxTable;
|
|
752
757
|
webhook_deliveries: WebhookDeliveriesTable;
|
|
@@ -777,6 +782,8 @@ interface Database {
|
|
|
777
782
|
coverage_segments: CoverageSegmentsTable;
|
|
778
783
|
stage_failures: StageFailuresTable;
|
|
779
784
|
archive_fetches: ArchiveFetchesTable;
|
|
785
|
+
waitlists: WaitlistsTable;
|
|
786
|
+
waitlist_signups: WaitlistSignupsTable;
|
|
780
787
|
}
|
|
781
788
|
interface ServiceHeartbeatsTable {
|
|
782
789
|
name: string;
|
|
@@ -805,15 +812,6 @@ interface AccountCreditsTable {
|
|
|
805
812
|
refill_last_at: Date | null;
|
|
806
813
|
updated_at: Generated<Date>;
|
|
807
814
|
}
|
|
808
|
-
/** Daily idempotency ledger for hosted subgraph running + storage meters. */
|
|
809
|
-
interface HostedMeterDaysTable {
|
|
810
|
-
day: string;
|
|
811
|
-
account_id: string;
|
|
812
|
-
subgraph_name: string;
|
|
813
|
-
kind: string;
|
|
814
|
-
usd_micros: string | number | bigint;
|
|
815
|
-
billed_at: Generated<Date>;
|
|
816
|
-
}
|
|
817
815
|
/**
|
|
818
816
|
* Archive fetch charge log (design-f089 gate). Append-only: one row per
|
|
819
817
|
* priced attempt to fetch a partition object. `usd_micros` is 0 for
|
|
@@ -916,6 +914,27 @@ interface TriggerEvaluatorStateTable {
|
|
|
916
914
|
last_settlement_scan_at: ColumnType<Date | null, Date | null | undefined, Date | null>;
|
|
917
915
|
updated_at: Generated<Date>;
|
|
918
916
|
}
|
|
917
|
+
/** A public waitlist page: what it is for and whether it takes signups. */
|
|
918
|
+
interface WaitlistsTable {
|
|
919
|
+
slug: string;
|
|
920
|
+
title: string;
|
|
921
|
+
description: string;
|
|
922
|
+
url: string;
|
|
923
|
+
opened_at: Generated<Date>;
|
|
924
|
+
/** Null while the list is open. */
|
|
925
|
+
closed_at: Date | null;
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* One signup per (list, contact, token). `answers` holds the list's own
|
|
929
|
+
* questions, validated per list by the API before insert.
|
|
930
|
+
*/
|
|
931
|
+
interface WaitlistSignupsTable {
|
|
932
|
+
id: Generated<string>;
|
|
933
|
+
list: string;
|
|
934
|
+
contact: string;
|
|
935
|
+
answers: Record<string, unknown>;
|
|
936
|
+
created_at: Generated<Date>;
|
|
937
|
+
}
|
|
919
938
|
/**
|
|
920
939
|
* v1 canonical byte encoding for chain identity — the shape that lets
|
|
921
940
|
* independently-run runtimes agree on the same block.
|
|
@@ -400,6 +400,27 @@ interface EventsArchiveTable {
|
|
|
400
400
|
orphaned_block_hash: string | null;
|
|
401
401
|
archived_at: Generated<Date>;
|
|
402
402
|
}
|
|
403
|
+
interface VmEventsTable {
|
|
404
|
+
id: Generated<string>;
|
|
405
|
+
tx_id: string;
|
|
406
|
+
block_height: number;
|
|
407
|
+
ordinal: number;
|
|
408
|
+
type: string;
|
|
409
|
+
data: unknown;
|
|
410
|
+
created_at: Generated<Date>;
|
|
411
|
+
}
|
|
412
|
+
interface VmEventsArchiveTable {
|
|
413
|
+
archive_id: Generated<string>;
|
|
414
|
+
id: string;
|
|
415
|
+
tx_id: string;
|
|
416
|
+
block_height: number;
|
|
417
|
+
ordinal: number;
|
|
418
|
+
type: string;
|
|
419
|
+
data: unknown;
|
|
420
|
+
created_at: Date;
|
|
421
|
+
orphaned_block_hash: string | null;
|
|
422
|
+
archived_at: Generated<Date>;
|
|
423
|
+
}
|
|
403
424
|
interface DeadLetterEventsTable {
|
|
404
425
|
id: Generated<string>;
|
|
405
426
|
block_height: number;
|
|
@@ -580,21 +601,6 @@ interface MagicLinksTable {
|
|
|
580
601
|
failed_attempts: Generated<number>;
|
|
581
602
|
created_at: Generated<Date>;
|
|
582
603
|
}
|
|
583
|
-
/** One-shot hashed tokens that attach a play ghost to an email at claim. */
|
|
584
|
-
interface ClaimTokensTable {
|
|
585
|
-
id: Generated<string>;
|
|
586
|
-
account_id: string;
|
|
587
|
-
token_hash: string;
|
|
588
|
-
created_at: Generated<Date>;
|
|
589
|
-
expires_at: Date;
|
|
590
|
-
used_at: Date | null;
|
|
591
|
-
}
|
|
592
|
-
/** 3 play provisions per IP per UTC day. PK (ip_hash, day); `count` caps at 3. */
|
|
593
|
-
interface PlayProvisionsTable {
|
|
594
|
-
ip_hash: string;
|
|
595
|
-
day: string;
|
|
596
|
-
count: Generated<number>;
|
|
597
|
-
}
|
|
598
604
|
interface SubgraphProcessingStatsTable {
|
|
599
605
|
id: Generated<string>;
|
|
600
606
|
subgraph_name: string;
|
|
@@ -1042,8 +1048,10 @@ interface Database {
|
|
|
1042
1048
|
blocks: BlocksTable;
|
|
1043
1049
|
transactions: TransactionsTable;
|
|
1044
1050
|
events: EventsTable;
|
|
1051
|
+
vm_events: VmEventsTable;
|
|
1045
1052
|
transactions_archive: TransactionsArchiveTable;
|
|
1046
1053
|
events_archive: EventsArchiveTable;
|
|
1054
|
+
vm_events_archive: VmEventsArchiveTable;
|
|
1047
1055
|
dead_letter_events: DeadLetterEventsTable;
|
|
1048
1056
|
mempool_transactions: MempoolTransactionsTable;
|
|
1049
1057
|
index_progress: IndexProgressTable;
|
|
@@ -1054,8 +1062,6 @@ interface Database {
|
|
|
1054
1062
|
accounts: AccountsTable;
|
|
1055
1063
|
sessions: SessionsTable;
|
|
1056
1064
|
magic_links: MagicLinksTable;
|
|
1057
|
-
claim_tokens: ClaimTokensTable;
|
|
1058
|
-
play_provisions: PlayProvisionsTable;
|
|
1059
1065
|
subgraph_health_snapshots: SubgraphHealthSnapshotsTable;
|
|
1060
1066
|
subgraph_processing_stats: SubgraphProcessingStatsTable;
|
|
1061
1067
|
subgraph_gaps: SubgraphGapsTable;
|
|
@@ -1064,7 +1070,6 @@ interface Database {
|
|
|
1064
1070
|
processed_stripe_events: ProcessedStripeEventsTable;
|
|
1065
1071
|
account_spend_caps: AccountSpendCapsTable;
|
|
1066
1072
|
account_credits: AccountCreditsTable;
|
|
1067
|
-
hosted_meter_days: HostedMeterDaysTable;
|
|
1068
1073
|
webhooks: WebhooksTable;
|
|
1069
1074
|
webhook_outbox: WebhookOutboxTable;
|
|
1070
1075
|
webhook_deliveries: WebhookDeliveriesTable;
|
|
@@ -1095,6 +1100,8 @@ interface Database {
|
|
|
1095
1100
|
coverage_segments: CoverageSegmentsTable;
|
|
1096
1101
|
stage_failures: StageFailuresTable;
|
|
1097
1102
|
archive_fetches: ArchiveFetchesTable;
|
|
1103
|
+
waitlists: WaitlistsTable;
|
|
1104
|
+
waitlist_signups: WaitlistSignupsTable;
|
|
1098
1105
|
}
|
|
1099
1106
|
interface ServiceHeartbeatsTable {
|
|
1100
1107
|
name: string;
|
|
@@ -1123,15 +1130,6 @@ interface AccountCreditsTable {
|
|
|
1123
1130
|
refill_last_at: Date | null;
|
|
1124
1131
|
updated_at: Generated<Date>;
|
|
1125
1132
|
}
|
|
1126
|
-
/** Daily idempotency ledger for hosted subgraph running + storage meters. */
|
|
1127
|
-
interface HostedMeterDaysTable {
|
|
1128
|
-
day: string;
|
|
1129
|
-
account_id: string;
|
|
1130
|
-
subgraph_name: string;
|
|
1131
|
-
kind: string;
|
|
1132
|
-
usd_micros: string | number | bigint;
|
|
1133
|
-
billed_at: Generated<Date>;
|
|
1134
|
-
}
|
|
1135
1133
|
/**
|
|
1136
1134
|
* Archive fetch charge log (design-f089 gate). Append-only: one row per
|
|
1137
1135
|
* priced attempt to fetch a partition object. `usd_micros` is 0 for
|
|
@@ -1234,6 +1232,27 @@ interface TriggerEvaluatorStateTable {
|
|
|
1234
1232
|
last_settlement_scan_at: ColumnType<Date | null, Date | null | undefined, Date | null>;
|
|
1235
1233
|
updated_at: Generated<Date>;
|
|
1236
1234
|
}
|
|
1235
|
+
/** A public waitlist page: what it is for and whether it takes signups. */
|
|
1236
|
+
interface WaitlistsTable {
|
|
1237
|
+
slug: string;
|
|
1238
|
+
title: string;
|
|
1239
|
+
description: string;
|
|
1240
|
+
url: string;
|
|
1241
|
+
opened_at: Generated<Date>;
|
|
1242
|
+
/** Null while the list is open. */
|
|
1243
|
+
closed_at: Date | null;
|
|
1244
|
+
}
|
|
1245
|
+
/**
|
|
1246
|
+
* One signup per (list, contact, token). `answers` holds the list's own
|
|
1247
|
+
* questions, validated per list by the API before insert.
|
|
1248
|
+
*/
|
|
1249
|
+
interface WaitlistSignupsTable {
|
|
1250
|
+
id: Generated<string>;
|
|
1251
|
+
list: string;
|
|
1252
|
+
contact: string;
|
|
1253
|
+
answers: Record<string, unknown>;
|
|
1254
|
+
created_at: Generated<Date>;
|
|
1255
|
+
}
|
|
1237
1256
|
declare const DECODER_COMMIT_STEPS: readonly ["output", "checkpoint", "receipt", "failure"];
|
|
1238
1257
|
type DecoderCommitStep = (typeof DECODER_COMMIT_STEPS)[number];
|
|
1239
1258
|
declare class DecoderAdapterCrash extends Error {
|
package/dist/src/db/index.d.ts
CHANGED
|
@@ -101,6 +101,27 @@ interface EventsArchiveTable {
|
|
|
101
101
|
orphaned_block_hash: string | null;
|
|
102
102
|
archived_at: Generated<Date>;
|
|
103
103
|
}
|
|
104
|
+
interface VmEventsTable {
|
|
105
|
+
id: Generated<string>;
|
|
106
|
+
tx_id: string;
|
|
107
|
+
block_height: number;
|
|
108
|
+
ordinal: number;
|
|
109
|
+
type: string;
|
|
110
|
+
data: unknown;
|
|
111
|
+
created_at: Generated<Date>;
|
|
112
|
+
}
|
|
113
|
+
interface VmEventsArchiveTable {
|
|
114
|
+
archive_id: Generated<string>;
|
|
115
|
+
id: string;
|
|
116
|
+
tx_id: string;
|
|
117
|
+
block_height: number;
|
|
118
|
+
ordinal: number;
|
|
119
|
+
type: string;
|
|
120
|
+
data: unknown;
|
|
121
|
+
created_at: Date;
|
|
122
|
+
orphaned_block_hash: string | null;
|
|
123
|
+
archived_at: Generated<Date>;
|
|
124
|
+
}
|
|
104
125
|
interface DeadLetterEventsTable {
|
|
105
126
|
id: Generated<string>;
|
|
106
127
|
block_height: number;
|
|
@@ -281,21 +302,6 @@ interface MagicLinksTable {
|
|
|
281
302
|
failed_attempts: Generated<number>;
|
|
282
303
|
created_at: Generated<Date>;
|
|
283
304
|
}
|
|
284
|
-
/** One-shot hashed tokens that attach a play ghost to an email at claim. */
|
|
285
|
-
interface ClaimTokensTable {
|
|
286
|
-
id: Generated<string>;
|
|
287
|
-
account_id: string;
|
|
288
|
-
token_hash: string;
|
|
289
|
-
created_at: Generated<Date>;
|
|
290
|
-
expires_at: Date;
|
|
291
|
-
used_at: Date | null;
|
|
292
|
-
}
|
|
293
|
-
/** 3 play provisions per IP per UTC day. PK (ip_hash, day); `count` caps at 3. */
|
|
294
|
-
interface PlayProvisionsTable {
|
|
295
|
-
ip_hash: string;
|
|
296
|
-
day: string;
|
|
297
|
-
count: Generated<number>;
|
|
298
|
-
}
|
|
299
305
|
interface SubgraphProcessingStatsTable {
|
|
300
306
|
id: Generated<string>;
|
|
301
307
|
subgraph_name: string;
|
|
@@ -743,8 +749,10 @@ interface Database {
|
|
|
743
749
|
blocks: BlocksTable;
|
|
744
750
|
transactions: TransactionsTable;
|
|
745
751
|
events: EventsTable;
|
|
752
|
+
vm_events: VmEventsTable;
|
|
746
753
|
transactions_archive: TransactionsArchiveTable;
|
|
747
754
|
events_archive: EventsArchiveTable;
|
|
755
|
+
vm_events_archive: VmEventsArchiveTable;
|
|
748
756
|
dead_letter_events: DeadLetterEventsTable;
|
|
749
757
|
mempool_transactions: MempoolTransactionsTable;
|
|
750
758
|
index_progress: IndexProgressTable;
|
|
@@ -755,8 +763,6 @@ interface Database {
|
|
|
755
763
|
accounts: AccountsTable;
|
|
756
764
|
sessions: SessionsTable;
|
|
757
765
|
magic_links: MagicLinksTable;
|
|
758
|
-
claim_tokens: ClaimTokensTable;
|
|
759
|
-
play_provisions: PlayProvisionsTable;
|
|
760
766
|
subgraph_health_snapshots: SubgraphHealthSnapshotsTable;
|
|
761
767
|
subgraph_processing_stats: SubgraphProcessingStatsTable;
|
|
762
768
|
subgraph_gaps: SubgraphGapsTable;
|
|
@@ -765,7 +771,6 @@ interface Database {
|
|
|
765
771
|
processed_stripe_events: ProcessedStripeEventsTable;
|
|
766
772
|
account_spend_caps: AccountSpendCapsTable;
|
|
767
773
|
account_credits: AccountCreditsTable;
|
|
768
|
-
hosted_meter_days: HostedMeterDaysTable;
|
|
769
774
|
webhooks: WebhooksTable;
|
|
770
775
|
webhook_outbox: WebhookOutboxTable;
|
|
771
776
|
webhook_deliveries: WebhookDeliveriesTable;
|
|
@@ -796,6 +801,8 @@ interface Database {
|
|
|
796
801
|
coverage_segments: CoverageSegmentsTable;
|
|
797
802
|
stage_failures: StageFailuresTable;
|
|
798
803
|
archive_fetches: ArchiveFetchesTable;
|
|
804
|
+
waitlists: WaitlistsTable;
|
|
805
|
+
waitlist_signups: WaitlistSignupsTable;
|
|
799
806
|
}
|
|
800
807
|
interface ServiceHeartbeatsTable {
|
|
801
808
|
name: string;
|
|
@@ -830,18 +837,6 @@ interface AccountCreditsTable {
|
|
|
830
837
|
type AccountCredits = Selectable<AccountCreditsTable>;
|
|
831
838
|
type InsertAccountCredits = Insertable<AccountCreditsTable>;
|
|
832
839
|
type UpdateAccountCredits = Updateable<AccountCreditsTable>;
|
|
833
|
-
/** Daily idempotency ledger for hosted subgraph running + storage meters. */
|
|
834
|
-
interface HostedMeterDaysTable {
|
|
835
|
-
day: string;
|
|
836
|
-
account_id: string;
|
|
837
|
-
subgraph_name: string;
|
|
838
|
-
kind: string;
|
|
839
|
-
usd_micros: string | number | bigint;
|
|
840
|
-
billed_at: Generated<Date>;
|
|
841
|
-
}
|
|
842
|
-
type HostedMeterDay = Selectable<HostedMeterDaysTable>;
|
|
843
|
-
type InsertHostedMeterDay = Insertable<HostedMeterDaysTable>;
|
|
844
|
-
type UpdateHostedMeterDay = Updateable<HostedMeterDaysTable>;
|
|
845
840
|
/**
|
|
846
841
|
* Archive fetch charge log (design-f089 gate). Append-only: one row per
|
|
847
842
|
* priced attempt to fetch a partition object. `usd_micros` is 0 for
|
|
@@ -870,6 +865,9 @@ type InsertMempoolTransaction = Insertable<MempoolTransactionsTable>;
|
|
|
870
865
|
type Event = Selectable<EventsTable>;
|
|
871
866
|
type InsertEvent = Insertable<EventsTable>;
|
|
872
867
|
type UpdateEvent = Updateable<EventsTable>;
|
|
868
|
+
type VmEvent = Selectable<VmEventsTable>;
|
|
869
|
+
type InsertVmEvent = Insertable<VmEventsTable>;
|
|
870
|
+
type UpdateVmEvent = Updateable<VmEventsTable>;
|
|
873
871
|
type IndexProgress = Selectable<IndexProgressTable>;
|
|
874
872
|
type InsertIndexProgress = Insertable<IndexProgressTable>;
|
|
875
873
|
type UpdateIndexProgress = Updateable<IndexProgressTable>;
|
|
@@ -889,11 +887,6 @@ type Account = Selectable<AccountsTable>;
|
|
|
889
887
|
type InsertAccount = Insertable<AccountsTable>;
|
|
890
888
|
type MagicLink = Selectable<MagicLinksTable>;
|
|
891
889
|
type InsertMagicLink = Insertable<MagicLinksTable>;
|
|
892
|
-
type ClaimToken = Selectable<ClaimTokensTable>;
|
|
893
|
-
type InsertClaimToken = Insertable<ClaimTokensTable>;
|
|
894
|
-
type UpdateClaimToken = Updateable<ClaimTokensTable>;
|
|
895
|
-
type PlayProvision = Selectable<PlayProvisionsTable>;
|
|
896
|
-
type InsertPlayProvision = Insertable<PlayProvisionsTable>;
|
|
897
890
|
type Session = Selectable<SessionsTable>;
|
|
898
891
|
type InsertSession = Insertable<SessionsTable>;
|
|
899
892
|
type SubgraphHealthSnapshot = Selectable<SubgraphHealthSnapshotsTable>;
|
|
@@ -997,6 +990,30 @@ interface TriggerEvaluatorStateTable {
|
|
|
997
990
|
updated_at: Generated<Date>;
|
|
998
991
|
}
|
|
999
992
|
type TriggerEvaluatorState = Selectable<TriggerEvaluatorStateTable>;
|
|
993
|
+
/** A public waitlist page: what it is for and whether it takes signups. */
|
|
994
|
+
interface WaitlistsTable {
|
|
995
|
+
slug: string;
|
|
996
|
+
title: string;
|
|
997
|
+
description: string;
|
|
998
|
+
url: string;
|
|
999
|
+
opened_at: Generated<Date>;
|
|
1000
|
+
/** Null while the list is open. */
|
|
1001
|
+
closed_at: Date | null;
|
|
1002
|
+
}
|
|
1003
|
+
/**
|
|
1004
|
+
* One signup per (list, contact, token). `answers` holds the list's own
|
|
1005
|
+
* questions, validated per list by the API before insert.
|
|
1006
|
+
*/
|
|
1007
|
+
interface WaitlistSignupsTable {
|
|
1008
|
+
id: Generated<string>;
|
|
1009
|
+
list: string;
|
|
1010
|
+
contact: string;
|
|
1011
|
+
answers: Record<string, unknown>;
|
|
1012
|
+
created_at: Generated<Date>;
|
|
1013
|
+
}
|
|
1014
|
+
type Waitlist = Selectable<WaitlistsTable>;
|
|
1015
|
+
type WaitlistSignup = Selectable<WaitlistSignupsTable>;
|
|
1016
|
+
type InsertWaitlistSignup = Insertable<WaitlistSignupsTable>;
|
|
1000
1017
|
import { sql } from "kysely";
|
|
1001
1018
|
import { Selectable as Selectable2 } from "kysely";
|
|
1002
1019
|
/** Widen a single scalar to its driver-accurate read shape. */
|
|
@@ -1883,8 +1900,10 @@ declare const TABLE_TO_DB: {
|
|
|
1883
1900
|
blocks: string
|
|
1884
1901
|
transactions: string
|
|
1885
1902
|
events: string
|
|
1903
|
+
vm_events: string
|
|
1886
1904
|
transactions_archive: string
|
|
1887
1905
|
events_archive: string
|
|
1906
|
+
vm_events_archive: string
|
|
1888
1907
|
dead_letter_events: string
|
|
1889
1908
|
mempool_transactions: string
|
|
1890
1909
|
index_progress: string
|
|
@@ -1918,8 +1937,6 @@ declare const TABLE_TO_DB: {
|
|
|
1918
1937
|
api_keys: string
|
|
1919
1938
|
sessions: string
|
|
1920
1939
|
magic_links: string
|
|
1921
|
-
claim_tokens: string
|
|
1922
|
-
play_provisions: string
|
|
1923
1940
|
account_spend_caps: string
|
|
1924
1941
|
processed_stripe_events: string
|
|
1925
1942
|
webhooks: string
|
|
@@ -1933,8 +1950,9 @@ declare const TABLE_TO_DB: {
|
|
|
1933
1950
|
subgraph_violations: string
|
|
1934
1951
|
subgraph_processing_stats: string
|
|
1935
1952
|
account_credits: string
|
|
1936
|
-
hosted_meter_days: string
|
|
1937
1953
|
archive_fetches: string
|
|
1954
|
+
waitlists: string
|
|
1955
|
+
waitlist_signups: string
|
|
1938
1956
|
service_heartbeats: string
|
|
1939
1957
|
};
|
|
1940
1958
|
/** OSS: one application URL. SOURCE_/TARGET_ are hosted split only. */
|
|
@@ -2006,4 +2024,4 @@ declare function getRawClient(role?: "source" | "target"): ReturnType<typeof pos
|
|
|
2006
2024
|
declare function getRawClientFor(url: string): ReturnType<typeof postgres>;
|
|
2007
2025
|
/** Close all DB connection pools. Call in CLI commands to allow process exit. */
|
|
2008
2026
|
declare function closeDb(): Promise<void>;
|
|
2009
|
-
export { sql, setMigrationRole, parseJsonb, onControlPlane, onChainPlane, jsonb, getTargetDb, getSourceDb, getRawClientFor, getRawClient, getMigrationRole, getDbSplitStatus, getDb, closeDb, assertDbSplit, applicationDatabaseUrl, WebhooksTable, WebhookStatus, WebhookRuntime, WebhookOutboxTable, WebhookOutbox, WebhookKind, WebhookFormat, WebhookDelivery, WebhookDeliveriesTable, Webhook, UpdateWebhookOutbox, UpdateWebhook, UpdateTransaction, UpdateSubgraphOperation, UpdateSubgraph, UpdateIndexProgress,
|
|
2027
|
+
export { sql, setMigrationRole, parseJsonb, onControlPlane, onChainPlane, jsonb, getTargetDb, getSourceDb, getRawClientFor, getRawClient, getMigrationRole, getDbSplitStatus, getDb, closeDb, assertDbSplit, applicationDatabaseUrl, WebhooksTable, WebhookStatus, WebhookRuntime, WebhookOutboxTable, WebhookOutbox, WebhookKind, WebhookFormat, WebhookDelivery, WebhookDeliveriesTable, Webhook, WaitlistsTable, WaitlistSignupsTable, WaitlistSignup, Waitlist, VmEventsTable, VmEventsArchiveTable, VmEvent, UpdateWebhookOutbox, UpdateWebhook, UpdateVmEvent, UpdateTransaction, UpdateSubgraphOperation, UpdateSubgraph, UpdateIndexProgress, UpdateEvent, UpdateContract, UpdateBlock, UpdateArchiveFetch, UpdateApiKey, UpdateAccountSpendCap, UpdateAccountCredits, TriggerEvaluatorStateTable, TriggerEvaluatorState, TransactionsTable, TransactionsArchiveTable, Transaction, TABLE_TO_DB, SyncScopesTable, SubgraphsTable, SubgraphViolationsTable, SubgraphProcessingStatsTable, SubgraphOperationsTable, SubgraphOperationStatus, SubgraphOperationKind, SubgraphOperation, SubgraphHealthSnapshotsTable, SubgraphHealthSnapshot, SubgraphGapsTable, SubgraphGap, Subgraph, StageRunsTable, StageRegistryTable, StageKind, StageFailuresTable, StageBlockReceiptsTable, SessionsTable, Session, ServiceHeartbeatsTable, SbtcTokenEventsTable, SbtcTokenEventType, SbtcSettlementsTable, SbtcEventsTable, SbtcEventTopic, SOURCE_READ_TYPES, SOURCE_READ_PKS, SOURCE_READ_COLUMNS, RunStatus, RetryState, RepairMode, ProcessedStripeEventsTable, Pox5EventsTable, Pox5EventTopic, Pox4FunctionName, Pox4CallsTable, PendingForkBlocksTable, OutboxStatus, ObserverJournalTable, ObserverJournalStatus, NumericAsText, NativeClock, MigrationRole, MempoolTransactionsTable, MempoolTransaction, MagicLinksTable, MagicLink, InstancesTable, InsertWebhookOutbox, InsertWebhookDelivery, InsertWebhook, InsertWaitlistSignup, InsertVmEvent, InsertTransaction, InsertSubgraphOperation, InsertSubgraphHealthSnapshot, InsertSubgraphGap, InsertSubgraph, InsertSession, InsertMempoolTransaction, InsertMagicLink, InsertIndexProgress, InsertEvent, InsertContract, InsertBlock, InsertArchiveFetch, InsertApiKey, InsertAccountSpendCap, InsertAccountCredits, InsertAccount, IndexProgressTable, IndexProgress, IndexPrimaryKey, IndexColumnType, IndexColumn, FailureUnit, FailureClass, EventsTable, EventsArchiveTable, Event, DecoderCheckpointsTable, DecodedEventsTable, DeadLetterEventsTable, DbSplitStatus, DbReadRow, DbPlane, Database, CoverageSegmentsTable, ContractsTable, Contract, ChainReorgsTable, ChainReadCacheTable, BurnBlockRewardsTable, BurnBlockRewardSlotsTable, BnsNamespacesTable, BnsNamespaceEventsTable, BnsNamespaceEventStatus, BnsNamesTable, BnsNameEventsTable, BnsNameEventTopic, BnsMarketplaceEventsTable, BnsMarketplaceAction, BlocksTable, Block, ArchiveFetchesTable, ArchiveFetch, ApiKeysTable, ApiKey, AccountsTable, AccountSpendCapsTable, AccountSpendCap, AccountCreditsTable, AccountCredits, Account };
|
package/dist/src/db/index.js
CHANGED
|
@@ -737,8 +737,10 @@ var TABLE_TO_DB = {
|
|
|
737
737
|
blocks: "source",
|
|
738
738
|
transactions: "source",
|
|
739
739
|
events: "source",
|
|
740
|
+
vm_events: "source",
|
|
740
741
|
transactions_archive: "source",
|
|
741
742
|
events_archive: "source",
|
|
743
|
+
vm_events_archive: "source",
|
|
742
744
|
dead_letter_events: "source",
|
|
743
745
|
mempool_transactions: "source",
|
|
744
746
|
index_progress: "source",
|
|
@@ -772,8 +774,6 @@ var TABLE_TO_DB = {
|
|
|
772
774
|
api_keys: "target",
|
|
773
775
|
sessions: "target",
|
|
774
776
|
magic_links: "target",
|
|
775
|
-
claim_tokens: "target",
|
|
776
|
-
play_provisions: "target",
|
|
777
777
|
account_spend_caps: "target",
|
|
778
778
|
processed_stripe_events: "target",
|
|
779
779
|
webhooks: "target",
|
|
@@ -787,8 +787,9 @@ var TABLE_TO_DB = {
|
|
|
787
787
|
subgraph_violations: "target",
|
|
788
788
|
subgraph_processing_stats: "target",
|
|
789
789
|
account_credits: "target",
|
|
790
|
-
hosted_meter_days: "target",
|
|
791
790
|
archive_fetches: "target",
|
|
791
|
+
waitlists: "target",
|
|
792
|
+
waitlist_signups: "target",
|
|
792
793
|
service_heartbeats: "both"
|
|
793
794
|
};
|
|
794
795
|
|
|
@@ -991,5 +992,5 @@ export {
|
|
|
991
992
|
SOURCE_READ_COLUMNS
|
|
992
993
|
};
|
|
993
994
|
|
|
994
|
-
//# debugId=
|
|
995
|
+
//# debugId=9B89E15CFB7142D864756E2164756E21
|
|
995
996
|
//# sourceMappingURL=index.js.map
|