@secondlayer/shared 13.2.0 → 13.3.0

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 (36) hide show
  1. package/dist/src/archive/range-digest.d.ts +26 -0
  2. package/dist/src/archive/semantic-digest-builder.d.ts +26 -0
  3. package/dist/src/coverage/index.d.ts +26 -0
  4. package/dist/src/db/index.d.ts +30 -1
  5. package/dist/src/db/index.js +2 -1
  6. package/dist/src/db/index.js.map +3 -3
  7. package/dist/src/db/queries/chain-reorgs.d.ts +26 -0
  8. package/dist/src/db/queries/chain-reorgs.js +2 -1
  9. package/dist/src/db/queries/chain-reorgs.js.map +3 -3
  10. package/dist/src/db/queries/contracts.d.ts +33 -1
  11. package/dist/src/db/queries/contracts.js +6 -2
  12. package/dist/src/db/queries/contracts.js.map +3 -3
  13. package/dist/src/db/queries/instance.d.ts +26 -0
  14. package/dist/src/db/queries/integrity.d.ts +26 -0
  15. package/dist/src/db/queries/subgraph-gaps.d.ts +26 -0
  16. package/dist/src/db/queries/subgraph-operations.d.ts +26 -0
  17. package/dist/src/db/queries/subgraphs.d.ts +26 -0
  18. package/dist/src/db/queries/sync-scope.d.ts +26 -0
  19. package/dist/src/db/queries/webhooks.d.ts +26 -0
  20. package/dist/src/db/schema.d.ts +29 -1
  21. package/dist/src/index.d.ts +37 -1
  22. package/dist/src/index.js +12 -1
  23. package/dist/src/index.js.map +4 -4
  24. package/dist/src/node/local-client.d.ts +26 -0
  25. package/dist/src/queue/listener.js +2 -1
  26. package/dist/src/queue/listener.js.map +3 -3
  27. package/dist/src/schemas/index.d.ts +7 -0
  28. package/dist/src/schemas/index.js +11 -1
  29. package/dist/src/schemas/index.js.map +3 -3
  30. package/dist/src/schemas/webhooks.d.ts +46 -1
  31. package/dist/src/schemas/webhooks.js +13 -1
  32. package/dist/src/schemas/webhooks.js.map +3 -3
  33. package/migrations/0166_webhook_receiver_cert.ts +31 -0
  34. package/migrations/0167_usage_ledger_api_key_id.ts +29 -0
  35. package/migrations/0168_api_request_log.ts +49 -0
  36. package/package.json +2 -2
@@ -880,6 +880,7 @@ interface Database {
880
880
  waitlist_signups: WaitlistSignupsTable;
881
881
  contact_requests: ContactRequestsTable;
882
882
  api_failed_requests: ApiFailedRequestsTable;
883
+ api_request_log: ApiRequestLogTable;
883
884
  feedback_tickets: FeedbackTicketsTable;
884
885
  }
