@secondlayer/shared 13.12.0 → 13.13.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 +53 -0
- package/dist/src/archive/semantic-digest-builder.d.ts +53 -0
- package/dist/src/coverage/index.d.ts +53 -0
- package/dist/src/db/index.d.ts +66 -2
- package/dist/src/db/index.js +5 -1
- package/dist/src/db/index.js.map +3 -3
- package/dist/src/db/queries/chain-reorgs.d.ts +53 -0
- package/dist/src/db/queries/chain-reorgs.js +5 -1
- package/dist/src/db/queries/chain-reorgs.js.map +3 -3
- package/dist/src/db/queries/contracts.d.ts +53 -0
- package/dist/src/db/queries/instance.d.ts +53 -0
- package/dist/src/db/queries/integrity.d.ts +53 -0
- package/dist/src/db/queries/subgraph-gaps.d.ts +53 -0
- package/dist/src/db/queries/subgraph-operations.d.ts +53 -0
- package/dist/src/db/queries/subgraphs.d.ts +53 -0
- package/dist/src/db/queries/sync-scope.d.ts +53 -0
- package/dist/src/db/queries/webhook-replays.d.ts +1431 -0
- package/dist/src/db/queries/webhook-replays.js +156 -0
- package/dist/src/db/queries/webhook-replays.js.map +10 -0
- package/dist/src/db/queries/webhooks.d.ts +53 -0
- package/dist/src/db/schema.d.ts +62 -2
- package/dist/src/email/index.d.ts +27 -6
- package/dist/src/email/index.js +135 -29
- package/dist/src/email/index.js.map +3 -3
- package/dist/src/index.d.ts +66 -2
- package/dist/src/index.js +9 -1
- package/dist/src/index.js.map +4 -4
- package/dist/src/insights/index.d.ts +70 -3
- package/dist/src/insights/index.js +40 -3
- package/dist/src/insights/index.js.map +3 -3
- package/dist/src/node/local-client.d.ts +53 -0
- package/dist/src/queue/listener.js +5 -1
- package/dist/src/queue/listener.js.map +3 -3
- package/dist/src/schemas/index.js +5 -1
- package/dist/src/schemas/index.js.map +3 -3
- package/dist/src/schemas/webhooks.d.ts +45 -1
- package/dist/src/schemas/webhooks.js +6 -1
- package/dist/src/schemas/webhooks.js.map +3 -3
- package/migrations/0178_insight_snooze.ts +22 -0
- package/migrations/0179_webhook_replays.ts +56 -0
- package/migrations/0180_push.ts +54 -0
- package/migrations/0181_push_sent.ts +30 -0
- package/package.json +5 -1
|
@@ -402,6 +402,7 @@ interface InsightsTable {
|
|
|
402
402
|
clear_streak: Generated<number>;
|
|
403
403
|
resolved_at: Date | null;
|
|
404
404
|
dismissed_at: Date | null;
|
|
405
|
+
snoozed_until: Date | null;
|
|
405
406
|
}
|
|
406
407
|
/** "Expected": mutes one rule for one resource until removed. */
|
|
407
408
|
interface InsightMutesTable {
|
|
@@ -895,6 +896,7 @@ interface Database {
|
|
|
895
896
|
webhooks: WebhooksTable;
|
|
896
897
|
webhook_outbox: WebhookOutboxTable;
|
|
897
898
|
webhook_deliveries: WebhookDeliveriesTable;
|
|
899
|
+
webhook_replays: WebhookReplaysTable;
|
|
898
900
|
trigger_evaluator_state: TriggerEvaluatorStateTable;
|
|
899
901
|
decoded_events: DecodedEventsTable;
|
|
900
902
|
decoder_checkpoints: DecoderCheckpointsTable;
|
|
@@ -943,6 +945,9 @@ interface Database {
|
|
|
943
945
|
insights: InsightsTable;
|
|
944
946
|
insight_mutes: InsightMutesTable;
|
|
945
947
|
feedback_tickets: FeedbackTicketsTable;
|
|
948
|
+
push_subscriptions: PushSubscriptionsTable;
|
|
949
|
+
push_prefs: PushPrefsTable;
|
|
950
|
+
push_sent: PushSentTable;
|
|
946
951
|
}
|
|
947
952
|
interface ServiceHeartbeatsTable {
|
|
948
953
|
name: string;
|
|
@@ -1035,6 +1040,36 @@ interface WebhookIncidentAlertsTable {
|
|
|
1035
1040
|
email_attempts: Generated<number>;
|
|
1036
1041
|
resolved_at: Date | null;
|
|
1037
1042
|
}
|
|
1043
|
+
/** One browser/device push subscription; the endpoint is unique. */
|
|
1044
|
+
interface PushSubscriptionsTable {
|
|
1045
|
+
id: Generated<string>;
|
|
1046
|
+
account_id: string;
|
|
1047
|
+
endpoint: string;
|
|
1048
|
+
p256dh: string;
|
|
1049
|
+
auth: string;
|
|
1050
|
+
user_agent: string | null;
|
|
1051
|
+
created_at: Generated<Date>;
|
|
1052
|
+
last_success_at: Date | null;
|
|
1053
|
+
failed_count: Generated<number>;
|
|
1054
|
+
}
|
|
1055
|
+
/** Per-account push toggles. A missing row means the column defaults. */
|
|
1056
|
+
interface PushPrefsTable {
|
|
1057
|
+
account_id: string;
|
|
1058
|
+
webhook_failing: Generated<boolean>;
|
|
1059
|
+
subgraph_stopped: Generated<boolean>;
|
|
1060
|
+
subgraph_not_serving: Generated<boolean>;
|
|
1061
|
+
replay_done: Generated<boolean>;
|
|
1062
|
+
spend_cap: Generated<boolean>;
|
|
1063
|
+
key_repeat: Generated<boolean>;
|
|
1064
|
+
updated_at: Generated<Date>;
|
|
1065
|
+
}
|
|
1066
|
+
/** A push already sent, keyed by what it was about; debounces repeat signals. */
|
|
1067
|
+
interface PushSentTable {
|
|
1068
|
+
account_id: string;
|
|
1069
|
+
key: string;
|
|
1070
|
+
kind: string;
|
|
1071
|
+
sent_at: Generated<Date>;
|
|
1072
|
+
}
|
|
1038
1073
|
type CliDeviceLoginStatus = "pending" | "approved" | "denied" | "consumed";
|
|
1039
1074
|
/** The product that started a CLI sign-in; null is `sl login`. */
|
|
1040
1075
|
type CliDeviceProduct = "sentinel";
|
|
@@ -1178,6 +1213,8 @@ interface WebhookOutboxTable {
|
|
|
1178
1213
|
next_attempt_at: Generated<Date>;
|
|
1179
1214
|
status: ColumnType<OutboxStatus, OutboxStatus | undefined, OutboxStatus>;
|
|
1180
1215
|
is_replay: Generated<boolean>;
|
|
1216
|
+
/** The replay that created this row; null for live rows. */
|
|
1217
|
+
replay_id: string | null;
|
|
1181
1218
|
/** The chain block_time of the matched event/tx. Null for rows written
|
|
1182
1219
|
* before this column existed, and for the settlement scan path (not yet
|
|
1183
1220
|
* wired). Lets `delivered_at - block_time` measure end-to-end webhook
|
|
@@ -1193,6 +1230,22 @@ interface WebhookOutboxTable {
|
|
|
1193
1230
|
last_error: string | null;
|
|
1194
1231
|
created_at: Generated<Date>;
|
|
1195
1232
|
}
|
|
1233
|
+
type WebhookReplayStatus = "scanning" | "running" | "done" | "failed";
|
|
1234
|
+
interface WebhookReplaysTable {
|
|
1235
|
+
id: string;
|
|
1236
|
+
webhook_id: string;
|
|
1237
|
+
from_block: number | bigint;
|
|
1238
|
+
to_block: number | bigint;
|
|
1239
|
+
status: WebhookReplayStatus;
|
|
1240
|
+
scanned_count: Generated<number>;
|
|
1241
|
+
enqueued_count: Generated<number>;
|
|
1242
|
+
total: number | null;
|
|
1243
|
+
delivered: number | null;
|
|
1244
|
+
gave_up: number | null;
|
|
1245
|
+
error: string | null;
|
|
1246
|
+
started_at: Generated<Date>;
|
|
1247
|
+
finished_at: Date | null;
|
|
1248
|
+
}
|
|
1196
1249
|
interface WebhookDeliveriesTable {
|
|
1197
1250
|
id: Generated<string>;
|
|
1198
1251
|
/** Nullable after migration 0077 — outbox row may be cleaned up while
|
|
@@ -402,6 +402,7 @@ interface InsightsTable {
|
|
|
402
402
|
clear_streak: Generated<number>;
|
|
403
403
|
resolved_at: Date | null;
|
|
404
404
|
dismissed_at: Date | null;
|
|
405
|
+
snoozed_until: Date | null;
|
|
405
406
|
}
|
|
406
407
|
/** "Expected": mutes one rule for one resource until removed. */
|
|
407
408
|
interface InsightMutesTable {
|
|
@@ -895,6 +896,7 @@ interface Database {
|
|
|
895
896
|
webhooks: WebhooksTable;
|
|
896
897
|
webhook_outbox: WebhookOutboxTable;
|
|
897
898
|
webhook_deliveries: WebhookDeliveriesTable;
|
|
899
|
+
webhook_replays: WebhookReplaysTable;
|
|
898
900
|
trigger_evaluator_state: TriggerEvaluatorStateTable;
|
|
899
901
|
decoded_events: DecodedEventsTable;
|
|
900
902
|
decoder_checkpoints: DecoderCheckpointsTable;
|
|
@@ -943,6 +945,9 @@ interface Database {
|
|
|
943
945
|
insights: InsightsTable;
|
|
944
946
|
insight_mutes: InsightMutesTable;
|
|
945
947
|
feedback_tickets: FeedbackTicketsTable;
|
|
948
|
+
push_subscriptions: PushSubscriptionsTable;
|
|
949
|
+
push_prefs: PushPrefsTable;
|
|
950
|
+
push_sent: PushSentTable;
|
|
946
951
|
}
|
|
947
952
|
interface ServiceHeartbeatsTable {
|
|
948
953
|
name: string;
|
|
@@ -1035,6 +1040,36 @@ interface WebhookIncidentAlertsTable {
|
|
|
1035
1040
|
email_attempts: Generated<number>;
|
|
1036
1041
|
resolved_at: Date | null;
|
|
1037
1042
|
}
|
|
1043
|
+
/** One browser/device push subscription; the endpoint is unique. */
|
|
1044
|
+
interface PushSubscriptionsTable {
|
|
1045
|
+
id: Generated<string>;
|
|
1046
|
+
account_id: string;
|
|
1047
|
+
endpoint: string;
|
|
1048
|
+
p256dh: string;
|
|
1049
|
+
auth: string;
|
|
1050
|
+
user_agent: string | null;
|
|
1051
|
+
created_at: Generated<Date>;
|
|
1052
|
+
last_success_at: Date | null;
|
|
1053
|
+
failed_count: Generated<number>;
|
|
1054
|
+
}
|
|
1055
|
+
/** Per-account push toggles. A missing row means the column defaults. */
|
|
1056
|
+
interface PushPrefsTable {
|
|
1057
|
+
account_id: string;
|
|
1058
|
+
webhook_failing: Generated<boolean>;
|
|
1059
|
+
subgraph_stopped: Generated<boolean>;
|
|
1060
|
+
subgraph_not_serving: Generated<boolean>;
|
|
1061
|
+
replay_done: Generated<boolean>;
|
|
1062
|
+
spend_cap: Generated<boolean>;
|
|
1063
|
+
key_repeat: Generated<boolean>;
|
|
1064
|
+
updated_at: Generated<Date>;
|
|
1065
|
+
}
|
|
1066
|
+
/** A push already sent, keyed by what it was about; debounces repeat signals. */
|
|
1067
|
+
interface PushSentTable {
|
|
1068
|
+
account_id: string;
|
|
1069
|
+
key: string;
|
|
1070
|
+
kind: string;
|
|
1071
|
+
sent_at: Generated<Date>;
|
|
1072
|
+
}
|
|
1038
1073
|
type CliDeviceLoginStatus = "pending" | "approved" | "denied" | "consumed";
|
|
1039
1074
|
/** The product that started a CLI sign-in; null is `sl login`. */
|
|
1040
1075
|
type CliDeviceProduct = "sentinel";
|
|
@@ -1179,6 +1214,8 @@ interface WebhookOutboxTable {
|
|
|
1179
1214
|
next_attempt_at: Generated<Date>;
|
|
1180
1215
|
status: ColumnType<OutboxStatus, OutboxStatus | undefined, OutboxStatus>;
|
|
1181
1216
|
is_replay: Generated<boolean>;
|
|
1217
|
+
/** The replay that created this row; null for live rows. */
|
|
1218
|
+
replay_id: string | null;
|
|
1182
1219
|
/** The chain block_time of the matched event/tx. Null for rows written
|
|
1183
1220
|
* before this column existed, and for the settlement scan path (not yet
|
|
1184
1221
|
* wired). Lets `delivered_at - block_time` measure end-to-end webhook
|
|
@@ -1194,6 +1231,22 @@ interface WebhookOutboxTable {
|
|
|
1194
1231
|
last_error: string | null;
|
|
1195
1232
|
created_at: Generated<Date>;
|
|
1196
1233
|
}
|
|
1234
|
+
type WebhookReplayStatus = "scanning" | "running" | "done" | "failed";
|
|
1235
|
+
interface WebhookReplaysTable {
|
|
1236
|
+
id: string;
|
|
1237
|
+
webhook_id: string;
|
|
1238
|
+
from_block: number | bigint;
|
|
1239
|
+
to_block: number | bigint;
|
|
1240
|
+
status: WebhookReplayStatus;
|
|
1241
|
+
scanned_count: Generated<number>;
|
|
1242
|
+
enqueued_count: Generated<number>;
|
|
1243
|
+
total: number | null;
|
|
1244
|
+
delivered: number | null;
|
|
1245
|
+
gave_up: number | null;
|
|
1246
|
+
error: string | null;
|
|
1247
|
+
started_at: Generated<Date>;
|
|
1248
|
+
finished_at: Date | null;
|
|
1249
|
+
}
|
|
1197
1250
|
interface WebhookDeliveriesTable {
|
|
1198
1251
|
id: Generated<string>;
|
|
1199
1252
|
/** Nullable after migration 0077 — outbox row may be cleaned up while
|
|
@@ -402,6 +402,7 @@ interface InsightsTable {
|
|
|
402
402
|
clear_streak: Generated<number>;
|
|
403
403
|
resolved_at: Date | null;
|
|
404
404
|
dismissed_at: Date | null;
|
|
405
|
+
snoozed_until: Date | null;
|
|
405
406
|
}
|
|
406
407
|
/** "Expected": mutes one rule for one resource until removed. */
|
|
407
408
|
interface InsightMutesTable {
|
|
@@ -895,6 +896,7 @@ interface Database {
|
|
|
895
896
|
webhooks: WebhooksTable;
|
|
896
897
|
webhook_outbox: WebhookOutboxTable;
|
|
897
898
|
webhook_deliveries: WebhookDeliveriesTable;
|
|
899
|
+
webhook_replays: WebhookReplaysTable;
|
|
898
900
|
trigger_evaluator_state: TriggerEvaluatorStateTable;
|
|
899
901
|
decoded_events: DecodedEventsTable;
|
|
900
902
|
decoder_checkpoints: DecoderCheckpointsTable;
|
|
@@ -943,6 +945,9 @@ interface Database {
|
|
|
943
945
|
insights: InsightsTable;
|
|
944
946
|
insight_mutes: InsightMutesTable;
|
|
945
947
|
feedback_tickets: FeedbackTicketsTable;
|
|
948
|
+
push_subscriptions: PushSubscriptionsTable;
|
|
949
|
+
push_prefs: PushPrefsTable;
|
|
950
|
+
push_sent: PushSentTable;
|
|
946
951
|
}
|
|
947
952
|
interface ServiceHeartbeatsTable {
|
|
948
953
|
name: string;
|
|
@@ -1035,6 +1040,36 @@ interface WebhookIncidentAlertsTable {
|
|
|
1035
1040
|
email_attempts: Generated<number>;
|
|
1036
1041
|
resolved_at: Date | null;
|
|
1037
1042
|
}
|
|
1043
|
+
/** One browser/device push subscription; the endpoint is unique. */
|
|
1044
|
+
interface PushSubscriptionsTable {
|
|
1045
|
+
id: Generated<string>;
|
|
1046
|
+
account_id: string;
|
|
1047
|
+
endpoint: string;
|
|
1048
|
+
p256dh: string;
|
|
1049
|
+
auth: string;
|
|
1050
|
+
user_agent: string | null;
|
|
1051
|
+
created_at: Generated<Date>;
|
|
1052
|
+
last_success_at: Date | null;
|
|
1053
|
+
failed_count: Generated<number>;
|
|
1054
|
+
}
|
|
1055
|
+
/** Per-account push toggles. A missing row means the column defaults. */
|
|
1056
|
+
interface PushPrefsTable {
|
|
1057
|
+
account_id: string;
|
|
1058
|
+
webhook_failing: Generated<boolean>;
|
|
1059
|
+
subgraph_stopped: Generated<boolean>;
|
|
1060
|
+
subgraph_not_serving: Generated<boolean>;
|
|
1061
|
+
replay_done: Generated<boolean>;
|
|
1062
|
+
spend_cap: Generated<boolean>;
|
|
1063
|
+
key_repeat: Generated<boolean>;
|
|
1064
|
+
updated_at: Generated<Date>;
|
|
1065
|
+
}
|
|
1066
|
+
/** A push already sent, keyed by what it was about; debounces repeat signals. */
|
|
1067
|
+
interface PushSentTable {
|
|
1068
|
+
account_id: string;
|
|
1069
|
+
key: string;
|
|
1070
|
+
kind: string;
|
|
1071
|
+
sent_at: Generated<Date>;
|
|
1072
|
+
}
|
|
1038
1073
|
type CliDeviceLoginStatus = "pending" | "approved" | "denied" | "consumed";
|
|
1039
1074
|
/** The product that started a CLI sign-in; null is `sl login`. */
|
|
1040
1075
|
type CliDeviceProduct = "sentinel";
|
|
@@ -1179,6 +1214,8 @@ interface WebhookOutboxTable {
|
|
|
1179
1214
|
next_attempt_at: Generated<Date>;
|
|
1180
1215
|
status: ColumnType<OutboxStatus, OutboxStatus | undefined, OutboxStatus>;
|
|
1181
1216
|
is_replay: Generated<boolean>;
|
|
1217
|
+
/** The replay that created this row; null for live rows. */
|
|
1218
|
+
replay_id: string | null;
|
|
1182
1219
|
/** The chain block_time of the matched event/tx. Null for rows written
|
|
1183
1220
|
* before this column existed, and for the settlement scan path (not yet
|
|
1184
1221
|
* wired). Lets `delivered_at - block_time` measure end-to-end webhook
|
|
@@ -1194,6 +1231,22 @@ interface WebhookOutboxTable {
|
|
|
1194
1231
|
last_error: string | null;
|
|
1195
1232
|
created_at: Generated<Date>;
|
|
1196
1233
|
}
|
|
1234
|
+
type WebhookReplayStatus = "scanning" | "running" | "done" | "failed";
|
|
1235
|
+
interface WebhookReplaysTable {
|
|
1236
|
+
id: string;
|
|
1237
|
+
webhook_id: string;
|
|
1238
|
+
from_block: number | bigint;
|
|
1239
|
+
to_block: number | bigint;
|
|
1240
|
+
status: WebhookReplayStatus;
|
|
1241
|
+
scanned_count: Generated<number>;
|
|
1242
|
+
enqueued_count: Generated<number>;
|
|
1243
|
+
total: number | null;
|
|
1244
|
+
delivered: number | null;
|
|
1245
|
+
gave_up: number | null;
|
|
1246
|
+
error: string | null;
|
|
1247
|
+
started_at: Generated<Date>;
|
|
1248
|
+
finished_at: Date | null;
|
|
1249
|
+
}
|
|
1197
1250
|
interface WebhookDeliveriesTable {
|
|
1198
1251
|
id: Generated<string>;
|
|
1199
1252
|
/** Nullable after migration 0077 — outbox row may be cleaned up while
|
|
@@ -412,6 +412,7 @@ interface InsightsTable {
|
|
|
412
412
|
clear_streak: Generated<number>;
|
|
413
413
|
resolved_at: Date | null;
|
|
414
414
|
dismissed_at: Date | null;
|
|
415
|
+
snoozed_until: Date | null;
|
|
415
416
|
}
|
|
416
417
|
/** "Expected": mutes one rule for one resource until removed. */
|
|
417
418
|
interface InsightMutesTable {
|
|
@@ -905,6 +906,7 @@ interface Database {
|
|
|
905
906
|
webhooks: WebhooksTable;
|
|
906
907
|
webhook_outbox: WebhookOutboxTable;
|
|
907
908
|
webhook_deliveries: WebhookDeliveriesTable;
|
|
909
|
+
webhook_replays: WebhookReplaysTable;
|
|
908
910
|
trigger_evaluator_state: TriggerEvaluatorStateTable;
|
|
909
911
|
decoded_events: DecodedEventsTable;
|
|
910
912
|
decoder_checkpoints: DecoderCheckpointsTable;
|
|
@@ -953,6 +955,9 @@ interface Database {
|
|
|
953
955
|
insights: InsightsTable;
|
|
954
956
|
insight_mutes: InsightMutesTable;
|
|
955
957
|
feedback_tickets: FeedbackTicketsTable;
|
|
958
|
+
push_subscriptions: PushSubscriptionsTable;
|
|
959
|
+
push_prefs: PushPrefsTable;
|
|
960
|
+
push_sent: PushSentTable;
|
|
956
961
|
}
|
|
957
962
|
interface ServiceHeartbeatsTable {
|
|
958
963
|
name: string;
|
|
@@ -1045,6 +1050,36 @@ interface WebhookIncidentAlertsTable {
|
|
|
1045
1050
|
email_attempts: Generated<number>;
|
|
1046
1051
|
resolved_at: Date | null;
|
|
1047
1052
|
}
|
|
1053
|
+
/** One browser/device push subscription; the endpoint is unique. */
|
|
1054
|
+
interface PushSubscriptionsTable {
|
|
1055
|
+
id: Generated<string>;
|
|
1056
|
+
account_id: string;
|
|
1057
|
+
endpoint: string;
|
|
1058
|
+
p256dh: string;
|
|
1059
|
+
auth: string;
|
|
1060
|
+
user_agent: string | null;
|
|
1061
|
+
created_at: Generated<Date>;
|
|
1062
|
+
last_success_at: Date | null;
|
|
1063
|
+
failed_count: Generated<number>;
|
|
1064
|
+
}
|
|
1065
|
+
/** Per-account push toggles. A missing row means the column defaults. */
|
|
1066
|
+
interface PushPrefsTable {
|
|
1067
|
+
account_id: string;
|
|
1068
|
+
webhook_failing: Generated<boolean>;
|
|
1069
|
+
subgraph_stopped: Generated<boolean>;
|
|
1070
|
+
subgraph_not_serving: Generated<boolean>;
|
|
1071
|
+
replay_done: Generated<boolean>;
|
|
1072
|
+
spend_cap: Generated<boolean>;
|
|
1073
|
+
key_repeat: Generated<boolean>;
|
|
1074
|
+
updated_at: Generated<Date>;
|
|
1075
|
+
}
|
|
1076
|
+
/** A push already sent, keyed by what it was about; debounces repeat signals. */
|
|
1077
|
+
interface PushSentTable {
|
|
1078
|
+
account_id: string;
|
|
1079
|
+
key: string;
|
|
1080
|
+
kind: string;
|
|
1081
|
+
sent_at: Generated<Date>;
|
|
1082
|
+
}
|
|
1048
1083
|
type CliDeviceLoginStatus = "pending" | "approved" | "denied" | "consumed";
|
|
1049
1084
|
/** The product that started a CLI sign-in; null is `sl login`. */
|
|
1050
1085
|
type CliDeviceProduct = "sentinel";
|
|
@@ -1188,6 +1223,8 @@ interface WebhookOutboxTable {
|
|
|
1188
1223
|
next_attempt_at: Generated<Date>;
|
|
1189
1224
|
status: ColumnType<OutboxStatus, OutboxStatus | undefined, OutboxStatus>;
|
|
1190
1225
|
is_replay: Generated<boolean>;
|
|
1226
|
+
/** The replay that created this row; null for live rows. */
|
|
1227
|
+
replay_id: string | null;
|
|
1191
1228
|
/** The chain block_time of the matched event/tx. Null for rows written
|
|
1192
1229
|
* before this column existed, and for the settlement scan path (not yet
|
|
1193
1230
|
* wired). Lets `delivered_at - block_time` measure end-to-end webhook
|
|
@@ -1203,6 +1240,22 @@ interface WebhookOutboxTable {
|
|
|
1203
1240
|
last_error: string | null;
|
|
1204
1241
|
created_at: Generated<Date>;
|
|
1205
1242
|
}
|
|
1243
|
+
type WebhookReplayStatus = "scanning" | "running" | "done" | "failed";
|
|
1244
|
+
interface WebhookReplaysTable {
|
|
1245
|
+
id: string;
|
|
1246
|
+
webhook_id: string;
|
|
1247
|
+
from_block: number | bigint;
|
|
1248
|
+
to_block: number | bigint;
|
|
1249
|
+
status: WebhookReplayStatus;
|
|
1250
|
+
scanned_count: Generated<number>;
|
|
1251
|
+
enqueued_count: Generated<number>;
|
|
1252
|
+
total: number | null;
|
|
1253
|
+
delivered: number | null;
|
|
1254
|
+
gave_up: number | null;
|
|
1255
|
+
error: string | null;
|
|
1256
|
+
started_at: Generated<Date>;
|
|
1257
|
+
finished_at: Date | null;
|
|
1258
|
+
}
|
|
1206
1259
|
interface WebhookDeliveriesTable {
|
|
1207
1260
|
id: Generated<string>;
|
|
1208
1261
|
/** Nullable after migration 0077 — outbox row may be cleaned up while
|