@secondlayer/shared 6.3.4 → 6.3.5
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/db/index.d.ts +6 -1
- package/dist/src/db/queries/account-spend-caps.d.ts +5 -0
- package/dist/src/db/queries/account-usage.d.ts +5 -0
- package/dist/src/db/queries/accounts.d.ts +5 -0
- package/dist/src/db/queries/chain-reorgs.d.ts +5 -0
- package/dist/src/db/queries/integrity.d.ts +5 -0
- package/dist/src/db/queries/projects.d.ts +5 -0
- package/dist/src/db/queries/provisioning-audit.d.ts +5 -0
- package/dist/src/db/queries/subgraph-gaps.d.ts +5 -0
- package/dist/src/db/queries/subgraph-operations.d.ts +5 -0
- package/dist/src/db/queries/subgraphs.d.ts +5 -0
- package/dist/src/db/queries/subscriptions.d.ts +5 -0
- package/dist/src/db/queries/tenant-compute-addons.d.ts +5 -0
- package/dist/src/db/queries/tenants.d.ts +5 -0
- package/dist/src/db/queries/usage.d.ts +5 -0
- package/dist/src/db/schema.d.ts +6 -1
- package/dist/src/index.d.ts +6 -1
- package/dist/src/node/local-client.d.ts +5 -0
- package/migrations/0074_service_heartbeats.ts +23 -0
- package/package.json +1 -1
package/dist/src/db/index.d.ts
CHANGED
|
@@ -585,6 +585,11 @@ interface Database {
|
|
|
585
585
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
586
586
|
bns_names: BnsNamesTable;
|
|
587
587
|
bns_namespaces: BnsNamespacesTable;
|
|
588
|
+
service_heartbeats: ServiceHeartbeatsTable;
|
|
589
|
+
}
|
|
590
|
+
interface ServiceHeartbeatsTable {
|
|
591
|
+
name: string;
|
|
592
|
+
updated_at: Generated<Date>;
|
|
588
593
|
}
|
|
589
594
|
type TenantStatus = "provisioning" | "active" | "limit_warning" | "paused_limit" | "suspended" | "error" | "deleted";
|
|
590
595
|
interface TenantsTable {
|
|
@@ -821,4 +826,4 @@ declare function getDb(connectionString?: string): Kysely<Database>;
|
|
|
821
826
|
declare function getRawClient(role?: "source" | "target"): ReturnType<typeof postgres>;
|
|
822
827
|
/** Close all DB connection pools. Call in CLI commands to allow process exit. */
|
|
823
828
|
declare function closeDb(): Promise<void>;
|
|
824
|
-
export { sql, parseJsonb, jsonb, getTargetDb, getSourceDb, getRawClient, getDb, closeDb, WaitlistTable, UsageSnapshotsTable, UsageSnapshot, UsageDailyTable, UsageDaily, UpdateTransaction, UpdateTenantUsageMonthly, UpdateTenantComputeAddon, UpdateTenant, UpdateSubscriptionOutbox, UpdateSubscription, UpdateSubgraphOperation, UpdateSubgraph, UpdateProject, UpdateIndexProgress, UpdateEvent, UpdateChatSession, UpdateBlock, UpdateApiKey, UpdateAccountSpendCap, TransactionsTable, Transaction, TenantsTable, TenantUsageMonthlyTable, TenantUsageMonthly, TenantStatus, TenantComputeAddonsTable, TenantComputeAddon, Tenant, TeamMembersTable, TeamMember, TeamInvitationsTable, TeamInvitation, SubscriptionsTable, SubscriptionStatus, SubscriptionRuntime, SubscriptionOutboxTable, SubscriptionOutbox, SubscriptionFormat, SubscriptionDelivery, SubscriptionDeliveriesTable, Subscription, SubgraphsTable, SubgraphUsageDailyTable, SubgraphUsageDaily, SubgraphTableSnapshotsTable, SubgraphProcessingStatsTable, SubgraphOperationsTable, SubgraphOperationStatus, SubgraphOperationKind, SubgraphOperation, SubgraphHealthSnapshotsTable, SubgraphHealthSnapshot, SubgraphGapsTable, SubgraphGap, Subgraph, SessionsTable, Session, SbtcTokenEventsTable, SbtcTokenEventType, SbtcSupplySnapshotsTable, SbtcEventsTable, SbtcEventTopic, ProvisioningAuditStatus, ProvisioningAuditLogTable, ProvisioningAuditLog, ProvisioningAuditEvent, ProjectsTable, Project, ProcessedStripeEventsTable, Pox4SignersDailyTable, Pox4FunctionName, Pox4CyclesDailyTable, Pox4CallsTable, OutboxStatus, MagicLinksTable, MagicLink, L2DecoderCheckpointsTable, InsertTransaction, InsertTenantUsageMonthly, InsertTenantComputeAddon, InsertTenant, InsertTeamMember, InsertTeamInvitation, InsertSubscriptionOutbox, InsertSubscriptionDelivery, InsertSubscription, InsertSubgraphUsageDaily, InsertSubgraphOperation, InsertSubgraphHealthSnapshot, InsertSubgraphGap, InsertSubgraph, InsertSession, InsertProvisioningAuditLog, InsertProject, InsertMagicLink, InsertIndexProgress, InsertEvent, InsertChatSession, InsertChatMessage, InsertBlock, InsertApiKey, InsertAccountSpendCap, InsertAccountInsight, InsertAccountAgentRun, InsertAccount, IndexProgressTable, IndexProgress, EventsTable, Event, DecodedEventsTable, Database, ChatSessionsTable, ChatSession, ChatMessagesTable, ChatMessage, ChainReorgsTable, BnsNamespacesTable, BnsNamespaceEventsTable, BnsNamespaceEventStatus, BnsNamesTable, BnsNameEventsTable, BnsNameEventTopic, BnsMarketplaceEventsTable, BnsMarketplaceAction, BlocksTable, Block, ApiKeysTable, ApiKey, AccountsTable, AccountSpendCapsTable, AccountSpendCap, AccountInsightsTable, AccountInsight, AccountAgentRunsTable, AccountAgentRun, Account };
|
|
829
|
+
export { sql, parseJsonb, jsonb, getTargetDb, getSourceDb, getRawClient, getDb, closeDb, WaitlistTable, UsageSnapshotsTable, UsageSnapshot, UsageDailyTable, UsageDaily, UpdateTransaction, UpdateTenantUsageMonthly, UpdateTenantComputeAddon, UpdateTenant, UpdateSubscriptionOutbox, UpdateSubscription, UpdateSubgraphOperation, UpdateSubgraph, UpdateProject, UpdateIndexProgress, UpdateEvent, UpdateChatSession, UpdateBlock, UpdateApiKey, UpdateAccountSpendCap, TransactionsTable, Transaction, TenantsTable, TenantUsageMonthlyTable, TenantUsageMonthly, TenantStatus, TenantComputeAddonsTable, TenantComputeAddon, Tenant, TeamMembersTable, TeamMember, TeamInvitationsTable, TeamInvitation, SubscriptionsTable, SubscriptionStatus, SubscriptionRuntime, SubscriptionOutboxTable, SubscriptionOutbox, SubscriptionFormat, SubscriptionDelivery, SubscriptionDeliveriesTable, Subscription, SubgraphsTable, SubgraphUsageDailyTable, SubgraphUsageDaily, SubgraphTableSnapshotsTable, SubgraphProcessingStatsTable, SubgraphOperationsTable, SubgraphOperationStatus, SubgraphOperationKind, SubgraphOperation, SubgraphHealthSnapshotsTable, SubgraphHealthSnapshot, SubgraphGapsTable, SubgraphGap, Subgraph, SessionsTable, Session, ServiceHeartbeatsTable, SbtcTokenEventsTable, SbtcTokenEventType, SbtcSupplySnapshotsTable, SbtcEventsTable, SbtcEventTopic, ProvisioningAuditStatus, ProvisioningAuditLogTable, ProvisioningAuditLog, ProvisioningAuditEvent, ProjectsTable, Project, ProcessedStripeEventsTable, Pox4SignersDailyTable, Pox4FunctionName, Pox4CyclesDailyTable, Pox4CallsTable, OutboxStatus, MagicLinksTable, MagicLink, L2DecoderCheckpointsTable, InsertTransaction, InsertTenantUsageMonthly, InsertTenantComputeAddon, InsertTenant, InsertTeamMember, InsertTeamInvitation, InsertSubscriptionOutbox, InsertSubscriptionDelivery, InsertSubscription, InsertSubgraphUsageDaily, InsertSubgraphOperation, InsertSubgraphHealthSnapshot, InsertSubgraphGap, InsertSubgraph, InsertSession, InsertProvisioningAuditLog, InsertProject, InsertMagicLink, InsertIndexProgress, InsertEvent, InsertChatSession, InsertChatMessage, InsertBlock, InsertApiKey, InsertAccountSpendCap, InsertAccountInsight, InsertAccountAgentRun, InsertAccount, IndexProgressTable, IndexProgress, EventsTable, Event, DecodedEventsTable, Database, ChatSessionsTable, ChatSession, ChatMessagesTable, ChatMessage, ChainReorgsTable, BnsNamespacesTable, BnsNamespaceEventsTable, BnsNamespaceEventStatus, BnsNamesTable, BnsNameEventsTable, BnsNameEventTopic, BnsMarketplaceEventsTable, BnsMarketplaceAction, BlocksTable, Block, ApiKeysTable, ApiKey, AccountsTable, AccountSpendCapsTable, AccountSpendCap, AccountInsightsTable, AccountInsight, AccountAgentRunsTable, AccountAgentRun, Account };
|
|
@@ -567,6 +567,11 @@ interface Database {
|
|
|
567
567
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
568
568
|
bns_names: BnsNamesTable;
|
|
569
569
|
bns_namespaces: BnsNamespacesTable;
|
|
570
|
+
service_heartbeats: ServiceHeartbeatsTable;
|
|
571
|
+
}
|
|
572
|
+
interface ServiceHeartbeatsTable {
|
|
573
|
+
name: string;
|
|
574
|
+
updated_at: Generated<Date>;
|
|
570
575
|
}
|
|
571
576
|
type TenantStatus = "provisioning" | "active" | "limit_warning" | "paused_limit" | "suspended" | "error" | "deleted";
|
|
572
577
|
interface TenantsTable {
|
|
@@ -567,6 +567,11 @@ interface Database {
|
|
|
567
567
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
568
568
|
bns_names: BnsNamesTable;
|
|
569
569
|
bns_namespaces: BnsNamespacesTable;
|
|
570
|
+
service_heartbeats: ServiceHeartbeatsTable;
|
|
571
|
+
}
|
|
572
|
+
interface ServiceHeartbeatsTable {
|
|
573
|
+
name: string;
|
|
574
|
+
updated_at: Generated<Date>;
|
|
570
575
|
}
|
|
571
576
|
type TenantStatus = "provisioning" | "active" | "limit_warning" | "paused_limit" | "suspended" | "error" | "deleted";
|
|
572
577
|
interface TenantsTable {
|
|
@@ -568,6 +568,11 @@ interface Database {
|
|
|
568
568
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
569
569
|
bns_names: BnsNamesTable;
|
|
570
570
|
bns_namespaces: BnsNamespacesTable;
|
|
571
|
+
service_heartbeats: ServiceHeartbeatsTable;
|
|
572
|
+
}
|
|
573
|
+
interface ServiceHeartbeatsTable {
|
|
574
|
+
name: string;
|
|
575
|
+
updated_at: Generated<Date>;
|
|
571
576
|
}
|
|
572
577
|
type TenantStatus = "provisioning" | "active" | "limit_warning" | "paused_limit" | "suspended" | "error" | "deleted";
|
|
573
578
|
interface TenantsTable {
|
|
@@ -566,6 +566,11 @@ interface Database {
|
|
|
566
566
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
567
567
|
bns_names: BnsNamesTable;
|
|
568
568
|
bns_namespaces: BnsNamespacesTable;
|
|
569
|
+
service_heartbeats: ServiceHeartbeatsTable;
|
|
570
|
+
}
|
|
571
|
+
interface ServiceHeartbeatsTable {
|
|
572
|
+
name: string;
|
|
573
|
+
updated_at: Generated<Date>;
|
|
569
574
|
}
|
|
570
575
|
type TenantStatus = "provisioning" | "active" | "limit_warning" | "paused_limit" | "suspended" | "error" | "deleted";
|
|
571
576
|
interface TenantsTable {
|
|
@@ -567,6 +567,11 @@ interface Database {
|
|
|
567
567
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
568
568
|
bns_names: BnsNamesTable;
|
|
569
569
|
bns_namespaces: BnsNamespacesTable;
|
|
570
|
+
service_heartbeats: ServiceHeartbeatsTable;
|
|
571
|
+
}
|
|
572
|
+
interface ServiceHeartbeatsTable {
|
|
573
|
+
name: string;
|
|
574
|
+
updated_at: Generated<Date>;
|
|
570
575
|
}
|
|
571
576
|
type TenantStatus = "provisioning" | "active" | "limit_warning" | "paused_limit" | "suspended" | "error" | "deleted";
|
|
572
577
|
interface TenantsTable {
|
|
@@ -567,6 +567,11 @@ interface Database {
|
|
|
567
567
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
568
568
|
bns_names: BnsNamesTable;
|
|
569
569
|
bns_namespaces: BnsNamespacesTable;
|
|
570
|
+
service_heartbeats: ServiceHeartbeatsTable;
|
|
571
|
+
}
|
|
572
|
+
interface ServiceHeartbeatsTable {
|
|
573
|
+
name: string;
|
|
574
|
+
updated_at: Generated<Date>;
|
|
570
575
|
}
|
|
571
576
|
type TenantStatus = "provisioning" | "active" | "limit_warning" | "paused_limit" | "suspended" | "error" | "deleted";
|
|
572
577
|
interface TenantsTable {
|
|
@@ -567,6 +567,11 @@ interface Database {
|
|
|
567
567
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
568
568
|
bns_names: BnsNamesTable;
|
|
569
569
|
bns_namespaces: BnsNamespacesTable;
|
|
570
|
+
service_heartbeats: ServiceHeartbeatsTable;
|
|
571
|
+
}
|
|
572
|
+
interface ServiceHeartbeatsTable {
|
|
573
|
+
name: string;
|
|
574
|
+
updated_at: Generated<Date>;
|
|
570
575
|
}
|
|
571
576
|
type TenantStatus = "provisioning" | "active" | "limit_warning" | "paused_limit" | "suspended" | "error" | "deleted";
|
|
572
577
|
interface TenantsTable {
|
|
@@ -567,6 +567,11 @@ interface Database {
|
|
|
567
567
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
568
568
|
bns_names: BnsNamesTable;
|
|
569
569
|
bns_namespaces: BnsNamespacesTable;
|
|
570
|
+
service_heartbeats: ServiceHeartbeatsTable;
|
|
571
|
+
}
|
|
572
|
+
interface ServiceHeartbeatsTable {
|
|
573
|
+
name: string;
|
|
574
|
+
updated_at: Generated<Date>;
|
|
570
575
|
}
|
|
571
576
|
type TenantStatus = "provisioning" | "active" | "limit_warning" | "paused_limit" | "suspended" | "error" | "deleted";
|
|
572
577
|
interface TenantsTable {
|
|
@@ -567,6 +567,11 @@ interface Database {
|
|
|
567
567
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
568
568
|
bns_names: BnsNamesTable;
|
|
569
569
|
bns_namespaces: BnsNamespacesTable;
|
|
570
|
+
service_heartbeats: ServiceHeartbeatsTable;
|
|
571
|
+
}
|
|
572
|
+
interface ServiceHeartbeatsTable {
|
|
573
|
+
name: string;
|
|
574
|
+
updated_at: Generated<Date>;
|
|
570
575
|
}
|
|
571
576
|
type TenantStatus = "provisioning" | "active" | "limit_warning" | "paused_limit" | "suspended" | "error" | "deleted";
|
|
572
577
|
interface TenantsTable {
|
|
@@ -567,6 +567,11 @@ interface Database {
|
|
|
567
567
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
568
568
|
bns_names: BnsNamesTable;
|
|
569
569
|
bns_namespaces: BnsNamespacesTable;
|
|
570
|
+
service_heartbeats: ServiceHeartbeatsTable;
|
|
571
|
+
}
|
|
572
|
+
interface ServiceHeartbeatsTable {
|
|
573
|
+
name: string;
|
|
574
|
+
updated_at: Generated<Date>;
|
|
570
575
|
}
|
|
571
576
|
type TenantStatus = "provisioning" | "active" | "limit_warning" | "paused_limit" | "suspended" | "error" | "deleted";
|
|
572
577
|
interface TenantsTable {
|
|
@@ -567,6 +567,11 @@ interface Database {
|
|
|
567
567
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
568
568
|
bns_names: BnsNamesTable;
|
|
569
569
|
bns_namespaces: BnsNamespacesTable;
|
|
570
|
+
service_heartbeats: ServiceHeartbeatsTable;
|
|
571
|
+
}
|
|
572
|
+
interface ServiceHeartbeatsTable {
|
|
573
|
+
name: string;
|
|
574
|
+
updated_at: Generated<Date>;
|
|
570
575
|
}
|
|
571
576
|
type TenantStatus = "provisioning" | "active" | "limit_warning" | "paused_limit" | "suspended" | "error" | "deleted";
|
|
572
577
|
interface TenantsTable {
|
|
@@ -567,6 +567,11 @@ interface Database {
|
|
|
567
567
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
568
568
|
bns_names: BnsNamesTable;
|
|
569
569
|
bns_namespaces: BnsNamespacesTable;
|
|
570
|
+
service_heartbeats: ServiceHeartbeatsTable;
|
|
571
|
+
}
|
|
572
|
+
interface ServiceHeartbeatsTable {
|
|
573
|
+
name: string;
|
|
574
|
+
updated_at: Generated<Date>;
|
|
570
575
|
}
|
|
571
576
|
type TenantStatus = "provisioning" | "active" | "limit_warning" | "paused_limit" | "suspended" | "error" | "deleted";
|
|
572
577
|
interface TenantsTable {
|
|
@@ -567,6 +567,11 @@ interface Database {
|
|
|
567
567
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
568
568
|
bns_names: BnsNamesTable;
|
|
569
569
|
bns_namespaces: BnsNamespacesTable;
|
|
570
|
+
service_heartbeats: ServiceHeartbeatsTable;
|
|
571
|
+
}
|
|
572
|
+
interface ServiceHeartbeatsTable {
|
|
573
|
+
name: string;
|
|
574
|
+
updated_at: Generated<Date>;
|
|
570
575
|
}
|
|
571
576
|
type TenantStatus = "provisioning" | "active" | "limit_warning" | "paused_limit" | "suspended" | "error" | "deleted";
|
|
572
577
|
interface TenantsTable {
|
|
@@ -567,6 +567,11 @@ interface Database {
|
|
|
567
567
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
568
568
|
bns_names: BnsNamesTable;
|
|
569
569
|
bns_namespaces: BnsNamespacesTable;
|
|
570
|
+
service_heartbeats: ServiceHeartbeatsTable;
|
|
571
|
+
}
|
|
572
|
+
interface ServiceHeartbeatsTable {
|
|
573
|
+
name: string;
|
|
574
|
+
updated_at: Generated<Date>;
|
|
570
575
|
}
|
|
571
576
|
type TenantStatus = "provisioning" | "active" | "limit_warning" | "paused_limit" | "suspended" | "error" | "deleted";
|
|
572
577
|
interface TenantsTable {
|
package/dist/src/db/schema.d.ts
CHANGED
|
@@ -566,6 +566,11 @@ interface Database {
|
|
|
566
566
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
567
567
|
bns_names: BnsNamesTable;
|
|
568
568
|
bns_namespaces: BnsNamespacesTable;
|
|
569
|
+
service_heartbeats: ServiceHeartbeatsTable;
|
|
570
|
+
}
|
|
571
|
+
interface ServiceHeartbeatsTable {
|
|
572
|
+
name: string;
|
|
573
|
+
updated_at: Generated<Date>;
|
|
569
574
|
}
|
|
570
575
|
type TenantStatus = "provisioning" | "active" | "limit_warning" | "paused_limit" | "suspended" | "error" | "deleted";
|
|
571
576
|
interface TenantsTable {
|
|
@@ -777,4 +782,4 @@ interface SubscriptionDeliveriesTable {
|
|
|
777
782
|
}
|
|
778
783
|
type SubscriptionDelivery = Selectable<SubscriptionDeliveriesTable>;
|
|
779
784
|
type InsertSubscriptionDelivery = Insertable<SubscriptionDeliveriesTable>;
|
|
780
|
-
export { WaitlistTable, UsageSnapshotsTable, UsageSnapshot, UsageDailyTable, UsageDaily, UpdateTransaction, UpdateTenantUsageMonthly, UpdateTenantComputeAddon, UpdateTenant, UpdateSubscriptionOutbox, UpdateSubscription, UpdateSubgraphOperation, UpdateSubgraph, UpdateProject, UpdateIndexProgress, UpdateEvent, UpdateChatSession, UpdateBlock, UpdateApiKey, UpdateAccountSpendCap, TransactionsTable, Transaction, TenantsTable, TenantUsageMonthlyTable, TenantUsageMonthly, TenantStatus, TenantComputeAddonsTable, TenantComputeAddon, Tenant, TeamMembersTable, TeamMember, TeamInvitationsTable, TeamInvitation, SubscriptionsTable, SubscriptionStatus, SubscriptionRuntime, SubscriptionOutboxTable, SubscriptionOutbox, SubscriptionFormat, SubscriptionDelivery, SubscriptionDeliveriesTable, Subscription, SubgraphsTable, SubgraphUsageDailyTable, SubgraphUsageDaily, SubgraphTableSnapshotsTable, SubgraphProcessingStatsTable, SubgraphOperationsTable, SubgraphOperationStatus, SubgraphOperationKind, SubgraphOperation, SubgraphHealthSnapshotsTable, SubgraphHealthSnapshot, SubgraphGapsTable, SubgraphGap, Subgraph, SessionsTable, Session, SbtcTokenEventsTable, SbtcTokenEventType, SbtcSupplySnapshotsTable, SbtcEventsTable, SbtcEventTopic, ProvisioningAuditStatus, ProvisioningAuditLogTable, ProvisioningAuditLog, ProvisioningAuditEvent, ProjectsTable, Project, ProcessedStripeEventsTable, Pox4SignersDailyTable, Pox4FunctionName, Pox4CyclesDailyTable, Pox4CallsTable, OutboxStatus, MagicLinksTable, MagicLink, L2DecoderCheckpointsTable, InsertTransaction, InsertTenantUsageMonthly, InsertTenantComputeAddon, InsertTenant, InsertTeamMember, InsertTeamInvitation, InsertSubscriptionOutbox, InsertSubscriptionDelivery, InsertSubscription, InsertSubgraphUsageDaily, InsertSubgraphOperation, InsertSubgraphHealthSnapshot, InsertSubgraphGap, InsertSubgraph, InsertSession, InsertProvisioningAuditLog, InsertProject, InsertMagicLink, InsertIndexProgress, InsertEvent, InsertChatSession, InsertChatMessage, InsertBlock, InsertApiKey, InsertAccountSpendCap, InsertAccountInsight, InsertAccountAgentRun, InsertAccount, IndexProgressTable, IndexProgress, EventsTable, Event, DecodedEventsTable, Database, ChatSessionsTable, ChatSession, ChatMessagesTable, ChatMessage, ChainReorgsTable, BnsNamespacesTable, BnsNamespaceEventsTable, BnsNamespaceEventStatus, BnsNamesTable, BnsNameEventsTable, BnsNameEventTopic, BnsMarketplaceEventsTable, BnsMarketplaceAction, BlocksTable, Block, ApiKeysTable, ApiKey, AccountsTable, AccountSpendCapsTable, AccountSpendCap, AccountInsightsTable, AccountInsight, AccountAgentRunsTable, AccountAgentRun, Account };
|
|
785
|
+
export { WaitlistTable, UsageSnapshotsTable, UsageSnapshot, UsageDailyTable, UsageDaily, UpdateTransaction, UpdateTenantUsageMonthly, UpdateTenantComputeAddon, UpdateTenant, UpdateSubscriptionOutbox, UpdateSubscription, UpdateSubgraphOperation, UpdateSubgraph, UpdateProject, UpdateIndexProgress, UpdateEvent, UpdateChatSession, UpdateBlock, UpdateApiKey, UpdateAccountSpendCap, TransactionsTable, Transaction, TenantsTable, TenantUsageMonthlyTable, TenantUsageMonthly, TenantStatus, TenantComputeAddonsTable, TenantComputeAddon, Tenant, TeamMembersTable, TeamMember, TeamInvitationsTable, TeamInvitation, SubscriptionsTable, SubscriptionStatus, SubscriptionRuntime, SubscriptionOutboxTable, SubscriptionOutbox, SubscriptionFormat, SubscriptionDelivery, SubscriptionDeliveriesTable, Subscription, SubgraphsTable, SubgraphUsageDailyTable, SubgraphUsageDaily, SubgraphTableSnapshotsTable, SubgraphProcessingStatsTable, SubgraphOperationsTable, SubgraphOperationStatus, SubgraphOperationKind, SubgraphOperation, SubgraphHealthSnapshotsTable, SubgraphHealthSnapshot, SubgraphGapsTable, SubgraphGap, Subgraph, SessionsTable, Session, ServiceHeartbeatsTable, SbtcTokenEventsTable, SbtcTokenEventType, SbtcSupplySnapshotsTable, SbtcEventsTable, SbtcEventTopic, ProvisioningAuditStatus, ProvisioningAuditLogTable, ProvisioningAuditLog, ProvisioningAuditEvent, ProjectsTable, Project, ProcessedStripeEventsTable, Pox4SignersDailyTable, Pox4FunctionName, Pox4CyclesDailyTable, Pox4CallsTable, OutboxStatus, MagicLinksTable, MagicLink, L2DecoderCheckpointsTable, InsertTransaction, InsertTenantUsageMonthly, InsertTenantComputeAddon, InsertTenant, InsertTeamMember, InsertTeamInvitation, InsertSubscriptionOutbox, InsertSubscriptionDelivery, InsertSubscription, InsertSubgraphUsageDaily, InsertSubgraphOperation, InsertSubgraphHealthSnapshot, InsertSubgraphGap, InsertSubgraph, InsertSession, InsertProvisioningAuditLog, InsertProject, InsertMagicLink, InsertIndexProgress, InsertEvent, InsertChatSession, InsertChatMessage, InsertBlock, InsertApiKey, InsertAccountSpendCap, InsertAccountInsight, InsertAccountAgentRun, InsertAccount, IndexProgressTable, IndexProgress, EventsTable, Event, DecodedEventsTable, Database, ChatSessionsTable, ChatSession, ChatMessagesTable, ChatMessage, ChainReorgsTable, BnsNamespacesTable, BnsNamespaceEventsTable, BnsNamespaceEventStatus, BnsNamesTable, BnsNameEventsTable, BnsNameEventTopic, BnsMarketplaceEventsTable, BnsMarketplaceAction, BlocksTable, Block, ApiKeysTable, ApiKey, AccountsTable, AccountSpendCapsTable, AccountSpendCap, AccountInsightsTable, AccountInsight, AccountAgentRunsTable, AccountAgentRun, Account };
|
package/dist/src/index.d.ts
CHANGED
|
@@ -566,6 +566,11 @@ interface Database {
|
|
|
566
566
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
567
567
|
bns_names: BnsNamesTable;
|
|
568
568
|
bns_namespaces: BnsNamespacesTable;
|
|
569
|
+
service_heartbeats: ServiceHeartbeatsTable;
|
|
570
|
+
}
|
|
571
|
+
interface ServiceHeartbeatsTable {
|
|
572
|
+
name: string;
|
|
573
|
+
updated_at: Generated<Date>;
|
|
569
574
|
}
|
|
570
575
|
type TenantStatus = "provisioning" | "active" | "limit_warning" | "paused_limit" | "suspended" | "error" | "deleted";
|
|
571
576
|
interface TenantsTable {
|
|
@@ -1387,4 +1392,4 @@ declare function createSignatureHeader(payload: string, secret: string, timestam
|
|
|
1387
1392
|
* Returns true if valid, false otherwise
|
|
1388
1393
|
*/
|
|
1389
1394
|
declare function verifySignatureHeader(payload: string, header: string, secret: string, toleranceSeconds?: number): boolean;
|
|
1390
|
-
export { validateSubscriptionFilterForTable, sql, parseJsonb, logger, jsonb, getTargetDb, getSourceDb, getRawClient, getErrorMessage, getEnv, getDb, generateSubgraphSpec, generateSubgraphOpenApi, generateSubgraphMarkdown, generateSubgraphAgentSchema, formatSubscriptionSchemaErrors, exports_hmac as crypto, closeDb, WaitlistTable, VersionConflictError, ValidationError, UsageSnapshotsTable, UsageSnapshot, UsageDailyTable, UsageDaily, UpdateTransaction, UpdateTenantUsageMonthly, UpdateTenantComputeAddon, UpdateTenant, UpdateSubscriptionRequestSchema, UpdateSubscriptionRequest, UpdateSubscriptionOutbox, UpdateSubscription, UpdateSubgraphOperation, UpdateSubgraph, UpdateProject, UpdateProfileRequestSchema, UpdateProfileRequest, UpdateIndexProgress, UpdateEvent, UpdateChatSession, UpdateBlock, UpdateApiKey, UpdateAccountSpendCap, TransactionsTable, Transaction, TenantsTable, TenantUsageMonthlyTable, TenantUsageMonthly, TenantSuspendedError, TenantStatus, TenantComputeAddonsTable, TenantComputeAddon, Tenant, TeamMembersTable, TeamMember, TeamInvitationsTable, TeamInvitation, SubscriptionsTable, SubscriptionSummary, SubscriptionStatusSchema, SubscriptionStatus, SubscriptionSchemaTables, SubscriptionSchemaTable, SubscriptionSchemaColumn, SubscriptionRuntimeSchema, SubscriptionRuntime, SubscriptionOutboxTable, SubscriptionOutbox, SubscriptionFormatSchema, SubscriptionFormat, SubscriptionFilterSchema, SubscriptionFilterPrimitiveSchema, SubscriptionFilterPrimitive, SubscriptionFilterOperatorSchema, SubscriptionFilterOperator, SubscriptionFilterClauseSchema, SubscriptionFilterClause, SubscriptionFilter, SubscriptionDetail, SubscriptionDelivery, SubscriptionDeliveriesTable, Subscription, SubgraphsTable, SubgraphUsageDailyTable, SubgraphUsageDaily, SubgraphTableSnapshotsTable, SubgraphSyncInfo, SubgraphSummary, SubgraphSpecOptions, SubgraphSpecFormat, SubgraphResourceWarning, SubgraphQueryParams, SubgraphProcessingStatsTable, SubgraphOperationsTable, SubgraphOperationStatus, SubgraphOperationKind, SubgraphOperation, SubgraphHealthSnapshotsTable, SubgraphHealthSnapshot, SubgraphGapsTable, SubgraphGapsResponse, SubgraphGapRange, SubgraphGapEntry, SubgraphGap, SubgraphDetail, SubgraphAgentSchema, Subgraph, StxTransferFilterSchema, StxTransferFilter, StxMintFilterSchema, StxMintFilter, StxLockFilterSchema, StxLockFilter, StxBurnFilterSchema, StxBurnFilter, SessionsTable, Session, SecondLayerError, SbtcTokenEventsTable, SbtcTokenEventType, SbtcSupplySnapshotsTable, SbtcEventsTable, SbtcEventTopic, SUBSCRIPTION_STATUSES, SUBSCRIPTION_RUNTIMES, SUBSCRIPTION_FORMATS, SUBSCRIPTION_FILTER_OPERATORS, RotateSecretResponse, ReplaySubscriptionRequestSchema, ReplaySubscriptionRequest, ReplayResult, ReindexResponse, RateLimitError, ProvisioningAuditStatus, ProvisioningAuditLogTable, ProvisioningAuditLog, ProvisioningAuditEvent, ProjectsTable, Project, ProcessedStripeEventsTable, PrintEventFilterSchema, PrintEventFilter, Pox4SignersDailyTable, Pox4FunctionName, Pox4CyclesDailyTable, Pox4CallsTable, ParsedUpdateSubscriptionRequest, ParsedReplaySubscriptionRequest, ParsedCreateSubscriptionRequest, OutboxStatus, NotFoundError, NftTransferFilterSchema, NftTransferFilter, NftMintFilterSchema, NftMintFilter, NftBurnFilterSchema, NftBurnFilter, MagicLinksTable, MagicLink, L2DecoderCheckpointsTable, KeyRotatedError, InsertTransaction, InsertTenantUsageMonthly, InsertTenantComputeAddon, InsertTenant, InsertTeamMember, InsertTeamInvitation, InsertSubscriptionOutbox, InsertSubscriptionDelivery, InsertSubscription, InsertSubgraphUsageDaily, InsertSubgraphOperation, InsertSubgraphHealthSnapshot, InsertSubgraphGap, InsertSubgraph, InsertSession, InsertProvisioningAuditLog, InsertProject, InsertMagicLink, InsertIndexProgress, InsertEvent, InsertChatSession, InsertChatMessage, InsertBlock, InsertApiKey, InsertAccountSpendCap, InsertAccountInsight, InsertAccountAgentRun, InsertAccount, IndexProgressTable, IndexProgress, FtTransferFilterSchema, FtTransferFilter, FtMintFilterSchema, FtMintFilter, FtBurnFilterSchema, FtBurnFilter, ForbiddenError, EventsTable, EventFilterSchema, EventFilter, Event, ErrorCodes, ErrorCode, Env, DeploySubgraphResponse, DeploySubgraphRequestSchema, DeploySubgraphRequest, DeliveryRow, DecodedEventsTable, DeadRow, DatabaseError, Database, CreateSubscriptionResponse, CreateSubscriptionRequestSchema, CreateSubscriptionRequest, ContractDeployFilterSchema, ContractDeployFilter, ContractCallFilterSchema, ContractCallFilter, ChatSessionsTable, ChatSession, ChatMessagesTable, ChatMessage, ChainReorgsTable, CODE_TO_STATUS, BnsNamespacesTable, BnsNamespaceEventsTable, BnsNamespaceEventStatus, BnsNamesTable, BnsNameEventsTable, BnsNameEventTopic, BnsMarketplaceEventsTable, BnsMarketplaceAction, BlocksTable, Block, AuthorizationError, AuthenticationError, ApiKeysTable, ApiKey, AccountsTable, AccountSpendCapsTable, AccountSpendCap, AccountInsightsTable, AccountInsight, AccountAgentRunsTable, AccountAgentRun, Account };
|
|
1395
|
+
export { validateSubscriptionFilterForTable, sql, parseJsonb, logger, jsonb, getTargetDb, getSourceDb, getRawClient, getErrorMessage, getEnv, getDb, generateSubgraphSpec, generateSubgraphOpenApi, generateSubgraphMarkdown, generateSubgraphAgentSchema, formatSubscriptionSchemaErrors, exports_hmac as crypto, closeDb, WaitlistTable, VersionConflictError, ValidationError, UsageSnapshotsTable, UsageSnapshot, UsageDailyTable, UsageDaily, UpdateTransaction, UpdateTenantUsageMonthly, UpdateTenantComputeAddon, UpdateTenant, UpdateSubscriptionRequestSchema, UpdateSubscriptionRequest, UpdateSubscriptionOutbox, UpdateSubscription, UpdateSubgraphOperation, UpdateSubgraph, UpdateProject, UpdateProfileRequestSchema, UpdateProfileRequest, UpdateIndexProgress, UpdateEvent, UpdateChatSession, UpdateBlock, UpdateApiKey, UpdateAccountSpendCap, TransactionsTable, Transaction, TenantsTable, TenantUsageMonthlyTable, TenantUsageMonthly, TenantSuspendedError, TenantStatus, TenantComputeAddonsTable, TenantComputeAddon, Tenant, TeamMembersTable, TeamMember, TeamInvitationsTable, TeamInvitation, SubscriptionsTable, SubscriptionSummary, SubscriptionStatusSchema, SubscriptionStatus, SubscriptionSchemaTables, SubscriptionSchemaTable, SubscriptionSchemaColumn, SubscriptionRuntimeSchema, SubscriptionRuntime, SubscriptionOutboxTable, SubscriptionOutbox, SubscriptionFormatSchema, SubscriptionFormat, SubscriptionFilterSchema, SubscriptionFilterPrimitiveSchema, SubscriptionFilterPrimitive, SubscriptionFilterOperatorSchema, SubscriptionFilterOperator, SubscriptionFilterClauseSchema, SubscriptionFilterClause, SubscriptionFilter, SubscriptionDetail, SubscriptionDelivery, SubscriptionDeliveriesTable, Subscription, SubgraphsTable, SubgraphUsageDailyTable, SubgraphUsageDaily, SubgraphTableSnapshotsTable, SubgraphSyncInfo, SubgraphSummary, SubgraphSpecOptions, SubgraphSpecFormat, SubgraphResourceWarning, SubgraphQueryParams, SubgraphProcessingStatsTable, SubgraphOperationsTable, SubgraphOperationStatus, SubgraphOperationKind, SubgraphOperation, SubgraphHealthSnapshotsTable, SubgraphHealthSnapshot, SubgraphGapsTable, SubgraphGapsResponse, SubgraphGapRange, SubgraphGapEntry, SubgraphGap, SubgraphDetail, SubgraphAgentSchema, Subgraph, StxTransferFilterSchema, StxTransferFilter, StxMintFilterSchema, StxMintFilter, StxLockFilterSchema, StxLockFilter, StxBurnFilterSchema, StxBurnFilter, SessionsTable, Session, ServiceHeartbeatsTable, SecondLayerError, SbtcTokenEventsTable, SbtcTokenEventType, SbtcSupplySnapshotsTable, SbtcEventsTable, SbtcEventTopic, SUBSCRIPTION_STATUSES, SUBSCRIPTION_RUNTIMES, SUBSCRIPTION_FORMATS, SUBSCRIPTION_FILTER_OPERATORS, RotateSecretResponse, ReplaySubscriptionRequestSchema, ReplaySubscriptionRequest, ReplayResult, ReindexResponse, RateLimitError, ProvisioningAuditStatus, ProvisioningAuditLogTable, ProvisioningAuditLog, ProvisioningAuditEvent, ProjectsTable, Project, ProcessedStripeEventsTable, PrintEventFilterSchema, PrintEventFilter, Pox4SignersDailyTable, Pox4FunctionName, Pox4CyclesDailyTable, Pox4CallsTable, ParsedUpdateSubscriptionRequest, ParsedReplaySubscriptionRequest, ParsedCreateSubscriptionRequest, OutboxStatus, NotFoundError, NftTransferFilterSchema, NftTransferFilter, NftMintFilterSchema, NftMintFilter, NftBurnFilterSchema, NftBurnFilter, MagicLinksTable, MagicLink, L2DecoderCheckpointsTable, KeyRotatedError, InsertTransaction, InsertTenantUsageMonthly, InsertTenantComputeAddon, InsertTenant, InsertTeamMember, InsertTeamInvitation, InsertSubscriptionOutbox, InsertSubscriptionDelivery, InsertSubscription, InsertSubgraphUsageDaily, InsertSubgraphOperation, InsertSubgraphHealthSnapshot, InsertSubgraphGap, InsertSubgraph, InsertSession, InsertProvisioningAuditLog, InsertProject, InsertMagicLink, InsertIndexProgress, InsertEvent, InsertChatSession, InsertChatMessage, InsertBlock, InsertApiKey, InsertAccountSpendCap, InsertAccountInsight, InsertAccountAgentRun, InsertAccount, IndexProgressTable, IndexProgress, FtTransferFilterSchema, FtTransferFilter, FtMintFilterSchema, FtMintFilter, FtBurnFilterSchema, FtBurnFilter, ForbiddenError, EventsTable, EventFilterSchema, EventFilter, Event, ErrorCodes, ErrorCode, Env, DeploySubgraphResponse, DeploySubgraphRequestSchema, DeploySubgraphRequest, DeliveryRow, DecodedEventsTable, DeadRow, DatabaseError, Database, CreateSubscriptionResponse, CreateSubscriptionRequestSchema, CreateSubscriptionRequest, ContractDeployFilterSchema, ContractDeployFilter, ContractCallFilterSchema, ContractCallFilter, ChatSessionsTable, ChatSession, ChatMessagesTable, ChatMessage, ChainReorgsTable, CODE_TO_STATUS, BnsNamespacesTable, BnsNamespaceEventsTable, BnsNamespaceEventStatus, BnsNamesTable, BnsNameEventsTable, BnsNameEventTopic, BnsMarketplaceEventsTable, BnsMarketplaceAction, BlocksTable, Block, AuthorizationError, AuthenticationError, ApiKeysTable, ApiKey, AccountsTable, AccountSpendCapsTable, AccountSpendCap, AccountInsightsTable, AccountInsight, AccountAgentRunsTable, AccountAgentRun, Account };
|
|
@@ -567,6 +567,11 @@ interface Database {
|
|
|
567
567
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
568
568
|
bns_names: BnsNamesTable;
|
|
569
569
|
bns_namespaces: BnsNamespacesTable;
|
|
570
|
+
service_heartbeats: ServiceHeartbeatsTable;
|
|
571
|
+
}
|
|
572
|
+
interface ServiceHeartbeatsTable {
|
|
573
|
+
name: string;
|
|
574
|
+
updated_at: Generated<Date>;
|
|
570
575
|
}
|
|
571
576
|
type TenantStatus = "provisioning" | "active" | "limit_warning" | "paused_limit" | "suspended" | "error" | "deleted";
|
|
572
577
|
interface TenantsTable {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Service heartbeats — a tiny liveness table that long-running services
|
|
5
|
+
* (subgraph-processor, l2-decoder, etc.) upsert into periodically. The
|
|
6
|
+
* platform `/public/status` route reads it to surface "is this service
|
|
7
|
+
* actually running" without needing in-cluster docker inspection.
|
|
8
|
+
*/
|
|
9
|
+
// biome-ignore lint/suspicious/noExplicitAny: interop boundary or dynamic-shape value where typing adds friction without runtime safety
|
|
10
|
+
export async function up(db: Kysely<any>): Promise<void> {
|
|
11
|
+
await db.schema
|
|
12
|
+
.createTable("service_heartbeats")
|
|
13
|
+
.addColumn("name", "text", (c) => c.primaryKey())
|
|
14
|
+
.addColumn("updated_at", "timestamptz", (c) =>
|
|
15
|
+
c.notNull().defaultTo(sql`now()`),
|
|
16
|
+
)
|
|
17
|
+
.execute();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// biome-ignore lint/suspicious/noExplicitAny: interop boundary or dynamic-shape value where typing adds friction without runtime safety
|
|
21
|
+
export async function down(db: Kysely<any>): Promise<void> {
|
|
22
|
+
await db.schema.dropTable("service_heartbeats").execute();
|
|
23
|
+
}
|