885
886
  interface ServiceHeartbeatsTable {
@@ -944,6 +945,8 @@ interface UsageLedgerTable {
944
945
  usd_micros: string | number | bigint;
945
946
  debited: Generated<boolean>;
946
947
  source: string;
948
+ /** API key behind a metered read; null for non-read units and older rows. */
949
+ api_key_id: string | null;
947
950
  idempotency_key: string;
948
951
  occurred_at: Generated<Date>;
949
952
  recorded_at: Generated<Date>;
@@ -995,6 +998,9 @@ interface WebhooksTable {
995
998
  last_delivery_at: Date | null;
996
999
  last_success_at: Date | null;
997
1000
  last_error: string | null;
1001
+ /** Receiver TLS leaf certificate expiry, from the emitter's periodic probe. */
1002
+ receiver_cert_expires_at: Date | null;
1003
+ receiver_cert_checked_at: Date | null;
998
1004
  created_at: Generated<Date>;
999
1005
  updated_at: Generated<Date>;
1000
1006
  }
@@ -1113,6 +1119,26 @@ interface ApiFailedRequestsTable {
1113
1119
  created_at: Generated<Date>;
1114
1120
  }
1115
1121
  /**
1122
+ * 7-day hosted log of account-attributed Index/Streams reads. Query values
1123
+ * are stored only as hashes; never bodies, headers or tokens.
1124
+ */
1125
+ interface ApiRequestLogTable {
1126
+ id: Generated<string>;
1127
+ request_id: string | null;
1128
+ account_id: string;
1129
+ api_key_id: string | null;
1130
+ method: string;
1131
+ path: string;
1132
+ path_template: string;
1133
+ params_hash: string | null;
1134
+ cursor_hash: string | null;
1135
+ page_size: number | null;
1136
+ rows: number | null;
1137
+ status: number;
1138
+ duration_ms: number;
1139
+ created_at: Generated<Date>;
1140
+ }
1141
+ /**
1116
1142
  * Hosted problem report. `attempted` is the server's own copy of the failed
1117
1143
  * request (never caller-supplied); `status` starts `new` until classified.
1118
1144
  */
@@ -890,6 +890,7 @@ interface Database {
890
890
  waitlist_signups: WaitlistSignupsTable;
891
891
  contact_requests: ContactRequestsTable;
892
892
  api_failed_requests: ApiFailedRequestsTable;
893
+ api_request_log: ApiRequestLogTable;
893
894
  feedback_tickets: FeedbackTicketsTable;
894
895
  }
895
896
  interface ServiceHeartbeatsTable {
@@ -954,6 +955,8 @@ interface UsageLedgerTable {
954
955
  usd_micros: string | number | bigint;
955
956
  debited: Generated<boolean>;
956
957
  source: string;
958
+ /** API key behind a metered read; null for non-read units and older rows. */
959
+ api_key_id: string | null;
957
960
  idempotency_key: string;
958
961
  occurred_at: Generated<Date>;
959
962
  recorded_at: Generated<Date>;
@@ -1004,6 +1007,9 @@ interface WebhooksTable {
1004
1007
  last_delivery_at: Date | null;
1005
1008
  last_success_at: Date | null;
1006
1009
  last_error: string | null;
1010
+ /** Receiver TLS leaf certificate expiry, from the emitter's periodic probe. */
1011
+ receiver_cert_expires_at: Date | null;
1012
+ receiver_cert_checked_at: Date | null;
1007
1013
  created_at: Generated<Date>;
1008
1014
  updated_at: Generated<Date>;
1009
1015
  }
@@ -1122,6 +1128,26 @@ interface ApiFailedRequestsTable {
1122
1128
  created_at: Generated<Date>;
1123
1129
  }
1124
1130
  /**
1131
+ * 7-day hosted log of account-attributed Index/Streams reads. Query values
1132
+ * are stored only as hashes; never bodies, headers or tokens.
1133
+ */
1134
+ interface ApiRequestLogTable {
1135
+ id: Generated<string>;
1136
+ request_id: string | null;
1137
+ account_id: string;
1138
+ api_key_id: string | null;
1139
+ method: string;
1140
+ path: string;
1141
+ path_template: string;
1142
+ params_hash: string | null;
1143
+ cursor_hash: string | null;
1144
+ page_size: number | null;
1145
+ rows: number | null;
1146
+ status: number;
1147
+ duration_ms: number;
1148
+ created_at: Generated<Date>;
1149
+ }
1150
+ /**
1125
1151
  * Hosted problem report. `attempted` is the server's own copy of the failed
1126
1152
  * request (never caller-supplied); `status` starts `new` until classified.
1127
1153
  */
@@ -880,6 +880,7 @@ interface Database {
880
880
  waitlist_signups: WaitlistSignupsTable;
881
881
  contact_requests: ContactRequestsTable;
882
882
  api_failed_requests: ApiFailedRequestsTable;
883
+ api_request_log: ApiRequestLogTable;
883
884
  feedback_tickets: FeedbackTicketsTable;
884
885
  }
885
886
  interface ServiceHeartbeatsTable {
@@ -944,6 +945,8 @@ interface UsageLedgerTable {
944
945
  usd_micros: string | number | bigint;
945
946
  debited: Generated<boolean>;
946
947
  source: string;
948
+ /** API key behind a metered read; null for non-read units and older rows. */
949
+ api_key_id: string | null;
947
950
  idempotency_key: string;
948
951
  occurred_at: Generated<Date>;
949
952
  recorded_at: Generated<Date>;
@@ -994,6 +997,9 @@ interface WebhooksTable {
994
997
  last_delivery_at: Date | null;
995
998
  last_success_at: Date | null;
996
999
  last_error: string | null;
1000
+ /** Receiver TLS leaf certificate expiry, from the emitter's periodic probe. */
1001
+ receiver_cert_expires_at: Date | null;
1002
+ receiver_cert_checked_at: Date | null;
997
1003
  created_at: Generated<Date>;
998
1004
  updated_at: Generated<Date>;
999
1005
  }
@@ -1113,6 +1119,26 @@ interface ApiFailedRequestsTable {
1113
1119
  created_at: Generated<Date>;
1114
1120
  }
1115
1121
  /**
1122
+ * 7-day hosted log of account-attributed Index/Streams reads. Query values
1123
+ * are stored only as hashes; never bodies, headers or tokens.
1124
+ */
1125
+ interface ApiRequestLogTable {
1126
+ id: Generated<string>;
1127
+ request_id: string | null;
1128
+ account_id: string;
1129
+ api_key_id: string | null;
1130
+ method: string;
1131
+ path: string;
1132
+ path_template: string;
1133
+ params_hash: string | null;
1134
+ cursor_hash: string | null;
1135
+ page_size: number | null;
1136
+ rows: number | null;
1137
+ status: number;
1138
+ duration_ms: number;
1139
+ created_at: Generated<Date>;
1140
+ }
1141
+ /**
1116
1142
  * Hosted problem report. `attempted` is the server's own copy of the failed
1117
1143
  * request (never caller-supplied); `status` starts `new` until classified.
1118
1144
  */
@@ -879,6 +879,7 @@ interface Database {
879
879
  waitlist_signups: WaitlistSignupsTable;
880
880
  contact_requests: ContactRequestsTable;
881
881
  api_failed_requests: ApiFailedRequestsTable;
882
+ api_request_log: ApiRequestLogTable;
882
883
  feedback_tickets: FeedbackTicketsTable;
883
884
  }
884
885
  interface ServiceHeartbeatsTable {
@@ -952,6 +953,8 @@ interface UsageLedgerTable {
952
953
  usd_micros: string | number | bigint;
953
954
  debited: Generated<boolean>;
954
955
  source: string;
956
+ /** API key behind a metered read; null for non-read units and older rows. */
957
+ api_key_id: string | null;
955
958
  idempotency_key: string;
956
959
  occurred_at: Generated<Date>;
957
960
  recorded_at: Generated<Date>;
@@ -1050,6 +1053,9 @@ interface WebhooksTable {
1050
1053
  last_delivery_at: Date | null;
1051
1054
  last_success_at: Date | null;
1052
1055
  last_error: string | null;
1056
+ /** Receiver TLS leaf certificate expiry, from the emitter's periodic probe. */
1057
+ receiver_cert_expires_at: Date | null;
1058
+ receiver_cert_checked_at: Date | null;
1053
1059
  created_at: Generated<Date>;
1054
1060
  updated_at: Generated<Date>;
1055
1061
  }
@@ -1179,6 +1185,28 @@ interface ApiFailedRequestsTable {
1179
1185
  type ApiFailedRequest = Selectable<ApiFailedRequestsTable>;
1180
1186
  type InsertApiFailedRequest = Insertable<ApiFailedRequestsTable>;
1181
1187
  /**
1188
+ * 7-day hosted log of account-attributed Index/Streams reads. Query values
1189
+ * are stored only as hashes; never bodies, headers or tokens.
1190
+ */
1191
+ interface ApiRequestLogTable {
1192
+ id: Generated<string>;
1193
+ request_id: string | null;
1194
+ account_id: string;
1195
+ api_key_id: string | null;
1196
+ method: string;
1197
+ path: string;
1198
+ path_template: string;
1199
+ params_hash: string | null;
1200
+ cursor_hash: string | null;
1201
+ page_size: number | null;
1202
+ rows: number | null;
1203
+ status: number;
1204
+ duration_ms: number;
1205
+ created_at: Generated<Date>;
1206
+ }
1207
+ type ApiRequestLogRow = Selectable<ApiRequestLogTable>;
1208
+ type InsertApiRequestLogRow = Insertable<ApiRequestLogTable>;
1209
+ /**
1182
1210
  * Hosted problem report. `attempted` is the server's own copy of the failed
1183
1211
  * request (never caller-supplied); `status` starts `new` until classified.
1184
1212
  */
@@ -1206,4 +1234,4 @@ type WaitlistSignup = Selectable<WaitlistSignupsTable>;
1206
1234
  type InsertWaitlistSignup = Insertable<WaitlistSignupsTable>;
1207
1235
  type ContactRequest = Selectable<ContactRequestsTable>;
1208
1236
  type InsertContactRequest = Insertable<ContactRequestsTable>;
1209
- export { Account, AccountBalanceAlerts, AccountBalanceAlertsTable, AccountCredits, AccountCreditsTable, AccountSpendCap, AccountSpendCapsTable, AccountsTable, ApiFailedRequest, ApiFailedRequestsTable, ApiKey, ApiKeysTable, ArchiveFetch, ArchiveFetchesTable, Block, BlocksTable, BnsMarketplaceAction, BnsMarketplaceEventsTable, BnsNameEventTopic, BnsNameEventsTable, BnsNamesTable, BnsNamespaceEventStatus, BnsNamespaceEventsTable, BnsNamespacesTable, BurnBlockRewardSlotsTable, BurnBlockRewardsTable, ChainReadCacheTable, ChainReorgsTable, ContactRequest, ContactRequestsTable, Contract, ContractsTable, CoverageSegmentsTable, Database, DeadLetterEventsTable, DecodedEventsTable, DecoderCheckpointsTable, Event, EventsArchiveTable, EventsTable, FailureClass, FailureUnit, FeedbackTicket, FeedbackTicketsTable, IndexProgress, IndexProgressTable, InsertAccount, InsertAccountBalanceAlerts, InsertAccountCredits, InsertAccountSpendCap, InsertApiFailedRequest, InsertApiKey, InsertArchiveFetch, InsertBlock, InsertContactRequest, InsertContract, InsertEvent, InsertFeedbackTicket, InsertIndexProgress, InsertMagicLink, InsertMempoolTransaction, InsertSession, InsertStateWrite, InsertSubgraph, InsertSubgraphGap, InsertSubgraphHealthSnapshot, InsertSubgraphOperation, InsertTransaction, InsertUsageLedgerRow, InsertVmEvent, InsertWaitlistSignup, InsertWebhook, InsertWebhookDelivery, InsertWebhookOutbox, InstancesTable, MagicLink, MagicLinksTable, MempoolTransaction, MempoolTransactionsTable, NativeClock, ObserverJournalStatus, ObserverJournalTable, OutboxStatus, PendingForkBlocksTable, Pox4CallsTable, Pox4FunctionName, Pox5CycleSignersTable, Pox5CyclesTable, Pox5EventTopic, Pox5EventsTable, ProcessedStripeEventsTable, RepairMode, RetryState, RunStatus, SbtcEventTopic, SbtcEventsTable, SbtcSettlementsTable, SbtcTokenEventType, SbtcTokenEventsTable, SentinelAccount, SentinelAccountsTable, ServiceHeartbeatsTable, Session, SessionsTable, StageBlockReceiptsTable, StageFailuresTable, StageKind, StageRegistryTable, StageRunsTable, StateWrite, StateWritesArchiveTable, StateWritesTable, Subgraph, SubgraphGap, SubgraphGapsTable, SubgraphHealthSnapshot, SubgraphHealthSnapshotsTable, SubgraphOperation, SubgraphOperationKind, SubgraphOperationStatus, SubgraphOperationsTable, SubgraphProcessingStatsTable, SubgraphViolationsTable, SubgraphsTable, SyncScopesTable, Transaction, TransactionsArchiveTable, TransactionsTable, TriggerEvaluatorState, TriggerEvaluatorStateTable, UpdateAccountBalanceAlerts, UpdateAccountCredits, UpdateAccountSpendCap, UpdateApiKey, UpdateArchiveFetch, UpdateBlock, UpdateContract, UpdateEvent, UpdateIndexProgress, UpdateSubgraph, UpdateSubgraphOperation, UpdateTransaction, UpdateUsageLedgerRow, UpdateVmEvent, UpdateWebhook, UpdateWebhookOutbox, UsageLedgerRow, UsageLedgerTable, VmEvent, VmEventsArchiveTable, VmEventsTable, Waitlist, WaitlistSignup, WaitlistSignupsTable, WaitlistsTable, Webhook, WebhookDeliveriesTable, WebhookDelivery, WebhookFormat, WebhookKind, WebhookOutbox, WebhookOutboxTable, WebhookStatus, WebhooksTable };
1237
+ export { Account, AccountBalanceAlerts, AccountBalanceAlertsTable, AccountCredits, AccountCreditsTable, AccountSpendCap, AccountSpendCapsTable, AccountsTable, ApiFailedRequest, ApiFailedRequestsTable, ApiKey, ApiKeysTable, ApiRequestLogRow, ApiRequestLogTable, ArchiveFetch, ArchiveFetchesTable, Block, BlocksTable, BnsMarketplaceAction, BnsMarketplaceEventsTable, BnsNameEventTopic, BnsNameEventsTable, BnsNamesTable, BnsNamespaceEventStatus, BnsNamespaceEventsTable, BnsNamespacesTable, BurnBlockRewardSlotsTable, BurnBlockRewardsTable, ChainReadCacheTable, ChainReorgsTable, ContactRequest, ContactRequestsTable, Contract, ContractsTable, CoverageSegmentsTable, Database, DeadLetterEventsTable, DecodedEventsTable, DecoderCheckpointsTable, Event, EventsArchiveTable, EventsTable, FailureClass, FailureUnit, FeedbackTicket, FeedbackTicketsTable, IndexProgress, IndexProgressTable, InsertAccount, InsertAccountBalanceAlerts, InsertAccountCredits, InsertAccountSpendCap, InsertApiFailedRequest, InsertApiKey, InsertApiRequestLogRow, InsertArchiveFetch, InsertBlock, InsertContactRequest, InsertContract, InsertEvent, InsertFeedbackTicket, InsertIndexProgress, InsertMagicLink, InsertMempoolTransaction, InsertSession, InsertStateWrite, InsertSubgraph, InsertSubgraphGap, InsertSubgraphHealthSnapshot, InsertSubgraphOperation, InsertTransaction, InsertUsageLedgerRow, InsertVmEvent, InsertWaitlistSignup, InsertWebhook, InsertWebhookDelivery, InsertWebhookOutbox, InstancesTable, MagicLink, MagicLinksTable, MempoolTransaction, MempoolTransactionsTable, NativeClock, ObserverJournalStatus, ObserverJournalTable, OutboxStatus, PendingForkBlocksTable, Pox4CallsTable, Pox4FunctionName, Pox5CycleSignersTable, Pox5CyclesTable, Pox5EventTopic, Pox5EventsTable, ProcessedStripeEventsTable, RepairMode, RetryState, RunStatus, SbtcEventTopic, SbtcEventsTable, SbtcSettlementsTable, SbtcTokenEventType, SbtcTokenEventsTable, SentinelAccount, SentinelAccountsTable, ServiceHeartbeatsTable, Session, SessionsTable, StageBlockReceiptsTable, StageFailuresTable, StageKind, StageRegistryTable, StageRunsTable, StateWrite, StateWritesArchiveTable, StateWritesTable, Subgraph, SubgraphGap, SubgraphGapsTable, SubgraphHealthSnapshot, SubgraphHealthSnapshotsTable, SubgraphOperation, SubgraphOperationKind, SubgraphOperationStatus, SubgraphOperationsTable, SubgraphProcessingStatsTable, SubgraphViolationsTable, SubgraphsTable, SyncScopesTable, Transaction, TransactionsArchiveTable, TransactionsTable, TriggerEvaluatorState, TriggerEvaluatorStateTable, UpdateAccountBalanceAlerts, UpdateAccountCredits, UpdateAccountSpendCap, UpdateApiKey, UpdateArchiveFetch, UpdateBlock, UpdateContract, UpdateEvent, UpdateIndexProgress, UpdateSubgraph, UpdateSubgraphOperation, UpdateTransaction, UpdateUsageLedgerRow, UpdateVmEvent, UpdateWebhook, UpdateWebhookOutbox, UsageLedgerRow, UsageLedgerTable, VmEvent, VmEventsArchiveTable, VmEventsTable, Waitlist, WaitlistSignup, WaitlistSignupsTable, WaitlistsTable, Webhook, WebhookDeliveriesTable, WebhookDelivery, WebhookFormat, WebhookKind, WebhookOutbox, WebhookOutboxTable, WebhookStatus, WebhooksTable };
@@ -1098,6 +1098,7 @@ interface Database {
1098
1098
  waitlist_signups: WaitlistSignupsTable;
1099
1099
  contact_requests: ContactRequestsTable;
1100
1100
  api_failed_requests: ApiFailedRequestsTable;
1101
+ api_request_log: ApiRequestLogTable;
1101
1102
  feedback_tickets: FeedbackTicketsTable;
1102
1103
  }
1103
1104
  interface ServiceHeartbeatsTable {
@@ -1171,6 +1172,8 @@ interface UsageLedgerTable {
1171
1172
  usd_micros: string | number | bigint;
1172
1173
  debited: Generated<boolean>;
1173
1174
  source: string;
1175
+ /** API key behind a metered read; null for non-read units and older rows. */
1176
+ api_key_id: string | null;
1174
1177
  idempotency_key: string;
1175
1178
  occurred_at: Generated<Date>;
1176
1179
  recorded_at: Generated<Date>;
@@ -1269,6 +1272,9 @@ interface WebhooksTable {
1269
1272
  last_delivery_at: Date | null;
1270
1273
  last_success_at: Date | null;
1271
1274
  last_error: string | null;
1275
+ /** Receiver TLS leaf certificate expiry, from the emitter's periodic probe. */
1276
+ receiver_cert_expires_at: Date | null;
1277
+ receiver_cert_checked_at: Date | null;
1272
1278
  created_at: Generated<Date>;
1273
1279
  updated_at: Generated<Date>;
1274
1280
  }
@@ -1398,6 +1404,28 @@ interface ApiFailedRequestsTable {
1398
1404
  type ApiFailedRequest = Selectable<ApiFailedRequestsTable>;
1399
1405
  type InsertApiFailedRequest = Insertable<ApiFailedRequestsTable>;
1400
1406
  /**
1407
+ * 7-day hosted log of account-attributed Index/Streams reads. Query values
1408
+ * are stored only as hashes; never bodies, headers or tokens.
1409
+ */
1410
+ interface ApiRequestLogTable {
1411
+ id: Generated<string>;
1412
+ request_id: string | null;
1413
+ account_id: string;
1414
+ api_key_id: string | null;
1415
+ method: string;
1416
+ path: string;
1417
+ path_template: string;
1418
+ params_hash: string | null;
1419
+ cursor_hash: string | null;
1420
+ page_size: number | null;
1421
+ rows: number | null;
1422
+ status: number;
1423
+ duration_ms: number;
1424
+ created_at: Generated<Date>;
1425
+ }
1426
+ type ApiRequestLogRow = Selectable<ApiRequestLogTable>;
1427
+ type InsertApiRequestLogRow = Insertable<ApiRequestLogTable>;
1428
+ /**
1401
1429
  * Hosted problem report. `attempted` is the server's own copy of the failed
1402
1430
  * request (never caller-supplied); `status` starts `new` until classified.
1403
1431
  */
@@ -2457,6 +2485,7 @@ declare const TABLE_TO_DB: {
2457
2485
  waitlist_signups: string
2458
2486
  contact_requests: string
2459
2487
  api_failed_requests: string
2488
+ api_request_log: string
2460
2489
  feedback_tickets: string
2461
2490
  service_heartbeats: string
2462
2491
  };
@@ -2900,6 +2929,9 @@ interface WebhookSummary {
2900
2929
  * summary so the list can show a failing receiver per row without a
2901
2930
  * per-row fetch. */
2902
2931
  circuitFailures: number;
2932
+ /** Owning product, derived from the name prefix (`MANAGED_NAME_PREFIXES`).
2933
+ * When non-null the API refuses to rename the webhook. */
2934
+ managedBy: string | null;
2903
2935
  createdAt: string;
2904
2936
  updatedAt: string;
2905
2937
  }
@@ -2924,6 +2956,10 @@ interface WebhookDetail extends WebhookSummary {
2924
2956
  timeoutMs: number;
2925
2957
  concurrency: number;
2926
2958
  lastError: string | null;
2959
+ /** When the receiver's TLS certificate expires, from the periodic probe.
2960
+ * Null for http receivers, refused or unreachable hosts, and webhooks not
2961
+ * probed yet. */
2962
+ receiverCertExpiresAt: string | null;
2927
2963
  /** Set when this instance's chain-trigger
2928
2964
  * evaluator isn't running (`SUBGRAPH_SOURCE` != `streams-index`) — the
2929
2965
  * webhook will never fire until that's fixed. Null otherwise. Surfaced
@@ -3420,4 +3456,4 @@ declare function publicKeyPemFromPrivate(privateKeyPem: string): string;
3420
3456
  declare function ed25519KeyId(publicKeyPem: string): string;
3421
3457
  declare function signEd25519(payload: string, privateKey: KeyObject): string;
3422
3458
  declare function verifyEd25519(payload: string, signatureBase64: string, publicKey: KeyObject): boolean;
3423
- export { Account, AccountBalanceAlerts, AccountBalanceAlertsTable, AccountCredits, AccountCreditsTable, AccountSpendCap, AccountSpendCapsTable, AccountsTable, ApiFailedRequest, ApiFailedRequestsTable, ApiKey, ApiKeysTable, ArchiveFetch, ArchiveFetchesTable, AuthenticationError, AuthorizationError, BILLING_PAUSED_PREFIX, Block, BlocksTable, BnsMarketplaceAction, BnsMarketplaceEventsTable, BnsNameEventTopic, BnsNameEventsTable, BnsNamesTable, BnsNamespaceEventStatus, BnsNamespaceEventsTable, BnsNamespacesTable, BurnBlockRewardSlotsTable, BurnBlockRewardsTable, CHAIN_TRIGGER_FIELDS, CHAIN_TRIGGER_TYPES, CODE_TO_STATUS, ChainApplyDeliveryOf, ChainApplyEnvelope, ChainApplyEnvelopeOf, ChainEventEnvelope, ChainFtBurnData, ChainFtMintData, ChainFtTransferData, ChainNftBurnData, ChainNftMintData, ChainNftTransferData, ChainPrintEventData, ChainReadCacheTable, ChainReorgOrphanedEntry, ChainReorgRollbackDelivery, ChainReorgRollbackEnvelope, ChainReorgsTable, ChainStxBurnData, ChainStxLockData, ChainStxMintData, ChainStxTransferData, ChainTestDelivery, ChainTxLevelEvent, ChainWebhookDelivery, ChainWebhookEnvelope, ContactRequest, ContactRequestsTable, Contract, ContractsTable, CoverageSegmentsTable, CreateWebhookRequest, CreateWebhookRequestSchema, CreateWebhookResponse, DB_TO_STREAMS_EVENT_TYPE, DECODED_EVENT_TYPES2 as DECODED_EVENT_TYPES, DEFAULT_BTC_CONFIRMATIONS, Database, DatabaseError, DbPlane, DbReadRow, DbSplitStatus, DeadLetterEventsTable, DeadRow, DecodedEventType2 as DecodedEventType, DecodedEventsTable, DecoderCheckpointsTable, DeliveryRow, DeploySubgraphRequest, DeploySubgraphRequestSchema, DeploySubgraphResponse, EMPTY_RANGE_EVENT_INDEX_SENTINEL, Env, ErrorCode, ErrorCodes, Event, EventsArchiveTable, EventsTable, FailureClass, FailureUnit, FeedbackTicket, FeedbackTicketsTable, ForbiddenError, IndexColumn, IndexColumnType, IndexPrimaryKey, IndexProgress, IndexProgressTable, InsertAccount, InsertAccountBalanceAlerts, InsertAccountCredits, InsertAccountSpendCap, InsertApiFailedRequest, InsertApiKey, InsertArchiveFetch, InsertBlock, InsertContactRequest, InsertContract, InsertEvent, InsertFeedbackTicket, InsertIndexProgress, InsertMagicLink, InsertMempoolTransaction, InsertSession, InsertStateWrite, InsertSubgraph, InsertSubgraphGap, InsertSubgraphHealthSnapshot, InsertSubgraphOperation, InsertTransaction, InsertUsageLedgerRow, InsertVmEvent, InsertWaitlistSignup, InsertWebhook, InsertWebhookDelivery, InsertWebhookOutbox, InstancesTable, KeyRotatedError, MagicLink, MagicLinksTable, MempoolTransaction, MempoolTransactionsTable, MigrationRole, NativeClock, NotFoundError, NumericAsText, ObserverJournalStatus, ObserverJournalTable, OutboxStatus, ParsedCreateWebhookRequest, ParsedReplayWebhookRequest, ParsedUpdateWebhookRequest, PaymentRequiredError, PendingForkBlocksTable, Pox4CallsTable, Pox4FunctionName, Pox5CycleSignersTable, Pox5CyclesTable, Pox5EventTopic, Pox5EventsTable, ProcessedStripeEventsTable, RUNE_EVENT_TYPES, RateLimitError, ReindexResponse, RepairMode, ReplayResult, ReplayWebhookRequest, ReplayWebhookRequestSchema, RetryState, RotateSecretResponse, RunStatus, RuneApplyDeliveryOf, RuneApplyEnvelope, RuneEventType, SOURCE_READ_COLUMNS, SOURCE_READ_PKS, SOURCE_READ_TYPES, STREAMS_DB_EVENT_TYPES, STREAMS_EVENT_TYPES, STREAMS_TO_DB_EVENT_TYPES, SbtcDepositEvent, SbtcEventTopic, SbtcEventsTable, SbtcSettlementsTable, SbtcTokenEventType, SbtcTokenEventsTable, SbtcWithdrawalEvent, SbtcWithdrawalSweptConfirmedEvent, SecondLayerError, SentinelAccount, SentinelAccountsTable, ServiceHeartbeatsTable, Session, SessionsTable, StageBlockReceiptsTable, StageFailuresTable, StageKind, StageRegistryTable, StageRunsTable, StateWrite, StateWritesArchiveTable, StateWritesTable, StreamsCursor, StreamsDbEventType, StreamsEventType, Subgraph, SubgraphAgentSchema, SubgraphAggregateParams, SubgraphAggregateResponse, SubgraphDetail, SubgraphGap, SubgraphGapEntry, SubgraphGapRange, SubgraphGapsResponse, SubgraphGapsTable, SubgraphHealthSnapshot, SubgraphHealthSnapshotsTable, SubgraphOperation, SubgraphOperationKind, SubgraphOperationStatus, SubgraphOperationsTable, SubgraphProcessingStatsTable, SubgraphQueryParams, SubgraphSpecFormat, SubgraphSpecOptions, SubgraphSummary, SubgraphSyncInfo, SubgraphVerification, SubgraphViolationsTable, SubgraphsTable, SyncScopesTable, TABLE_TO_DB, TenantSuspendedError, Transaction, TransactionsArchiveTable, TransactionsTable, TriggerEvaluatorState, TriggerEvaluatorStateTable, UpdateAccountBalanceAlerts, UpdateAccountCredits, UpdateAccountSpendCap, UpdateApiKey, UpdateArchiveFetch, UpdateBlock, UpdateContract, UpdateEvent, UpdateIndexProgress, UpdateSubgraph, UpdateSubgraphOperation, UpdateTransaction, UpdateUsageLedgerRow, UpdateVmEvent, UpdateWebhook, UpdateWebhookOutbox, UpdateWebhookRequest, UpdateWebhookRequestSchema, UsageLedgerRow, UsageLedgerTable, VM_EVENT_TYPES, VM_NODE_TO_STORED_TYPE2 as VM_NODE_TO_STORED_TYPE, VM_STORED_TO_NODE_TYPE, ValidationError, VersionConflictError, VmEvent, VmEventType, VmEventsArchiveTable, VmEventsTable, VmNodeEventType, WEBHOOK_FORMATS, WEBHOOK_STATUSES, Waitlist, WaitlistSignup, WaitlistSignupsTable, WaitlistsTable, Webhook, WebhookDeliveriesTable, WebhookDelivery, WebhookDetail, WebhookFormat, WebhookFormatSchema, WebhookKind, WebhookOutbox, WebhookOutboxTable, WebhookStatus, WebhookStatusSchema, WebhookSummary, WebhooksTable, applicationDatabaseUrl, assertDbSplit, billingPausedCode, blockEndCursor, closeDb, closeDbOrTimeout, committedHeight, compareStreamsCursor, exports_hmac as crypto, decodeStreamsCursor, describeDbUrl, exports_ed25519 as ed25519, encodeStreamsCursor, finalizedBurnHeight, formatWebhookSchemaErrors, generateSubgraphAgentSchema, generateSubgraphMarkdown, generateSubgraphOpenApi, generateSubgraphSpec, getDb, getDbSplitStatus, getEnv, getErrorMessage, getMigrationRole, getRawClient, getSourceDb, getTargetDb, isBnsDecoderEnabled, isEmptyRangeCursor, isPox4DecoderEnabled, isPox5DecoderEnabled, isSbtcDecoderEnabled, jsonb, logger, onChainPlane, onControlPlane, parseJsonb, resolveSourceUrl, resolveTargetUrl, setMigrationRole, sql };
3459
+ export { Account, AccountBalanceAlerts, AccountBalanceAlertsTable, AccountCredits, AccountCreditsTable, AccountSpendCap, AccountSpendCapsTable, AccountsTable, ApiFailedRequest, ApiFailedRequestsTable, ApiKey, ApiKeysTable, ApiRequestLogRow, ApiRequestLogTable, ArchiveFetch, ArchiveFetchesTable, AuthenticationError, AuthorizationError, BILLING_PAUSED_PREFIX, Block, BlocksTable, BnsMarketplaceAction, BnsMarketplaceEventsTable, BnsNameEventTopic, BnsNameEventsTable, BnsNamesTable, BnsNamespaceEventStatus, BnsNamespaceEventsTable, BnsNamespacesTable, BurnBlockRewardSlotsTable, BurnBlockRewardsTable, CHAIN_TRIGGER_FIELDS, CHAIN_TRIGGER_TYPES, CODE_TO_STATUS, ChainApplyDeliveryOf, ChainApplyEnvelope, ChainApplyEnvelopeOf, ChainEventEnvelope, ChainFtBurnData, ChainFtMintData, ChainFtTransferData, ChainNftBurnData, ChainNftMintData, ChainNftTransferData, ChainPrintEventData, ChainReadCacheTable, ChainReorgOrphanedEntry, ChainReorgRollbackDelivery, ChainReorgRollbackEnvelope, ChainReorgsTable, ChainStxBurnData, ChainStxLockData, ChainStxMintData, ChainStxTransferData, ChainTestDelivery, ChainTxLevelEvent, ChainWebhookDelivery, ChainWebhookEnvelope, ContactRequest, ContactRequestsTable, Contract, ContractsTable, CoverageSegmentsTable, CreateWebhookRequest, CreateWebhookRequestSchema, CreateWebhookResponse, DB_TO_STREAMS_EVENT_TYPE, DECODED_EVENT_TYPES2 as DECODED_EVENT_TYPES, DEFAULT_BTC_CONFIRMATIONS, Database, DatabaseError, DbPlane, DbReadRow, DbSplitStatus, DeadLetterEventsTable, DeadRow, DecodedEventType2 as DecodedEventType, DecodedEventsTable, DecoderCheckpointsTable, DeliveryRow, DeploySubgraphRequest, DeploySubgraphRequestSchema, DeploySubgraphResponse, EMPTY_RANGE_EVENT_INDEX_SENTINEL, Env, ErrorCode, ErrorCodes, Event, EventsArchiveTable, EventsTable, FailureClass, FailureUnit, FeedbackTicket, FeedbackTicketsTable, ForbiddenError, IndexColumn, IndexColumnType, IndexPrimaryKey, IndexProgress, IndexProgressTable, InsertAccount, InsertAccountBalanceAlerts, InsertAccountCredits, InsertAccountSpendCap, InsertApiFailedRequest, InsertApiKey, InsertApiRequestLogRow, InsertArchiveFetch, InsertBlock, InsertContactRequest, InsertContract, InsertEvent, InsertFeedbackTicket, InsertIndexProgress, InsertMagicLink, InsertMempoolTransaction, InsertSession, InsertStateWrite, InsertSubgraph, InsertSubgraphGap, InsertSubgraphHealthSnapshot, InsertSubgraphOperation, InsertTransaction, InsertUsageLedgerRow, InsertVmEvent, InsertWaitlistSignup, InsertWebhook, InsertWebhookDelivery, InsertWebhookOutbox, InstancesTable, KeyRotatedError, MagicLink, MagicLinksTable, MempoolTransaction, MempoolTransactionsTable, MigrationRole, NativeClock, NotFoundError, NumericAsText, ObserverJournalStatus, ObserverJournalTable, OutboxStatus, ParsedCreateWebhookRequest, ParsedReplayWebhookRequest, ParsedUpdateWebhookRequest, PaymentRequiredError, PendingForkBlocksTable, Pox4CallsTable, Pox4FunctionName, Pox5CycleSignersTable, Pox5CyclesTable, Pox5EventTopic, Pox5EventsTable, ProcessedStripeEventsTable, RUNE_EVENT_TYPES, RateLimitError, ReindexResponse, RepairMode, ReplayResult, ReplayWebhookRequest, ReplayWebhookRequestSchema, RetryState, RotateSecretResponse, RunStatus, RuneApplyDeliveryOf, RuneApplyEnvelope, RuneEventType, SOURCE_READ_COLUMNS, SOURCE_READ_PKS, SOURCE_READ_TYPES, STREAMS_DB_EVENT_TYPES, STREAMS_EVENT_TYPES, STREAMS_TO_DB_EVENT_TYPES, SbtcDepositEvent, SbtcEventTopic, SbtcEventsTable, SbtcSettlementsTable, SbtcTokenEventType, SbtcTokenEventsTable, SbtcWithdrawalEvent, SbtcWithdrawalSweptConfirmedEvent, SecondLayerError, SentinelAccount, SentinelAccountsTable, ServiceHeartbeatsTable, Session, SessionsTable, StageBlockReceiptsTable, StageFailuresTable, StageKind, StageRegistryTable, StageRunsTable, StateWrite, StateWritesArchiveTable, StateWritesTable, StreamsCursor, StreamsDbEventType, StreamsEventType, Subgraph, SubgraphAgentSchema, SubgraphAggregateParams, SubgraphAggregateResponse, SubgraphDetail, SubgraphGap, SubgraphGapEntry, SubgraphGapRange, SubgraphGapsResponse, SubgraphGapsTable, SubgraphHealthSnapshot, SubgraphHealthSnapshotsTable, SubgraphOperation, SubgraphOperationKind, SubgraphOperationStatus, SubgraphOperationsTable, SubgraphProcessingStatsTable, SubgraphQueryParams, SubgraphSpecFormat, SubgraphSpecOptions, SubgraphSummary, SubgraphSyncInfo, SubgraphVerification, SubgraphViolationsTable, SubgraphsTable, SyncScopesTable, TABLE_TO_DB, TenantSuspendedError, Transaction, TransactionsArchiveTable, TransactionsTable, TriggerEvaluatorState, TriggerEvaluatorStateTable, UpdateAccountBalanceAlerts, UpdateAccountCredits, UpdateAccountSpendCap, UpdateApiKey, UpdateArchiveFetch, UpdateBlock, UpdateContract, UpdateEvent, UpdateIndexProgress, UpdateSubgraph, UpdateSubgraphOperation, UpdateTransaction, UpdateUsageLedgerRow, UpdateVmEvent, UpdateWebhook, UpdateWebhookOutbox, UpdateWebhookRequest, UpdateWebhookRequestSchema, UsageLedgerRow, UsageLedgerTable, VM_EVENT_TYPES, VM_NODE_TO_STORED_TYPE2 as VM_NODE_TO_STORED_TYPE, VM_STORED_TO_NODE_TYPE, ValidationError, VersionConflictError, VmEvent, VmEventType, VmEventsArchiveTable, VmEventsTable, VmNodeEventType, WEBHOOK_FORMATS, WEBHOOK_STATUSES, Waitlist, WaitlistSignup, WaitlistSignupsTable, WaitlistsTable, Webhook, WebhookDeliveriesTable, WebhookDelivery, WebhookDetail, WebhookFormat, WebhookFormatSchema, WebhookKind, WebhookOutbox, WebhookOutboxTable, WebhookStatus, WebhookStatusSchema, WebhookSummary, WebhooksTable, applicationDatabaseUrl, assertDbSplit, billingPausedCode, blockEndCursor, closeDb, closeDbOrTimeout, committedHeight, compareStreamsCursor, exports_hmac as crypto, decodeStreamsCursor, describeDbUrl, exports_ed25519 as ed25519, encodeStreamsCursor, finalizedBurnHeight, formatWebhookSchemaErrors, generateSubgraphAgentSchema, generateSubgraphMarkdown, generateSubgraphOpenApi, generateSubgraphSpec, getDb, getDbSplitStatus, getEnv, getErrorMessage, getMigrationRole, getRawClient, getSourceDb, getTargetDb, isBnsDecoderEnabled, isEmptyRangeCursor, isPox4DecoderEnabled, isPox5DecoderEnabled, isSbtcDecoderEnabled, jsonb, logger, onChainPlane, onControlPlane, parseJsonb, resolveSourceUrl, resolveTargetUrl, setMigrationRole, sql };
package/dist/src/index.js CHANGED
@@ -864,6 +864,7 @@ var TABLE_TO_DB = {
864
864
  waitlist_signups: "target",
865
865
  contact_requests: "target",
866
866
  api_failed_requests: "target",
867
+ api_request_log: "target",
867
868
  feedback_tickets: "target",
868
869
  service_heartbeats: "both"
869
870
  };
@@ -1308,6 +1309,16 @@ function timeoutMsField() {
1308
1309
  }
1309
1310
  var webhookUrl = z3.string().trim().min(1).refine((value) => value.startsWith("http://") || value.startsWith("https://"), "must be an http(s) URL");
1310
1311
  var name = z3.string().trim().min(1).max(128);
1312
+ var MANAGED_NAME_PREFIXES = {
1313
+ "sentinel:": "Sentinel"
1314
+ };
1315
+ function managedByForName(name) {
1316
+ for (const [prefix, owner] of Object.entries(MANAGED_NAME_PREFIXES)) {
1317
+ if (name.startsWith(prefix))
1318
+ return owner;
1319
+ }
1320
+ return null;
1321
+ }
1311
1322
  var WebhookStatusSchema = z3.enum(WEBHOOK_STATUSES);
1312
1323
  var WebhookFormatSchema = z3.enum(WEBHOOK_FORMATS);
1313
1324
  var CHAIN_TRIGGER_TYPES = [
@@ -2175,5 +2186,5 @@ export {
2175
2186
  sql2 as sql
2176
2187
  };
2177
2188
 
2178
- //# debugId=ED936767BF724EC464756E2164756E21
2189
+ //# debugId=4CA800A5189D0B1364756E2164756E21
2179
2190
  //# sourceMappingURL=index.js.map