diff --git a/apps/consumers/package.json b/apps/consumers/package.json index 7f8bafc7..3da6538d 100644 --- a/apps/consumers/package.json +++ b/apps/consumers/package.json @@ -25,9 +25,11 @@ "typescript": "^5.8.3" }, "dependencies": { + "@anticapture/observability": "^1.0.0", "@notification-system/anticapture-client": "workspace:*", "@notification-system/messages": "workspace:*", "@notification-system/rabbitmq-client": "workspace:*", + "@opentelemetry/api": "^1.9.0", "@slack/bolt": "^4.4.0", "@slack/web-api": "^7.10.0", "axios": "^1.7.2", diff --git a/apps/consumers/src/app.ts b/apps/consumers/src/app.ts index aff45718..a75cd9a0 100644 --- a/apps/consumers/src/app.ts +++ b/apps/consumers/src/app.ts @@ -17,6 +17,10 @@ import { SubscriptionAPIService } from './services/subscription-api.service'; import { RabbitMQNotificationConsumerService } from './services/rabbitmq-notification-consumer.service'; import { TelegramClientInterface } from './interfaces/telegram-client.interface'; import { SlackClientInterface } from './interfaces/slack-client.interface'; +import { createLogger, wrapWithTracing } from '@anticapture/observability'; + +const logger = createLogger('consumers'); + export class App { private telegramBotService: TelegramBotService; private slackBotService: SlackBotService; @@ -37,40 +41,41 @@ export class App { slackClient: SlackClientInterface, webhookPort: number ) { - const subscriptionApi = new SubscriptionAPIService(subscriptionServerUrl); - const anticaptureClient = new AnticaptureClient(httpClient); + const subscriptionApi = wrapWithTracing(new SubscriptionAPIService(subscriptionServerUrl, logger)); + const anticaptureClient = wrapWithTracing(new AnticaptureClient(httpClient)); const explorerService = new ExplorerService(); // Telegram services - const telegramDaoService = new TelegramDAOService(anticaptureClient, subscriptionApi); - const telegramWalletService = new TelegramWalletService(subscriptionApi, ensResolver); - const telegramSettingsService = new TelegramSettingsService(subscriptionApi); + const telegramDaoService = wrapWithTracing(new TelegramDAOService(anticaptureClient, subscriptionApi, logger)); + const telegramWalletService = wrapWithTracing(new TelegramWalletService(subscriptionApi, ensResolver, logger)); + const telegramSettingsService = wrapWithTracing(new TelegramSettingsService(subscriptionApi, logger)); - this.telegramBotService = new TelegramBotService( + this.telegramBotService = wrapWithTracing(new TelegramBotService( telegramClient, telegramDaoService, telegramWalletService, telegramSettingsService, explorerService, ensResolver - ); + )); - const slackDaoService = new SlackDAOService(anticaptureClient, subscriptionApi); - const slackWalletService = new SlackWalletService(subscriptionApi, ensResolver); - const slackSettingsService = new SlackSettingsService(subscriptionApi); + const slackDaoService = wrapWithTracing(new SlackDAOService(anticaptureClient, subscriptionApi, logger)); + const slackWalletService = wrapWithTracing(new SlackWalletService(subscriptionApi, ensResolver, logger)); + const slackSettingsService = wrapWithTracing(new SlackSettingsService(subscriptionApi, logger)); - this.slackBotService = new SlackBotService( + this.slackBotService = wrapWithTracing(new SlackBotService( slackClient, ensResolver, slackDaoService, slackWalletService, - slackSettingsService - ); + slackSettingsService, + logger, + )); - this.webhookService = new WebhookService(anticaptureClient, subscriptionApi); + this.webhookService = wrapWithTracing(new WebhookService(anticaptureClient, subscriptionApi, logger)); const webhookController = new WebhookController(this.webhookService); - this.webhookServer = new WebhookServer(webhookController); + this.webhookServer = new WebhookServer(webhookController, logger); this.rabbitmqUrl = rabbitmqUrl; this.webhookPort = webhookPort; @@ -80,30 +85,33 @@ export class App { this.rabbitmqTelegramConsumerService = await RabbitMQNotificationConsumerService.create( this.rabbitmqUrl, this.telegramBotService, - 'telegram' + 'telegram', + logger, ); - console.log('Telegram consumer connected to RabbitMQ'); + logger.info('telegram consumer connected to RabbitMQ'); this.rabbitmqSlackConsumerService = await RabbitMQNotificationConsumerService.create( this.rabbitmqUrl, this.slackBotService, - 'slack' + 'slack', + logger, ); - console.log('Slack consumer connected to RabbitMQ'); + logger.info('slack consumer connected to RabbitMQ'); this.rabbitmqWebhookConsumerService = await RabbitMQNotificationConsumerService.create( this.rabbitmqUrl, this.webhookService, - 'webhook' + 'webhook', + logger, ); - console.log('Webhook consumer connected to RabbitMQ'); + logger.info('webhook consumer connected to RabbitMQ'); await this.webhookServer.start(this.webhookPort); this.telegramBotService.launch(); this.slackBotService.launch(); - console.log('All bot services have been initialized'); + logger.info('all bot services initialized'); } async stop(): Promise { diff --git a/apps/consumers/src/clients/slack.client.ts b/apps/consumers/src/clients/slack.client.ts index 896a96a3..5c89317d 100644 --- a/apps/consumers/src/clients/slack.client.ts +++ b/apps/consumers/src/clients/slack.client.ts @@ -21,6 +21,7 @@ import { } from '../interfaces/slack-context.interface'; import { CryptoUtil } from '../utils/crypto'; import { convertMarkdownToSlack } from '@notification-system/messages'; +import { createLogger, type Logger } from '@anticapture/observability'; export class SlackClient implements SlackClientInterface { private boltApp: App; @@ -28,17 +29,20 @@ export class SlackClient implements SlackClientInterface { private subscriptionServerUrl: string; private tokenEncryptionKey: string; private port: number; - + private readonly logger: Logger; + constructor( signingSecret: string, subscriptionServerUrl: string, tokenEncryptionKey: string, - port: number + port: number, + logger: Logger = createLogger('consumers'), ) { this.sessionStorage = new InMemorySessionStorage(); this.subscriptionServerUrl = subscriptionServerUrl; this.tokenEncryptionKey = tokenEncryptionKey; this.port = port; + this.logger = logger.child({ component: 'SlackClient' }); this.boltApp = this.createBoltApp(signingSecret); } @@ -69,7 +73,7 @@ export class SlackClient implements SlackClientInterface { deleteInstallation: async () => {} }; - console.log('✅ Slack client: OAuth mode initialized'); + this.logger.info({ event: 'slack_client.oauth_initialized' }, 'slack client OAuth mode initialized'); return new App({ signingSecret, receiver: new HTTPReceiver({ @@ -127,7 +131,7 @@ export class SlackClient implements SlackClientInterface { }); if (!result.ok) { - console.error(`Failed to send Slack message: ${result.error}`); + this.logger.error({ slackError: result.error, event: 'slack.send_failed' }, 'failed to send Slack message'); } return { @@ -160,7 +164,7 @@ export class SlackClient implements SlackClientInterface { await handler(context); this.sessionStorage.set(userId, context.session); } catch (error) { - console.error(`Error handling command ${command}:`, error); + this.logger.error({ err: error, command, event: 'slack.command_failed' }, 'error handling command'); await args.ack(); await args.respond({ text: '❌ An error occurred while processing your command. Please try again.', @@ -193,7 +197,7 @@ export class SlackClient implements SlackClientInterface { await handler(context); this.sessionStorage.set(userId, context.session); } catch (error) { - console.error(`Error handling action ${actionId}:`, error); + this.logger.error({ err: error, actionId, event: 'slack.action_failed' }, 'error handling action'); await args.ack(); } }); @@ -221,7 +225,7 @@ export class SlackClient implements SlackClientInterface { await handler(context); this.sessionStorage.set(userId, context.session); } catch (error) { - console.error(`Error handling view ${callbackId}:`, error); + this.logger.error({ err: error, callbackId, event: 'slack.view_failed' }, 'error handling view'); await args.ack(); } }); @@ -250,7 +254,7 @@ export class SlackClient implements SlackClientInterface { await handler(context); this.sessionStorage.set(userId, context.session); } catch (error) { - console.error(`Error handling message pattern ${pattern}:`, error); + this.logger.error({ err: error, pattern, event: 'slack.message_pattern_failed' }, 'error handling message pattern'); } }); } @@ -266,7 +270,7 @@ export class SlackClient implements SlackClientInterface { try { await handler(args); } catch (error) { - console.error(`Error handling event ${eventType}:`, error); + this.logger.error({ err: error, eventType, event: 'slack.event_failed' }, 'error handling event'); } }); } @@ -288,12 +292,12 @@ export class SlackClient implements SlackClientInterface { * Launch the Slack bot */ async launch(): Promise { - console.log('🚀 Starting Slack Bolt app...'); + this.logger.info({ event: 'slack_bot.starting' }, 'starting Slack Bolt app'); try { await this.boltApp.start(this.port); - console.log(`⚡ Slack bot is running on port ${this.port}!`); + this.logger.info({ port: this.port, event: 'slack_bot.started' }, 'slack bot is running'); } catch (error) { - console.error('❌ Failed to start Slack bot:', error); + this.logger.error({ err: error, event: 'slack_bot.start_failed' }, 'failed to start slack bot'); throw error; } } @@ -303,7 +307,7 @@ export class SlackClient implements SlackClientInterface { */ async stop(signal?: string): Promise { await this.boltApp.stop(); - console.log(`Slack bot stopped (${signal || 'manual'})`); + this.logger.info({ signal: signal || 'manual', event: 'slack_bot.stopped' }, 'slack bot stopped'); } /** diff --git a/apps/consumers/src/clients/telegram.client.ts b/apps/consumers/src/clients/telegram.client.ts index 11abb562..fe19854d 100644 --- a/apps/consumers/src/clients/telegram.client.ts +++ b/apps/consumers/src/clients/telegram.client.ts @@ -12,16 +12,23 @@ import { HandlerRegistration } from '../interfaces/telegram-client.interface'; import { ContextWithSession } from '../interfaces/bot.interface'; +import { createLogger, type Logger } from '@anticapture/observability'; export class TelegramClient implements TelegramClientInterface { private bot: Telegraf; private running: boolean = false; private sendOnlyMode: boolean; + private readonly logger: Logger; - constructor(token: string, options?: { sendOnlyMode?: boolean }) { + constructor( + token: string, + options?: { sendOnlyMode?: boolean }, + logger: Logger = createLogger('consumers'), + ) { this.bot = new Telegraf(token); this.bot.use(session()); this.sendOnlyMode = options?.sendOnlyMode || false; + this.logger = logger.child({ component: 'TelegramClient' }); } async sendMessage( @@ -58,13 +65,13 @@ export class TelegramClient implements TelegramClientInterface { if (this.sendOnlyMode) { // In send-only mode, don't start polling/webhook this.running = true; - console.log('🤖 Bot ready for sending messages (send-only mode)'); + this.logger.info({ event: 'telegram_bot.send_only_ready' }, 'bot ready for sending messages (send-only mode)'); return; } - + await this.bot.launch(); this.running = true; - console.log('🤖 Bot is running...'); + this.logger.info({ event: 'telegram_bot.started' }, 'bot is running'); } stop(signal?: string): void { diff --git a/apps/consumers/src/index.ts b/apps/consumers/src/index.ts index c459d4b0..383982c0 100644 --- a/apps/consumers/src/index.ts +++ b/apps/consumers/src/index.ts @@ -8,8 +8,13 @@ * platforms (Telegram, Slack, and any registered webhook endpoint). */ +import './instrumentation'; + import axios from 'axios'; import { App } from './app'; +import { createLogger, wrapWithTracing } from '@anticapture/observability'; + +const logger = createLogger('consumers'); import { loadConfig } from './config/env'; import { EnsResolverService } from './services/ens-resolver.service'; import { TelegramClient } from './clients/telegram.client'; @@ -18,18 +23,19 @@ import { SlackClient } from './clients/slack.client'; const config = loadConfig(); // Create ENS resolver -const ensResolver = new EnsResolverService(config.rpcUrl); +const ensResolver = wrapWithTracing(new EnsResolverService(config.rpcUrl, logger)); // Create Telegram client for production -const telegramClient = new TelegramClient(config.telegramBotToken); +const telegramClient = wrapWithTracing(new TelegramClient(config.telegramBotToken, undefined, logger)); // Create Slack client -const slackClient = new SlackClient( +const slackClient = wrapWithTracing(new SlackClient( config.slackSigningSecret, config.subscriptionServerUrl, config.tokenEncryptionKey, - config.port -); + config.port, + logger, +)); // Create and start the application const app = new App( @@ -50,5 +56,10 @@ const app = new App( ); (async () => { - await app.start(); + try { + await app.start(); + } catch (err) { + logger.error({ err }, 'consumers failed to start'); + process.exit(1); + } })(); \ No newline at end of file diff --git a/apps/consumers/src/instrumentation.ts b/apps/consumers/src/instrumentation.ts new file mode 100644 index 00000000..c63d4024 --- /dev/null +++ b/apps/consumers/src/instrumentation.ts @@ -0,0 +1,3 @@ +import { createObservabilityProvider } from '@anticapture/observability'; + +createObservabilityProvider('consumers'); diff --git a/apps/consumers/src/services/bot/slack-bot.service.ts b/apps/consumers/src/services/bot/slack-bot.service.ts index 8f3dc644..e56a993a 100644 --- a/apps/consumers/src/services/bot/slack-bot.service.ts +++ b/apps/consumers/src/services/bot/slack-bot.service.ts @@ -14,6 +14,7 @@ import { SlackDAOService } from '../dao/slack-dao.service'; import { SlackWalletService } from '../wallet/slack-wallet.service'; import { SlackSettingsService } from '../settings/slack-settings.service'; import { SlackCommandContext } from '../../interfaces/slack-context.interface'; +import { createLogger, type Logger } from '@anticapture/observability'; export class SlackBotService implements BotServiceInterface { private slackClient: SlackClientInterface; @@ -21,19 +22,22 @@ export class SlackBotService implements BotServiceInterface { private daoService?: SlackDAOService; private walletService?: SlackWalletService; private settingsService?: SlackSettingsService; + private readonly logger: Logger; constructor( slackClient: SlackClientInterface, ensResolver: EnsResolverService, daoService?: SlackDAOService, walletService?: SlackWalletService, - settingsService?: SlackSettingsService + settingsService?: SlackSettingsService, + logger: Logger = createLogger('consumers'), ) { this.slackClient = slackClient; this.ensResolver = ensResolver; this.daoService = daoService; this.walletService = walletService; this.settingsService = settingsService; + this.logger = logger.child({ component: 'SlackBotService' }); this.setupCommands(); } @@ -195,7 +199,7 @@ export class SlackBotService implements BotServiceInterface { } } } catch (error) { - console.error('Error handling app_home_opened:', error); + this.logger.error({ err: error, event: 'slack.app_home_opened_failed' }, 'error handling app_home_opened'); } } diff --git a/apps/consumers/src/services/bot/telegram-bot.service.ts b/apps/consumers/src/services/bot/telegram-bot.service.ts index 59ac5740..a283d839 100644 --- a/apps/consumers/src/services/bot/telegram-bot.service.ts +++ b/apps/consumers/src/services/bot/telegram-bot.service.ts @@ -274,7 +274,6 @@ export class TelegramBotService implements BotServiceInterface { payload.channelUserId, processedMessage, { - parse_mode: 'Markdown', disable_web_page_preview: true, reply_markup: replyMarkup } diff --git a/apps/consumers/src/services/dao/base-dao.service.ts b/apps/consumers/src/services/dao/base-dao.service.ts index 026bd2cd..d4f8466b 100644 --- a/apps/consumers/src/services/dao/base-dao.service.ts +++ b/apps/consumers/src/services/dao/base-dao.service.ts @@ -7,6 +7,7 @@ import { AnticaptureClient } from '@notification-system/anticapture-client'; import { SubscriptionAPIService } from '../subscription-api.service'; import { getDaoWithEmoji } from '@notification-system/messages'; +import { createLogger, type Logger } from '@anticapture/observability'; export interface DAOSelectionState { selections: Set; @@ -14,10 +15,15 @@ export interface DAOSelectionState { } export abstract class BaseDAOService { + protected readonly logger: Logger; + constructor( protected readonly anticaptureClient: AnticaptureClient, - protected readonly subscriptionApi: SubscriptionAPIService - ) {} + protected readonly subscriptionApi: SubscriptionAPIService, + logger: Logger = createLogger('consumers'), + ) { + this.logger = logger.child({ component: `${this.getPlatformId()}-dao` }); + } /** * Abstract method to get the platform identifier diff --git a/apps/consumers/src/services/dao/slack-dao.service.ts b/apps/consumers/src/services/dao/slack-dao.service.ts index e84a7703..09587780 100644 --- a/apps/consumers/src/services/dao/slack-dao.service.ts +++ b/apps/consumers/src/services/dao/slack-dao.service.ts @@ -64,7 +64,7 @@ export class SlackDAOService extends BaseDAOService { }); } } catch (error) { - console.error('Error loading DAOs:', error); + this.logger.error({ err: error, event: 'dao.load_failed' }, 'error loading DAOs'); if (context.respond) { await context.respond({ blocks: errorMessage(slackMessages.dao.loadError), @@ -108,7 +108,7 @@ export class SlackDAOService extends BaseDAOService { }); } } catch (error) { - console.error('Error listing subscriptions:', error); + this.logger.error({ err: error, event: 'dao.list_subscriptions_failed' }, 'error listing subscriptions'); if (context.respond) { await context.respond({ text: slackMessages.dao.listError, @@ -176,7 +176,7 @@ export class SlackDAOService extends BaseDAOService { }); } } catch (error) { - console.error('Error updating subscriptions:', error); + this.logger.error({ err: error, event: 'dao.update_failed' }, 'error updating subscriptions'); if (context.respond) { await context.respond({ replace_original: false, diff --git a/apps/consumers/src/services/dao/telegram-dao.service.ts b/apps/consumers/src/services/dao/telegram-dao.service.ts index 3f801d4d..43c339b4 100644 --- a/apps/consumers/src/services/dao/telegram-dao.service.ts +++ b/apps/consumers/src/services/dao/telegram-dao.service.ts @@ -57,7 +57,7 @@ export class TelegramDAOService extends BaseDAOService { reply_markup: keyboard }); } catch (error) { - console.error('Error loading DAOs:', error); + this.logger.error({ err: error, event: 'dao.load_failed' }, 'error loading DAOs'); await ctx.reply(uiMessages.errors.loadingDaos); } } @@ -80,7 +80,7 @@ export class TelegramDAOService extends BaseDAOService { const daoList = this.formatDAOListWithBullets(userPreferences); await ctx.reply(`${telegramMessages.dao.listHeader}\n\n${daoList}`, { parse_mode: 'HTML' }); } catch (error) { - console.error('Error listing subscriptions:', error); + this.logger.error({ err: error, event: 'dao.list_subscriptions_failed' }, 'error listing subscriptions'); await ctx.reply(uiMessages.errors.loadingSubscriptions); } } @@ -126,7 +126,7 @@ export class TelegramDAOService extends BaseDAOService { // Clear session ctx.session.daoSelections = new Set(); } catch (error) { - console.error('Error updating subscriptions:', error); + this.logger.error({ err: error, event: 'dao.update_failed' }, 'error updating subscriptions'); await ctx.reply(uiMessages.errors.updateSubscriptionsFailed); } } @@ -153,7 +153,7 @@ export class TelegramDAOService extends BaseDAOService { const keyboard = this.buildInlineKeyboard(daos, ctx.session.daoSelections); await ctx.editMessageReplyMarkup(keyboard); } catch (error) { - console.error('Error updating keyboard:', error); + this.logger.error({ err: error, event: 'dao.keyboard_update_failed' }, 'error updating keyboard'); } } diff --git a/apps/consumers/src/services/ens-resolver.service.ts b/apps/consumers/src/services/ens-resolver.service.ts index 02055b7b..ce222a58 100644 --- a/apps/consumers/src/services/ens-resolver.service.ts +++ b/apps/consumers/src/services/ens-resolver.service.ts @@ -6,19 +6,22 @@ import { createPublicClient, http, getAddress } from 'viem'; import { mainnet } from 'viem/chains'; import { normalize } from 'viem/ens'; +import { createLogger, type Logger } from '@anticapture/observability'; export class EnsResolverService { private client; + private readonly logger: Logger; - constructor(rpcUrl?: string) { + constructor(rpcUrl?: string, logger: Logger = createLogger('consumers')) { this.client = createPublicClient({ chain: mainnet, transport: http(rpcUrl, { timeout: 5_000, // 5 seconds timeout - retryCount: 3, // Try 3 times + retryCount: 3, // Try 3 times retryDelay: 500 // Wait 500ms between retries }) }); + this.logger = logger.child({ component: 'EnsResolverService' }); } /** @@ -33,7 +36,10 @@ export class EnsResolverService { }); return address; } catch (error) { - console.error(`Failed to resolve ENS name ${ensName}:`, error); + this.logger.error( + { err: error, ensName, event: 'ens.resolve_failed' }, + 'failed to resolve ENS name', + ); return null; } } @@ -51,7 +57,10 @@ export class EnsResolverService { }); if (ensName) return ensName; } catch (error) { - console.error(`Failed to lookup ENS for address ${address}:`, error); + this.logger.error( + { err: error, address, event: 'ens.lookup_failed' }, + 'failed to lookup ENS for address', + ); } return address; diff --git a/apps/consumers/src/services/rabbitmq-notification-consumer.service.ts b/apps/consumers/src/services/rabbitmq-notification-consumer.service.ts index 40794738..dcfab0c8 100644 --- a/apps/consumers/src/services/rabbitmq-notification-consumer.service.ts +++ b/apps/consumers/src/services/rabbitmq-notification-consumer.service.ts @@ -1,6 +1,7 @@ import { RabbitMQConnection, RabbitMQConsumer, RabbitMQMessage } from '@notification-system/rabbitmq-client'; import { NotificationPayload } from '../interfaces/notification.interface'; import { BotServiceInterface } from '../interfaces/bot-service.interface'; +import { createLogger, type Logger } from '@anticapture/observability'; /** * Generic service to consume notification messages from RabbitMQ Topic Exchange @@ -8,13 +9,17 @@ import { BotServiceInterface } from '../interfaces/bot-service.interface'; */ export class RabbitMQNotificationConsumerService { private static readonly EXCHANGE_NAME = 'notifications.exchange'; + private readonly logger: Logger; private constructor( private readonly connection: RabbitMQConnection, private readonly consumer: RabbitMQConsumer, private readonly botService: T, - private readonly channel: string - ) {} + private readonly channel: string, + logger: Logger, + ) { + this.logger = logger.child({ component: 'RabbitMQNotificationConsumerService', channel }); + } /** * Creates a notification consumer for a specific channel @@ -25,7 +30,8 @@ export class RabbitMQNotificationConsumerService static async create( rabbitmqUrl: string, botService: T, - channel: string + channel: string, + logger: Logger = createLogger('consumers'), ): Promise> { const connection = new RabbitMQConnection(rabbitmqUrl); await connection.connect(); @@ -40,7 +46,8 @@ export class RabbitMQNotificationConsumerService connection, consumer, botService, - channel + channel, + logger, ); await consumer.consumeFromTopic( @@ -51,7 +58,10 @@ export class RabbitMQNotificationConsumerService } ); - console.log(`✅ ${channel.charAt(0).toUpperCase() + channel.slice(1)} consumer connected and listening on pattern: ${bindingPattern}`); + service.logger.info( + { bindingPattern, event: 'consumer.connected' }, + 'consumer connected and listening', + ); return service; } @@ -69,7 +79,10 @@ export class RabbitMQNotificationConsumerService private async processNotification(message: RabbitMQMessage): Promise { // Validate message type if (message.type !== 'NOTIFICATION_EVENT') { - console.log(`[${this.channel}] Skipping non-notification message type: ${message.type}`); + this.logger.debug( + { messageType: message.type, event: 'notification.skipped_non_notification' }, + 'skipping non-notification message type', + ); return; } @@ -77,18 +90,27 @@ export class RabbitMQNotificationConsumerService // Validate payload structure if (!payload || !payload.userId || !payload.message) { - console.error(`[${this.channel}] Invalid notification payload:`, payload); + this.logger.error( + { payload, event: 'notification.invalid_payload' }, + 'invalid notification payload', + ); return; } // Validate channel matches if (payload.channel !== this.channel) { - console.error(`[${this.channel}] Channel mismatch. Expected ${this.channel}, got ${payload.channel}`); + this.logger.error( + { expected: this.channel, got: payload.channel, event: 'notification.channel_mismatch' }, + 'channel mismatch', + ); return; } // Send notification using the bot service await this.botService.sendNotification(payload); - console.log(`[${this.channel}] Notification sent successfully to user ${payload.userId}`); + this.logger.info( + { userId: payload.userId, event: 'notification.sent' }, + 'notification sent', + ); } } \ No newline at end of file diff --git a/apps/consumers/src/services/settings/base-settings.service.ts b/apps/consumers/src/services/settings/base-settings.service.ts index 20ffd329..dba9f2bb 100644 --- a/apps/consumers/src/services/settings/base-settings.service.ts +++ b/apps/consumers/src/services/settings/base-settings.service.ts @@ -1,11 +1,17 @@ import { NotificationTypeId } from '@notification-system/messages'; import { SubscriptionAPIService } from '../subscription-api.service'; +import { createLogger, type Logger } from '@anticapture/observability'; export abstract class BaseSettingsService { + protected readonly logger: Logger; + constructor( protected subscriptionApi: SubscriptionAPIService, - protected platform: string - ) {} + protected platform: string, + logger: Logger = createLogger('consumers'), + ) { + this.logger = logger.child({ component: `${platform}-settings` }); + } protected async loadPreferences(channelUserId: string): Promise> { const stored = await this.subscriptionApi.getNotificationPreferences( diff --git a/apps/consumers/src/services/settings/slack-settings.service.ts b/apps/consumers/src/services/settings/slack-settings.service.ts index de6c0340..56ec4b48 100644 --- a/apps/consumers/src/services/settings/slack-settings.service.ts +++ b/apps/consumers/src/services/settings/slack-settings.service.ts @@ -2,10 +2,11 @@ import { NOTIFICATION_TYPES, NotificationTypeId } from '@notification-system/mes import { BaseSettingsService } from './base-settings.service'; import { SubscriptionAPIService } from '../subscription-api.service'; import { SlackActionContext } from '../../interfaces/slack-context.interface'; +import { createLogger, type Logger } from '@anticapture/observability'; export class SlackSettingsService extends BaseSettingsService { - constructor(subscriptionApi: SubscriptionAPIService) { - super(subscriptionApi, 'slack'); + constructor(subscriptionApi: SubscriptionAPIService, logger: Logger = createLogger('consumers')) { + super(subscriptionApi, 'slack', logger); } async initialize(ctx: SlackActionContext): Promise { @@ -71,7 +72,7 @@ export class SlackSettingsService extends BaseSettingsService { }); } } catch (error) { - console.error('Error loading notification settings:', error); + this.logger.error({ err: error, event: 'settings.load_failed' }, 'error loading notification settings'); if (ctx.respond) { await ctx.respond({ text: 'Sorry, there was an error loading your settings. Please try again later.', @@ -121,7 +122,7 @@ export class SlackSettingsService extends BaseSettingsService { }); } } catch (error) { - console.error('Error saving notification settings:', error); + this.logger.error({ err: error, event: 'settings.save_failed' }, 'error saving notification settings'); if (ctx.respond) { await ctx.respond({ text: '❌ Failed to save your preferences. Please try again.', diff --git a/apps/consumers/src/services/settings/telegram-settings.service.ts b/apps/consumers/src/services/settings/telegram-settings.service.ts index dae78f46..660b5a7a 100644 --- a/apps/consumers/src/services/settings/telegram-settings.service.ts +++ b/apps/consumers/src/services/settings/telegram-settings.service.ts @@ -2,10 +2,11 @@ import { NOTIFICATION_TYPES, NotificationTypeId } from '@notification-system/mes import { BaseSettingsService } from './base-settings.service'; import { SubscriptionAPIService } from '../subscription-api.service'; import { ContextWithSession } from '../../interfaces/bot.interface'; +import { createLogger, type Logger } from '@anticapture/observability'; export class TelegramSettingsService extends BaseSettingsService { - constructor(subscriptionApi: SubscriptionAPIService) { - super(subscriptionApi, 'telegram'); + constructor(subscriptionApi: SubscriptionAPIService, logger: Logger = createLogger('consumers')) { + super(subscriptionApi, 'telegram', logger); } async initialize(ctx: ContextWithSession): Promise { @@ -24,7 +25,7 @@ export class TelegramSettingsService extends BaseSettingsService { reply_markup: { inline_keyboard: keyboard } }); } catch (error) { - console.error('Error loading notification settings:', error); + this.logger.error({ err: error, event: 'settings.load_failed' }, 'error loading notification settings'); await ctx.reply('Sorry, there was an error loading your settings. Please try again later.'); } } @@ -38,7 +39,7 @@ export class TelegramSettingsService extends BaseSettingsService { try { await ctx.editMessageReplyMarkup({ inline_keyboard: keyboard }); } catch (error) { - console.error('Error updating settings keyboard:', error); + this.logger.error({ err: error, event: 'settings.keyboard_update_failed' }, 'error updating settings keyboard'); } } @@ -50,7 +51,7 @@ export class TelegramSettingsService extends BaseSettingsService { await this.savePreferences(String(chatId), ctx.session.notificationSelections); await ctx.editMessageText('✅ Your notification preferences have been saved!'); } catch (error) { - console.error('Error saving notification settings:', error); + this.logger.error({ err: error, event: 'settings.save_failed' }, 'error saving notification settings'); await ctx.editMessageText('❌ Failed to save your preferences. Please try again.'); } } diff --git a/apps/consumers/src/services/subscription-api.service.ts b/apps/consumers/src/services/subscription-api.service.ts index de29580f..541e01b1 100644 --- a/apps/consumers/src/services/subscription-api.service.ts +++ b/apps/consumers/src/services/subscription-api.service.ts @@ -6,17 +6,23 @@ import axios, { AxiosInstance } from 'axios'; import type { NotificationTypeId } from '@notification-system/messages'; import { UserSubscriptionResponse, UserResponse } from '../interfaces/subscription.interface'; +import { createLogger, type Logger } from '@anticapture/observability'; export class SubscriptionAPIService { private client: AxiosInstance; + private readonly logger: Logger; - constructor(private readonly baseUrl: string) { + constructor( + private readonly baseUrl: string, + logger: Logger = createLogger('consumers'), + ) { this.client = axios.create({ baseURL: this.baseUrl, headers: { 'Content-Type': 'application/json', }, }); + this.logger = logger.child({ component: 'SubscriptionAPIService' }); } /** @@ -90,7 +96,10 @@ export class SubscriptionAPIService { userDAOs.push(daoId.toUpperCase()); } } catch (error) { - console.error(`Error checking subscription for DAO ${daoId}:`, error); + this.logger.error( + { err: error, daoId, event: 'subscription.check_failed' }, + 'error checking subscription for DAO', + ); } } diff --git a/apps/consumers/src/services/wallet/base-wallet.service.ts b/apps/consumers/src/services/wallet/base-wallet.service.ts index 2b5f7fab..b1f9b89a 100644 --- a/apps/consumers/src/services/wallet/base-wallet.service.ts +++ b/apps/consumers/src/services/wallet/base-wallet.service.ts @@ -6,6 +6,7 @@ import { SubscriptionAPIService } from '../subscription-api.service'; import { EnsResolverService } from '../ens-resolver.service'; import { uiMessages } from '@notification-system/messages'; +import { createLogger, type Logger } from '@anticapture/observability'; export interface WalletInfo { address: string; @@ -13,10 +14,16 @@ export interface WalletInfo { } export class BaseWalletService { + protected readonly logger: Logger; + constructor( protected subscriptionApi: SubscriptionAPIService, - protected ensResolver: EnsResolverService - ) {} + protected ensResolver: EnsResolverService, + logger: Logger = createLogger('consumers'), + component: string = 'BaseWalletService', + ) { + this.logger = logger.child({ component }); + } /** * Validates and normalizes a wallet address or ENS name @@ -118,7 +125,7 @@ export class BaseWalletService { address }; } catch (error) { - console.error('Error adding wallet:', error); + this.logger.error({ err: error, event: 'wallet.add_failed' }, 'error adding wallet'); return { success: false, message: uiMessages.errors.generic @@ -154,7 +161,7 @@ export class BaseWalletService { removedCount: addresses.length }; } catch (error) { - console.error('Error removing wallets:', error); + this.logger.error({ err: error, event: 'wallet.remove_failed' }, 'error removing wallets'); return { success: false, message: uiMessages.errors.generic diff --git a/apps/consumers/src/services/wallet/slack-wallet.service.ts b/apps/consumers/src/services/wallet/slack-wallet.service.ts index 6054dc11..7cac959e 100644 --- a/apps/consumers/src/services/wallet/slack-wallet.service.ts +++ b/apps/consumers/src/services/wallet/slack-wallet.service.ts @@ -20,14 +20,16 @@ import { walletSelectionList } from '../../utils/slack-blocks-templates'; import { slackMessages, replacePlaceholders } from '@notification-system/messages'; +import { createLogger, type Logger } from '@anticapture/observability'; export class SlackWalletService extends BaseWalletService { constructor( subscriptionApi: SubscriptionAPIService, - ensResolver: EnsResolverService + ensResolver: EnsResolverService, + logger: Logger = createLogger('consumers'), ) { - super(subscriptionApi, ensResolver); + super(subscriptionApi, ensResolver, logger, 'slack-wallet'); } /** @@ -52,7 +54,7 @@ export class SlackWalletService extends BaseWalletService { await context.ack(); await this.listWallets(context); } catch (error) { - console.error('Error in wallet initialization:', error); + this.logger.error({ err: error, event: 'wallet.init_failed' }, 'error in wallet initialization'); if (context.respond) { await context.respond({ text: slackMessages.genericError, @@ -139,7 +141,7 @@ export class SlackWalletService extends BaseWalletService { }); } } catch (error) { - console.error('Error listing wallets:', error); + this.logger.error({ err: error, event: 'wallet.list_failed' }, 'error listing wallets'); if (context.respond) { await context.respond({ text: slackMessages.wallet.loadError, @@ -216,7 +218,7 @@ export class SlackWalletService extends BaseWalletService { await context.ack(); } catch (error) { - console.error('Error opening wallet modal:', error); + this.logger.error({ err: error, event: 'wallet.modal_open_failed' }, 'error opening wallet modal'); await context.ack(); if (context.respond) { await context.respond({ @@ -298,7 +300,7 @@ export class SlackWalletService extends BaseWalletService { } } } catch (error) { - console.error('Error processing wallet submission:', error); + this.logger.error({ err: error, event: 'wallet.submit_failed' }, 'error processing wallet submission'); await context.ack({ response_action: 'errors', errors: { @@ -348,7 +350,7 @@ export class SlackWalletService extends BaseWalletService { }); } } catch (error) { - console.error('Error starting wallet removal:', error); + this.logger.error({ err: error, event: 'wallet.start_remove_failed' }, 'error starting wallet removal'); if (context.respond) { await context.respond({ text: slackMessages.genericError, @@ -417,7 +419,7 @@ export class SlackWalletService extends BaseWalletService { }); } } catch (error) { - console.error('Error removing wallets:', error); + this.logger.error({ err: error, event: 'wallet.remove_failed' }, 'error removing wallets'); if (context.respond) { await context.respond({ replace_original: false, diff --git a/apps/consumers/src/services/wallet/telegram-wallet.service.ts b/apps/consumers/src/services/wallet/telegram-wallet.service.ts index 40cd132d..2961a7fb 100644 --- a/apps/consumers/src/services/wallet/telegram-wallet.service.ts +++ b/apps/consumers/src/services/wallet/telegram-wallet.service.ts @@ -9,14 +9,16 @@ import { SubscriptionAPIService } from '../subscription-api.service'; import { EnsResolverService } from '../ens-resolver.service'; import { ContextWithSession } from '../../interfaces/bot.interface'; import { uiMessages } from '@notification-system/messages'; +import { createLogger, type Logger } from '@anticapture/observability'; export class TelegramWalletService extends BaseWalletService { constructor( subscriptionApi: SubscriptionAPIService, - ensResolver: EnsResolverService + ensResolver: EnsResolverService, + logger: Logger = createLogger('consumers'), ) { - super(subscriptionApi, ensResolver); + super(subscriptionApi, ensResolver, logger, 'telegram-wallet'); } private ensureSession(ctx: ContextWithSession): void { @@ -64,7 +66,7 @@ export class TelegramWalletService extends BaseWalletService { await ctx.reply(message, { reply_markup: keyboard }); } catch (error) { - console.error('Error loading wallets:', error); + this.logger.error({ err: error, event: 'wallet.load_failed' }, 'error loading wallets'); await ctx.reply(uiMessages.errors.loadingWallets); } } @@ -116,7 +118,7 @@ export class TelegramWalletService extends BaseWalletService { await ctx.reply(uiMessages.wallet.removeConfirmation, { reply_markup: keyboard }); } catch (error) { - console.error('Error loading wallets for removal:', error); + this.logger.error({ err: error, event: 'wallet.load_for_removal_failed' }, 'error loading wallets for removal'); await ctx.reply(uiMessages.errors.loadingWallets); } } @@ -155,7 +157,7 @@ export class TelegramWalletService extends BaseWalletService { ctx.session.walletAction = undefined; } catch (error) { - console.error('Error adding wallet:', error); + this.logger.error({ err: error, event: 'wallet.add_failed' }, 'error adding wallet'); await ctx.reply(uiMessages.errors.generic); } } @@ -202,7 +204,7 @@ export class TelegramWalletService extends BaseWalletService { await ctx.editMessageReplyMarkup(keyboard); } catch (error) { - console.error('Error toggling wallet selection:', error); + this.logger.error({ err: error, event: 'wallet.toggle_failed' }, 'error toggling wallet selection'); await ctx.answerCbQuery(uiMessages.errors.updateFailed); } } @@ -241,7 +243,7 @@ export class TelegramWalletService extends BaseWalletService { ctx.session.walletAction = undefined; } catch (error) { - console.error('Error removing wallets:', error); + this.logger.error({ err: error, event: 'wallet.remove_failed' }, 'error removing wallets'); await ctx.reply(uiMessages.errors.generic); } } diff --git a/apps/consumers/src/services/webhook/webhook-server.ts b/apps/consumers/src/services/webhook/webhook-server.ts index 9e6a96b4..0da5655f 100644 --- a/apps/consumers/src/services/webhook/webhook-server.ts +++ b/apps/consumers/src/services/webhook/webhook-server.ts @@ -2,11 +2,16 @@ import fastify, { FastifyInstance } from 'fastify'; import { validatorCompiler, serializerCompiler } from 'fastify-type-provider-zod'; import fastifyCors from '@fastify/cors'; import { WebhookController } from './webhook.controller'; +import { createLogger, type Logger } from '@anticapture/observability'; export class WebhookServer { private server: FastifyInstance; + private readonly logger: Logger; - constructor(private webhookController: WebhookController) { + constructor( + private webhookController: WebhookController, + logger: Logger = createLogger('consumers'), + ) { this.server = fastify(); this.server.setValidatorCompiler(validatorCompiler); @@ -14,11 +19,12 @@ export class WebhookServer { this.server.register(fastifyCors, { origin: '*' }); this.server.register((app) => this.webhookController.register(app)); + this.logger = logger.child({ component: 'WebhookServer' }); } async start(port: number): Promise { await this.server.listen({ port, host: '0.0.0.0' }); - console.log(`Webhook HTTP server running on port ${port}`); + this.logger.info({ port, event: 'webhook_server.started' }, 'webhook HTTP server running'); } async stop(): Promise { diff --git a/apps/consumers/src/services/webhook/webhook.service.ts b/apps/consumers/src/services/webhook/webhook.service.ts index 71b0e2d9..f3b464a5 100644 --- a/apps/consumers/src/services/webhook/webhook.service.ts +++ b/apps/consumers/src/services/webhook/webhook.service.ts @@ -3,18 +3,22 @@ import { AnticaptureClient } from '@notification-system/anticapture-client'; import { NotificationPayload } from '../../interfaces/notification.interface'; import { BotServiceInterface } from '../../interfaces/bot-service.interface'; import { SubscriptionAPIService } from '../subscription-api.service'; +import { createLogger, type Logger } from '@anticapture/observability'; export class WebhookService implements BotServiceInterface { private httpClient: AxiosInstance; + private readonly logger: Logger; constructor( private anticaptureClient: AnticaptureClient, - private subscriptionApi: SubscriptionAPIService + private subscriptionApi: SubscriptionAPIService, + logger: Logger = createLogger('consumers'), ) { this.httpClient = axios.create({ timeout: 30000, headers: { 'Content-Type': 'application/json' }, }); + this.logger = logger.child({ component: 'WebhookService' }); } async sendNotification(payload: NotificationPayload): Promise { @@ -36,7 +40,10 @@ export class WebhookService implements BotServiceInterface { const response = await this.httpClient.post(url, body); const responseId = response.data?.id || response.data?.messageId || `webhook-${Date.now()}`; - console.log(`[Webhook] Notification delivered to ${url} for user ${payload.userId}: ${responseId}`); + this.logger.info( + { url, userId: payload.userId, responseId, event: 'webhook.delivered' }, + 'notification delivered', + ); return responseId; } diff --git a/apps/dispatcher/package.json b/apps/dispatcher/package.json index 398c131d..3345c3a8 100644 --- a/apps/dispatcher/package.json +++ b/apps/dispatcher/package.json @@ -18,10 +18,12 @@ "author": "", "license": "ISC", "dependencies": { + "@anticapture/observability": "^1.0.0", "@jest/globals": "^29.7.0", "@notification-system/anticapture-client": "workspace:*", "@notification-system/messages": "workspace:*", "@notification-system/rabbitmq-client": "workspace:*", + "@opentelemetry/api": "^1.9.0", "axios": "^1.9.0", "dotenv": "^16.5.0", "viem": "^2.34.0", diff --git a/apps/dispatcher/src/app.ts b/apps/dispatcher/src/app.ts index 25bee677..62b92907 100644 --- a/apps/dispatcher/src/app.ts +++ b/apps/dispatcher/src/app.ts @@ -13,9 +13,13 @@ import { NonVotingHandler } from './services/triggers/non-voting-handler.service import { VoteConfirmationTriggerHandler } from './services/triggers/vote-confirmation-trigger.service'; import { OffchainVoteCastTriggerHandler } from './services/triggers/offchain-vote-cast-trigger.service'; import { VotingReminderTriggerHandler } from './services/triggers/voting-reminder-trigger.service'; +import { NonVotersSource } from './interfaces/voting-reminder.interface'; import { RabbitMQConnection, RabbitMQPublisher } from '@notification-system/rabbitmq-client'; import { AnticaptureClient } from '@notification-system/anticapture-client'; -import { NotificationTypeId } from '@notification-system/messages'; +import { NotificationTypeId, votingReminderMessages, offchainVotingReminderMessages } from '@notification-system/messages'; +import { createLogger, wrapWithTracing } from '@anticapture/observability'; + +const logger = createLogger('dispatcher'); export class App { private rabbitMQConsumerService!: RabbitMQConsumerService; @@ -40,7 +44,7 @@ export class App { 'Content-Type': 'application/json', }, }); - const subscriptionClient = new SubscriptionClient(subscriptionAxiosClient); + const subscriptionClient = wrapWithTracing(new SubscriptionClient(subscriptionAxiosClient)); // Setup AnticaptureClient - use provided client or create new one const anticaptureAxiosClient = this.anticaptureHttpClient || axios.create({ @@ -52,79 +56,92 @@ export class App { }), }, }); - const anticaptureClient = new AnticaptureClient(anticaptureAxiosClient); + const anticaptureClient = wrapWithTracing(new AnticaptureClient(anticaptureAxiosClient)); this.rabbitmqConnection = new RabbitMQConnection(this.rabbitmqUrl); await this.rabbitmqConnection.connect(); this.publisher = await RabbitMQPublisher.create(this.rabbitmqConnection); const notificationFactory = new NotificationClientFactory(); - notificationFactory.addClient('telegram', new RabbitMQNotificationService(this.publisher)); - notificationFactory.addClient('slack', new RabbitMQNotificationService(this.publisher)); - notificationFactory.addClient('webhook', new RabbitMQNotificationService(this.publisher)); - const triggerProcessorService = new TriggerProcessorService(); + notificationFactory.addClient('telegram', wrapWithTracing(new RabbitMQNotificationService(this.publisher))); + notificationFactory.addClient('slack', wrapWithTracing(new RabbitMQNotificationService(this.publisher))); + notificationFactory.addClient('webhook', wrapWithTracing(new RabbitMQNotificationService(this.publisher))); + const triggerProcessorService = wrapWithTracing(new TriggerProcessorService(logger)); triggerProcessorService.addHandler( NotificationTypeId.NewProposal, - new NewProposalTriggerHandler(subscriptionClient, notificationFactory, anticaptureClient) + wrapWithTracing(new NewProposalTriggerHandler(subscriptionClient, notificationFactory, anticaptureClient)) ); triggerProcessorService.addHandler( NotificationTypeId.NewOffchainProposal, - new NewOffchainProposalTriggerHandler(subscriptionClient, notificationFactory) + wrapWithTracing(new NewOffchainProposalTriggerHandler(subscriptionClient, notificationFactory)) ); triggerProcessorService.addHandler( NotificationTypeId.OffchainProposalFinished, - new OffchainProposalFinishedTriggerHandler(subscriptionClient, notificationFactory) + wrapWithTracing(new OffchainProposalFinishedTriggerHandler(subscriptionClient, notificationFactory)) ); triggerProcessorService.addHandler( NotificationTypeId.VotingPowerChanged, - new VotingPowerTriggerHandler(subscriptionClient, notificationFactory) + wrapWithTracing(new VotingPowerTriggerHandler(subscriptionClient, notificationFactory)) ); triggerProcessorService.addHandler( NotificationTypeId.ProposalFinished, - new ProposalFinishedTriggerHandler(subscriptionClient, notificationFactory) + wrapWithTracing(new ProposalFinishedTriggerHandler(subscriptionClient, notificationFactory)) ); // Add second handler for proposal-finished to process non-voting addresses triggerProcessorService.addHandler( NotificationTypeId.ProposalFinished, - new NonVotingHandler(subscriptionClient, notificationFactory, anticaptureClient) + wrapWithTracing(new NonVotingHandler(subscriptionClient, notificationFactory, anticaptureClient, logger)) ); triggerProcessorService.addHandler( NotificationTypeId.VoteConfirmation, - new VoteConfirmationTriggerHandler(subscriptionClient, notificationFactory, anticaptureClient) + wrapWithTracing(new VoteConfirmationTriggerHandler(subscriptionClient, notificationFactory, anticaptureClient, logger)) ); triggerProcessorService.addHandler( NotificationTypeId.OffchainVoteCast, - new OffchainVoteCastTriggerHandler(subscriptionClient, notificationFactory) + wrapWithTracing(new OffchainVoteCastTriggerHandler(subscriptionClient, notificationFactory, logger)) ); + const onchainNonVotersSource: NonVotersSource = { + getNonVoters: (id, daoId, addrs) => anticaptureClient.getProposalNonVoters(id, daoId, addrs) + }; + + const offchainNonVotersSource: NonVotersSource = { + getNonVoters: (id, _daoId, addrs) => anticaptureClient.getOffchainProposalNonVoters(id, addrs) + }; + triggerProcessorService.addHandler( NotificationTypeId.VotingReminder30, - new VotingReminderTriggerHandler(subscriptionClient, notificationFactory, anticaptureClient) + wrapWithTracing(new VotingReminderTriggerHandler(subscriptionClient, notificationFactory, anticaptureClient, onchainNonVotersSource, votingReminderMessages, 'voting-reminder', logger)) ); triggerProcessorService.addHandler( NotificationTypeId.VotingReminder60, - new VotingReminderTriggerHandler(subscriptionClient, notificationFactory, anticaptureClient) + wrapWithTracing(new VotingReminderTriggerHandler(subscriptionClient, notificationFactory, anticaptureClient, onchainNonVotersSource, votingReminderMessages, 'voting-reminder', logger)) ); triggerProcessorService.addHandler( NotificationTypeId.VotingReminder90, - new VotingReminderTriggerHandler(subscriptionClient, notificationFactory, anticaptureClient) + wrapWithTracing(new VotingReminderTriggerHandler(subscriptionClient, notificationFactory, anticaptureClient, onchainNonVotersSource, votingReminderMessages, 'voting-reminder', logger)) + ); + + triggerProcessorService.addHandler( + NotificationTypeId.OffchainVotingReminder75, + wrapWithTracing(new VotingReminderTriggerHandler(subscriptionClient, notificationFactory, anticaptureClient, offchainNonVotersSource, offchainVotingReminderMessages, 'offchain-voting-reminder', logger)) ); - this.rabbitMQConsumerService = new RabbitMQConsumerService(this.rabbitmqUrl, triggerProcessorService); + this.rabbitMQConsumerService = wrapWithTracing(new RabbitMQConsumerService(this.rabbitmqUrl, triggerProcessorService)); this.isCreated = true; } async start(): Promise { await this.setupServices(); await this.rabbitMQConsumerService?.start(); - console.log('Dispatcher service running!'); + logger.info('dispatcher service running'); } async stop(): Promise { diff --git a/apps/dispatcher/src/index.ts b/apps/dispatcher/src/index.ts index 534d00ce..041a9eed 100644 --- a/apps/dispatcher/src/index.ts +++ b/apps/dispatcher/src/index.ts @@ -1,15 +1,25 @@ +import './instrumentation'; + import { App } from './app'; import { loadConfig } from './envConfig'; +import { createLogger } from '@anticapture/observability'; + +const logger = createLogger('dispatcher'); const config = loadConfig(); const app = new App( - config.subscriptionServerUrl, - config.rabbitmqUrl, + config.subscriptionServerUrl, + config.rabbitmqUrl, config.anticaptureGraphqlEndpoint, undefined, config.blockfulApiToken ); (async () => { - await app.start(); -})(); \ No newline at end of file + try { + await app.start(); + } catch (err) { + logger.error({ err }, 'dispatcher failed to start'); + process.exit(1); + } +})(); diff --git a/apps/dispatcher/src/instrumentation.ts b/apps/dispatcher/src/instrumentation.ts new file mode 100644 index 00000000..900fddd3 --- /dev/null +++ b/apps/dispatcher/src/instrumentation.ts @@ -0,0 +1,3 @@ +import { createObservabilityProvider } from '@anticapture/observability'; + +createObservabilityProvider('dispatcher'); diff --git a/apps/dispatcher/src/interfaces/voting-reminder.interface.ts b/apps/dispatcher/src/interfaces/voting-reminder.interface.ts new file mode 100644 index 00000000..e07961cd --- /dev/null +++ b/apps/dispatcher/src/interfaces/voting-reminder.interface.ts @@ -0,0 +1,21 @@ +export interface VotingReminderEvent { + id: string; + daoId: string; + title?: string; + description?: string; + startTimestamp: number; + endTimestamp: number; + timeElapsedPercentage: number; + thresholdPercentage: number; + link?: string; + discussion?: string; +} + +export interface NonVotersSource { + getNonVoters(proposalId: string, daoId: string, addresses: string[]): Promise<{ voter: string }[]>; +} + +export interface VotingReminderMessageSet { + getMessageKey(thresholdPercentage: number): string; + getTemplate(key: string): string; +} diff --git a/apps/dispatcher/src/services/batch-notification.service.ts b/apps/dispatcher/src/services/batch-notification.service.ts index 82596585..c0b5decf 100644 --- a/apps/dispatcher/src/services/batch-notification.service.ts +++ b/apps/dispatcher/src/services/batch-notification.service.ts @@ -1,16 +1,22 @@ import type { NotificationTypeId } from '@notification-system/messages'; import { ISubscriptionClient, User, Notification } from '../interfaces/subscription-client.interface'; import { NotificationClientFactory } from './notification/notification-factory.service'; +import { createLogger, type Logger } from '@anticapture/observability'; /** * Service for handling batch notification processing * Provides reusable batch operations for sending notifications efficiently */ export class BatchNotificationService { + private readonly logger: Logger; + constructor( private readonly subscriptionClient: ISubscriptionClient, - private readonly notificationFactory: NotificationClientFactory - ) {} + private readonly notificationFactory: NotificationClientFactory, + logger: Logger = createLogger('dispatcher'), + ) { + this.logger = logger.child({ component: 'BatchNotificationService' }); + } /** * Prepares batch data by fetching followers and applying deduplication @@ -145,7 +151,10 @@ export class BatchNotificationService { metadata: buttons ? { ...metadata, buttons } : metadata }) .catch(error => { - console.error(`Failed to send notification to user ${follower.id}:`, error); + this.logger.error( + { err: error, userId: follower.id, event: 'notification.send_failed' }, + 'failed to send notification', + ); }) ); } diff --git a/apps/dispatcher/src/services/trigger-processor.service.test.ts b/apps/dispatcher/src/services/trigger-processor.service.test.ts index 29ff62b2..c9e26cd1 100644 --- a/apps/dispatcher/src/services/trigger-processor.service.test.ts +++ b/apps/dispatcher/src/services/trigger-processor.service.test.ts @@ -64,20 +64,14 @@ describe('TriggerProcessorService', () => { }); it('should return unhandled response for unknown trigger', async () => { - const consoleSpy = jest.spyOn(console, 'log').mockImplementation(() => {}); - const mockMessage: DispatcherMessage = { triggerId: 'unknown-trigger' as any, ...MOCK_MESSAGE_BASE }; - + const result = await service.processTrigger(mockMessage); - - // Should log and return unhandled response - expect(consoleSpy).toHaveBeenCalledWith('No handler registered for trigger: unknown-trigger'); + expect(result.messageId).toMatch(/^unhandled-unknown-trigger-/); - - consoleSpy.mockRestore(); }); }); @@ -128,38 +122,27 @@ describe('TriggerProcessorService', () => { expect(result.timestamp).toBe('2023-01-01T11:00:00Z'); // Latest timestamp }); - it('should log errors but continue when some handlers fail', async () => { + it('should continue when some handlers fail', async () => { const handler1 = { handleMessage: jest.fn() } as any; const handler2 = { handleMessage: jest.fn() } as any; - const consoleSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); - + handler1.handleMessage.mockRejectedValue(new Error('Handler 1 failed')); handler2.handleMessage.mockResolvedValue({ messageId: 'result2', timestamp: '2023-01-01T10:00:00Z' }); - + service.addHandler('failing-trigger', handler1); service.addHandler('failing-trigger', handler2); - + const mockMessage: DispatcherMessage = { triggerId: 'failing-trigger' as any, ...MOCK_MESSAGE_BASE }; - - // Should return successful result and log error + const result = await service.processTrigger(mockMessage); expect(result.messageId).toBe('result2'); expect(result.timestamp).toBe('2023-01-01T10:00:00Z'); - - // Should log the error - expect(consoleSpy).toHaveBeenCalledWith( - '1 handler(s) failed for trigger failing-trigger. Errors:', - 'Handler 1 failed' - ); - - // Both handlers should still be called + expect(handler1.handleMessage).toHaveBeenCalledWith(mockMessage); expect(handler2.handleMessage).toHaveBeenCalledWith(mockMessage); - - consoleSpy.mockRestore(); }); it('should throw error when all handlers fail', async () => { diff --git a/apps/dispatcher/src/services/trigger-processor.service.ts b/apps/dispatcher/src/services/trigger-processor.service.ts index 82e1021c..d3ddd519 100644 --- a/apps/dispatcher/src/services/trigger-processor.service.ts +++ b/apps/dispatcher/src/services/trigger-processor.service.ts @@ -1,5 +1,6 @@ import { DispatcherMessage, MessageProcessingResult } from "../interfaces/dispatcher-message.interface"; import { TriggerHandler } from "../interfaces/base-trigger.interface"; +import { createLogger, type Logger } from '@anticapture/observability'; /** * Service responsible for processing messages for specific triggers @@ -7,9 +8,11 @@ import { TriggerHandler } from "../interfaces/base-trigger.interface"; */ export class TriggerProcessorService { private triggerHandlers: Map[]>; - - constructor() { + private readonly logger: Logger; + + constructor(logger: Logger = createLogger('dispatcher')) { this.triggerHandlers = new Map(); + this.logger = logger.child({ component: 'TriggerProcessorService' }); } /** @@ -36,7 +39,10 @@ export class TriggerProcessorService { // If no handlers found, return early if (!handlers || handlers.length === 0) { - console.log(`No handler registered for trigger: ${message.triggerId}`); + this.logger.warn( + { triggerId: message.triggerId, event: 'trigger.no_handler' }, + 'no handler registered for trigger', + ); return { messageId: `unhandled-${message.triggerId}-${Date.now()}`, timestamp: new Date().toISOString() @@ -55,7 +61,15 @@ export class TriggerProcessorService { if (failedResults.length > 0) { const errors = failedResults .map((result) => (result as PromiseRejectedResult).reason); - console.error(`${failedResults.length} handler(s) failed for trigger ${message.triggerId}. Errors:`, errors.map(e => e.message).join(', ')); + this.logger.error( + { + triggerId: message.triggerId, + failedCount: failedResults.length, + errors: errors.map(e => e?.message ?? String(e)), + event: 'trigger.handler_failures', + }, + 'one or more handlers failed for trigger', + ); } const successfulResults = results diff --git a/apps/dispatcher/src/services/triggers/base-trigger.service.ts b/apps/dispatcher/src/services/triggers/base-trigger.service.ts index 401b22bc..a98a97f8 100644 --- a/apps/dispatcher/src/services/triggers/base-trigger.service.ts +++ b/apps/dispatcher/src/services/triggers/base-trigger.service.ts @@ -4,6 +4,7 @@ import { TriggerHandler } from "../../interfaces/base-trigger.interface"; import { ISubscriptionClient, User } from "../../interfaces/subscription-client.interface"; import { NotificationClientFactory } from "../notification/notification-factory.service"; import { AnticaptureClient } from '@notification-system/anticapture-client'; +import { createLogger, type Logger } from '@anticapture/observability'; /** * Base class for trigger handlers @@ -13,6 +14,8 @@ import { AnticaptureClient } from '@notification-system/anticapture-client'; export abstract class BaseTriggerHandler implements TriggerHandler { private daoCache: Map = new Map(); + protected readonly logger: Logger; + /** * Creates a new instance of the BaseTriggerHandler * @param subscriptionClient Client for subscription server API @@ -22,8 +25,11 @@ export abstract class BaseTriggerHandler implements TriggerHandler { constructor( protected readonly subscriptionClient: ISubscriptionClient, protected readonly notificationFactory: NotificationClientFactory, - protected readonly anticaptureClient?: AnticaptureClient - ) {} + protected readonly anticaptureClient?: AnticaptureClient, + logger: Logger = createLogger('dispatcher'), + ) { + this.logger = logger.child({ component: this.constructor.name }); + } /** * Handle a trigger message diff --git a/apps/dispatcher/src/services/triggers/non-voting-handler.service.ts b/apps/dispatcher/src/services/triggers/non-voting-handler.service.ts index 3ee6d440..4867891d 100644 --- a/apps/dispatcher/src/services/triggers/non-voting-handler.service.ts +++ b/apps/dispatcher/src/services/triggers/non-voting-handler.service.ts @@ -3,8 +3,9 @@ import { DispatcherMessage, MessageProcessingResult } from '../../interfaces/dis import { ISubscriptionClient } from '../../interfaces/subscription-client.interface'; import { NotificationClientFactory } from '../notification/notification-factory.service'; import { ProposalFinishedNotification } from '../../interfaces/notification-client.interface'; -import { AnticaptureClient, QueryInput_Proposals_OrderDirection } from '@notification-system/anticapture-client'; +import { AnticaptureClient, OrderDirection, QueryInput_Proposals_Status_Items } from '@notification-system/anticapture-client'; import { BatchNotificationService } from '../batch-notification.service'; +import { createLogger, type Logger, wrapWithTracing } from '@anticapture/observability'; import { FormattingService } from '../formatting.service'; import { ValidationService } from '../validation.service'; import { nonVotingMessages, replacePlaceholders, buildButtons, NotificationTypeId } from '@notification-system/messages'; @@ -22,10 +23,11 @@ export class NonVotingHandler extends BaseTriggerHandler): Promise { @@ -35,7 +37,10 @@ export class NonVotingHandler extends BaseTriggerHandler { const proposals = await this.anticaptureClient!.listProposals({ - status: ['EXECUTED', 'SUCCEEDED', 'DEFEATED', 'EXPIRED', 'CANCELED'], + status: [QueryInput_Proposals_Status_Items.Executed, QueryInput_Proposals_Status_Items.Succeeded, QueryInput_Proposals_Status_Items.Defeated, QueryInput_Proposals_Status_Items.Expired, QueryInput_Proposals_Status_Items.Canceled], limit: NonVotingHandler.PROPOSALS_TO_CHECK * NonVotingHandler.FETCH_MARGIN_MULTIPLIER, - orderDirection: QueryInput_Proposals_OrderDirection.Desc + orderDirection: OrderDirection.Desc }, daoId); // If proposals is undefined or empty, return empty array @@ -174,13 +179,13 @@ export class NonVotingHandler extends BaseTriggerHandler { if (!a || !b) return 0; - return parseInt(b.endTimestamp) - parseInt(a.endTimestamp); + return (b.endTimestamp ?? 0) - (a.endTimestamp ?? 0); }); // Filter proposals that ended up to the current moment (includes current) // and get the most recent PROPOSALS_TO_CHECK proposals return sortedByEndTime - .filter(p => p && parseInt(p.endTimestamp) <= currentEndTimestamp) + .filter(p => p && (p.endTimestamp ?? 0) <= currentEndTimestamp) .slice(0, NonVotingHandler.PROPOSALS_TO_CHECK); } } \ No newline at end of file diff --git a/apps/dispatcher/src/services/triggers/non-voting-handler.test-factory.ts b/apps/dispatcher/src/services/triggers/non-voting-handler.test-factory.ts index 8971953a..6d883390 100644 --- a/apps/dispatcher/src/services/triggers/non-voting-handler.test-factory.ts +++ b/apps/dispatcher/src/services/triggers/non-voting-handler.test-factory.ts @@ -3,6 +3,8 @@ import { DispatcherMessage } from '../../interfaces/dispatcher-message.interface import { ProposalFinishedNotification } from '../../interfaces/notification-client.interface'; import { NotificationTypeId } from '@notification-system/messages'; +const BASE_TIMESTAMP = 1_700_000_000_000; + // Test Data Factories export function createProposalNotification(overrides: Partial = {}): ProposalFinishedNotification { return { @@ -10,7 +12,7 @@ export function createProposalNotification(overrides: Partial): Promise { const events = message.events; if (!events || events.length === 0) { - console.log('[OffchainVoteCastHandler] No offchain vote events to process'); + this.logger.debug({ event: 'offchain_vote_cast.no_events' }, 'no offchain vote events to process'); return { messageId: `offchain-vote-cast-empty-${Date.now()}`, timestamp: new Date().toISOString() @@ -47,7 +49,10 @@ export class OffchainVoteCastTriggerHandler extends BaseTriggerHandler sub.id === user.id); if (!isSubscribed) { - console.log(`[OffchainVoteCastHandler] User ${user.id} not subscribed to DAO ${vote.daoId}`); + this.logger.debug( + { userId: user.id, daoId: vote.daoId, event: 'offchain_vote_cast.user_not_subscribed' }, + 'user not subscribed to DAO', + ); return 'skipped'; } // Check deduplication const notifications = await this.subscriptionClient.shouldSend([user], eventId, vote.daoId); if (notifications.length === 0) { - console.log(`[OffchainVoteCastHandler] Notification already sent for offchain vote ${vote.proposalId}-${vote.voter}`); + this.logger.debug( + { proposalId: vote.proposalId, voter: vote.voter, event: 'offchain_vote_cast.already_sent' }, + 'notification already sent for offchain vote', + ); return 'skipped'; } // Send notification await this.sendVoteNotification(user, vote, eventId); - console.log(`[OffchainVoteCastHandler] Sent offchain vote notification to user ${user.id}`); + this.logger.info( + { userId: user.id, event: 'offchain_vote_cast.sent' }, + 'sent offchain vote notification to user', + ); return 'sent'; } diff --git a/apps/dispatcher/src/services/triggers/vote-confirmation-trigger.service.test.ts b/apps/dispatcher/src/services/triggers/vote-confirmation-trigger.service.test.ts index 2e512660..b5829559 100644 --- a/apps/dispatcher/src/services/triggers/vote-confirmation-trigger.service.test.ts +++ b/apps/dispatcher/src/services/triggers/vote-confirmation-trigger.service.test.ts @@ -44,9 +44,9 @@ describe('VoteConfirmationTriggerHandler', () => { await handler.handleMessage({ triggerId: NotificationTypeId.VoteConfirmation, events: [ - { daoId: 'test-dao', proposalId: 'proposal-1', voterAddress: '0xVoter123', support: 1, votingPower: '1000000000000000000', timestamp: 1767225600, transactionHash: '0xSameTxHash', proposalTitle: 'Proposal 1' }, - { daoId: 'test-dao', proposalId: 'proposal-2', voterAddress: '0xVoter123', support: 0, votingPower: '1000000000000000000', timestamp: 1767225600, transactionHash: '0xSameTxHash', proposalTitle: 'Proposal 2' }, - { daoId: 'test-dao', proposalId: 'proposal-3', voterAddress: '0xVoter123', support: 2, votingPower: '1000000000000000000', timestamp: 1767225600, transactionHash: '0xSameTxHash', proposalTitle: 'Proposal 3' }, + { daoId: 'test-dao', proposalId: 'proposal-1', voterAddress: '0xVoter123', support: '1', votingPower: '1000000000000000000', timestamp: 1767225600, transactionHash: '0xSameTxHash', proposalTitle: 'Proposal 1' }, + { daoId: 'test-dao', proposalId: 'proposal-2', voterAddress: '0xVoter123', support: '0', votingPower: '1000000000000000000', timestamp: 1767225600, transactionHash: '0xSameTxHash', proposalTitle: 'Proposal 2' }, + { daoId: 'test-dao', proposalId: 'proposal-3', voterAddress: '0xVoter123', support: '2', votingPower: '1000000000000000000', timestamp: 1767225600, transactionHash: '0xSameTxHash', proposalTitle: 'Proposal 3' }, ] }); diff --git a/apps/dispatcher/src/services/triggers/vote-confirmation-trigger.service.ts b/apps/dispatcher/src/services/triggers/vote-confirmation-trigger.service.ts index e0fdb74a..bfe37179 100644 --- a/apps/dispatcher/src/services/triggers/vote-confirmation-trigger.service.ts +++ b/apps/dispatcher/src/services/triggers/vote-confirmation-trigger.service.ts @@ -5,6 +5,7 @@ import { ISubscriptionClient } from '../../interfaces/subscription-client.interf import { AnticaptureClient, VoteWithDaoId } from '@notification-system/anticapture-client'; import { formatTokenAmount } from '../../lib/number-formatter'; import { voteConfirmationMessages, replacePlaceholders, buildButtons, NotificationTypeId } from '@notification-system/messages'; +import { createLogger, type Logger } from '@anticapture/observability'; interface UserVoteCombination { user: any; @@ -24,16 +25,17 @@ export class VoteConfirmationTriggerHandler extends BaseTriggerHandler): Promise { const events = message.events; if (!events || events.length === 0) { - console.log('[VoteConfirmationHandler] No vote events to process'); + this.logger.debug({ event: 'vote_confirmation.no_events' }, 'no vote events to process'); return { messageId: `vote-confirmation-empty-${Date.now()}`, timestamp: new Date().toISOString() @@ -50,7 +52,10 @@ export class VoteConfirmationTriggerHandler extends BaseTriggerHandler sub.id === user.id); if (!isSubscribed) { - console.log(`[VoteConfirmationHandler] User ${user.id} not subscribed to DAO ${vote.daoId}`); + this.logger.debug( + { userId: user.id, daoId: vote.daoId, event: 'vote_confirmation.user_not_subscribed' }, + 'user not subscribed to DAO', + ); return 'skipped'; } // Check deduplication const notifications = await this.subscriptionClient.shouldSend([user], eventId, vote.daoId); if (notifications.length === 0) { - console.log(`[VoteConfirmationHandler] Notification already sent for vote ${vote.transactionHash}`); + this.logger.debug( + { txHash: vote.transactionHash, event: 'vote_confirmation.already_sent' }, + 'notification already sent for vote', + ); return 'skipped'; } // Send notification await this.sendVoteNotification(user, vote, eventId); - console.log(`[VoteConfirmationHandler] Sent vote notification to user ${user.id}`); + this.logger.info({ userId: user.id, event: 'vote_confirmation.sent' }, 'sent vote notification to user'); return 'sent'; } diff --git a/apps/dispatcher/src/services/triggers/voting-reminder-trigger.service.test.ts b/apps/dispatcher/src/services/triggers/voting-reminder-trigger.service.test.ts index e3190c7c..d71f1c13 100644 --- a/apps/dispatcher/src/services/triggers/voting-reminder-trigger.service.test.ts +++ b/apps/dispatcher/src/services/triggers/voting-reminder-trigger.service.test.ts @@ -8,13 +8,15 @@ import { ISubscriptionClient } from '../../interfaces/subscription-client.interf import { NotificationClientFactory } from '../notification/notification-factory.service'; import { AnticaptureClient } from '@notification-system/anticapture-client'; import { FormattingService } from '../formatting.service'; -import { NotificationTypeId } from '@notification-system/messages'; +import { NotificationTypeId, votingReminderMessages } from '@notification-system/messages'; +import { NonVotersSource, VotingReminderMessageSet } from '../../interfaces/voting-reminder.interface'; describe('VotingReminderTriggerHandler', () => { let handler: VotingReminderTriggerHandler; let mockSubscriptionClient: jest.Mocked; let mockNotificationFactory: jest.Mocked; let mockAnticaptureClient: jest.Mocked; + let mockNonVotersSource: jest.Mocked; const mockUser = { id: 'user-123', @@ -50,14 +52,19 @@ describe('VotingReminderTriggerHandler', () => { }) } as any; - mockAnticaptureClient = { - getProposalNonVoters: jest.fn() - } as any; + mockAnticaptureClient = {} as any; + + mockNonVotersSource = { + getNonVoters: jest.fn() + } as jest.Mocked; handler = new VotingReminderTriggerHandler( mockSubscriptionClient, mockNotificationFactory, - mockAnticaptureClient + mockAnticaptureClient, + mockNonVotersSource, + votingReminderMessages, + 'voting-reminder' ); // Mock Date.now for consistent time calculations @@ -89,8 +96,8 @@ describe('VotingReminderTriggerHandler', () => { // Setup mocks mockSubscriptionClient.getFollowedAddresses.mockResolvedValue(['0x123', '0x456']); - mockAnticaptureClient.getProposalNonVoters.mockResolvedValue([ - {voter: '0x456'} // Only 0x456 hasn't voted + mockNonVotersSource.getNonVoters.mockResolvedValue([ + { voter: '0x456' } // Only 0x456 hasn't voted ]); mockSubscriptionClient.getWalletOwnersBatch.mockResolvedValue({ '0x456': [mockUser] // Only 0x456 (non-voter) has users @@ -105,7 +112,7 @@ describe('VotingReminderTriggerHandler', () => { expect(result.messageId).toMatch(/voting-reminder-/); expect(mockSubscriptionClient.getFollowedAddresses).toHaveBeenCalledWith('test-dao'); - expect(mockAnticaptureClient.getProposalNonVoters).toHaveBeenCalledWith( + expect(mockNonVotersSource.getNonVoters).toHaveBeenCalledWith( 'proposal-123', 'test-dao', ['0x123', '0x456'] @@ -124,7 +131,7 @@ describe('VotingReminderTriggerHandler', () => { const result = await handler.handleMessage(message); expect(result.messageId).toMatch(/voting-reminder-/); - expect(mockAnticaptureClient.getProposalNonVoters).not.toHaveBeenCalled(); + expect(mockNonVotersSource.getNonVoters).not.toHaveBeenCalled(); }); it('should skip when all users have already voted', async () => { @@ -134,7 +141,7 @@ describe('VotingReminderTriggerHandler', () => { }; mockSubscriptionClient.getFollowedAddresses.mockResolvedValue(['0x123']); - mockAnticaptureClient.getProposalNonVoters.mockResolvedValue([]); // Empty array - all have voted + mockNonVotersSource.getNonVoters.mockResolvedValue([]); // Empty array - all have voted const result = await handler.handleMessage(message); @@ -149,8 +156,8 @@ describe('VotingReminderTriggerHandler', () => { }; mockSubscriptionClient.getFollowedAddresses.mockResolvedValue(['0x456']); - mockAnticaptureClient.getProposalNonVoters.mockResolvedValue([ - {voter: '0x456'} + mockNonVotersSource.getNonVoters.mockResolvedValue([ + { voter: '0x456' } ]); mockSubscriptionClient.getWalletOwnersBatch.mockResolvedValue({ '0x456': [mockUser] @@ -195,7 +202,7 @@ describe('VotingReminderTriggerHandler', () => { }; const message = (handler as any).createReminderMessage(eventWithoutTitle); - + expect(message).toContain('Proposal: "Update governance parameters. This proposal aims to improve the system."'); }); @@ -207,7 +214,7 @@ describe('VotingReminderTriggerHandler', () => { }; const message = (handler as any).createReminderMessage(eventWithLongDescription); - + expect(message).toContain('Proposal: "This is a very long description that exceeds the maximum length for a title and..."'); }); }); @@ -217,14 +224,14 @@ describe('VotingReminderTriggerHandler', () => { // Mock current time to be 1500000 (middle of proposal period) const endTimestamp = 2000000; const remaining = FormattingService.calculateTimeRemaining(endTimestamp); - + expect(remaining).toContain('day'); // Should show days remaining }); it('should handle proposals that have ended', () => { const endTimestamp = 1000000; // Before current time (1500000) const remaining = FormattingService.calculateTimeRemaining(endTimestamp); - + expect(remaining).toBe('Proposal has ended'); }); @@ -232,7 +239,7 @@ describe('VotingReminderTriggerHandler', () => { jest.spyOn(Date, 'now').mockReturnValue(1990000 * 1000); // Close to end const endTimestamp = 2000000; const remaining = FormattingService.calculateTimeRemaining(endTimestamp); - + expect(remaining).toMatch(/hour/); }); @@ -240,7 +247,7 @@ describe('VotingReminderTriggerHandler', () => { jest.spyOn(Date, 'now').mockReturnValue(1999000 * 1000); // Very close to end const endTimestamp = 2000000; const remaining = FormattingService.calculateTimeRemaining(endTimestamp); - + expect(remaining).toMatch(/minute/); }); }); @@ -249,7 +256,7 @@ describe('VotingReminderTriggerHandler', () => { it('should continue processing other events when one fails', async () => { const failingEvent = { ...mockVotingReminderEvent, id: 'failing-proposal' }; const successfulEvent = { ...mockVotingReminderEvent, id: 'successful-proposal' }; - + const message: DispatcherMessage = { triggerId: NotificationTypeId.VotingReminder90, events: [failingEvent, successfulEvent] @@ -260,8 +267,8 @@ describe('VotingReminderTriggerHandler', () => { .mockRejectedValueOnce(new Error('Network error')) .mockResolvedValueOnce(['0x456']); - mockAnticaptureClient.getProposalNonVoters.mockResolvedValue([ - {voter: '0x456'} + mockNonVotersSource.getNonVoters.mockResolvedValue([ + { voter: '0x456' } ]); mockSubscriptionClient.getWalletOwnersBatch.mockResolvedValue({ '0x456': [mockUser] @@ -279,4 +286,4 @@ describe('VotingReminderTriggerHandler', () => { expect(mockSubscriptionClient.getFollowedAddresses).toHaveBeenCalledTimes(2); }); }); -}); \ No newline at end of file +}); diff --git a/apps/dispatcher/src/services/triggers/voting-reminder-trigger.service.ts b/apps/dispatcher/src/services/triggers/voting-reminder-trigger.service.ts index 5849ea67..6f6d7366 100644 --- a/apps/dispatcher/src/services/triggers/voting-reminder-trigger.service.ts +++ b/apps/dispatcher/src/services/triggers/voting-reminder-trigger.service.ts @@ -1,26 +1,19 @@ import type { NotificationTypeId } from '@notification-system/messages'; + import { BaseTriggerHandler } from './base-trigger.service'; import { DispatcherMessage, MessageProcessingResult } from '../../interfaces/dispatcher-message.interface'; import { NotificationClientFactory } from '../notification/notification-factory.service'; import { ISubscriptionClient } from '../../interfaces/subscription-client.interface'; import { AnticaptureClient } from '@notification-system/anticapture-client'; import { FormattingService } from '../formatting.service'; -import { votingReminderMessages, replacePlaceholders, buildButtons } from '@notification-system/messages'; +import { replacePlaceholders, buildButtons } from '@notification-system/messages'; import { BatchNotificationService } from '../batch-notification.service'; - -/** - * Event data received from logic system for voting reminders - */ -interface VotingReminderEvent { - id: string; - daoId: string; - title?: string; - description: string; - startTimestamp: number; - endTimestamp: number; - timeElapsedPercentage: number; - thresholdPercentage: number; -} +import { createLogger, type Logger, wrapWithTracing } from '@anticapture/observability'; +import { + VotingReminderEvent, + NonVotersSource, + VotingReminderMessageSet, +} from '../../interfaces/voting-reminder.interface'; /** * Processing statistics for monitoring @@ -41,19 +34,23 @@ export class VotingReminderTriggerHandler extends BaseTriggerHandler): Promise { const events = message.events; - + if (!events || events.length === 0) { - return { - messageId: `voting-reminder-empty-${Date.now()}`, - timestamp: new Date().toISOString() + return { + messageId: `${this.triggerType}-empty-${Date.now()}`, + timestamp: new Date().toISOString(), }; } @@ -70,11 +67,20 @@ export class VotingReminderTriggerHandler extends BaseTriggerHandler nv.voter); if (nonVotingAddresses.length === 0) { return { sent: 0, skipped: 1, failed: 0 }; @@ -102,9 +105,11 @@ export class VotingReminderTriggerHandler extends BaseTriggerHandler `${event.id}-${event.thresholdPercentage}-reminder`, - (address) => this.createReminderMessage(event, address), + () => `${event.id}-${event.thresholdPercentage}-${this.triggerType}`, + (_address) => this.createReminderMessage(event), (address) => ({ - triggerType: 'votingReminder', + triggerType: this.triggerType, proposalId: event.id, thresholdPercentage: event.thresholdPercentage, timeElapsedPercentage: event.timeElapsedPercentage, timeRemaining: FormattingService.calculateTimeRemaining(event.endTimestamp), - addresses: { address: address } + addresses: { address: address }, }), - () => buttons + () => buttons, ); - return { - sent: sentCount, - skipped: 0, - failed: 0 - }; - } - /** - * Gets addresses that haven't voted on the specific proposal - */ - private async getNonVotingAddresses( - proposalId: string, - daoId: string, - subscribedAddresses: string[] - ): Promise { - const nonVoters = await this.anticaptureClient!.getProposalNonVoters( - proposalId, - daoId, - subscribedAddresses - ); - return nonVoters.map(nv => nv.voter); + return { sent: sentCount, skipped: 0, failed: 0 }; } /** * Creates the reminder message based on proposal data and urgency level */ - private createReminderMessage(event: VotingReminderEvent, address?: string): string { + private createReminderMessage(event: VotingReminderEvent): string { const timeRemaining = FormattingService.calculateTimeRemaining(event.endTimestamp); - const title = event.title || FormattingService.extractTitle(event.description); + const title = + event.title || FormattingService.extractTitle(event.description ?? '') || 'Untitled Proposal'; // Get the message key based on threshold - const messageKey = votingReminderMessages.getMessageKey(event.thresholdPercentage); + const messageKey = this.messages.getMessageKey(event.thresholdPercentage); // Get the complete message template - const messageTemplate = votingReminderMessages[messageKey]; + const messageTemplate = this.messages.getTemplate(messageKey); // Replace all placeholders return replacePlaceholders(messageTemplate, { daoId: event.daoId, title, timeRemaining, - thresholdPercentage: event.thresholdPercentage.toString() + thresholdPercentage: event.thresholdPercentage.toString(), }); } -} \ No newline at end of file +} diff --git a/apps/dispatcher/src/services/validation.service.ts b/apps/dispatcher/src/services/validation.service.ts index 8cf815f0..343578a8 100644 --- a/apps/dispatcher/src/services/validation.service.ts +++ b/apps/dispatcher/src/services/validation.service.ts @@ -1,3 +1,7 @@ +import { createLogger } from '@anticapture/observability'; + +const moduleLogger = createLogger('dispatcher').child({ component: 'ValidationService' }); + /** * Service for common validation operations */ @@ -16,7 +20,10 @@ export class ValidationService { ): boolean { if (items.length < minimumRequired) { if (context) { - console.log(`Not enough ${context}. Found: ${items.length}, Required: ${minimumRequired}`); + moduleLogger.debug( + { context, found: items.length, required: minimumRequired, event: 'validation.not_enough_items' }, + 'not enough items', + ); } return false; } @@ -32,7 +39,7 @@ export class ValidationService { static hasItems(items: T[], context?: string): boolean { if (items.length === 0) { if (context) { - console.log(`No ${context}`); + moduleLogger.debug({ context, event: 'validation.no_items' }, 'no items'); } return false; } diff --git a/apps/integrated-tests/package.json b/apps/integrated-tests/package.json index d136d630..f1c220cb 100644 --- a/apps/integrated-tests/package.json +++ b/apps/integrated-tests/package.json @@ -23,7 +23,8 @@ "jest": "^29.7.0", "knex": "^3.1.0", "rabbitmq-client": "^5.0.5", - "sqlite3": "^5.1.7", + "sqlite3": "^6.0.1", + "telegraf": "^4.16.3", "ts-jest": "^29.3.2", "typescript": "^5.8.3", "uuid": "^9.0.0", diff --git a/apps/integrated-tests/src/config/constants.ts b/apps/integrated-tests/src/config/constants.ts index 51b29ca4..006090b7 100644 --- a/apps/integrated-tests/src/config/constants.ts +++ b/apps/integrated-tests/src/config/constants.ts @@ -47,7 +47,7 @@ export const testConstants = { daoIds: { uniswap: 'UNISWAP', ens: 'ENS', - votingPowerTest: 'test-dao-voting-power', + votingPowerTest: 'test_dao_voting_power', caseTest: 'TEST_DAO', temporalTest1: 'TEMPORAL_DAO_1', temporalTest2: 'TEMPORAL_DAO_2', diff --git a/apps/integrated-tests/src/fixtures/factories/offchain-proposal-factory.ts b/apps/integrated-tests/src/fixtures/factories/offchain-proposal-factory.ts index 61acf82d..85fe0a63 100644 --- a/apps/integrated-tests/src/fixtures/factories/offchain-proposal-factory.ts +++ b/apps/integrated-tests/src/fixtures/factories/offchain-proposal-factory.ts @@ -11,6 +11,7 @@ export interface OffchainProposalData { state: string; created: number; end: number; + start?: number; // actual voting start time (falls back to created if absent) } /** diff --git a/apps/integrated-tests/src/fixtures/factories/vote-factory.ts b/apps/integrated-tests/src/fixtures/factories/vote-factory.ts index ac9f2e58..61547a34 100644 --- a/apps/integrated-tests/src/fixtures/factories/vote-factory.ts +++ b/apps/integrated-tests/src/fixtures/factories/vote-factory.ts @@ -4,7 +4,7 @@ export interface VoteData { proposalId: string; voterAddress: string; daoId: string; - support: number; + support: string; reason?: string | null; timestamp: number; transactionHash: string; @@ -34,7 +34,7 @@ export class VoteFactory { proposalId, voterAddress, daoId, - support: 1, + support: '1', timestamp: Math.floor(Date.now() / 1000), transactionHash: `0x${uuidv4().replace(/-/g, '')}${uuidv4().replace(/-/g, '').substring(0, 8)}`, votingPower: '1000000000000000000', diff --git a/apps/integrated-tests/src/mocks/graphql-mock-setup.ts b/apps/integrated-tests/src/mocks/graphql-mock-setup.ts index 3ad67787..0a156855 100644 --- a/apps/integrated-tests/src/mocks/graphql-mock-setup.ts +++ b/apps/integrated-tests/src/mocks/graphql-mock-setup.ts @@ -88,7 +88,7 @@ export class GraphQLMockSetup { filtered = filtered.filter(p => p.daoId === config.headers['anticapture-dao-id']); } return Promise.resolve({ - data: { data: { offchainProposals: { items: filtered.map(p => ({ id: p.id, title: p.title, discussion: p.discussion, link: p.link, state: p.state, created: p.created, end: p.end })), totalCount: filtered.length } } } + data: { data: { offchainProposals: { items: filtered.map(p => ({ id: p.id, title: p.title, discussion: p.discussion, link: p.link, state: p.state, created: p.created, end: p.end, start: p.start })), totalCount: filtered.length } } } }); } @@ -198,6 +198,30 @@ export class GraphQLMockSetup { }); } + // Handle offchain proposal non-voters (MUST come before ProposalNonVoters check) + if (data.query?.includes('OffchainProposalNonVoters')) { + const proposalId = data.variables?.id; + const addressesFilter = data.variables?.addresses || []; + + // Get addresses that voted on this offchain proposal + const votersSet = new Set( + offchainVotesData + .filter((v: any) => v.proposalId === proposalId) + .map((v: any) => v.voter.toLowerCase()) + ); + + // Filter to find non-voters from the provided address list + const nonVoterItems = addressesFilter + .filter((addr: string) => !votersSet.has(addr.toLowerCase())) + .map((addr: string) => ({ + voter: addr + })); + + return Promise.resolve({ + data: { data: { offchainProposalNonVoters: { items: nonVoterItems, totalCount: nonVoterItems.length } } } + }); + } + // Handle proposal non-voters if (data.query?.includes('ProposalNonVoters')) { const proposalId = data.variables?.id; diff --git a/apps/integrated-tests/src/setup/services/apps.ts b/apps/integrated-tests/src/setup/services/apps.ts index 6b4acf2a..f15910a1 100644 --- a/apps/integrated-tests/src/setup/services/apps.ts +++ b/apps/integrated-tests/src/setup/services/apps.ts @@ -24,6 +24,7 @@ import { SlackTestClient } from '../../test-clients/slack-test.client'; import { jest } from '@jest/globals'; import { mockTelegramSendMessage } from '../../mocks/telegram-mock-setup'; import { mockSlackSendMessage } from '../../mocks/slack-mock-setup'; +import { QueryInput_Proposals_Status_Items } from '@notification-system/anticapture-client'; /** * @notice Type definition for test applications container @@ -185,7 +186,8 @@ const startConsumer = async ( rabbitmqUrl, mockEnsResolver, telegramClient, - slackClient + slackClient, + 3003 ); await consumerApp.start(); return consumerApp; @@ -226,7 +228,7 @@ const startLogicSystem = async ( const oneYearAgo = Math.floor((Date.now() - 365 * 24 * 60 * 60 * 1000) / 1000).toString(); const logicSystemApp = new LogicSystemApp( TEST_CONFIG.logicSystem.interval, - TEST_CONFIG.logicSystem.proposalState, + QueryInput_Proposals_Status_Items.Active, mockHttpClient, rabbitmqUrl, oneYearAgo diff --git a/apps/integrated-tests/tests/core/address-normalization.test.ts b/apps/integrated-tests/tests/core/address-normalization.test.ts index 433b46e5..9b065ad7 100644 --- a/apps/integrated-tests/tests/core/address-normalization.test.ts +++ b/apps/integrated-tests/tests/core/address-normalization.test.ts @@ -51,7 +51,7 @@ describe('Address Normalization - Integration Test', () => { transactionHash: '0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890', proposalId: 'prop-checksum-test', voterAddress: voterAddressChecksum, - support: 1, // FOR + support: '1', // FOR votingPower: '1000000000000000000000', // 1000 tokens timestamp: eventTimestamp, reason: 'Testing checksum normalization!', diff --git a/apps/integrated-tests/tests/slack/vote-confirmation-trigger.test.ts b/apps/integrated-tests/tests/slack/vote-confirmation-trigger.test.ts index 2be3c382..74f49e5b 100644 --- a/apps/integrated-tests/tests/slack/vote-confirmation-trigger.test.ts +++ b/apps/integrated-tests/tests/slack/vote-confirmation-trigger.test.ts @@ -75,7 +75,7 @@ describe('Slack Vote Confirmation Trigger - Integration Test', () => { transactionHash: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef', proposalId: 'prop-for-123', voterAddress: voterAddress, - support: 1, // FOR + support: '1', // FOR votingPower: '1000000000000000000000', // 1000 tokens timestamp: eventTimestamp, reason: 'Great proposal!', @@ -141,7 +141,7 @@ describe('Slack Vote Confirmation Trigger - Integration Test', () => { transactionHash: '0x2345678901bcdef2345678901bcdef2345678901bcdef2345678901bcdef2345', proposalId: 'prop-against-456', voterAddress: voterAddress, - support: 0, // AGAINST + support: '0', // AGAINST votingPower: '5000000000000000000000', // 5000 tokens timestamp: eventTimestamp, reason: 'Needs more discussion', @@ -199,7 +199,7 @@ describe('Slack Vote Confirmation Trigger - Integration Test', () => { transactionHash: '0x3456789012cdef3456789012cdef3456789012cdef3456789012cdef34567890', proposalId: 'prop-abstain-789', voterAddress: voterAddress, - support: 2, // ABSTAIN + support: '2', // ABSTAIN votingPower: '2000000000000000000000', // 2000 tokens timestamp: eventTimestamp, // No reason provided for abstain @@ -257,7 +257,7 @@ describe('Slack Vote Confirmation Trigger - Integration Test', () => { transactionHash: sameTxHash, proposalId: 'prop-dup-123', voterAddress: voterAddress, - support: 1, + support: '1', votingPower: '1000000000000000000000', timestamp: eventTimestamp, proposalTitle: 'Duplicate Test Proposal' @@ -321,7 +321,7 @@ describe('Slack Vote Confirmation Trigger - Integration Test', () => { transactionHash: '0x5678901234ef5678901234ef5678901234ef5678901234ef5678901234ef5678', proposalId: 'prop-multi-1', voterAddress: voterAddress, - support: 1, // FOR + support: '1', // FOR votingPower: '1000000000000000000000', timestamp: baseTimestamp, proposalTitle: 'Multi Vote Proposal 1' @@ -331,7 +331,7 @@ describe('Slack Vote Confirmation Trigger - Integration Test', () => { transactionHash: '0x6789012345f6789012345f6789012345f6789012345f6789012345f6789012345', proposalId: 'prop-multi-2', voterAddress: voterAddress, - support: 0, // AGAINST + support: '0', // AGAINST votingPower: '1000000000000000000000', timestamp: baseTimestamp + 1, proposalTitle: 'Multi Vote Proposal 2' @@ -341,7 +341,7 @@ describe('Slack Vote Confirmation Trigger - Integration Test', () => { transactionHash: '0x78901234567890123456789012345678901234567890123456789012345678ab', proposalId: 'prop-multi-3', voterAddress: voterAddress, - support: 2, // ABSTAIN + support: '2', // ABSTAIN votingPower: '1000000000000000000000', timestamp: baseTimestamp + 2, proposalTitle: 'Multi Vote Proposal 3' @@ -408,7 +408,7 @@ describe('Slack Vote Confirmation Trigger - Integration Test', () => { transactionHash: '0x890123456789012345678901234567890123456789012345678901234567890cd', proposalId: 'prop-nosub', voterAddress: voterAddress, - support: 1, + support: '1', votingPower: '1000000000000000000000', timestamp: eventTimestamp, proposalTitle: 'No Subscription Proposal' diff --git a/apps/integrated-tests/tests/slack/voting-reminder-trigger.test.ts b/apps/integrated-tests/tests/slack/voting-reminder-trigger.test.ts index 53c0f132..892c1ebb 100644 --- a/apps/integrated-tests/tests/slack/voting-reminder-trigger.test.ts +++ b/apps/integrated-tests/tests/slack/voting-reminder-trigger.test.ts @@ -438,8 +438,8 @@ describe('Slack Voting Reminder Trigger - Integration Test', () => { const eventIds = relevantNotifs.map(n => n.event_id); expect(eventIds).toEqual( expect.arrayContaining([ - expect.stringContaining('30-reminder'), - expect.stringContaining('60-reminder') + expect.stringContaining('30-voting-reminder'), + expect.stringContaining('60-voting-reminder') ]) ); }); diff --git a/apps/integrated-tests/tests/telegram/offchain-voting-reminder-trigger.test.ts b/apps/integrated-tests/tests/telegram/offchain-voting-reminder-trigger.test.ts new file mode 100644 index 00000000..715fab2f --- /dev/null +++ b/apps/integrated-tests/tests/telegram/offchain-voting-reminder-trigger.test.ts @@ -0,0 +1,210 @@ +/** + * @fileoverview Integration tests for the Snapshot (off-chain) voting reminder feature + * Tests the complete flow for the offchainVotingReminderTrigger75 trigger + * which fires at 75% elapsed time (within 75-80% window) + */ + +import { describe, test, expect, beforeEach, beforeAll } from '@jest/globals'; +import { db, TestApps } from '../../src/setup'; +import { HttpClientMockSetup, GraphQLMockSetup } from '../../src/mocks'; +import { UserFactory, OffchainProposalFactory } from '../../src/fixtures'; +import { TelegramTestHelper, DatabaseTestHelper, TestCleanup } from '../../src/helpers'; +import { testConstants, timeouts } from '../../src/config'; +import { waitForCondition } from '../../src/helpers/utilities/wait-for'; + +describe('Offchain Voting Reminder Integration Tests', () => { + let apps: TestApps; + let httpMockSetup: HttpClientMockSetup; + let telegramHelper: TelegramTestHelper; + let dbHelper: DatabaseTestHelper; + + const testDaoId = 'test-dao-offchain-reminder'; + const testUser = { + chatId: testConstants.profiles.p1.chatId, + address: '0x1234567890abcdef1234567890abcdef12345678' + }; + + /** + * Creates an offchain proposal with a specific elapsed time percentage + * @param proposalId - Unique identifier for the proposal + * @param elapsedPercentage - Percentage of voting period that has elapsed (0-100) + */ + const createOffchainProposalWithElapsedTime = (proposalId: string, elapsedPercentage: number) => { + const now = Math.floor(Date.now() / 1000); + const duration = 100000; // seconds + const elapsed = Math.floor(duration * (elapsedPercentage / 100)); + const start = now - elapsed; + const end = start + duration; + + return OffchainProposalFactory.createProposal(testDaoId, proposalId, { + state: 'active', + start, + end, + created: start, + title: `Snapshot Proposal ${elapsedPercentage}% Test` + }); + }; + + beforeAll(async () => { + apps = TestCleanup.getGlobalApps(); + httpMockSetup = TestCleanup.getGlobalHttpMockSetup(); + telegramHelper = new TelegramTestHelper(global.mockTelegramSendMessage); + dbHelper = new DatabaseTestHelper(db); + }); + + beforeEach(async () => { + await TestCleanup.cleanupBetweenTests(); + + // Create test user with subscription to the DAO and wallet address + const pastTimestamp = new Date(Date.now() - timeouts.wait.long).toISOString(); + await UserFactory.createUserWithFollowedAddresses( + testUser.chatId, + 'offchain-voting-reminder-user', + testDaoId, + [testUser.address], + true, + pastTimestamp + ); + }); + + describe('75% Reminder Threshold', () => { + test('should send Snapshot voting reminder when 77% of voting period has elapsed and user has not voted', async () => { + // Create proposal where 77% of time has elapsed (within 75-80% window) + const proposal = createOffchainProposalWithElapsedTime('offchain-proposal-75-reminder', 77); + + // Setup mock with no offchain votes — user has NOT voted + GraphQLMockSetup.setupMock( + httpMockSetup.getMockClient(), + [], // no on-chain proposals + [], // no voting power data + { [testDaoId]: 1 }, + [], // no on-chain votes + [proposal], + [] // no offchain votes + ); + + // Wait for the notification to be sent + const message = await telegramHelper.waitForMessage( + msg => + msg.text.includes('Snapshot Voting Reminder') || + msg.text.includes('75% of voting period has passed'), + { timeout: timeouts.notification.delivery } + ); + + // Verify message content matches the expected template + expect(message.chatId).toBe(testUser.chatId); + expect(message.text).toContain('⏰ Snapshot Voting Reminder'); + expect(message.text).toContain('75% of voting period has passed'); + expect(message.text).toContain(testDaoId); + + // Verify database record exists for deduplication + const notifications = await dbHelper.getNotifications(); + const relevantNotifs = notifications.filter(n => + n.event_id?.includes('75-reminder') || n.event_id?.includes('offchain-proposal-75-reminder') + ); + expect(relevantNotifs).toHaveLength(1); + }); + + test('should NOT send reminder when user has already voted on the Snapshot proposal', async () => { + // Create proposal where 77% of time has elapsed + const proposal = createOffchainProposalWithElapsedTime('offchain-proposal-75-voted', 77); + + // Setup mock with user's offchain vote already recorded + const offchainVotes = [{ + voter: testUser.address, + proposalId: proposal.id, + daoId: testDaoId, + created: Math.floor(Date.now() / 1000), + vp: 1000 + }]; + + GraphQLMockSetup.setupMock( + httpMockSetup.getMockClient(), + [], + [], + { [testDaoId]: 1 }, + [], + [proposal], + offchainVotes // User HAS voted + ); + + // Wait for processing to complete and verify no messages were sent + await waitForCondition( + () => { + const messages = telegramHelper.getAllMessages(); + return messages.length === 0; + }, + 'Expected no offchain voting reminder when user has already voted', + { timeout: 500, interval: 50 } + ); + + const messages = telegramHelper.getAllMessages(); + const snapshotReminderMessages = messages.filter(m => + m.text.includes('Snapshot Voting Reminder') + ); + expect(snapshotReminderMessages).toHaveLength(0); + }); + + test('should NOT send reminder when proposal is at 60% elapsed (below 75% threshold)', async () => { + // Create proposal where only 60% of time has elapsed — below the 75% trigger + const proposal = createOffchainProposalWithElapsedTime('offchain-proposal-below-threshold', 60); + + GraphQLMockSetup.setupMock( + httpMockSetup.getMockClient(), + [], + [], + { [testDaoId]: 1 }, + [], + [proposal], + [] + ); + + // Wait for processing and verify no messages were sent + await waitForCondition( + () => { + const messages = telegramHelper.getAllMessages(); + return messages.length === 0; + }, + 'Expected no offchain voting reminder for proposal below 75% threshold', + { timeout: 500, interval: 50 } + ); + + const messages = telegramHelper.getAllMessages(); + const snapshotReminderMessages = messages.filter(m => + m.text.includes('Snapshot Voting Reminder') + ); + expect(snapshotReminderMessages).toHaveLength(0); + }); + + test('should NOT send reminder when proposal is at 83% elapsed (above 80% window)', async () => { + // Create proposal where 83% of time has elapsed — above the 75-80% window + const proposal = createOffchainProposalWithElapsedTime('offchain-proposal-above-window', 83); + + GraphQLMockSetup.setupMock( + httpMockSetup.getMockClient(), + [], + [], + { [testDaoId]: 1 }, + [], + [proposal], + [] + ); + + // Wait for processing and verify no messages were sent + await waitForCondition( + () => { + const messages = telegramHelper.getAllMessages(); + return messages.length === 0; + }, + 'Expected no offchain voting reminder for proposal above 80% window', + { timeout: 500, interval: 50 } + ); + + const messages = telegramHelper.getAllMessages(); + const snapshotReminderMessages = messages.filter(m => + m.text.includes('Snapshot Voting Reminder') + ); + expect(snapshotReminderMessages).toHaveLength(0); + }); + }); +}); diff --git a/apps/integrated-tests/tests/telegram/vote-confirmation-trigger.test.ts b/apps/integrated-tests/tests/telegram/vote-confirmation-trigger.test.ts index c6723e72..3077530c 100644 --- a/apps/integrated-tests/tests/telegram/vote-confirmation-trigger.test.ts +++ b/apps/integrated-tests/tests/telegram/vote-confirmation-trigger.test.ts @@ -52,7 +52,7 @@ describe('Vote Confirmation Trigger - Integration Test', () => { transactionHash: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef', proposalId: 'prop-for-123', voterAddress: voterAddress, - support: 1, // FOR + support: '1', // FOR votingPower: '1000000000000000000000', // 1000 tokens timestamp: eventTimestamp, reason: 'Great proposal!', @@ -110,7 +110,7 @@ describe('Vote Confirmation Trigger - Integration Test', () => { transactionHash: '0x2345678901bcdef2345678901bcdef2345678901bcdef2345678901bcdef2345', proposalId: 'prop-against-456', voterAddress: voterAddress, - support: 0, // AGAINST + support: '0', // AGAINST votingPower: '5000000000000000000000', // 5000 tokens timestamp: eventTimestamp, reason: 'Needs more discussion', @@ -165,7 +165,7 @@ describe('Vote Confirmation Trigger - Integration Test', () => { transactionHash: '0x3456789012cdef3456789012cdef3456789012cdef3456789012cdef34567890', proposalId: 'prop-abstain-789', voterAddress: voterAddress, - support: 2, // ABSTAIN + support: '2', // ABSTAIN votingPower: '2000000000000000000000', // 2000 tokens timestamp: eventTimestamp, // No reason provided for abstain @@ -220,7 +220,7 @@ describe('Vote Confirmation Trigger - Integration Test', () => { transactionHash: sameTxHash, proposalId: 'prop-dup-123', voterAddress: voterAddress, - support: 1, + support: '1', votingPower: '1000000000000000000000', timestamp: eventTimestamp, proposalTitle: 'Duplicate Test Proposal' @@ -285,7 +285,7 @@ describe('Vote Confirmation Trigger - Integration Test', () => { transactionHash: '0x5678901234ef5678901234ef5678901234ef5678901234ef5678901234ef5678', proposalId: 'prop-multi-1', voterAddress: voterAddress, - support: 1, // FOR + support: '1', // FOR votingPower: '1000000000000000000000', timestamp: baseTimestamp, proposalTitle: 'Multi Vote Proposal 1' @@ -295,7 +295,7 @@ describe('Vote Confirmation Trigger - Integration Test', () => { transactionHash: '0x6789012345f6789012345f6789012345f6789012345f6789012345f6789012345', proposalId: 'prop-multi-2', voterAddress: voterAddress, - support: 0, // AGAINST + support: '0', // AGAINST votingPower: '1000000000000000000000', timestamp: baseTimestamp + 1, proposalTitle: 'Multi Vote Proposal 2' @@ -305,7 +305,7 @@ describe('Vote Confirmation Trigger - Integration Test', () => { transactionHash: '0x78901234567890123456789012345678901234567890123456789012345678ab', proposalId: 'prop-multi-3', voterAddress: voterAddress, - support: 2, // ABSTAIN + support: '2', // ABSTAIN votingPower: '1000000000000000000000', timestamp: baseTimestamp + 2, proposalTitle: 'Multi Vote Proposal 3' @@ -367,7 +367,7 @@ describe('Vote Confirmation Trigger - Integration Test', () => { transactionHash: '0x890123456789012345678901234567890123456789012345678901234567890cd', proposalId: 'prop-nosub', voterAddress: voterAddress, - support: 1, + support: '1', votingPower: '1000000000000000000000', timestamp: eventTimestamp, proposalTitle: 'No Subscription Proposal' diff --git a/apps/integrated-tests/tests/telegram/voting-reminder-trigger.test.ts b/apps/integrated-tests/tests/telegram/voting-reminder-trigger.test.ts index e6b707e4..bc65a1d9 100644 --- a/apps/integrated-tests/tests/telegram/voting-reminder-trigger.test.ts +++ b/apps/integrated-tests/tests/telegram/voting-reminder-trigger.test.ts @@ -330,8 +330,8 @@ describe('Voting Reminder Integration Tests', () => { const eventIds = relevantNotifs.map(n => n.event_id); expect(eventIds).toEqual( expect.arrayContaining([ - expect.stringContaining('30-reminder'), - expect.stringContaining('60-reminder') + expect.stringContaining('30-voting-reminder'), + expect.stringContaining('60-voting-reminder') ]) ); }); diff --git a/apps/logic-system/package.json b/apps/logic-system/package.json index aaea9743..b4a0df03 100644 --- a/apps/logic-system/package.json +++ b/apps/logic-system/package.json @@ -30,13 +30,15 @@ "jest-mock": "^29.7.0", "ts-jest": "^29.1.0", "ts-node": "10.9.1", - "typescript": "^4.9.5", + "typescript": "^5.8.3", "viem": "^2.34.0" }, "dependencies": { + "@anticapture/observability": "^1.0.0", "@notification-system/anticapture-client": "workspace:*", "@notification-system/messages": "workspace:*", "@notification-system/rabbitmq-client": "workspace:*", + "@opentelemetry/api": "^1.9.0", "axios": "^1.6.7", "dotenv": "^16.3.1", "zod": "^3.22.4" diff --git a/apps/logic-system/src/app.ts b/apps/logic-system/src/app.ts index 8da39bee..37d0ef73 100644 --- a/apps/logic-system/src/app.ts +++ b/apps/logic-system/src/app.ts @@ -13,10 +13,12 @@ import { ThresholdRepository } from './repositories/threshold.repository'; import { VotesRepository } from './repositories/votes.repository'; import { OffchainVotesRepository } from './repositories/offchain-votes.repository'; import { RabbitMQDispatcherService } from './api-clients/rabbitmq-dispatcher.service'; -import { AnticaptureClient } from '@notification-system/anticapture-client'; +import { AnticaptureClient, QueryInput_Proposals_Status_Items } from '@notification-system/anticapture-client'; import { RabbitMQConnection, RabbitMQPublisher } from '@notification-system/rabbitmq-client'; -import { ProposalStatus } from './interfaces/proposal.interface'; import { AxiosInstance } from 'axios'; +import { createLogger, wrapWithTracing } from '@anticapture/observability'; + +const logger = createLogger('logic-system'); export class App { private trigger!: NewProposalTrigger; @@ -29,27 +31,28 @@ export class App { private votingReminderTrigger30!: VotingReminderTrigger; private votingReminderTrigger60!: VotingReminderTrigger; private votingReminderTrigger90!: VotingReminderTrigger; - private proposalStatus: ProposalStatus; + private offchainVotingReminderTrigger75!: VotingReminderTrigger; + private proposalStatus: QueryInput_Proposals_Status_Items; private rabbitMQConnection!: RabbitMQConnection; private rabbitMQPublisher!: RabbitMQPublisher; private initPromise: Promise; constructor( - triggerInterval: number, - proposalStatus: ProposalStatus, + triggerInterval: number, + proposalStatus: QueryInput_Proposals_Status_Items, anticaptureHttpClient: AxiosInstance, rabbitmqUrl: string, initialTimestamp?: string ) { this.proposalStatus = proposalStatus; - const anticaptureClient = new AnticaptureClient(anticaptureHttpClient); - const proposalRepository = new ProposalRepository(anticaptureClient); - const offchainProposalRepository = new OffchainProposalRepository(anticaptureClient); - const votingPowerRepository = new VotingPowerRepository(anticaptureClient); - const thresholdRepository = new ThresholdRepository(anticaptureClient); - const votesRepository = new VotesRepository(anticaptureClient); - const offchainVotesRepository = new OffchainVotesRepository(anticaptureClient); + const anticaptureClient = wrapWithTracing(new AnticaptureClient(anticaptureHttpClient)); + const proposalRepository = wrapWithTracing(new ProposalRepository(anticaptureClient)); + const offchainProposalRepository = wrapWithTracing(new OffchainProposalRepository(anticaptureClient)); + const votingPowerRepository = wrapWithTracing(new VotingPowerRepository(anticaptureClient)); + const thresholdRepository = wrapWithTracing(new ThresholdRepository(anticaptureClient, undefined, logger)); + const votesRepository = wrapWithTracing(new VotesRepository(anticaptureClient)); + const offchainVotesRepository = wrapWithTracing(new OffchainVotesRepository(anticaptureClient)); this.initPromise = this.initializeRabbitMQ(rabbitmqUrl, proposalRepository, offchainProposalRepository, votingPowerRepository, thresholdRepository, votesRepository, offchainVotesRepository, triggerInterval, initialTimestamp); } @@ -69,7 +72,7 @@ export class App { await this.rabbitMQConnection.connect(); this.rabbitMQPublisher = await RabbitMQPublisher.create(this.rabbitMQConnection); - const dispatcherService = new RabbitMQDispatcherService(this.rabbitMQPublisher); + const dispatcherService = wrapWithTracing(new RabbitMQDispatcherService(this.rabbitMQPublisher)); this.trigger = new NewProposalTrigger( dispatcherService, @@ -109,13 +112,15 @@ export class App { this.voteConfirmationTrigger = new VoteConfirmationTrigger( dispatcherService, votesRepository, - triggerInterval + triggerInterval, + logger, ); this.offchainVoteCastTrigger = new OffchainVoteCastTrigger( dispatcherService, offchainVotesRepository, - triggerInterval + triggerInterval, + logger, ); // Initialize voting reminder triggers with different thresholds @@ -139,6 +144,15 @@ export class App { triggerInterval, 90, // 90% threshold ); + + this.offchainVotingReminderTrigger75 = new VotingReminderTrigger( + dispatcherService, + offchainProposalRepository, + triggerInterval, + 75, // 75% threshold + 5, // default window size + 'offchain-voting-reminder' // prefix → produces ID 'offchain-voting-reminder-75' + ); } async start(): Promise { @@ -155,8 +169,9 @@ export class App { this.votingReminderTrigger30.start(); this.votingReminderTrigger60.start(); this.votingReminderTrigger90.start(); + this.offchainVotingReminderTrigger75.start(); - console.log('Logic system is running. Press Ctrl+C to stop.'); + logger.info('logic-system running'); } /** @@ -187,6 +202,22 @@ export class App { if (this.offchainProposalFinishedTrigger) { this.offchainProposalFinishedTrigger.reset(initialTimestamp); } + if (this.votingReminderTrigger30) { + this.votingReminderTrigger30.stop(); + this.votingReminderTrigger30.start(); + } + if (this.votingReminderTrigger60) { + this.votingReminderTrigger60.stop(); + this.votingReminderTrigger60.start(); + } + if (this.votingReminderTrigger90) { + this.votingReminderTrigger90.stop(); + this.votingReminderTrigger90.start(); + } + if (this.offchainVotingReminderTrigger75) { + this.offchainVotingReminderTrigger75.stop(); + this.offchainVotingReminderTrigger75.start(); + } } async stop(): Promise { @@ -200,6 +231,7 @@ export class App { await this.votingReminderTrigger30.stop(); await this.votingReminderTrigger60.stop(); await this.votingReminderTrigger90.stop(); + await this.offchainVotingReminderTrigger75.stop(); if (this.rabbitMQPublisher) { await this.rabbitMQPublisher.close(); } diff --git a/apps/logic-system/src/config/env.ts b/apps/logic-system/src/config/env.ts index 76ffa70e..73e43d66 100644 --- a/apps/logic-system/src/config/env.ts +++ b/apps/logic-system/src/config/env.ts @@ -1,22 +1,17 @@ import dotenv from 'dotenv'; import { z } from 'zod'; +import { QueryInput_Proposals_Status_Items } from '@notification-system/anticapture-client'; // Load environment variables dotenv.config(); -// Define valid proposal statuses -const validProposalStatuses = [ - 'PENDING', 'ACTIVE', 'SUCCEEDED', 'DEFEATED', - 'EXECUTED', 'CANCELED', 'QUEUED', 'EXPIRED' -] as const; - // Define environment variables schema with validation const envSchema = z.object({ ANTICAPTURE_GRAPHQL_ENDPOINT: z.string().url('ANTICAPTURE_GRAPHQL_ENDPOINT must be a valid URL'), BLOCKFUL_API_TOKEN: z.string().optional(), RABBITMQ_URL: z.string().url(), TRIGGER_INTERVAL: z.coerce.number().optional().default(60000), - PROPOSAL_STATUS: z.enum(validProposalStatuses), + PROPOSAL_STATUS: z.nativeEnum(QueryInput_Proposals_Status_Items), }); const _env = envSchema.safeParse(process.env); diff --git a/apps/logic-system/src/index.ts b/apps/logic-system/src/index.ts index 63a2b882..2168ba2c 100644 --- a/apps/logic-system/src/index.ts +++ b/apps/logic-system/src/index.ts @@ -1,6 +1,11 @@ +import './instrumentation'; + import axios from 'axios'; import { App } from './app'; import { env } from './config/env'; +import { createLogger } from '@anticapture/observability'; + +const logger = createLogger('logic-system'); const app = new App( env.TRIGGER_INTERVAL, @@ -16,9 +21,12 @@ const app = new App( env.RABBITMQ_URL, ); -app.start(); +app.start().catch((err) => { + logger.error({ err }, 'logic-system failed to start'); + process.exit(1); +}); //@ts-ignore BigInt.prototype.toJSON = function () { return this.toString(); -}; \ No newline at end of file +}; diff --git a/apps/logic-system/src/instrumentation.ts b/apps/logic-system/src/instrumentation.ts new file mode 100644 index 00000000..209cb47c --- /dev/null +++ b/apps/logic-system/src/instrumentation.ts @@ -0,0 +1,3 @@ +import { createObservabilityProvider } from '@anticapture/observability'; + +createObservabilityProvider('logic-system'); diff --git a/apps/logic-system/src/interfaces/proposal.interface.ts b/apps/logic-system/src/interfaces/proposal.interface.ts index 48351e8d..eb183e56 100644 --- a/apps/logic-system/src/interfaces/proposal.interface.ts +++ b/apps/logic-system/src/interfaces/proposal.interface.ts @@ -1,20 +1,10 @@ -import type { GetProposalByIdQuery } from '@notification-system/anticapture-client'; +import type { GetProposalByIdQuery, QueryInput_Proposals_Status_Items, OrderDirection } from '@notification-system/anticapture-client'; -export type ProposalOnChain = GetProposalByIdQuery['proposal']; +type RawProposal = NonNullable; +export type ProposalOnChain = Extract; export type ProposalOrNull = ProposalOnChain | null; -/** - * Valid status values for a proposal - */ -export type ProposalStatus = - | 'PENDING' - | 'ACTIVE' - | 'SUCCEEDED' - | 'DEFEATED' - | 'EXECUTED' - | 'CANCELED' - | 'QUEUED' - | 'EXPIRED'; +export type { QueryInput_Proposals_Status_Items as ProposalStatus }; /** * Options for listing proposals (matches new API parameters) @@ -24,16 +14,16 @@ export interface ListProposalsOptions { skip?: number; /** Maximum number of proposals to return */ limit?: number; - /** Filter by status - can be string or array */ - status?: string | string[]; + /** Filter by proposal status */ + status?: QueryInput_Proposals_Status_Items | QueryInput_Proposals_Status_Items[]; /** Filter by DAO (passed as header, not query param) */ daoId?: string; /** Filter proposals after this date (timestamp in seconds) */ fromDate?: number; /** Filter proposals by end timestamp (timestamp in seconds) */ fromEndDate?: number; - /** Order direction - asc or desc */ - orderDirection?: string; + /** Order direction */ + orderDirection?: OrderDirection; /** Whether to include optimistic proposals (true=include, false=exclude, undefined=both) */ includeOptimisticProposals?: boolean; } diff --git a/apps/logic-system/src/interfaces/voting-reminder.interface.ts b/apps/logic-system/src/interfaces/voting-reminder.interface.ts new file mode 100644 index 00000000..6ee11805 --- /dev/null +++ b/apps/logic-system/src/interfaces/voting-reminder.interface.ts @@ -0,0 +1,22 @@ +/** + * Normalized proposal data for voting reminders. + * Both on-chain and off-chain proposals are mapped to this shape. + */ +export interface VotingReminderProposal { + id: string; + daoId: string; + title?: string; + description?: string; + startTime: number; + endTime: number; + link?: string; + discussion?: string; +} + +/** + * Data source interface for fetching proposals ready for voting reminders. + * Implemented by both ProposalRepository and OffchainProposalRepository. + */ +export interface VotingReminderDataSource { + listActiveForReminder(): Promise; +} diff --git a/apps/logic-system/src/mappers/proposal-reminder.mapper.ts b/apps/logic-system/src/mappers/proposal-reminder.mapper.ts new file mode 100644 index 00000000..815ed6f8 --- /dev/null +++ b/apps/logic-system/src/mappers/proposal-reminder.mapper.ts @@ -0,0 +1,33 @@ +import { ProposalOnChain } from '../interfaces/proposal.interface'; +import { OffchainProposal } from '../interfaces/offchain-proposal.interface'; +import { VotingReminderProposal } from '../interfaces/voting-reminder.interface'; + +/** + * Maps an on-chain proposal to the normalized VotingReminderProposal shape. + */ +export function mapOnchainToReminderProposal(p: ProposalOnChain): VotingReminderProposal { + return { + id: p.id, + daoId: p.daoId, + title: p.title || undefined, + description: p.description, + startTime: p.timestamp, + endTime: p.endTimestamp, + }; +} + +/** + * Maps an off-chain (Snapshot) proposal to the normalized VotingReminderProposal shape. + * Uses `start` (actual voting start) when available, falls back to `created`. + */ +export function mapOffchainToReminderProposal(p: OffchainProposal): VotingReminderProposal { + return { + id: p.id, + daoId: p.daoId, + title: p.title || undefined, + startTime: p.start ?? p.created, + endTime: p.end, + link: p.link, + discussion: p.discussion, + }; +} diff --git a/apps/logic-system/src/repositories/offchain-proposal.repository.ts b/apps/logic-system/src/repositories/offchain-proposal.repository.ts index af11cd4d..d06d62ee 100644 --- a/apps/logic-system/src/repositories/offchain-proposal.repository.ts +++ b/apps/logic-system/src/repositories/offchain-proposal.repository.ts @@ -1,7 +1,9 @@ import { AnticaptureClient } from '@notification-system/anticapture-client'; import { OffchainProposalDataSource, OffchainProposal, ListOffchainProposalsOptions } from '../interfaces/offchain-proposal.interface'; +import { VotingReminderProposal, VotingReminderDataSource } from '../interfaces/voting-reminder.interface'; +import { mapOffchainToReminderProposal } from '../mappers/proposal-reminder.mapper'; -export class OffchainProposalRepository implements OffchainProposalDataSource { +export class OffchainProposalRepository implements OffchainProposalDataSource, VotingReminderDataSource { private anticaptureClient: AnticaptureClient; constructor(anticaptureClient: AnticaptureClient) { @@ -33,4 +35,9 @@ export class OffchainProposalRepository implements OffchainProposalDataSource { return await this.anticaptureClient.listOffchainProposals(variables); } + + async listActiveForReminder(): Promise { + const proposals = await this.listAll({ status: 'active' }); + return proposals.map(mapOffchainToReminderProposal); + } } diff --git a/apps/logic-system/src/repositories/proposal.repository.ts b/apps/logic-system/src/repositories/proposal.repository.ts index 181b6bbf..c4cdf21e 100644 --- a/apps/logic-system/src/repositories/proposal.repository.ts +++ b/apps/logic-system/src/repositories/proposal.repository.ts @@ -1,8 +1,9 @@ -import { QueryInput_Proposals_IncludeOptimisticProposals as boolEnum } from '@notification-system/anticapture-client/dist/gql/graphql'; import { ProposalDataSource, ProposalOnChain, ProposalOrNull, ListProposalsOptions } from '../interfaces/proposal.interface'; -import { AnticaptureClient, ListProposalsQueryVariables } from '@notification-system/anticapture-client'; +import { VotingReminderDataSource, VotingReminderProposal } from '../interfaces/voting-reminder.interface'; +import { AnticaptureClient, ListProposalsQueryVariables, OrderDirection, QueryInput_Proposals_Status_Items } from '@notification-system/anticapture-client'; +import { mapOnchainToReminderProposal } from '../mappers/proposal-reminder.mapper'; -export class ProposalRepository implements ProposalDataSource { +export class ProposalRepository implements ProposalDataSource, VotingReminderDataSource { private anticaptureClient: AnticaptureClient; constructor(anticaptureClient: AnticaptureClient) { @@ -10,17 +11,19 @@ export class ProposalRepository implements ProposalDataSource { } async getById(id: string): Promise { - return await this.anticaptureClient.getProposalById(id); + const result = await this.anticaptureClient.getProposalById(id); + if (!result || result.__typename !== 'OnchainProposal') return null; + return result as ProposalOnChain; } async listAll(options?: ListProposalsOptions, limit: number = 100): Promise { const variables: ListProposalsQueryVariables = {}; - - // Status filtering + + // Status filtering if (options?.status) { variables.status = options.status; } - + // Date filtering if (options?.fromDate) { variables.fromDate = options.fromDate; @@ -30,32 +33,41 @@ export class ProposalRepository implements ProposalDataSource { variables.fromEndDate = options.fromEndDate; } - // Optimistic proposal filtering + // Optimistic proposal filtering - now a plain boolean if (options?.includeOptimisticProposals !== undefined) { - variables.includeOptimisticProposals = options.includeOptimisticProposals ? boolEnum.True : boolEnum.False; + variables.includeOptimisticProposals = options.includeOptimisticProposals; } // Pagination if (options?.limit) { variables.limit = Math.min(options.limit, limit); - } - + } + if (options?.skip) { variables.skip = options.skip; } - - // Ordering - enum requires cast - if (options?.orderDirection === 'asc') { - variables.orderDirection = 'asc' as any; - } else if (options?.orderDirection === 'desc') { - variables.orderDirection = 'desc' as any; + + // Ordering + if (options?.orderDirection) { + variables.orderDirection = options.orderDirection; } - + const daoId = options?.daoId; const result = await this.anticaptureClient.listProposals(variables, daoId); - + // Filter out null values and ensure we return ProposalOnChain[] return (result || []).filter(proposal => proposal !== null) as ProposalOnChain[]; } -} \ No newline at end of file + async listActiveForReminder(): Promise { + const proposals = await this.listAll({ + status: QueryInput_Proposals_Status_Items.Active, + includeOptimisticProposals: false, + }); + + return proposals + .filter(p => p.timestamp != null && p.endTimestamp != null) + .map(mapOnchainToReminderProposal); + } + +} diff --git a/apps/logic-system/src/repositories/threshold.repository.ts b/apps/logic-system/src/repositories/threshold.repository.ts index 4f3e7787..25f476d3 100644 --- a/apps/logic-system/src/repositories/threshold.repository.ts +++ b/apps/logic-system/src/repositories/threshold.repository.ts @@ -3,6 +3,7 @@ import { FeedEventType, FeedRelevance } from '@notification-system/anticapture-client'; +import { createLogger, type Logger } from '@anticapture/observability'; interface CacheEntry { value: string; @@ -13,11 +14,15 @@ const ONE_DAY_MS = 86_400_000; export class ThresholdRepository { private cache = new Map(); + private readonly logger: Logger; constructor( private readonly anticaptureClient: AnticaptureClient, - private readonly cacheTtlMs: number = ONE_DAY_MS - ) {} + private readonly cacheTtlMs: number = ONE_DAY_MS, + logger: Logger = createLogger('logic-system'), + ) { + this.logger = logger.child({ component: 'ThresholdRepository' }); + } async getThreshold(daoId: string, type: FeedEventType): Promise { const cacheKey = `${daoId}:${type}`; @@ -36,9 +41,9 @@ export class ThresholdRepository { return threshold; } catch (error) { - console.warn( - `[ThresholdRepository] Error fetching threshold for ${daoId}/${type}:`, - error instanceof Error ? error.message : error + this.logger.warn( + { err: error, daoId, type, event: 'threshold.fetch_failed' }, + 'error fetching threshold', ); return null; } diff --git a/apps/logic-system/src/repositories/voting-power.repository.ts b/apps/logic-system/src/repositories/voting-power.repository.ts index 4c4fc1ee..bd7157a5 100644 --- a/apps/logic-system/src/repositories/voting-power.repository.ts +++ b/apps/logic-system/src/repositories/voting-power.repository.ts @@ -3,7 +3,7 @@ import { ListHistoricalVotingPowerQueryVariables, ProcessedVotingPowerHistory, QueryInput_HistoricalVotingPower_OrderBy, - QueryInput_HistoricalVotingPower_OrderDirection + OrderDirection } from '@notification-system/anticapture-client'; export class VotingPowerRepository { @@ -17,9 +17,9 @@ export class VotingPowerRepository { const variables: ListHistoricalVotingPowerQueryVariables = { // Always order by timestamp ascending for chronological processing orderBy: QueryInput_HistoricalVotingPower_OrderBy.Timestamp, - orderDirection: QueryInput_HistoricalVotingPower_OrderDirection.Asc, + orderDirection: OrderDirection.Asc, limit: 100, - fromDate: timestampGt + fromDate: parseInt(timestampGt, 10) }; return await this.anticaptureClient.listVotingPowerHistory(variables); diff --git a/apps/logic-system/src/triggers/base-trigger.ts b/apps/logic-system/src/triggers/base-trigger.ts index e29ec5f1..77e25ac7 100644 --- a/apps/logic-system/src/triggers/base-trigger.ts +++ b/apps/logic-system/src/triggers/base-trigger.ts @@ -1,3 +1,5 @@ +import { createLogger, type Logger } from '@anticapture/observability'; + /** * Base abstract class for all triggers in the system */ @@ -36,9 +38,12 @@ export abstract class Trigger { */ private readonly maxConsecutiveFailures = 5; - constructor(id: string, interval: number) { + protected readonly logger: Logger; + + constructor(id: string, interval: number, logger: Logger = createLogger('logic-system')) { this.id = id; this.interval = interval; + this.logger = logger.child({ component: id }); } /** @@ -98,11 +103,22 @@ export abstract class Trigger { private async handleError(error: unknown): Promise { this.consecutiveFailures++; if (this.consecutiveFailures >= this.maxConsecutiveFailures) { - console.error(`[Trigger ${this.id}] Stopped after ${this.consecutiveFailures} consecutive failures. Last error: ${error instanceof Error ? error.message : 'Unknown error'}`); + this.logger.error( + { err: error, consecutiveFailures: this.consecutiveFailures, event: 'trigger.stopped_after_failures' }, + 'trigger stopped after consecutive failures', + ); await this.stop(); return; } - console.log(`[Trigger ${this.id}] Will retry on next interval. Failures: ${this.consecutiveFailures}/${this.maxConsecutiveFailures}`); + this.logger.warn( + { + err: error, + consecutiveFailures: this.consecutiveFailures, + maxConsecutiveFailures: this.maxConsecutiveFailures, + event: 'trigger.will_retry', + }, + 'trigger will retry on next interval', + ); } /** diff --git a/apps/logic-system/src/triggers/new-proposal-trigger.ts b/apps/logic-system/src/triggers/new-proposal-trigger.ts index 4b3aff8f..1e78dd61 100644 --- a/apps/logic-system/src/triggers/new-proposal-trigger.ts +++ b/apps/logic-system/src/triggers/new-proposal-trigger.ts @@ -55,7 +55,7 @@ export class NewProposalTrigger extends Trigger { private lastProcessedTimestamp: number; @@ -10,19 +11,26 @@ export class OffchainVoteCastTrigger extends Trigger { try { const votes = await this.offchainVotesRepository.listRecentOffchainVotes(this.lastProcessedTimestamp); - console.log(`[OffchainVoteCastTrigger] Fetched ${votes.length} new offchain votes since timestamp ${this.lastProcessedTimestamp}`); + this.logger.info( + { count: votes.length, sinceTimestamp: this.lastProcessedTimestamp, event: 'offchain_votes.fetched' }, + 'fetched new offchain votes', + ); return votes; } catch (error) { - console.error('[OffchainVoteCastTrigger] Error fetching offchain votes:', error); + this.logger.error( + { err: error, event: 'offchain_votes.fetch_failed' }, + 'error fetching offchain votes', + ); return []; } } @@ -38,12 +46,18 @@ export class OffchainVoteCastTrigger extends Trigger { - private readonly finishedStatuses = ['EXECUTED', 'DEFEATED', 'SUCCEEDED', 'EXPIRED', 'CANCELED']; + private readonly finishedStatuses: QueryInput_Proposals_Status_Items[] = [ + QueryInput_Proposals_Status_Items.Executed, + QueryInput_Proposals_Status_Items.Defeated, + QueryInput_Proposals_Status_Items.Succeeded, + QueryInput_Proposals_Status_Items.Expired, + QueryInput_Proposals_Status_Items.Canceled, + ]; private endTimestampCursor: number; constructor( @@ -43,9 +50,9 @@ export class ProposalFinishedTrigger extends Trigger { protected async fetchData(): Promise { return await this.proposalRepository.listAll({ - status: this.finishedStatuses, // API accepts array + status: this.finishedStatuses, fromEndDate: this.endTimestampCursor, - orderDirection: 'desc', // API orders by endTimestamp when using fromEndDate + orderDirection: OrderDirection.Desc, limit: 100 }); } @@ -58,9 +65,9 @@ export class ProposalFinishedTrigger extends Trigger { const notifications: ProposalFinishedNotification[] = data.map(proposal => ({ id: proposal?.id || '', daoId: proposal?.daoId || '', - title: proposal?.title || undefined, + ...(proposal?.title ? { title: proposal.title } : {}), description: proposal?.description || '', - endTimestamp: proposal?.endTimestamp ? parseInt(proposal.endTimestamp) : 0, + endTimestamp: proposal?.endTimestamp ?? 0, status: proposal?.status || 'unknown', forVotes: proposal?.forVotes || '0', againstVotes: proposal?.againstVotes || '0', diff --git a/apps/logic-system/src/triggers/vote-confirmation-trigger.ts b/apps/logic-system/src/triggers/vote-confirmation-trigger.ts index 210524a0..9b16aa1c 100644 --- a/apps/logic-system/src/triggers/vote-confirmation-trigger.ts +++ b/apps/logic-system/src/triggers/vote-confirmation-trigger.ts @@ -3,16 +3,18 @@ import { VotesRepository } from '../repositories/votes.repository'; import { DispatcherService, DispatcherMessage } from '../interfaces/dispatcher.interface'; import { VoteWithDaoId } from '@notification-system/anticapture-client'; import { NotificationTypeId } from '@notification-system/messages'; +import { createLogger, type Logger } from '@anticapture/observability'; export class VoteConfirmationTrigger extends Trigger { private lastProcessedTimestamp: string; - + constructor( private readonly dispatcherService: DispatcherService, private readonly votesRepository: VotesRepository, - interval: number + interval: number, + logger: Logger = createLogger('logic-system'), ) { - super('VoteConfirmationTrigger', interval); + super('VoteConfirmationTrigger', interval, logger); // Initialize with current timestamp this.lastProcessedTimestamp = Math.floor(Date.now() / 1000).toString(); } @@ -20,10 +22,13 @@ export class VoteConfirmationTrigger extends Trigger { protected async fetchData(): Promise { try { const votes = await this.votesRepository.listRecentVotes(this.lastProcessedTimestamp); - console.log(`[VoteConfirmationTrigger] Fetched ${votes.length} new votes since timestamp ${this.lastProcessedTimestamp}`); + this.logger.info( + { count: votes.length, sinceTimestamp: this.lastProcessedTimestamp, event: 'votes.fetched' }, + 'fetched new votes', + ); return votes; } catch (error) { - console.error('[VoteConfirmationTrigger] Error fetching votes:', error); + this.logger.error({ err: error, event: 'votes.fetch_failed' }, 'error fetching votes'); return []; } } @@ -49,14 +54,17 @@ export class VoteConfirmationTrigger extends Trigger { }; await this.dispatcherService.sendMessage(message); - console.log(`[VoteConfirmationTrigger] Sent ${data.length} votes to dispatcher`); + this.logger.info({ count: data.length, event: 'votes.dispatched' }, 'sent votes to dispatcher'); // Update timestamp to the last processed vote const lastVote = data[data.length - 1]; if (lastVote && lastVote.timestamp) { // Add 1 second to avoid reprocessing the same vote this.lastProcessedTimestamp = String(lastVote.timestamp + 1); - console.log(`[VoteConfirmationTrigger] Updated last processed timestamp to ${this.lastProcessedTimestamp}`); + this.logger.debug( + { lastProcessedTimestamp: this.lastProcessedTimestamp, event: 'cursor.advanced' }, + 'updated last processed timestamp', + ); } } @@ -66,7 +74,10 @@ export class VoteConfirmationTrigger extends Trigger { */ public reset(timestamp?: string): void { this.lastProcessedTimestamp = timestamp || Math.floor(Date.now() / 1000).toString(); - console.log(`[VoteConfirmationTrigger] Reset timestamp to ${this.lastProcessedTimestamp}`); + this.logger.info( + { lastProcessedTimestamp: this.lastProcessedTimestamp, event: 'cursor.reset' }, + 'reset timestamp', + ); } /** diff --git a/apps/logic-system/src/triggers/voting-reminder-trigger.ts b/apps/logic-system/src/triggers/voting-reminder-trigger.ts index cbb3785f..fd05ab46 100644 --- a/apps/logic-system/src/triggers/voting-reminder-trigger.ts +++ b/apps/logic-system/src/triggers/voting-reminder-trigger.ts @@ -5,7 +5,7 @@ */ import { Trigger } from './base-trigger'; -import { ProposalOnChain, ProposalDataSource } from '../interfaces/proposal.interface'; +import { VotingReminderProposal, VotingReminderDataSource } from '../interfaces/voting-reminder.interface'; import { DispatcherService, DispatcherMessage } from '../interfaces/dispatcher.interface'; /** @@ -15,29 +15,32 @@ export interface VotingReminderEvent { id: string; daoId: string; title?: string; - description: string; + description?: string; startTimestamp: number; endTimestamp: number; timeElapsedPercentage: number; thresholdPercentage: number; + link?: string; + discussion?: string; } -const TRIGGER_ID_PREFIX = 'voting-reminder'; +const DEFAULT_TRIGGER_ID_PREFIX = 'voting-reminder'; // 5% window the event will be triggered between thresholdPercentage and thresholdPercentage + window -const DEFAULT_WINDOW_SIZE = 5; +const DEFAULT_WINDOW_SIZE = 5; -export class VotingReminderTrigger extends Trigger { +export class VotingReminderTrigger extends Trigger { private thresholdPercentage: number; private windowSize: number; constructor( private readonly dispatcherService: DispatcherService, - private readonly proposalRepository: ProposalDataSource, + private readonly dataSource: VotingReminderDataSource, interval: number, thresholdPercentage: number = 75, - windowSize: number = DEFAULT_WINDOW_SIZE + windowSize: number = DEFAULT_WINDOW_SIZE, + triggerIdPrefix: string = DEFAULT_TRIGGER_ID_PREFIX ) { - super(`${TRIGGER_ID_PREFIX}-${thresholdPercentage}`, interval); + super(`${triggerIdPrefix}-${thresholdPercentage}`, interval); this.thresholdPercentage = thresholdPercentage; this.windowSize = windowSize; } @@ -45,18 +48,18 @@ export class VotingReminderTrigger extends Trigger { /** * Processes proposals and sends voting reminders for eligible ones */ - async process(proposals: ProposalOnChain[]): Promise { + async process(proposals: VotingReminderProposal[]): Promise { if (proposals.length === 0) { return; } const eligibleProposals = this.filterEligibleProposals(proposals); - + if (eligibleProposals.length === 0) { return; } - const reminderEvents = eligibleProposals.map(proposal => + const reminderEvents = eligibleProposals.map(proposal => this.createReminderEvent(proposal) ); @@ -71,9 +74,9 @@ export class VotingReminderTrigger extends Trigger { /** * Filters proposals that are eligible for reminders */ - private filterEligibleProposals(proposals: ProposalOnChain[]): ProposalOnChain[] { + private filterEligibleProposals(proposals: VotingReminderProposal[]): VotingReminderProposal[] { const now = Math.floor(Date.now() / 1000); - + return proposals.filter(proposal => { // Skip null proposals if (!proposal) { @@ -81,28 +84,25 @@ export class VotingReminderTrigger extends Trigger { } // Skip if proposal doesn't have required timestamps - if (!proposal.timestamp || !proposal.endTimestamp) { + if (!proposal.startTime || !proposal.endTime) { return false; } - const startTime = parseInt(proposal.timestamp); - const endTime = parseInt(proposal.endTimestamp); - // Skip if proposal is not active - if (now <= startTime || now >= endTime) { + if (now <= proposal.startTime || now >= proposal.endTime) { return false; } const timeElapsedPercentage = this.calculateTimeElapsedPercentage( - startTime, - endTime, + proposal.startTime, + proposal.endTime, now ); // Check if proposal is within the notification window (threshold to threshold + windowSize) const threshold = this.thresholdPercentage; const windowEnd = Math.min(threshold + this.windowSize, 100); - + return timeElapsedPercentage >= threshold && timeElapsedPercentage <= windowEnd; }); } @@ -112,49 +112,45 @@ export class VotingReminderTrigger extends Trigger { * Calculates the percentage of time elapsed for a proposal */ private calculateTimeElapsedPercentage( - startTime: number, - endTime: number, + startTime: number, + endTime: number, currentTime: number ): number { if (currentTime <= startTime) return 0; if (currentTime >= endTime) return 100; - + return ((currentTime - startTime) / (endTime - startTime)) * 100; } /** * Creates a reminder event from a proposal */ - private createReminderEvent(proposal: ProposalOnChain): VotingReminderEvent { - if (!proposal || !proposal.timestamp || !proposal.endTimestamp) { + private createReminderEvent(proposal: VotingReminderProposal): VotingReminderEvent { + if (!proposal || !proposal.startTime || !proposal.endTime) { throw new Error('Invalid proposal data for reminder event'); } - + const now = Math.floor(Date.now() / 1000); - const startTime = parseInt(proposal.timestamp); - const endTime = parseInt(proposal.endTimestamp); - const timeElapsedPercentage = this.calculateTimeElapsedPercentage(startTime, endTime, now); + const timeElapsedPercentage = this.calculateTimeElapsedPercentage(proposal.startTime, proposal.endTime, now); return { id: proposal.id, daoId: proposal.daoId, - title: proposal.title || undefined, + title: proposal.title, description: proposal.description, - startTimestamp: startTime, - endTimestamp: endTime, + startTimestamp: proposal.startTime, + endTimestamp: proposal.endTime, timeElapsedPercentage: Math.round(timeElapsedPercentage * 100) / 100, // Round to 2 decimal places - thresholdPercentage: this.thresholdPercentage + thresholdPercentage: this.thresholdPercentage, + link: proposal.link, + discussion: proposal.discussion, }; } /** - * Fetches active proposals from the repository - * Excludes optimistic proposals (includeOptimisticProposals: false) + * Fetches active proposals from the data source */ - protected async fetchData(): Promise { - return await this.proposalRepository.listAll({ - status: 'ACTIVE', - includeOptimisticProposals: false - }); + protected async fetchData(): Promise { + return await this.dataSource.listActiveForReminder(); } -} \ No newline at end of file +} diff --git a/apps/logic-system/tests/new-proposal-trigger.test.ts b/apps/logic-system/tests/new-proposal-trigger.test.ts index 00d5c093..8f3773a1 100644 --- a/apps/logic-system/tests/new-proposal-trigger.test.ts +++ b/apps/logic-system/tests/new-proposal-trigger.test.ts @@ -7,6 +7,7 @@ import { NewProposalTrigger } from '../src/triggers/new-proposal-trigger'; import { ProposalOnChain } from '../src/interfaces/proposal.interface'; import { createProposal, createMockDispatcherService, createMockProposalDataSource } from './mocks'; import { NotificationTypeId } from '@notification-system/messages'; +import { QueryInput_Proposals_Status_Items } from '@notification-system/anticapture-client'; describe('NewProposalTrigger', () => { let mockDispatcherService: ReturnType; @@ -33,8 +34,8 @@ describe('NewProposalTrigger', () => { it('should send proposals and update timestampCursor', async () => { const proposals: ProposalOnChain[] = [ - createProposal({ status: 'ACTIVE', timestamp: '1000' }), - createProposal({ id: '2', status: 'ACTIVE', description: 'Second proposal\nWith details', timestamp: '900' }) + createProposal({ status: 'ACTIVE', timestamp: 1000 }), + createProposal({ id: '2', status: 'ACTIVE', description: 'Second proposal\nWith details', timestamp: 900 }) ]; await trigger.process(proposals); @@ -88,7 +89,7 @@ describe('NewProposalTrigger', () => { it('should start the interval and fetch proposals with status and timestamp filter', () => { const initialTimestamp = trigger['timestampCursor']; - trigger.start({ status: 'ACTIVE' }); + trigger.start({ status: QueryInput_Proposals_Status_Items.Active }); jest.advanceTimersByTime(60000); expect(mockProposalDataSource.listAll).toHaveBeenCalledTimes(1); @@ -101,8 +102,8 @@ describe('NewProposalTrigger', () => { it('should stop and restart the interval if start is called twice', () => { const stopSpy = jest.spyOn(trigger, 'stop'); const initialTimestamp = trigger['timestampCursor']; - trigger.start({ status: 'ACTIVE' }); - trigger.start({ status: 'ACTIVE' }); + trigger.start({ status: QueryInput_Proposals_Status_Items.Active }); + trigger.start({ status: QueryInput_Proposals_Status_Items.Active }); expect(stopSpy).toHaveBeenCalledTimes(1); jest.advanceTimersByTime(60000); @@ -114,7 +115,7 @@ describe('NewProposalTrigger', () => { it('should stop the interval when stop is called', () => { const initialTimestamp = trigger['timestampCursor']; - trigger.start({ status: 'ACTIVE' }); + trigger.start({ status: QueryInput_Proposals_Status_Items.Active }); jest.advanceTimersByTime(60000); expect(mockProposalDataSource.listAll).toHaveBeenCalledTimes(1); diff --git a/apps/logic-system/tests/proposal-finished-trigger.test.ts b/apps/logic-system/tests/proposal-finished-trigger.test.ts index 116f5664..d7ccf601 100644 --- a/apps/logic-system/tests/proposal-finished-trigger.test.ts +++ b/apps/logic-system/tests/proposal-finished-trigger.test.ts @@ -76,15 +76,15 @@ describe('ProposalFinishedTrigger', () => { id: 'prop1', daoId: 'dao1', description: 'Test proposal 1 description', - timestamp: '1625097600', - endTimestamp: '1625097600' + timestamp: 1625097600, + endTimestamp: 1625097600 }), createFinishedProposal('DEFEATED', { id: 'prop2', daoId: 'dao2', description: 'Test proposal 2 description', - timestamp: '1625184000', - endTimestamp: '1625184000', + timestamp: 1625184000, + endTimestamp: 1625184000, forVotes: '200000000000000000000', againstVotes: '800000000000000000000', abstainVotes: '50000000000000000000' @@ -125,7 +125,6 @@ describe('ProposalFinishedTrigger', () => { it('should handle proposals with missing optional fields', async () => { const proposal = createProposalWithMissingFields(); - // @ts-expect-error - we want to test the case where the proposal is missing some fields proposal.id = 'prop1'; await trigger.process([proposal]); @@ -175,15 +174,15 @@ describe('ProposalFinishedTrigger', () => { const proposalA = createFinishedProposal('EXECUTED', { id: 'proposal-a', daoId: 'dao1', - timestamp: '1000', - endTimestamp: '2000' + timestamp: 1000, + endTimestamp: 2000 }); const proposalB = createFinishedProposal('DEFEATED', { id: 'proposal-b', daoId: 'dao1', - timestamp: '1100', - endTimestamp: '2100' + timestamp: 1100, + endTimestamp: 2100 }); // First execution: process proposal A diff --git a/apps/logic-system/tests/voting-reminder-trigger.test.ts b/apps/logic-system/tests/voting-reminder-trigger.test.ts index d0db9c68..899bb2d9 100644 --- a/apps/logic-system/tests/voting-reminder-trigger.test.ts +++ b/apps/logic-system/tests/voting-reminder-trigger.test.ts @@ -4,7 +4,7 @@ import { describe, it, expect, jest, beforeEach, afterEach } from '@jest/globals'; import { VotingReminderTrigger } from '../src/triggers/voting-reminder-trigger'; -import { ProposalOnChain } from '../src/interfaces/proposal.interface'; +import { VotingReminderProposal } from '../src/interfaces/voting-reminder.interface'; import { DispatcherService } from '../src/interfaces/dispatcher.interface'; import { MockedFunction } from 'jest-mock'; import { NotificationTypeId } from '@notification-system/messages'; @@ -12,25 +12,25 @@ import { NotificationTypeId } from '@notification-system/messages'; describe('VotingReminderTrigger', () => { let trigger: VotingReminderTrigger; let mockDispatcherService: jest.Mocked; - let mockProposalRepository: any; + let mockDataSource: any; const baseTime = Math.floor(Date.now() / 1000); - + beforeEach(() => { mockDispatcherService = { sendMessage: jest.fn().mockResolvedValue(undefined as never) as MockedFunction, }; - mockProposalRepository = { - listAll: jest.fn().mockResolvedValue([] as never), + mockDataSource = { + listActiveForReminder: jest.fn().mockResolvedValue([] as never), }; // Mock Date.now for consistent testing jest.spyOn(Date, 'now').mockReturnValue(baseTime * 1000); - + trigger = new VotingReminderTrigger( mockDispatcherService, - mockProposalRepository, + mockDataSource, 30000, // 30 second interval for testing 90 // 90% threshold ); @@ -42,22 +42,34 @@ describe('VotingReminderTrigger', () => { describe('constructor', () => { it('should create trigger with unique IDs including threshold', () => { - const trigger30 = new VotingReminderTrigger(mockDispatcherService, mockProposalRepository, 30000, 30); - const trigger60 = new VotingReminderTrigger(mockDispatcherService, mockProposalRepository, 30000, 60); - const trigger90 = new VotingReminderTrigger(mockDispatcherService, mockProposalRepository, 30000, 90); - const trigger75 = new VotingReminderTrigger(mockDispatcherService, mockProposalRepository, 30000, 75); + const trigger30 = new VotingReminderTrigger(mockDispatcherService, mockDataSource, 30000, 30); + const trigger60 = new VotingReminderTrigger(mockDispatcherService, mockDataSource, 30000, 60); + const trigger90 = new VotingReminderTrigger(mockDispatcherService, mockDataSource, 30000, 90); + const trigger75 = new VotingReminderTrigger(mockDispatcherService, mockDataSource, 30000, 75); expect(trigger30.id).toBe(NotificationTypeId.VotingReminder30); expect(trigger60.id).toBe(NotificationTypeId.VotingReminder60); expect(trigger90.id).toBe(NotificationTypeId.VotingReminder90); expect(trigger75.id).toBe('voting-reminder-75'); }); + + it('should create trigger with custom prefix', () => { + const offchainTrigger = new VotingReminderTrigger( + mockDispatcherService, + mockDataSource, + 30000, + 75, + 5, + 'offchain-voting-reminder' + ); + expect(offchainTrigger.id).toBe('offchain-voting-reminder-75'); + }); }); describe('process', () => { it('should not send messages for empty proposals array', async () => { await trigger.process([]); - + expect(mockDispatcherService.sendMessage).not.toHaveBeenCalled(); }); @@ -65,16 +77,15 @@ describe('VotingReminderTrigger', () => { const proposalStart = baseTime - 3600; // Started 1 hour ago const proposalEnd = baseTime + 300; // Ends in 5 minutes // Total duration: 65 minutes, elapsed: 60 minutes = 92.3% elapsed (within 90-95% window) - - const proposal: ProposalOnChain = { + + const proposal: VotingReminderProposal = { id: 'proposal-123', daoId: 'test-dao', title: 'Test Proposal', description: 'A test proposal for voting reminder', - timestamp: proposalStart.toString(), - endTimestamp: proposalEnd.toString(), - status: 'ACTIVE' - } as ProposalOnChain; + startTime: proposalStart, + endTime: proposalEnd, + }; await trigger.process([proposal]); @@ -88,7 +99,9 @@ describe('VotingReminderTrigger', () => { startTimestamp: proposalStart, endTimestamp: proposalEnd, timeElapsedPercentage: 92.31, - thresholdPercentage: 90 + thresholdPercentage: 90, + link: undefined, + discussion: undefined, }] }); }); @@ -97,15 +110,14 @@ describe('VotingReminderTrigger', () => { const proposalStart = baseTime - 9600; // Started 160 minutes ago const proposalEnd = baseTime + 400; // Ends in ~6.7 minutes // Total duration: 166.7 minutes, elapsed: 160 minutes = 96% elapsed (> 95% window) - - const proposal: ProposalOnChain = { + + const proposal: VotingReminderProposal = { id: 'proposal-123', daoId: 'test-dao', description: 'A test proposal for voting reminder', - timestamp: proposalStart.toString(), - endTimestamp: proposalEnd.toString(), - status: 'ACTIVE' - } as ProposalOnChain; + startTime: proposalStart, + endTime: proposalEnd, + }; await trigger.process([proposal]); @@ -113,13 +125,14 @@ describe('VotingReminderTrigger', () => { }); it('should skip proposals without required timestamps', async () => { - const proposal: ProposalOnChain = { + const proposal: VotingReminderProposal = { id: 'proposal-123', daoId: 'test-dao', description: 'Test proposal without timestamps', - status: 'ACTIVE' - // Missing startTimestamp and endTimestamp - } as ProposalOnChain; + startTime: 0, + endTime: 0, + // Missing valid startTime and endTime (0 is falsy) + }; await trigger.process([proposal]); @@ -129,15 +142,14 @@ describe('VotingReminderTrigger', () => { it('should skip proposals that have already ended', async () => { const proposalStart = baseTime - 7200; // Started 2 hours ago const proposalEnd = baseTime - 1800; // Ended 30 minutes ago - - const proposal: ProposalOnChain = { + + const proposal: VotingReminderProposal = { id: 'proposal-123', daoId: 'test-dao', description: 'Test proposal that ended', - timestamp: proposalStart.toString(), - endTimestamp: proposalEnd.toString(), - status: 'ACTIVE' - } as ProposalOnChain; + startTime: proposalStart, + endTime: proposalEnd, + }; await trigger.process([proposal]); @@ -147,15 +159,14 @@ describe('VotingReminderTrigger', () => { it('should skip proposals that have not started yet', async () => { const proposalStart = baseTime + 3600; // Starts in 1 hour const proposalEnd = baseTime + 7200; // Ends in 2 hours - - const proposal: ProposalOnChain = { + + const proposal: VotingReminderProposal = { id: 'proposal-123', daoId: 'test-dao', description: 'Test proposal that has not started', - timestamp: proposalStart.toString(), - endTimestamp: proposalEnd.toString(), - status: 'ACTIVE' - } as ProposalOnChain; + startTime: proposalStart, + endTime: proposalEnd, + }; await trigger.process([proposal]); @@ -164,21 +175,14 @@ describe('VotingReminderTrigger', () => { }); describe('fetchData', () => { - it('should fetch active proposals without timestamp filter', async () => { - const proposals = [ - { id: 'prop-1', status: 'ACTIVE' }, - { id: 'prop-2', status: 'ACTIVE' } - ] as ProposalOnChain[]; - - mockProposalRepository.listAll.mockResolvedValue(proposals); - + it('should fetch active proposals from data source', async () => { + const proposals: VotingReminderProposal[] = [ + { id: 'prop-1', daoId: 'dao-1', startTime: 1000, endTime: 2000 }, + { id: 'prop-2', daoId: 'dao-1', startTime: 1000, endTime: 2000 } + ]; + mockDataSource.listActiveForReminder.mockResolvedValue(proposals); const result = await trigger['fetchData'](); - - // Should only filter by status ACTIVE, no fromDate - expect(mockProposalRepository.listAll).toHaveBeenCalledWith({ - status: 'ACTIVE', - includeOptimisticProposals: false - }); + expect(mockDataSource.listActiveForReminder).toHaveBeenCalled(); expect(result).toEqual(proposals); }); }); @@ -188,11 +192,11 @@ describe('VotingReminderTrigger', () => { const startTime = 1000; const endTime = 2000; const currentTime = 1500; - + // Use reflection to access private method for testing const calculateTime = (trigger as any).calculateTimeElapsedPercentage; const percentage = calculateTime(startTime, endTime, currentTime); - + expect(percentage).toBe(50); // 50% elapsed }); @@ -200,10 +204,10 @@ describe('VotingReminderTrigger', () => { const startTime = 2000; const endTime = 3000; const currentTime = 1000; - + const calculateTime = (trigger as any).calculateTimeElapsedPercentage; const percentage = calculateTime(startTime, endTime, currentTime); - + expect(percentage).toBe(0); }); @@ -211,11 +215,11 @@ describe('VotingReminderTrigger', () => { const startTime = 1000; const endTime = 2000; const currentTime = 3000; - + const calculateTime = (trigger as any).calculateTimeElapsedPercentage; const percentage = calculateTime(startTime, endTime, currentTime); - + expect(percentage).toBe(100); }); }); -}); \ No newline at end of file +}); diff --git a/apps/subscription-server/package.json b/apps/subscription-server/package.json index 0942343f..16c462d7 100644 --- a/apps/subscription-server/package.json +++ b/apps/subscription-server/package.json @@ -19,11 +19,13 @@ "license": "ISC", "description": "", "dependencies": { + "@anticapture/observability": "^1.0.0", "@fastify/cors": "^11.0.1", "@fastify/swagger": "^9.5.0", "@fastify/swagger-ui": "^5.2.2", "@jest/globals": "^29.7.0", "@notification-system/messages": "workspace:*", + "@opentelemetry/api": "^1.9.0", "@slack/web-api": "^6.13.0", "@types/uuid": "^9.0.0", "axios": "^1.9.0", diff --git a/apps/subscription-server/src/app.ts b/apps/subscription-server/src/app.ts index 33057fca..600fae0a 100644 --- a/apps/subscription-server/src/app.ts +++ b/apps/subscription-server/src/app.ts @@ -9,6 +9,10 @@ import { DaoController, NotificationController } from './controllers'; import { UserAddressController } from './controllers/user-address.controller'; import { SlackOAuthController } from './controllers/slack-oauth.controller'; import { SettingsController } from './controllers/settings.controller'; +import { createLogger, collectPrometheusMetrics } from '@anticapture/observability'; +import { exporter } from './instrumentation'; + +const logger = createLogger('subscription-server'); export class App { private server: FastifyInstance; @@ -29,9 +33,17 @@ export class App { this.server = fastify(); this.setupFastify(); + this.setupMetricsRoute(); this.setupRoutes(); } + private setupMetricsRoute(): void { + this.server.get('/metrics', async (_req, reply) => { + const { body, contentType } = await collectPrometheusMetrics(exporter); + return reply.type(contentType).send(body); + }); + } + private setupFastify(): void { this.server.setValidatorCompiler(validatorCompiler); this.server.setSerializerCompiler(serializerCompiler); @@ -41,7 +53,7 @@ export class App { }); this.server.setErrorHandler((error, request, reply) => { - console.error(`Error occurred: ${error.message}`); + logger.error({ err: error, method: request.method, path: request.url }, 'request failed'); return reply.code(error.statusCode || 500).send({ message: error.message || 'Internal server error', error: error.stack || 'Unknown error' @@ -75,7 +87,7 @@ export class App { async start(): Promise { await this.server.listen({ port: this.port, host: '0.0.0.0' }); - console.log(`HTTP server running on port ${this.port}!`); + logger.info({ port: this.port }, 'subscription-server listening'); } async stop(): Promise { diff --git a/apps/subscription-server/src/controllers/slack-oauth.controller.ts b/apps/subscription-server/src/controllers/slack-oauth.controller.ts index 47ac96b8..92a54b8e 100644 --- a/apps/subscription-server/src/controllers/slack-oauth.controller.ts +++ b/apps/subscription-server/src/controllers/slack-oauth.controller.ts @@ -1,6 +1,7 @@ import { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify'; import { WebClient } from '@slack/web-api'; import { WorkspaceService, WorkspaceData } from '../services/workspace.service'; +import { createLogger, type Logger } from '@anticapture/observability'; /** * Controller handling Slack OAuth flow @@ -8,14 +9,17 @@ import { WorkspaceService, WorkspaceData } from '../services/workspace.service'; */ export class SlackOAuthController { private slackClient: WebClient; + private readonly logger: Logger; constructor( private workspaceService: WorkspaceService, private slackClientId: string, private slackClientSecret: string, - private slackRedirectUri: string + private slackRedirectUri: string, + logger: Logger = createLogger('subscription-server'), ) { this.slackClient = new WebClient(); + this.logger = logger.child({ component: 'SlackOAuthController' }); } /** @@ -118,7 +122,7 @@ export class SlackOAuthController { .send(successHtml); } catch (error) { - console.error('OAuth error:', error); + this.logger.error({ err: error, event: 'slack_oauth.callback_failed' }, 'slack oauth error'); const errorHtml = this.generateErrorPage(error instanceof Error ? error.message : 'Unknown error'); @@ -190,7 +194,10 @@ export class SlackOAuthController { } }); } catch (error) { - console.error(`Error fetching installation for workspace ${workspaceId}:`, error); + this.logger.error( + { err: error, workspaceId, event: 'slack_oauth.installation_fetch_failed' }, + 'error fetching workspace installation', + ); return reply.code(500).send({ error: 'Failed to fetch workspace installation' }); diff --git a/apps/subscription-server/src/index.ts b/apps/subscription-server/src/index.ts index 9cc44c87..aee0958d 100644 --- a/apps/subscription-server/src/index.ts +++ b/apps/subscription-server/src/index.ts @@ -1,5 +1,10 @@ +import './instrumentation'; + import Knex from 'knex'; import { App } from './app'; +import { createLogger, wrapWithTracing } from '@anticapture/observability'; + +const logger = createLogger('subscription-server'); import { loadConfig } from './config'; import { DaoController, NotificationController } from './controllers'; import { UserAddressController } from './controllers/user-address.controller'; @@ -21,21 +26,21 @@ const db = Knex({ }); // Repository instances -const userRepository = new KnexUserRepository(db, config.tokenEncryptionKey); -const preferenceRepository = new KnexPreferenceRepository(db); -const notificationRepository = new KnexNotificationRepository(db); -const userAddressRepository = new KnexUserAddressRepository(db); -const notificationPrefsRepository = new UserNotificationPreferencesRepository(db); +const userRepository = wrapWithTracing(new KnexUserRepository(db, config.tokenEncryptionKey, logger)); +const preferenceRepository = wrapWithTracing(new KnexPreferenceRepository(db)); +const notificationRepository = wrapWithTracing(new KnexNotificationRepository(db)); +const userAddressRepository = wrapWithTracing(new KnexUserAddressRepository(db)); +const notificationPrefsRepository = wrapWithTracing(new UserNotificationPreferencesRepository(db)); // Service instances -const workspaceService = new WorkspaceService(db, config.tokenEncryptionKey); -const subscriptionService = new SubscriptionService(userRepository, preferenceRepository, userAddressRepository, notificationPrefsRepository); -const notificationService = new NotificationService(notificationRepository); -const settingsService = new SettingsService(notificationPrefsRepository); +const workspaceService = wrapWithTracing(new WorkspaceService(db, config.tokenEncryptionKey)); +const subscriptionService = wrapWithTracing(new SubscriptionService(userRepository, preferenceRepository, userAddressRepository, notificationPrefsRepository)); +const notificationService = wrapWithTracing(new NotificationService(notificationRepository)); +const settingsService = wrapWithTracing(new SettingsService(notificationPrefsRepository)); // Handler instances -const daoHandler = new DaoHandler(subscriptionService); -const settingsHandler = new SettingsHandler(settingsService, userRepository); +const daoHandler = wrapWithTracing(new DaoHandler(subscriptionService)); +const settingsHandler = wrapWithTracing(new SettingsHandler(settingsService, userRepository)); // Controller instances const daoController = new DaoController(daoHandler); @@ -46,7 +51,8 @@ const slackOAuthController = new SlackOAuthController( workspaceService, config.slackClientId, config.slackClientSecret, - config.slackRedirectUri + config.slackRedirectUri, + logger, ); const app = new App( @@ -60,5 +66,10 @@ const app = new App( ); (async () => { - await app.start(); + try { + await app.start(); + } catch (err) { + logger.error({ err }, 'subscription-server failed to start'); + process.exit(1); + } })(); \ No newline at end of file diff --git a/apps/subscription-server/src/instrumentation.ts b/apps/subscription-server/src/instrumentation.ts new file mode 100644 index 00000000..9a6f0c1d --- /dev/null +++ b/apps/subscription-server/src/instrumentation.ts @@ -0,0 +1,5 @@ +import { createObservabilityProvider } from '@anticapture/observability'; + +const observability = createObservabilityProvider('subscription-server'); + +export const exporter = observability.exporter; diff --git a/apps/subscription-server/src/repositories/knex.repository.ts b/apps/subscription-server/src/repositories/knex.repository.ts index a11870b7..5e22ba52 100644 --- a/apps/subscription-server/src/repositories/knex.repository.ts +++ b/apps/subscription-server/src/repositories/knex.repository.ts @@ -8,16 +8,22 @@ import { v4 as uuidv4 } from 'uuid'; import { IUserRepository, IPreferenceRepository, INotificationRepository, User, UserPreference, Notification } from '../interfaces'; import { IUserAddressRepository, UserAddress } from '../interfaces/user-address.interface'; import { CryptoUtil } from '../utils/crypto'; +import { createLogger, type Logger } from '@anticapture/observability'; /** * User repository implementation using Knex * Handles all user-related database operations */ export class KnexUserRepository implements IUserRepository { + private readonly logger: Logger; + constructor( private readonly knex: Knex, - private readonly tokenEncryptionKey?: string - ) {} + private readonly tokenEncryptionKey?: string, + logger: Logger = createLogger('subscription-server'), + ) { + this.logger = logger.child({ component: 'KnexUserRepository' }); + } /** * Finds a user by their channel and channel-specific user ID @@ -102,7 +108,10 @@ export class KnexUserRepository implements IUserRepository { try { user.token = CryptoUtil.decrypt(encrypted_token, this.tokenEncryptionKey!); } catch (error) { - console.error(`Failed to decrypt token for user ${user.id}:`, error); + this.logger.error( + { err: error, userId: user.id, event: 'token.decrypt_failed' }, + 'failed to decrypt workspace token', + ); } } return user; diff --git a/package.json b/package.json index fad4274d..127d92ed 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "devDependencies": { "@types/pg": "^8.15.5", "pg": "^8.16.3", + "pino-pretty": "^13.1.3", "ts-node": "^10.9.2", "turbo": "^2.5.5", "typescript": "5.8.2" @@ -28,5 +29,10 @@ "packageManager": "pnpm@10.14.0", "engines": { "node": ">=18" + }, + "pnpm": { + "onlyBuiltDependencies": [ + "sqlite3" + ] } } diff --git a/packages/anticapture-client/dist/anticapture-client.d.ts b/packages/anticapture-client/dist/anticapture-client.d.ts index 5a5c22a4..17068316 100644 --- a/packages/anticapture-client/dist/anticapture-client.d.ts +++ b/packages/anticapture-client/dist/anticapture-client.d.ts @@ -1,11 +1,11 @@ import { AxiosInstance } from 'axios'; import { z } from 'zod'; -import type { GetProposalByIdQuery, ListProposalsQuery, ListProposalsQueryVariables, ListHistoricalVotingPowerQueryVariables, ListVotesQuery, ListVotesQueryVariables, ListOffchainProposalsQueryVariables, ListOffchainVotesQueryVariables } from './gql/graphql'; -import { SafeProposalNonVotersResponseSchema, ProcessedVotingPowerHistory, FeedEventType, FeedRelevance, OffchainProposalItem, OffchainVoteItem } from './schemas'; +import type { GetProposalByIdQuery, ListProposalsQuery, ListProposalsQueryVariables, ListHistoricalVotingPowerQueryVariables, ListVotesQueryVariables, ListOffchainProposalsQueryVariables, ListOffchainVotesQueryVariables } from './gql/graphql'; +import { SafeVotesResponseSchema, SafeProposalNonVotersResponseSchema, ProcessedVotingPowerHistory, FeedEventType, FeedRelevance, OffchainProposalItem, OffchainVoteItem } from './schemas'; type ProposalItems = NonNullable['items']; type VotingPowerHistoryItems = ProcessedVotingPowerHistory[]; type ProposalNonVoter = z.infer['proposalNonVoters']['items'][0]; -type VoteItem = NonNullable['items'][0]>; +type VoteItem = z.infer['votes']['items'][0]; export type VoteWithDaoId = VoteItem & { daoId: string; }; @@ -72,6 +72,16 @@ export declare class AnticaptureClient { * @returns List of non-voters with their voting power details */ getProposalNonVoters(proposalId: string, daoId: string, addresses?: string[]): Promise; + /** + * Fetches addresses that haven't voted on a specific offchain (Snapshot) proposal + * @param proposalId The Snapshot proposal ID to check + * @param addresses Optional array of addresses to filter by + * @returns List of non-voters + */ + getOffchainProposalNonVoters(proposalId: string, addresses?: string[]): Promise<{ + voter: string; + votingPower?: string; + }[]>; /** * List recent votes from all DAOs since a given timestamp * @param timestampGt Fetch votes with timestamp greater than this value (unix timestamp as string) diff --git a/packages/anticapture-client/dist/anticapture-client.js b/packages/anticapture-client/dist/anticapture-client.js index 3950edd5..6ade71fa 100644 --- a/packages/anticapture-client/dist/anticapture-client.js +++ b/packages/anticapture-client/dist/anticapture-client.js @@ -172,10 +172,10 @@ class AnticaptureClient { } // Sort globally by timestamp desc (most recent first) if (variables?.fromEndDate) { - allProposals.sort((a, b) => parseInt(b?.endTimestamp || '0') - parseInt(a?.endTimestamp || '0')); + allProposals.sort((a, b) => (b?.endTimestamp ?? 0) - (a?.endTimestamp ?? 0)); } else { - allProposals.sort((a, b) => parseInt(b?.timestamp || '0') - parseInt(a?.timestamp || '0') || 0); + allProposals.sort((a, b) => (b?.timestamp ?? 0) - (a?.timestamp ?? 0)); } return allProposals; } @@ -228,7 +228,7 @@ class AnticaptureClient { async listVotes(daoId, variables) { try { const validated = await this.query(graphql_2.ListVotesDocument, schemas_1.SafeVotesResponseSchema, variables, daoId); - return validated.votes.items.filter(item => item !== null); + return validated.votes.items; } catch (error) { console.warn(`Error fetching votes for DAO ${daoId}:`, error); @@ -257,6 +257,27 @@ class AnticaptureClient { return []; } } + /** + * Fetches addresses that haven't voted on a specific offchain (Snapshot) proposal + * @param proposalId The Snapshot proposal ID to check + * @param addresses Optional array of addresses to filter by + * @returns List of non-voters + */ + async getOffchainProposalNonVoters(proposalId, addresses) { + try { + const variables = { + id: proposalId, + ...(addresses && { addresses }), + orderDirection: graphql_2.OrderDirection.Desc, + }; + const validated = await this.query(graphql_2.OffchainProposalNonVotersDocument, schemas_1.SafeOffchainProposalNonVotersResponseSchema, variables); + return validated.offchainProposalNonVoters.items; + } + catch (error) { + console.warn(`Error fetching offchain non-voters for proposal ${proposalId}:`, error); + return []; + } + } /** * List recent votes from all DAOs since a given timestamp * @param timestampGt Fetch votes with timestamp greater than this value (unix timestamp as string) @@ -273,7 +294,7 @@ class AnticaptureClient { fromDate: parseInt(timestampGt), limit, orderBy: graphql_2.QueryInput_Votes_OrderBy.Timestamp, - orderDirection: graphql_2.QueryInput_Votes_OrderDirection.Asc + orderDirection: graphql_2.OrderDirection.Asc }); // Add daoId to each vote return votes.map(vote => ({ @@ -380,7 +401,7 @@ class AnticaptureClient { fromDate, limit, orderBy: graphql_2.QueryInput_VotesOffchain_OrderBy.Timestamp, - orderDirection: graphql_2.QueryInput_VotesOffchain_OrderDirection.Asc + orderDirection: graphql_2.OrderDirection.Asc }); return votes.map(vote => ({ ...vote, diff --git a/packages/anticapture-client/dist/gql/gql.d.ts b/packages/anticapture-client/dist/gql/gql.d.ts index 84696ea7..a7504e37 100644 --- a/packages/anticapture-client/dist/gql/gql.d.ts +++ b/packages/anticapture-client/dist/gql/gql.d.ts @@ -13,13 +13,14 @@ import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document- */ type Documents = { "query GetDAOs {\n daos {\n items {\n id\n votingDelay\n chainId\n alreadySupportCalldataReview\n supportOffchainData\n }\n }\n}": typeof types.GetDaOsDocument; - "query ListOffchainProposals($skip: NonNegativeInt, $limit: PositiveInt, $orderDirection: queryInput_offchainProposals_orderDirection, $status: JSON, $fromDate: Float, $endDate: Float) {\n offchainProposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n endDate: $endDate\n ) {\n items {\n id\n title\n discussion\n link\n state\n created\n end\n }\n totalCount\n }\n}": typeof types.ListOffchainProposalsDocument; - "query ListOffchainVotes($fromDate: Float, $toDate: Float, $limit: Float, $skip: NonNegativeInt, $orderBy: queryInput_votesOffchain_orderBy, $orderDirection: queryInput_votesOffchain_orderDirection, $voterAddresses: JSON) {\n votesOffchain(\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n voterAddresses: $voterAddresses\n ) {\n items {\n voter\n created\n proposalId\n proposalTitle\n reason\n vp\n }\n totalCount\n }\n}": typeof types.ListOffchainVotesDocument; - "query ProposalNonVoters($id: String!, $addresses: JSON) {\n proposalNonVoters(id: $id, addresses: $addresses) {\n items {\n voter\n }\n }\n}": typeof types.ProposalNonVotersDocument; - "query GetProposalById($id: String!) {\n proposal(id: $id) {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n}\n\nquery ListProposals($skip: NonNegativeInt, $limit: PositiveInt, $orderDirection: queryInput_proposals_orderDirection, $status: JSON, $fromDate: Float, $fromEndDate: Float, $includeOptimisticProposals: queryInput_proposals_includeOptimisticProposals) {\n proposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n fromEndDate: $fromEndDate\n includeOptimisticProposals: $includeOptimisticProposals\n ) {\n items {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n totalCount\n }\n}": typeof types.GetProposalByIdDocument; - "query GetEventRelevanceThreshold($relevance: queryInput_getEventRelevanceThreshold_relevance!, $type: queryInput_getEventRelevanceThreshold_type!) {\n getEventRelevanceThreshold(relevance: $relevance, type: $type) {\n threshold\n }\n}": typeof types.GetEventRelevanceThresholdDocument; - "query ListVotes($voterAddressIn: JSON, $fromDate: Float, $toDate: Float, $limit: Float, $skip: NonNegativeInt, $orderBy: queryInput_votes_orderBy, $orderDirection: queryInput_votes_orderDirection, $support: Float) {\n votes(\n voterAddressIn: $voterAddressIn\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n support: $support\n ) {\n items {\n transactionHash\n proposalId\n voterAddress\n support\n votingPower\n timestamp\n reason\n proposalTitle\n }\n totalCount\n }\n}": typeof types.ListVotesDocument; - "query ListHistoricalVotingPower($limit: PositiveInt, $skip: NonNegativeInt, $orderBy: queryInput_historicalVotingPower_orderBy, $orderDirection: queryInput_historicalVotingPower_orderDirection, $fromDate: String, $address: String) {\n historicalVotingPower(\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n fromDate: $fromDate\n address: $address\n ) {\n items {\n accountId\n timestamp\n votingPower\n delta\n daoId\n transactionHash\n logIndex\n delegation {\n from\n to\n value\n previousDelegate\n }\n transfer {\n from\n to\n value\n }\n }\n totalCount\n }\n}": typeof types.ListHistoricalVotingPowerDocument; + "query OffchainProposalNonVoters($id: String!, $addresses: [String], $orderDirection: OrderDirection) {\n offchainProposalNonVoters(\n id: $id\n addresses: $addresses\n orderDirection: $orderDirection\n ) {\n ... on OffchainVotersResponse {\n items {\n voter\n votingPower\n }\n }\n }\n}": typeof types.OffchainProposalNonVotersDocument; + "query ListOffchainProposals($skip: Int, $limit: Int, $orderDirection: OrderDirection, $status: [queryInput_offchainProposals_status_items], $fromDate: Int, $endDate: Int) {\n offchainProposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n endDate: $endDate\n ) {\n items {\n id\n title\n discussion\n link\n state\n created\n end\n }\n totalCount\n }\n}": typeof types.ListOffchainProposalsDocument; + "query ListOffchainVotes($fromDate: Int, $toDate: Int, $limit: Int, $skip: Int, $orderBy: queryInput_votesOffchain_orderBy, $orderDirection: OrderDirection, $voterAddresses: [String]) {\n votesOffchain(\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n voterAddresses: $voterAddresses\n ) {\n items {\n voter\n created\n proposalId\n proposalTitle\n reason\n vp\n }\n totalCount\n }\n}": typeof types.ListOffchainVotesDocument; + "query ProposalNonVoters($id: String!, $addresses: [String]) {\n proposalNonVoters(id: $id, addresses: $addresses) {\n items {\n voter\n }\n }\n}": typeof types.ProposalNonVotersDocument; + "query GetProposalById($id: String!) {\n proposal(id: $id) {\n ... on OnchainProposal {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n }\n}\n\nquery ListProposals($skip: Int, $limit: Int, $orderDirection: OrderDirection, $status: [queryInput_proposals_status_items], $fromDate: Int, $fromEndDate: Int, $includeOptimisticProposals: Boolean) {\n proposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n fromEndDate: $fromEndDate\n includeOptimisticProposals: $includeOptimisticProposals\n ) {\n items {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n totalCount\n }\n}": typeof types.GetProposalByIdDocument; + "query GetEventRelevanceThreshold($relevance: FeedRelevance!, $type: FeedEventType!) {\n getEventRelevanceThreshold(relevance: $relevance, type: $type) {\n threshold\n }\n}": typeof types.GetEventRelevanceThresholdDocument; + "query ListVotes($voterAddressIn: [String], $fromDate: Int, $toDate: Int, $limit: Int, $skip: Int, $orderBy: queryInput_votes_orderBy, $orderDirection: OrderDirection, $support: String) {\n votes(\n voterAddressIn: $voterAddressIn\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n support: $support\n ) {\n items {\n transactionHash\n proposalId\n voterAddress\n support\n votingPower\n timestamp\n reason\n proposalTitle\n }\n totalCount\n }\n}": typeof types.ListVotesDocument; + "query ListHistoricalVotingPower($limit: Int, $skip: Int, $orderBy: queryInput_historicalVotingPower_orderBy, $orderDirection: OrderDirection, $fromDate: Int, $address: String) {\n historicalVotingPower(\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n fromDate: $fromDate\n address: $address\n ) {\n items {\n accountId\n timestamp\n votingPower\n delta\n daoId\n transactionHash\n logIndex\n delegation {\n from\n to\n value\n previousDelegate\n }\n transfer {\n from\n to\n value\n }\n }\n totalCount\n }\n}": typeof types.ListHistoricalVotingPowerDocument; }; declare const documents: Documents; /** @@ -42,30 +43,34 @@ export declare function graphql(source: "query GetDAOs {\n daos {\n items {\ /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export declare function graphql(source: "query ListOffchainProposals($skip: NonNegativeInt, $limit: PositiveInt, $orderDirection: queryInput_offchainProposals_orderDirection, $status: JSON, $fromDate: Float, $endDate: Float) {\n offchainProposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n endDate: $endDate\n ) {\n items {\n id\n title\n discussion\n link\n state\n created\n end\n }\n totalCount\n }\n}"): (typeof documents)["query ListOffchainProposals($skip: NonNegativeInt, $limit: PositiveInt, $orderDirection: queryInput_offchainProposals_orderDirection, $status: JSON, $fromDate: Float, $endDate: Float) {\n offchainProposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n endDate: $endDate\n ) {\n items {\n id\n title\n discussion\n link\n state\n created\n end\n }\n totalCount\n }\n}"]; +export declare function graphql(source: "query OffchainProposalNonVoters($id: String!, $addresses: [String], $orderDirection: OrderDirection) {\n offchainProposalNonVoters(\n id: $id\n addresses: $addresses\n orderDirection: $orderDirection\n ) {\n ... on OffchainVotersResponse {\n items {\n voter\n votingPower\n }\n }\n }\n}"): (typeof documents)["query OffchainProposalNonVoters($id: String!, $addresses: [String], $orderDirection: OrderDirection) {\n offchainProposalNonVoters(\n id: $id\n addresses: $addresses\n orderDirection: $orderDirection\n ) {\n ... on OffchainVotersResponse {\n items {\n voter\n votingPower\n }\n }\n }\n}"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export declare function graphql(source: "query ListOffchainVotes($fromDate: Float, $toDate: Float, $limit: Float, $skip: NonNegativeInt, $orderBy: queryInput_votesOffchain_orderBy, $orderDirection: queryInput_votesOffchain_orderDirection, $voterAddresses: JSON) {\n votesOffchain(\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n voterAddresses: $voterAddresses\n ) {\n items {\n voter\n created\n proposalId\n proposalTitle\n reason\n vp\n }\n totalCount\n }\n}"): (typeof documents)["query ListOffchainVotes($fromDate: Float, $toDate: Float, $limit: Float, $skip: NonNegativeInt, $orderBy: queryInput_votesOffchain_orderBy, $orderDirection: queryInput_votesOffchain_orderDirection, $voterAddresses: JSON) {\n votesOffchain(\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n voterAddresses: $voterAddresses\n ) {\n items {\n voter\n created\n proposalId\n proposalTitle\n reason\n vp\n }\n totalCount\n }\n}"]; +export declare function graphql(source: "query ListOffchainProposals($skip: Int, $limit: Int, $orderDirection: OrderDirection, $status: [queryInput_offchainProposals_status_items], $fromDate: Int, $endDate: Int) {\n offchainProposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n endDate: $endDate\n ) {\n items {\n id\n title\n discussion\n link\n state\n created\n end\n }\n totalCount\n }\n}"): (typeof documents)["query ListOffchainProposals($skip: Int, $limit: Int, $orderDirection: OrderDirection, $status: [queryInput_offchainProposals_status_items], $fromDate: Int, $endDate: Int) {\n offchainProposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n endDate: $endDate\n ) {\n items {\n id\n title\n discussion\n link\n state\n created\n end\n }\n totalCount\n }\n}"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export declare function graphql(source: "query ProposalNonVoters($id: String!, $addresses: JSON) {\n proposalNonVoters(id: $id, addresses: $addresses) {\n items {\n voter\n }\n }\n}"): (typeof documents)["query ProposalNonVoters($id: String!, $addresses: JSON) {\n proposalNonVoters(id: $id, addresses: $addresses) {\n items {\n voter\n }\n }\n}"]; +export declare function graphql(source: "query ListOffchainVotes($fromDate: Int, $toDate: Int, $limit: Int, $skip: Int, $orderBy: queryInput_votesOffchain_orderBy, $orderDirection: OrderDirection, $voterAddresses: [String]) {\n votesOffchain(\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n voterAddresses: $voterAddresses\n ) {\n items {\n voter\n created\n proposalId\n proposalTitle\n reason\n vp\n }\n totalCount\n }\n}"): (typeof documents)["query ListOffchainVotes($fromDate: Int, $toDate: Int, $limit: Int, $skip: Int, $orderBy: queryInput_votesOffchain_orderBy, $orderDirection: OrderDirection, $voterAddresses: [String]) {\n votesOffchain(\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n voterAddresses: $voterAddresses\n ) {\n items {\n voter\n created\n proposalId\n proposalTitle\n reason\n vp\n }\n totalCount\n }\n}"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export declare function graphql(source: "query GetProposalById($id: String!) {\n proposal(id: $id) {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n}\n\nquery ListProposals($skip: NonNegativeInt, $limit: PositiveInt, $orderDirection: queryInput_proposals_orderDirection, $status: JSON, $fromDate: Float, $fromEndDate: Float, $includeOptimisticProposals: queryInput_proposals_includeOptimisticProposals) {\n proposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n fromEndDate: $fromEndDate\n includeOptimisticProposals: $includeOptimisticProposals\n ) {\n items {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n totalCount\n }\n}"): (typeof documents)["query GetProposalById($id: String!) {\n proposal(id: $id) {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n}\n\nquery ListProposals($skip: NonNegativeInt, $limit: PositiveInt, $orderDirection: queryInput_proposals_orderDirection, $status: JSON, $fromDate: Float, $fromEndDate: Float, $includeOptimisticProposals: queryInput_proposals_includeOptimisticProposals) {\n proposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n fromEndDate: $fromEndDate\n includeOptimisticProposals: $includeOptimisticProposals\n ) {\n items {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n totalCount\n }\n}"]; +export declare function graphql(source: "query ProposalNonVoters($id: String!, $addresses: [String]) {\n proposalNonVoters(id: $id, addresses: $addresses) {\n items {\n voter\n }\n }\n}"): (typeof documents)["query ProposalNonVoters($id: String!, $addresses: [String]) {\n proposalNonVoters(id: $id, addresses: $addresses) {\n items {\n voter\n }\n }\n}"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export declare function graphql(source: "query GetEventRelevanceThreshold($relevance: queryInput_getEventRelevanceThreshold_relevance!, $type: queryInput_getEventRelevanceThreshold_type!) {\n getEventRelevanceThreshold(relevance: $relevance, type: $type) {\n threshold\n }\n}"): (typeof documents)["query GetEventRelevanceThreshold($relevance: queryInput_getEventRelevanceThreshold_relevance!, $type: queryInput_getEventRelevanceThreshold_type!) {\n getEventRelevanceThreshold(relevance: $relevance, type: $type) {\n threshold\n }\n}"]; +export declare function graphql(source: "query GetProposalById($id: String!) {\n proposal(id: $id) {\n ... on OnchainProposal {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n }\n}\n\nquery ListProposals($skip: Int, $limit: Int, $orderDirection: OrderDirection, $status: [queryInput_proposals_status_items], $fromDate: Int, $fromEndDate: Int, $includeOptimisticProposals: Boolean) {\n proposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n fromEndDate: $fromEndDate\n includeOptimisticProposals: $includeOptimisticProposals\n ) {\n items {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n totalCount\n }\n}"): (typeof documents)["query GetProposalById($id: String!) {\n proposal(id: $id) {\n ... on OnchainProposal {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n }\n}\n\nquery ListProposals($skip: Int, $limit: Int, $orderDirection: OrderDirection, $status: [queryInput_proposals_status_items], $fromDate: Int, $fromEndDate: Int, $includeOptimisticProposals: Boolean) {\n proposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n fromEndDate: $fromEndDate\n includeOptimisticProposals: $includeOptimisticProposals\n ) {\n items {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n totalCount\n }\n}"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export declare function graphql(source: "query ListVotes($voterAddressIn: JSON, $fromDate: Float, $toDate: Float, $limit: Float, $skip: NonNegativeInt, $orderBy: queryInput_votes_orderBy, $orderDirection: queryInput_votes_orderDirection, $support: Float) {\n votes(\n voterAddressIn: $voterAddressIn\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n support: $support\n ) {\n items {\n transactionHash\n proposalId\n voterAddress\n support\n votingPower\n timestamp\n reason\n proposalTitle\n }\n totalCount\n }\n}"): (typeof documents)["query ListVotes($voterAddressIn: JSON, $fromDate: Float, $toDate: Float, $limit: Float, $skip: NonNegativeInt, $orderBy: queryInput_votes_orderBy, $orderDirection: queryInput_votes_orderDirection, $support: Float) {\n votes(\n voterAddressIn: $voterAddressIn\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n support: $support\n ) {\n items {\n transactionHash\n proposalId\n voterAddress\n support\n votingPower\n timestamp\n reason\n proposalTitle\n }\n totalCount\n }\n}"]; +export declare function graphql(source: "query GetEventRelevanceThreshold($relevance: FeedRelevance!, $type: FeedEventType!) {\n getEventRelevanceThreshold(relevance: $relevance, type: $type) {\n threshold\n }\n}"): (typeof documents)["query GetEventRelevanceThreshold($relevance: FeedRelevance!, $type: FeedEventType!) {\n getEventRelevanceThreshold(relevance: $relevance, type: $type) {\n threshold\n }\n}"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export declare function graphql(source: "query ListHistoricalVotingPower($limit: PositiveInt, $skip: NonNegativeInt, $orderBy: queryInput_historicalVotingPower_orderBy, $orderDirection: queryInput_historicalVotingPower_orderDirection, $fromDate: String, $address: String) {\n historicalVotingPower(\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n fromDate: $fromDate\n address: $address\n ) {\n items {\n accountId\n timestamp\n votingPower\n delta\n daoId\n transactionHash\n logIndex\n delegation {\n from\n to\n value\n previousDelegate\n }\n transfer {\n from\n to\n value\n }\n }\n totalCount\n }\n}"): (typeof documents)["query ListHistoricalVotingPower($limit: PositiveInt, $skip: NonNegativeInt, $orderBy: queryInput_historicalVotingPower_orderBy, $orderDirection: queryInput_historicalVotingPower_orderDirection, $fromDate: String, $address: String) {\n historicalVotingPower(\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n fromDate: $fromDate\n address: $address\n ) {\n items {\n accountId\n timestamp\n votingPower\n delta\n daoId\n transactionHash\n logIndex\n delegation {\n from\n to\n value\n previousDelegate\n }\n transfer {\n from\n to\n value\n }\n }\n totalCount\n }\n}"]; +export declare function graphql(source: "query ListVotes($voterAddressIn: [String], $fromDate: Int, $toDate: Int, $limit: Int, $skip: Int, $orderBy: queryInput_votes_orderBy, $orderDirection: OrderDirection, $support: String) {\n votes(\n voterAddressIn: $voterAddressIn\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n support: $support\n ) {\n items {\n transactionHash\n proposalId\n voterAddress\n support\n votingPower\n timestamp\n reason\n proposalTitle\n }\n totalCount\n }\n}"): (typeof documents)["query ListVotes($voterAddressIn: [String], $fromDate: Int, $toDate: Int, $limit: Int, $skip: Int, $orderBy: queryInput_votes_orderBy, $orderDirection: OrderDirection, $support: String) {\n votes(\n voterAddressIn: $voterAddressIn\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n support: $support\n ) {\n items {\n transactionHash\n proposalId\n voterAddress\n support\n votingPower\n timestamp\n reason\n proposalTitle\n }\n totalCount\n }\n}"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export declare function graphql(source: "query ListHistoricalVotingPower($limit: Int, $skip: Int, $orderBy: queryInput_historicalVotingPower_orderBy, $orderDirection: OrderDirection, $fromDate: Int, $address: String) {\n historicalVotingPower(\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n fromDate: $fromDate\n address: $address\n ) {\n items {\n accountId\n timestamp\n votingPower\n delta\n daoId\n transactionHash\n logIndex\n delegation {\n from\n to\n value\n previousDelegate\n }\n transfer {\n from\n to\n value\n }\n }\n totalCount\n }\n}"): (typeof documents)["query ListHistoricalVotingPower($limit: Int, $skip: Int, $orderBy: queryInput_historicalVotingPower_orderBy, $orderDirection: OrderDirection, $fromDate: Int, $address: String) {\n historicalVotingPower(\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n fromDate: $fromDate\n address: $address\n ) {\n items {\n accountId\n timestamp\n votingPower\n delta\n daoId\n transactionHash\n logIndex\n delegation {\n from\n to\n value\n previousDelegate\n }\n transfer {\n from\n to\n value\n }\n }\n totalCount\n }\n}"]; export type DocumentType> = TDocumentNode extends DocumentNode ? TType : never; export {}; diff --git a/packages/anticapture-client/dist/gql/gql.js b/packages/anticapture-client/dist/gql/gql.js index 06200e73..b0f4bfe2 100644 --- a/packages/anticapture-client/dist/gql/gql.js +++ b/packages/anticapture-client/dist/gql/gql.js @@ -38,13 +38,14 @@ exports.graphql = graphql; const types = __importStar(require("./graphql")); const documents = { "query GetDAOs {\n daos {\n items {\n id\n votingDelay\n chainId\n alreadySupportCalldataReview\n supportOffchainData\n }\n }\n}": types.GetDaOsDocument, - "query ListOffchainProposals($skip: NonNegativeInt, $limit: PositiveInt, $orderDirection: queryInput_offchainProposals_orderDirection, $status: JSON, $fromDate: Float, $endDate: Float) {\n offchainProposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n endDate: $endDate\n ) {\n items {\n id\n title\n discussion\n link\n state\n created\n end\n }\n totalCount\n }\n}": types.ListOffchainProposalsDocument, - "query ListOffchainVotes($fromDate: Float, $toDate: Float, $limit: Float, $skip: NonNegativeInt, $orderBy: queryInput_votesOffchain_orderBy, $orderDirection: queryInput_votesOffchain_orderDirection, $voterAddresses: JSON) {\n votesOffchain(\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n voterAddresses: $voterAddresses\n ) {\n items {\n voter\n created\n proposalId\n proposalTitle\n reason\n vp\n }\n totalCount\n }\n}": types.ListOffchainVotesDocument, - "query ProposalNonVoters($id: String!, $addresses: JSON) {\n proposalNonVoters(id: $id, addresses: $addresses) {\n items {\n voter\n }\n }\n}": types.ProposalNonVotersDocument, - "query GetProposalById($id: String!) {\n proposal(id: $id) {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n}\n\nquery ListProposals($skip: NonNegativeInt, $limit: PositiveInt, $orderDirection: queryInput_proposals_orderDirection, $status: JSON, $fromDate: Float, $fromEndDate: Float, $includeOptimisticProposals: queryInput_proposals_includeOptimisticProposals) {\n proposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n fromEndDate: $fromEndDate\n includeOptimisticProposals: $includeOptimisticProposals\n ) {\n items {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n totalCount\n }\n}": types.GetProposalByIdDocument, - "query GetEventRelevanceThreshold($relevance: queryInput_getEventRelevanceThreshold_relevance!, $type: queryInput_getEventRelevanceThreshold_type!) {\n getEventRelevanceThreshold(relevance: $relevance, type: $type) {\n threshold\n }\n}": types.GetEventRelevanceThresholdDocument, - "query ListVotes($voterAddressIn: JSON, $fromDate: Float, $toDate: Float, $limit: Float, $skip: NonNegativeInt, $orderBy: queryInput_votes_orderBy, $orderDirection: queryInput_votes_orderDirection, $support: Float) {\n votes(\n voterAddressIn: $voterAddressIn\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n support: $support\n ) {\n items {\n transactionHash\n proposalId\n voterAddress\n support\n votingPower\n timestamp\n reason\n proposalTitle\n }\n totalCount\n }\n}": types.ListVotesDocument, - "query ListHistoricalVotingPower($limit: PositiveInt, $skip: NonNegativeInt, $orderBy: queryInput_historicalVotingPower_orderBy, $orderDirection: queryInput_historicalVotingPower_orderDirection, $fromDate: String, $address: String) {\n historicalVotingPower(\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n fromDate: $fromDate\n address: $address\n ) {\n items {\n accountId\n timestamp\n votingPower\n delta\n daoId\n transactionHash\n logIndex\n delegation {\n from\n to\n value\n previousDelegate\n }\n transfer {\n from\n to\n value\n }\n }\n totalCount\n }\n}": types.ListHistoricalVotingPowerDocument, + "query OffchainProposalNonVoters($id: String!, $addresses: [String], $orderDirection: OrderDirection) {\n offchainProposalNonVoters(\n id: $id\n addresses: $addresses\n orderDirection: $orderDirection\n ) {\n ... on OffchainVotersResponse {\n items {\n voter\n votingPower\n }\n }\n }\n}": types.OffchainProposalNonVotersDocument, + "query ListOffchainProposals($skip: Int, $limit: Int, $orderDirection: OrderDirection, $status: [queryInput_offchainProposals_status_items], $fromDate: Int, $endDate: Int) {\n offchainProposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n endDate: $endDate\n ) {\n items {\n id\n title\n discussion\n link\n state\n created\n end\n }\n totalCount\n }\n}": types.ListOffchainProposalsDocument, + "query ListOffchainVotes($fromDate: Int, $toDate: Int, $limit: Int, $skip: Int, $orderBy: queryInput_votesOffchain_orderBy, $orderDirection: OrderDirection, $voterAddresses: [String]) {\n votesOffchain(\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n voterAddresses: $voterAddresses\n ) {\n items {\n voter\n created\n proposalId\n proposalTitle\n reason\n vp\n }\n totalCount\n }\n}": types.ListOffchainVotesDocument, + "query ProposalNonVoters($id: String!, $addresses: [String]) {\n proposalNonVoters(id: $id, addresses: $addresses) {\n items {\n voter\n }\n }\n}": types.ProposalNonVotersDocument, + "query GetProposalById($id: String!) {\n proposal(id: $id) {\n ... on OnchainProposal {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n }\n}\n\nquery ListProposals($skip: Int, $limit: Int, $orderDirection: OrderDirection, $status: [queryInput_proposals_status_items], $fromDate: Int, $fromEndDate: Int, $includeOptimisticProposals: Boolean) {\n proposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n fromEndDate: $fromEndDate\n includeOptimisticProposals: $includeOptimisticProposals\n ) {\n items {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n totalCount\n }\n}": types.GetProposalByIdDocument, + "query GetEventRelevanceThreshold($relevance: FeedRelevance!, $type: FeedEventType!) {\n getEventRelevanceThreshold(relevance: $relevance, type: $type) {\n threshold\n }\n}": types.GetEventRelevanceThresholdDocument, + "query ListVotes($voterAddressIn: [String], $fromDate: Int, $toDate: Int, $limit: Int, $skip: Int, $orderBy: queryInput_votes_orderBy, $orderDirection: OrderDirection, $support: String) {\n votes(\n voterAddressIn: $voterAddressIn\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n support: $support\n ) {\n items {\n transactionHash\n proposalId\n voterAddress\n support\n votingPower\n timestamp\n reason\n proposalTitle\n }\n totalCount\n }\n}": types.ListVotesDocument, + "query ListHistoricalVotingPower($limit: Int, $skip: Int, $orderBy: queryInput_historicalVotingPower_orderBy, $orderDirection: OrderDirection, $fromDate: Int, $address: String) {\n historicalVotingPower(\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n fromDate: $fromDate\n address: $address\n ) {\n items {\n accountId\n timestamp\n votingPower\n delta\n daoId\n transactionHash\n logIndex\n delegation {\n from\n to\n value\n previousDelegate\n }\n transfer {\n from\n to\n value\n }\n }\n totalCount\n }\n}": types.ListHistoricalVotingPowerDocument, }; function graphql(source) { return documents[source] ?? {}; diff --git a/packages/anticapture-client/dist/gql/graphql.d.ts b/packages/anticapture-client/dist/gql/graphql.d.ts index 2c0a56ec..4ad53604 100644 --- a/packages/anticapture-client/dist/gql/graphql.d.ts +++ b/packages/anticapture-client/dist/gql/graphql.d.ts @@ -42,13 +42,13 @@ export type Scalars = { input: number; output: number; }; - /** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */ - JSON: { + /** A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. */ + DateTime: { input: any; output: any; }; - /** Integers that will have a value of 0 or more. */ - NonNegativeInt: { + /** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */ + JSON: { input: any; output: any; }; @@ -56,12 +56,82 @@ export type Scalars = { input: any; output: any; }; - /** Integers that will have a value greater than 0. */ - PositiveInt: { + /** A field whose value conforms to the standard URL format as specified in RFC3986: https://www.ietf.org/rfc/rfc3986.txt. */ + URL: { input: any; output: any; }; }; +/** Balance delta for a single account across two timestamps. */ +export type AccountBalanceVariation = { + __typename?: 'AccountBalanceVariation'; + /** Absolute balance change encoded as a decimal string. */ + absoluteChange: Scalars['String']['output']; + /** Account address. */ + accountId: Scalars['String']['output']; + /** Balance at the end of the comparison window. */ + currentBalance: Scalars['String']['output']; + /** Relative balance change encoded as a decimal string. */ + percentageChange: Scalars['String']['output']; + /** Balance at the start of the comparison window. */ + previousBalance: Scalars['String']['output']; +}; +/** Balance variation response for a single account. */ +export type AccountBalanceVariationsByAccountIdResponse = { + __typename?: 'AccountBalanceVariationsByAccountIdResponse'; + data: AccountBalanceVariation; + period: PeriodResponse; +}; +/** List of balance variations for multiple accounts in the selected period. */ +export type AccountBalanceVariationsResponse = { + __typename?: 'AccountBalanceVariationsResponse'; + items: Array>; + period: PeriodResponse; +}; +export type AccountBalanceWithVariation = { + __typename?: 'AccountBalanceWithVariation'; + address: Scalars['String']['output']; + balance: Scalars['String']['output']; + delegate: Scalars['String']['output']; + tokenId: Scalars['String']['output']; + variation: AccountBalanceVariation; +}; +export type AccountBalanceWithVariationResponse = { + __typename?: 'AccountBalanceWithVariationResponse'; + data: AccountBalanceWithVariation; + period: PeriodResponse; +}; +export type AccountBalancesWithVariationResponse = { + __typename?: 'AccountBalancesWithVariationResponse'; + items: Array>; + period: PeriodResponse; + totalCount: Scalars['Int']['output']; +}; +/** Aggregated interaction metrics between the requested account and another account. */ +export type AccountInteraction = { + __typename?: 'AccountInteraction'; + /** Counterparty account ID. */ + accountId: Scalars['String']['output']; + /** Net amount transferred between the requested account and the counterparty. */ + amountTransferred: Scalars['String']['output']; + /** Gross transfer volume between the requested account and the counterparty. */ + totalVolume: Scalars['String']['output']; + /** Number of transfers observed for the interaction pair. */ + transferCount: Scalars['String']['output']; +}; +/** Paginated list of account interaction aggregates. */ +export type AccountInteractionsResponse = { + __typename?: 'AccountInteractionsResponse'; + items: Array>; + period: PeriodResponse; + totalCount: Scalars['Int']['output']; +}; +/** Active token supply for the selected comparison window. */ +export type ActiveSupplyResponse = { + __typename?: 'ActiveSupplyResponse'; + /** Active token supply encoded as a decimal string. */ + activeSupply: Scalars['String']['output']; +}; export type AverageDelegationPercentageItem = { __typename?: 'AverageDelegationPercentageItem'; date: Scalars['String']['output']; @@ -77,9 +147,132 @@ export type AverageDelegationPercentagePage = { */ totalCount: Scalars['Int']['output']; }; +/** Average turnout comparison between two adjacent time windows. */ +export type AverageTurnoutComparisonResponse = { + __typename?: 'AverageTurnoutComparisonResponse'; + /** Relative change between current and previous periods. */ + changeRate: Scalars['Float']['output']; + /** Average turnout for the current period encoded as a string. */ + currentAverageTurnout: Scalars['String']['output']; + /** Average turnout for the previous period encoded as a string. */ + oldAverageTurnout: Scalars['String']['output']; +}; export type DaoList = { __typename?: 'DAOList'; - items: Array; + items: Array; + totalCount: Scalars['Int']['output']; +}; +/** Current governance parameters and feature flags for the active DAO. */ +export type DaoResponse = { + __typename?: 'DaoResponse'; + alreadySupportCalldataReview: Scalars['Boolean']['output']; + chainId: Scalars['Int']['output']; + id: Scalars['String']['output']; + proposalThreshold: Scalars['String']['output']; + quorum: Scalars['String']['output']; + supportOffchainData: Scalars['Boolean']['output']; + timelockDelay: Scalars['String']['output']; + votingDelay: Scalars['String']['output']; + votingPeriod: Scalars['String']['output']; +}; +export declare enum DaysWindow { + '7d' = "_7d", + '30d' = "_30d", + '90d' = "_90d", + '180d' = "_180d", + '365d' = "_365d" +} +/** Single delegation transfer event in the historical delegation feed. */ +export type DelegationItem = { + __typename?: 'DelegationItem'; + amount: Scalars['String']['output']; + delegateAddress: Scalars['String']['output']; + delegatorAddress: Scalars['String']['output']; + timestamp: Scalars['String']['output']; + transactionHash: Scalars['String']['output']; +}; +export type DelegationPercentageItem = { + __typename?: 'DelegationPercentageItem'; + /** Unix day bucket represented as a timestamp string. */ + date: Scalars['String']['output']; + /** Delegation percentage value for the day bucket. */ + high: Scalars['String']['output']; +}; +export type DelegationPercentageResponse = { + __typename?: 'DelegationPercentageResponse'; + items: Array>; + pageInfo: PageInfo; + /** Total number of matching day buckets. */ + totalCount: Scalars['Int']['output']; +}; +/** Paginated historical delegations response. */ +export type DelegationsResponse = { + __typename?: 'DelegationsResponse'; + items: Array>; + totalCount: Scalars['Int']['output']; +}; +/** Aggregated delegation amount and latest timestamp for one delegator. */ +export type DelegatorItem = { + __typename?: 'DelegatorItem'; + amount: Scalars['String']['output']; + delegatorAddress: Scalars['String']['output']; + timestamp: Scalars['String']['output']; +}; +/** Paginated delegators for a delegate address. */ +export type DelegatorsResponse = { + __typename?: 'DelegatorsResponse'; + items: Array>; + totalCount: Scalars['Int']['output']; +}; +/** Generic error payload returned by the API. */ +export type ErrorResponse = { + __typename?: 'ErrorResponse'; + /** Human-readable error message */ + error: Scalars['String']['output']; + /** Optional implementation detail or validation context for the error. */ + message?: Maybe; +}; +/** Resolved threshold for a feed event type and relevance level. */ +export type EventRelevanceThresholdResponse = { + __typename?: 'EventRelevanceThresholdResponse'; + /** Threshold value encoded as a decimal string. */ + threshold: Scalars['String']['output']; +}; +/** Filter events by governance activity type. */ +export declare enum FeedEventType { + Delegation = "DELEGATION", + Proposal = "PROPOSAL", + ProposalExtended = "PROPOSAL_EXTENDED", + Transfer = "TRANSFER", + Vote = "VOTE" +} +/** Single event in the governance activity feed. */ +export type FeedItem = { + __typename?: 'FeedItem'; + /** Log index within the transaction receipt. */ + logIndex: Scalars['Int']['output']; + /** Type-specific metadata for the feed event. */ + metadata?: Maybe; + relevance: FeedRelevance; + /** Event timestamp in Unix seconds. */ + timestamp: Scalars['Int']['output']; + /** Transaction hash. */ + txHash: Scalars['String']['output']; + type: FeedEventType; + /** Optional event value encoded as a decimal string when applicable. */ + value?: Maybe; +}; +/** Filter events by relevance tier. */ +export declare enum FeedRelevance { + High = "HIGH", + Low = "LOW", + Medium = "MEDIUM" +} +/** Paginated governance activity feed response. */ +export type FeedResponse = { + __typename?: 'FeedResponse'; + items: Array>; + /** Total number of matching feed events. */ totalCount: Scalars['Int']['output']; }; export declare enum HttpMethod { @@ -93,6 +286,228 @@ export declare enum HttpMethod { Put = "PUT", Trace = "TRACE" } +/** Single historical balance record enriched with transfer context. */ +export type HistoricalBalance = { + __typename?: 'HistoricalBalance'; + /** Account address. */ + accountId: Scalars['String']['output']; + /** Account balance after the historical event. */ + balance: Scalars['String']['output']; + /** DAO identifier. */ + daoId: Scalars['String']['output']; + /** Balance change introduced by the historical event. */ + delta: Scalars['String']['output']; + /** Log index within the transaction receipt. */ + logIndex: Scalars['Int']['output']; + /** Event timestamp in Unix seconds as a string. */ + timestamp: Scalars['String']['output']; + /** Transaction hash. */ + transactionHash: Scalars['String']['output']; + transfer: HistoricalBalanceTransfer; +}; +/** Transfer event associated with a historical balance row. */ +export type HistoricalBalanceTransfer = { + __typename?: 'HistoricalBalanceTransfer'; + /** Sender address. */ + from: Scalars['String']['output']; + /** Recipient address. */ + to: Scalars['String']['output']; + /** Transferred amount encoded as a decimal string. */ + value: Scalars['String']['output']; +}; +/** Paginated historical balance records for one account. */ +export type HistoricalBalancesResponse = { + __typename?: 'HistoricalBalancesResponse'; + items: Array>; + /** Total number of matching historical balance rows. */ + totalCount: Scalars['Int']['output']; +}; +/** Single historical voting power record enriched with delegation and transfer context. */ +export type HistoricalVotingPower = { + __typename?: 'HistoricalVotingPower'; + /** Account address. */ + accountId: Scalars['String']['output']; + /** DAO identifier. */ + daoId: Scalars['String']['output']; + delegation?: Maybe; + /** Voting power change introduced by the event. */ + delta: Scalars['String']['output']; + /** Log index within the transaction receipt. */ + logIndex: Scalars['Int']['output']; + /** Event timestamp in Unix seconds as a string. */ + timestamp: Scalars['String']['output']; + /** Transaction hash. */ + transactionHash: Scalars['String']['output']; + transfer?: Maybe; + /** Voting power after the event, encoded as a decimal string. */ + votingPower: Scalars['String']['output']; +}; +/** Delegation event associated with a historical voting power row. */ +export type HistoricalVotingPowerDelegation = { + __typename?: 'HistoricalVotingPowerDelegation'; + from: Scalars['String']['output']; + previousDelegate?: Maybe; + to: Scalars['String']['output']; + value: Scalars['String']['output']; +}; +/** Transfer event associated with a historical voting power row. */ +export type HistoricalVotingPowerTransfer = { + __typename?: 'HistoricalVotingPowerTransfer'; + from: Scalars['String']['output']; + to: Scalars['String']['output']; + value: Scalars['String']['output']; +}; +/** Paginated historical voting power records. */ +export type HistoricalVotingPowersResponse = { + __typename?: 'HistoricalVotingPowersResponse'; + items: Array>; + /** Total number of matching historical voting power rows. */ + totalCount: Scalars['Int']['output']; +}; +/** Response payload describing the latest update time for a chart. */ +export type LastUpdateResponse = { + __typename?: 'LastUpdateResponse'; + /** Latest refresh time in ISO-8601 format. */ + lastUpdate: Scalars['DateTime']['output']; +}; +export type OffchainNonVoter = { + __typename?: 'OffchainNonVoter'; + voter: Scalars['String']['output']; + votingPower: Scalars['String']['output']; +}; +export type OffchainProposal = { + __typename?: 'OffchainProposal'; + /** Address or ENS of the author. */ + author: Scalars['String']['output']; + /** Proposal body. */ + body: Scalars['String']['output']; + choices: Array>; + /** Creation timestamp in Unix seconds. */ + created: Scalars['Int']['output']; + /** Discussion URL or thread reference. */ + discussion: Scalars['String']['output']; + /** Voting end timestamp in Unix seconds. */ + end: Scalars['Int']['output']; + /** Whether the proposal was flagged by Snapshot. */ + flagged: Scalars['Boolean']['output']; + /** Snapshot proposal identifier. */ + id: Scalars['String']['output']; + /** Canonical Snapshot proposal URL. */ + link: Scalars['String']['output']; + network: Scalars['String']['output']; + scores: Array>; + snapshot?: Maybe; + /** Snapshot space identifier. */ + spaceId: Scalars['String']['output']; + /** Voting start timestamp in Unix seconds. */ + start: Scalars['Int']['output']; + /** Current Snapshot proposal state. */ + state: Scalars['String']['output']; + strategies: Array>; + /** Proposal title. */ + title: Scalars['String']['output']; + /** Snapshot proposal type. */ + type: Scalars['String']['output']; + /** Last update timestamp in Unix seconds. */ + updated: Scalars['Int']['output']; +}; +export type OffchainProposalsResponse = { + __typename?: 'OffchainProposalsResponse'; + items: Array>; + totalCount: Scalars['Int']['output']; +}; +export type OffchainVote = { + __typename?: 'OffchainVote'; + choice?: Maybe>>; + created: Scalars['Int']['output']; + proposalId: Scalars['String']['output']; + proposalTitle?: Maybe; + reason: Scalars['String']['output']; + voter: Scalars['String']['output']; + vp?: Maybe; +}; +export type OffchainVotersResponse = { + __typename?: 'OffchainVotersResponse'; + items: Array>; + totalCount: Scalars['Int']['output']; +}; +export type OffchainVotesResponse = { + __typename?: 'OffchainVotesResponse'; + items: Array>; + totalCount: Scalars['Int']['output']; +}; +export type OnchainProposal = { + __typename?: 'OnchainProposal'; + /** Abstain votes, encoded as a decimal string. */ + abstainVotes: Scalars['String']['output']; + /** Votes cast against, encoded as a decimal string. */ + againstVotes: Scalars['String']['output']; + /** Encoded calldata payloads executed by the proposal. */ + calldatas: Array>; + /** DAO identifier. */ + daoId: Scalars['String']['output']; + /** Proposal body. */ + description: Scalars['String']['output']; + /** End block number. */ + endBlock: Scalars['Int']['output']; + /** Proposal end timestamp in Unix seconds. */ + endTimestamp: Scalars['Int']['output']; + /** Votes cast in favor, encoded as a decimal string. */ + forVotes: Scalars['String']['output']; + /** Onchain proposal identifier. */ + id: Scalars['String']['output']; + /** Optional proposal type discriminator. */ + proposalType?: Maybe; + /** Address that created the proposal. */ + proposerAccountId: Scalars['String']['output']; + /** Required quorum encoded as a decimal string. */ + quorum: Scalars['String']['output']; + /** Start block number. */ + startBlock: Scalars['Int']['output']; + /** Proposal start timestamp in Unix seconds. */ + startTimestamp: Scalars['Int']['output']; + /** Current proposal status. */ + status: Scalars['String']['output']; + /** Contract targets invoked by the proposal. */ + targets: Array>; + /** Proposal creation timestamp in Unix seconds. */ + timestamp: Scalars['Int']['output']; + /** Proposal title. */ + title: Scalars['String']['output']; + /** Proposal creation transaction hash. */ + txHash: Scalars['String']['output']; + /** ETH values attached to each call, encoded as strings. */ + values: Array>; +}; +export type OnchainProposalsResponse = { + __typename?: 'OnchainProposalsResponse'; + items: Array>; + totalCount: Scalars['Int']['output']; +}; +export type OnchainVote = { + __typename?: 'OnchainVote'; + proposalId: Scalars['String']['output']; + proposalTitle?: Maybe; + reason?: Maybe; + /** Governance vote direction. */ + support?: Maybe; + /** Vote timestamp in Unix seconds. */ + timestamp: Scalars['Int']['output']; + transactionHash: Scalars['String']['output']; + voterAddress: Scalars['String']['output']; + /** Voting power encoded as a decimal string. */ + votingPower: Scalars['String']['output']; +}; +export type OnchainVotesResponse = { + __typename?: 'OnchainVotesResponse'; + items: Array>; + totalCount: Scalars['Int']['output']; +}; +/** Sort direction for ordered query results. */ +export declare enum OrderDirection { + Asc = "asc", + Desc = "desc" +} export type PageInfo = { __typename?: 'PageInfo'; endDate?: Maybe; @@ -100,21 +515,108 @@ export type PageInfo = { hasPreviousPage: Scalars['Boolean']['output']; startDate?: Maybe; }; +/** Inclusive time period represented as ISO-8601 timestamps. */ +export type PeriodResponse = { + __typename?: 'PeriodResponse'; + endTimestamp: Scalars['String']['output']; + startTimestamp: Scalars['String']['output']; +}; +/** Combined proposal and delegate vote context for one activity row. */ +export type ProposalActivityItem = { + __typename?: 'ProposalActivityItem'; + proposal: ProposalActivityProposal; + userVote?: Maybe; +}; +/** Proposal snapshot included in the delegate activity response. */ +export type ProposalActivityProposal = { + __typename?: 'ProposalActivityProposal'; + /** Abstain votes, encoded as a decimal string. */ + abstainVotes: Scalars['String']['output']; + /** Votes cast against, encoded as a decimal string. */ + againstVotes: Scalars['String']['output']; + /** DAO identifier. */ + daoId: Scalars['String']['output']; + /** Proposal body. */ + description: Scalars['String']['output']; + /** End block number. */ + endBlock: Scalars['Float']['output']; + /** Votes cast in favor, encoded as a decimal string. */ + forVotes: Scalars['String']['output']; + /** Onchain proposal identifier. */ + id: Scalars['String']['output']; + /** Address that created the proposal. */ + proposerAccountId: Scalars['String']['output']; + /** Start block number. */ + startBlock: Scalars['Float']['output']; + /** Current proposal status. */ + status: Scalars['String']['output']; + /** Proposal creation timestamp in Unix seconds as a string. */ + timestamp?: Maybe; + /** Proposal title. */ + title: Scalars['String']['output']; +}; +/** Delegate proposal activity metrics and proposal-by-proposal history. */ +export type ProposalActivityResponse = { + __typename?: 'ProposalActivityResponse'; + /** Delegate address. */ + address: Scalars['String']['output']; + /** Average seconds between the delegate vote and proposal end time. */ + avgTimeBeforeEnd: Scalars['Float']['output']; + /** Whether the delegate never cast a vote. */ + neverVoted: Scalars['Boolean']['output']; + proposals: Array>; + /** Total proposals reviewed in the dataset. */ + totalProposals: Scalars['Int']['output']; + /** Number of proposals the delegate voted on. */ + votedProposals: Scalars['Int']['output']; + /** Share of proposals where the delegate sided with outcome. */ + winRate: Scalars['Float']['output']; + /** Share of delegate votes cast in support. */ + yesRate: Scalars['Float']['output']; +}; +/** Vote cast by the requested delegate for a given proposal. */ +export type ProposalActivityUserVote = { + __typename?: 'ProposalActivityUserVote'; + /** Vote identifier. */ + id: Scalars['String']['output']; + /** Related proposal ID. */ + proposalId: Scalars['String']['output']; + /** Optional vote rationale. */ + reason?: Maybe; + /** Governance vote direction. */ + support: Scalars['String']['output']; + /** Vote timestamp in Unix seconds as a string. */ + timestamp?: Maybe; + /** Address that cast the vote. */ + voterAccountId: Scalars['String']['output']; + /** Voting power used by the delegate, encoded as a string. */ + votingPower?: Maybe; +}; +/** Proposal launch comparison between two adjacent time windows. */ +export type ProposalsComparisonResponse = { + __typename?: 'ProposalsComparisonResponse'; + /** Relative change between current and previous periods. */ + changeRate: Scalars['Float']['output']; + /** Number of proposals launched in the current period. */ + currentProposalsLaunched: Scalars['Int']['output']; + /** Number of proposals launched in the comparison period. */ + oldProposalsLaunched: Scalars['Int']['output']; +}; export type Query = { __typename?: 'Query'; /** Returns account balance information for a specific address */ - accountBalanceByAccountId?: Maybe; + accountBalanceByAccountId?: Maybe; /** Returns a mapping of the biggest variations to account balances associated by account address */ - accountBalanceVariations?: Maybe; + accountBalanceVariations?: Maybe; /** Returns a the changes to balance by period and accountId */ - accountBalanceVariationsByAccountId?: Maybe; + accountBalanceVariationsByAccountId?: Maybe; /** Returns sorted and paginated account balance records */ - accountBalances?: Maybe; + accountBalances?: Maybe; /** * Returns a mapping of the largest interactions between accounts. * Positive amounts signify net token transfers FROM
, whilst negative amounts refer to net transfers TO
*/ - accountInteractions?: Maybe; + accountInteractions?: Maybe; /** * Average delegation percentage across all supported DAOs by day. * Returns the mean delegation percentage for each day in the specified range. @@ -122,142 +624,146 @@ export type Query = { */ averageDelegationPercentageByDay: AverageDelegationPercentagePage; /** Get active token supply for DAO */ - compareActiveSupply?: Maybe; + compareActiveSupply?: Maybe; /** Compare average turnout between time periods */ - compareAverageTurnout?: Maybe; + compareAverageTurnout?: Maybe; /** Compare cex supply between periods */ - compareCexSupply?: Maybe; + compareCexSupply?: Maybe; /** Compare circulating supply between periods */ - compareCirculatingSupply?: Maybe; + compareCirculatingSupply?: Maybe; /** Compare delegated supply between periods */ - compareDelegatedSupply?: Maybe; + compareDelegatedSupply?: Maybe; /** Compare dex supply between periods */ - compareDexSupply?: Maybe; + compareDexSupply?: Maybe; /** Compare lending supply between periods */ - compareLendingSupply?: Maybe; + compareLendingSupply?: Maybe; /** Compare number of proposals between time periods */ - compareProposals?: Maybe; + compareProposals?: Maybe; /** Compare total supply between periods */ - compareTotalSupply?: Maybe; + compareTotalSupply?: Maybe; /** Compare treasury between periods */ - compareTreasury?: Maybe; + compareTreasury?: Maybe; /** Compare number of votes between time periods */ - compareVotes?: Maybe; + compareVotes?: Maybe; /** Returns current governance parameters for this DAO */ - dao?: Maybe; + dao?: Maybe; /** Get all DAOs */ daos: DaoList; /** Get delegation percentage day buckets with forward-fill */ - delegationPercentageByDay?: Maybe; + delegationPercentageByDay?: Maybe; /** Get current delegations for an account */ - delegations?: Maybe; + delegations?: Maybe; /** Get current delegators of an account with voting power */ - delegators?: Maybe; + delegators?: Maybe; /** Get feed events */ - feedEvents?: Maybe; + feedEvents?: Maybe; /** Returns label information from Arkham, ENS data, and whether the address is an EOA or contract. Arkham data is stored permanently. ENS data is cached with a configurable TTL. */ getAddress?: Maybe; /** Returns label information from Arkham, ENS data, and address type for multiple addresses. Maximum 100 addresses per request. Arkham data is stored permanently. ENS data is cached with a configurable TTL. */ getAddresses?: Maybe; /** Get historical DAO Token Treasury value (governance token quantity × token price) */ - getDaoTokenTreasury?: Maybe; + getDaoTokenTreasury?: Maybe; /** Get event relevance threshold */ - getEventRelevanceThreshold?: Maybe; + getEventRelevanceThreshold?: Maybe; /** Get historical Liquid Treasury (treasury without DAO tokens) from external providers (DefiLlama/Dune) */ - getLiquidTreasury?: Maybe; + getLiquidTreasury?: Maybe; /** Get historical Total Treasury (liquid treasury + DAO token treasury) */ - getTotalTreasury?: Maybe; - /** TODO */ - historicalBalances?: Maybe; + getTotalTreasury?: Maybe; + /** Check API and database health */ + health?: Maybe; + /** Returns historical balance deltas for one account, enriched with the transfer that caused each change. */ + historicalBalances?: Maybe; /** Get historical delegations for an account, with optional filtering and sorting */ - historicalDelegations?: Maybe; + historicalDelegations?: Maybe; /** Get historical market data for a specific token */ - historicalTokenData?: Maybe>>; + historicalTokenData?: Maybe>>; /** Returns a list of voting power changes. */ - historicalVotingPower?: Maybe; + historicalVotingPower?: Maybe; /** Returns a list of voting power changes for a specific account */ - historicalVotingPowerByAccountId?: Maybe; + historicalVotingPowerByAccountId?: Maybe; /** Get the last update time */ - lastUpdate?: Maybe; + lastUpdate?: Maybe; /** Returns a single offchain (Snapshot) proposal by its ID */ - offchainProposalById?: Maybe; + offchainProposalById?: Maybe; + /** Returns the active delegates that did not vote on a given offchain proposal */ + offchainProposalNonVoters?: Maybe; /** Returns a list of offchain (Snapshot) proposals */ - offchainProposals?: Maybe; + offchainProposals?: Maybe; /** Returns a single proposal by its ID */ - proposal?: Maybe; + proposal?: Maybe; /** Returns the active delegates that did not vote on a given proposal */ - proposalNonVoters?: Maybe; + proposalNonVoters?: Maybe; /** Returns a list of proposal */ - proposals?: Maybe; + proposals?: Maybe; /** Returns proposal activity data including voting history, win rates, and detailed proposal information for the specified delegate within the given time window */ - proposalsActivity?: Maybe; + proposalsActivity?: Maybe; /** Get property data for a specific token */ - token?: Maybe; + token?: Maybe; /** Returns token related metrics for a single metric type. */ - tokenMetrics?: Maybe; + tokenMetrics?: Maybe; /** Get transactions with their associated transfers and delegations, with optional filtering and sorting */ - transactions?: Maybe; + transactions?: Maybe; /** Get transfers of a given address */ - transfers?: Maybe; + transfers?: Maybe; /** Get all votes ordered by timestamp or voting power */ - votes?: Maybe; + votes?: Maybe; /** Returns a paginated list of votes cast on a specific proposal */ - votesByProposalId?: Maybe; + votesByProposalId?: Maybe; /** Returns a list of offchain (Snapshot) votes */ - votesOffchain?: Maybe; + votesOffchain?: Maybe; /** Returns a paginated list of offchain (Snapshot) votes for a specific proposal */ - votesOffchainByProposalId?: Maybe; + votesOffchainByProposalId?: Maybe; /** Returns voting power information for a specific address (account) */ - votingPowerByAccountId?: Maybe; + votingPowerByAccountId?: Maybe; /** Returns a mapping of the voting power changes within a time frame for the given addresses */ - votingPowerVariations?: Maybe; + votingPowerVariations?: Maybe; /** Returns a the changes to voting power by period and accountId */ - votingPowerVariationsByAccountId?: Maybe; + votingPowerVariationsByAccountId?: Maybe; /** Returns sorted and paginated account voting power records */ - votingPowers?: Maybe; + votingPowers?: Maybe; }; export type QueryAccountBalanceByAccountIdArgs = { address: Scalars['String']['input']; - fromDate?: InputMaybe; - toDate?: InputMaybe; + fromDate?: InputMaybe; + toDate?: InputMaybe; }; export type QueryAccountBalanceVariationsArgs = { - addresses?: InputMaybe; - fromDate?: InputMaybe; - limit?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; + addresses?: InputMaybe>>; + fromDate?: InputMaybe; + limit?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; }; export type QueryAccountBalanceVariationsByAccountIdArgs = { address: Scalars['String']['input']; - fromDate?: InputMaybe; - toDate?: InputMaybe; + fromDate?: InputMaybe; + toDate?: InputMaybe; }; export type QueryAccountBalancesArgs = { - addresses?: InputMaybe; - delegates?: InputMaybe; + addresses?: InputMaybe>>; + delegates?: InputMaybe>>; excludeDaoAddresses?: InputMaybe; - fromDate?: InputMaybe; + fromDate?: InputMaybe; fromValue?: InputMaybe; - limit?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; toValue?: InputMaybe; }; export type QueryAccountInteractionsArgs = { address: Scalars['String']['input']; filterAddress?: InputMaybe; - fromDate?: InputMaybe; - limit?: InputMaybe; + fromDate?: InputMaybe; + limit?: InputMaybe; maxAmount?: InputMaybe; minAmount?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; }; export type QueryAverageDelegationPercentageByDayArgs = { after?: InputMaybe; @@ -268,132 +774,132 @@ export type QueryAverageDelegationPercentageByDayArgs = { startDate: Scalars['String']['input']; }; export type QueryCompareActiveSupplyArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryCompareAverageTurnoutArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryCompareCexSupplyArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryCompareCirculatingSupplyArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryCompareDelegatedSupplyArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryCompareDexSupplyArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryCompareLendingSupplyArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryCompareProposalsArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryCompareTotalSupplyArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryCompareTreasuryArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryCompareVotesArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryDelegationPercentageByDayArgs = { - after?: InputMaybe; - before?: InputMaybe; - endDate?: InputMaybe; - limit?: InputMaybe; - orderDirection?: InputMaybe; - startDate?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + endDate?: InputMaybe; + limit?: InputMaybe; + orderDirection?: InputMaybe; + startDate?: InputMaybe; }; export type QueryDelegationsArgs = { address: Scalars['String']['input']; }; export type QueryDelegatorsArgs = { address: Scalars['String']['input']; - limit?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; }; export type QueryFeedEventsArgs = { - fromDate?: InputMaybe; - limit?: InputMaybe; + fromDate?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; + orderDirection?: InputMaybe; relevance?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; type?: InputMaybe; }; export type QueryGetAddressArgs = { address: Scalars['String']['input']; }; export type QueryGetAddressesArgs = { - addresses: Scalars['JSON']['input']; + addresses: Array>; }; export type QueryGetDaoTokenTreasuryArgs = { - days?: InputMaybe; - order?: InputMaybe; + days?: InputMaybe; + orderDirection?: InputMaybe; }; export type QueryGetEventRelevanceThresholdArgs = { - relevance: QueryInput_GetEventRelevanceThreshold_Relevance; - type: QueryInput_GetEventRelevanceThreshold_Type; + relevance: FeedRelevance; + type: FeedEventType; }; export type QueryGetLiquidTreasuryArgs = { - days?: InputMaybe; - order?: InputMaybe; + days?: InputMaybe; + orderDirection?: InputMaybe; }; export type QueryGetTotalTreasuryArgs = { - days?: InputMaybe; - order?: InputMaybe; + days?: InputMaybe; + orderDirection?: InputMaybe; }; export type QueryHistoricalBalancesArgs = { address: Scalars['String']['input']; - fromDate?: InputMaybe; + fromDate?: InputMaybe; fromValue?: InputMaybe; - limit?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; toValue?: InputMaybe; }; export type QueryHistoricalDelegationsArgs = { address: Scalars['String']['input']; - delegateAddressIn?: InputMaybe; + delegateAddressIn?: InputMaybe>>; fromValue?: InputMaybe; - limit?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; + limit?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; toValue?: InputMaybe; }; export type QueryHistoricalTokenDataArgs = { - limit?: InputMaybe; - skip?: InputMaybe; + limit?: InputMaybe; + skip?: InputMaybe; }; export type QueryHistoricalVotingPowerArgs = { address?: InputMaybe; - fromDate?: InputMaybe; + fromDate?: InputMaybe; fromValue?: InputMaybe; - limit?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; toValue?: InputMaybe; }; export type QueryHistoricalVotingPowerByAccountIdArgs = { address: Scalars['String']['input']; - fromDate?: InputMaybe; + fromDate?: InputMaybe; fromValue?: InputMaybe; - limit?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; toValue?: InputMaybe; }; export type QueryLastUpdateArgs = { @@ -402,1283 +908,624 @@ export type QueryLastUpdateArgs = { export type QueryOffchainProposalByIdArgs = { id: Scalars['String']['input']; }; +export type QueryOffchainProposalNonVotersArgs = { + addresses?: InputMaybe>>; + id: Scalars['String']['input']; + limit?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; +}; export type QueryOffchainProposalsArgs = { - endDate?: InputMaybe; - fromDate?: InputMaybe; - limit?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - status?: InputMaybe; + endDate?: InputMaybe; + fromDate?: InputMaybe; + limit?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + status?: InputMaybe>>; }; export type QueryProposalArgs = { id: Scalars['String']['input']; }; export type QueryProposalNonVotersArgs = { - addresses?: InputMaybe; + addresses?: InputMaybe>>; id: Scalars['String']['input']; - limit?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; + limit?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; }; export type QueryProposalsArgs = { - fromDate?: InputMaybe; - fromEndDate?: InputMaybe; - includeOptimisticProposals?: InputMaybe; - limit?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - status?: InputMaybe; + fromDate?: InputMaybe; + fromEndDate?: InputMaybe; + includeOptimisticProposals?: InputMaybe; + limit?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + status?: InputMaybe>>; }; export type QueryProposalsActivityArgs = { address: Scalars['String']['input']; - fromDate?: InputMaybe; - limit?: InputMaybe; + fromDate?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; userVoteFilter?: InputMaybe; }; export type QueryTokenArgs = { currency?: InputMaybe; }; export type QueryTokenMetricsArgs = { - endDate?: InputMaybe; - limit?: InputMaybe; + endDate?: InputMaybe; + limit?: InputMaybe; metricType: QueryInput_TokenMetrics_MetricType; - orderDirection?: InputMaybe; - skip?: InputMaybe; - startDate?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + startDate?: InputMaybe; }; export type QueryTransactionsArgs = { - affectedSupply?: InputMaybe; + affectedSupply?: InputMaybe>>; from?: InputMaybe; fromDate?: InputMaybe; - includes?: InputMaybe; - limit?: InputMaybe; + includes?: InputMaybe>>; + limit?: InputMaybe; maxAmount?: InputMaybe; minAmount?: InputMaybe; - offset?: InputMaybe; - sortBy?: InputMaybe; - sortOrder?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; to?: InputMaybe; toDate?: InputMaybe; }; export type QueryTransfersArgs = { address: Scalars['String']['input']; from?: InputMaybe; - fromDate?: InputMaybe; + fromDate?: InputMaybe; fromValue?: InputMaybe; - limit?: InputMaybe; - offset?: InputMaybe; - sortBy?: InputMaybe; - sortOrder?: InputMaybe; + limit?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; to?: InputMaybe; - toDate?: InputMaybe; + toDate?: InputMaybe; toValue?: InputMaybe; }; export type QueryVotesArgs = { - fromDate?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - support?: InputMaybe; - toDate?: InputMaybe; - voterAddressIn?: InputMaybe; + fromDate?: InputMaybe; + limit?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + support?: InputMaybe; + toDate?: InputMaybe; + voterAddressIn?: InputMaybe>>; }; export type QueryVotesByProposalIdArgs = { - fromDate?: InputMaybe; + fromDate?: InputMaybe; id: Scalars['String']['input']; - limit?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - support?: InputMaybe; - toDate?: InputMaybe; - voterAddressIn?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + support?: InputMaybe; + toDate?: InputMaybe; + voterAddressIn?: InputMaybe>>; }; export type QueryVotesOffchainArgs = { - fromDate?: InputMaybe; - limit?: InputMaybe; + fromDate?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; - voterAddresses?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; + voterAddresses?: InputMaybe>>; }; export type QueryVotesOffchainByProposalIdArgs = { - fromDate?: InputMaybe; + fromDate?: InputMaybe; id: Scalars['String']['input']; - limit?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; - voterAddresses?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; + voterAddresses?: InputMaybe>>; }; export type QueryVotingPowerByAccountIdArgs = { accountId: Scalars['String']['input']; - fromDate?: InputMaybe; - toDate?: InputMaybe; + fromDate?: InputMaybe; + toDate?: InputMaybe; }; export type QueryVotingPowerVariationsArgs = { - addresses?: InputMaybe; - fromDate?: InputMaybe; - limit?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; + addresses?: InputMaybe>>; + fromDate?: InputMaybe; + limit?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; }; export type QueryVotingPowerVariationsByAccountIdArgs = { address: Scalars['String']['input']; - fromDate?: InputMaybe; - toDate?: InputMaybe; + fromDate?: InputMaybe; + toDate?: InputMaybe; }; export type QueryVotingPowersArgs = { - addresses?: InputMaybe; - fromDate?: InputMaybe; + addresses?: InputMaybe>>; + fromDate?: InputMaybe; fromValue?: InputMaybe; - limit?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; toValue?: InputMaybe; }; -export type AccountBalanceByAccountId_200_Response = { - __typename?: 'accountBalanceByAccountId_200_response'; - data: Query_AccountBalanceByAccountId_Data; - period: Query_AccountBalanceByAccountId_Period; -}; -export type AccountBalanceVariationsByAccountId_200_Response = { - __typename?: 'accountBalanceVariationsByAccountId_200_response'; - data: Query_AccountBalanceVariationsByAccountId_Data; - period: Query_AccountBalanceVariationsByAccountId_Period; -}; -export type AccountBalanceVariations_200_Response = { - __typename?: 'accountBalanceVariations_200_response'; - items: Array>; - period: Query_AccountBalanceVariations_Period; -}; -export type AccountBalances_200_Response = { - __typename?: 'accountBalances_200_response'; - items: Array>; - period: Query_AccountBalances_Period; - totalCount: Scalars['Float']['output']; -}; -export type AccountInteractions_200_Response = { - __typename?: 'accountInteractions_200_response'; - items: Array>; - period: Query_AccountInteractions_Period; - totalCount: Scalars['Float']['output']; -}; -export type CompareActiveSupply_200_Response = { - __typename?: 'compareActiveSupply_200_response'; - activeSupply: Scalars['String']['output']; -}; -export type CompareAverageTurnout_200_Response = { - __typename?: 'compareAverageTurnout_200_response'; - changeRate: Scalars['Float']['output']; - currentAverageTurnout: Scalars['String']['output']; - oldAverageTurnout: Scalars['String']['output']; -}; -export type CompareCexSupply_200_Response = { - __typename?: 'compareCexSupply_200_response'; - changeRate: Scalars['Float']['output']; - currentCexSupply: Scalars['String']['output']; - oldCexSupply: Scalars['String']['output']; -}; -export type CompareCirculatingSupply_200_Response = { - __typename?: 'compareCirculatingSupply_200_response'; - changeRate: Scalars['Float']['output']; - currentCirculatingSupply: Scalars['String']['output']; - oldCirculatingSupply: Scalars['String']['output']; -}; -export type CompareDelegatedSupply_200_Response = { - __typename?: 'compareDelegatedSupply_200_response'; - changeRate: Scalars['Float']['output']; - currentDelegatedSupply: Scalars['String']['output']; - oldDelegatedSupply: Scalars['String']['output']; -}; -export type CompareDexSupply_200_Response = { - __typename?: 'compareDexSupply_200_response'; - changeRate: Scalars['Float']['output']; - currentDexSupply: Scalars['String']['output']; - oldDexSupply: Scalars['String']['output']; -}; -export type CompareLendingSupply_200_Response = { - __typename?: 'compareLendingSupply_200_response'; - changeRate: Scalars['Float']['output']; - currentLendingSupply: Scalars['String']['output']; - oldLendingSupply: Scalars['String']['output']; -}; -export type CompareProposals_200_Response = { - __typename?: 'compareProposals_200_response'; - changeRate: Scalars['Float']['output']; - currentProposalsLaunched: Scalars['Float']['output']; - oldProposalsLaunched: Scalars['Float']['output']; -}; -export type CompareTotalSupply_200_Response = { - __typename?: 'compareTotalSupply_200_response'; - changeRate: Scalars['Float']['output']; - currentTotalSupply: Scalars['String']['output']; - oldTotalSupply: Scalars['String']['output']; -}; -export type CompareTreasury_200_Response = { - __typename?: 'compareTreasury_200_response'; - changeRate: Scalars['Float']['output']; - currentTreasury: Scalars['String']['output']; - oldTreasury: Scalars['String']['output']; -}; -export type CompareVotes_200_Response = { - __typename?: 'compareVotes_200_response'; +/** Supply metric comparison between current and previous periods. */ +export type SupplyComparisonResponse = { + __typename?: 'SupplyComparisonResponse'; changeRate: Scalars['Float']['output']; - currentVotes: Scalars['Float']['output']; - oldVotes: Scalars['Float']['output']; -}; -export type Dao_200_Response = { - __typename?: 'dao_200_response'; - alreadySupportCalldataReview: Scalars['Boolean']['output']; - chainId: Scalars['Float']['output']; - id: Scalars['String']['output']; - proposalThreshold: Scalars['String']['output']; - quorum: Scalars['String']['output']; - supportOffchainData: Scalars['Boolean']['output']; - timelockDelay: Scalars['String']['output']; - votingDelay: Scalars['String']['output']; - votingPeriod: Scalars['String']['output']; -}; -export type DelegationPercentageByDay_200_Response = { - __typename?: 'delegationPercentageByDay_200_response'; - items: Array>; - pageInfo: Query_DelegationPercentageByDay_PageInfo; - totalCount: Scalars['Float']['output']; -}; -export type Delegations_200_Response = { - __typename?: 'delegations_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; -export type Delegators_200_Response = { - __typename?: 'delegators_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; -export type FeedEvents_200_Response = { - __typename?: 'feedEvents_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; -export type GetAddress_200_Response = { - __typename?: 'getAddress_200_response'; - address: Scalars['String']['output']; - arkham?: Maybe; - ens?: Maybe; - isContract: Scalars['Boolean']['output']; -}; -export type GetAddresses_200_Response = { - __typename?: 'getAddresses_200_response'; - results: Array>; -}; -export type GetDaoTokenTreasury_200_Response = { - __typename?: 'getDaoTokenTreasury_200_response'; - items: Array>; - /** Total number of items */ - totalCount: Scalars['Float']['output']; -}; -export type GetEventRelevanceThreshold_200_Response = { - __typename?: 'getEventRelevanceThreshold_200_response'; - threshold: Scalars['String']['output']; -}; -export type GetLiquidTreasury_200_Response = { - __typename?: 'getLiquidTreasury_200_response'; - items: Array>; - /** Total number of items */ - totalCount: Scalars['Float']['output']; -}; -export type GetTotalTreasury_200_Response = { - __typename?: 'getTotalTreasury_200_response'; - items: Array>; - /** Total number of items */ - totalCount: Scalars['Float']['output']; -}; -export type HistoricalBalances_200_Response = { - __typename?: 'historicalBalances_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; -export type HistoricalDelegations_200_Response = { - __typename?: 'historicalDelegations_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; -export type HistoricalVotingPowerByAccountId_200_Response = { - __typename?: 'historicalVotingPowerByAccountId_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; -export type HistoricalVotingPower_200_Response = { - __typename?: 'historicalVotingPower_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; -export type LastUpdate_200_Response = { - __typename?: 'lastUpdate_200_response'; - lastUpdate: Scalars['String']['output']; -}; -export type OffchainProposalById_200_Response = { - __typename?: 'offchainProposalById_200_response'; - author: Scalars['String']['output']; - body: Scalars['String']['output']; - created: Scalars['Float']['output']; - discussion: Scalars['String']['output']; - end: Scalars['Float']['output']; - flagged: Scalars['Boolean']['output']; - id: Scalars['String']['output']; - link: Scalars['String']['output']; - spaceId: Scalars['String']['output']; - start: Scalars['Float']['output']; - state: Scalars['String']['output']; - title: Scalars['String']['output']; - type: Scalars['String']['output']; - updated: Scalars['Float']['output']; -}; -export type OffchainProposals_200_Response = { - __typename?: 'offchainProposals_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; -export type ProposalNonVoters_200_Response = { - __typename?: 'proposalNonVoters_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; -export type Proposal_200_Response = { - __typename?: 'proposal_200_response'; - abstainVotes: Scalars['String']['output']; - againstVotes: Scalars['String']['output']; - calldatas: Array>; - daoId: Scalars['String']['output']; - description: Scalars['String']['output']; - endBlock: Scalars['Float']['output']; - endTimestamp: Scalars['String']['output']; - forVotes: Scalars['String']['output']; - id: Scalars['String']['output']; - proposalType?: Maybe; - proposerAccountId: Scalars['String']['output']; - quorum: Scalars['String']['output']; - startBlock: Scalars['Float']['output']; - startTimestamp: Scalars['String']['output']; - status: Scalars['String']['output']; - targets: Array>; - timestamp: Scalars['String']['output']; - title: Scalars['String']['output']; - txHash: Scalars['String']['output']; - values: Array>; -}; -export type ProposalsActivity_200_Response = { - __typename?: 'proposalsActivity_200_response'; - address: Scalars['String']['output']; - avgTimeBeforeEnd: Scalars['Float']['output']; - neverVoted: Scalars['Boolean']['output']; - proposals: Array>; - totalProposals: Scalars['Float']['output']; - votedProposals: Scalars['Float']['output']; - winRate: Scalars['Float']['output']; - yesRate: Scalars['Float']['output']; -}; -export type Proposals_200_Response = { - __typename?: 'proposals_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; + currentValue: Scalars['String']['output']; + previousValue: Scalars['String']['output']; }; -export declare enum QueryInput_AccountBalanceVariations_OrderDirection { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_AccountBalances_OrderBy { - Balance = "balance", - SignedVariation = "signedVariation", - Variation = "variation" -} -export declare enum QueryInput_AccountBalances_OrderDirection { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_AccountInteractions_OrderBy { - Count = "count", - Volume = "volume" -} -export declare enum QueryInput_AccountInteractions_OrderDirection { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_CompareActiveSupply_Days { - '7d' = "_7d", - '30d' = "_30d", - '90d' = "_90d", - '180d' = "_180d", - '365d' = "_365d" -} -export declare enum QueryInput_CompareAverageTurnout_Days { - '7d' = "_7d", - '30d' = "_30d", - '90d' = "_90d", - '180d' = "_180d", - '365d' = "_365d" -} -export declare enum QueryInput_CompareCexSupply_Days { - '7d' = "_7d", - '30d' = "_30d", - '90d' = "_90d", - '180d' = "_180d", - '365d' = "_365d" -} -export declare enum QueryInput_CompareCirculatingSupply_Days { - '7d' = "_7d", - '30d' = "_30d", - '90d' = "_90d", - '180d' = "_180d", - '365d' = "_365d" -} -export declare enum QueryInput_CompareDelegatedSupply_Days { - '7d' = "_7d", - '30d' = "_30d", - '90d' = "_90d", - '180d' = "_180d", - '365d' = "_365d" -} -export declare enum QueryInput_CompareDexSupply_Days { - '7d' = "_7d", - '30d' = "_30d", - '90d' = "_90d", - '180d' = "_180d", - '365d' = "_365d" -} -export declare enum QueryInput_CompareLendingSupply_Days { - '7d' = "_7d", - '30d' = "_30d", - '90d' = "_90d", - '180d' = "_180d", - '365d' = "_365d" -} -export declare enum QueryInput_CompareProposals_Days { - '7d' = "_7d", - '30d' = "_30d", - '90d' = "_90d", - '180d' = "_180d", - '365d' = "_365d" -} -export declare enum QueryInput_CompareTotalSupply_Days { - '7d' = "_7d", - '30d' = "_30d", - '90d' = "_90d", - '180d' = "_180d", - '365d' = "_365d" -} -export declare enum QueryInput_CompareTreasury_Days { - '7d' = "_7d", - '30d' = "_30d", - '90d' = "_90d", - '180d' = "_180d", - '365d' = "_365d" -} -export declare enum QueryInput_CompareVotes_Days { - '7d' = "_7d", - '30d' = "_30d", - '90d' = "_90d", - '180d' = "_180d", - '365d' = "_365d" -} -export declare enum QueryInput_DelegationPercentageByDay_OrderDirection { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_Delegators_OrderBy { - Amount = "amount", - Timestamp = "timestamp" -} -export declare enum QueryInput_Delegators_OrderDirection { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_FeedEvents_OrderBy { - Timestamp = "timestamp", - Value = "value" -} -export declare enum QueryInput_FeedEvents_OrderDirection { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_FeedEvents_Relevance { - High = "HIGH", - Low = "LOW", - Medium = "MEDIUM" -} -export declare enum QueryInput_FeedEvents_Type { - Delegation = "DELEGATION", - Proposal = "PROPOSAL", - ProposalExtended = "PROPOSAL_EXTENDED", - Transfer = "TRANSFER", - Vote = "VOTE" -} -export declare enum QueryInput_GetDaoTokenTreasury_Days { - '7d' = "_7d", - '30d' = "_30d", - '90d' = "_90d", - '180d' = "_180d", - '365d' = "_365d" -} -export declare enum QueryInput_GetDaoTokenTreasury_Order { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_GetEventRelevanceThreshold_Relevance { - High = "HIGH", - Low = "LOW", - Medium = "MEDIUM" -} -export declare enum QueryInput_GetEventRelevanceThreshold_Type { - Delegation = "DELEGATION", - Proposal = "PROPOSAL", - ProposalExtended = "PROPOSAL_EXTENDED", - Transfer = "TRANSFER", - Vote = "VOTE" -} -export declare enum QueryInput_GetLiquidTreasury_Days { - '7d' = "_7d", - '30d' = "_30d", - '90d' = "_90d", - '180d' = "_180d", - '365d' = "_365d" -} -export declare enum QueryInput_GetLiquidTreasury_Order { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_GetTotalTreasury_Days { - '7d' = "_7d", - '30d' = "_30d", - '90d' = "_90d", - '180d' = "_180d", - '365d' = "_365d" -} -export declare enum QueryInput_GetTotalTreasury_Order { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_HistoricalBalances_OrderBy { - Delta = "delta", - Timestamp = "timestamp" -} -export declare enum QueryInput_HistoricalBalances_OrderDirection { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_HistoricalDelegations_OrderDirection { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_HistoricalVotingPowerByAccountId_OrderBy { - Delta = "delta", - Timestamp = "timestamp" -} -export declare enum QueryInput_HistoricalVotingPowerByAccountId_OrderDirection { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_HistoricalVotingPower_OrderBy { - Delta = "delta", - Timestamp = "timestamp" -} -export declare enum QueryInput_HistoricalVotingPower_OrderDirection { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_LastUpdate_Chart { - AttackProfitability = "attack_profitability", - CostComparison = "cost_comparison", - TokenDistribution = "token_distribution" -} -export declare enum QueryInput_OffchainProposals_OrderDirection { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_ProposalNonVoters_OrderDirection { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_ProposalsActivity_OrderBy { - Timestamp = "timestamp", - VoteTiming = "voteTiming", - VotingPower = "votingPower" -} -export declare enum QueryInput_ProposalsActivity_OrderDirection { - Asc = "asc", - Desc = "desc" -} -/** Filter proposals by vote type. Can be: 'yes' (For votes), 'no' (Against votes), 'abstain' (Abstain votes), 'no-vote' (Didn't vote) */ -export declare enum QueryInput_ProposalsActivity_UserVoteFilter { - Abstain = "abstain", - No = "no", - NoVote = "no_vote", - Yes = "yes" -} -export declare enum QueryInput_Proposals_IncludeOptimisticProposals { - False = "FALSE", - True = "TRUE" -} -export declare enum QueryInput_Proposals_OrderDirection { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_TokenMetrics_MetricType { - CexSupply = "CEX_SUPPLY", - CirculatingSupply = "CIRCULATING_SUPPLY", - DelegatedSupply = "DELEGATED_SUPPLY", - DexSupply = "DEX_SUPPLY", - LendingSupply = "LENDING_SUPPLY", - TotalSupply = "TOTAL_SUPPLY", - Treasury = "TREASURY" -} -export declare enum QueryInput_TokenMetrics_OrderDirection { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_Token_Currency { - Eth = "eth", - Usd = "usd" -} -export declare enum QueryInput_Transactions_SortOrder { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_Transfers_SortBy { - Amount = "amount", - Timestamp = "timestamp" -} -export declare enum QueryInput_Transfers_SortOrder { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_VotesByProposalId_OrderBy { - Timestamp = "timestamp", - VotingPower = "votingPower" -} -export declare enum QueryInput_VotesByProposalId_OrderDirection { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_VotesOffchainByProposalId_OrderBy { - Timestamp = "timestamp", - VotingPower = "votingPower" -} -export declare enum QueryInput_VotesOffchainByProposalId_OrderDirection { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_VotesOffchain_OrderBy { - Timestamp = "timestamp", - VotingPower = "votingPower" -} -export declare enum QueryInput_VotesOffchain_OrderDirection { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_Votes_OrderBy { - Timestamp = "timestamp", - VotingPower = "votingPower" -} -export declare enum QueryInput_Votes_OrderDirection { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_VotingPowerVariations_OrderDirection { - Asc = "asc", - Desc = "desc" -} -export declare enum QueryInput_VotingPowers_OrderBy { - Balance = "balance", - DelegationsCount = "delegationsCount", - SignedVariation = "signedVariation", - Total = "total", - Variation = "variation", - VotingPower = "votingPower" -} -export declare enum QueryInput_VotingPowers_OrderDirection { - Asc = "asc", - Desc = "desc" -} -export type Query_AccountBalanceByAccountId_Data = { - __typename?: 'query_accountBalanceByAccountId_data'; - address: Scalars['String']['output']; - balance: Scalars['String']['output']; - delegate: Scalars['String']['output']; - tokenId: Scalars['String']['output']; - variation: Query_AccountBalanceByAccountId_Data_Variation; -}; -export type Query_AccountBalanceByAccountId_Data_Variation = { - __typename?: 'query_accountBalanceByAccountId_data_variation'; - absoluteChange: Scalars['String']['output']; - percentageChange: Scalars['String']['output']; - previousBalance: Scalars['String']['output']; -}; -export type Query_AccountBalanceByAccountId_Period = { - __typename?: 'query_accountBalanceByAccountId_period'; - endTimestamp: Scalars['String']['output']; - startTimestamp: Scalars['String']['output']; -}; -export type Query_AccountBalanceVariationsByAccountId_Data = { - __typename?: 'query_accountBalanceVariationsByAccountId_data'; - absoluteChange: Scalars['String']['output']; - accountId: Scalars['String']['output']; - currentBalance: Scalars['String']['output']; - percentageChange: Scalars['String']['output']; - previousBalance: Scalars['String']['output']; -}; -export type Query_AccountBalanceVariationsByAccountId_Period = { - __typename?: 'query_accountBalanceVariationsByAccountId_period'; - endTimestamp: Scalars['String']['output']; - startTimestamp: Scalars['String']['output']; -}; -export type Query_AccountBalanceVariations_Items_Items = { - __typename?: 'query_accountBalanceVariations_items_items'; - absoluteChange: Scalars['String']['output']; - accountId: Scalars['String']['output']; - currentBalance: Scalars['String']['output']; - percentageChange: Scalars['String']['output']; - previousBalance: Scalars['String']['output']; -}; -export type Query_AccountBalanceVariations_Period = { - __typename?: 'query_accountBalanceVariations_period'; - endTimestamp: Scalars['String']['output']; - startTimestamp: Scalars['String']['output']; -}; -export type Query_AccountBalances_Items_Items = { - __typename?: 'query_accountBalances_items_items'; - address: Scalars['String']['output']; - balance: Scalars['String']['output']; - delegate: Scalars['String']['output']; - tokenId: Scalars['String']['output']; - variation: Query_AccountBalances_Items_Items_Variation; -}; -export type Query_AccountBalances_Items_Items_Variation = { - __typename?: 'query_accountBalances_items_items_variation'; - absoluteChange: Scalars['String']['output']; - percentageChange: Scalars['String']['output']; - previousBalance: Scalars['String']['output']; -}; -export type Query_AccountBalances_Period = { - __typename?: 'query_accountBalances_period'; - endTimestamp: Scalars['String']['output']; - startTimestamp: Scalars['String']['output']; -}; -export type Query_AccountInteractions_Items_Items = { - __typename?: 'query_accountInteractions_items_items'; - accountId: Scalars['String']['output']; - amountTransferred: Scalars['String']['output']; - totalVolume: Scalars['String']['output']; - transferCount: Scalars['String']['output']; -}; -export type Query_AccountInteractions_Period = { - __typename?: 'query_accountInteractions_period'; - endTimestamp: Scalars['String']['output']; - startTimestamp: Scalars['String']['output']; -}; -export type Query_DelegationPercentageByDay_Items_Items = { - __typename?: 'query_delegationPercentageByDay_items_items'; - date: Scalars['String']['output']; - high: Scalars['String']['output']; -}; -export type Query_DelegationPercentageByDay_PageInfo = { - __typename?: 'query_delegationPercentageByDay_pageInfo'; - endDate?: Maybe; - hasNextPage: Scalars['Boolean']['output']; - startDate?: Maybe; -}; -export type Query_Delegations_Items_Items = { - __typename?: 'query_delegations_items_items'; - amount: Scalars['String']['output']; - delegateAddress: Scalars['String']['output']; - delegatorAddress: Scalars['String']['output']; - timestamp: Scalars['String']['output']; - transactionHash: Scalars['String']['output']; -}; -export type Query_Delegators_Items_Items = { - __typename?: 'query_delegators_items_items'; - amount: Scalars['String']['output']; - delegatorAddress: Scalars['String']['output']; - timestamp: Scalars['String']['output']; -}; -export type Query_FeedEvents_Items_Items = { - __typename?: 'query_feedEvents_items_items'; - logIndex: Scalars['Float']['output']; - metadata?: Maybe; - relevance: Query_FeedEvents_Items_Items_Relevance; - timestamp: Scalars['Float']['output']; - txHash: Scalars['String']['output']; - type: Query_FeedEvents_Items_Items_Type; - value?: Maybe; -}; -export declare enum Query_FeedEvents_Items_Items_Relevance { - High = "HIGH", - Low = "LOW", - Medium = "MEDIUM" -} -export declare enum Query_FeedEvents_Items_Items_Type { - Delegation = "DELEGATION", - Proposal = "PROPOSAL", - ProposalExtended = "PROPOSAL_EXTENDED", - Transfer = "TRANSFER", - Vote = "VOTE" -} -export type Query_GetAddress_Arkham = { - __typename?: 'query_getAddress_arkham'; - entity?: Maybe; - entityType?: Maybe; - label?: Maybe; - twitter?: Maybe; -}; -export type Query_GetAddress_Ens = { - __typename?: 'query_getAddress_ens'; - avatar?: Maybe; - banner?: Maybe; - name?: Maybe; -}; -export type Query_GetAddresses_Results_Items = { - __typename?: 'query_getAddresses_results_items'; - address: Scalars['String']['output']; - arkham?: Maybe; - ens?: Maybe; - isContract: Scalars['Boolean']['output']; -}; -export type Query_GetAddresses_Results_Items_Arkham = { - __typename?: 'query_getAddresses_results_items_arkham'; - entity?: Maybe; - entityType?: Maybe; - label?: Maybe; - twitter?: Maybe; -}; -export type Query_GetAddresses_Results_Items_Ens = { - __typename?: 'query_getAddresses_results_items_ens'; - avatar?: Maybe; - banner?: Maybe; - name?: Maybe; -}; -export type Query_GetDaoTokenTreasury_Items_Items = { - __typename?: 'query_getDaoTokenTreasury_items_items'; - /** Unix timestamp in milliseconds */ - date: Scalars['Float']['output']; - /** Treasury value in USD */ - value: Scalars['Float']['output']; -}; -export type Query_GetLiquidTreasury_Items_Items = { - __typename?: 'query_getLiquidTreasury_items_items'; - /** Unix timestamp in milliseconds */ - date: Scalars['Float']['output']; - /** Treasury value in USD */ - value: Scalars['Float']['output']; -}; -export type Query_GetTotalTreasury_Items_Items = { - __typename?: 'query_getTotalTreasury_items_items'; - /** Unix timestamp in milliseconds */ - date: Scalars['Float']['output']; - /** Treasury value in USD */ - value: Scalars['Float']['output']; -}; -export type Query_HistoricalBalances_Items_Items = { - __typename?: 'query_historicalBalances_items_items'; - accountId: Scalars['String']['output']; - balance: Scalars['String']['output']; - daoId: Scalars['String']['output']; - delta: Scalars['String']['output']; - logIndex: Scalars['Float']['output']; - timestamp: Scalars['String']['output']; - transactionHash: Scalars['String']['output']; - transfer: Query_HistoricalBalances_Items_Items_Transfer; -}; -export type Query_HistoricalBalances_Items_Items_Transfer = { - __typename?: 'query_historicalBalances_items_items_transfer'; - from: Scalars['String']['output']; - to: Scalars['String']['output']; - value: Scalars['String']['output']; -}; -export type Query_HistoricalDelegations_Items_Items = { - __typename?: 'query_historicalDelegations_items_items'; - amount: Scalars['String']['output']; - delegateAddress: Scalars['String']['output']; - delegatorAddress: Scalars['String']['output']; - timestamp: Scalars['String']['output']; - transactionHash: Scalars['String']['output']; -}; -export type Query_HistoricalTokenData_Items = { - __typename?: 'query_historicalTokenData_items'; +export type TokenHistoricalPriceItem = { + __typename?: 'TokenHistoricalPriceItem'; + /** Historical price value as a decimal string. */ price: Scalars['String']['output']; - timestamp: Scalars['Float']['output']; -}; -export type Query_HistoricalVotingPowerByAccountId_Items_Items = { - __typename?: 'query_historicalVotingPowerByAccountId_items_items'; - accountId: Scalars['String']['output']; - daoId: Scalars['String']['output']; - delegation?: Maybe; - delta: Scalars['String']['output']; - logIndex: Scalars['Float']['output']; - timestamp: Scalars['String']['output']; - transactionHash: Scalars['String']['output']; - transfer?: Maybe; - votingPower: Scalars['String']['output']; -}; -export type Query_HistoricalVotingPowerByAccountId_Items_Items_Delegation = { - __typename?: 'query_historicalVotingPowerByAccountId_items_items_delegation'; - from: Scalars['String']['output']; - previousDelegate?: Maybe; - to: Scalars['String']['output']; - value: Scalars['String']['output']; -}; -export type Query_HistoricalVotingPowerByAccountId_Items_Items_Transfer = { - __typename?: 'query_historicalVotingPowerByAccountId_items_items_transfer'; - from: Scalars['String']['output']; - to: Scalars['String']['output']; - value: Scalars['String']['output']; -}; -export type Query_HistoricalVotingPower_Items_Items = { - __typename?: 'query_historicalVotingPower_items_items'; - accountId: Scalars['String']['output']; - daoId: Scalars['String']['output']; - delegation?: Maybe; - delta: Scalars['String']['output']; - logIndex: Scalars['Float']['output']; - timestamp: Scalars['String']['output']; - transactionHash: Scalars['String']['output']; - transfer?: Maybe; - votingPower: Scalars['String']['output']; -}; -export type Query_HistoricalVotingPower_Items_Items_Delegation = { - __typename?: 'query_historicalVotingPower_items_items_delegation'; - from: Scalars['String']['output']; - previousDelegate?: Maybe; - to: Scalars['String']['output']; - value: Scalars['String']['output']; -}; -export type Query_HistoricalVotingPower_Items_Items_Transfer = { - __typename?: 'query_historicalVotingPower_items_items_transfer'; - from: Scalars['String']['output']; - to: Scalars['String']['output']; - value: Scalars['String']['output']; -}; -export type Query_OffchainProposals_Items_Items = { - __typename?: 'query_offchainProposals_items_items'; - author: Scalars['String']['output']; - body: Scalars['String']['output']; - created: Scalars['Float']['output']; - discussion: Scalars['String']['output']; - end: Scalars['Float']['output']; - flagged: Scalars['Boolean']['output']; - id: Scalars['String']['output']; - link: Scalars['String']['output']; - spaceId: Scalars['String']['output']; - start: Scalars['Float']['output']; - state: Scalars['String']['output']; - title: Scalars['String']['output']; - type: Scalars['String']['output']; - updated: Scalars['Float']['output']; -}; -export type Query_ProposalNonVoters_Items_Items = { - __typename?: 'query_proposalNonVoters_items_items'; - lastVoteTimestamp: Scalars['Float']['output']; - voter: Scalars['String']['output']; - votingPower: Scalars['String']['output']; - votingPowerVariation: Scalars['String']['output']; -}; -export type Query_ProposalsActivity_Proposals_Items = { - __typename?: 'query_proposalsActivity_proposals_items'; - proposal: Query_ProposalsActivity_Proposals_Items_Proposal; - userVote?: Maybe; -}; -export type Query_ProposalsActivity_Proposals_Items_Proposal = { - __typename?: 'query_proposalsActivity_proposals_items_proposal'; - abstainVotes: Scalars['String']['output']; - againstVotes: Scalars['String']['output']; - daoId: Scalars['String']['output']; - description: Scalars['String']['output']; - endBlock: Scalars['Float']['output']; - forVotes: Scalars['String']['output']; - id: Scalars['String']['output']; - proposerAccountId: Scalars['String']['output']; - startBlock: Scalars['Float']['output']; - status: Scalars['String']['output']; - timestamp?: Maybe; - title: Scalars['String']['output']; -}; -export type Query_ProposalsActivity_Proposals_Items_UserVote = { - __typename?: 'query_proposalsActivity_proposals_items_userVote'; - id: Scalars['String']['output']; - proposalId: Scalars['String']['output']; - reason?: Maybe; - support?: Maybe; - timestamp?: Maybe; - voterAccountId: Scalars['String']['output']; - votingPower: Scalars['String']['output']; -}; -export type Query_Proposals_Items_Items = { - __typename?: 'query_proposals_items_items'; - abstainVotes: Scalars['String']['output']; - againstVotes: Scalars['String']['output']; - calldatas: Array>; - daoId: Scalars['String']['output']; - description: Scalars['String']['output']; - endBlock: Scalars['Float']['output']; - endTimestamp: Scalars['String']['output']; - forVotes: Scalars['String']['output']; - id: Scalars['String']['output']; - proposalType?: Maybe; - proposerAccountId: Scalars['String']['output']; - quorum: Scalars['String']['output']; - startBlock: Scalars['Float']['output']; - startTimestamp: Scalars['String']['output']; - status: Scalars['String']['output']; - targets: Array>; - timestamp: Scalars['String']['output']; - title: Scalars['String']['output']; - txHash: Scalars['String']['output']; - values: Array>; + /** Unix timestamp in seconds. */ + timestamp: Scalars['Int']['output']; }; -export type Query_TokenMetrics_Items_Items = { - __typename?: 'query_tokenMetrics_items_items'; +export type TokenMetricItem = { + __typename?: 'TokenMetricItem'; + /** Unix day bucket represented as a timestamp string. */ date: Scalars['String']['output']; + /** Highest observed value for the period. */ high: Scalars['String']['output']; + /** Total volume observed for the period. */ volume: Scalars['String']['output']; }; -export type Query_TokenMetrics_PageInfo = { - __typename?: 'query_tokenMetrics_pageInfo'; - endDate?: Maybe; - hasNextPage: Scalars['Boolean']['output']; - startDate?: Maybe; +export type TokenMetricsResponse = { + __typename?: 'TokenMetricsResponse'; + items: Array>; + pageInfo: PageInfo; +}; +/** Token properties enriched with the current token price. */ +export type TokenPropertiesResponse = { + __typename?: 'TokenPropertiesResponse'; + cexSupply: Scalars['String']['output']; + circulatingSupply: Scalars['String']['output']; + /** Token decimals. */ + decimals: Scalars['Int']['output']; + delegatedSupply: Scalars['String']['output']; + dexSupply: Scalars['String']['output']; + id: Scalars['String']['output']; + lendingSupply: Scalars['String']['output']; + name?: Maybe; + nonCirculatingSupply: Scalars['String']['output']; + price: Scalars['String']['output']; + totalSupply: Scalars['String']['output']; + treasury: Scalars['String']['output']; }; -export type Query_Transactions_Items_Items = { - __typename?: 'query_transactions_items_items'; - delegations: Array>; +/** Transaction response enriched with transfer and delegation events. */ +export type Transaction = { + __typename?: 'Transaction'; + delegations: Array>; + /** Resolved sender address, if known. */ from?: Maybe; + /** Whether the transaction touched a centralized exchange. */ isCex: Scalars['Boolean']['output']; + /** Whether the transaction touched a decentralized exchange. */ isDex: Scalars['Boolean']['output']; + /** Whether the transaction touched a lending protocol. */ isLending: Scalars['Boolean']['output']; + /** Whether the transaction counts toward total tracked supply. */ isTotal: Scalars['Boolean']['output']; + /** Transaction timestamp in Unix seconds as a string. */ timestamp: Scalars['String']['output']; + /** Resolved recipient address, if known. */ to?: Maybe; + /** Transaction hash. */ transactionHash: Scalars['String']['output']; - transfers: Array>; + transfers: Array>; }; -export type Query_Transactions_Items_Items_Delegations_Items = { - __typename?: 'query_transactions_items_items_delegations_items'; +/** Delegation event embedded within a transaction response. */ +export type TransactionDelegation = { + __typename?: 'TransactionDelegation'; + /** DAO identifier. */ daoId: Scalars['String']['output']; + /** Delegate address. */ delegateAccountId: Scalars['String']['output']; + /** Delegated amount encoded as a decimal string. */ delegatedValue: Scalars['String']['output']; + /** Delegator address. */ delegatorAccountId: Scalars['String']['output']; + /** Whether the delegation touched a centralized exchange. */ isCex: Scalars['Boolean']['output']; + /** Whether the delegation touched a decentralized exchange. */ isDex: Scalars['Boolean']['output']; + /** Whether the delegation touched a lending protocol. */ isLending: Scalars['Boolean']['output']; + /** Whether the delegation counts toward total tracked supply. */ isTotal: Scalars['Boolean']['output']; - logIndex: Scalars['Float']['output']; + /** Log index within the transaction receipt. */ + logIndex: Scalars['Int']['output']; + /** Previous delegate address, if one existed. */ previousDelegate?: Maybe; + /** Delegation timestamp in Unix seconds as a string. */ timestamp: Scalars['String']['output']; + /** Transaction hash. */ transactionHash: Scalars['String']['output']; }; -export type Query_Transactions_Items_Items_Transfers_Items = { - __typename?: 'query_transactions_items_items_transfers_items'; - amount: Scalars['String']['output']; - daoId: Scalars['String']['output']; - fromAccountId: Scalars['String']['output']; - isCex: Scalars['Boolean']['output']; - isDex: Scalars['Boolean']['output']; - isLending: Scalars['Boolean']['output']; - isTotal: Scalars['Boolean']['output']; - logIndex: Scalars['Float']['output']; - timestamp: Scalars['String']['output']; - toAccountId: Scalars['String']['output']; - tokenId: Scalars['String']['output']; - transactionHash: Scalars['String']['output']; +/** Paginated transactions with embedded transfer and delegation data. */ +export type TransactionsResponse = { + __typename?: 'TransactionsResponse'; + items: Array>; + /** Total number of matching transactions. */ + totalCount: Scalars['Int']['output']; }; -export type Query_Transfers_Items_Items = { - __typename?: 'query_transfers_items_items'; +export type Transfer = { + __typename?: 'Transfer'; + /** Transferred amount encoded as a decimal string. */ amount: Scalars['String']['output']; + /** DAO identifier. */ daoId: Scalars['String']['output']; + /** Sender address. */ fromAccountId: Scalars['String']['output']; + /** Whether the transfer touched a centralized exchange. */ isCex: Scalars['Boolean']['output']; + /** Whether the transfer touched a decentralized exchange. */ isDex: Scalars['Boolean']['output']; + /** Whether the transfer touched a lending protocol. */ isLending: Scalars['Boolean']['output']; + /** Whether the transfer counts toward total tracked supply. */ isTotal: Scalars['Boolean']['output']; - logIndex: Scalars['Float']['output']; + /** Log index within the transaction receipt. */ + logIndex: Scalars['Int']['output']; + /** Transfer timestamp in Unix seconds as a string. */ timestamp: Scalars['String']['output']; + /** Recipient address. */ toAccountId: Scalars['String']['output']; + /** Token contract address. */ tokenId: Scalars['String']['output']; + /** Transaction hash. */ transactionHash: Scalars['String']['output']; }; -export type Query_VotesByProposalId_Items_Items = { - __typename?: 'query_votesByProposalId_items_items'; - proposalId: Scalars['String']['output']; - proposalTitle?: Maybe; - reason?: Maybe; - support?: Maybe; - timestamp: Scalars['Int']['output']; - transactionHash: Scalars['String']['output']; - voterAddress: Scalars['String']['output']; - votingPower: Scalars['String']['output']; +export type TransfersResponse = { + __typename?: 'TransfersResponse'; + items: Array>; + /** Total number of matching transfers. */ + totalCount: Scalars['Int']['output']; }; -export type Query_VotesOffchainByProposalId_Items_Items = { - __typename?: 'query_votesOffchainByProposalId_items_items'; - choice?: Maybe; - created: Scalars['Float']['output']; - proposalId: Scalars['String']['output']; - proposalTitle: Scalars['String']['output']; - reason: Scalars['String']['output']; - voter: Scalars['String']['output']; - vp?: Maybe; +/** Single treasury time-series datapoint. */ +export type TreasuryItem = { + __typename?: 'TreasuryItem'; + /** Unix timestamp in milliseconds */ + date: Scalars['Float']['output']; + /** Treasury value in USD */ + value: Scalars['Float']['output']; }; -export type Query_VotesOffchain_Items_Items = { - __typename?: 'query_votesOffchain_items_items'; - choice?: Maybe; - created: Scalars['Float']['output']; - proposalId: Scalars['String']['output']; - proposalTitle: Scalars['String']['output']; - reason: Scalars['String']['output']; - voter: Scalars['String']['output']; - vp?: Maybe; +/** Paginated treasury time-series response. */ +export type TreasuryResponse = { + __typename?: 'TreasuryResponse'; + items: Array>; + /** Total number of items */ + totalCount: Scalars['Int']['output']; }; -export type Query_Votes_Items_Items = { - __typename?: 'query_votes_items_items'; - proposalId: Scalars['String']['output']; - proposalTitle?: Maybe; - reason?: Maybe; - support?: Maybe; - timestamp: Scalars['Int']['output']; - transactionHash: Scalars['String']['output']; - voterAddress: Scalars['String']['output']; +/** Voter or non-voter record associated with a proposal. */ +export type Voter = { + __typename?: 'Voter'; + lastVoteTimestamp: Scalars['Float']['output']; + voter: Scalars['String']['output']; votingPower: Scalars['String']['output']; + votingPowerVariation: Scalars['String']['output']; }; -export type Query_VotingPowerByAccountId_Variation = { - __typename?: 'query_votingPowerByAccountId_variation'; - absoluteChange: Scalars['String']['output']; - percentageChange: Scalars['String']['output']; +/** Paginated voter or non-voter records for a proposal. */ +export type VotersResponse = { + __typename?: 'VotersResponse'; + items: Array>; + totalCount: Scalars['Int']['output']; +}; +/** Vote-count comparison between two adjacent time windows. */ +export type VotesComparisonResponse = { + __typename?: 'VotesComparisonResponse'; + /** Relative change between current and previous periods. */ + changeRate: Scalars['Float']['output']; + /** Number of votes cast in the current period. */ + currentVotes: Scalars['Int']['output']; + /** Number of votes cast in the comparison period. */ + oldVotes: Scalars['Int']['output']; +}; +/** Current voting power snapshot for one account. */ +export type VotingPower = { + __typename?: 'VotingPower'; + /** Account address. */ + accountId: Scalars['String']['output']; + /** Current token balance encoded as a decimal string. */ + balance?: Maybe; + /** Total delegations associated with the account. */ + delegationsCount: Scalars['Int']['output']; + /** Total proposals created by the account. */ + proposalsCount: Scalars['Int']['output']; + variation: VotingPowerVariationField; + /** Total votes cast by the account. */ + votesCount: Scalars['Int']['output']; + /** Current voting power encoded as a decimal string. */ + votingPower: Scalars['String']['output']; }; -export type Query_VotingPowerVariationsByAccountId_Data = { - __typename?: 'query_votingPowerVariationsByAccountId_data'; +/** Voting power delta for a single account across two timestamps. */ +export type VotingPowerVariation = { + __typename?: 'VotingPowerVariation'; + /** Absolute voting power change encoded as a decimal string. */ absoluteChange: Scalars['String']['output']; + /** Account address. */ accountId: Scalars['String']['output']; + /** Voting power at the end of the comparison window. */ currentVotingPower: Scalars['String']['output']; + /** Relative voting power change encoded as a decimal string. */ percentageChange: Scalars['String']['output']; + /** Voting power at the start of the comparison window. */ previousVotingPower: Scalars['String']['output']; }; -export type Query_VotingPowerVariationsByAccountId_Period = { - __typename?: 'query_votingPowerVariationsByAccountId_period'; - endTimestamp: Scalars['String']['output']; - startTimestamp: Scalars['String']['output']; -}; -export type Query_VotingPowerVariations_Items_Items = { - __typename?: 'query_votingPowerVariations_items_items'; +/** Embedded voting power delta metadata for a current voting power row. */ +export type VotingPowerVariationField = { + __typename?: 'VotingPowerVariationField'; absoluteChange: Scalars['String']['output']; - accountId: Scalars['String']['output']; - currentVotingPower: Scalars['String']['output']; percentageChange: Scalars['String']['output']; - previousVotingPower: Scalars['String']['output']; }; -export type Query_VotingPowerVariations_Period = { - __typename?: 'query_votingPowerVariations_period'; - endTimestamp: Scalars['String']['output']; - startTimestamp: Scalars['String']['output']; +/** Voting power variation response for a single account. */ +export type VotingPowerVariationsByAccountIdResponse = { + __typename?: 'VotingPowerVariationsByAccountIdResponse'; + data: VotingPowerVariation; + period: PeriodResponse; +}; +/** List of voting power variations for multiple accounts in the selected period. */ +export type VotingPowerVariationsResponse = { + __typename?: 'VotingPowerVariationsResponse'; + items: Array>; + period: PeriodResponse; +}; +/** Paginated current voting power records. */ +export type VotingPowersResponse = { + __typename?: 'VotingPowersResponse'; + items: Array>; + /** Total number of matching voting power rows. */ + totalCount: Scalars['Int']['output']; }; -export type Query_VotingPowers_Items_Items = { - __typename?: 'query_votingPowers_items_items'; - accountId: Scalars['String']['output']; - balance?: Maybe; - delegationsCount: Scalars['Float']['output']; - proposalsCount: Scalars['Float']['output']; - variation: Query_VotingPowers_Items_Items_Variation; - votesCount: Scalars['Float']['output']; - votingPower: Scalars['String']['output']; +export declare enum Error_Const { + Error = "error" +} +export type GetAddress_200_Response = { + __typename?: 'getAddress_200_response'; + /** EIP-55 checksummed Ethereum address */ + address: Scalars['String']['output']; + arkham?: Maybe; + ens?: Maybe; + /** Whether the address is a smart contract (true) or an externally-owned account (false) */ + isContract: Scalars['Boolean']['output']; }; -export type Query_VotingPowers_Items_Items_Variation = { - __typename?: 'query_votingPowers_items_items_variation'; - absoluteChange: Scalars['String']['output']; - percentageChange: Scalars['String']['output']; +export type GetAddresses_200_Response = { + __typename?: 'getAddresses_200_response'; + /** Enrichment results for each successfully resolved address. Addresses that failed to resolve are omitted. */ + results: Array>; }; -export declare enum Timestamp_Const { +export type Health_200_Response = { + __typename?: 'health_200_response'; + database: Ok_Const; + status: Ok_Const; +}; +export type Health_503_Response = { + __typename?: 'health_503_response'; + database: Error_Const; + message: Scalars['String']['output']; + status: Error_Const; +}; +export type Health_Response = Health_200_Response | Health_503_Response; +export type OffchainProposalById_Response = ErrorResponse | OffchainProposal; +export type OffchainProposalNonVoters_Response = ErrorResponse | OffchainVotersResponse; +export declare enum Ok_Const { + Ok = "ok" +} +export type Proposal_Response = ErrorResponse | OnchainProposal; +export declare enum QueryInput_AccountBalances_OrderBy { + Balance = "balance", + SignedVariation = "signedVariation", + Variation = "variation" +} +/** Field used to sort interaction rows. */ +export declare enum QueryInput_AccountInteractions_OrderBy { + Count = "count", + Volume = "volume" +} +export declare enum QueryInput_Delegators_OrderBy { + Amount = "amount", + Timestamp = "timestamp" +} +/** Field used to sort feed events. */ +export declare enum QueryInput_FeedEvents_OrderBy { + Timestamp = "timestamp", + Value = "value" +} +/** Filter events by relevance tier. */ +export declare enum QueryInput_FeedEvents_Relevance { + High = "HIGH", + Low = "LOW", + Medium = "MEDIUM" +} +/** Filter events by governance activity type. */ +export declare enum QueryInput_FeedEvents_Type { + Delegation = "DELEGATION", + Proposal = "PROPOSAL", + ProposalExtended = "PROPOSAL_EXTENDED", + Transfer = "TRANSFER", + Vote = "VOTE" +} +/** Field used to sort historical balance rows. */ +export declare enum QueryInput_HistoricalBalances_OrderBy { + Delta = "delta", + Timestamp = "timestamp" +} +/** Field used to sort historical voting power rows. */ +export declare enum QueryInput_HistoricalVotingPowerByAccountId_OrderBy { + Delta = "delta", + Timestamp = "timestamp" +} +/** Field used to sort historical voting power rows. */ +export declare enum QueryInput_HistoricalVotingPower_OrderBy { + Delta = "delta", + Timestamp = "timestamp" +} +/** Chart identifier whose freshness timestamp should be returned. */ +export declare enum QueryInput_LastUpdate_Chart { + AttackProfitability = "attack_profitability", + CostComparison = "cost_comparison", + TokenDistribution = "token_distribution" +} +export declare enum QueryInput_OffchainProposals_Status_Items { + Active = "active", + Closed = "closed", + Pending = "pending" +} +/** Field used to sort proposal activity results. */ +export declare enum QueryInput_ProposalsActivity_OrderBy { + Timestamp = "timestamp", + VoteTiming = "voteTiming", + VotingPower = "votingPower" +} +/** Optional vote filter. Use yes, no, abstain, or no-vote to narrow the result set. */ +export declare enum QueryInput_ProposalsActivity_UserVoteFilter { + Abstain = "abstain", + No = "no", + NoVote = "no_vote", + Yes = "yes" +} +export declare enum QueryInput_Proposals_Status_Items { + Active = "ACTIVE", + Canceled = "CANCELED", + Defeated = "DEFEATED", + Executed = "EXECUTED", + Expired = "EXPIRED", + NoQuorum = "NO_QUORUM", + Pending = "PENDING", + PendingExecution = "PENDING_EXECUTION", + Queued = "QUEUED", + Succeeded = "SUCCEEDED", + Vetoed = "VETOED" +} +/** Metric family to query. */ +export declare enum QueryInput_TokenMetrics_MetricType { + CexSupply = "CEX_SUPPLY", + CirculatingSupply = "CIRCULATING_SUPPLY", + DelegatedSupply = "DELEGATED_SUPPLY", + DexSupply = "DEX_SUPPLY", + LendingSupply = "LENDING_SUPPLY", + TotalSupply = "TOTAL_SUPPLY", + Treasury = "TREASURY" +} +/** Currency to use when fetching token price data. */ +export declare enum QueryInput_Token_Currency { + Eth = "eth", + Usd = "usd" +} +export declare enum QueryInput_Transactions_AffectedSupply_Items { + Cex = "CEX", + Dex = "DEX", + Lending = "LENDING", + Total = "TOTAL", + Unassigned = "UNASSIGNED" +} +export declare enum QueryInput_Transactions_Includes_Items { + Delegation = "DELEGATION", + Transfer = "TRANSFER" +} +/** Field used to sort transfers. */ +export declare enum QueryInput_Transfers_OrderBy { + Amount = "amount", Timestamp = "timestamp" } -export type TokenMetrics_200_Response = { - __typename?: 'tokenMetrics_200_response'; - items: Array>; - pageInfo: Query_TokenMetrics_PageInfo; +/** Sort votes by timestamp or voting power. */ +export declare enum QueryInput_VotesByProposalId_OrderBy { + Timestamp = "timestamp", + VotingPower = "votingPower" +} +/** Sort votes by timestamp or voting power. */ +export declare enum QueryInput_VotesOffchainByProposalId_OrderBy { + Timestamp = "timestamp", + VotingPower = "votingPower" +} +/** Sort votes by timestamp or voting power. */ +export declare enum QueryInput_VotesOffchain_OrderBy { + Timestamp = "timestamp", + VotingPower = "votingPower" +} +/** Sort votes by timestamp or voting power. */ +export declare enum QueryInput_Votes_OrderBy { + Timestamp = "timestamp", + VotingPower = "votingPower" +} +export declare enum QueryInput_VotingPowers_OrderBy { + Balance = "balance", + DelegationsCount = "delegationsCount", + SignedVariation = "signedVariation", + Total = "total", + Variation = "variation", + VotingPower = "votingPower" +} +/** Arkham Intelligence label data. null when no data is available for the address. */ +export type Query_GetAddress_Arkham = { + __typename?: 'query_getAddress_arkham'; + /** Human-readable name of the entity that owns the address according to Arkham Intelligence */ + entity?: Maybe; + /** Category of the entity (e.g. 'individual', 'exchange', 'protocol', 'fund') */ + entityType?: Maybe; + /** Fine-grained label for the specific address within the entity */ + label?: Maybe; + /** Twitter/X handle associated with the entity, without '@' */ + twitter?: Maybe; }; -export type Token_200_Response = { - __typename?: 'token_200_response'; - cexSupply: Scalars['String']['output']; - circulatingSupply: Scalars['String']['output']; - decimals: Scalars['Float']['output']; - delegatedSupply: Scalars['String']['output']; - dexSupply: Scalars['String']['output']; - id: Scalars['String']['output']; - lendingSupply: Scalars['String']['output']; +/** ENS (Ethereum Name Service) data. null when no ENS name is registered for the address. Cached with a configurable TTL. */ +export type Query_GetAddress_Ens = { + __typename?: 'query_getAddress_ens'; + /** URL of the ENS avatar image */ + avatar?: Maybe; + /** URL of the ENS profile banner image */ + banner?: Maybe; + /** Primary ENS name reverse-resolved for this address */ name?: Maybe; - nonCirculatingSupply: Scalars['String']['output']; - price: Scalars['String']['output']; - totalSupply: Scalars['String']['output']; - treasury: Scalars['String']['output']; }; -export type Transactions_200_Response = { - __typename?: 'transactions_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; -export type Transfers_200_Response = { - __typename?: 'transfers_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; -export type VotesByProposalId_200_Response = { - __typename?: 'votesByProposalId_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; -export type VotesOffchainByProposalId_200_Response = { - __typename?: 'votesOffchainByProposalId_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; -export type VotesOffchain_200_Response = { - __typename?: 'votesOffchain_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; -export type Votes_200_Response = { - __typename?: 'votes_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; -export type VotingPowerByAccountId_200_Response = { - __typename?: 'votingPowerByAccountId_200_response'; - accountId: Scalars['String']['output']; - balance?: Maybe; - delegationsCount: Scalars['Float']['output']; - proposalsCount: Scalars['Float']['output']; - variation: Query_VotingPowerByAccountId_Variation; - votesCount: Scalars['Float']['output']; - votingPower: Scalars['String']['output']; +export type Query_GetAddresses_Results_Items = { + __typename?: 'query_getAddresses_results_items'; + /** EIP-55 checksummed Ethereum address */ + address: Scalars['String']['output']; + arkham?: Maybe; + ens?: Maybe; + /** Whether the address is a smart contract (true) or an externally-owned account (false) */ + isContract: Scalars['Boolean']['output']; }; -export type VotingPowerVariationsByAccountId_200_Response = { - __typename?: 'votingPowerVariationsByAccountId_200_response'; - data: Query_VotingPowerVariationsByAccountId_Data; - period: Query_VotingPowerVariationsByAccountId_Period; +/** Arkham Intelligence label data. null when no data is available for the address. */ +export type Query_GetAddresses_Results_Items_Arkham = { + __typename?: 'query_getAddresses_results_items_arkham'; + /** Human-readable name of the entity that owns the address according to Arkham Intelligence */ + entity?: Maybe; + /** Category of the entity (e.g. 'individual', 'exchange', 'protocol', 'fund') */ + entityType?: Maybe; + /** Fine-grained label for the specific address within the entity */ + label?: Maybe; + /** Twitter/X handle associated with the entity, without '@' */ + twitter?: Maybe; }; -export type VotingPowerVariations_200_Response = { - __typename?: 'votingPowerVariations_200_response'; - items: Array>; - period: Query_VotingPowerVariations_Period; +/** ENS (Ethereum Name Service) data. null when no ENS name is registered for the address. Cached with a configurable TTL. */ +export type Query_GetAddresses_Results_Items_Ens = { + __typename?: 'query_getAddresses_results_items_ens'; + /** URL of the ENS avatar image */ + avatar?: Maybe; + /** URL of the ENS profile banner image */ + banner?: Maybe; + /** Primary ENS name reverse-resolved for this address */ + name?: Maybe; }; -export type VotingPowers_200_Response = { - __typename?: 'votingPowers_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; +export type Query_OffchainProposals_Items_Items_Strategies_Items = { + __typename?: 'query_offchainProposals_items_items_strategies_items'; + name: Scalars['String']['output']; + network: Scalars['String']['output']; + params: Scalars['JSON']['output']; }; +export type Token_Response = ErrorResponse | TokenPropertiesResponse; export type GetDaOsQueryVariables = Exact<{ [key: string]: never; }>; @@ -1687,7 +1534,7 @@ export type GetDaOsQuery = { daos: { __typename?: 'DAOList'; items: Array<{ - __typename?: 'dao_200_response'; + __typename?: 'DaoResponse'; id: string; votingDelay: string; chainId: number; @@ -1696,21 +1543,39 @@ export type GetDaOsQuery = { }>; }; }; +export type OffchainProposalNonVotersQueryVariables = Exact<{ + id: Scalars['String']['input']; + addresses?: InputMaybe> | InputMaybe>; + orderDirection?: InputMaybe; +}>; +export type OffchainProposalNonVotersQuery = { + __typename?: 'Query'; + offchainProposalNonVoters?: { + __typename?: 'ErrorResponse'; + } | { + __typename?: 'OffchainVotersResponse'; + items: Array<{ + __typename?: 'OffchainNonVoter'; + voter: string; + votingPower: string; + } | null>; + } | null; +}; export type ListOffchainProposalsQueryVariables = Exact<{ - skip?: InputMaybe; - limit?: InputMaybe; - orderDirection?: InputMaybe; - status?: InputMaybe; - fromDate?: InputMaybe; - endDate?: InputMaybe; + skip?: InputMaybe; + limit?: InputMaybe; + orderDirection?: InputMaybe; + status?: InputMaybe> | InputMaybe>; + fromDate?: InputMaybe; + endDate?: InputMaybe; }>; export type ListOffchainProposalsQuery = { __typename?: 'Query'; offchainProposals?: { - __typename?: 'offchainProposals_200_response'; + __typename?: 'OffchainProposalsResponse'; totalCount: number; items: Array<{ - __typename?: 'query_offchainProposals_items_items'; + __typename?: 'OffchainProposal'; id: string; title: string; discussion: string; @@ -1722,25 +1587,25 @@ export type ListOffchainProposalsQuery = { } | null; }; export type ListOffchainVotesQueryVariables = Exact<{ - fromDate?: InputMaybe; - toDate?: InputMaybe; - limit?: InputMaybe; - skip?: InputMaybe; + fromDate?: InputMaybe; + toDate?: InputMaybe; + limit?: InputMaybe; + skip?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - voterAddresses?: InputMaybe; + orderDirection?: InputMaybe; + voterAddresses?: InputMaybe> | InputMaybe>; }>; export type ListOffchainVotesQuery = { __typename?: 'Query'; votesOffchain?: { - __typename?: 'votesOffchain_200_response'; + __typename?: 'OffchainVotesResponse'; totalCount: number; items: Array<{ - __typename?: 'query_votesOffchain_items_items'; + __typename?: 'OffchainVote'; voter: string; created: number; proposalId: string; - proposalTitle: string; + proposalTitle?: string | null; reason: string; vp?: number | null; } | null>; @@ -1748,14 +1613,14 @@ export type ListOffchainVotesQuery = { }; export type ProposalNonVotersQueryVariables = Exact<{ id: Scalars['String']['input']; - addresses?: InputMaybe; + addresses?: InputMaybe> | InputMaybe>; }>; export type ProposalNonVotersQuery = { __typename?: 'Query'; proposalNonVoters?: { - __typename?: 'proposalNonVoters_200_response'; + __typename?: 'VotersResponse'; items: Array<{ - __typename?: 'query_proposalNonVoters_items_items'; + __typename?: 'Voter'; voter: string; } | null>; } | null; @@ -1766,7 +1631,9 @@ export type GetProposalByIdQueryVariables = Exact<{ export type GetProposalByIdQuery = { __typename?: 'Query'; proposal?: { - __typename?: 'proposal_200_response'; + __typename?: 'ErrorResponse'; + } | { + __typename?: 'OnchainProposal'; id: string; daoId: string; proposerAccountId: string; @@ -1774,8 +1641,8 @@ export type GetProposalByIdQuery = { description: string; startBlock: number; endBlock: number; - endTimestamp: string; - timestamp: string; + endTimestamp: number; + timestamp: number; status: string; forVotes: string; againstVotes: string; @@ -1784,21 +1651,21 @@ export type GetProposalByIdQuery = { } | null; }; export type ListProposalsQueryVariables = Exact<{ - skip?: InputMaybe; - limit?: InputMaybe; - orderDirection?: InputMaybe; - status?: InputMaybe; - fromDate?: InputMaybe; - fromEndDate?: InputMaybe; - includeOptimisticProposals?: InputMaybe; + skip?: InputMaybe; + limit?: InputMaybe; + orderDirection?: InputMaybe; + status?: InputMaybe> | InputMaybe>; + fromDate?: InputMaybe; + fromEndDate?: InputMaybe; + includeOptimisticProposals?: InputMaybe; }>; export type ListProposalsQuery = { __typename?: 'Query'; proposals?: { - __typename?: 'proposals_200_response'; + __typename?: 'OnchainProposalsResponse'; totalCount: number; items: Array<{ - __typename?: 'query_proposals_items_items'; + __typename?: 'OnchainProposal'; id: string; daoId: string; proposerAccountId: string; @@ -1806,8 +1673,8 @@ export type ListProposalsQuery = { description: string; startBlock: number; endBlock: number; - endTimestamp: string; - timestamp: string; + endTimestamp: number; + timestamp: number; status: string; forVotes: string; againstVotes: string; @@ -1817,37 +1684,37 @@ export type ListProposalsQuery = { } | null; }; export type GetEventRelevanceThresholdQueryVariables = Exact<{ - relevance: QueryInput_GetEventRelevanceThreshold_Relevance; - type: QueryInput_GetEventRelevanceThreshold_Type; + relevance: FeedRelevance; + type: FeedEventType; }>; export type GetEventRelevanceThresholdQuery = { __typename?: 'Query'; getEventRelevanceThreshold?: { - __typename?: 'getEventRelevanceThreshold_200_response'; + __typename?: 'EventRelevanceThresholdResponse'; threshold: string; } | null; }; export type ListVotesQueryVariables = Exact<{ - voterAddressIn?: InputMaybe; - fromDate?: InputMaybe; - toDate?: InputMaybe; - limit?: InputMaybe; - skip?: InputMaybe; + voterAddressIn?: InputMaybe> | InputMaybe>; + fromDate?: InputMaybe; + toDate?: InputMaybe; + limit?: InputMaybe; + skip?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - support?: InputMaybe; + orderDirection?: InputMaybe; + support?: InputMaybe; }>; export type ListVotesQuery = { __typename?: 'Query'; votes?: { - __typename?: 'votes_200_response'; + __typename?: 'OnchainVotesResponse'; totalCount: number; items: Array<{ - __typename?: 'query_votes_items_items'; + __typename?: 'OnchainVote'; transactionHash: string; proposalId: string; voterAddress: string; - support?: number | null; + support?: string | null; votingPower: string; timestamp: number; reason?: string | null; @@ -1856,20 +1723,20 @@ export type ListVotesQuery = { } | null; }; export type ListHistoricalVotingPowerQueryVariables = Exact<{ - limit?: InputMaybe; - skip?: InputMaybe; + limit?: InputMaybe; + skip?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - fromDate?: InputMaybe; + orderDirection?: InputMaybe; + fromDate?: InputMaybe; address?: InputMaybe; }>; export type ListHistoricalVotingPowerQuery = { __typename?: 'Query'; historicalVotingPower?: { - __typename?: 'historicalVotingPower_200_response'; + __typename?: 'HistoricalVotingPowersResponse'; totalCount: number; items: Array<{ - __typename?: 'query_historicalVotingPower_items_items'; + __typename?: 'HistoricalVotingPower'; accountId: string; timestamp: string; votingPower: string; @@ -1878,14 +1745,14 @@ export type ListHistoricalVotingPowerQuery = { transactionHash: string; logIndex: number; delegation?: { - __typename?: 'query_historicalVotingPower_items_items_delegation'; + __typename?: 'HistoricalVotingPowerDelegation'; from: string; to: string; value: string; previousDelegate?: string | null; } | null; transfer?: { - __typename?: 'query_historicalVotingPower_items_items_transfer'; + __typename?: 'HistoricalVotingPowerTransfer'; from: string; to: string; value: string; @@ -1894,6 +1761,7 @@ export type ListHistoricalVotingPowerQuery = { } | null; }; export declare const GetDaOsDocument: DocumentNode; +export declare const OffchainProposalNonVotersDocument: DocumentNode; export declare const ListOffchainProposalsDocument: DocumentNode; export declare const ListOffchainVotesDocument: DocumentNode; export declare const ProposalNonVotersDocument: DocumentNode; diff --git a/packages/anticapture-client/dist/gql/graphql.js b/packages/anticapture-client/dist/gql/graphql.js index 71c30fdb..3100cc35 100644 --- a/packages/anticapture-client/dist/gql/graphql.js +++ b/packages/anticapture-client/dist/gql/graphql.js @@ -1,7 +1,30 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.QueryInput_Token_Currency = exports.QueryInput_TokenMetrics_OrderDirection = exports.QueryInput_TokenMetrics_MetricType = exports.QueryInput_Proposals_OrderDirection = exports.QueryInput_Proposals_IncludeOptimisticProposals = exports.QueryInput_ProposalsActivity_UserVoteFilter = exports.QueryInput_ProposalsActivity_OrderDirection = exports.QueryInput_ProposalsActivity_OrderBy = exports.QueryInput_ProposalNonVoters_OrderDirection = exports.QueryInput_OffchainProposals_OrderDirection = exports.QueryInput_LastUpdate_Chart = exports.QueryInput_HistoricalVotingPower_OrderDirection = exports.QueryInput_HistoricalVotingPower_OrderBy = exports.QueryInput_HistoricalVotingPowerByAccountId_OrderDirection = exports.QueryInput_HistoricalVotingPowerByAccountId_OrderBy = exports.QueryInput_HistoricalDelegations_OrderDirection = exports.QueryInput_HistoricalBalances_OrderDirection = exports.QueryInput_HistoricalBalances_OrderBy = exports.QueryInput_GetTotalTreasury_Order = exports.QueryInput_GetTotalTreasury_Days = exports.QueryInput_GetLiquidTreasury_Order = exports.QueryInput_GetLiquidTreasury_Days = exports.QueryInput_GetEventRelevanceThreshold_Type = exports.QueryInput_GetEventRelevanceThreshold_Relevance = exports.QueryInput_GetDaoTokenTreasury_Order = exports.QueryInput_GetDaoTokenTreasury_Days = exports.QueryInput_FeedEvents_Type = exports.QueryInput_FeedEvents_Relevance = exports.QueryInput_FeedEvents_OrderDirection = exports.QueryInput_FeedEvents_OrderBy = exports.QueryInput_Delegators_OrderDirection = exports.QueryInput_Delegators_OrderBy = exports.QueryInput_DelegationPercentageByDay_OrderDirection = exports.QueryInput_CompareVotes_Days = exports.QueryInput_CompareTreasury_Days = exports.QueryInput_CompareTotalSupply_Days = exports.QueryInput_CompareProposals_Days = exports.QueryInput_CompareLendingSupply_Days = exports.QueryInput_CompareDexSupply_Days = exports.QueryInput_CompareDelegatedSupply_Days = exports.QueryInput_CompareCirculatingSupply_Days = exports.QueryInput_CompareCexSupply_Days = exports.QueryInput_CompareAverageTurnout_Days = exports.QueryInput_CompareActiveSupply_Days = exports.QueryInput_AccountInteractions_OrderDirection = exports.QueryInput_AccountInteractions_OrderBy = exports.QueryInput_AccountBalances_OrderDirection = exports.QueryInput_AccountBalances_OrderBy = exports.QueryInput_AccountBalanceVariations_OrderDirection = exports.HttpMethod = void 0; -exports.ListHistoricalVotingPowerDocument = exports.ListVotesDocument = exports.GetEventRelevanceThresholdDocument = exports.ListProposalsDocument = exports.GetProposalByIdDocument = exports.ProposalNonVotersDocument = exports.ListOffchainVotesDocument = exports.ListOffchainProposalsDocument = exports.GetDaOsDocument = exports.Timestamp_Const = exports.Query_FeedEvents_Items_Items_Type = exports.Query_FeedEvents_Items_Items_Relevance = exports.QueryInput_VotingPowers_OrderDirection = exports.QueryInput_VotingPowers_OrderBy = exports.QueryInput_VotingPowerVariations_OrderDirection = exports.QueryInput_Votes_OrderDirection = exports.QueryInput_Votes_OrderBy = exports.QueryInput_VotesOffchain_OrderDirection = exports.QueryInput_VotesOffchain_OrderBy = exports.QueryInput_VotesOffchainByProposalId_OrderDirection = exports.QueryInput_VotesOffchainByProposalId_OrderBy = exports.QueryInput_VotesByProposalId_OrderDirection = exports.QueryInput_VotesByProposalId_OrderBy = exports.QueryInput_Transfers_SortOrder = exports.QueryInput_Transfers_SortBy = exports.QueryInput_Transactions_SortOrder = void 0; +exports.ListHistoricalVotingPowerDocument = exports.ListVotesDocument = exports.GetEventRelevanceThresholdDocument = exports.ListProposalsDocument = exports.GetProposalByIdDocument = exports.ProposalNonVotersDocument = exports.ListOffchainVotesDocument = exports.ListOffchainProposalsDocument = exports.OffchainProposalNonVotersDocument = exports.GetDaOsDocument = exports.QueryInput_VotingPowers_OrderBy = exports.QueryInput_Votes_OrderBy = exports.QueryInput_VotesOffchain_OrderBy = exports.QueryInput_VotesOffchainByProposalId_OrderBy = exports.QueryInput_VotesByProposalId_OrderBy = exports.QueryInput_Transfers_OrderBy = exports.QueryInput_Transactions_Includes_Items = exports.QueryInput_Transactions_AffectedSupply_Items = exports.QueryInput_Token_Currency = exports.QueryInput_TokenMetrics_MetricType = exports.QueryInput_Proposals_Status_Items = exports.QueryInput_ProposalsActivity_UserVoteFilter = exports.QueryInput_ProposalsActivity_OrderBy = exports.QueryInput_OffchainProposals_Status_Items = exports.QueryInput_LastUpdate_Chart = exports.QueryInput_HistoricalVotingPower_OrderBy = exports.QueryInput_HistoricalVotingPowerByAccountId_OrderBy = exports.QueryInput_HistoricalBalances_OrderBy = exports.QueryInput_FeedEvents_Type = exports.QueryInput_FeedEvents_Relevance = exports.QueryInput_FeedEvents_OrderBy = exports.QueryInput_Delegators_OrderBy = exports.QueryInput_AccountInteractions_OrderBy = exports.QueryInput_AccountBalances_OrderBy = exports.Ok_Const = exports.Error_Const = exports.OrderDirection = exports.HttpMethod = exports.FeedRelevance = exports.FeedEventType = exports.DaysWindow = void 0; +var DaysWindow; +(function (DaysWindow) { + DaysWindow["7d"] = "_7d"; + DaysWindow["30d"] = "_30d"; + DaysWindow["90d"] = "_90d"; + DaysWindow["180d"] = "_180d"; + DaysWindow["365d"] = "_365d"; +})(DaysWindow || (exports.DaysWindow = DaysWindow = {})); +/** Filter events by governance activity type. */ +var FeedEventType; +(function (FeedEventType) { + FeedEventType["Delegation"] = "DELEGATION"; + FeedEventType["Proposal"] = "PROPOSAL"; + FeedEventType["ProposalExtended"] = "PROPOSAL_EXTENDED"; + FeedEventType["Transfer"] = "TRANSFER"; + FeedEventType["Vote"] = "VOTE"; +})(FeedEventType || (exports.FeedEventType = FeedEventType = {})); +/** Filter events by relevance tier. */ +var FeedRelevance; +(function (FeedRelevance) { + FeedRelevance["High"] = "HIGH"; + FeedRelevance["Low"] = "LOW"; + FeedRelevance["Medium"] = "MEDIUM"; +})(FeedRelevance || (exports.FeedRelevance = FeedRelevance = {})); var HttpMethod; (function (HttpMethod) { HttpMethod["Connect"] = "CONNECT"; @@ -14,151 +37,51 @@ var HttpMethod; HttpMethod["Put"] = "PUT"; HttpMethod["Trace"] = "TRACE"; })(HttpMethod || (exports.HttpMethod = HttpMethod = {})); -var QueryInput_AccountBalanceVariations_OrderDirection; -(function (QueryInput_AccountBalanceVariations_OrderDirection) { - QueryInput_AccountBalanceVariations_OrderDirection["Asc"] = "asc"; - QueryInput_AccountBalanceVariations_OrderDirection["Desc"] = "desc"; -})(QueryInput_AccountBalanceVariations_OrderDirection || (exports.QueryInput_AccountBalanceVariations_OrderDirection = QueryInput_AccountBalanceVariations_OrderDirection = {})); +/** Sort direction for ordered query results. */ +var OrderDirection; +(function (OrderDirection) { + OrderDirection["Asc"] = "asc"; + OrderDirection["Desc"] = "desc"; +})(OrderDirection || (exports.OrderDirection = OrderDirection = {})); +var Error_Const; +(function (Error_Const) { + Error_Const["Error"] = "error"; +})(Error_Const || (exports.Error_Const = Error_Const = {})); +var Ok_Const; +(function (Ok_Const) { + Ok_Const["Ok"] = "ok"; +})(Ok_Const || (exports.Ok_Const = Ok_Const = {})); var QueryInput_AccountBalances_OrderBy; (function (QueryInput_AccountBalances_OrderBy) { QueryInput_AccountBalances_OrderBy["Balance"] = "balance"; QueryInput_AccountBalances_OrderBy["SignedVariation"] = "signedVariation"; QueryInput_AccountBalances_OrderBy["Variation"] = "variation"; })(QueryInput_AccountBalances_OrderBy || (exports.QueryInput_AccountBalances_OrderBy = QueryInput_AccountBalances_OrderBy = {})); -var QueryInput_AccountBalances_OrderDirection; -(function (QueryInput_AccountBalances_OrderDirection) { - QueryInput_AccountBalances_OrderDirection["Asc"] = "asc"; - QueryInput_AccountBalances_OrderDirection["Desc"] = "desc"; -})(QueryInput_AccountBalances_OrderDirection || (exports.QueryInput_AccountBalances_OrderDirection = QueryInput_AccountBalances_OrderDirection = {})); +/** Field used to sort interaction rows. */ var QueryInput_AccountInteractions_OrderBy; (function (QueryInput_AccountInteractions_OrderBy) { QueryInput_AccountInteractions_OrderBy["Count"] = "count"; QueryInput_AccountInteractions_OrderBy["Volume"] = "volume"; })(QueryInput_AccountInteractions_OrderBy || (exports.QueryInput_AccountInteractions_OrderBy = QueryInput_AccountInteractions_OrderBy = {})); -var QueryInput_AccountInteractions_OrderDirection; -(function (QueryInput_AccountInteractions_OrderDirection) { - QueryInput_AccountInteractions_OrderDirection["Asc"] = "asc"; - QueryInput_AccountInteractions_OrderDirection["Desc"] = "desc"; -})(QueryInput_AccountInteractions_OrderDirection || (exports.QueryInput_AccountInteractions_OrderDirection = QueryInput_AccountInteractions_OrderDirection = {})); -var QueryInput_CompareActiveSupply_Days; -(function (QueryInput_CompareActiveSupply_Days) { - QueryInput_CompareActiveSupply_Days["7d"] = "_7d"; - QueryInput_CompareActiveSupply_Days["30d"] = "_30d"; - QueryInput_CompareActiveSupply_Days["90d"] = "_90d"; - QueryInput_CompareActiveSupply_Days["180d"] = "_180d"; - QueryInput_CompareActiveSupply_Days["365d"] = "_365d"; -})(QueryInput_CompareActiveSupply_Days || (exports.QueryInput_CompareActiveSupply_Days = QueryInput_CompareActiveSupply_Days = {})); -var QueryInput_CompareAverageTurnout_Days; -(function (QueryInput_CompareAverageTurnout_Days) { - QueryInput_CompareAverageTurnout_Days["7d"] = "_7d"; - QueryInput_CompareAverageTurnout_Days["30d"] = "_30d"; - QueryInput_CompareAverageTurnout_Days["90d"] = "_90d"; - QueryInput_CompareAverageTurnout_Days["180d"] = "_180d"; - QueryInput_CompareAverageTurnout_Days["365d"] = "_365d"; -})(QueryInput_CompareAverageTurnout_Days || (exports.QueryInput_CompareAverageTurnout_Days = QueryInput_CompareAverageTurnout_Days = {})); -var QueryInput_CompareCexSupply_Days; -(function (QueryInput_CompareCexSupply_Days) { - QueryInput_CompareCexSupply_Days["7d"] = "_7d"; - QueryInput_CompareCexSupply_Days["30d"] = "_30d"; - QueryInput_CompareCexSupply_Days["90d"] = "_90d"; - QueryInput_CompareCexSupply_Days["180d"] = "_180d"; - QueryInput_CompareCexSupply_Days["365d"] = "_365d"; -})(QueryInput_CompareCexSupply_Days || (exports.QueryInput_CompareCexSupply_Days = QueryInput_CompareCexSupply_Days = {})); -var QueryInput_CompareCirculatingSupply_Days; -(function (QueryInput_CompareCirculatingSupply_Days) { - QueryInput_CompareCirculatingSupply_Days["7d"] = "_7d"; - QueryInput_CompareCirculatingSupply_Days["30d"] = "_30d"; - QueryInput_CompareCirculatingSupply_Days["90d"] = "_90d"; - QueryInput_CompareCirculatingSupply_Days["180d"] = "_180d"; - QueryInput_CompareCirculatingSupply_Days["365d"] = "_365d"; -})(QueryInput_CompareCirculatingSupply_Days || (exports.QueryInput_CompareCirculatingSupply_Days = QueryInput_CompareCirculatingSupply_Days = {})); -var QueryInput_CompareDelegatedSupply_Days; -(function (QueryInput_CompareDelegatedSupply_Days) { - QueryInput_CompareDelegatedSupply_Days["7d"] = "_7d"; - QueryInput_CompareDelegatedSupply_Days["30d"] = "_30d"; - QueryInput_CompareDelegatedSupply_Days["90d"] = "_90d"; - QueryInput_CompareDelegatedSupply_Days["180d"] = "_180d"; - QueryInput_CompareDelegatedSupply_Days["365d"] = "_365d"; -})(QueryInput_CompareDelegatedSupply_Days || (exports.QueryInput_CompareDelegatedSupply_Days = QueryInput_CompareDelegatedSupply_Days = {})); -var QueryInput_CompareDexSupply_Days; -(function (QueryInput_CompareDexSupply_Days) { - QueryInput_CompareDexSupply_Days["7d"] = "_7d"; - QueryInput_CompareDexSupply_Days["30d"] = "_30d"; - QueryInput_CompareDexSupply_Days["90d"] = "_90d"; - QueryInput_CompareDexSupply_Days["180d"] = "_180d"; - QueryInput_CompareDexSupply_Days["365d"] = "_365d"; -})(QueryInput_CompareDexSupply_Days || (exports.QueryInput_CompareDexSupply_Days = QueryInput_CompareDexSupply_Days = {})); -var QueryInput_CompareLendingSupply_Days; -(function (QueryInput_CompareLendingSupply_Days) { - QueryInput_CompareLendingSupply_Days["7d"] = "_7d"; - QueryInput_CompareLendingSupply_Days["30d"] = "_30d"; - QueryInput_CompareLendingSupply_Days["90d"] = "_90d"; - QueryInput_CompareLendingSupply_Days["180d"] = "_180d"; - QueryInput_CompareLendingSupply_Days["365d"] = "_365d"; -})(QueryInput_CompareLendingSupply_Days || (exports.QueryInput_CompareLendingSupply_Days = QueryInput_CompareLendingSupply_Days = {})); -var QueryInput_CompareProposals_Days; -(function (QueryInput_CompareProposals_Days) { - QueryInput_CompareProposals_Days["7d"] = "_7d"; - QueryInput_CompareProposals_Days["30d"] = "_30d"; - QueryInput_CompareProposals_Days["90d"] = "_90d"; - QueryInput_CompareProposals_Days["180d"] = "_180d"; - QueryInput_CompareProposals_Days["365d"] = "_365d"; -})(QueryInput_CompareProposals_Days || (exports.QueryInput_CompareProposals_Days = QueryInput_CompareProposals_Days = {})); -var QueryInput_CompareTotalSupply_Days; -(function (QueryInput_CompareTotalSupply_Days) { - QueryInput_CompareTotalSupply_Days["7d"] = "_7d"; - QueryInput_CompareTotalSupply_Days["30d"] = "_30d"; - QueryInput_CompareTotalSupply_Days["90d"] = "_90d"; - QueryInput_CompareTotalSupply_Days["180d"] = "_180d"; - QueryInput_CompareTotalSupply_Days["365d"] = "_365d"; -})(QueryInput_CompareTotalSupply_Days || (exports.QueryInput_CompareTotalSupply_Days = QueryInput_CompareTotalSupply_Days = {})); -var QueryInput_CompareTreasury_Days; -(function (QueryInput_CompareTreasury_Days) { - QueryInput_CompareTreasury_Days["7d"] = "_7d"; - QueryInput_CompareTreasury_Days["30d"] = "_30d"; - QueryInput_CompareTreasury_Days["90d"] = "_90d"; - QueryInput_CompareTreasury_Days["180d"] = "_180d"; - QueryInput_CompareTreasury_Days["365d"] = "_365d"; -})(QueryInput_CompareTreasury_Days || (exports.QueryInput_CompareTreasury_Days = QueryInput_CompareTreasury_Days = {})); -var QueryInput_CompareVotes_Days; -(function (QueryInput_CompareVotes_Days) { - QueryInput_CompareVotes_Days["7d"] = "_7d"; - QueryInput_CompareVotes_Days["30d"] = "_30d"; - QueryInput_CompareVotes_Days["90d"] = "_90d"; - QueryInput_CompareVotes_Days["180d"] = "_180d"; - QueryInput_CompareVotes_Days["365d"] = "_365d"; -})(QueryInput_CompareVotes_Days || (exports.QueryInput_CompareVotes_Days = QueryInput_CompareVotes_Days = {})); -var QueryInput_DelegationPercentageByDay_OrderDirection; -(function (QueryInput_DelegationPercentageByDay_OrderDirection) { - QueryInput_DelegationPercentageByDay_OrderDirection["Asc"] = "asc"; - QueryInput_DelegationPercentageByDay_OrderDirection["Desc"] = "desc"; -})(QueryInput_DelegationPercentageByDay_OrderDirection || (exports.QueryInput_DelegationPercentageByDay_OrderDirection = QueryInput_DelegationPercentageByDay_OrderDirection = {})); var QueryInput_Delegators_OrderBy; (function (QueryInput_Delegators_OrderBy) { QueryInput_Delegators_OrderBy["Amount"] = "amount"; QueryInput_Delegators_OrderBy["Timestamp"] = "timestamp"; })(QueryInput_Delegators_OrderBy || (exports.QueryInput_Delegators_OrderBy = QueryInput_Delegators_OrderBy = {})); -var QueryInput_Delegators_OrderDirection; -(function (QueryInput_Delegators_OrderDirection) { - QueryInput_Delegators_OrderDirection["Asc"] = "asc"; - QueryInput_Delegators_OrderDirection["Desc"] = "desc"; -})(QueryInput_Delegators_OrderDirection || (exports.QueryInput_Delegators_OrderDirection = QueryInput_Delegators_OrderDirection = {})); +/** Field used to sort feed events. */ var QueryInput_FeedEvents_OrderBy; (function (QueryInput_FeedEvents_OrderBy) { QueryInput_FeedEvents_OrderBy["Timestamp"] = "timestamp"; QueryInput_FeedEvents_OrderBy["Value"] = "value"; })(QueryInput_FeedEvents_OrderBy || (exports.QueryInput_FeedEvents_OrderBy = QueryInput_FeedEvents_OrderBy = {})); -var QueryInput_FeedEvents_OrderDirection; -(function (QueryInput_FeedEvents_OrderDirection) { - QueryInput_FeedEvents_OrderDirection["Asc"] = "asc"; - QueryInput_FeedEvents_OrderDirection["Desc"] = "desc"; -})(QueryInput_FeedEvents_OrderDirection || (exports.QueryInput_FeedEvents_OrderDirection = QueryInput_FeedEvents_OrderDirection = {})); +/** Filter events by relevance tier. */ var QueryInput_FeedEvents_Relevance; (function (QueryInput_FeedEvents_Relevance) { QueryInput_FeedEvents_Relevance["High"] = "HIGH"; QueryInput_FeedEvents_Relevance["Low"] = "LOW"; QueryInput_FeedEvents_Relevance["Medium"] = "MEDIUM"; })(QueryInput_FeedEvents_Relevance || (exports.QueryInput_FeedEvents_Relevance = QueryInput_FeedEvents_Relevance = {})); +/** Filter events by governance activity type. */ var QueryInput_FeedEvents_Type; (function (QueryInput_FeedEvents_Type) { QueryInput_FeedEvents_Type["Delegation"] = "DELEGATION"; @@ -167,122 +90,45 @@ var QueryInput_FeedEvents_Type; QueryInput_FeedEvents_Type["Transfer"] = "TRANSFER"; QueryInput_FeedEvents_Type["Vote"] = "VOTE"; })(QueryInput_FeedEvents_Type || (exports.QueryInput_FeedEvents_Type = QueryInput_FeedEvents_Type = {})); -var QueryInput_GetDaoTokenTreasury_Days; -(function (QueryInput_GetDaoTokenTreasury_Days) { - QueryInput_GetDaoTokenTreasury_Days["7d"] = "_7d"; - QueryInput_GetDaoTokenTreasury_Days["30d"] = "_30d"; - QueryInput_GetDaoTokenTreasury_Days["90d"] = "_90d"; - QueryInput_GetDaoTokenTreasury_Days["180d"] = "_180d"; - QueryInput_GetDaoTokenTreasury_Days["365d"] = "_365d"; -})(QueryInput_GetDaoTokenTreasury_Days || (exports.QueryInput_GetDaoTokenTreasury_Days = QueryInput_GetDaoTokenTreasury_Days = {})); -var QueryInput_GetDaoTokenTreasury_Order; -(function (QueryInput_GetDaoTokenTreasury_Order) { - QueryInput_GetDaoTokenTreasury_Order["Asc"] = "asc"; - QueryInput_GetDaoTokenTreasury_Order["Desc"] = "desc"; -})(QueryInput_GetDaoTokenTreasury_Order || (exports.QueryInput_GetDaoTokenTreasury_Order = QueryInput_GetDaoTokenTreasury_Order = {})); -var QueryInput_GetEventRelevanceThreshold_Relevance; -(function (QueryInput_GetEventRelevanceThreshold_Relevance) { - QueryInput_GetEventRelevanceThreshold_Relevance["High"] = "HIGH"; - QueryInput_GetEventRelevanceThreshold_Relevance["Low"] = "LOW"; - QueryInput_GetEventRelevanceThreshold_Relevance["Medium"] = "MEDIUM"; -})(QueryInput_GetEventRelevanceThreshold_Relevance || (exports.QueryInput_GetEventRelevanceThreshold_Relevance = QueryInput_GetEventRelevanceThreshold_Relevance = {})); -var QueryInput_GetEventRelevanceThreshold_Type; -(function (QueryInput_GetEventRelevanceThreshold_Type) { - QueryInput_GetEventRelevanceThreshold_Type["Delegation"] = "DELEGATION"; - QueryInput_GetEventRelevanceThreshold_Type["Proposal"] = "PROPOSAL"; - QueryInput_GetEventRelevanceThreshold_Type["ProposalExtended"] = "PROPOSAL_EXTENDED"; - QueryInput_GetEventRelevanceThreshold_Type["Transfer"] = "TRANSFER"; - QueryInput_GetEventRelevanceThreshold_Type["Vote"] = "VOTE"; -})(QueryInput_GetEventRelevanceThreshold_Type || (exports.QueryInput_GetEventRelevanceThreshold_Type = QueryInput_GetEventRelevanceThreshold_Type = {})); -var QueryInput_GetLiquidTreasury_Days; -(function (QueryInput_GetLiquidTreasury_Days) { - QueryInput_GetLiquidTreasury_Days["7d"] = "_7d"; - QueryInput_GetLiquidTreasury_Days["30d"] = "_30d"; - QueryInput_GetLiquidTreasury_Days["90d"] = "_90d"; - QueryInput_GetLiquidTreasury_Days["180d"] = "_180d"; - QueryInput_GetLiquidTreasury_Days["365d"] = "_365d"; -})(QueryInput_GetLiquidTreasury_Days || (exports.QueryInput_GetLiquidTreasury_Days = QueryInput_GetLiquidTreasury_Days = {})); -var QueryInput_GetLiquidTreasury_Order; -(function (QueryInput_GetLiquidTreasury_Order) { - QueryInput_GetLiquidTreasury_Order["Asc"] = "asc"; - QueryInput_GetLiquidTreasury_Order["Desc"] = "desc"; -})(QueryInput_GetLiquidTreasury_Order || (exports.QueryInput_GetLiquidTreasury_Order = QueryInput_GetLiquidTreasury_Order = {})); -var QueryInput_GetTotalTreasury_Days; -(function (QueryInput_GetTotalTreasury_Days) { - QueryInput_GetTotalTreasury_Days["7d"] = "_7d"; - QueryInput_GetTotalTreasury_Days["30d"] = "_30d"; - QueryInput_GetTotalTreasury_Days["90d"] = "_90d"; - QueryInput_GetTotalTreasury_Days["180d"] = "_180d"; - QueryInput_GetTotalTreasury_Days["365d"] = "_365d"; -})(QueryInput_GetTotalTreasury_Days || (exports.QueryInput_GetTotalTreasury_Days = QueryInput_GetTotalTreasury_Days = {})); -var QueryInput_GetTotalTreasury_Order; -(function (QueryInput_GetTotalTreasury_Order) { - QueryInput_GetTotalTreasury_Order["Asc"] = "asc"; - QueryInput_GetTotalTreasury_Order["Desc"] = "desc"; -})(QueryInput_GetTotalTreasury_Order || (exports.QueryInput_GetTotalTreasury_Order = QueryInput_GetTotalTreasury_Order = {})); +/** Field used to sort historical balance rows. */ var QueryInput_HistoricalBalances_OrderBy; (function (QueryInput_HistoricalBalances_OrderBy) { QueryInput_HistoricalBalances_OrderBy["Delta"] = "delta"; QueryInput_HistoricalBalances_OrderBy["Timestamp"] = "timestamp"; })(QueryInput_HistoricalBalances_OrderBy || (exports.QueryInput_HistoricalBalances_OrderBy = QueryInput_HistoricalBalances_OrderBy = {})); -var QueryInput_HistoricalBalances_OrderDirection; -(function (QueryInput_HistoricalBalances_OrderDirection) { - QueryInput_HistoricalBalances_OrderDirection["Asc"] = "asc"; - QueryInput_HistoricalBalances_OrderDirection["Desc"] = "desc"; -})(QueryInput_HistoricalBalances_OrderDirection || (exports.QueryInput_HistoricalBalances_OrderDirection = QueryInput_HistoricalBalances_OrderDirection = {})); -var QueryInput_HistoricalDelegations_OrderDirection; -(function (QueryInput_HistoricalDelegations_OrderDirection) { - QueryInput_HistoricalDelegations_OrderDirection["Asc"] = "asc"; - QueryInput_HistoricalDelegations_OrderDirection["Desc"] = "desc"; -})(QueryInput_HistoricalDelegations_OrderDirection || (exports.QueryInput_HistoricalDelegations_OrderDirection = QueryInput_HistoricalDelegations_OrderDirection = {})); +/** Field used to sort historical voting power rows. */ var QueryInput_HistoricalVotingPowerByAccountId_OrderBy; (function (QueryInput_HistoricalVotingPowerByAccountId_OrderBy) { QueryInput_HistoricalVotingPowerByAccountId_OrderBy["Delta"] = "delta"; QueryInput_HistoricalVotingPowerByAccountId_OrderBy["Timestamp"] = "timestamp"; })(QueryInput_HistoricalVotingPowerByAccountId_OrderBy || (exports.QueryInput_HistoricalVotingPowerByAccountId_OrderBy = QueryInput_HistoricalVotingPowerByAccountId_OrderBy = {})); -var QueryInput_HistoricalVotingPowerByAccountId_OrderDirection; -(function (QueryInput_HistoricalVotingPowerByAccountId_OrderDirection) { - QueryInput_HistoricalVotingPowerByAccountId_OrderDirection["Asc"] = "asc"; - QueryInput_HistoricalVotingPowerByAccountId_OrderDirection["Desc"] = "desc"; -})(QueryInput_HistoricalVotingPowerByAccountId_OrderDirection || (exports.QueryInput_HistoricalVotingPowerByAccountId_OrderDirection = QueryInput_HistoricalVotingPowerByAccountId_OrderDirection = {})); +/** Field used to sort historical voting power rows. */ var QueryInput_HistoricalVotingPower_OrderBy; (function (QueryInput_HistoricalVotingPower_OrderBy) { QueryInput_HistoricalVotingPower_OrderBy["Delta"] = "delta"; QueryInput_HistoricalVotingPower_OrderBy["Timestamp"] = "timestamp"; })(QueryInput_HistoricalVotingPower_OrderBy || (exports.QueryInput_HistoricalVotingPower_OrderBy = QueryInput_HistoricalVotingPower_OrderBy = {})); -var QueryInput_HistoricalVotingPower_OrderDirection; -(function (QueryInput_HistoricalVotingPower_OrderDirection) { - QueryInput_HistoricalVotingPower_OrderDirection["Asc"] = "asc"; - QueryInput_HistoricalVotingPower_OrderDirection["Desc"] = "desc"; -})(QueryInput_HistoricalVotingPower_OrderDirection || (exports.QueryInput_HistoricalVotingPower_OrderDirection = QueryInput_HistoricalVotingPower_OrderDirection = {})); +/** Chart identifier whose freshness timestamp should be returned. */ var QueryInput_LastUpdate_Chart; (function (QueryInput_LastUpdate_Chart) { QueryInput_LastUpdate_Chart["AttackProfitability"] = "attack_profitability"; QueryInput_LastUpdate_Chart["CostComparison"] = "cost_comparison"; QueryInput_LastUpdate_Chart["TokenDistribution"] = "token_distribution"; })(QueryInput_LastUpdate_Chart || (exports.QueryInput_LastUpdate_Chart = QueryInput_LastUpdate_Chart = {})); -var QueryInput_OffchainProposals_OrderDirection; -(function (QueryInput_OffchainProposals_OrderDirection) { - QueryInput_OffchainProposals_OrderDirection["Asc"] = "asc"; - QueryInput_OffchainProposals_OrderDirection["Desc"] = "desc"; -})(QueryInput_OffchainProposals_OrderDirection || (exports.QueryInput_OffchainProposals_OrderDirection = QueryInput_OffchainProposals_OrderDirection = {})); -var QueryInput_ProposalNonVoters_OrderDirection; -(function (QueryInput_ProposalNonVoters_OrderDirection) { - QueryInput_ProposalNonVoters_OrderDirection["Asc"] = "asc"; - QueryInput_ProposalNonVoters_OrderDirection["Desc"] = "desc"; -})(QueryInput_ProposalNonVoters_OrderDirection || (exports.QueryInput_ProposalNonVoters_OrderDirection = QueryInput_ProposalNonVoters_OrderDirection = {})); +var QueryInput_OffchainProposals_Status_Items; +(function (QueryInput_OffchainProposals_Status_Items) { + QueryInput_OffchainProposals_Status_Items["Active"] = "active"; + QueryInput_OffchainProposals_Status_Items["Closed"] = "closed"; + QueryInput_OffchainProposals_Status_Items["Pending"] = "pending"; +})(QueryInput_OffchainProposals_Status_Items || (exports.QueryInput_OffchainProposals_Status_Items = QueryInput_OffchainProposals_Status_Items = {})); +/** Field used to sort proposal activity results. */ var QueryInput_ProposalsActivity_OrderBy; (function (QueryInput_ProposalsActivity_OrderBy) { QueryInput_ProposalsActivity_OrderBy["Timestamp"] = "timestamp"; QueryInput_ProposalsActivity_OrderBy["VoteTiming"] = "voteTiming"; QueryInput_ProposalsActivity_OrderBy["VotingPower"] = "votingPower"; })(QueryInput_ProposalsActivity_OrderBy || (exports.QueryInput_ProposalsActivity_OrderBy = QueryInput_ProposalsActivity_OrderBy = {})); -var QueryInput_ProposalsActivity_OrderDirection; -(function (QueryInput_ProposalsActivity_OrderDirection) { - QueryInput_ProposalsActivity_OrderDirection["Asc"] = "asc"; - QueryInput_ProposalsActivity_OrderDirection["Desc"] = "desc"; -})(QueryInput_ProposalsActivity_OrderDirection || (exports.QueryInput_ProposalsActivity_OrderDirection = QueryInput_ProposalsActivity_OrderDirection = {})); -/** Filter proposals by vote type. Can be: 'yes' (For votes), 'no' (Against votes), 'abstain' (Abstain votes), 'no-vote' (Didn't vote) */ +/** Optional vote filter. Use yes, no, abstain, or no-vote to narrow the result set. */ var QueryInput_ProposalsActivity_UserVoteFilter; (function (QueryInput_ProposalsActivity_UserVoteFilter) { QueryInput_ProposalsActivity_UserVoteFilter["Abstain"] = "abstain"; @@ -290,16 +136,21 @@ var QueryInput_ProposalsActivity_UserVoteFilter; QueryInput_ProposalsActivity_UserVoteFilter["NoVote"] = "no_vote"; QueryInput_ProposalsActivity_UserVoteFilter["Yes"] = "yes"; })(QueryInput_ProposalsActivity_UserVoteFilter || (exports.QueryInput_ProposalsActivity_UserVoteFilter = QueryInput_ProposalsActivity_UserVoteFilter = {})); -var QueryInput_Proposals_IncludeOptimisticProposals; -(function (QueryInput_Proposals_IncludeOptimisticProposals) { - QueryInput_Proposals_IncludeOptimisticProposals["False"] = "FALSE"; - QueryInput_Proposals_IncludeOptimisticProposals["True"] = "TRUE"; -})(QueryInput_Proposals_IncludeOptimisticProposals || (exports.QueryInput_Proposals_IncludeOptimisticProposals = QueryInput_Proposals_IncludeOptimisticProposals = {})); -var QueryInput_Proposals_OrderDirection; -(function (QueryInput_Proposals_OrderDirection) { - QueryInput_Proposals_OrderDirection["Asc"] = "asc"; - QueryInput_Proposals_OrderDirection["Desc"] = "desc"; -})(QueryInput_Proposals_OrderDirection || (exports.QueryInput_Proposals_OrderDirection = QueryInput_Proposals_OrderDirection = {})); +var QueryInput_Proposals_Status_Items; +(function (QueryInput_Proposals_Status_Items) { + QueryInput_Proposals_Status_Items["Active"] = "ACTIVE"; + QueryInput_Proposals_Status_Items["Canceled"] = "CANCELED"; + QueryInput_Proposals_Status_Items["Defeated"] = "DEFEATED"; + QueryInput_Proposals_Status_Items["Executed"] = "EXECUTED"; + QueryInput_Proposals_Status_Items["Expired"] = "EXPIRED"; + QueryInput_Proposals_Status_Items["NoQuorum"] = "NO_QUORUM"; + QueryInput_Proposals_Status_Items["Pending"] = "PENDING"; + QueryInput_Proposals_Status_Items["PendingExecution"] = "PENDING_EXECUTION"; + QueryInput_Proposals_Status_Items["Queued"] = "QUEUED"; + QueryInput_Proposals_Status_Items["Succeeded"] = "SUCCEEDED"; + QueryInput_Proposals_Status_Items["Vetoed"] = "VETOED"; +})(QueryInput_Proposals_Status_Items || (exports.QueryInput_Proposals_Status_Items = QueryInput_Proposals_Status_Items = {})); +/** Metric family to query. */ var QueryInput_TokenMetrics_MetricType; (function (QueryInput_TokenMetrics_MetricType) { QueryInput_TokenMetrics_MetricType["CexSupply"] = "CEX_SUPPLY"; @@ -310,76 +161,55 @@ var QueryInput_TokenMetrics_MetricType; QueryInput_TokenMetrics_MetricType["TotalSupply"] = "TOTAL_SUPPLY"; QueryInput_TokenMetrics_MetricType["Treasury"] = "TREASURY"; })(QueryInput_TokenMetrics_MetricType || (exports.QueryInput_TokenMetrics_MetricType = QueryInput_TokenMetrics_MetricType = {})); -var QueryInput_TokenMetrics_OrderDirection; -(function (QueryInput_TokenMetrics_OrderDirection) { - QueryInput_TokenMetrics_OrderDirection["Asc"] = "asc"; - QueryInput_TokenMetrics_OrderDirection["Desc"] = "desc"; -})(QueryInput_TokenMetrics_OrderDirection || (exports.QueryInput_TokenMetrics_OrderDirection = QueryInput_TokenMetrics_OrderDirection = {})); +/** Currency to use when fetching token price data. */ var QueryInput_Token_Currency; (function (QueryInput_Token_Currency) { QueryInput_Token_Currency["Eth"] = "eth"; QueryInput_Token_Currency["Usd"] = "usd"; })(QueryInput_Token_Currency || (exports.QueryInput_Token_Currency = QueryInput_Token_Currency = {})); -var QueryInput_Transactions_SortOrder; -(function (QueryInput_Transactions_SortOrder) { - QueryInput_Transactions_SortOrder["Asc"] = "asc"; - QueryInput_Transactions_SortOrder["Desc"] = "desc"; -})(QueryInput_Transactions_SortOrder || (exports.QueryInput_Transactions_SortOrder = QueryInput_Transactions_SortOrder = {})); -var QueryInput_Transfers_SortBy; -(function (QueryInput_Transfers_SortBy) { - QueryInput_Transfers_SortBy["Amount"] = "amount"; - QueryInput_Transfers_SortBy["Timestamp"] = "timestamp"; -})(QueryInput_Transfers_SortBy || (exports.QueryInput_Transfers_SortBy = QueryInput_Transfers_SortBy = {})); -var QueryInput_Transfers_SortOrder; -(function (QueryInput_Transfers_SortOrder) { - QueryInput_Transfers_SortOrder["Asc"] = "asc"; - QueryInput_Transfers_SortOrder["Desc"] = "desc"; -})(QueryInput_Transfers_SortOrder || (exports.QueryInput_Transfers_SortOrder = QueryInput_Transfers_SortOrder = {})); +var QueryInput_Transactions_AffectedSupply_Items; +(function (QueryInput_Transactions_AffectedSupply_Items) { + QueryInput_Transactions_AffectedSupply_Items["Cex"] = "CEX"; + QueryInput_Transactions_AffectedSupply_Items["Dex"] = "DEX"; + QueryInput_Transactions_AffectedSupply_Items["Lending"] = "LENDING"; + QueryInput_Transactions_AffectedSupply_Items["Total"] = "TOTAL"; + QueryInput_Transactions_AffectedSupply_Items["Unassigned"] = "UNASSIGNED"; +})(QueryInput_Transactions_AffectedSupply_Items || (exports.QueryInput_Transactions_AffectedSupply_Items = QueryInput_Transactions_AffectedSupply_Items = {})); +var QueryInput_Transactions_Includes_Items; +(function (QueryInput_Transactions_Includes_Items) { + QueryInput_Transactions_Includes_Items["Delegation"] = "DELEGATION"; + QueryInput_Transactions_Includes_Items["Transfer"] = "TRANSFER"; +})(QueryInput_Transactions_Includes_Items || (exports.QueryInput_Transactions_Includes_Items = QueryInput_Transactions_Includes_Items = {})); +/** Field used to sort transfers. */ +var QueryInput_Transfers_OrderBy; +(function (QueryInput_Transfers_OrderBy) { + QueryInput_Transfers_OrderBy["Amount"] = "amount"; + QueryInput_Transfers_OrderBy["Timestamp"] = "timestamp"; +})(QueryInput_Transfers_OrderBy || (exports.QueryInput_Transfers_OrderBy = QueryInput_Transfers_OrderBy = {})); +/** Sort votes by timestamp or voting power. */ var QueryInput_VotesByProposalId_OrderBy; (function (QueryInput_VotesByProposalId_OrderBy) { QueryInput_VotesByProposalId_OrderBy["Timestamp"] = "timestamp"; QueryInput_VotesByProposalId_OrderBy["VotingPower"] = "votingPower"; })(QueryInput_VotesByProposalId_OrderBy || (exports.QueryInput_VotesByProposalId_OrderBy = QueryInput_VotesByProposalId_OrderBy = {})); -var QueryInput_VotesByProposalId_OrderDirection; -(function (QueryInput_VotesByProposalId_OrderDirection) { - QueryInput_VotesByProposalId_OrderDirection["Asc"] = "asc"; - QueryInput_VotesByProposalId_OrderDirection["Desc"] = "desc"; -})(QueryInput_VotesByProposalId_OrderDirection || (exports.QueryInput_VotesByProposalId_OrderDirection = QueryInput_VotesByProposalId_OrderDirection = {})); +/** Sort votes by timestamp or voting power. */ var QueryInput_VotesOffchainByProposalId_OrderBy; (function (QueryInput_VotesOffchainByProposalId_OrderBy) { QueryInput_VotesOffchainByProposalId_OrderBy["Timestamp"] = "timestamp"; QueryInput_VotesOffchainByProposalId_OrderBy["VotingPower"] = "votingPower"; })(QueryInput_VotesOffchainByProposalId_OrderBy || (exports.QueryInput_VotesOffchainByProposalId_OrderBy = QueryInput_VotesOffchainByProposalId_OrderBy = {})); -var QueryInput_VotesOffchainByProposalId_OrderDirection; -(function (QueryInput_VotesOffchainByProposalId_OrderDirection) { - QueryInput_VotesOffchainByProposalId_OrderDirection["Asc"] = "asc"; - QueryInput_VotesOffchainByProposalId_OrderDirection["Desc"] = "desc"; -})(QueryInput_VotesOffchainByProposalId_OrderDirection || (exports.QueryInput_VotesOffchainByProposalId_OrderDirection = QueryInput_VotesOffchainByProposalId_OrderDirection = {})); +/** Sort votes by timestamp or voting power. */ var QueryInput_VotesOffchain_OrderBy; (function (QueryInput_VotesOffchain_OrderBy) { QueryInput_VotesOffchain_OrderBy["Timestamp"] = "timestamp"; QueryInput_VotesOffchain_OrderBy["VotingPower"] = "votingPower"; })(QueryInput_VotesOffchain_OrderBy || (exports.QueryInput_VotesOffchain_OrderBy = QueryInput_VotesOffchain_OrderBy = {})); -var QueryInput_VotesOffchain_OrderDirection; -(function (QueryInput_VotesOffchain_OrderDirection) { - QueryInput_VotesOffchain_OrderDirection["Asc"] = "asc"; - QueryInput_VotesOffchain_OrderDirection["Desc"] = "desc"; -})(QueryInput_VotesOffchain_OrderDirection || (exports.QueryInput_VotesOffchain_OrderDirection = QueryInput_VotesOffchain_OrderDirection = {})); +/** Sort votes by timestamp or voting power. */ var QueryInput_Votes_OrderBy; (function (QueryInput_Votes_OrderBy) { QueryInput_Votes_OrderBy["Timestamp"] = "timestamp"; QueryInput_Votes_OrderBy["VotingPower"] = "votingPower"; })(QueryInput_Votes_OrderBy || (exports.QueryInput_Votes_OrderBy = QueryInput_Votes_OrderBy = {})); -var QueryInput_Votes_OrderDirection; -(function (QueryInput_Votes_OrderDirection) { - QueryInput_Votes_OrderDirection["Asc"] = "asc"; - QueryInput_Votes_OrderDirection["Desc"] = "desc"; -})(QueryInput_Votes_OrderDirection || (exports.QueryInput_Votes_OrderDirection = QueryInput_Votes_OrderDirection = {})); -var QueryInput_VotingPowerVariations_OrderDirection; -(function (QueryInput_VotingPowerVariations_OrderDirection) { - QueryInput_VotingPowerVariations_OrderDirection["Asc"] = "asc"; - QueryInput_VotingPowerVariations_OrderDirection["Desc"] = "desc"; -})(QueryInput_VotingPowerVariations_OrderDirection || (exports.QueryInput_VotingPowerVariations_OrderDirection = QueryInput_VotingPowerVariations_OrderDirection = {})); var QueryInput_VotingPowers_OrderBy; (function (QueryInput_VotingPowers_OrderBy) { QueryInput_VotingPowers_OrderBy["Balance"] = "balance"; @@ -389,35 +219,13 @@ var QueryInput_VotingPowers_OrderBy; QueryInput_VotingPowers_OrderBy["Variation"] = "variation"; QueryInput_VotingPowers_OrderBy["VotingPower"] = "votingPower"; })(QueryInput_VotingPowers_OrderBy || (exports.QueryInput_VotingPowers_OrderBy = QueryInput_VotingPowers_OrderBy = {})); -var QueryInput_VotingPowers_OrderDirection; -(function (QueryInput_VotingPowers_OrderDirection) { - QueryInput_VotingPowers_OrderDirection["Asc"] = "asc"; - QueryInput_VotingPowers_OrderDirection["Desc"] = "desc"; -})(QueryInput_VotingPowers_OrderDirection || (exports.QueryInput_VotingPowers_OrderDirection = QueryInput_VotingPowers_OrderDirection = {})); -var Query_FeedEvents_Items_Items_Relevance; -(function (Query_FeedEvents_Items_Items_Relevance) { - Query_FeedEvents_Items_Items_Relevance["High"] = "HIGH"; - Query_FeedEvents_Items_Items_Relevance["Low"] = "LOW"; - Query_FeedEvents_Items_Items_Relevance["Medium"] = "MEDIUM"; -})(Query_FeedEvents_Items_Items_Relevance || (exports.Query_FeedEvents_Items_Items_Relevance = Query_FeedEvents_Items_Items_Relevance = {})); -var Query_FeedEvents_Items_Items_Type; -(function (Query_FeedEvents_Items_Items_Type) { - Query_FeedEvents_Items_Items_Type["Delegation"] = "DELEGATION"; - Query_FeedEvents_Items_Items_Type["Proposal"] = "PROPOSAL"; - Query_FeedEvents_Items_Items_Type["ProposalExtended"] = "PROPOSAL_EXTENDED"; - Query_FeedEvents_Items_Items_Type["Transfer"] = "TRANSFER"; - Query_FeedEvents_Items_Items_Type["Vote"] = "VOTE"; -})(Query_FeedEvents_Items_Items_Type || (exports.Query_FeedEvents_Items_Items_Type = Query_FeedEvents_Items_Items_Type = {})); -var Timestamp_Const; -(function (Timestamp_Const) { - Timestamp_Const["Timestamp"] = "timestamp"; -})(Timestamp_Const || (exports.Timestamp_Const = Timestamp_Const = {})); exports.GetDaOsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetDAOs" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "daos" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "items" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "votingDelay" } }, { "kind": "Field", "name": { "kind": "Name", "value": "chainId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "alreadySupportCalldataReview" } }, { "kind": "Field", "name": { "kind": "Name", "value": "supportOffchainData" } }] } }] } }] } }] }; -exports.ListOffchainProposalsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListOffchainProposals" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "NonNegativeInt" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "PositiveInt" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "queryInput_offchainProposals_orderDirection" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "status" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "JSON" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "fromDate" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Float" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "endDate" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Float" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "offchainProposals" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "skip" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "limit" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "orderDirection" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "status" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "status" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "fromDate" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "fromDate" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "endDate" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "endDate" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "items" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "title" } }, { "kind": "Field", "name": { "kind": "Name", "value": "discussion" } }, { "kind": "Field", "name": { "kind": "Name", "value": "link" } }, { "kind": "Field", "name": { "kind": "Name", "value": "state" } }, { "kind": "Field", "name": { "kind": "Name", "value": "created" } }, { "kind": "Field", "name": { "kind": "Name", "value": "end" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "totalCount" } }] } }] } }] }; -exports.ListOffchainVotesDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListOffchainVotes" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "fromDate" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Float" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "toDate" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Float" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Float" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "NonNegativeInt" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orderBy" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "queryInput_votesOffchain_orderBy" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "queryInput_votesOffchain_orderDirection" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "voterAddresses" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "JSON" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "votesOffchain" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "fromDate" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "fromDate" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "toDate" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "toDate" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "limit" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "skip" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "orderBy" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orderBy" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "orderDirection" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "voterAddresses" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "voterAddresses" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "items" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "voter" } }, { "kind": "Field", "name": { "kind": "Name", "value": "created" } }, { "kind": "Field", "name": { "kind": "Name", "value": "proposalId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "proposalTitle" } }, { "kind": "Field", "name": { "kind": "Name", "value": "reason" } }, { "kind": "Field", "name": { "kind": "Name", "value": "vp" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "totalCount" } }] } }] } }] }; -exports.ProposalNonVotersDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ProposalNonVoters" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "addresses" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "JSON" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "proposalNonVoters" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "addresses" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "addresses" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "items" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "voter" } }] } }] } }] } }] }; -exports.GetProposalByIdDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetProposalById" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "proposal" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "daoId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "proposerAccountId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "title" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "startBlock" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endBlock" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endTimestamp" } }, { "kind": "Field", "name": { "kind": "Name", "value": "timestamp" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "forVotes" } }, { "kind": "Field", "name": { "kind": "Name", "value": "againstVotes" } }, { "kind": "Field", "name": { "kind": "Name", "value": "abstainVotes" } }, { "kind": "Field", "name": { "kind": "Name", "value": "txHash" } }] } }] } }] }; -exports.ListProposalsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListProposals" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "NonNegativeInt" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "PositiveInt" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "queryInput_proposals_orderDirection" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "status" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "JSON" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "fromDate" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Float" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "fromEndDate" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Float" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "includeOptimisticProposals" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "queryInput_proposals_includeOptimisticProposals" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "proposals" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "skip" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "limit" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "orderDirection" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "status" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "status" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "fromDate" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "fromDate" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "fromEndDate" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "fromEndDate" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "includeOptimisticProposals" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "includeOptimisticProposals" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "items" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "daoId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "proposerAccountId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "title" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "startBlock" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endBlock" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endTimestamp" } }, { "kind": "Field", "name": { "kind": "Name", "value": "timestamp" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "forVotes" } }, { "kind": "Field", "name": { "kind": "Name", "value": "againstVotes" } }, { "kind": "Field", "name": { "kind": "Name", "value": "abstainVotes" } }, { "kind": "Field", "name": { "kind": "Name", "value": "txHash" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "totalCount" } }] } }] } }] }; -exports.GetEventRelevanceThresholdDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetEventRelevanceThreshold" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "relevance" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "queryInput_getEventRelevanceThreshold_relevance" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "type" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "queryInput_getEventRelevanceThreshold_type" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "getEventRelevanceThreshold" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "relevance" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "relevance" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "type" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "type" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "threshold" } }] } }] } }] }; -exports.ListVotesDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListVotes" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "voterAddressIn" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "JSON" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "fromDate" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Float" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "toDate" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Float" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Float" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "NonNegativeInt" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orderBy" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "queryInput_votes_orderBy" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "queryInput_votes_orderDirection" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "support" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Float" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "votes" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "voterAddressIn" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "voterAddressIn" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "fromDate" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "fromDate" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "toDate" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "toDate" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "limit" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "skip" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "orderBy" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orderBy" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "orderDirection" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "support" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "support" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "items" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "transactionHash" } }, { "kind": "Field", "name": { "kind": "Name", "value": "proposalId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "voterAddress" } }, { "kind": "Field", "name": { "kind": "Name", "value": "support" } }, { "kind": "Field", "name": { "kind": "Name", "value": "votingPower" } }, { "kind": "Field", "name": { "kind": "Name", "value": "timestamp" } }, { "kind": "Field", "name": { "kind": "Name", "value": "reason" } }, { "kind": "Field", "name": { "kind": "Name", "value": "proposalTitle" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "totalCount" } }] } }] } }] }; -exports.ListHistoricalVotingPowerDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListHistoricalVotingPower" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "PositiveInt" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "NonNegativeInt" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orderBy" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "queryInput_historicalVotingPower_orderBy" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "queryInput_historicalVotingPower_orderDirection" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "fromDate" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "address" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "historicalVotingPower" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "limit" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "skip" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "orderBy" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orderBy" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "orderDirection" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "fromDate" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "fromDate" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "address" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "address" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "items" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "timestamp" } }, { "kind": "Field", "name": { "kind": "Name", "value": "votingPower" } }, { "kind": "Field", "name": { "kind": "Name", "value": "delta" } }, { "kind": "Field", "name": { "kind": "Name", "value": "daoId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "transactionHash" } }, { "kind": "Field", "name": { "kind": "Name", "value": "logIndex" } }, { "kind": "Field", "name": { "kind": "Name", "value": "delegation" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "from" } }, { "kind": "Field", "name": { "kind": "Name", "value": "to" } }, { "kind": "Field", "name": { "kind": "Name", "value": "value" } }, { "kind": "Field", "name": { "kind": "Name", "value": "previousDelegate" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "transfer" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "from" } }, { "kind": "Field", "name": { "kind": "Name", "value": "to" } }, { "kind": "Field", "name": { "kind": "Name", "value": "value" } }] } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "totalCount" } }] } }] } }] }; +exports.OffchainProposalNonVotersDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "OffchainProposalNonVoters" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "addresses" } }, "type": { "kind": "ListType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "OrderDirection" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "offchainProposalNonVoters" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "addresses" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "addresses" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "orderDirection" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "OffchainVotersResponse" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "items" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "voter" } }, { "kind": "Field", "name": { "kind": "Name", "value": "votingPower" } }] } }] } }] } }] } }] }; +exports.ListOffchainProposalsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListOffchainProposals" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "OrderDirection" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "status" } }, "type": { "kind": "ListType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "queryInput_offchainProposals_status_items" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "fromDate" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "endDate" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "offchainProposals" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "skip" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "limit" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "orderDirection" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "status" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "status" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "fromDate" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "fromDate" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "endDate" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "endDate" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "items" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "title" } }, { "kind": "Field", "name": { "kind": "Name", "value": "discussion" } }, { "kind": "Field", "name": { "kind": "Name", "value": "link" } }, { "kind": "Field", "name": { "kind": "Name", "value": "state" } }, { "kind": "Field", "name": { "kind": "Name", "value": "created" } }, { "kind": "Field", "name": { "kind": "Name", "value": "end" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "totalCount" } }] } }] } }] }; +exports.ListOffchainVotesDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListOffchainVotes" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "fromDate" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "toDate" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orderBy" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "queryInput_votesOffchain_orderBy" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "OrderDirection" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "voterAddresses" } }, "type": { "kind": "ListType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "votesOffchain" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "fromDate" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "fromDate" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "toDate" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "toDate" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "limit" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "skip" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "orderBy" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orderBy" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "orderDirection" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "voterAddresses" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "voterAddresses" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "items" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "voter" } }, { "kind": "Field", "name": { "kind": "Name", "value": "created" } }, { "kind": "Field", "name": { "kind": "Name", "value": "proposalId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "proposalTitle" } }, { "kind": "Field", "name": { "kind": "Name", "value": "reason" } }, { "kind": "Field", "name": { "kind": "Name", "value": "vp" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "totalCount" } }] } }] } }] }; +exports.ProposalNonVotersDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ProposalNonVoters" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "addresses" } }, "type": { "kind": "ListType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "proposalNonVoters" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "addresses" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "addresses" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "items" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "voter" } }] } }] } }] } }] }; +exports.GetProposalByIdDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetProposalById" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "proposal" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "OnchainProposal" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "daoId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "proposerAccountId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "title" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "startBlock" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endBlock" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endTimestamp" } }, { "kind": "Field", "name": { "kind": "Name", "value": "timestamp" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "forVotes" } }, { "kind": "Field", "name": { "kind": "Name", "value": "againstVotes" } }, { "kind": "Field", "name": { "kind": "Name", "value": "abstainVotes" } }, { "kind": "Field", "name": { "kind": "Name", "value": "txHash" } }] } }] } }] } }] }; +exports.ListProposalsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListProposals" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "OrderDirection" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "status" } }, "type": { "kind": "ListType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "queryInput_proposals_status_items" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "fromDate" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "fromEndDate" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "includeOptimisticProposals" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Boolean" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "proposals" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "skip" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "limit" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "orderDirection" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "status" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "status" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "fromDate" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "fromDate" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "fromEndDate" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "fromEndDate" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "includeOptimisticProposals" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "includeOptimisticProposals" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "items" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "daoId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "proposerAccountId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "title" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "startBlock" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endBlock" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endTimestamp" } }, { "kind": "Field", "name": { "kind": "Name", "value": "timestamp" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "forVotes" } }, { "kind": "Field", "name": { "kind": "Name", "value": "againstVotes" } }, { "kind": "Field", "name": { "kind": "Name", "value": "abstainVotes" } }, { "kind": "Field", "name": { "kind": "Name", "value": "txHash" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "totalCount" } }] } }] } }] }; +exports.GetEventRelevanceThresholdDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetEventRelevanceThreshold" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "relevance" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "FeedRelevance" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "type" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "FeedEventType" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "getEventRelevanceThreshold" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "relevance" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "relevance" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "type" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "type" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "threshold" } }] } }] } }] }; +exports.ListVotesDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListVotes" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "voterAddressIn" } }, "type": { "kind": "ListType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "fromDate" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "toDate" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orderBy" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "queryInput_votes_orderBy" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "OrderDirection" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "support" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "votes" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "voterAddressIn" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "voterAddressIn" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "fromDate" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "fromDate" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "toDate" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "toDate" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "limit" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "skip" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "orderBy" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orderBy" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "orderDirection" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "support" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "support" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "items" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "transactionHash" } }, { "kind": "Field", "name": { "kind": "Name", "value": "proposalId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "voterAddress" } }, { "kind": "Field", "name": { "kind": "Name", "value": "support" } }, { "kind": "Field", "name": { "kind": "Name", "value": "votingPower" } }, { "kind": "Field", "name": { "kind": "Name", "value": "timestamp" } }, { "kind": "Field", "name": { "kind": "Name", "value": "reason" } }, { "kind": "Field", "name": { "kind": "Name", "value": "proposalTitle" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "totalCount" } }] } }] } }] }; +exports.ListHistoricalVotingPowerDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListHistoricalVotingPower" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orderBy" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "queryInput_historicalVotingPower_orderBy" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "OrderDirection" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "fromDate" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "address" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "historicalVotingPower" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "limit" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "skip" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "orderBy" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orderBy" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "orderDirection" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orderDirection" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "fromDate" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "fromDate" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "address" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "address" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "items" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "timestamp" } }, { "kind": "Field", "name": { "kind": "Name", "value": "votingPower" } }, { "kind": "Field", "name": { "kind": "Name", "value": "delta" } }, { "kind": "Field", "name": { "kind": "Name", "value": "daoId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "transactionHash" } }, { "kind": "Field", "name": { "kind": "Name", "value": "logIndex" } }, { "kind": "Field", "name": { "kind": "Name", "value": "delegation" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "from" } }, { "kind": "Field", "name": { "kind": "Name", "value": "to" } }, { "kind": "Field", "name": { "kind": "Name", "value": "value" } }, { "kind": "Field", "name": { "kind": "Name", "value": "previousDelegate" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "transfer" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "from" } }, { "kind": "Field", "name": { "kind": "Name", "value": "to" } }, { "kind": "Field", "name": { "kind": "Name", "value": "value" } }] } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "totalCount" } }] } }] } }] }; diff --git a/packages/anticapture-client/dist/index.d.ts b/packages/anticapture-client/dist/index.d.ts index 83cbf673..d230889f 100644 --- a/packages/anticapture-client/dist/index.d.ts +++ b/packages/anticapture-client/dist/index.d.ts @@ -1,6 +1,6 @@ export { AnticaptureClient } from './anticapture-client'; export type { VoteWithDaoId, OffchainVoteWithDaoId } from './anticapture-client'; export type { GetDaOsQuery, GetProposalByIdQuery, GetProposalByIdQueryVariables, ListProposalsQuery, ListProposalsQueryVariables, ListVotesQuery, ListVotesQueryVariables, ListHistoricalVotingPowerQuery, ListHistoricalVotingPowerQueryVariables } from './gql/graphql'; -export { QueryInput_Proposals_OrderDirection, QueryInput_HistoricalVotingPower_OrderBy, QueryInput_HistoricalVotingPower_OrderDirection, QueryInput_Votes_OrderBy, QueryInput_Votes_OrderDirection, QueryInput_VotesOffchain_OrderBy, QueryInput_VotesOffchain_OrderDirection } from './gql/graphql'; +export { OrderDirection, QueryInput_HistoricalVotingPower_OrderBy, QueryInput_Votes_OrderBy, QueryInput_VotesOffchain_OrderBy, QueryInput_Proposals_Status_Items, } from './gql/graphql'; export { FeedEventType, FeedRelevance } from './schemas'; export type { ProcessedVotingPowerHistory, OffchainProposalItem, OffchainVoteItem } from './schemas'; diff --git a/packages/anticapture-client/dist/index.js b/packages/anticapture-client/dist/index.js index c4edba74..8f3ba7fa 100644 --- a/packages/anticapture-client/dist/index.js +++ b/packages/anticapture-client/dist/index.js @@ -1,17 +1,15 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.FeedRelevance = exports.FeedEventType = exports.QueryInput_VotesOffchain_OrderDirection = exports.QueryInput_VotesOffchain_OrderBy = exports.QueryInput_Votes_OrderDirection = exports.QueryInput_Votes_OrderBy = exports.QueryInput_HistoricalVotingPower_OrderDirection = exports.QueryInput_HistoricalVotingPower_OrderBy = exports.QueryInput_Proposals_OrderDirection = exports.AnticaptureClient = void 0; +exports.FeedRelevance = exports.FeedEventType = exports.QueryInput_Proposals_Status_Items = exports.QueryInput_VotesOffchain_OrderBy = exports.QueryInput_Votes_OrderBy = exports.QueryInput_HistoricalVotingPower_OrderBy = exports.OrderDirection = exports.AnticaptureClient = void 0; var anticapture_client_1 = require("./anticapture-client"); Object.defineProperty(exports, "AnticaptureClient", { enumerable: true, get: function () { return anticapture_client_1.AnticaptureClient; } }); // Export GraphQL enums var graphql_1 = require("./gql/graphql"); -Object.defineProperty(exports, "QueryInput_Proposals_OrderDirection", { enumerable: true, get: function () { return graphql_1.QueryInput_Proposals_OrderDirection; } }); +Object.defineProperty(exports, "OrderDirection", { enumerable: true, get: function () { return graphql_1.OrderDirection; } }); Object.defineProperty(exports, "QueryInput_HistoricalVotingPower_OrderBy", { enumerable: true, get: function () { return graphql_1.QueryInput_HistoricalVotingPower_OrderBy; } }); -Object.defineProperty(exports, "QueryInput_HistoricalVotingPower_OrderDirection", { enumerable: true, get: function () { return graphql_1.QueryInput_HistoricalVotingPower_OrderDirection; } }); Object.defineProperty(exports, "QueryInput_Votes_OrderBy", { enumerable: true, get: function () { return graphql_1.QueryInput_Votes_OrderBy; } }); -Object.defineProperty(exports, "QueryInput_Votes_OrderDirection", { enumerable: true, get: function () { return graphql_1.QueryInput_Votes_OrderDirection; } }); Object.defineProperty(exports, "QueryInput_VotesOffchain_OrderBy", { enumerable: true, get: function () { return graphql_1.QueryInput_VotesOffchain_OrderBy; } }); -Object.defineProperty(exports, "QueryInput_VotesOffchain_OrderDirection", { enumerable: true, get: function () { return graphql_1.QueryInput_VotesOffchain_OrderDirection; } }); +Object.defineProperty(exports, "QueryInput_Proposals_Status_Items", { enumerable: true, get: function () { return graphql_1.QueryInput_Proposals_Status_Items; } }); var schemas_1 = require("./schemas"); Object.defineProperty(exports, "FeedEventType", { enumerable: true, get: function () { return schemas_1.FeedEventType; } }); Object.defineProperty(exports, "FeedRelevance", { enumerable: true, get: function () { return schemas_1.FeedRelevance; } }); diff --git a/packages/anticapture-client/dist/schemas.d.ts b/packages/anticapture-client/dist/schemas.d.ts index d165bb82..3d183270 100644 --- a/packages/anticapture-client/dist/schemas.d.ts +++ b/packages/anticapture-client/dist/schemas.d.ts @@ -1,5 +1,5 @@ import { z } from 'zod'; -export { QueryInput_GetEventRelevanceThreshold_Type as FeedEventType, QueryInput_GetEventRelevanceThreshold_Relevance as FeedRelevance, } from './gql/graphql'; +export { FeedEventType, FeedRelevance, } from './gql/graphql'; export declare const SafeDaosResponseSchema: z.ZodEffects>; votingPower: z.ZodString; timestamp: z.ZodNumber; reason: z.ZodOptional>; - proposalTitle: z.ZodString; + proposalTitle: z.ZodOptional>; }, "strip", z.ZodTypeAny, { timestamp: number; votingPower: string; - support: number; proposalId: string; - proposalTitle: string; transactionHash: string; voterAddress: string; + support?: string | null | undefined; + proposalTitle?: string | null | undefined; reason?: string | null | undefined; }, { timestamp: number; votingPower: string; - support: number; proposalId: string; - proposalTitle: string; transactionHash: string; voterAddress: string; + support?: string | null | undefined; + proposalTitle?: string | null | undefined; reason?: string | null | undefined; }>>, "many">; totalCount: z.ZodNumber; @@ -450,11 +450,11 @@ export declare const SafeVotesResponseSchema: z.ZodEffects; +export declare const SafeOffchainProposalNonVotersResponseSchema: z.ZodEffects; + }, "strip", z.ZodTypeAny, { + voter: string; + votingPower?: string | undefined; + }, { + voter: string; + votingPower?: string | undefined; + }>>, "many">; + totalCount: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + items: ({ + voter: string; + votingPower?: string | undefined; + } | null)[]; + totalCount?: number | undefined; + }, { + items: ({ + voter: string; + votingPower?: string | undefined; + } | null)[]; + totalCount?: number | undefined; + }>>; +}, "strip", z.ZodTypeAny, { + offchainProposalNonVoters: { + items: ({ + voter: string; + votingPower?: string | undefined; + } | null)[]; + totalCount?: number | undefined; + } | null; +}, { + offchainProposalNonVoters: { + items: ({ + voter: string; + votingPower?: string | undefined; + } | null)[]; + totalCount?: number | undefined; + } | null; +}>, { + offchainProposalNonVoters: { + items: { + voter: string; + votingPower?: string; + }[]; + totalCount?: number | undefined; + }; +}, { + offchainProposalNonVoters: { + items: ({ + voter: string; + votingPower?: string | undefined; + } | null)[]; + totalCount?: number | undefined; + } | null; +}>; export declare const EventThresholdResponseSchema: z.ZodObject<{ getEventRelevanceThreshold: z.ZodObject<{ threshold: z.ZodString; @@ -603,6 +662,7 @@ export declare const OffchainProposalItemSchema: z.ZodObject<{ state: z.ZodString; created: z.ZodNumber; end: z.ZodNumber; + start: z.ZodOptional; }, "strip", z.ZodTypeAny, { link: string; id: string; @@ -611,6 +671,7 @@ export declare const OffchainProposalItemSchema: z.ZodObject<{ state: string; created: number; end: number; + start?: number | undefined; }, { link: string; id: string; @@ -619,6 +680,7 @@ export declare const OffchainProposalItemSchema: z.ZodObject<{ state: string; created: number; end: number; + start?: number | undefined; }>; export type OffchainProposalItem = z.infer; export declare const SafeOffchainProposalsResponseSchema: z.ZodEffects; }, "strip", z.ZodTypeAny, { link: string; id: string; @@ -639,6 +702,7 @@ export declare const SafeOffchainProposalsResponseSchema: z.ZodEffects>, "many">; totalCount: z.ZodNumber; }, "strip", z.ZodTypeAny, { @@ -658,6 +723,7 @@ export declare const SafeOffchainProposalsResponseSchema: z.ZodEffects>; @@ -682,6 +749,7 @@ export declare const SafeOffchainProposalsResponseSchema: z.ZodEffects>; vp: z.ZodOptional>; }, "strip", z.ZodTypeAny, { - created: number; voter: string; + created: number; proposalId: string; proposalTitle: string; reason?: string | null | undefined; vp?: number | null | undefined; }, { - created: number; voter: string; + created: number; proposalId: string; proposalTitle: string; reason?: string | null | undefined; @@ -758,15 +829,15 @@ export declare const SafeOffchainVotesResponseSchema: z.ZodEffects>; vp: z.ZodOptional>; }, "strip", z.ZodTypeAny, { - created: number; voter: string; + created: number; proposalId: string; proposalTitle: string; reason?: string | null | undefined; vp?: number | null | undefined; }, { - created: number; voter: string; + created: number; proposalId: string; proposalTitle: string; reason?: string | null | undefined; @@ -775,8 +846,8 @@ export declare const SafeOffchainVotesResponseSchema: z.ZodEffects, { votesOffchain: { items: { - created: number; voter: string; + created: number; proposalId: string; proposalTitle: string; reason?: string | null | undefined; @@ -833,8 +904,8 @@ export declare const SafeOffchainVotesResponseSchema: z.ZodEffects { + if (!data.offchainProposalNonVoters) { + console.warn('OffchainProposalNonVotersResponse has null offchainProposalNonVoters:', data); + return { offchainProposalNonVoters: { items: [], totalCount: 0 } }; + } + return { + offchainProposalNonVoters: { + ...data.offchainProposalNonVoters, + items: data.offchainProposalNonVoters.items.filter((item) => item !== null) + } + }; +}); exports.EventThresholdResponseSchema = zod_1.z.object({ getEventRelevanceThreshold: zod_1.z.object({ threshold: zod_1.z.string() @@ -134,6 +154,7 @@ exports.OffchainProposalItemSchema = zod_1.z.object({ state: zod_1.z.string(), created: zod_1.z.number(), end: zod_1.z.number(), + start: zod_1.z.number().optional(), }); exports.SafeOffchainProposalsResponseSchema = zod_1.z.object({ offchainProposals: zod_1.z.object({ diff --git a/packages/anticapture-client/queries/offchain-proposal-non-voters.graphql b/packages/anticapture-client/queries/offchain-proposal-non-voters.graphql new file mode 100644 index 00000000..bef1565e --- /dev/null +++ b/packages/anticapture-client/queries/offchain-proposal-non-voters.graphql @@ -0,0 +1,10 @@ +query OffchainProposalNonVoters($id: String!, $addresses: [String], $orderDirection: OrderDirection) { + offchainProposalNonVoters(id: $id, addresses: $addresses, orderDirection: $orderDirection) { + ... on OffchainVotersResponse { + items { + voter + votingPower + } + } + } +} diff --git a/packages/anticapture-client/queries/offchain-proposals.graphql b/packages/anticapture-client/queries/offchain-proposals.graphql index 0dff285f..f169fe9d 100644 --- a/packages/anticapture-client/queries/offchain-proposals.graphql +++ b/packages/anticapture-client/queries/offchain-proposals.graphql @@ -1,4 +1,4 @@ -query ListOffchainProposals($skip: NonNegativeInt, $limit: PositiveInt, $orderDirection: queryInput_offchainProposals_orderDirection, $status: JSON, $fromDate: Float, $endDate: Float) { +query ListOffchainProposals($skip: Int, $limit: Int, $orderDirection: OrderDirection, $status: [queryInput_offchainProposals_status_items], $fromDate: Int, $endDate: Int) { offchainProposals(skip: $skip, limit: $limit, orderDirection: $orderDirection, status: $status, fromDate: $fromDate, endDate: $endDate) { items { id diff --git a/packages/anticapture-client/queries/offchain-votes.graphql b/packages/anticapture-client/queries/offchain-votes.graphql index f58e1ebb..0a29721d 100644 --- a/packages/anticapture-client/queries/offchain-votes.graphql +++ b/packages/anticapture-client/queries/offchain-votes.graphql @@ -1,11 +1,11 @@ query ListOffchainVotes( - $fromDate: Float - $toDate: Float - $limit: Float - $skip: NonNegativeInt + $fromDate: Int + $toDate: Int + $limit: Int + $skip: Int $orderBy: queryInput_votesOffchain_orderBy - $orderDirection: queryInput_votesOffchain_orderDirection - $voterAddresses: JSON + $orderDirection: OrderDirection + $voterAddresses: [String] ) { votesOffchain( fromDate: $fromDate diff --git a/packages/anticapture-client/queries/proposalNonVoters.graphql b/packages/anticapture-client/queries/proposalNonVoters.graphql index 05cf0f57..b451fa30 100644 --- a/packages/anticapture-client/queries/proposalNonVoters.graphql +++ b/packages/anticapture-client/queries/proposalNonVoters.graphql @@ -1,6 +1,6 @@ query ProposalNonVoters( $id: String! - $addresses: JSON + $addresses: [String] ) { proposalNonVoters( id: $id diff --git a/packages/anticapture-client/queries/proposals.graphql b/packages/anticapture-client/queries/proposals.graphql index cd5c2b40..9e75d501 100644 --- a/packages/anticapture-client/queries/proposals.graphql +++ b/packages/anticapture-client/queries/proposals.graphql @@ -1,23 +1,25 @@ query GetProposalById($id: String!) { proposal(id: $id) { - id - daoId - proposerAccountId - title - description - startBlock - endBlock - endTimestamp - timestamp - status - forVotes - againstVotes - abstainVotes - txHash + ... on OnchainProposal { + id + daoId + proposerAccountId + title + description + startBlock + endBlock + endTimestamp + timestamp + status + forVotes + againstVotes + abstainVotes + txHash + } } } -query ListProposals($skip: NonNegativeInt, $limit: PositiveInt, $orderDirection: queryInput_proposals_orderDirection, $status: JSON, $fromDate: Float, $fromEndDate: Float, $includeOptimisticProposals: queryInput_proposals_includeOptimisticProposals) { +query ListProposals($skip: Int, $limit: Int, $orderDirection: OrderDirection, $status: [queryInput_proposals_status_items], $fromDate: Int, $fromEndDate: Int, $includeOptimisticProposals: Boolean) { proposals(skip: $skip, limit: $limit, orderDirection: $orderDirection, status: $status, fromDate: $fromDate, fromEndDate: $fromEndDate, includeOptimisticProposals: $includeOptimisticProposals) { items { id @@ -37,4 +39,4 @@ query ListProposals($skip: NonNegativeInt, $limit: PositiveInt, $orderDirection: } totalCount } -} \ No newline at end of file +} diff --git a/packages/anticapture-client/queries/threshold.graphql b/packages/anticapture-client/queries/threshold.graphql index 8ea5facb..ed5ccddd 100644 --- a/packages/anticapture-client/queries/threshold.graphql +++ b/packages/anticapture-client/queries/threshold.graphql @@ -1,5 +1,5 @@ -query GetEventRelevanceThreshold($relevance: queryInput_getEventRelevanceThreshold_relevance!, $type: queryInput_getEventRelevanceThreshold_type!) { +query GetEventRelevanceThreshold($relevance: FeedRelevance!, $type: FeedEventType!) { getEventRelevanceThreshold(relevance: $relevance, type: $type) { threshold } -} \ No newline at end of file +} diff --git a/packages/anticapture-client/queries/votes.graphql b/packages/anticapture-client/queries/votes.graphql index a1fd32da..797bcc09 100644 --- a/packages/anticapture-client/queries/votes.graphql +++ b/packages/anticapture-client/queries/votes.graphql @@ -1,12 +1,12 @@ query ListVotes( - $voterAddressIn: JSON - $fromDate: Float - $toDate: Float - $limit: Float - $skip: NonNegativeInt + $voterAddressIn: [String] + $fromDate: Int + $toDate: Int + $limit: Int + $skip: Int $orderBy: queryInput_votes_orderBy - $orderDirection: queryInput_votes_orderDirection - $support: Float + $orderDirection: OrderDirection + $support: String ) { votes( voterAddressIn: $voterAddressIn @@ -30,4 +30,4 @@ query ListVotes( } totalCount } -} \ No newline at end of file +} diff --git a/packages/anticapture-client/queries/voting-power.graphql b/packages/anticapture-client/queries/voting-power.graphql index be4d40ed..257cefaf 100644 --- a/packages/anticapture-client/queries/voting-power.graphql +++ b/packages/anticapture-client/queries/voting-power.graphql @@ -1,4 +1,4 @@ -query ListHistoricalVotingPower($limit: PositiveInt, $skip: NonNegativeInt, $orderBy: queryInput_historicalVotingPower_orderBy, $orderDirection: queryInput_historicalVotingPower_orderDirection, $fromDate: String, $address: String) { +query ListHistoricalVotingPower($limit: Int, $skip: Int, $orderBy: queryInput_historicalVotingPower_orderBy, $orderDirection: OrderDirection, $fromDate: Int, $address: String) { historicalVotingPower(limit: $limit, skip: $skip, orderBy: $orderBy, orderDirection: $orderDirection, fromDate: $fromDate, address: $address) { items { accountId @@ -22,4 +22,4 @@ query ListHistoricalVotingPower($limit: PositiveInt, $skip: NonNegativeInt, $ord } totalCount } -} \ No newline at end of file +} diff --git a/packages/anticapture-client/src/anticapture-client.ts b/packages/anticapture-client/src/anticapture-client.ts index 187c5d43..ebe197fd 100644 --- a/packages/anticapture-client/src/anticapture-client.ts +++ b/packages/anticapture-client/src/anticapture-client.ts @@ -10,13 +10,13 @@ import type { ListProposalsQuery, ListProposalsQueryVariables, ListHistoricalVotingPowerQueryVariables, - ListVotesQuery, ListVotesQueryVariables, ProposalNonVotersQueryVariables, ListOffchainProposalsQueryVariables, ListOffchainVotesQueryVariables, } from './gql/graphql'; -import { GetDaOsDocument, GetProposalByIdDocument, ListProposalsDocument, ListHistoricalVotingPowerDocument, ListVotesDocument, ProposalNonVotersDocument, GetEventRelevanceThresholdDocument, QueryInput_Votes_OrderBy, QueryInput_Votes_OrderDirection, QueryInput_VotesOffchain_OrderBy, QueryInput_VotesOffchain_OrderDirection, ListOffchainProposalsDocument, ListOffchainVotesDocument } from './gql/graphql'; +import { GetDaOsDocument, GetProposalByIdDocument, ListProposalsDocument, ListHistoricalVotingPowerDocument, ListVotesDocument, ProposalNonVotersDocument, GetEventRelevanceThresholdDocument, QueryInput_Votes_OrderBy, OrderDirection, QueryInput_VotesOffchain_OrderBy, ListOffchainProposalsDocument, ListOffchainVotesDocument, OffchainProposalNonVotersDocument } from './gql/graphql'; +import type { OffchainProposalNonVotersQueryVariables } from './gql/graphql'; import { SafeDaosResponseSchema, SafeProposalByIdResponseSchema, @@ -26,6 +26,7 @@ import { SafeProposalNonVotersResponseSchema, SafeOffchainProposalsResponseSchema, SafeOffchainVotesResponseSchema, + SafeOffchainProposalNonVotersResponseSchema, processProposals, processVotingPowerHistory, ProcessedVotingPowerHistory, @@ -37,7 +38,7 @@ import { type ProposalItems = NonNullable['items']; type VotingPowerHistoryItems = ProcessedVotingPowerHistory[]; type ProposalNonVoter = z.infer['proposalNonVoters']['items'][0]; -type VoteItem = NonNullable['items'][0]>; +type VoteItem = z.infer['votes']['items'][0]; export type VoteWithDaoId = VoteItem & { daoId: string }; export type OffchainVoteWithDaoId = OffchainVoteItem & { daoId: string }; @@ -205,9 +206,9 @@ export class AnticaptureClient { // Sort globally by timestamp desc (most recent first) if (variables?.fromEndDate) { - allProposals.sort((a, b) => parseInt(b?.endTimestamp || '0') - parseInt(a?.endTimestamp || '0')); + allProposals.sort((a, b) => (b?.endTimestamp ?? 0) - (a?.endTimestamp ?? 0)); } else { - allProposals.sort((a, b) => parseInt(b?.timestamp || '0') - parseInt(a?.timestamp || '0') || 0); + allProposals.sort((a, b) => (b?.timestamp ?? 0) - (a?.timestamp ?? 0)); } return allProposals; @@ -270,7 +271,7 @@ export class AnticaptureClient { variables, daoId ); - return validated.votes.items.filter(item => item !== null) as VoteItem[]; + return validated.votes.items; } catch (error) { console.warn(`Error fetching votes for DAO ${daoId}:`, error); return []; @@ -310,6 +311,36 @@ export class AnticaptureClient { } } + /** + * Fetches addresses that haven't voted on a specific offchain (Snapshot) proposal + * @param proposalId The Snapshot proposal ID to check + * @param addresses Optional array of addresses to filter by + * @returns List of non-voters + */ + async getOffchainProposalNonVoters( + proposalId: string, + addresses?: string[], + ): Promise<{ voter: string; votingPower?: string }[]> { + try { + const variables: OffchainProposalNonVotersQueryVariables = { + id: proposalId, + ...(addresses && { addresses }), + orderDirection: OrderDirection.Desc, + }; + + const validated = await this.query( + OffchainProposalNonVotersDocument, + SafeOffchainProposalNonVotersResponseSchema, + variables, + ); + + return validated.offchainProposalNonVoters.items; + } catch (error) { + console.warn(`Error fetching offchain non-voters for proposal ${proposalId}:`, error); + return []; + } + } + /** * List recent votes from all DAOs since a given timestamp * @param timestampGt Fetch votes with timestamp greater than this value (unix timestamp as string) @@ -327,7 +358,7 @@ export class AnticaptureClient { fromDate: parseInt(timestampGt), limit, orderBy: QueryInput_Votes_OrderBy.Timestamp, - orderDirection: QueryInput_Votes_OrderDirection.Asc + orderDirection: OrderDirection.Asc }); // Add daoId to each vote return votes.map(vote => ({ @@ -460,7 +491,7 @@ export class AnticaptureClient { fromDate, limit, orderBy: QueryInput_VotesOffchain_OrderBy.Timestamp, - orderDirection: QueryInput_VotesOffchain_OrderDirection.Asc + orderDirection: OrderDirection.Asc }); return votes.map(vote => ({ ...vote, diff --git a/packages/anticapture-client/src/gql/gql.ts b/packages/anticapture-client/src/gql/gql.ts index d00f912d..cce93fea 100644 --- a/packages/anticapture-client/src/gql/gql.ts +++ b/packages/anticapture-client/src/gql/gql.ts @@ -15,23 +15,25 @@ import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document- */ type Documents = { "query GetDAOs {\n daos {\n items {\n id\n votingDelay\n chainId\n alreadySupportCalldataReview\n supportOffchainData\n }\n }\n}": typeof types.GetDaOsDocument, - "query ListOffchainProposals($skip: NonNegativeInt, $limit: PositiveInt, $orderDirection: queryInput_offchainProposals_orderDirection, $status: JSON, $fromDate: Float, $endDate: Float) {\n offchainProposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n endDate: $endDate\n ) {\n items {\n id\n title\n discussion\n link\n state\n created\n end\n }\n totalCount\n }\n}": typeof types.ListOffchainProposalsDocument, - "query ListOffchainVotes($fromDate: Float, $toDate: Float, $limit: Float, $skip: NonNegativeInt, $orderBy: queryInput_votesOffchain_orderBy, $orderDirection: queryInput_votesOffchain_orderDirection, $voterAddresses: JSON) {\n votesOffchain(\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n voterAddresses: $voterAddresses\n ) {\n items {\n voter\n created\n proposalId\n proposalTitle\n reason\n vp\n }\n totalCount\n }\n}": typeof types.ListOffchainVotesDocument, - "query ProposalNonVoters($id: String!, $addresses: JSON) {\n proposalNonVoters(id: $id, addresses: $addresses) {\n items {\n voter\n }\n }\n}": typeof types.ProposalNonVotersDocument, - "query GetProposalById($id: String!) {\n proposal(id: $id) {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n}\n\nquery ListProposals($skip: NonNegativeInt, $limit: PositiveInt, $orderDirection: queryInput_proposals_orderDirection, $status: JSON, $fromDate: Float, $fromEndDate: Float, $includeOptimisticProposals: queryInput_proposals_includeOptimisticProposals) {\n proposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n fromEndDate: $fromEndDate\n includeOptimisticProposals: $includeOptimisticProposals\n ) {\n items {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n totalCount\n }\n}": typeof types.GetProposalByIdDocument, - "query GetEventRelevanceThreshold($relevance: queryInput_getEventRelevanceThreshold_relevance!, $type: queryInput_getEventRelevanceThreshold_type!) {\n getEventRelevanceThreshold(relevance: $relevance, type: $type) {\n threshold\n }\n}": typeof types.GetEventRelevanceThresholdDocument, - "query ListVotes($voterAddressIn: JSON, $fromDate: Float, $toDate: Float, $limit: Float, $skip: NonNegativeInt, $orderBy: queryInput_votes_orderBy, $orderDirection: queryInput_votes_orderDirection, $support: Float) {\n votes(\n voterAddressIn: $voterAddressIn\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n support: $support\n ) {\n items {\n transactionHash\n proposalId\n voterAddress\n support\n votingPower\n timestamp\n reason\n proposalTitle\n }\n totalCount\n }\n}": typeof types.ListVotesDocument, - "query ListHistoricalVotingPower($limit: PositiveInt, $skip: NonNegativeInt, $orderBy: queryInput_historicalVotingPower_orderBy, $orderDirection: queryInput_historicalVotingPower_orderDirection, $fromDate: String, $address: String) {\n historicalVotingPower(\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n fromDate: $fromDate\n address: $address\n ) {\n items {\n accountId\n timestamp\n votingPower\n delta\n daoId\n transactionHash\n logIndex\n delegation {\n from\n to\n value\n previousDelegate\n }\n transfer {\n from\n to\n value\n }\n }\n totalCount\n }\n}": typeof types.ListHistoricalVotingPowerDocument, + "query OffchainProposalNonVoters($id: String!, $addresses: [String], $orderDirection: OrderDirection) {\n offchainProposalNonVoters(\n id: $id\n addresses: $addresses\n orderDirection: $orderDirection\n ) {\n ... on OffchainVotersResponse {\n items {\n voter\n votingPower\n }\n }\n }\n}": typeof types.OffchainProposalNonVotersDocument, + "query ListOffchainProposals($skip: Int, $limit: Int, $orderDirection: OrderDirection, $status: [queryInput_offchainProposals_status_items], $fromDate: Int, $endDate: Int) {\n offchainProposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n endDate: $endDate\n ) {\n items {\n id\n title\n discussion\n link\n state\n created\n end\n }\n totalCount\n }\n}": typeof types.ListOffchainProposalsDocument, + "query ListOffchainVotes($fromDate: Int, $toDate: Int, $limit: Int, $skip: Int, $orderBy: queryInput_votesOffchain_orderBy, $orderDirection: OrderDirection, $voterAddresses: [String]) {\n votesOffchain(\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n voterAddresses: $voterAddresses\n ) {\n items {\n voter\n created\n proposalId\n proposalTitle\n reason\n vp\n }\n totalCount\n }\n}": typeof types.ListOffchainVotesDocument, + "query ProposalNonVoters($id: String!, $addresses: [String]) {\n proposalNonVoters(id: $id, addresses: $addresses) {\n items {\n voter\n }\n }\n}": typeof types.ProposalNonVotersDocument, + "query GetProposalById($id: String!) {\n proposal(id: $id) {\n ... on OnchainProposal {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n }\n}\n\nquery ListProposals($skip: Int, $limit: Int, $orderDirection: OrderDirection, $status: [queryInput_proposals_status_items], $fromDate: Int, $fromEndDate: Int, $includeOptimisticProposals: Boolean) {\n proposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n fromEndDate: $fromEndDate\n includeOptimisticProposals: $includeOptimisticProposals\n ) {\n items {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n totalCount\n }\n}": typeof types.GetProposalByIdDocument, + "query GetEventRelevanceThreshold($relevance: FeedRelevance!, $type: FeedEventType!) {\n getEventRelevanceThreshold(relevance: $relevance, type: $type) {\n threshold\n }\n}": typeof types.GetEventRelevanceThresholdDocument, + "query ListVotes($voterAddressIn: [String], $fromDate: Int, $toDate: Int, $limit: Int, $skip: Int, $orderBy: queryInput_votes_orderBy, $orderDirection: OrderDirection, $support: String) {\n votes(\n voterAddressIn: $voterAddressIn\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n support: $support\n ) {\n items {\n transactionHash\n proposalId\n voterAddress\n support\n votingPower\n timestamp\n reason\n proposalTitle\n }\n totalCount\n }\n}": typeof types.ListVotesDocument, + "query ListHistoricalVotingPower($limit: Int, $skip: Int, $orderBy: queryInput_historicalVotingPower_orderBy, $orderDirection: OrderDirection, $fromDate: Int, $address: String) {\n historicalVotingPower(\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n fromDate: $fromDate\n address: $address\n ) {\n items {\n accountId\n timestamp\n votingPower\n delta\n daoId\n transactionHash\n logIndex\n delegation {\n from\n to\n value\n previousDelegate\n }\n transfer {\n from\n to\n value\n }\n }\n totalCount\n }\n}": typeof types.ListHistoricalVotingPowerDocument, }; const documents: Documents = { "query GetDAOs {\n daos {\n items {\n id\n votingDelay\n chainId\n alreadySupportCalldataReview\n supportOffchainData\n }\n }\n}": types.GetDaOsDocument, - "query ListOffchainProposals($skip: NonNegativeInt, $limit: PositiveInt, $orderDirection: queryInput_offchainProposals_orderDirection, $status: JSON, $fromDate: Float, $endDate: Float) {\n offchainProposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n endDate: $endDate\n ) {\n items {\n id\n title\n discussion\n link\n state\n created\n end\n }\n totalCount\n }\n}": types.ListOffchainProposalsDocument, - "query ListOffchainVotes($fromDate: Float, $toDate: Float, $limit: Float, $skip: NonNegativeInt, $orderBy: queryInput_votesOffchain_orderBy, $orderDirection: queryInput_votesOffchain_orderDirection, $voterAddresses: JSON) {\n votesOffchain(\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n voterAddresses: $voterAddresses\n ) {\n items {\n voter\n created\n proposalId\n proposalTitle\n reason\n vp\n }\n totalCount\n }\n}": types.ListOffchainVotesDocument, - "query ProposalNonVoters($id: String!, $addresses: JSON) {\n proposalNonVoters(id: $id, addresses: $addresses) {\n items {\n voter\n }\n }\n}": types.ProposalNonVotersDocument, - "query GetProposalById($id: String!) {\n proposal(id: $id) {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n}\n\nquery ListProposals($skip: NonNegativeInt, $limit: PositiveInt, $orderDirection: queryInput_proposals_orderDirection, $status: JSON, $fromDate: Float, $fromEndDate: Float, $includeOptimisticProposals: queryInput_proposals_includeOptimisticProposals) {\n proposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n fromEndDate: $fromEndDate\n includeOptimisticProposals: $includeOptimisticProposals\n ) {\n items {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n totalCount\n }\n}": types.GetProposalByIdDocument, - "query GetEventRelevanceThreshold($relevance: queryInput_getEventRelevanceThreshold_relevance!, $type: queryInput_getEventRelevanceThreshold_type!) {\n getEventRelevanceThreshold(relevance: $relevance, type: $type) {\n threshold\n }\n}": types.GetEventRelevanceThresholdDocument, - "query ListVotes($voterAddressIn: JSON, $fromDate: Float, $toDate: Float, $limit: Float, $skip: NonNegativeInt, $orderBy: queryInput_votes_orderBy, $orderDirection: queryInput_votes_orderDirection, $support: Float) {\n votes(\n voterAddressIn: $voterAddressIn\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n support: $support\n ) {\n items {\n transactionHash\n proposalId\n voterAddress\n support\n votingPower\n timestamp\n reason\n proposalTitle\n }\n totalCount\n }\n}": types.ListVotesDocument, - "query ListHistoricalVotingPower($limit: PositiveInt, $skip: NonNegativeInt, $orderBy: queryInput_historicalVotingPower_orderBy, $orderDirection: queryInput_historicalVotingPower_orderDirection, $fromDate: String, $address: String) {\n historicalVotingPower(\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n fromDate: $fromDate\n address: $address\n ) {\n items {\n accountId\n timestamp\n votingPower\n delta\n daoId\n transactionHash\n logIndex\n delegation {\n from\n to\n value\n previousDelegate\n }\n transfer {\n from\n to\n value\n }\n }\n totalCount\n }\n}": types.ListHistoricalVotingPowerDocument, + "query OffchainProposalNonVoters($id: String!, $addresses: [String], $orderDirection: OrderDirection) {\n offchainProposalNonVoters(\n id: $id\n addresses: $addresses\n orderDirection: $orderDirection\n ) {\n ... on OffchainVotersResponse {\n items {\n voter\n votingPower\n }\n }\n }\n}": types.OffchainProposalNonVotersDocument, + "query ListOffchainProposals($skip: Int, $limit: Int, $orderDirection: OrderDirection, $status: [queryInput_offchainProposals_status_items], $fromDate: Int, $endDate: Int) {\n offchainProposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n endDate: $endDate\n ) {\n items {\n id\n title\n discussion\n link\n state\n created\n end\n }\n totalCount\n }\n}": types.ListOffchainProposalsDocument, + "query ListOffchainVotes($fromDate: Int, $toDate: Int, $limit: Int, $skip: Int, $orderBy: queryInput_votesOffchain_orderBy, $orderDirection: OrderDirection, $voterAddresses: [String]) {\n votesOffchain(\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n voterAddresses: $voterAddresses\n ) {\n items {\n voter\n created\n proposalId\n proposalTitle\n reason\n vp\n }\n totalCount\n }\n}": types.ListOffchainVotesDocument, + "query ProposalNonVoters($id: String!, $addresses: [String]) {\n proposalNonVoters(id: $id, addresses: $addresses) {\n items {\n voter\n }\n }\n}": types.ProposalNonVotersDocument, + "query GetProposalById($id: String!) {\n proposal(id: $id) {\n ... on OnchainProposal {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n }\n}\n\nquery ListProposals($skip: Int, $limit: Int, $orderDirection: OrderDirection, $status: [queryInput_proposals_status_items], $fromDate: Int, $fromEndDate: Int, $includeOptimisticProposals: Boolean) {\n proposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n fromEndDate: $fromEndDate\n includeOptimisticProposals: $includeOptimisticProposals\n ) {\n items {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n totalCount\n }\n}": types.GetProposalByIdDocument, + "query GetEventRelevanceThreshold($relevance: FeedRelevance!, $type: FeedEventType!) {\n getEventRelevanceThreshold(relevance: $relevance, type: $type) {\n threshold\n }\n}": types.GetEventRelevanceThresholdDocument, + "query ListVotes($voterAddressIn: [String], $fromDate: Int, $toDate: Int, $limit: Int, $skip: Int, $orderBy: queryInput_votes_orderBy, $orderDirection: OrderDirection, $support: String) {\n votes(\n voterAddressIn: $voterAddressIn\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n support: $support\n ) {\n items {\n transactionHash\n proposalId\n voterAddress\n support\n votingPower\n timestamp\n reason\n proposalTitle\n }\n totalCount\n }\n}": types.ListVotesDocument, + "query ListHistoricalVotingPower($limit: Int, $skip: Int, $orderBy: queryInput_historicalVotingPower_orderBy, $orderDirection: OrderDirection, $fromDate: Int, $address: String) {\n historicalVotingPower(\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n fromDate: $fromDate\n address: $address\n ) {\n items {\n accountId\n timestamp\n votingPower\n delta\n daoId\n transactionHash\n logIndex\n delegation {\n from\n to\n value\n previousDelegate\n }\n transfer {\n from\n to\n value\n }\n }\n totalCount\n }\n}": types.ListHistoricalVotingPowerDocument, }; /** @@ -55,31 +57,35 @@ export function graphql(source: "query GetDAOs {\n daos {\n items {\n i /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "query ListOffchainProposals($skip: NonNegativeInt, $limit: PositiveInt, $orderDirection: queryInput_offchainProposals_orderDirection, $status: JSON, $fromDate: Float, $endDate: Float) {\n offchainProposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n endDate: $endDate\n ) {\n items {\n id\n title\n discussion\n link\n state\n created\n end\n }\n totalCount\n }\n}"): (typeof documents)["query ListOffchainProposals($skip: NonNegativeInt, $limit: PositiveInt, $orderDirection: queryInput_offchainProposals_orderDirection, $status: JSON, $fromDate: Float, $endDate: Float) {\n offchainProposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n endDate: $endDate\n ) {\n items {\n id\n title\n discussion\n link\n state\n created\n end\n }\n totalCount\n }\n}"]; +export function graphql(source: "query OffchainProposalNonVoters($id: String!, $addresses: [String], $orderDirection: OrderDirection) {\n offchainProposalNonVoters(\n id: $id\n addresses: $addresses\n orderDirection: $orderDirection\n ) {\n ... on OffchainVotersResponse {\n items {\n voter\n votingPower\n }\n }\n }\n}"): (typeof documents)["query OffchainProposalNonVoters($id: String!, $addresses: [String], $orderDirection: OrderDirection) {\n offchainProposalNonVoters(\n id: $id\n addresses: $addresses\n orderDirection: $orderDirection\n ) {\n ... on OffchainVotersResponse {\n items {\n voter\n votingPower\n }\n }\n }\n}"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "query ListOffchainVotes($fromDate: Float, $toDate: Float, $limit: Float, $skip: NonNegativeInt, $orderBy: queryInput_votesOffchain_orderBy, $orderDirection: queryInput_votesOffchain_orderDirection, $voterAddresses: JSON) {\n votesOffchain(\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n voterAddresses: $voterAddresses\n ) {\n items {\n voter\n created\n proposalId\n proposalTitle\n reason\n vp\n }\n totalCount\n }\n}"): (typeof documents)["query ListOffchainVotes($fromDate: Float, $toDate: Float, $limit: Float, $skip: NonNegativeInt, $orderBy: queryInput_votesOffchain_orderBy, $orderDirection: queryInput_votesOffchain_orderDirection, $voterAddresses: JSON) {\n votesOffchain(\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n voterAddresses: $voterAddresses\n ) {\n items {\n voter\n created\n proposalId\n proposalTitle\n reason\n vp\n }\n totalCount\n }\n}"]; +export function graphql(source: "query ListOffchainProposals($skip: Int, $limit: Int, $orderDirection: OrderDirection, $status: [queryInput_offchainProposals_status_items], $fromDate: Int, $endDate: Int) {\n offchainProposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n endDate: $endDate\n ) {\n items {\n id\n title\n discussion\n link\n state\n created\n end\n }\n totalCount\n }\n}"): (typeof documents)["query ListOffchainProposals($skip: Int, $limit: Int, $orderDirection: OrderDirection, $status: [queryInput_offchainProposals_status_items], $fromDate: Int, $endDate: Int) {\n offchainProposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n endDate: $endDate\n ) {\n items {\n id\n title\n discussion\n link\n state\n created\n end\n }\n totalCount\n }\n}"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "query ProposalNonVoters($id: String!, $addresses: JSON) {\n proposalNonVoters(id: $id, addresses: $addresses) {\n items {\n voter\n }\n }\n}"): (typeof documents)["query ProposalNonVoters($id: String!, $addresses: JSON) {\n proposalNonVoters(id: $id, addresses: $addresses) {\n items {\n voter\n }\n }\n}"]; +export function graphql(source: "query ListOffchainVotes($fromDate: Int, $toDate: Int, $limit: Int, $skip: Int, $orderBy: queryInput_votesOffchain_orderBy, $orderDirection: OrderDirection, $voterAddresses: [String]) {\n votesOffchain(\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n voterAddresses: $voterAddresses\n ) {\n items {\n voter\n created\n proposalId\n proposalTitle\n reason\n vp\n }\n totalCount\n }\n}"): (typeof documents)["query ListOffchainVotes($fromDate: Int, $toDate: Int, $limit: Int, $skip: Int, $orderBy: queryInput_votesOffchain_orderBy, $orderDirection: OrderDirection, $voterAddresses: [String]) {\n votesOffchain(\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n voterAddresses: $voterAddresses\n ) {\n items {\n voter\n created\n proposalId\n proposalTitle\n reason\n vp\n }\n totalCount\n }\n}"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "query GetProposalById($id: String!) {\n proposal(id: $id) {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n}\n\nquery ListProposals($skip: NonNegativeInt, $limit: PositiveInt, $orderDirection: queryInput_proposals_orderDirection, $status: JSON, $fromDate: Float, $fromEndDate: Float, $includeOptimisticProposals: queryInput_proposals_includeOptimisticProposals) {\n proposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n fromEndDate: $fromEndDate\n includeOptimisticProposals: $includeOptimisticProposals\n ) {\n items {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n totalCount\n }\n}"): (typeof documents)["query GetProposalById($id: String!) {\n proposal(id: $id) {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n}\n\nquery ListProposals($skip: NonNegativeInt, $limit: PositiveInt, $orderDirection: queryInput_proposals_orderDirection, $status: JSON, $fromDate: Float, $fromEndDate: Float, $includeOptimisticProposals: queryInput_proposals_includeOptimisticProposals) {\n proposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n fromEndDate: $fromEndDate\n includeOptimisticProposals: $includeOptimisticProposals\n ) {\n items {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n totalCount\n }\n}"]; +export function graphql(source: "query ProposalNonVoters($id: String!, $addresses: [String]) {\n proposalNonVoters(id: $id, addresses: $addresses) {\n items {\n voter\n }\n }\n}"): (typeof documents)["query ProposalNonVoters($id: String!, $addresses: [String]) {\n proposalNonVoters(id: $id, addresses: $addresses) {\n items {\n voter\n }\n }\n}"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "query GetEventRelevanceThreshold($relevance: queryInput_getEventRelevanceThreshold_relevance!, $type: queryInput_getEventRelevanceThreshold_type!) {\n getEventRelevanceThreshold(relevance: $relevance, type: $type) {\n threshold\n }\n}"): (typeof documents)["query GetEventRelevanceThreshold($relevance: queryInput_getEventRelevanceThreshold_relevance!, $type: queryInput_getEventRelevanceThreshold_type!) {\n getEventRelevanceThreshold(relevance: $relevance, type: $type) {\n threshold\n }\n}"]; +export function graphql(source: "query GetProposalById($id: String!) {\n proposal(id: $id) {\n ... on OnchainProposal {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n }\n}\n\nquery ListProposals($skip: Int, $limit: Int, $orderDirection: OrderDirection, $status: [queryInput_proposals_status_items], $fromDate: Int, $fromEndDate: Int, $includeOptimisticProposals: Boolean) {\n proposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n fromEndDate: $fromEndDate\n includeOptimisticProposals: $includeOptimisticProposals\n ) {\n items {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n totalCount\n }\n}"): (typeof documents)["query GetProposalById($id: String!) {\n proposal(id: $id) {\n ... on OnchainProposal {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n }\n}\n\nquery ListProposals($skip: Int, $limit: Int, $orderDirection: OrderDirection, $status: [queryInput_proposals_status_items], $fromDate: Int, $fromEndDate: Int, $includeOptimisticProposals: Boolean) {\n proposals(\n skip: $skip\n limit: $limit\n orderDirection: $orderDirection\n status: $status\n fromDate: $fromDate\n fromEndDate: $fromEndDate\n includeOptimisticProposals: $includeOptimisticProposals\n ) {\n items {\n id\n daoId\n proposerAccountId\n title\n description\n startBlock\n endBlock\n endTimestamp\n timestamp\n status\n forVotes\n againstVotes\n abstainVotes\n txHash\n }\n totalCount\n }\n}"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "query ListVotes($voterAddressIn: JSON, $fromDate: Float, $toDate: Float, $limit: Float, $skip: NonNegativeInt, $orderBy: queryInput_votes_orderBy, $orderDirection: queryInput_votes_orderDirection, $support: Float) {\n votes(\n voterAddressIn: $voterAddressIn\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n support: $support\n ) {\n items {\n transactionHash\n proposalId\n voterAddress\n support\n votingPower\n timestamp\n reason\n proposalTitle\n }\n totalCount\n }\n}"): (typeof documents)["query ListVotes($voterAddressIn: JSON, $fromDate: Float, $toDate: Float, $limit: Float, $skip: NonNegativeInt, $orderBy: queryInput_votes_orderBy, $orderDirection: queryInput_votes_orderDirection, $support: Float) {\n votes(\n voterAddressIn: $voterAddressIn\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n support: $support\n ) {\n items {\n transactionHash\n proposalId\n voterAddress\n support\n votingPower\n timestamp\n reason\n proposalTitle\n }\n totalCount\n }\n}"]; +export function graphql(source: "query GetEventRelevanceThreshold($relevance: FeedRelevance!, $type: FeedEventType!) {\n getEventRelevanceThreshold(relevance: $relevance, type: $type) {\n threshold\n }\n}"): (typeof documents)["query GetEventRelevanceThreshold($relevance: FeedRelevance!, $type: FeedEventType!) {\n getEventRelevanceThreshold(relevance: $relevance, type: $type) {\n threshold\n }\n}"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "query ListHistoricalVotingPower($limit: PositiveInt, $skip: NonNegativeInt, $orderBy: queryInput_historicalVotingPower_orderBy, $orderDirection: queryInput_historicalVotingPower_orderDirection, $fromDate: String, $address: String) {\n historicalVotingPower(\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n fromDate: $fromDate\n address: $address\n ) {\n items {\n accountId\n timestamp\n votingPower\n delta\n daoId\n transactionHash\n logIndex\n delegation {\n from\n to\n value\n previousDelegate\n }\n transfer {\n from\n to\n value\n }\n }\n totalCount\n }\n}"): (typeof documents)["query ListHistoricalVotingPower($limit: PositiveInt, $skip: NonNegativeInt, $orderBy: queryInput_historicalVotingPower_orderBy, $orderDirection: queryInput_historicalVotingPower_orderDirection, $fromDate: String, $address: String) {\n historicalVotingPower(\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n fromDate: $fromDate\n address: $address\n ) {\n items {\n accountId\n timestamp\n votingPower\n delta\n daoId\n transactionHash\n logIndex\n delegation {\n from\n to\n value\n previousDelegate\n }\n transfer {\n from\n to\n value\n }\n }\n totalCount\n }\n}"]; +export function graphql(source: "query ListVotes($voterAddressIn: [String], $fromDate: Int, $toDate: Int, $limit: Int, $skip: Int, $orderBy: queryInput_votes_orderBy, $orderDirection: OrderDirection, $support: String) {\n votes(\n voterAddressIn: $voterAddressIn\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n support: $support\n ) {\n items {\n transactionHash\n proposalId\n voterAddress\n support\n votingPower\n timestamp\n reason\n proposalTitle\n }\n totalCount\n }\n}"): (typeof documents)["query ListVotes($voterAddressIn: [String], $fromDate: Int, $toDate: Int, $limit: Int, $skip: Int, $orderBy: queryInput_votes_orderBy, $orderDirection: OrderDirection, $support: String) {\n votes(\n voterAddressIn: $voterAddressIn\n fromDate: $fromDate\n toDate: $toDate\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n support: $support\n ) {\n items {\n transactionHash\n proposalId\n voterAddress\n support\n votingPower\n timestamp\n reason\n proposalTitle\n }\n totalCount\n }\n}"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "query ListHistoricalVotingPower($limit: Int, $skip: Int, $orderBy: queryInput_historicalVotingPower_orderBy, $orderDirection: OrderDirection, $fromDate: Int, $address: String) {\n historicalVotingPower(\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n fromDate: $fromDate\n address: $address\n ) {\n items {\n accountId\n timestamp\n votingPower\n delta\n daoId\n transactionHash\n logIndex\n delegation {\n from\n to\n value\n previousDelegate\n }\n transfer {\n from\n to\n value\n }\n }\n totalCount\n }\n}"): (typeof documents)["query ListHistoricalVotingPower($limit: Int, $skip: Int, $orderBy: queryInput_historicalVotingPower_orderBy, $orderDirection: OrderDirection, $fromDate: Int, $address: String) {\n historicalVotingPower(\n limit: $limit\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n fromDate: $fromDate\n address: $address\n ) {\n items {\n accountId\n timestamp\n votingPower\n delta\n daoId\n transactionHash\n logIndex\n delegation {\n from\n to\n value\n previousDelegate\n }\n transfer {\n from\n to\n value\n }\n }\n totalCount\n }\n}"]; export function graphql(source: string) { return (documents as any)[source] ?? {}; diff --git a/packages/anticapture-client/src/gql/graphql.ts b/packages/anticapture-client/src/gql/graphql.ts index 0a98d117..49da3a25 100644 --- a/packages/anticapture-client/src/gql/graphql.ts +++ b/packages/anticapture-client/src/gql/graphql.ts @@ -14,13 +14,92 @@ export type Scalars = { Boolean: { input: boolean; output: boolean; } Int: { input: number; output: number; } Float: { input: number; output: number; } + /** A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. */ + DateTime: { input: any; output: any; } /** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */ JSON: { input: any; output: any; } - /** Integers that will have a value of 0 or more. */ - NonNegativeInt: { input: any; output: any; } ObjMap: { input: any; output: any; } - /** Integers that will have a value greater than 0. */ - PositiveInt: { input: any; output: any; } + /** A field whose value conforms to the standard URL format as specified in RFC3986: https://www.ietf.org/rfc/rfc3986.txt. */ + URL: { input: any; output: any; } +}; + +/** Balance delta for a single account across two timestamps. */ +export type AccountBalanceVariation = { + __typename?: 'AccountBalanceVariation'; + /** Absolute balance change encoded as a decimal string. */ + absoluteChange: Scalars['String']['output']; + /** Account address. */ + accountId: Scalars['String']['output']; + /** Balance at the end of the comparison window. */ + currentBalance: Scalars['String']['output']; + /** Relative balance change encoded as a decimal string. */ + percentageChange: Scalars['String']['output']; + /** Balance at the start of the comparison window. */ + previousBalance: Scalars['String']['output']; +}; + +/** Balance variation response for a single account. */ +export type AccountBalanceVariationsByAccountIdResponse = { + __typename?: 'AccountBalanceVariationsByAccountIdResponse'; + data: AccountBalanceVariation; + period: PeriodResponse; +}; + +/** List of balance variations for multiple accounts in the selected period. */ +export type AccountBalanceVariationsResponse = { + __typename?: 'AccountBalanceVariationsResponse'; + items: Array>; + period: PeriodResponse; +}; + +export type AccountBalanceWithVariation = { + __typename?: 'AccountBalanceWithVariation'; + address: Scalars['String']['output']; + balance: Scalars['String']['output']; + delegate: Scalars['String']['output']; + tokenId: Scalars['String']['output']; + variation: AccountBalanceVariation; +}; + +export type AccountBalanceWithVariationResponse = { + __typename?: 'AccountBalanceWithVariationResponse'; + data: AccountBalanceWithVariation; + period: PeriodResponse; +}; + +export type AccountBalancesWithVariationResponse = { + __typename?: 'AccountBalancesWithVariationResponse'; + items: Array>; + period: PeriodResponse; + totalCount: Scalars['Int']['output']; +}; + +/** Aggregated interaction metrics between the requested account and another account. */ +export type AccountInteraction = { + __typename?: 'AccountInteraction'; + /** Counterparty account ID. */ + accountId: Scalars['String']['output']; + /** Net amount transferred between the requested account and the counterparty. */ + amountTransferred: Scalars['String']['output']; + /** Gross transfer volume between the requested account and the counterparty. */ + totalVolume: Scalars['String']['output']; + /** Number of transfers observed for the interaction pair. */ + transferCount: Scalars['String']['output']; +}; + +/** Paginated list of account interaction aggregates. */ +export type AccountInteractionsResponse = { + __typename?: 'AccountInteractionsResponse'; + items: Array>; + period: PeriodResponse; + totalCount: Scalars['Int']['output']; +}; + +/** Active token supply for the selected comparison window. */ +export type ActiveSupplyResponse = { + __typename?: 'ActiveSupplyResponse'; + /** Active token supply encoded as a decimal string. */ + activeSupply: Scalars['String']['output']; }; export type AverageDelegationPercentageItem = { @@ -40,9 +119,147 @@ export type AverageDelegationPercentagePage = { totalCount: Scalars['Int']['output']; }; +/** Average turnout comparison between two adjacent time windows. */ +export type AverageTurnoutComparisonResponse = { + __typename?: 'AverageTurnoutComparisonResponse'; + /** Relative change between current and previous periods. */ + changeRate: Scalars['Float']['output']; + /** Average turnout for the current period encoded as a string. */ + currentAverageTurnout: Scalars['String']['output']; + /** Average turnout for the previous period encoded as a string. */ + oldAverageTurnout: Scalars['String']['output']; +}; + export type DaoList = { __typename?: 'DAOList'; - items: Array; + items: Array; + totalCount: Scalars['Int']['output']; +}; + +/** Current governance parameters and feature flags for the active DAO. */ +export type DaoResponse = { + __typename?: 'DaoResponse'; + alreadySupportCalldataReview: Scalars['Boolean']['output']; + chainId: Scalars['Int']['output']; + id: Scalars['String']['output']; + proposalThreshold: Scalars['String']['output']; + quorum: Scalars['String']['output']; + supportOffchainData: Scalars['Boolean']['output']; + timelockDelay: Scalars['String']['output']; + votingDelay: Scalars['String']['output']; + votingPeriod: Scalars['String']['output']; +}; + +export enum DaysWindow { + '7d' = '_7d', + '30d' = '_30d', + '90d' = '_90d', + '180d' = '_180d', + '365d' = '_365d' +} + +/** Single delegation transfer event in the historical delegation feed. */ +export type DelegationItem = { + __typename?: 'DelegationItem'; + amount: Scalars['String']['output']; + delegateAddress: Scalars['String']['output']; + delegatorAddress: Scalars['String']['output']; + timestamp: Scalars['String']['output']; + transactionHash: Scalars['String']['output']; +}; + +export type DelegationPercentageItem = { + __typename?: 'DelegationPercentageItem'; + /** Unix day bucket represented as a timestamp string. */ + date: Scalars['String']['output']; + /** Delegation percentage value for the day bucket. */ + high: Scalars['String']['output']; +}; + +export type DelegationPercentageResponse = { + __typename?: 'DelegationPercentageResponse'; + items: Array>; + pageInfo: PageInfo; + /** Total number of matching day buckets. */ + totalCount: Scalars['Int']['output']; +}; + +/** Paginated historical delegations response. */ +export type DelegationsResponse = { + __typename?: 'DelegationsResponse'; + items: Array>; + totalCount: Scalars['Int']['output']; +}; + +/** Aggregated delegation amount and latest timestamp for one delegator. */ +export type DelegatorItem = { + __typename?: 'DelegatorItem'; + amount: Scalars['String']['output']; + delegatorAddress: Scalars['String']['output']; + timestamp: Scalars['String']['output']; +}; + +/** Paginated delegators for a delegate address. */ +export type DelegatorsResponse = { + __typename?: 'DelegatorsResponse'; + items: Array>; + totalCount: Scalars['Int']['output']; +}; + +/** Generic error payload returned by the API. */ +export type ErrorResponse = { + __typename?: 'ErrorResponse'; + /** Human-readable error message */ + error: Scalars['String']['output']; + /** Optional implementation detail or validation context for the error. */ + message?: Maybe; +}; + +/** Resolved threshold for a feed event type and relevance level. */ +export type EventRelevanceThresholdResponse = { + __typename?: 'EventRelevanceThresholdResponse'; + /** Threshold value encoded as a decimal string. */ + threshold: Scalars['String']['output']; +}; + +/** Filter events by governance activity type. */ +export enum FeedEventType { + Delegation = 'DELEGATION', + Proposal = 'PROPOSAL', + ProposalExtended = 'PROPOSAL_EXTENDED', + Transfer = 'TRANSFER', + Vote = 'VOTE' +} + +/** Single event in the governance activity feed. */ +export type FeedItem = { + __typename?: 'FeedItem'; + /** Log index within the transaction receipt. */ + logIndex: Scalars['Int']['output']; + /** Type-specific metadata for the feed event. */ + metadata?: Maybe; + relevance: FeedRelevance; + /** Event timestamp in Unix seconds. */ + timestamp: Scalars['Int']['output']; + /** Transaction hash. */ + txHash: Scalars['String']['output']; + type: FeedEventType; + /** Optional event value encoded as a decimal string when applicable. */ + value?: Maybe; +}; + +/** Filter events by relevance tier. */ +export enum FeedRelevance { + High = 'HIGH', + Low = 'LOW', + Medium = 'MEDIUM' +} + +/** Paginated governance activity feed response. */ +export type FeedResponse = { + __typename?: 'FeedResponse'; + items: Array>; + /** Total number of matching feed events. */ totalCount: Scalars['Int']['output']; }; @@ -58,6 +275,247 @@ export enum HttpMethod { Trace = 'TRACE' } +/** Single historical balance record enriched with transfer context. */ +export type HistoricalBalance = { + __typename?: 'HistoricalBalance'; + /** Account address. */ + accountId: Scalars['String']['output']; + /** Account balance after the historical event. */ + balance: Scalars['String']['output']; + /** DAO identifier. */ + daoId: Scalars['String']['output']; + /** Balance change introduced by the historical event. */ + delta: Scalars['String']['output']; + /** Log index within the transaction receipt. */ + logIndex: Scalars['Int']['output']; + /** Event timestamp in Unix seconds as a string. */ + timestamp: Scalars['String']['output']; + /** Transaction hash. */ + transactionHash: Scalars['String']['output']; + transfer: HistoricalBalanceTransfer; +}; + +/** Transfer event associated with a historical balance row. */ +export type HistoricalBalanceTransfer = { + __typename?: 'HistoricalBalanceTransfer'; + /** Sender address. */ + from: Scalars['String']['output']; + /** Recipient address. */ + to: Scalars['String']['output']; + /** Transferred amount encoded as a decimal string. */ + value: Scalars['String']['output']; +}; + +/** Paginated historical balance records for one account. */ +export type HistoricalBalancesResponse = { + __typename?: 'HistoricalBalancesResponse'; + items: Array>; + /** Total number of matching historical balance rows. */ + totalCount: Scalars['Int']['output']; +}; + +/** Single historical voting power record enriched with delegation and transfer context. */ +export type HistoricalVotingPower = { + __typename?: 'HistoricalVotingPower'; + /** Account address. */ + accountId: Scalars['String']['output']; + /** DAO identifier. */ + daoId: Scalars['String']['output']; + delegation?: Maybe; + /** Voting power change introduced by the event. */ + delta: Scalars['String']['output']; + /** Log index within the transaction receipt. */ + logIndex: Scalars['Int']['output']; + /** Event timestamp in Unix seconds as a string. */ + timestamp: Scalars['String']['output']; + /** Transaction hash. */ + transactionHash: Scalars['String']['output']; + transfer?: Maybe; + /** Voting power after the event, encoded as a decimal string. */ + votingPower: Scalars['String']['output']; +}; + +/** Delegation event associated with a historical voting power row. */ +export type HistoricalVotingPowerDelegation = { + __typename?: 'HistoricalVotingPowerDelegation'; + from: Scalars['String']['output']; + previousDelegate?: Maybe; + to: Scalars['String']['output']; + value: Scalars['String']['output']; +}; + +/** Transfer event associated with a historical voting power row. */ +export type HistoricalVotingPowerTransfer = { + __typename?: 'HistoricalVotingPowerTransfer'; + from: Scalars['String']['output']; + to: Scalars['String']['output']; + value: Scalars['String']['output']; +}; + +/** Paginated historical voting power records. */ +export type HistoricalVotingPowersResponse = { + __typename?: 'HistoricalVotingPowersResponse'; + items: Array>; + /** Total number of matching historical voting power rows. */ + totalCount: Scalars['Int']['output']; +}; + +/** Response payload describing the latest update time for a chart. */ +export type LastUpdateResponse = { + __typename?: 'LastUpdateResponse'; + /** Latest refresh time in ISO-8601 format. */ + lastUpdate: Scalars['DateTime']['output']; +}; + +export type OffchainNonVoter = { + __typename?: 'OffchainNonVoter'; + voter: Scalars['String']['output']; + votingPower: Scalars['String']['output']; +}; + +export type OffchainProposal = { + __typename?: 'OffchainProposal'; + /** Address or ENS of the author. */ + author: Scalars['String']['output']; + /** Proposal body. */ + body: Scalars['String']['output']; + choices: Array>; + /** Creation timestamp in Unix seconds. */ + created: Scalars['Int']['output']; + /** Discussion URL or thread reference. */ + discussion: Scalars['String']['output']; + /** Voting end timestamp in Unix seconds. */ + end: Scalars['Int']['output']; + /** Whether the proposal was flagged by Snapshot. */ + flagged: Scalars['Boolean']['output']; + /** Snapshot proposal identifier. */ + id: Scalars['String']['output']; + /** Canonical Snapshot proposal URL. */ + link: Scalars['String']['output']; + network: Scalars['String']['output']; + scores: Array>; + snapshot?: Maybe; + /** Snapshot space identifier. */ + spaceId: Scalars['String']['output']; + /** Voting start timestamp in Unix seconds. */ + start: Scalars['Int']['output']; + /** Current Snapshot proposal state. */ + state: Scalars['String']['output']; + strategies: Array>; + /** Proposal title. */ + title: Scalars['String']['output']; + /** Snapshot proposal type. */ + type: Scalars['String']['output']; + /** Last update timestamp in Unix seconds. */ + updated: Scalars['Int']['output']; +}; + +export type OffchainProposalsResponse = { + __typename?: 'OffchainProposalsResponse'; + items: Array>; + totalCount: Scalars['Int']['output']; +}; + +export type OffchainVote = { + __typename?: 'OffchainVote'; + choice?: Maybe>>; + created: Scalars['Int']['output']; + proposalId: Scalars['String']['output']; + proposalTitle?: Maybe; + reason: Scalars['String']['output']; + voter: Scalars['String']['output']; + vp?: Maybe; +}; + +export type OffchainVotersResponse = { + __typename?: 'OffchainVotersResponse'; + items: Array>; + totalCount: Scalars['Int']['output']; +}; + +export type OffchainVotesResponse = { + __typename?: 'OffchainVotesResponse'; + items: Array>; + totalCount: Scalars['Int']['output']; +}; + +export type OnchainProposal = { + __typename?: 'OnchainProposal'; + /** Abstain votes, encoded as a decimal string. */ + abstainVotes: Scalars['String']['output']; + /** Votes cast against, encoded as a decimal string. */ + againstVotes: Scalars['String']['output']; + /** Encoded calldata payloads executed by the proposal. */ + calldatas: Array>; + /** DAO identifier. */ + daoId: Scalars['String']['output']; + /** Proposal body. */ + description: Scalars['String']['output']; + /** End block number. */ + endBlock: Scalars['Int']['output']; + /** Proposal end timestamp in Unix seconds. */ + endTimestamp: Scalars['Int']['output']; + /** Votes cast in favor, encoded as a decimal string. */ + forVotes: Scalars['String']['output']; + /** Onchain proposal identifier. */ + id: Scalars['String']['output']; + /** Optional proposal type discriminator. */ + proposalType?: Maybe; + /** Address that created the proposal. */ + proposerAccountId: Scalars['String']['output']; + /** Required quorum encoded as a decimal string. */ + quorum: Scalars['String']['output']; + /** Start block number. */ + startBlock: Scalars['Int']['output']; + /** Proposal start timestamp in Unix seconds. */ + startTimestamp: Scalars['Int']['output']; + /** Current proposal status. */ + status: Scalars['String']['output']; + /** Contract targets invoked by the proposal. */ + targets: Array>; + /** Proposal creation timestamp in Unix seconds. */ + timestamp: Scalars['Int']['output']; + /** Proposal title. */ + title: Scalars['String']['output']; + /** Proposal creation transaction hash. */ + txHash: Scalars['String']['output']; + /** ETH values attached to each call, encoded as strings. */ + values: Array>; +}; + +export type OnchainProposalsResponse = { + __typename?: 'OnchainProposalsResponse'; + items: Array>; + totalCount: Scalars['Int']['output']; +}; + +export type OnchainVote = { + __typename?: 'OnchainVote'; + proposalId: Scalars['String']['output']; + proposalTitle?: Maybe; + reason?: Maybe; + /** Governance vote direction. */ + support?: Maybe; + /** Vote timestamp in Unix seconds. */ + timestamp: Scalars['Int']['output']; + transactionHash: Scalars['String']['output']; + voterAddress: Scalars['String']['output']; + /** Voting power encoded as a decimal string. */ + votingPower: Scalars['String']['output']; +}; + +export type OnchainVotesResponse = { + __typename?: 'OnchainVotesResponse'; + items: Array>; + totalCount: Scalars['Int']['output']; +}; + +/** Sort direction for ordered query results. */ +export enum OrderDirection { + Asc = 'asc', + Desc = 'desc' +} + export type PageInfo = { __typename?: 'PageInfo'; endDate?: Maybe; @@ -66,21 +524,114 @@ export type PageInfo = { startDate?: Maybe; }; +/** Inclusive time period represented as ISO-8601 timestamps. */ +export type PeriodResponse = { + __typename?: 'PeriodResponse'; + endTimestamp: Scalars['String']['output']; + startTimestamp: Scalars['String']['output']; +}; + +/** Combined proposal and delegate vote context for one activity row. */ +export type ProposalActivityItem = { + __typename?: 'ProposalActivityItem'; + proposal: ProposalActivityProposal; + userVote?: Maybe; +}; + +/** Proposal snapshot included in the delegate activity response. */ +export type ProposalActivityProposal = { + __typename?: 'ProposalActivityProposal'; + /** Abstain votes, encoded as a decimal string. */ + abstainVotes: Scalars['String']['output']; + /** Votes cast against, encoded as a decimal string. */ + againstVotes: Scalars['String']['output']; + /** DAO identifier. */ + daoId: Scalars['String']['output']; + /** Proposal body. */ + description: Scalars['String']['output']; + /** End block number. */ + endBlock: Scalars['Float']['output']; + /** Votes cast in favor, encoded as a decimal string. */ + forVotes: Scalars['String']['output']; + /** Onchain proposal identifier. */ + id: Scalars['String']['output']; + /** Address that created the proposal. */ + proposerAccountId: Scalars['String']['output']; + /** Start block number. */ + startBlock: Scalars['Float']['output']; + /** Current proposal status. */ + status: Scalars['String']['output']; + /** Proposal creation timestamp in Unix seconds as a string. */ + timestamp?: Maybe; + /** Proposal title. */ + title: Scalars['String']['output']; +}; + +/** Delegate proposal activity metrics and proposal-by-proposal history. */ +export type ProposalActivityResponse = { + __typename?: 'ProposalActivityResponse'; + /** Delegate address. */ + address: Scalars['String']['output']; + /** Average seconds between the delegate vote and proposal end time. */ + avgTimeBeforeEnd: Scalars['Float']['output']; + /** Whether the delegate never cast a vote. */ + neverVoted: Scalars['Boolean']['output']; + proposals: Array>; + /** Total proposals reviewed in the dataset. */ + totalProposals: Scalars['Int']['output']; + /** Number of proposals the delegate voted on. */ + votedProposals: Scalars['Int']['output']; + /** Share of proposals where the delegate sided with outcome. */ + winRate: Scalars['Float']['output']; + /** Share of delegate votes cast in support. */ + yesRate: Scalars['Float']['output']; +}; + +/** Vote cast by the requested delegate for a given proposal. */ +export type ProposalActivityUserVote = { + __typename?: 'ProposalActivityUserVote'; + /** Vote identifier. */ + id: Scalars['String']['output']; + /** Related proposal ID. */ + proposalId: Scalars['String']['output']; + /** Optional vote rationale. */ + reason?: Maybe; + /** Governance vote direction. */ + support: Scalars['String']['output']; + /** Vote timestamp in Unix seconds as a string. */ + timestamp?: Maybe; + /** Address that cast the vote. */ + voterAccountId: Scalars['String']['output']; + /** Voting power used by the delegate, encoded as a string. */ + votingPower?: Maybe; +}; + +/** Proposal launch comparison between two adjacent time windows. */ +export type ProposalsComparisonResponse = { + __typename?: 'ProposalsComparisonResponse'; + /** Relative change between current and previous periods. */ + changeRate: Scalars['Float']['output']; + /** Number of proposals launched in the current period. */ + currentProposalsLaunched: Scalars['Int']['output']; + /** Number of proposals launched in the comparison period. */ + oldProposalsLaunched: Scalars['Int']['output']; +}; + export type Query = { __typename?: 'Query'; /** Returns account balance information for a specific address */ - accountBalanceByAccountId?: Maybe; + accountBalanceByAccountId?: Maybe; /** Returns a mapping of the biggest variations to account balances associated by account address */ - accountBalanceVariations?: Maybe; + accountBalanceVariations?: Maybe; /** Returns a the changes to balance by period and accountId */ - accountBalanceVariationsByAccountId?: Maybe; + accountBalanceVariationsByAccountId?: Maybe; /** Returns sorted and paginated account balance records */ - accountBalances?: Maybe; + accountBalances?: Maybe; /** * Returns a mapping of the largest interactions between accounts. * Positive amounts signify net token transfers FROM
, whilst negative amounts refer to net transfers TO
*/ - accountInteractions?: Maybe; + accountInteractions?: Maybe; /** * Average delegation percentage across all supported DAOs by day. * Returns the mean delegation percentage for each day in the specified range. @@ -88,137 +639,141 @@ export type Query = { */ averageDelegationPercentageByDay: AverageDelegationPercentagePage; /** Get active token supply for DAO */ - compareActiveSupply?: Maybe; + compareActiveSupply?: Maybe; /** Compare average turnout between time periods */ - compareAverageTurnout?: Maybe; + compareAverageTurnout?: Maybe; /** Compare cex supply between periods */ - compareCexSupply?: Maybe; + compareCexSupply?: Maybe; /** Compare circulating supply between periods */ - compareCirculatingSupply?: Maybe; + compareCirculatingSupply?: Maybe; /** Compare delegated supply between periods */ - compareDelegatedSupply?: Maybe; + compareDelegatedSupply?: Maybe; /** Compare dex supply between periods */ - compareDexSupply?: Maybe; + compareDexSupply?: Maybe; /** Compare lending supply between periods */ - compareLendingSupply?: Maybe; + compareLendingSupply?: Maybe; /** Compare number of proposals between time periods */ - compareProposals?: Maybe; + compareProposals?: Maybe; /** Compare total supply between periods */ - compareTotalSupply?: Maybe; + compareTotalSupply?: Maybe; /** Compare treasury between periods */ - compareTreasury?: Maybe; + compareTreasury?: Maybe; /** Compare number of votes between time periods */ - compareVotes?: Maybe; + compareVotes?: Maybe; /** Returns current governance parameters for this DAO */ - dao?: Maybe; + dao?: Maybe; /** Get all DAOs */ daos: DaoList; /** Get delegation percentage day buckets with forward-fill */ - delegationPercentageByDay?: Maybe; + delegationPercentageByDay?: Maybe; /** Get current delegations for an account */ - delegations?: Maybe; + delegations?: Maybe; /** Get current delegators of an account with voting power */ - delegators?: Maybe; + delegators?: Maybe; /** Get feed events */ - feedEvents?: Maybe; + feedEvents?: Maybe; /** Returns label information from Arkham, ENS data, and whether the address is an EOA or contract. Arkham data is stored permanently. ENS data is cached with a configurable TTL. */ getAddress?: Maybe; /** Returns label information from Arkham, ENS data, and address type for multiple addresses. Maximum 100 addresses per request. Arkham data is stored permanently. ENS data is cached with a configurable TTL. */ getAddresses?: Maybe; /** Get historical DAO Token Treasury value (governance token quantity × token price) */ - getDaoTokenTreasury?: Maybe; + getDaoTokenTreasury?: Maybe; /** Get event relevance threshold */ - getEventRelevanceThreshold?: Maybe; + getEventRelevanceThreshold?: Maybe; /** Get historical Liquid Treasury (treasury without DAO tokens) from external providers (DefiLlama/Dune) */ - getLiquidTreasury?: Maybe; + getLiquidTreasury?: Maybe; /** Get historical Total Treasury (liquid treasury + DAO token treasury) */ - getTotalTreasury?: Maybe; - /** TODO */ - historicalBalances?: Maybe; + getTotalTreasury?: Maybe; + /** Check API and database health */ + health?: Maybe; + /** Returns historical balance deltas for one account, enriched with the transfer that caused each change. */ + historicalBalances?: Maybe; /** Get historical delegations for an account, with optional filtering and sorting */ - historicalDelegations?: Maybe; + historicalDelegations?: Maybe; /** Get historical market data for a specific token */ - historicalTokenData?: Maybe>>; + historicalTokenData?: Maybe>>; /** Returns a list of voting power changes. */ - historicalVotingPower?: Maybe; + historicalVotingPower?: Maybe; /** Returns a list of voting power changes for a specific account */ - historicalVotingPowerByAccountId?: Maybe; + historicalVotingPowerByAccountId?: Maybe; /** Get the last update time */ - lastUpdate?: Maybe; + lastUpdate?: Maybe; /** Returns a single offchain (Snapshot) proposal by its ID */ - offchainProposalById?: Maybe; + offchainProposalById?: Maybe; + /** Returns the active delegates that did not vote on a given offchain proposal */ + offchainProposalNonVoters?: Maybe; /** Returns a list of offchain (Snapshot) proposals */ - offchainProposals?: Maybe; + offchainProposals?: Maybe; /** Returns a single proposal by its ID */ - proposal?: Maybe; + proposal?: Maybe; /** Returns the active delegates that did not vote on a given proposal */ - proposalNonVoters?: Maybe; + proposalNonVoters?: Maybe; /** Returns a list of proposal */ - proposals?: Maybe; + proposals?: Maybe; /** Returns proposal activity data including voting history, win rates, and detailed proposal information for the specified delegate within the given time window */ - proposalsActivity?: Maybe; + proposalsActivity?: Maybe; /** Get property data for a specific token */ - token?: Maybe; + token?: Maybe; /** Returns token related metrics for a single metric type. */ - tokenMetrics?: Maybe; + tokenMetrics?: Maybe; /** Get transactions with their associated transfers and delegations, with optional filtering and sorting */ - transactions?: Maybe; + transactions?: Maybe; /** Get transfers of a given address */ - transfers?: Maybe; + transfers?: Maybe; /** Get all votes ordered by timestamp or voting power */ - votes?: Maybe; + votes?: Maybe; /** Returns a paginated list of votes cast on a specific proposal */ - votesByProposalId?: Maybe; + votesByProposalId?: Maybe; /** Returns a list of offchain (Snapshot) votes */ - votesOffchain?: Maybe; + votesOffchain?: Maybe; /** Returns a paginated list of offchain (Snapshot) votes for a specific proposal */ - votesOffchainByProposalId?: Maybe; + votesOffchainByProposalId?: Maybe; /** Returns voting power information for a specific address (account) */ - votingPowerByAccountId?: Maybe; + votingPowerByAccountId?: Maybe; /** Returns a mapping of the voting power changes within a time frame for the given addresses */ - votingPowerVariations?: Maybe; + votingPowerVariations?: Maybe; /** Returns a the changes to voting power by period and accountId */ - votingPowerVariationsByAccountId?: Maybe; + votingPowerVariationsByAccountId?: Maybe; /** Returns sorted and paginated account voting power records */ - votingPowers?: Maybe; + votingPowers?: Maybe; }; export type QueryAccountBalanceByAccountIdArgs = { address: Scalars['String']['input']; - fromDate?: InputMaybe; - toDate?: InputMaybe; + fromDate?: InputMaybe; + toDate?: InputMaybe; }; export type QueryAccountBalanceVariationsArgs = { - addresses?: InputMaybe; - fromDate?: InputMaybe; - limit?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; + addresses?: InputMaybe>>; + fromDate?: InputMaybe; + limit?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; }; export type QueryAccountBalanceVariationsByAccountIdArgs = { address: Scalars['String']['input']; - fromDate?: InputMaybe; - toDate?: InputMaybe; + fromDate?: InputMaybe; + toDate?: InputMaybe; }; export type QueryAccountBalancesArgs = { - addresses?: InputMaybe; - delegates?: InputMaybe; + addresses?: InputMaybe>>; + delegates?: InputMaybe>>; excludeDaoAddresses?: InputMaybe; - fromDate?: InputMaybe; + fromDate?: InputMaybe; fromValue?: InputMaybe; - limit?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; toValue?: InputMaybe; }; @@ -226,14 +781,14 @@ export type QueryAccountBalancesArgs = { export type QueryAccountInteractionsArgs = { address: Scalars['String']['input']; filterAddress?: InputMaybe; - fromDate?: InputMaybe; - limit?: InputMaybe; + fromDate?: InputMaybe; + limit?: InputMaybe; maxAmount?: InputMaybe; minAmount?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; }; @@ -248,67 +803,67 @@ export type QueryAverageDelegationPercentageByDayArgs = { export type QueryCompareActiveSupplyArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryCompareAverageTurnoutArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryCompareCexSupplyArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryCompareCirculatingSupplyArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryCompareDelegatedSupplyArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryCompareDexSupplyArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryCompareLendingSupplyArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryCompareProposalsArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryCompareTotalSupplyArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryCompareTreasuryArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryCompareVotesArgs = { - days?: InputMaybe; + days?: InputMaybe; }; export type QueryDelegationPercentageByDayArgs = { - after?: InputMaybe; - before?: InputMaybe; - endDate?: InputMaybe; - limit?: InputMaybe; - orderDirection?: InputMaybe; - startDate?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + endDate?: InputMaybe; + limit?: InputMaybe; + orderDirection?: InputMaybe; + startDate?: InputMaybe; }; @@ -319,21 +874,21 @@ export type QueryDelegationsArgs = { export type QueryDelegatorsArgs = { address: Scalars['String']['input']; - limit?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; }; export type QueryFeedEventsArgs = { - fromDate?: InputMaybe; - limit?: InputMaybe; + fromDate?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; + orderDirection?: InputMaybe; relevance?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; type?: InputMaybe; }; @@ -344,86 +899,86 @@ export type QueryGetAddressArgs = { export type QueryGetAddressesArgs = { - addresses: Scalars['JSON']['input']; + addresses: Array>; }; export type QueryGetDaoTokenTreasuryArgs = { - days?: InputMaybe; - order?: InputMaybe; + days?: InputMaybe; + orderDirection?: InputMaybe; }; export type QueryGetEventRelevanceThresholdArgs = { - relevance: QueryInput_GetEventRelevanceThreshold_Relevance; - type: QueryInput_GetEventRelevanceThreshold_Type; + relevance: FeedRelevance; + type: FeedEventType; }; export type QueryGetLiquidTreasuryArgs = { - days?: InputMaybe; - order?: InputMaybe; + days?: InputMaybe; + orderDirection?: InputMaybe; }; export type QueryGetTotalTreasuryArgs = { - days?: InputMaybe; - order?: InputMaybe; + days?: InputMaybe; + orderDirection?: InputMaybe; }; export type QueryHistoricalBalancesArgs = { address: Scalars['String']['input']; - fromDate?: InputMaybe; + fromDate?: InputMaybe; fromValue?: InputMaybe; - limit?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; toValue?: InputMaybe; }; export type QueryHistoricalDelegationsArgs = { address: Scalars['String']['input']; - delegateAddressIn?: InputMaybe; + delegateAddressIn?: InputMaybe>>; fromValue?: InputMaybe; - limit?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; + limit?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; toValue?: InputMaybe; }; export type QueryHistoricalTokenDataArgs = { - limit?: InputMaybe; - skip?: InputMaybe; + limit?: InputMaybe; + skip?: InputMaybe; }; export type QueryHistoricalVotingPowerArgs = { address?: InputMaybe; - fromDate?: InputMaybe; + fromDate?: InputMaybe; fromValue?: InputMaybe; - limit?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; toValue?: InputMaybe; }; export type QueryHistoricalVotingPowerByAccountIdArgs = { address: Scalars['String']['input']; - fromDate?: InputMaybe; + fromDate?: InputMaybe; fromValue?: InputMaybe; - limit?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; toValue?: InputMaybe; }; @@ -438,13 +993,22 @@ export type QueryOffchainProposalByIdArgs = { }; +export type QueryOffchainProposalNonVotersArgs = { + addresses?: InputMaybe>>; + id: Scalars['String']['input']; + limit?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; +}; + + export type QueryOffchainProposalsArgs = { - endDate?: InputMaybe; - fromDate?: InputMaybe; - limit?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - status?: InputMaybe; + endDate?: InputMaybe; + fromDate?: InputMaybe; + limit?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + status?: InputMaybe>>; }; @@ -454,32 +1018,32 @@ export type QueryProposalArgs = { export type QueryProposalNonVotersArgs = { - addresses?: InputMaybe; + addresses?: InputMaybe>>; id: Scalars['String']['input']; - limit?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; + limit?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; }; export type QueryProposalsArgs = { - fromDate?: InputMaybe; - fromEndDate?: InputMaybe; - includeOptimisticProposals?: InputMaybe; - limit?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - status?: InputMaybe; + fromDate?: InputMaybe; + fromEndDate?: InputMaybe; + includeOptimisticProposals?: InputMaybe; + limit?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + status?: InputMaybe>>; }; export type QueryProposalsActivityArgs = { address: Scalars['String']['input']; - fromDate?: InputMaybe; - limit?: InputMaybe; + fromDate?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; userVoteFilter?: InputMaybe; }; @@ -490,26 +1054,25 @@ export type QueryTokenArgs = { export type QueryTokenMetricsArgs = { - endDate?: InputMaybe; - limit?: InputMaybe; + endDate?: InputMaybe; + limit?: InputMaybe; metricType: QueryInput_TokenMetrics_MetricType; - orderDirection?: InputMaybe; - skip?: InputMaybe; - startDate?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + startDate?: InputMaybe; }; export type QueryTransactionsArgs = { - affectedSupply?: InputMaybe; + affectedSupply?: InputMaybe>>; from?: InputMaybe; fromDate?: InputMaybe; - includes?: InputMaybe; - limit?: InputMaybe; + includes?: InputMaybe>>; + limit?: InputMaybe; maxAmount?: InputMaybe; minAmount?: InputMaybe; - offset?: InputMaybe; - sortBy?: InputMaybe; - sortOrder?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; to?: InputMaybe; toDate?: InputMaybe; }; @@ -518,532 +1081,429 @@ export type QueryTransactionsArgs = { export type QueryTransfersArgs = { address: Scalars['String']['input']; from?: InputMaybe; - fromDate?: InputMaybe; + fromDate?: InputMaybe; fromValue?: InputMaybe; - limit?: InputMaybe; - offset?: InputMaybe; - sortBy?: InputMaybe; - sortOrder?: InputMaybe; + limit?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; to?: InputMaybe; - toDate?: InputMaybe; + toDate?: InputMaybe; toValue?: InputMaybe; }; export type QueryVotesArgs = { - fromDate?: InputMaybe; - limit?: InputMaybe; + fromDate?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - support?: InputMaybe; - toDate?: InputMaybe; - voterAddressIn?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + support?: InputMaybe; + toDate?: InputMaybe; + voterAddressIn?: InputMaybe>>; }; export type QueryVotesByProposalIdArgs = { - fromDate?: InputMaybe; + fromDate?: InputMaybe; id: Scalars['String']['input']; - limit?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - support?: InputMaybe; - toDate?: InputMaybe; - voterAddressIn?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + support?: InputMaybe; + toDate?: InputMaybe; + voterAddressIn?: InputMaybe>>; }; export type QueryVotesOffchainArgs = { - fromDate?: InputMaybe; - limit?: InputMaybe; + fromDate?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; - voterAddresses?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; + voterAddresses?: InputMaybe>>; }; export type QueryVotesOffchainByProposalIdArgs = { - fromDate?: InputMaybe; + fromDate?: InputMaybe; id: Scalars['String']['input']; - limit?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; - voterAddresses?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; + voterAddresses?: InputMaybe>>; }; export type QueryVotingPowerByAccountIdArgs = { accountId: Scalars['String']['input']; - fromDate?: InputMaybe; - toDate?: InputMaybe; + fromDate?: InputMaybe; + toDate?: InputMaybe; }; export type QueryVotingPowerVariationsArgs = { - addresses?: InputMaybe; - fromDate?: InputMaybe; - limit?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; + addresses?: InputMaybe>>; + fromDate?: InputMaybe; + limit?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; }; export type QueryVotingPowerVariationsByAccountIdArgs = { address: Scalars['String']['input']; - fromDate?: InputMaybe; - toDate?: InputMaybe; + fromDate?: InputMaybe; + toDate?: InputMaybe; }; export type QueryVotingPowersArgs = { - addresses?: InputMaybe; - fromDate?: InputMaybe; + addresses?: InputMaybe>>; + fromDate?: InputMaybe; fromValue?: InputMaybe; - limit?: InputMaybe; + limit?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - toDate?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + toDate?: InputMaybe; toValue?: InputMaybe; }; -export type AccountBalanceByAccountId_200_Response = { - __typename?: 'accountBalanceByAccountId_200_response'; - data: Query_AccountBalanceByAccountId_Data; - period: Query_AccountBalanceByAccountId_Period; +/** Supply metric comparison between current and previous periods. */ +export type SupplyComparisonResponse = { + __typename?: 'SupplyComparisonResponse'; + changeRate: Scalars['Float']['output']; + currentValue: Scalars['String']['output']; + previousValue: Scalars['String']['output']; }; -export type AccountBalanceVariationsByAccountId_200_Response = { - __typename?: 'accountBalanceVariationsByAccountId_200_response'; - data: Query_AccountBalanceVariationsByAccountId_Data; - period: Query_AccountBalanceVariationsByAccountId_Period; +export type TokenHistoricalPriceItem = { + __typename?: 'TokenHistoricalPriceItem'; + /** Historical price value as a decimal string. */ + price: Scalars['String']['output']; + /** Unix timestamp in seconds. */ + timestamp: Scalars['Int']['output']; }; -export type AccountBalanceVariations_200_Response = { - __typename?: 'accountBalanceVariations_200_response'; - items: Array>; - period: Query_AccountBalanceVariations_Period; +export type TokenMetricItem = { + __typename?: 'TokenMetricItem'; + /** Unix day bucket represented as a timestamp string. */ + date: Scalars['String']['output']; + /** Highest observed value for the period. */ + high: Scalars['String']['output']; + /** Total volume observed for the period. */ + volume: Scalars['String']['output']; }; -export type AccountBalances_200_Response = { - __typename?: 'accountBalances_200_response'; - items: Array>; - period: Query_AccountBalances_Period; - totalCount: Scalars['Float']['output']; +export type TokenMetricsResponse = { + __typename?: 'TokenMetricsResponse'; + items: Array>; + pageInfo: PageInfo; }; -export type AccountInteractions_200_Response = { - __typename?: 'accountInteractions_200_response'; - items: Array>; - period: Query_AccountInteractions_Period; - totalCount: Scalars['Float']['output']; +/** Token properties enriched with the current token price. */ +export type TokenPropertiesResponse = { + __typename?: 'TokenPropertiesResponse'; + cexSupply: Scalars['String']['output']; + circulatingSupply: Scalars['String']['output']; + /** Token decimals. */ + decimals: Scalars['Int']['output']; + delegatedSupply: Scalars['String']['output']; + dexSupply: Scalars['String']['output']; + id: Scalars['String']['output']; + lendingSupply: Scalars['String']['output']; + name?: Maybe; + nonCirculatingSupply: Scalars['String']['output']; + price: Scalars['String']['output']; + totalSupply: Scalars['String']['output']; + treasury: Scalars['String']['output']; }; -export type CompareActiveSupply_200_Response = { - __typename?: 'compareActiveSupply_200_response'; - activeSupply: Scalars['String']['output']; +/** Transaction response enriched with transfer and delegation events. */ +export type Transaction = { + __typename?: 'Transaction'; + delegations: Array>; + /** Resolved sender address, if known. */ + from?: Maybe; + /** Whether the transaction touched a centralized exchange. */ + isCex: Scalars['Boolean']['output']; + /** Whether the transaction touched a decentralized exchange. */ + isDex: Scalars['Boolean']['output']; + /** Whether the transaction touched a lending protocol. */ + isLending: Scalars['Boolean']['output']; + /** Whether the transaction counts toward total tracked supply. */ + isTotal: Scalars['Boolean']['output']; + /** Transaction timestamp in Unix seconds as a string. */ + timestamp: Scalars['String']['output']; + /** Resolved recipient address, if known. */ + to?: Maybe; + /** Transaction hash. */ + transactionHash: Scalars['String']['output']; + transfers: Array>; }; -export type CompareAverageTurnout_200_Response = { - __typename?: 'compareAverageTurnout_200_response'; - changeRate: Scalars['Float']['output']; - currentAverageTurnout: Scalars['String']['output']; - oldAverageTurnout: Scalars['String']['output']; +/** Delegation event embedded within a transaction response. */ +export type TransactionDelegation = { + __typename?: 'TransactionDelegation'; + /** DAO identifier. */ + daoId: Scalars['String']['output']; + /** Delegate address. */ + delegateAccountId: Scalars['String']['output']; + /** Delegated amount encoded as a decimal string. */ + delegatedValue: Scalars['String']['output']; + /** Delegator address. */ + delegatorAccountId: Scalars['String']['output']; + /** Whether the delegation touched a centralized exchange. */ + isCex: Scalars['Boolean']['output']; + /** Whether the delegation touched a decentralized exchange. */ + isDex: Scalars['Boolean']['output']; + /** Whether the delegation touched a lending protocol. */ + isLending: Scalars['Boolean']['output']; + /** Whether the delegation counts toward total tracked supply. */ + isTotal: Scalars['Boolean']['output']; + /** Log index within the transaction receipt. */ + logIndex: Scalars['Int']['output']; + /** Previous delegate address, if one existed. */ + previousDelegate?: Maybe; + /** Delegation timestamp in Unix seconds as a string. */ + timestamp: Scalars['String']['output']; + /** Transaction hash. */ + transactionHash: Scalars['String']['output']; }; -export type CompareCexSupply_200_Response = { - __typename?: 'compareCexSupply_200_response'; - changeRate: Scalars['Float']['output']; - currentCexSupply: Scalars['String']['output']; - oldCexSupply: Scalars['String']['output']; +/** Paginated transactions with embedded transfer and delegation data. */ +export type TransactionsResponse = { + __typename?: 'TransactionsResponse'; + items: Array>; + /** Total number of matching transactions. */ + totalCount: Scalars['Int']['output']; }; -export type CompareCirculatingSupply_200_Response = { - __typename?: 'compareCirculatingSupply_200_response'; - changeRate: Scalars['Float']['output']; - currentCirculatingSupply: Scalars['String']['output']; - oldCirculatingSupply: Scalars['String']['output']; +export type Transfer = { + __typename?: 'Transfer'; + /** Transferred amount encoded as a decimal string. */ + amount: Scalars['String']['output']; + /** DAO identifier. */ + daoId: Scalars['String']['output']; + /** Sender address. */ + fromAccountId: Scalars['String']['output']; + /** Whether the transfer touched a centralized exchange. */ + isCex: Scalars['Boolean']['output']; + /** Whether the transfer touched a decentralized exchange. */ + isDex: Scalars['Boolean']['output']; + /** Whether the transfer touched a lending protocol. */ + isLending: Scalars['Boolean']['output']; + /** Whether the transfer counts toward total tracked supply. */ + isTotal: Scalars['Boolean']['output']; + /** Log index within the transaction receipt. */ + logIndex: Scalars['Int']['output']; + /** Transfer timestamp in Unix seconds as a string. */ + timestamp: Scalars['String']['output']; + /** Recipient address. */ + toAccountId: Scalars['String']['output']; + /** Token contract address. */ + tokenId: Scalars['String']['output']; + /** Transaction hash. */ + transactionHash: Scalars['String']['output']; }; -export type CompareDelegatedSupply_200_Response = { - __typename?: 'compareDelegatedSupply_200_response'; - changeRate: Scalars['Float']['output']; - currentDelegatedSupply: Scalars['String']['output']; - oldDelegatedSupply: Scalars['String']['output']; +export type TransfersResponse = { + __typename?: 'TransfersResponse'; + items: Array>; + /** Total number of matching transfers. */ + totalCount: Scalars['Int']['output']; }; -export type CompareDexSupply_200_Response = { - __typename?: 'compareDexSupply_200_response'; - changeRate: Scalars['Float']['output']; - currentDexSupply: Scalars['String']['output']; - oldDexSupply: Scalars['String']['output']; +/** Single treasury time-series datapoint. */ +export type TreasuryItem = { + __typename?: 'TreasuryItem'; + /** Unix timestamp in milliseconds */ + date: Scalars['Float']['output']; + /** Treasury value in USD */ + value: Scalars['Float']['output']; }; -export type CompareLendingSupply_200_Response = { - __typename?: 'compareLendingSupply_200_response'; - changeRate: Scalars['Float']['output']; - currentLendingSupply: Scalars['String']['output']; - oldLendingSupply: Scalars['String']['output']; +/** Paginated treasury time-series response. */ +export type TreasuryResponse = { + __typename?: 'TreasuryResponse'; + items: Array>; + /** Total number of items */ + totalCount: Scalars['Int']['output']; }; -export type CompareProposals_200_Response = { - __typename?: 'compareProposals_200_response'; - changeRate: Scalars['Float']['output']; - currentProposalsLaunched: Scalars['Float']['output']; - oldProposalsLaunched: Scalars['Float']['output']; +/** Voter or non-voter record associated with a proposal. */ +export type Voter = { + __typename?: 'Voter'; + lastVoteTimestamp: Scalars['Float']['output']; + voter: Scalars['String']['output']; + votingPower: Scalars['String']['output']; + votingPowerVariation: Scalars['String']['output']; }; -export type CompareTotalSupply_200_Response = { - __typename?: 'compareTotalSupply_200_response'; - changeRate: Scalars['Float']['output']; - currentTotalSupply: Scalars['String']['output']; - oldTotalSupply: Scalars['String']['output']; +/** Paginated voter or non-voter records for a proposal. */ +export type VotersResponse = { + __typename?: 'VotersResponse'; + items: Array>; + totalCount: Scalars['Int']['output']; }; -export type CompareTreasury_200_Response = { - __typename?: 'compareTreasury_200_response'; +/** Vote-count comparison between two adjacent time windows. */ +export type VotesComparisonResponse = { + __typename?: 'VotesComparisonResponse'; + /** Relative change between current and previous periods. */ changeRate: Scalars['Float']['output']; - currentTreasury: Scalars['String']['output']; - oldTreasury: Scalars['String']['output']; + /** Number of votes cast in the current period. */ + currentVotes: Scalars['Int']['output']; + /** Number of votes cast in the comparison period. */ + oldVotes: Scalars['Int']['output']; }; -export type CompareVotes_200_Response = { - __typename?: 'compareVotes_200_response'; - changeRate: Scalars['Float']['output']; - currentVotes: Scalars['Float']['output']; - oldVotes: Scalars['Float']['output']; +/** Current voting power snapshot for one account. */ +export type VotingPower = { + __typename?: 'VotingPower'; + /** Account address. */ + accountId: Scalars['String']['output']; + /** Current token balance encoded as a decimal string. */ + balance?: Maybe; + /** Total delegations associated with the account. */ + delegationsCount: Scalars['Int']['output']; + /** Total proposals created by the account. */ + proposalsCount: Scalars['Int']['output']; + variation: VotingPowerVariationField; + /** Total votes cast by the account. */ + votesCount: Scalars['Int']['output']; + /** Current voting power encoded as a decimal string. */ + votingPower: Scalars['String']['output']; }; -export type Dao_200_Response = { - __typename?: 'dao_200_response'; - alreadySupportCalldataReview: Scalars['Boolean']['output']; - chainId: Scalars['Float']['output']; - id: Scalars['String']['output']; - proposalThreshold: Scalars['String']['output']; - quorum: Scalars['String']['output']; - supportOffchainData: Scalars['Boolean']['output']; - timelockDelay: Scalars['String']['output']; - votingDelay: Scalars['String']['output']; - votingPeriod: Scalars['String']['output']; +/** Voting power delta for a single account across two timestamps. */ +export type VotingPowerVariation = { + __typename?: 'VotingPowerVariation'; + /** Absolute voting power change encoded as a decimal string. */ + absoluteChange: Scalars['String']['output']; + /** Account address. */ + accountId: Scalars['String']['output']; + /** Voting power at the end of the comparison window. */ + currentVotingPower: Scalars['String']['output']; + /** Relative voting power change encoded as a decimal string. */ + percentageChange: Scalars['String']['output']; + /** Voting power at the start of the comparison window. */ + previousVotingPower: Scalars['String']['output']; }; -export type DelegationPercentageByDay_200_Response = { - __typename?: 'delegationPercentageByDay_200_response'; - items: Array>; - pageInfo: Query_DelegationPercentageByDay_PageInfo; - totalCount: Scalars['Float']['output']; +/** Embedded voting power delta metadata for a current voting power row. */ +export type VotingPowerVariationField = { + __typename?: 'VotingPowerVariationField'; + absoluteChange: Scalars['String']['output']; + percentageChange: Scalars['String']['output']; }; -export type Delegations_200_Response = { - __typename?: 'delegations_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; +/** Voting power variation response for a single account. */ +export type VotingPowerVariationsByAccountIdResponse = { + __typename?: 'VotingPowerVariationsByAccountIdResponse'; + data: VotingPowerVariation; + period: PeriodResponse; }; -export type Delegators_200_Response = { - __typename?: 'delegators_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; +/** List of voting power variations for multiple accounts in the selected period. */ +export type VotingPowerVariationsResponse = { + __typename?: 'VotingPowerVariationsResponse'; + items: Array>; + period: PeriodResponse; }; -export type FeedEvents_200_Response = { - __typename?: 'feedEvents_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; +/** Paginated current voting power records. */ +export type VotingPowersResponse = { + __typename?: 'VotingPowersResponse'; + items: Array>; + /** Total number of matching voting power rows. */ + totalCount: Scalars['Int']['output']; }; +export enum Error_Const { + Error = 'error' +} + export type GetAddress_200_Response = { __typename?: 'getAddress_200_response'; + /** EIP-55 checksummed Ethereum address */ address: Scalars['String']['output']; arkham?: Maybe; ens?: Maybe; + /** Whether the address is a smart contract (true) or an externally-owned account (false) */ isContract: Scalars['Boolean']['output']; }; export type GetAddresses_200_Response = { __typename?: 'getAddresses_200_response'; + /** Enrichment results for each successfully resolved address. Addresses that failed to resolve are omitted. */ results: Array>; }; -export type GetDaoTokenTreasury_200_Response = { - __typename?: 'getDaoTokenTreasury_200_response'; - items: Array>; - /** Total number of items */ - totalCount: Scalars['Float']['output']; -}; - -export type GetEventRelevanceThreshold_200_Response = { - __typename?: 'getEventRelevanceThreshold_200_response'; - threshold: Scalars['String']['output']; -}; - -export type GetLiquidTreasury_200_Response = { - __typename?: 'getLiquidTreasury_200_response'; - items: Array>; - /** Total number of items */ - totalCount: Scalars['Float']['output']; -}; - -export type GetTotalTreasury_200_Response = { - __typename?: 'getTotalTreasury_200_response'; - items: Array>; - /** Total number of items */ - totalCount: Scalars['Float']['output']; -}; - -export type HistoricalBalances_200_Response = { - __typename?: 'historicalBalances_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; - -export type HistoricalDelegations_200_Response = { - __typename?: 'historicalDelegations_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; - -export type HistoricalVotingPowerByAccountId_200_Response = { - __typename?: 'historicalVotingPowerByAccountId_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; - -export type HistoricalVotingPower_200_Response = { - __typename?: 'historicalVotingPower_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; - -export type LastUpdate_200_Response = { - __typename?: 'lastUpdate_200_response'; - lastUpdate: Scalars['String']['output']; -}; - -export type OffchainProposalById_200_Response = { - __typename?: 'offchainProposalById_200_response'; - author: Scalars['String']['output']; - body: Scalars['String']['output']; - created: Scalars['Float']['output']; - discussion: Scalars['String']['output']; - end: Scalars['Float']['output']; - flagged: Scalars['Boolean']['output']; - id: Scalars['String']['output']; - link: Scalars['String']['output']; - spaceId: Scalars['String']['output']; - start: Scalars['Float']['output']; - state: Scalars['String']['output']; - title: Scalars['String']['output']; - type: Scalars['String']['output']; - updated: Scalars['Float']['output']; -}; - -export type OffchainProposals_200_Response = { - __typename?: 'offchainProposals_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; +export type Health_200_Response = { + __typename?: 'health_200_response'; + database: Ok_Const; + status: Ok_Const; }; -export type ProposalNonVoters_200_Response = { - __typename?: 'proposalNonVoters_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; +export type Health_503_Response = { + __typename?: 'health_503_response'; + database: Error_Const; + message: Scalars['String']['output']; + status: Error_Const; }; -export type Proposal_200_Response = { - __typename?: 'proposal_200_response'; - abstainVotes: Scalars['String']['output']; - againstVotes: Scalars['String']['output']; - calldatas: Array>; - daoId: Scalars['String']['output']; - description: Scalars['String']['output']; - endBlock: Scalars['Float']['output']; - endTimestamp: Scalars['String']['output']; - forVotes: Scalars['String']['output']; - id: Scalars['String']['output']; - proposalType?: Maybe; - proposerAccountId: Scalars['String']['output']; - quorum: Scalars['String']['output']; - startBlock: Scalars['Float']['output']; - startTimestamp: Scalars['String']['output']; - status: Scalars['String']['output']; - targets: Array>; - timestamp: Scalars['String']['output']; - title: Scalars['String']['output']; - txHash: Scalars['String']['output']; - values: Array>; -}; +export type Health_Response = Health_200_Response | Health_503_Response; -export type ProposalsActivity_200_Response = { - __typename?: 'proposalsActivity_200_response'; - address: Scalars['String']['output']; - avgTimeBeforeEnd: Scalars['Float']['output']; - neverVoted: Scalars['Boolean']['output']; - proposals: Array>; - totalProposals: Scalars['Float']['output']; - votedProposals: Scalars['Float']['output']; - winRate: Scalars['Float']['output']; - yesRate: Scalars['Float']['output']; -}; +export type OffchainProposalById_Response = ErrorResponse | OffchainProposal; -export type Proposals_200_Response = { - __typename?: 'proposals_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; +export type OffchainProposalNonVoters_Response = ErrorResponse | OffchainVotersResponse; -export enum QueryInput_AccountBalanceVariations_OrderDirection { - Asc = 'asc', - Desc = 'desc' +export enum Ok_Const { + Ok = 'ok' } +export type Proposal_Response = ErrorResponse | OnchainProposal; + export enum QueryInput_AccountBalances_OrderBy { Balance = 'balance', SignedVariation = 'signedVariation', Variation = 'variation' } -export enum QueryInput_AccountBalances_OrderDirection { - Asc = 'asc', - Desc = 'desc' -} - +/** Field used to sort interaction rows. */ export enum QueryInput_AccountInteractions_OrderBy { Count = 'count', Volume = 'volume' } -export enum QueryInput_AccountInteractions_OrderDirection { - Asc = 'asc', - Desc = 'desc' +export enum QueryInput_Delegators_OrderBy { + Amount = 'amount', + Timestamp = 'timestamp' } -export enum QueryInput_CompareActiveSupply_Days { - '7d' = '_7d', - '30d' = '_30d', - '90d' = '_90d', - '180d' = '_180d', - '365d' = '_365d' +/** Field used to sort feed events. */ +export enum QueryInput_FeedEvents_OrderBy { + Timestamp = 'timestamp', + Value = 'value' } -export enum QueryInput_CompareAverageTurnout_Days { - '7d' = '_7d', - '30d' = '_30d', - '90d' = '_90d', - '180d' = '_180d', - '365d' = '_365d' -} - -export enum QueryInput_CompareCexSupply_Days { - '7d' = '_7d', - '30d' = '_30d', - '90d' = '_90d', - '180d' = '_180d', - '365d' = '_365d' -} - -export enum QueryInput_CompareCirculatingSupply_Days { - '7d' = '_7d', - '30d' = '_30d', - '90d' = '_90d', - '180d' = '_180d', - '365d' = '_365d' -} - -export enum QueryInput_CompareDelegatedSupply_Days { - '7d' = '_7d', - '30d' = '_30d', - '90d' = '_90d', - '180d' = '_180d', - '365d' = '_365d' -} - -export enum QueryInput_CompareDexSupply_Days { - '7d' = '_7d', - '30d' = '_30d', - '90d' = '_90d', - '180d' = '_180d', - '365d' = '_365d' -} - -export enum QueryInput_CompareLendingSupply_Days { - '7d' = '_7d', - '30d' = '_30d', - '90d' = '_90d', - '180d' = '_180d', - '365d' = '_365d' -} - -export enum QueryInput_CompareProposals_Days { - '7d' = '_7d', - '30d' = '_30d', - '90d' = '_90d', - '180d' = '_180d', - '365d' = '_365d' -} - -export enum QueryInput_CompareTotalSupply_Days { - '7d' = '_7d', - '30d' = '_30d', - '90d' = '_90d', - '180d' = '_180d', - '365d' = '_365d' -} - -export enum QueryInput_CompareTreasury_Days { - '7d' = '_7d', - '30d' = '_30d', - '90d' = '_90d', - '180d' = '_180d', - '365d' = '_365d' -} - -export enum QueryInput_CompareVotes_Days { - '7d' = '_7d', - '30d' = '_30d', - '90d' = '_90d', - '180d' = '_180d', - '365d' = '_365d' -} - -export enum QueryInput_DelegationPercentageByDay_OrderDirection { - Asc = 'asc', - Desc = 'desc' -} - -export enum QueryInput_Delegators_OrderBy { - Amount = 'amount', - Timestamp = 'timestamp' -} - -export enum QueryInput_Delegators_OrderDirection { - Asc = 'asc', - Desc = 'desc' -} - -export enum QueryInput_FeedEvents_OrderBy { - Timestamp = 'timestamp', - Value = 'value' -} - -export enum QueryInput_FeedEvents_OrderDirection { - Asc = 'asc', - Desc = 'desc' -} - -export enum QueryInput_FeedEvents_Relevance { - High = 'HIGH', - Low = 'LOW', - Medium = 'MEDIUM' +/** Filter events by relevance tier. */ +export enum QueryInput_FeedEvents_Relevance { + High = 'HIGH', + Low = 'LOW', + Medium = 'MEDIUM' } +/** Filter events by governance activity type. */ export enum QueryInput_FeedEvents_Type { Delegation = 'DELEGATION', Proposal = 'PROPOSAL', @@ -1052,122 +1512,45 @@ export enum QueryInput_FeedEvents_Type { Vote = 'VOTE' } -export enum QueryInput_GetDaoTokenTreasury_Days { - '7d' = '_7d', - '30d' = '_30d', - '90d' = '_90d', - '180d' = '_180d', - '365d' = '_365d' -} - -export enum QueryInput_GetDaoTokenTreasury_Order { - Asc = 'asc', - Desc = 'desc' -} - -export enum QueryInput_GetEventRelevanceThreshold_Relevance { - High = 'HIGH', - Low = 'LOW', - Medium = 'MEDIUM' -} - -export enum QueryInput_GetEventRelevanceThreshold_Type { - Delegation = 'DELEGATION', - Proposal = 'PROPOSAL', - ProposalExtended = 'PROPOSAL_EXTENDED', - Transfer = 'TRANSFER', - Vote = 'VOTE' -} - -export enum QueryInput_GetLiquidTreasury_Days { - '7d' = '_7d', - '30d' = '_30d', - '90d' = '_90d', - '180d' = '_180d', - '365d' = '_365d' -} - -export enum QueryInput_GetLiquidTreasury_Order { - Asc = 'asc', - Desc = 'desc' -} - -export enum QueryInput_GetTotalTreasury_Days { - '7d' = '_7d', - '30d' = '_30d', - '90d' = '_90d', - '180d' = '_180d', - '365d' = '_365d' -} - -export enum QueryInput_GetTotalTreasury_Order { - Asc = 'asc', - Desc = 'desc' -} - +/** Field used to sort historical balance rows. */ export enum QueryInput_HistoricalBalances_OrderBy { Delta = 'delta', Timestamp = 'timestamp' } -export enum QueryInput_HistoricalBalances_OrderDirection { - Asc = 'asc', - Desc = 'desc' -} - -export enum QueryInput_HistoricalDelegations_OrderDirection { - Asc = 'asc', - Desc = 'desc' -} - +/** Field used to sort historical voting power rows. */ export enum QueryInput_HistoricalVotingPowerByAccountId_OrderBy { Delta = 'delta', Timestamp = 'timestamp' } -export enum QueryInput_HistoricalVotingPowerByAccountId_OrderDirection { - Asc = 'asc', - Desc = 'desc' -} - +/** Field used to sort historical voting power rows. */ export enum QueryInput_HistoricalVotingPower_OrderBy { Delta = 'delta', Timestamp = 'timestamp' } -export enum QueryInput_HistoricalVotingPower_OrderDirection { - Asc = 'asc', - Desc = 'desc' -} - +/** Chart identifier whose freshness timestamp should be returned. */ export enum QueryInput_LastUpdate_Chart { AttackProfitability = 'attack_profitability', CostComparison = 'cost_comparison', TokenDistribution = 'token_distribution' } -export enum QueryInput_OffchainProposals_OrderDirection { - Asc = 'asc', - Desc = 'desc' -} - -export enum QueryInput_ProposalNonVoters_OrderDirection { - Asc = 'asc', - Desc = 'desc' +export enum QueryInput_OffchainProposals_Status_Items { + Active = 'active', + Closed = 'closed', + Pending = 'pending' } +/** Field used to sort proposal activity results. */ export enum QueryInput_ProposalsActivity_OrderBy { Timestamp = 'timestamp', VoteTiming = 'voteTiming', VotingPower = 'votingPower' } -export enum QueryInput_ProposalsActivity_OrderDirection { - Asc = 'asc', - Desc = 'desc' -} - -/** Filter proposals by vote type. Can be: 'yes' (For votes), 'no' (Against votes), 'abstain' (Abstain votes), 'no-vote' (Didn't vote) */ +/** Optional vote filter. Use yes, no, abstain, or no-vote to narrow the result set. */ export enum QueryInput_ProposalsActivity_UserVoteFilter { Abstain = 'abstain', No = 'no', @@ -1175,16 +1558,21 @@ export enum QueryInput_ProposalsActivity_UserVoteFilter { Yes = 'yes' } -export enum QueryInput_Proposals_IncludeOptimisticProposals { - False = 'FALSE', - True = 'TRUE' -} - -export enum QueryInput_Proposals_OrderDirection { - Asc = 'asc', - Desc = 'desc' +export enum QueryInput_Proposals_Status_Items { + Active = 'ACTIVE', + Canceled = 'CANCELED', + Defeated = 'DEFEATED', + Executed = 'EXECUTED', + Expired = 'EXPIRED', + NoQuorum = 'NO_QUORUM', + Pending = 'PENDING', + PendingExecution = 'PENDING_EXECUTION', + Queued = 'QUEUED', + Succeeded = 'SUCCEEDED', + Vetoed = 'VETOED' } +/** Metric family to query. */ export enum QueryInput_TokenMetrics_MetricType { CexSupply = 'CEX_SUPPLY', CirculatingSupply = 'CIRCULATING_SUPPLY', @@ -1195,76 +1583,55 @@ export enum QueryInput_TokenMetrics_MetricType { Treasury = 'TREASURY' } -export enum QueryInput_TokenMetrics_OrderDirection { - Asc = 'asc', - Desc = 'desc' -} - +/** Currency to use when fetching token price data. */ export enum QueryInput_Token_Currency { Eth = 'eth', Usd = 'usd' } -export enum QueryInput_Transactions_SortOrder { - Asc = 'asc', - Desc = 'desc' +export enum QueryInput_Transactions_AffectedSupply_Items { + Cex = 'CEX', + Dex = 'DEX', + Lending = 'LENDING', + Total = 'TOTAL', + Unassigned = 'UNASSIGNED' } -export enum QueryInput_Transfers_SortBy { - Amount = 'amount', - Timestamp = 'timestamp' +export enum QueryInput_Transactions_Includes_Items { + Delegation = 'DELEGATION', + Transfer = 'TRANSFER' } -export enum QueryInput_Transfers_SortOrder { - Asc = 'asc', - Desc = 'desc' +/** Field used to sort transfers. */ +export enum QueryInput_Transfers_OrderBy { + Amount = 'amount', + Timestamp = 'timestamp' } +/** Sort votes by timestamp or voting power. */ export enum QueryInput_VotesByProposalId_OrderBy { Timestamp = 'timestamp', VotingPower = 'votingPower' } -export enum QueryInput_VotesByProposalId_OrderDirection { - Asc = 'asc', - Desc = 'desc' -} - +/** Sort votes by timestamp or voting power. */ export enum QueryInput_VotesOffchainByProposalId_OrderBy { Timestamp = 'timestamp', VotingPower = 'votingPower' } -export enum QueryInput_VotesOffchainByProposalId_OrderDirection { - Asc = 'asc', - Desc = 'desc' -} - +/** Sort votes by timestamp or voting power. */ export enum QueryInput_VotesOffchain_OrderBy { Timestamp = 'timestamp', VotingPower = 'votingPower' } -export enum QueryInput_VotesOffchain_OrderDirection { - Asc = 'asc', - Desc = 'desc' -} - +/** Sort votes by timestamp or voting power. */ export enum QueryInput_Votes_OrderBy { Timestamp = 'timestamp', VotingPower = 'votingPower' } -export enum QueryInput_Votes_OrderDirection { - Asc = 'asc', - Desc = 'desc' -} - -export enum QueryInput_VotingPowerVariations_OrderDirection { - Asc = 'asc', - Desc = 'desc' -} - export enum QueryInput_VotingPowers_OrderBy { Balance = 'balance', DelegationsCount = 'delegationsCount', @@ -1274,753 +1641,182 @@ export enum QueryInput_VotingPowers_OrderBy { VotingPower = 'votingPower' } -export enum QueryInput_VotingPowers_OrderDirection { - Asc = 'asc', - Desc = 'desc' -} - -export type Query_AccountBalanceByAccountId_Data = { - __typename?: 'query_accountBalanceByAccountId_data'; - address: Scalars['String']['output']; - balance: Scalars['String']['output']; - delegate: Scalars['String']['output']; - tokenId: Scalars['String']['output']; - variation: Query_AccountBalanceByAccountId_Data_Variation; +/** Arkham Intelligence label data. null when no data is available for the address. */ +export type Query_GetAddress_Arkham = { + __typename?: 'query_getAddress_arkham'; + /** Human-readable name of the entity that owns the address according to Arkham Intelligence */ + entity?: Maybe; + /** Category of the entity (e.g. 'individual', 'exchange', 'protocol', 'fund') */ + entityType?: Maybe; + /** Fine-grained label for the specific address within the entity */ + label?: Maybe; + /** Twitter/X handle associated with the entity, without '@' */ + twitter?: Maybe; }; -export type Query_AccountBalanceByAccountId_Data_Variation = { - __typename?: 'query_accountBalanceByAccountId_data_variation'; - absoluteChange: Scalars['String']['output']; - percentageChange: Scalars['String']['output']; - previousBalance: Scalars['String']['output']; +/** ENS (Ethereum Name Service) data. null when no ENS name is registered for the address. Cached with a configurable TTL. */ +export type Query_GetAddress_Ens = { + __typename?: 'query_getAddress_ens'; + /** URL of the ENS avatar image */ + avatar?: Maybe; + /** URL of the ENS profile banner image */ + banner?: Maybe; + /** Primary ENS name reverse-resolved for this address */ + name?: Maybe; }; -export type Query_AccountBalanceByAccountId_Period = { - __typename?: 'query_accountBalanceByAccountId_period'; - endTimestamp: Scalars['String']['output']; - startTimestamp: Scalars['String']['output']; +export type Query_GetAddresses_Results_Items = { + __typename?: 'query_getAddresses_results_items'; + /** EIP-55 checksummed Ethereum address */ + address: Scalars['String']['output']; + arkham?: Maybe; + ens?: Maybe; + /** Whether the address is a smart contract (true) or an externally-owned account (false) */ + isContract: Scalars['Boolean']['output']; }; -export type Query_AccountBalanceVariationsByAccountId_Data = { - __typename?: 'query_accountBalanceVariationsByAccountId_data'; - absoluteChange: Scalars['String']['output']; - accountId: Scalars['String']['output']; - currentBalance: Scalars['String']['output']; - percentageChange: Scalars['String']['output']; - previousBalance: Scalars['String']['output']; +/** Arkham Intelligence label data. null when no data is available for the address. */ +export type Query_GetAddresses_Results_Items_Arkham = { + __typename?: 'query_getAddresses_results_items_arkham'; + /** Human-readable name of the entity that owns the address according to Arkham Intelligence */ + entity?: Maybe; + /** Category of the entity (e.g. 'individual', 'exchange', 'protocol', 'fund') */ + entityType?: Maybe; + /** Fine-grained label for the specific address within the entity */ + label?: Maybe; + /** Twitter/X handle associated with the entity, without '@' */ + twitter?: Maybe; }; -export type Query_AccountBalanceVariationsByAccountId_Period = { - __typename?: 'query_accountBalanceVariationsByAccountId_period'; - endTimestamp: Scalars['String']['output']; - startTimestamp: Scalars['String']['output']; +/** ENS (Ethereum Name Service) data. null when no ENS name is registered for the address. Cached with a configurable TTL. */ +export type Query_GetAddresses_Results_Items_Ens = { + __typename?: 'query_getAddresses_results_items_ens'; + /** URL of the ENS avatar image */ + avatar?: Maybe; + /** URL of the ENS profile banner image */ + banner?: Maybe; + /** Primary ENS name reverse-resolved for this address */ + name?: Maybe; }; -export type Query_AccountBalanceVariations_Items_Items = { - __typename?: 'query_accountBalanceVariations_items_items'; - absoluteChange: Scalars['String']['output']; - accountId: Scalars['String']['output']; - currentBalance: Scalars['String']['output']; - percentageChange: Scalars['String']['output']; - previousBalance: Scalars['String']['output']; +export type Query_OffchainProposals_Items_Items_Strategies_Items = { + __typename?: 'query_offchainProposals_items_items_strategies_items'; + name: Scalars['String']['output']; + network: Scalars['String']['output']; + params: Scalars['JSON']['output']; }; -export type Query_AccountBalanceVariations_Period = { - __typename?: 'query_accountBalanceVariations_period'; - endTimestamp: Scalars['String']['output']; - startTimestamp: Scalars['String']['output']; -}; +export type Token_Response = ErrorResponse | TokenPropertiesResponse; -export type Query_AccountBalances_Items_Items = { - __typename?: 'query_accountBalances_items_items'; - address: Scalars['String']['output']; - balance: Scalars['String']['output']; - delegate: Scalars['String']['output']; - tokenId: Scalars['String']['output']; - variation: Query_AccountBalances_Items_Items_Variation; -}; +export type GetDaOsQueryVariables = Exact<{ [key: string]: never; }>; -export type Query_AccountBalances_Items_Items_Variation = { - __typename?: 'query_accountBalances_items_items_variation'; - absoluteChange: Scalars['String']['output']; - percentageChange: Scalars['String']['output']; - previousBalance: Scalars['String']['output']; -}; - -export type Query_AccountBalances_Period = { - __typename?: 'query_accountBalances_period'; - endTimestamp: Scalars['String']['output']; - startTimestamp: Scalars['String']['output']; -}; - -export type Query_AccountInteractions_Items_Items = { - __typename?: 'query_accountInteractions_items_items'; - accountId: Scalars['String']['output']; - amountTransferred: Scalars['String']['output']; - totalVolume: Scalars['String']['output']; - transferCount: Scalars['String']['output']; -}; - -export type Query_AccountInteractions_Period = { - __typename?: 'query_accountInteractions_period'; - endTimestamp: Scalars['String']['output']; - startTimestamp: Scalars['String']['output']; -}; - -export type Query_DelegationPercentageByDay_Items_Items = { - __typename?: 'query_delegationPercentageByDay_items_items'; - date: Scalars['String']['output']; - high: Scalars['String']['output']; -}; - -export type Query_DelegationPercentageByDay_PageInfo = { - __typename?: 'query_delegationPercentageByDay_pageInfo'; - endDate?: Maybe; - hasNextPage: Scalars['Boolean']['output']; - startDate?: Maybe; -}; - -export type Query_Delegations_Items_Items = { - __typename?: 'query_delegations_items_items'; - amount: Scalars['String']['output']; - delegateAddress: Scalars['String']['output']; - delegatorAddress: Scalars['String']['output']; - timestamp: Scalars['String']['output']; - transactionHash: Scalars['String']['output']; -}; - -export type Query_Delegators_Items_Items = { - __typename?: 'query_delegators_items_items'; - amount: Scalars['String']['output']; - delegatorAddress: Scalars['String']['output']; - timestamp: Scalars['String']['output']; -}; - -export type Query_FeedEvents_Items_Items = { - __typename?: 'query_feedEvents_items_items'; - logIndex: Scalars['Float']['output']; - metadata?: Maybe; - relevance: Query_FeedEvents_Items_Items_Relevance; - timestamp: Scalars['Float']['output']; - txHash: Scalars['String']['output']; - type: Query_FeedEvents_Items_Items_Type; - value?: Maybe; -}; - -export enum Query_FeedEvents_Items_Items_Relevance { - High = 'HIGH', - Low = 'LOW', - Medium = 'MEDIUM' -} - -export enum Query_FeedEvents_Items_Items_Type { - Delegation = 'DELEGATION', - Proposal = 'PROPOSAL', - ProposalExtended = 'PROPOSAL_EXTENDED', - Transfer = 'TRANSFER', - Vote = 'VOTE' -} - -export type Query_GetAddress_Arkham = { - __typename?: 'query_getAddress_arkham'; - entity?: Maybe; - entityType?: Maybe; - label?: Maybe; - twitter?: Maybe; -}; - -export type Query_GetAddress_Ens = { - __typename?: 'query_getAddress_ens'; - avatar?: Maybe; - banner?: Maybe; - name?: Maybe; -}; - -export type Query_GetAddresses_Results_Items = { - __typename?: 'query_getAddresses_results_items'; - address: Scalars['String']['output']; - arkham?: Maybe; - ens?: Maybe; - isContract: Scalars['Boolean']['output']; -}; - -export type Query_GetAddresses_Results_Items_Arkham = { - __typename?: 'query_getAddresses_results_items_arkham'; - entity?: Maybe; - entityType?: Maybe; - label?: Maybe; - twitter?: Maybe; -}; - -export type Query_GetAddresses_Results_Items_Ens = { - __typename?: 'query_getAddresses_results_items_ens'; - avatar?: Maybe; - banner?: Maybe; - name?: Maybe; -}; - -export type Query_GetDaoTokenTreasury_Items_Items = { - __typename?: 'query_getDaoTokenTreasury_items_items'; - /** Unix timestamp in milliseconds */ - date: Scalars['Float']['output']; - /** Treasury value in USD */ - value: Scalars['Float']['output']; -}; - -export type Query_GetLiquidTreasury_Items_Items = { - __typename?: 'query_getLiquidTreasury_items_items'; - /** Unix timestamp in milliseconds */ - date: Scalars['Float']['output']; - /** Treasury value in USD */ - value: Scalars['Float']['output']; -}; - -export type Query_GetTotalTreasury_Items_Items = { - __typename?: 'query_getTotalTreasury_items_items'; - /** Unix timestamp in milliseconds */ - date: Scalars['Float']['output']; - /** Treasury value in USD */ - value: Scalars['Float']['output']; -}; - -export type Query_HistoricalBalances_Items_Items = { - __typename?: 'query_historicalBalances_items_items'; - accountId: Scalars['String']['output']; - balance: Scalars['String']['output']; - daoId: Scalars['String']['output']; - delta: Scalars['String']['output']; - logIndex: Scalars['Float']['output']; - timestamp: Scalars['String']['output']; - transactionHash: Scalars['String']['output']; - transfer: Query_HistoricalBalances_Items_Items_Transfer; -}; - -export type Query_HistoricalBalances_Items_Items_Transfer = { - __typename?: 'query_historicalBalances_items_items_transfer'; - from: Scalars['String']['output']; - to: Scalars['String']['output']; - value: Scalars['String']['output']; -}; - -export type Query_HistoricalDelegations_Items_Items = { - __typename?: 'query_historicalDelegations_items_items'; - amount: Scalars['String']['output']; - delegateAddress: Scalars['String']['output']; - delegatorAddress: Scalars['String']['output']; - timestamp: Scalars['String']['output']; - transactionHash: Scalars['String']['output']; -}; - -export type Query_HistoricalTokenData_Items = { - __typename?: 'query_historicalTokenData_items'; - price: Scalars['String']['output']; - timestamp: Scalars['Float']['output']; -}; - -export type Query_HistoricalVotingPowerByAccountId_Items_Items = { - __typename?: 'query_historicalVotingPowerByAccountId_items_items'; - accountId: Scalars['String']['output']; - daoId: Scalars['String']['output']; - delegation?: Maybe; - delta: Scalars['String']['output']; - logIndex: Scalars['Float']['output']; - timestamp: Scalars['String']['output']; - transactionHash: Scalars['String']['output']; - transfer?: Maybe; - votingPower: Scalars['String']['output']; -}; - -export type Query_HistoricalVotingPowerByAccountId_Items_Items_Delegation = { - __typename?: 'query_historicalVotingPowerByAccountId_items_items_delegation'; - from: Scalars['String']['output']; - previousDelegate?: Maybe; - to: Scalars['String']['output']; - value: Scalars['String']['output']; -}; - -export type Query_HistoricalVotingPowerByAccountId_Items_Items_Transfer = { - __typename?: 'query_historicalVotingPowerByAccountId_items_items_transfer'; - from: Scalars['String']['output']; - to: Scalars['String']['output']; - value: Scalars['String']['output']; -}; - -export type Query_HistoricalVotingPower_Items_Items = { - __typename?: 'query_historicalVotingPower_items_items'; - accountId: Scalars['String']['output']; - daoId: Scalars['String']['output']; - delegation?: Maybe; - delta: Scalars['String']['output']; - logIndex: Scalars['Float']['output']; - timestamp: Scalars['String']['output']; - transactionHash: Scalars['String']['output']; - transfer?: Maybe; - votingPower: Scalars['String']['output']; -}; - -export type Query_HistoricalVotingPower_Items_Items_Delegation = { - __typename?: 'query_historicalVotingPower_items_items_delegation'; - from: Scalars['String']['output']; - previousDelegate?: Maybe; - to: Scalars['String']['output']; - value: Scalars['String']['output']; -}; - -export type Query_HistoricalVotingPower_Items_Items_Transfer = { - __typename?: 'query_historicalVotingPower_items_items_transfer'; - from: Scalars['String']['output']; - to: Scalars['String']['output']; - value: Scalars['String']['output']; -}; - -export type Query_OffchainProposals_Items_Items = { - __typename?: 'query_offchainProposals_items_items'; - author: Scalars['String']['output']; - body: Scalars['String']['output']; - created: Scalars['Float']['output']; - discussion: Scalars['String']['output']; - end: Scalars['Float']['output']; - flagged: Scalars['Boolean']['output']; - id: Scalars['String']['output']; - link: Scalars['String']['output']; - spaceId: Scalars['String']['output']; - start: Scalars['Float']['output']; - state: Scalars['String']['output']; - title: Scalars['String']['output']; - type: Scalars['String']['output']; - updated: Scalars['Float']['output']; -}; - -export type Query_ProposalNonVoters_Items_Items = { - __typename?: 'query_proposalNonVoters_items_items'; - lastVoteTimestamp: Scalars['Float']['output']; - voter: Scalars['String']['output']; - votingPower: Scalars['String']['output']; - votingPowerVariation: Scalars['String']['output']; -}; - -export type Query_ProposalsActivity_Proposals_Items = { - __typename?: 'query_proposalsActivity_proposals_items'; - proposal: Query_ProposalsActivity_Proposals_Items_Proposal; - userVote?: Maybe; -}; - -export type Query_ProposalsActivity_Proposals_Items_Proposal = { - __typename?: 'query_proposalsActivity_proposals_items_proposal'; - abstainVotes: Scalars['String']['output']; - againstVotes: Scalars['String']['output']; - daoId: Scalars['String']['output']; - description: Scalars['String']['output']; - endBlock: Scalars['Float']['output']; - forVotes: Scalars['String']['output']; - id: Scalars['String']['output']; - proposerAccountId: Scalars['String']['output']; - startBlock: Scalars['Float']['output']; - status: Scalars['String']['output']; - timestamp?: Maybe; - title: Scalars['String']['output']; -}; - -export type Query_ProposalsActivity_Proposals_Items_UserVote = { - __typename?: 'query_proposalsActivity_proposals_items_userVote'; - id: Scalars['String']['output']; - proposalId: Scalars['String']['output']; - reason?: Maybe; - support?: Maybe; - timestamp?: Maybe; - voterAccountId: Scalars['String']['output']; - votingPower: Scalars['String']['output']; -}; - -export type Query_Proposals_Items_Items = { - __typename?: 'query_proposals_items_items'; - abstainVotes: Scalars['String']['output']; - againstVotes: Scalars['String']['output']; - calldatas: Array>; - daoId: Scalars['String']['output']; - description: Scalars['String']['output']; - endBlock: Scalars['Float']['output']; - endTimestamp: Scalars['String']['output']; - forVotes: Scalars['String']['output']; - id: Scalars['String']['output']; - proposalType?: Maybe; - proposerAccountId: Scalars['String']['output']; - quorum: Scalars['String']['output']; - startBlock: Scalars['Float']['output']; - startTimestamp: Scalars['String']['output']; - status: Scalars['String']['output']; - targets: Array>; - timestamp: Scalars['String']['output']; - title: Scalars['String']['output']; - txHash: Scalars['String']['output']; - values: Array>; -}; - -export type Query_TokenMetrics_Items_Items = { - __typename?: 'query_tokenMetrics_items_items'; - date: Scalars['String']['output']; - high: Scalars['String']['output']; - volume: Scalars['String']['output']; -}; - -export type Query_TokenMetrics_PageInfo = { - __typename?: 'query_tokenMetrics_pageInfo'; - endDate?: Maybe; - hasNextPage: Scalars['Boolean']['output']; - startDate?: Maybe; -}; - -export type Query_Transactions_Items_Items = { - __typename?: 'query_transactions_items_items'; - delegations: Array>; - from?: Maybe; - isCex: Scalars['Boolean']['output']; - isDex: Scalars['Boolean']['output']; - isLending: Scalars['Boolean']['output']; - isTotal: Scalars['Boolean']['output']; - timestamp: Scalars['String']['output']; - to?: Maybe; - transactionHash: Scalars['String']['output']; - transfers: Array>; -}; - -export type Query_Transactions_Items_Items_Delegations_Items = { - __typename?: 'query_transactions_items_items_delegations_items'; - daoId: Scalars['String']['output']; - delegateAccountId: Scalars['String']['output']; - delegatedValue: Scalars['String']['output']; - delegatorAccountId: Scalars['String']['output']; - isCex: Scalars['Boolean']['output']; - isDex: Scalars['Boolean']['output']; - isLending: Scalars['Boolean']['output']; - isTotal: Scalars['Boolean']['output']; - logIndex: Scalars['Float']['output']; - previousDelegate?: Maybe; - timestamp: Scalars['String']['output']; - transactionHash: Scalars['String']['output']; -}; - -export type Query_Transactions_Items_Items_Transfers_Items = { - __typename?: 'query_transactions_items_items_transfers_items'; - amount: Scalars['String']['output']; - daoId: Scalars['String']['output']; - fromAccountId: Scalars['String']['output']; - isCex: Scalars['Boolean']['output']; - isDex: Scalars['Boolean']['output']; - isLending: Scalars['Boolean']['output']; - isTotal: Scalars['Boolean']['output']; - logIndex: Scalars['Float']['output']; - timestamp: Scalars['String']['output']; - toAccountId: Scalars['String']['output']; - tokenId: Scalars['String']['output']; - transactionHash: Scalars['String']['output']; -}; - -export type Query_Transfers_Items_Items = { - __typename?: 'query_transfers_items_items'; - amount: Scalars['String']['output']; - daoId: Scalars['String']['output']; - fromAccountId: Scalars['String']['output']; - isCex: Scalars['Boolean']['output']; - isDex: Scalars['Boolean']['output']; - isLending: Scalars['Boolean']['output']; - isTotal: Scalars['Boolean']['output']; - logIndex: Scalars['Float']['output']; - timestamp: Scalars['String']['output']; - toAccountId: Scalars['String']['output']; - tokenId: Scalars['String']['output']; - transactionHash: Scalars['String']['output']; -}; - -export type Query_VotesByProposalId_Items_Items = { - __typename?: 'query_votesByProposalId_items_items'; - proposalId: Scalars['String']['output']; - proposalTitle?: Maybe; - reason?: Maybe; - support?: Maybe; - timestamp: Scalars['Int']['output']; - transactionHash: Scalars['String']['output']; - voterAddress: Scalars['String']['output']; - votingPower: Scalars['String']['output']; -}; -export type Query_VotesOffchainByProposalId_Items_Items = { - __typename?: 'query_votesOffchainByProposalId_items_items'; - choice?: Maybe; - created: Scalars['Float']['output']; - proposalId: Scalars['String']['output']; - proposalTitle: Scalars['String']['output']; - reason: Scalars['String']['output']; - voter: Scalars['String']['output']; - vp?: Maybe; -}; +export type GetDaOsQuery = { __typename?: 'Query', daos: { __typename?: 'DAOList', items: Array<{ __typename?: 'DaoResponse', id: string, votingDelay: string, chainId: number, alreadySupportCalldataReview: boolean, supportOffchainData: boolean }> } }; -export type Query_VotesOffchain_Items_Items = { - __typename?: 'query_votesOffchain_items_items'; - choice?: Maybe; - created: Scalars['Float']['output']; - proposalId: Scalars['String']['output']; - proposalTitle: Scalars['String']['output']; - reason: Scalars['String']['output']; - voter: Scalars['String']['output']; - vp?: Maybe; -}; - -export type Query_Votes_Items_Items = { - __typename?: 'query_votes_items_items'; - proposalId: Scalars['String']['output']; - proposalTitle?: Maybe; - reason?: Maybe; - support?: Maybe; - timestamp: Scalars['Int']['output']; - transactionHash: Scalars['String']['output']; - voterAddress: Scalars['String']['output']; - votingPower: Scalars['String']['output']; -}; - -export type Query_VotingPowerByAccountId_Variation = { - __typename?: 'query_votingPowerByAccountId_variation'; - absoluteChange: Scalars['String']['output']; - percentageChange: Scalars['String']['output']; -}; - -export type Query_VotingPowerVariationsByAccountId_Data = { - __typename?: 'query_votingPowerVariationsByAccountId_data'; - absoluteChange: Scalars['String']['output']; - accountId: Scalars['String']['output']; - currentVotingPower: Scalars['String']['output']; - percentageChange: Scalars['String']['output']; - previousVotingPower: Scalars['String']['output']; -}; - -export type Query_VotingPowerVariationsByAccountId_Period = { - __typename?: 'query_votingPowerVariationsByAccountId_period'; - endTimestamp: Scalars['String']['output']; - startTimestamp: Scalars['String']['output']; -}; - -export type Query_VotingPowerVariations_Items_Items = { - __typename?: 'query_votingPowerVariations_items_items'; - absoluteChange: Scalars['String']['output']; - accountId: Scalars['String']['output']; - currentVotingPower: Scalars['String']['output']; - percentageChange: Scalars['String']['output']; - previousVotingPower: Scalars['String']['output']; -}; - -export type Query_VotingPowerVariations_Period = { - __typename?: 'query_votingPowerVariations_period'; - endTimestamp: Scalars['String']['output']; - startTimestamp: Scalars['String']['output']; -}; - -export type Query_VotingPowers_Items_Items = { - __typename?: 'query_votingPowers_items_items'; - accountId: Scalars['String']['output']; - balance?: Maybe; - delegationsCount: Scalars['Float']['output']; - proposalsCount: Scalars['Float']['output']; - variation: Query_VotingPowers_Items_Items_Variation; - votesCount: Scalars['Float']['output']; - votingPower: Scalars['String']['output']; -}; - -export type Query_VotingPowers_Items_Items_Variation = { - __typename?: 'query_votingPowers_items_items_variation'; - absoluteChange: Scalars['String']['output']; - percentageChange: Scalars['String']['output']; -}; - -export enum Timestamp_Const { - Timestamp = 'timestamp' -} - -export type TokenMetrics_200_Response = { - __typename?: 'tokenMetrics_200_response'; - items: Array>; - pageInfo: Query_TokenMetrics_PageInfo; -}; - -export type Token_200_Response = { - __typename?: 'token_200_response'; - cexSupply: Scalars['String']['output']; - circulatingSupply: Scalars['String']['output']; - decimals: Scalars['Float']['output']; - delegatedSupply: Scalars['String']['output']; - dexSupply: Scalars['String']['output']; - id: Scalars['String']['output']; - lendingSupply: Scalars['String']['output']; - name?: Maybe; - nonCirculatingSupply: Scalars['String']['output']; - price: Scalars['String']['output']; - totalSupply: Scalars['String']['output']; - treasury: Scalars['String']['output']; -}; - -export type Transactions_200_Response = { - __typename?: 'transactions_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; - -export type Transfers_200_Response = { - __typename?: 'transfers_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; - -export type VotesByProposalId_200_Response = { - __typename?: 'votesByProposalId_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; - -export type VotesOffchainByProposalId_200_Response = { - __typename?: 'votesOffchainByProposalId_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; - -export type VotesOffchain_200_Response = { - __typename?: 'votesOffchain_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; - -export type Votes_200_Response = { - __typename?: 'votes_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; - -export type VotingPowerByAccountId_200_Response = { - __typename?: 'votingPowerByAccountId_200_response'; - accountId: Scalars['String']['output']; - balance?: Maybe; - delegationsCount: Scalars['Float']['output']; - proposalsCount: Scalars['Float']['output']; - variation: Query_VotingPowerByAccountId_Variation; - votesCount: Scalars['Float']['output']; - votingPower: Scalars['String']['output']; -}; - -export type VotingPowerVariationsByAccountId_200_Response = { - __typename?: 'votingPowerVariationsByAccountId_200_response'; - data: Query_VotingPowerVariationsByAccountId_Data; - period: Query_VotingPowerVariationsByAccountId_Period; -}; - -export type VotingPowerVariations_200_Response = { - __typename?: 'votingPowerVariations_200_response'; - items: Array>; - period: Query_VotingPowerVariations_Period; -}; - -export type VotingPowers_200_Response = { - __typename?: 'votingPowers_200_response'; - items: Array>; - totalCount: Scalars['Float']['output']; -}; - -export type GetDaOsQueryVariables = Exact<{ [key: string]: never; }>; +export type OffchainProposalNonVotersQueryVariables = Exact<{ + id: Scalars['String']['input']; + addresses?: InputMaybe> | InputMaybe>; + orderDirection?: InputMaybe; +}>; -export type GetDaOsQuery = { __typename?: 'Query', daos: { __typename?: 'DAOList', items: Array<{ __typename?: 'dao_200_response', id: string, votingDelay: string, chainId: number, alreadySupportCalldataReview: boolean, supportOffchainData: boolean }> } }; +export type OffchainProposalNonVotersQuery = { __typename?: 'Query', offchainProposalNonVoters?: { __typename?: 'ErrorResponse' } | { __typename?: 'OffchainVotersResponse', items: Array<{ __typename?: 'OffchainNonVoter', voter: string, votingPower: string } | null> } | null }; export type ListOffchainProposalsQueryVariables = Exact<{ - skip?: InputMaybe; - limit?: InputMaybe; - orderDirection?: InputMaybe; - status?: InputMaybe; - fromDate?: InputMaybe; - endDate?: InputMaybe; + skip?: InputMaybe; + limit?: InputMaybe; + orderDirection?: InputMaybe; + status?: InputMaybe> | InputMaybe>; + fromDate?: InputMaybe; + endDate?: InputMaybe; }>; -export type ListOffchainProposalsQuery = { __typename?: 'Query', offchainProposals?: { __typename?: 'offchainProposals_200_response', totalCount: number, items: Array<{ __typename?: 'query_offchainProposals_items_items', id: string, title: string, discussion: string, link: string, state: string, created: number, end: number } | null> } | null }; +export type ListOffchainProposalsQuery = { __typename?: 'Query', offchainProposals?: { __typename?: 'OffchainProposalsResponse', totalCount: number, items: Array<{ __typename?: 'OffchainProposal', id: string, title: string, discussion: string, link: string, state: string, created: number, end: number } | null> } | null }; export type ListOffchainVotesQueryVariables = Exact<{ - fromDate?: InputMaybe; - toDate?: InputMaybe; - limit?: InputMaybe; - skip?: InputMaybe; + fromDate?: InputMaybe; + toDate?: InputMaybe; + limit?: InputMaybe; + skip?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - voterAddresses?: InputMaybe; + orderDirection?: InputMaybe; + voterAddresses?: InputMaybe> | InputMaybe>; }>; -export type ListOffchainVotesQuery = { __typename?: 'Query', votesOffchain?: { __typename?: 'votesOffchain_200_response', totalCount: number, items: Array<{ __typename?: 'query_votesOffchain_items_items', voter: string, created: number, proposalId: string, proposalTitle: string, reason: string, vp?: number | null } | null> } | null }; +export type ListOffchainVotesQuery = { __typename?: 'Query', votesOffchain?: { __typename?: 'OffchainVotesResponse', totalCount: number, items: Array<{ __typename?: 'OffchainVote', voter: string, created: number, proposalId: string, proposalTitle?: string | null, reason: string, vp?: number | null } | null> } | null }; export type ProposalNonVotersQueryVariables = Exact<{ id: Scalars['String']['input']; - addresses?: InputMaybe; + addresses?: InputMaybe> | InputMaybe>; }>; -export type ProposalNonVotersQuery = { __typename?: 'Query', proposalNonVoters?: { __typename?: 'proposalNonVoters_200_response', items: Array<{ __typename?: 'query_proposalNonVoters_items_items', voter: string } | null> } | null }; +export type ProposalNonVotersQuery = { __typename?: 'Query', proposalNonVoters?: { __typename?: 'VotersResponse', items: Array<{ __typename?: 'Voter', voter: string } | null> } | null }; export type GetProposalByIdQueryVariables = Exact<{ id: Scalars['String']['input']; }>; -export type GetProposalByIdQuery = { __typename?: 'Query', proposal?: { __typename?: 'proposal_200_response', id: string, daoId: string, proposerAccountId: string, title: string, description: string, startBlock: number, endBlock: number, endTimestamp: string, timestamp: string, status: string, forVotes: string, againstVotes: string, abstainVotes: string, txHash: string } | null }; +export type GetProposalByIdQuery = { __typename?: 'Query', proposal?: { __typename?: 'ErrorResponse' } | { __typename?: 'OnchainProposal', id: string, daoId: string, proposerAccountId: string, title: string, description: string, startBlock: number, endBlock: number, endTimestamp: number, timestamp: number, status: string, forVotes: string, againstVotes: string, abstainVotes: string, txHash: string } | null }; export type ListProposalsQueryVariables = Exact<{ - skip?: InputMaybe; - limit?: InputMaybe; - orderDirection?: InputMaybe; - status?: InputMaybe; - fromDate?: InputMaybe; - fromEndDate?: InputMaybe; - includeOptimisticProposals?: InputMaybe; + skip?: InputMaybe; + limit?: InputMaybe; + orderDirection?: InputMaybe; + status?: InputMaybe> | InputMaybe>; + fromDate?: InputMaybe; + fromEndDate?: InputMaybe; + includeOptimisticProposals?: InputMaybe; }>; -export type ListProposalsQuery = { __typename?: 'Query', proposals?: { __typename?: 'proposals_200_response', totalCount: number, items: Array<{ __typename?: 'query_proposals_items_items', id: string, daoId: string, proposerAccountId: string, title: string, description: string, startBlock: number, endBlock: number, endTimestamp: string, timestamp: string, status: string, forVotes: string, againstVotes: string, abstainVotes: string, txHash: string } | null> } | null }; +export type ListProposalsQuery = { __typename?: 'Query', proposals?: { __typename?: 'OnchainProposalsResponse', totalCount: number, items: Array<{ __typename?: 'OnchainProposal', id: string, daoId: string, proposerAccountId: string, title: string, description: string, startBlock: number, endBlock: number, endTimestamp: number, timestamp: number, status: string, forVotes: string, againstVotes: string, abstainVotes: string, txHash: string } | null> } | null }; export type GetEventRelevanceThresholdQueryVariables = Exact<{ - relevance: QueryInput_GetEventRelevanceThreshold_Relevance; - type: QueryInput_GetEventRelevanceThreshold_Type; + relevance: FeedRelevance; + type: FeedEventType; }>; -export type GetEventRelevanceThresholdQuery = { __typename?: 'Query', getEventRelevanceThreshold?: { __typename?: 'getEventRelevanceThreshold_200_response', threshold: string } | null }; +export type GetEventRelevanceThresholdQuery = { __typename?: 'Query', getEventRelevanceThreshold?: { __typename?: 'EventRelevanceThresholdResponse', threshold: string } | null }; export type ListVotesQueryVariables = Exact<{ - voterAddressIn?: InputMaybe; - fromDate?: InputMaybe; - toDate?: InputMaybe; - limit?: InputMaybe; - skip?: InputMaybe; + voterAddressIn?: InputMaybe> | InputMaybe>; + fromDate?: InputMaybe; + toDate?: InputMaybe; + limit?: InputMaybe; + skip?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - support?: InputMaybe; + orderDirection?: InputMaybe; + support?: InputMaybe; }>; -export type ListVotesQuery = { __typename?: 'Query', votes?: { __typename?: 'votes_200_response', totalCount: number, items: Array<{ __typename?: 'query_votes_items_items', transactionHash: string, proposalId: string, voterAddress: string, support?: number | null, votingPower: string, timestamp: number, reason?: string | null, proposalTitle?: string | null } | null> } | null }; +export type ListVotesQuery = { __typename?: 'Query', votes?: { __typename?: 'OnchainVotesResponse', totalCount: number, items: Array<{ __typename?: 'OnchainVote', transactionHash: string, proposalId: string, voterAddress: string, support?: string | null, votingPower: string, timestamp: number, reason?: string | null, proposalTitle?: string | null } | null> } | null }; export type ListHistoricalVotingPowerQueryVariables = Exact<{ - limit?: InputMaybe; - skip?: InputMaybe; + limit?: InputMaybe; + skip?: InputMaybe; orderBy?: InputMaybe; - orderDirection?: InputMaybe; - fromDate?: InputMaybe; + orderDirection?: InputMaybe; + fromDate?: InputMaybe; address?: InputMaybe; }>; -export type ListHistoricalVotingPowerQuery = { __typename?: 'Query', historicalVotingPower?: { __typename?: 'historicalVotingPower_200_response', totalCount: number, items: Array<{ __typename?: 'query_historicalVotingPower_items_items', accountId: string, timestamp: string, votingPower: string, delta: string, daoId: string, transactionHash: string, logIndex: number, delegation?: { __typename?: 'query_historicalVotingPower_items_items_delegation', from: string, to: string, value: string, previousDelegate?: string | null } | null, transfer?: { __typename?: 'query_historicalVotingPower_items_items_transfer', from: string, to: string, value: string } | null } | null> } | null }; +export type ListHistoricalVotingPowerQuery = { __typename?: 'Query', historicalVotingPower?: { __typename?: 'HistoricalVotingPowersResponse', totalCount: number, items: Array<{ __typename?: 'HistoricalVotingPower', accountId: string, timestamp: string, votingPower: string, delta: string, daoId: string, transactionHash: string, logIndex: number, delegation?: { __typename?: 'HistoricalVotingPowerDelegation', from: string, to: string, value: string, previousDelegate?: string | null } | null, transfer?: { __typename?: 'HistoricalVotingPowerTransfer', from: string, to: string, value: string } | null } | null> } | null }; export const GetDaOsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDAOs"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"daos"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"votingDelay"}},{"kind":"Field","name":{"kind":"Name","value":"chainId"}},{"kind":"Field","name":{"kind":"Name","value":"alreadySupportCalldataReview"}},{"kind":"Field","name":{"kind":"Name","value":"supportOffchainData"}}]}}]}}]}}]} as unknown as DocumentNode; -export const ListOffchainProposalsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ListOffchainProposals"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"skip"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"NonNegativeInt"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PositiveInt"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"queryInput_offchainProposals_orderDirection"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"status"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"endDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"offchainProposals"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"skip"},"value":{"kind":"Variable","name":{"kind":"Name","value":"skip"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderDirection"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}}},{"kind":"Argument","name":{"kind":"Name","value":"status"},"value":{"kind":"Variable","name":{"kind":"Name","value":"status"}}},{"kind":"Argument","name":{"kind":"Name","value":"fromDate"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromDate"}}},{"kind":"Argument","name":{"kind":"Name","value":"endDate"},"value":{"kind":"Variable","name":{"kind":"Name","value":"endDate"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"discussion"}},{"kind":"Field","name":{"kind":"Name","value":"link"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"created"}},{"kind":"Field","name":{"kind":"Name","value":"end"}}]}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}}]}}]} as unknown as DocumentNode; -export const ListOffchainVotesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ListOffchainVotes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"skip"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"NonNegativeInt"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"queryInput_votesOffchain_orderBy"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"queryInput_votesOffchain_orderDirection"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"voterAddresses"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"votesOffchain"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"fromDate"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromDate"}}},{"kind":"Argument","name":{"kind":"Name","value":"toDate"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toDate"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"skip"},"value":{"kind":"Variable","name":{"kind":"Name","value":"skip"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderBy"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderDirection"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}}},{"kind":"Argument","name":{"kind":"Name","value":"voterAddresses"},"value":{"kind":"Variable","name":{"kind":"Name","value":"voterAddresses"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"voter"}},{"kind":"Field","name":{"kind":"Name","value":"created"}},{"kind":"Field","name":{"kind":"Name","value":"proposalId"}},{"kind":"Field","name":{"kind":"Name","value":"proposalTitle"}},{"kind":"Field","name":{"kind":"Name","value":"reason"}},{"kind":"Field","name":{"kind":"Name","value":"vp"}}]}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}}]}}]} as unknown as DocumentNode; -export const ProposalNonVotersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ProposalNonVoters"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"addresses"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"proposalNonVoters"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}},{"kind":"Argument","name":{"kind":"Name","value":"addresses"},"value":{"kind":"Variable","name":{"kind":"Name","value":"addresses"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"voter"}}]}}]}}]}}]} as unknown as DocumentNode; -export const GetProposalByIdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProposalById"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"proposal"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"daoId"}},{"kind":"Field","name":{"kind":"Name","value":"proposerAccountId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"startBlock"}},{"kind":"Field","name":{"kind":"Name","value":"endBlock"}},{"kind":"Field","name":{"kind":"Name","value":"endTimestamp"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"forVotes"}},{"kind":"Field","name":{"kind":"Name","value":"againstVotes"}},{"kind":"Field","name":{"kind":"Name","value":"abstainVotes"}},{"kind":"Field","name":{"kind":"Name","value":"txHash"}}]}}]}}]} as unknown as DocumentNode; -export const ListProposalsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ListProposals"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"skip"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"NonNegativeInt"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PositiveInt"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"queryInput_proposals_orderDirection"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"status"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromEndDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"includeOptimisticProposals"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"queryInput_proposals_includeOptimisticProposals"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"proposals"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"skip"},"value":{"kind":"Variable","name":{"kind":"Name","value":"skip"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderDirection"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}}},{"kind":"Argument","name":{"kind":"Name","value":"status"},"value":{"kind":"Variable","name":{"kind":"Name","value":"status"}}},{"kind":"Argument","name":{"kind":"Name","value":"fromDate"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromDate"}}},{"kind":"Argument","name":{"kind":"Name","value":"fromEndDate"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromEndDate"}}},{"kind":"Argument","name":{"kind":"Name","value":"includeOptimisticProposals"},"value":{"kind":"Variable","name":{"kind":"Name","value":"includeOptimisticProposals"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"daoId"}},{"kind":"Field","name":{"kind":"Name","value":"proposerAccountId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"startBlock"}},{"kind":"Field","name":{"kind":"Name","value":"endBlock"}},{"kind":"Field","name":{"kind":"Name","value":"endTimestamp"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"forVotes"}},{"kind":"Field","name":{"kind":"Name","value":"againstVotes"}},{"kind":"Field","name":{"kind":"Name","value":"abstainVotes"}},{"kind":"Field","name":{"kind":"Name","value":"txHash"}}]}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}}]}}]} as unknown as DocumentNode; -export const GetEventRelevanceThresholdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetEventRelevanceThreshold"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"relevance"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"queryInput_getEventRelevanceThreshold_relevance"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"type"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"queryInput_getEventRelevanceThreshold_type"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getEventRelevanceThreshold"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"relevance"},"value":{"kind":"Variable","name":{"kind":"Name","value":"relevance"}}},{"kind":"Argument","name":{"kind":"Name","value":"type"},"value":{"kind":"Variable","name":{"kind":"Name","value":"type"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"threshold"}}]}}]}}]} as unknown as DocumentNode; -export const ListVotesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ListVotes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"voterAddressIn"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"skip"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"NonNegativeInt"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"queryInput_votes_orderBy"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"queryInput_votes_orderDirection"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"support"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"votes"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"voterAddressIn"},"value":{"kind":"Variable","name":{"kind":"Name","value":"voterAddressIn"}}},{"kind":"Argument","name":{"kind":"Name","value":"fromDate"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromDate"}}},{"kind":"Argument","name":{"kind":"Name","value":"toDate"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toDate"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"skip"},"value":{"kind":"Variable","name":{"kind":"Name","value":"skip"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderBy"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderDirection"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}}},{"kind":"Argument","name":{"kind":"Name","value":"support"},"value":{"kind":"Variable","name":{"kind":"Name","value":"support"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"transactionHash"}},{"kind":"Field","name":{"kind":"Name","value":"proposalId"}},{"kind":"Field","name":{"kind":"Name","value":"voterAddress"}},{"kind":"Field","name":{"kind":"Name","value":"support"}},{"kind":"Field","name":{"kind":"Name","value":"votingPower"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"reason"}},{"kind":"Field","name":{"kind":"Name","value":"proposalTitle"}}]}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}}]}}]} as unknown as DocumentNode; -export const ListHistoricalVotingPowerDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ListHistoricalVotingPower"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PositiveInt"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"skip"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"NonNegativeInt"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"queryInput_historicalVotingPower_orderBy"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"queryInput_historicalVotingPower_orderDirection"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"address"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"historicalVotingPower"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"skip"},"value":{"kind":"Variable","name":{"kind":"Name","value":"skip"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderBy"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderDirection"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}}},{"kind":"Argument","name":{"kind":"Name","value":"fromDate"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromDate"}}},{"kind":"Argument","name":{"kind":"Name","value":"address"},"value":{"kind":"Variable","name":{"kind":"Name","value":"address"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accountId"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"votingPower"}},{"kind":"Field","name":{"kind":"Name","value":"delta"}},{"kind":"Field","name":{"kind":"Name","value":"daoId"}},{"kind":"Field","name":{"kind":"Name","value":"transactionHash"}},{"kind":"Field","name":{"kind":"Name","value":"logIndex"}},{"kind":"Field","name":{"kind":"Name","value":"delegation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"from"}},{"kind":"Field","name":{"kind":"Name","value":"to"}},{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"previousDelegate"}}]}},{"kind":"Field","name":{"kind":"Name","value":"transfer"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"from"}},{"kind":"Field","name":{"kind":"Name","value":"to"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const OffchainProposalNonVotersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"OffchainProposalNonVoters"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"addresses"}},"type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"OrderDirection"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"offchainProposalNonVoters"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}},{"kind":"Argument","name":{"kind":"Name","value":"addresses"},"value":{"kind":"Variable","name":{"kind":"Name","value":"addresses"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderDirection"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OffchainVotersResponse"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"voter"}},{"kind":"Field","name":{"kind":"Name","value":"votingPower"}}]}}]}}]}}]}}]} as unknown as DocumentNode; +export const ListOffchainProposalsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ListOffchainProposals"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"skip"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"OrderDirection"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"status"}},"type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"queryInput_offchainProposals_status_items"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"endDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"offchainProposals"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"skip"},"value":{"kind":"Variable","name":{"kind":"Name","value":"skip"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderDirection"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}}},{"kind":"Argument","name":{"kind":"Name","value":"status"},"value":{"kind":"Variable","name":{"kind":"Name","value":"status"}}},{"kind":"Argument","name":{"kind":"Name","value":"fromDate"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromDate"}}},{"kind":"Argument","name":{"kind":"Name","value":"endDate"},"value":{"kind":"Variable","name":{"kind":"Name","value":"endDate"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"discussion"}},{"kind":"Field","name":{"kind":"Name","value":"link"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"created"}},{"kind":"Field","name":{"kind":"Name","value":"end"}}]}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}}]}}]} as unknown as DocumentNode; +export const ListOffchainVotesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ListOffchainVotes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"skip"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"queryInput_votesOffchain_orderBy"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"OrderDirection"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"voterAddresses"}},"type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"votesOffchain"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"fromDate"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromDate"}}},{"kind":"Argument","name":{"kind":"Name","value":"toDate"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toDate"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"skip"},"value":{"kind":"Variable","name":{"kind":"Name","value":"skip"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderBy"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderDirection"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}}},{"kind":"Argument","name":{"kind":"Name","value":"voterAddresses"},"value":{"kind":"Variable","name":{"kind":"Name","value":"voterAddresses"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"voter"}},{"kind":"Field","name":{"kind":"Name","value":"created"}},{"kind":"Field","name":{"kind":"Name","value":"proposalId"}},{"kind":"Field","name":{"kind":"Name","value":"proposalTitle"}},{"kind":"Field","name":{"kind":"Name","value":"reason"}},{"kind":"Field","name":{"kind":"Name","value":"vp"}}]}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}}]}}]} as unknown as DocumentNode; +export const ProposalNonVotersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ProposalNonVoters"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"addresses"}},"type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"proposalNonVoters"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}},{"kind":"Argument","name":{"kind":"Name","value":"addresses"},"value":{"kind":"Variable","name":{"kind":"Name","value":"addresses"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"voter"}}]}}]}}]}}]} as unknown as DocumentNode; +export const GetProposalByIdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProposalById"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"proposal"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OnchainProposal"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"daoId"}},{"kind":"Field","name":{"kind":"Name","value":"proposerAccountId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"startBlock"}},{"kind":"Field","name":{"kind":"Name","value":"endBlock"}},{"kind":"Field","name":{"kind":"Name","value":"endTimestamp"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"forVotes"}},{"kind":"Field","name":{"kind":"Name","value":"againstVotes"}},{"kind":"Field","name":{"kind":"Name","value":"abstainVotes"}},{"kind":"Field","name":{"kind":"Name","value":"txHash"}}]}}]}}]}}]} as unknown as DocumentNode; +export const ListProposalsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ListProposals"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"skip"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"OrderDirection"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"status"}},"type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"queryInput_proposals_status_items"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromEndDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"includeOptimisticProposals"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"proposals"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"skip"},"value":{"kind":"Variable","name":{"kind":"Name","value":"skip"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderDirection"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}}},{"kind":"Argument","name":{"kind":"Name","value":"status"},"value":{"kind":"Variable","name":{"kind":"Name","value":"status"}}},{"kind":"Argument","name":{"kind":"Name","value":"fromDate"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromDate"}}},{"kind":"Argument","name":{"kind":"Name","value":"fromEndDate"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromEndDate"}}},{"kind":"Argument","name":{"kind":"Name","value":"includeOptimisticProposals"},"value":{"kind":"Variable","name":{"kind":"Name","value":"includeOptimisticProposals"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"daoId"}},{"kind":"Field","name":{"kind":"Name","value":"proposerAccountId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"startBlock"}},{"kind":"Field","name":{"kind":"Name","value":"endBlock"}},{"kind":"Field","name":{"kind":"Name","value":"endTimestamp"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"forVotes"}},{"kind":"Field","name":{"kind":"Name","value":"againstVotes"}},{"kind":"Field","name":{"kind":"Name","value":"abstainVotes"}},{"kind":"Field","name":{"kind":"Name","value":"txHash"}}]}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}}]}}]} as unknown as DocumentNode; +export const GetEventRelevanceThresholdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetEventRelevanceThreshold"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"relevance"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"FeedRelevance"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"type"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"FeedEventType"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getEventRelevanceThreshold"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"relevance"},"value":{"kind":"Variable","name":{"kind":"Name","value":"relevance"}}},{"kind":"Argument","name":{"kind":"Name","value":"type"},"value":{"kind":"Variable","name":{"kind":"Name","value":"type"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"threshold"}}]}}]}}]} as unknown as DocumentNode; +export const ListVotesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ListVotes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"voterAddressIn"}},"type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"skip"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"queryInput_votes_orderBy"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"OrderDirection"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"support"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"votes"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"voterAddressIn"},"value":{"kind":"Variable","name":{"kind":"Name","value":"voterAddressIn"}}},{"kind":"Argument","name":{"kind":"Name","value":"fromDate"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromDate"}}},{"kind":"Argument","name":{"kind":"Name","value":"toDate"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toDate"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"skip"},"value":{"kind":"Variable","name":{"kind":"Name","value":"skip"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderBy"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderDirection"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}}},{"kind":"Argument","name":{"kind":"Name","value":"support"},"value":{"kind":"Variable","name":{"kind":"Name","value":"support"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"transactionHash"}},{"kind":"Field","name":{"kind":"Name","value":"proposalId"}},{"kind":"Field","name":{"kind":"Name","value":"voterAddress"}},{"kind":"Field","name":{"kind":"Name","value":"support"}},{"kind":"Field","name":{"kind":"Name","value":"votingPower"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"reason"}},{"kind":"Field","name":{"kind":"Name","value":"proposalTitle"}}]}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}}]}}]} as unknown as DocumentNode; +export const ListHistoricalVotingPowerDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ListHistoricalVotingPower"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"skip"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"queryInput_historicalVotingPower_orderBy"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"OrderDirection"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"address"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"historicalVotingPower"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"skip"},"value":{"kind":"Variable","name":{"kind":"Name","value":"skip"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderBy"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderDirection"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}}},{"kind":"Argument","name":{"kind":"Name","value":"fromDate"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromDate"}}},{"kind":"Argument","name":{"kind":"Name","value":"address"},"value":{"kind":"Variable","name":{"kind":"Name","value":"address"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accountId"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"votingPower"}},{"kind":"Field","name":{"kind":"Name","value":"delta"}},{"kind":"Field","name":{"kind":"Name","value":"daoId"}},{"kind":"Field","name":{"kind":"Name","value":"transactionHash"}},{"kind":"Field","name":{"kind":"Name","value":"logIndex"}},{"kind":"Field","name":{"kind":"Name","value":"delegation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"from"}},{"kind":"Field","name":{"kind":"Name","value":"to"}},{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"previousDelegate"}}]}},{"kind":"Field","name":{"kind":"Name","value":"transfer"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"from"}},{"kind":"Field","name":{"kind":"Name","value":"to"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/packages/anticapture-client/src/index.ts b/packages/anticapture-client/src/index.ts index b0a36723..ed3c606e 100644 --- a/packages/anticapture-client/src/index.ts +++ b/packages/anticapture-client/src/index.ts @@ -18,13 +18,11 @@ export type { // Export GraphQL enums export { - QueryInput_Proposals_OrderDirection, + OrderDirection, QueryInput_HistoricalVotingPower_OrderBy, - QueryInput_HistoricalVotingPower_OrderDirection, QueryInput_Votes_OrderBy, - QueryInput_Votes_OrderDirection, QueryInput_VotesOffchain_OrderBy, - QueryInput_VotesOffchain_OrderDirection + QueryInput_Proposals_Status_Items, } from './gql/graphql'; export { FeedEventType, FeedRelevance } from './schemas'; diff --git a/packages/anticapture-client/src/schemas.ts b/packages/anticapture-client/src/schemas.ts index 59f5dd4a..948b49c1 100644 --- a/packages/anticapture-client/src/schemas.ts +++ b/packages/anticapture-client/src/schemas.ts @@ -1,8 +1,8 @@ import { z } from 'zod'; export { - QueryInput_GetEventRelevanceThreshold_Type as FeedEventType, - QueryInput_GetEventRelevanceThreshold_Relevance as FeedRelevance, + FeedEventType, + FeedRelevance, } from './gql/graphql'; // Schema with built-in transformation and fallbacks @@ -86,11 +86,11 @@ export const SafeVotesResponseSchema = z.object({ transactionHash: z.string(), proposalId: z.string(), voterAddress: z.string(), - support: z.number(), + support: z.string().nullable().optional(), votingPower: z.string(), timestamp: z.number(), reason: z.string().nullable().optional(), - proposalTitle: z.string(), + proposalTitle: z.string().nullable().optional(), }).nullable()), totalCount: z.number(), }).nullable(), @@ -127,6 +127,27 @@ export const SafeProposalNonVotersResponseSchema = z.object({ }; }); +export const SafeOffchainProposalNonVotersResponseSchema = z.object({ + offchainProposalNonVoters: z.object({ + items: z.array(z.object({ + voter: z.string(), + votingPower: z.string().optional() + }).nullable()), + totalCount: z.number().optional() + }).nullable() +}).transform((data) => { + if (!data.offchainProposalNonVoters) { + console.warn('OffchainProposalNonVotersResponse has null offchainProposalNonVoters:', data); + return { offchainProposalNonVoters: { items: [], totalCount: 0 } }; + } + return { + offchainProposalNonVoters: { + ...data.offchainProposalNonVoters, + items: data.offchainProposalNonVoters.items.filter((item): item is { voter: string; votingPower?: string } => item !== null) + } + }; +}); + export const EventThresholdResponseSchema = z.object({ getEventRelevanceThreshold: z.object({ threshold: z.string() @@ -141,6 +162,7 @@ export const OffchainProposalItemSchema = z.object({ state: z.string(), created: z.number(), end: z.number(), + start: z.number().optional(), }); export type OffchainProposalItem = z.infer; diff --git a/packages/messages/src/index.ts b/packages/messages/src/index.ts index 29c10728..9eeceb0d 100644 --- a/packages/messages/src/index.ts +++ b/packages/messages/src/index.ts @@ -13,6 +13,7 @@ export * from './triggers/voting-power'; export * from './triggers/offchain-vote-cast'; export * from './triggers/non-voting'; export * from './triggers/delegation-change'; +export * from './triggers/offchain-voting-reminder'; export * from './triggers/buttons'; // Export UI messages diff --git a/packages/messages/src/notification-types.ts b/packages/messages/src/notification-types.ts index 5a1920ab..6a161e90 100644 --- a/packages/messages/src/notification-types.ts +++ b/packages/messages/src/notification-types.ts @@ -10,6 +10,7 @@ export enum NotificationTypeId { VoteConfirmation = 'vote-confirmation', OffchainVoteCast = 'offchain-vote-cast', OffchainProposalFinished = 'offchain-proposal-finished', + OffchainVotingReminder75 = 'offchain-voting-reminder-75', } export const NOTIFICATION_TYPES: Record = { @@ -24,4 +25,5 @@ export const NOTIFICATION_TYPES: Record = { [NotificationTypeId.VoteConfirmation]: 'Vote Confirmation', [NotificationTypeId.OffchainVoteCast]: 'Offchain Vote', [NotificationTypeId.OffchainProposalFinished]: 'Offchain Proposal Finished', + [NotificationTypeId.OffchainVotingReminder75]: 'Offchain Vote Reminder 75%', }; diff --git a/packages/messages/src/triggers/buttons.ts b/packages/messages/src/triggers/buttons.ts index e6be6f81..19425904 100644 --- a/packages/messages/src/triggers/buttons.ts +++ b/packages/messages/src/triggers/buttons.ts @@ -64,6 +64,13 @@ const ctaButtonConfigs: Record = { ? `${BASE_URL}/${daoId}/governance/proposal/${proposalId}` : BASE_URL }, + 'voting-reminder': { + text: 'Cast your vote', + buildUrl: ({ daoId, proposalId }) => + daoId && proposalId + ? `${BASE_URL}/${daoId}/governance/proposal/${proposalId}` + : BASE_URL + }, newOffchainProposal: { text: 'Cast your vote', buildUrl: ({ proposalUrl }) => @@ -73,7 +80,17 @@ const ctaButtonConfigs: Record = { text: 'View proposal results', buildUrl: ({ proposalUrl }) => proposalUrl || BASE_URL - } + }, + offchainVotingReminder: { + text: 'Cast your vote', + buildUrl: ({ proposalUrl }) => + proposalUrl || BASE_URL + }, + 'offchain-voting-reminder': { + text: 'Cast your vote', + buildUrl: ({ proposalUrl }) => + proposalUrl || BASE_URL + }, }; /** diff --git a/packages/messages/src/triggers/offchain-voting-reminder.ts b/packages/messages/src/triggers/offchain-voting-reminder.ts new file mode 100644 index 00000000..846509d1 --- /dev/null +++ b/packages/messages/src/triggers/offchain-voting-reminder.ts @@ -0,0 +1,18 @@ +export const offchainVotingReminderMessages = { + default: `⏰ Snapshot Voting Reminder - {{daoId}} + +Proposal: "{{title}}" + +⏱️ Time remaining: {{timeRemaining}} +📊 {{thresholdPercentage}}% of voting period has passed +🗳️ {{address}}'s vote hasn't been recorded yet + +Don't miss your chance to participate!`, + getMessageKey(_thresholdPercentage: number): string { + return 'default'; + }, + + getTemplate(_key: string): string { + return this.default; + }, +}; diff --git a/packages/messages/src/triggers/voting-reminder.ts b/packages/messages/src/triggers/voting-reminder.ts index 759d16a8..53fc3124 100644 --- a/packages/messages/src/triggers/voting-reminder.ts +++ b/packages/messages/src/triggers/voting-reminder.ts @@ -54,6 +54,16 @@ Participate in governance!`, return 'default'; }, + getTemplate(key: string): string { + const templates: Record = { + urgent: this.urgent, + midPeriod: this.midPeriod, + early: this.early, + default: this.default, + }; + return templates[key] ?? this.default; + }, + headers: { urgent: '🚨 URGENT Voting Reminder - {{daoId}}', midPeriod: '⏰ Mid-Period Voting Reminder - {{daoId}}', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 41c9cc55..9cd05cda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,6 +14,9 @@ importers: pg: specifier: ^8.16.3 version: 8.16.3 + pino-pretty: + specifier: ^13.1.3 + version: 13.1.3 ts-node: specifier: ^10.9.2 version: 10.9.2(@swc/core@1.11.24)(@types/node@24.3.1)(typescript@5.8.2) @@ -26,6 +29,9 @@ importers: apps/consumers: dependencies: + '@anticapture/observability': + specifier: ^1.0.0 + version: 1.0.1(@opentelemetry/api@1.9.1)(pino-pretty@13.1.3) '@fastify/cors': specifier: ^11.0.1 version: 11.0.1 @@ -38,6 +44,9 @@ importers: '@notification-system/rabbitmq-client': specifier: workspace:* version: link:../../packages/rabbitmq-client + '@opentelemetry/api': + specifier: ^1.9.0 + version: 1.9.1 '@slack/bolt': specifier: ^4.4.0 version: 4.4.0(@types/express@5.0.3) @@ -95,7 +104,7 @@ importers: dependencies: next: specifier: ^14.2.5 - version: 14.2.35(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 14.2.35(@opentelemetry/api@1.9.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) pg: specifier: ^8.16.3 version: 8.16.3 @@ -136,6 +145,9 @@ importers: apps/dispatcher: dependencies: + '@anticapture/observability': + specifier: ^1.0.0 + version: 1.0.1(@opentelemetry/api@1.9.1)(pino-pretty@13.1.3) '@jest/globals': specifier: ^29.7.0 version: 29.7.0 @@ -148,6 +160,9 @@ importers: '@notification-system/rabbitmq-client': specifier: workspace:* version: link:../../packages/rabbitmq-client + '@opentelemetry/api': + specifier: ^1.9.0 + version: 1.9.1 axios: specifier: ^1.9.0 version: 1.9.0 @@ -214,7 +229,7 @@ importers: version: 0.574.0(react@18.3.1) next: specifier: ^14.2.5 - version: 14.2.35(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 14.2.35(@opentelemetry/api@1.9.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18.3.1 version: 18.3.1 @@ -296,13 +311,16 @@ importers: version: 29.7.0(@types/node@20.17.46)(ts-node@10.9.2(@swc/core@1.11.24)(@types/node@24.3.1)(typescript@5.8.2)) knex: specifier: ^3.1.0 - version: 3.1.0(pg@8.16.3)(sqlite3@5.1.7) + version: 3.1.0(pg@8.16.3)(sqlite3@6.0.1) rabbitmq-client: specifier: ^5.0.5 version: 5.0.5 sqlite3: - specifier: ^5.1.7 - version: 5.1.7 + specifier: ^6.0.1 + version: 6.0.1 + telegraf: + specifier: ^4.16.3 + version: 4.16.3(encoding@0.1.13) ts-jest: specifier: ^29.3.2 version: 29.3.2(@babel/core@7.27.1)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.27.1))(jest@29.7.0(@types/node@20.17.46)(ts-node@10.9.2(@swc/core@1.11.24)(@types/node@24.3.1)(typescript@5.8.2)))(typescript@5.8.3) @@ -321,6 +339,9 @@ importers: apps/logic-system: dependencies: + '@anticapture/observability': + specifier: ^1.0.0 + version: 1.0.1(@opentelemetry/api@1.9.1)(pino-pretty@13.1.3) '@notification-system/anticapture-client': specifier: workspace:* version: link:../../packages/anticapture-client @@ -330,6 +351,9 @@ importers: '@notification-system/rabbitmq-client': specifier: workspace:* version: link:../../packages/rabbitmq-client + '@opentelemetry/api': + specifier: ^1.9.0 + version: 1.9.1 axios: specifier: ^1.6.7 version: 1.9.0 @@ -357,34 +381,37 @@ importers: version: 18.19.101 '@typescript-eslint/eslint-plugin': specifier: ^5.57.1 - version: 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5) + version: 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3) '@typescript-eslint/parser': specifier: ^5.57.1 - version: 5.62.0(eslint@8.57.1)(typescript@4.9.5) + version: 5.62.0(eslint@8.57.1)(typescript@5.8.3) eslint: specifier: ^8.37.0 version: 8.57.1 jest: specifier: ^29.5.0 - version: 29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@4.9.5)) + version: 29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@5.8.3)) jest-mock: specifier: ^29.7.0 version: 29.7.0 ts-jest: specifier: ^29.1.0 - version: 29.3.2(@babel/core@7.27.1)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.27.1))(jest@29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@4.9.5)))(typescript@4.9.5) + version: 29.3.2(@babel/core@7.27.1)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.27.1))(jest@29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@5.8.3)))(typescript@5.8.3) ts-node: specifier: 10.9.1 - version: 10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@4.9.5) + version: 10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@5.8.3) typescript: - specifier: ^4.9.5 - version: 4.9.5 + specifier: ^5.8.3 + version: 5.8.3 viem: specifier: ^2.34.0 - version: 2.34.0(typescript@4.9.5)(zod@3.24.3) + version: 2.34.0(typescript@5.8.3)(zod@3.24.3) apps/subscription-server: dependencies: + '@anticapture/observability': + specifier: ^1.0.0 + version: 1.0.1(@opentelemetry/api@1.9.1)(pino-pretty@13.1.3) '@fastify/cors': specifier: ^11.0.1 version: 11.0.1 @@ -400,6 +427,9 @@ importers: '@notification-system/messages': specifier: workspace:* version: link:../../packages/messages + '@opentelemetry/api': + specifier: ^1.9.0 + version: 1.9.1 '@slack/web-api': specifier: ^6.13.0 version: 6.13.0 @@ -574,6 +604,15 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} + '@anticapture/observability@1.0.1': + resolution: {integrity: sha512-+qM6mbHWnArKrrXmB9fMaOZJUm8+OC60/FvPTKe/GVRi1TK1FR++pTIzUfk4HmcvWM3XYQBsApexdmREk71y5g==} + peerDependencies: + '@opentelemetry/api': ^1.9.0 + pino-pretty: ^13.0.0 + peerDependenciesMeta: + pino-pretty: + optional: true + '@ardatan/relay-compiler@12.0.3': resolution: {integrity: sha512-mBDFOGvAoVlWaWqs3hm1AciGHSQE1rqFc/liZTyYz/Oek9yZdT5H26pH2zAFuEiTiBVPPyMuqf5VjOFPI2DGsQ==} hasBin: true @@ -988,9 +1027,6 @@ packages: '@fastify/swagger@9.5.0': resolution: {integrity: sha512-6WiwB1Nh+GHqm4wsDGH/ym6ming3DyH9cuAkIwGN9nhbyrCoNSZ+l9h3TAsksffbNEI/RHCiw2BH2LeGNRrOoQ==} - '@gar/promisify@1.1.3': - resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==} - '@graphql-codegen/add@5.0.3': resolution: {integrity: sha512-SxXPmramkth8XtBlAHu4H4jYcYXM/o3p01+psU+0NADQowA8jtYkK6MW5rV6T+CxkEaNZItfSmZRPgIuypcqnA==} peerDependencies: @@ -1288,6 +1324,10 @@ packages: resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} + '@isaacs/fs-minipass@4.0.1': + resolution: {integrity: sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==} + engines: {node: '>=18.0.0'} + '@istanbuljs/load-nyc-config@1.1.0': resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} engines: {node: '>=8'} @@ -1479,14 +1519,6 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@npmcli/fs@1.1.1': - resolution: {integrity: sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==} - - '@npmcli/move-file@1.1.2': - resolution: {integrity: sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==} - engines: {node: '>=10'} - deprecated: This functionality has been moved to @npmcli/fs - '@open-draft/deferred-promise@2.2.0': resolution: {integrity: sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==} @@ -1496,6 +1528,225 @@ packages: '@open-draft/until@2.1.0': resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} + '@opentelemetry/api-logs@0.204.0': + resolution: {integrity: sha512-DqxY8yoAaiBPivoJD4UtgrMS8gEmzZ5lnaxzPojzLVHBGqPxgWm4zcuvcUHZiqQ6kRX2Klel2r9y8cA2HAtqpw==} + engines: {node: '>=8.0.0'} + + '@opentelemetry/api-logs@0.206.0': + resolution: {integrity: sha512-yIVDu9jX//nV5wSMLZLdHdb1SKHIMj9k+wQVFtln5Flcgdldz9BkHtavvExQiJqBZg2OpEEJEZmzQazYztdz2A==} + engines: {node: '>=8.0.0'} + + '@opentelemetry/api-logs@0.57.2': + resolution: {integrity: sha512-uIX52NnTM0iBh84MShlpouI7UKqkZ7MrUszTmaypHBu4r7NofznSnQRfJ+uUeDtQDj6w8eFGg5KBLDAwAPz1+A==} + engines: {node: '>=14'} + + '@opentelemetry/api@1.9.1': + resolution: {integrity: sha512-gLyJlPHPZYdAk1JENA9LeHejZe1Ti77/pTeFm/nMXmQH/HFZlcS/O2XJB+L8fkbrNSqhdtlvjBVjxwUYanNH5Q==} + engines: {node: '>=8.0.0'} + + '@opentelemetry/context-async-hooks@1.30.1': + resolution: {integrity: sha512-s5vvxXPVdjqS3kTLKMeBMvop9hbWkwzBpu+mUO2M7sZtlkyDJGwFe33wRKnbaYDo8ExRVBIIdwIGrqpxHuKttA==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + + '@opentelemetry/core@1.30.1': + resolution: {integrity: sha512-OOCM2C/QIURhJMuKaekP3TRBxBKxG/TWWA0TL2J6nXUtDnuCtccy49LUJF8xPFXMX+0LMcxFpCo8M9cGY1W6rQ==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + + '@opentelemetry/core@2.1.0': + resolution: {integrity: sha512-RMEtHsxJs/GiHHxYT58IY57UXAQTuUnZVco6ymDEqTNlJKTimM4qPUPVe8InNFyBjhHBEAx4k3Q8LtNayBsbUQ==} + engines: {node: ^18.19.0 || >=20.6.0} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + + '@opentelemetry/core@2.7.0': + resolution: {integrity: sha512-DT12SXVwV2eoJrGf4nnsvZojxxeQo+LlNAsoYGRRObPWTeN6APiqZ2+nqDCQDvQX40eLi1AePONS0onoASp3yQ==} + engines: {node: ^18.19.0 || >=20.6.0} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + + '@opentelemetry/exporter-logs-otlp-grpc@0.206.0': + resolution: {integrity: sha512-kJKxKBaGwqWop95d6tcluz260IWwIgOG0BH8oVm6429tg8LxY2PJb7Om8d5s+5vOFM8DkUYCnIpn9d/13/RcKQ==} + engines: {node: ^18.19.0 || >=20.6.0} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + + '@opentelemetry/exporter-logs-otlp-http@0.206.0': + resolution: {integrity: sha512-VWcHEnS+1kN+sQTAdCgSn2anqHPxY1/e52fhpe2mcSnEaXI1srFf3RU5DAu7hzQO6T9DPQzOKG8kc76vCtyYDw==} + engines: {node: ^18.19.0 || >=20.6.0} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + + '@opentelemetry/exporter-logs-otlp-proto@0.206.0': + resolution: {integrity: sha512-CsYNXJwkn1qCXJGE+/JvvYucAjL8rpaxa2hnl+tDP6M5E0O3UVa8zG4ZUEebjr5J5Nc32egvslEZx5rgNOp3lQ==} + engines: {node: ^18.19.0 || >=20.6.0} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + + '@opentelemetry/exporter-prometheus@0.57.2': + resolution: {integrity: sha512-VqIqXnuxWMWE/1NatAGtB1PvsQipwxDcdG4RwA/umdBcW3/iOHp0uejvFHTRN2O78ZPged87ErJajyUBPUhlDQ==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + + '@opentelemetry/exporter-trace-otlp-http@0.57.2': + resolution: {integrity: sha512-sB/gkSYFu+0w2dVQ0PWY9fAMl172PKMZ/JrHkkW8dmjCL0CYkmXeE+ssqIL/yBUTPOvpLIpenX5T9RwXRBW/3g==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + + '@opentelemetry/host-metrics@0.35.5': + resolution: {integrity: sha512-Zf9Cjl7H6JalspnK5KD1+LLKSVecSinouVctNmUxRy+WP+20KwHq+qg4hADllkEmJ99MZByLLmEmzrr7s92V6g==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + + '@opentelemetry/instrumentation-http@0.57.2': + resolution: {integrity: sha512-1Uz5iJ9ZAlFOiPuwYg29Bf7bJJc/GeoeJIFKJYQf67nTVKFe8RHbEtxgkOmK4UGZNHKXcpW4P8cWBYzBn1USpg==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + + '@opentelemetry/instrumentation-pg@0.57.0': + resolution: {integrity: sha512-dWLGE+r5lBgm2A8SaaSYDE3OKJ/kwwy5WLyGyzor8PLhUL9VnJRiY6qhp4njwhnljiLtzeffRtG2Mf/YyWLeTw==} + engines: {node: ^18.19.0 || >=20.6.0} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + + '@opentelemetry/instrumentation@0.204.0': + resolution: {integrity: sha512-vV5+WSxktzoMP8JoYWKeopChy6G3HKk4UQ2hESCRDUUTZqQ3+nM3u8noVG0LmNfRWwcFBnbZ71GKC7vaYYdJ1g==} + engines: {node: ^18.19.0 || >=20.6.0} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + + '@opentelemetry/instrumentation@0.57.2': + resolution: {integrity: sha512-BdBGhQBh8IjZ2oIIX6F2/Q3LKm/FDDKi6ccYKcBTeilh6SNdNKveDOLk73BkSJjQLJk6qe4Yh+hHw1UPhCDdrg==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + + '@opentelemetry/otlp-exporter-base@0.206.0': + resolution: {integrity: sha512-Rv54oSNKMHYS5hv+H5EGksfBUtvPQWFTK+Dk6MjJun9tOijCsFJrhRFvAqg5d67TWSMn+ZQYRKIeXh5oLVrpAQ==} + engines: {node: ^18.19.0 || >=20.6.0} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + + '@opentelemetry/otlp-exporter-base@0.57.2': + resolution: {integrity: sha512-XdxEzL23Urhidyebg5E6jZoaiW5ygP/mRjxLHixogbqwDy2Faduzb5N0o/Oi+XTIJu+iyxXdVORjXax+Qgfxag==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + + '@opentelemetry/otlp-grpc-exporter-base@0.206.0': + resolution: {integrity: sha512-IA8EDbrB8OKtidMqErBY8sUc9mh03LOXuNPwp4/rdPrxSt45g1gBuZMovRXdEWfRyKKbF2E7MdipT2m11bs6SQ==} + engines: {node: ^18.19.0 || >=20.6.0} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + + '@opentelemetry/otlp-transformer@0.206.0': + resolution: {integrity: sha512-Li2Cik1WnmNbU2mmTnw7DxvRiXhMcnAuTfAclP8y/zy7h5+GrLDpTZ+Z0XUs+Q3MLkb/h3ry4uFrC/z+2a6X7g==} + engines: {node: ^18.19.0 || >=20.6.0} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + + '@opentelemetry/otlp-transformer@0.57.2': + resolution: {integrity: sha512-48IIRj49gbQVK52jYsw70+Jv+JbahT8BqT2Th7C4H7RCM9d0gZ5sgNPoMpWldmfjvIsSgiGJtjfk9MeZvjhoig==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + + '@opentelemetry/propagator-b3@1.30.1': + resolution: {integrity: sha512-oATwWWDIJzybAZ4pO76ATN5N6FFbOA1otibAVlS8v90B4S1wClnhRUk7K+2CHAwN1JKYuj4jh/lpCEG5BAqFuQ==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + + '@opentelemetry/propagator-jaeger@1.30.1': + resolution: {integrity: sha512-Pj/BfnYEKIOImirH76M4hDaBSx6HyZ2CXUqk+Kj02m6BB80c/yo4BdWkn/1gDFfU+YPY+bPR2U0DKBfdxCKwmg==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + + '@opentelemetry/resources@1.30.1': + resolution: {integrity: sha512-5UxZqiAgLYGFjS4s9qm5mBVo433u+dSPUFWVWXmLAD4wB65oMCoXaJP1KJa9DIYYMeHu3z4BZcStG3LC593cWA==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + + '@opentelemetry/resources@2.1.0': + resolution: {integrity: sha512-1CJjf3LCvoefUOgegxi8h6r4B/wLSzInyhGP2UmIBYNlo4Qk5CZ73e1eEyWmfXvFtm1ybkmfb2DqWvspsYLrWw==} + engines: {node: ^18.19.0 || >=20.6.0} + peerDependencies: + '@opentelemetry/api': '>=1.3.0 <1.10.0' + + '@opentelemetry/resources@2.7.0': + resolution: {integrity: sha512-K+oi0hNMv94EpZbnW3eyu2X6SGVpD3O5DhG2NIp65Hc7lhAj9brRXTAVzh3wB82+q3ThakEf7Zd7RsFUqcTc7A==} + engines: {node: ^18.19.0 || >=20.6.0} + peerDependencies: + '@opentelemetry/api': '>=1.3.0 <1.10.0' + + '@opentelemetry/sdk-logs@0.206.0': + resolution: {integrity: sha512-SQ2yTmqe4Mw9RI3a/glVkfjWPsXh6LySvnljXubiZq4zu+UP8NMJt2j82ZsYb+KpD7Eu+/41/7qlJnjdeVjz7Q==} + engines: {node: ^18.19.0 || >=20.6.0} + peerDependencies: + '@opentelemetry/api': '>=1.4.0 <1.10.0' + + '@opentelemetry/sdk-logs@0.57.2': + resolution: {integrity: sha512-TXFHJ5c+BKggWbdEQ/inpgIzEmS2BGQowLE9UhsMd7YYlUfBQJ4uax0VF/B5NYigdM/75OoJGhAV3upEhK+3gg==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.4.0 <1.10.0' + + '@opentelemetry/sdk-metrics@1.30.1': + resolution: {integrity: sha512-q9zcZ0Okl8jRgmy7eNW3Ku1XSgg3sDLa5evHZpCwjspw7E8Is4K/haRPDJrBcX3YSn/Y7gUvFnByNYEKQNbNog==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.3.0 <1.10.0' + + '@opentelemetry/sdk-metrics@2.1.0': + resolution: {integrity: sha512-J9QX459mzqHLL9Y6FZ4wQPRZG4TOpMCyPOh6mkr/humxE1W2S3Bvf4i75yiMW9uyed2Kf5rxmLhTm/UK8vNkAw==} + engines: {node: ^18.19.0 || >=20.6.0} + peerDependencies: + '@opentelemetry/api': '>=1.9.0 <1.10.0' + + '@opentelemetry/sdk-trace-base@1.30.1': + resolution: {integrity: sha512-jVPgBbH1gCy2Lb7X0AVQ8XAfgg0pJ4nvl8/IiQA6nxOsPvS+0zMJaFSs2ltXe0J6C8dqjcnpyqINDJmU30+uOg==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + + '@opentelemetry/sdk-trace-base@2.1.0': + resolution: {integrity: sha512-uTX9FBlVQm4S2gVQO1sb5qyBLq/FPjbp+tmGoxu4tIgtYGmBYB44+KX/725RFDe30yBSaA9Ml9fqphe1hbUyLQ==} + engines: {node: ^18.19.0 || >=20.6.0} + peerDependencies: + '@opentelemetry/api': '>=1.3.0 <1.10.0' + + '@opentelemetry/sdk-trace-node@1.30.1': + resolution: {integrity: sha512-cBjYOINt1JxXdpw1e5MlHmFRc5fgj4GW/86vsKFxJCJ8AL4PdVtYH41gWwl4qd4uQjqEL1oJVrXkSy5cnduAnQ==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + + '@opentelemetry/semantic-conventions@1.28.0': + resolution: {integrity: sha512-lp4qAiMTD4sNWW4DbKLBkfiMZ4jbAboJIGOQr5DvciMRI494OapieI9qiODpOt0XBr1LjIDy1xAGAnVs5supTA==} + engines: {node: '>=14'} + + '@opentelemetry/semantic-conventions@1.40.0': + resolution: {integrity: sha512-cifvXDhcqMwwTlTK04GBNeIe7yyo28Mfby85QXFe1Yk8nmi36Ab/5UQwptOx84SsoGNRg+EVSjwzfSZMy6pmlw==} + engines: {node: '>=14'} + + '@opentelemetry/sql-common@0.41.2': + resolution: {integrity: sha512-4mhWm3Z8z+i508zQJ7r6Xi7y4mmoJpdvH0fZPFRkWrdp5fq7hhZ2HhYokEOLkfqSMgPR4Z9EyB3DBkbKGOqZiQ==} + engines: {node: ^18.19.0 || >=20.6.0} + peerDependencies: + '@opentelemetry/api': ^1.1.0 + + '@pinojs/redact@0.4.0': + resolution: {integrity: sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg==} + '@pkgjs/parseargs@0.11.0': resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -1810,10 +2061,6 @@ packages: '@testcontainers/rabbitmq@10.28.0': resolution: {integrity: sha512-Gl8/gAYfRCsjuhTfAIT7/0e49ozMRe05RDFr2CFQWcZDgB4A7qx2QaUqEIhcQnHqRjfEQTWoV1PovnGNZU+dGQ==} - '@tootallnate/once@1.1.2': - resolution: {integrity: sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==} - engines: {node: '>= 6'} - '@tsconfig/node10@1.0.11': resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} @@ -1947,6 +2194,9 @@ packages: '@types/pako@2.0.4': resolution: {integrity: sha512-VWDCbrLeVXJM9fihYodcLiIv0ku+AlOa/TQ1SvYOaBuyrSKgEcro95LJyIsJ4vSo6BXIxOKxiJAat04CmST9Fw==} + '@types/pg-pool@2.0.6': + resolution: {integrity: sha512-TaAUE5rq2VQYxab5Ts7WZhKNmuN78Q6PiFonTDdpbx8a1H0M1vhy3rhiMjl+e2iHmogyMw7jZF4FrE6eJUy5HQ==} + '@types/pg@8.15.2': resolution: {integrity: sha512-+BKxo5mM6+/A1soSHBI7ufUglqYXntChLDyTbvcAn1Lawi9J7J9Ok3jt6w7I0+T/UDJ4CyhHk66+GZbwmkYxSg==} @@ -1985,6 +2235,9 @@ packages: '@types/serve-static@1.15.8': resolution: {integrity: sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg==} + '@types/shimmer@1.2.0': + resolution: {integrity: sha512-UE7oxhQLLd9gub6JKIAhDq06T0F6FnztwMNRvYgjeQSBeMc1ZG/tA47EwfduvkuQS8apbkM/lpLpWsaCeYsXVg==} + '@types/ssh2-streams@0.1.12': resolution: {integrity: sha512-Sy8tpEmCce4Tq0oSOYdfqaBpA3hDM8SoxoFh5vzFsu2oL+znzGz8oVWW7xb4K920yYMUY+PIG31qZnFMfPWNCg==} @@ -2104,8 +2357,9 @@ packages: '@xyflow/system@0.0.74': resolution: {integrity: sha512-7v7B/PkiVrkdZzSbL+inGAo6tkR/WQHHG0/jhSvLQToCsfa8YubOGmBYd1s08tpKpihdHDZFwzQZeR69QSBb4Q==} - abbrev@1.1.1: - resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} + abbrev@4.0.0: + resolution: {integrity: sha512-a1wflyaL0tHtJSmLSOVybYhy22vRih4eduhhrkcjgrWGnRfrZtovJ2FRjxuTtkkj47O/baf0R86QU5OuYpz8fA==} + engines: {node: ^20.17.0 || >=22.9.0} abitype@1.0.8: resolution: {integrity: sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg==} @@ -2129,6 +2383,11 @@ packages: resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==} engines: {node: '>= 0.6'} + acorn-import-attributes@1.9.5: + resolution: {integrity: sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==} + peerDependencies: + acorn: ^8 + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -2148,18 +2407,10 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - agent-base@6.0.2: - resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} - engines: {node: '>= 6.0.0'} - agent-base@7.1.3: resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==} engines: {node: '>= 14'} - agentkeepalive@4.6.0: - resolution: {integrity: sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==} - engines: {node: '>= 8.0.0'} - aggregate-error@3.1.0: resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} engines: {node: '>=8'} @@ -2209,9 +2460,6 @@ packages: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} - aproba@2.0.0: - resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} - archiver-utils@5.0.2: resolution: {integrity: sha512-wuLJMmIBQYCsGZgYLTy5FIB2pF6Lfb6cXMSF8Qywwk3t20zWnAi7zLcQFdKQmIB8wyZpY5ER38x08GbwtR2cLA==} engines: {node: '>= 14'} @@ -2220,11 +2468,6 @@ packages: resolution: {integrity: sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ==} engines: {node: '>= 14'} - are-we-there-yet@3.0.1: - resolution: {integrity: sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - deprecated: This package is no longer supported. - arg@4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} @@ -2441,10 +2684,6 @@ packages: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} - cacache@15.3.0: - resolution: {integrity: sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==} - engines: {node: '>= 10'} - call-bind-apply-helpers@1.0.2: resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} engines: {node: '>= 0.4'} @@ -2506,9 +2745,9 @@ packages: chownr@1.1.4: resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} - chownr@2.0.0: - resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} - engines: {node: '>=10'} + chownr@3.0.0: + resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==} + engines: {node: '>=18'} ci-info@3.9.0: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} @@ -2576,10 +2815,6 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - color-support@1.1.3: - resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} - hasBin: true - colorette@2.0.19: resolution: {integrity: sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==} @@ -2606,9 +2841,6 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - console-control-strings@1.1.0: - resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} - constant-case@3.0.4: resolution: {integrity: sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==} @@ -2774,6 +3006,9 @@ packages: dataloader@2.2.3: resolution: {integrity: sha512-y2krtASINtPFS1rSDjacrFgn1dcUuoREVabwlOGOe4SdxenREqwjwjElAdwvbGM7kgZz9a3KVicWR7vcz8rnzA==} + dateformat@4.6.3: + resolution: {integrity: sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==} + debounce@1.2.1: resolution: {integrity: sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==} @@ -2828,9 +3063,6 @@ packages: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} - delegates@1.0.0: - resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} - depd@2.0.0: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} engines: {node: '>= 0.8'} @@ -2959,9 +3191,6 @@ packages: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} - err-code@2.0.3: - resolution: {integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==} - error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} @@ -3093,6 +3322,9 @@ packages: resolution: {integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + exponential-backoff@3.1.3: + resolution: {integrity: sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA==} + express@5.1.0: resolution: {integrity: sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==} engines: {node: '>= 18'} @@ -3101,6 +3333,9 @@ packages: resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} engines: {node: '>=4'} + fast-copy@4.0.3: + resolution: {integrity: sha512-58apWr0GUiDFM8+3afrO6eYwJBn9ZAhDOzG3L+/9llab/haCARS2UIfffmOurYLwbgDRs8n0rfr6qAAPEAuAQw==} + fast-decode-uri-component@1.0.1: resolution: {integrity: sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==} @@ -3137,6 +3372,9 @@ packages: resolution: {integrity: sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==} engines: {node: '>=6'} + fast-safe-stringify@2.1.1: + resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} + fast-uri@3.0.6: resolution: {integrity: sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==} @@ -3250,6 +3488,9 @@ packages: resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} engines: {node: '>=12.20.0'} + forwarded-parse@2.1.2: + resolution: {integrity: sha512-alTFZZQDKMporBH77856pXgzhEzaUVmLCDk+egLgIgHst3Tpndzz8MnKe+GzRJRfvVdn69HhpW7cmXzvtLvJAw==} + forwarded@0.2.0: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} @@ -3264,10 +3505,6 @@ packages: fs-constants@1.0.0: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} - fs-minipass@2.1.0: - resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} - engines: {node: '>= 8'} - fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} @@ -3279,11 +3516,6 @@ packages: function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - gauge@4.0.4: - resolution: {integrity: sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - deprecated: This package is no longer supported. - gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -3430,9 +3662,6 @@ packages: resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} engines: {node: '>= 0.4'} - has-unicode@2.0.1: - resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} - hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} @@ -3443,6 +3672,9 @@ packages: headers-polyfill@4.0.3: resolution: {integrity: sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==} + help-me@5.0.0: + resolution: {integrity: sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==} + html-escaper@2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} @@ -3450,25 +3682,14 @@ packages: resolution: {integrity: sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==} engines: {node: '>=8.0.0'} - http-cache-semantics@4.2.0: - resolution: {integrity: sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==} - http-errors@2.0.0: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} engines: {node: '>= 0.8'} - http-proxy-agent@4.0.1: - resolution: {integrity: sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==} - engines: {node: '>= 6'} - http-proxy-agent@7.0.2: resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} engines: {node: '>= 14'} - https-proxy-agent@5.0.1: - resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} - engines: {node: '>= 6'} - https-proxy-agent@7.0.6: resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} engines: {node: '>= 14'} @@ -3477,9 +3698,6 @@ packages: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} - humanize-ms@1.2.1: - resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} - iconv-lite@0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} @@ -3514,6 +3732,9 @@ packages: resolution: {integrity: sha512-P9J71vT5nLlDeV8FHs5nNxaLbrpfAV5cF5srvbZfpwpcJoM/xZR3hiv+q+SAnuSmuGbXMWud063iIMx/V/EWZQ==} engines: {node: '>=12.2'} + import-in-the-middle@1.15.0: + resolution: {integrity: sha512-bpQy+CrsRmYmoPMAE/0G33iwRqwW4ouqdRg8jgbH3aKuCtOc8lxgmYXg2dMM92CRiGP660EtBcymH/eVUpCSaA==} + import-local@3.2.0: resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==} engines: {node: '>=8'} @@ -3527,9 +3748,6 @@ packages: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} - infer-owner@1.0.4: - resolution: {integrity: sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==} - inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. @@ -3558,10 +3776,6 @@ packages: iobuffer@5.4.0: resolution: {integrity: sha512-DRebOWuqDvxunfkNJAlc3IzWIPD5xVxwUNbHr7xKB8E6aLJxIPfNX3CoMJghcFjpv6RWQsrcJbghtEwSPoJqMA==} - ip-address@9.0.5: - resolution: {integrity: sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==} - engines: {node: '>= 12'} - ipaddr.js@1.9.1: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} @@ -3608,9 +3822,6 @@ packages: resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} engines: {node: '>=8'} - is-lambda@1.0.1: - resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==} - is-lower-case@2.0.2: resolution: {integrity: sha512-bVcMJy4X5Og6VZfdOZstSexlEy20Sr0k/p/b2IlQJlfdKAQuMpiv5w2Ccxb8sKdRUNAG1PnHVHjFSdRDVS6NlQ==} @@ -3665,6 +3876,10 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + isexe@4.0.0: + resolution: {integrity: sha512-FFUtZMpoZ8RqHS3XeXEmHWLA4thH+ZxCv2lOiPIn1Xc7CxrqhWzNSDzD+/chS/zbYezmiwWLdQC09JdQKmthOw==} + engines: {node: '>=20'} + isomorphic-ws@5.0.0: resolution: {integrity: sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==} peerDependencies: @@ -3851,6 +4066,10 @@ packages: jose@5.10.0: resolution: {integrity: sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg==} + joycon@3.1.1: + resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} + engines: {node: '>=10'} + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -3862,9 +4081,6 @@ packages: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true - jsbn@1.1.0: - resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==} - jsesc@3.1.0: resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} engines: {node: '>=6'} @@ -4064,10 +4280,6 @@ packages: lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} - lru-cache@6.0.0: - resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} - engines: {node: '>=10'} - lucide-react@0.574.0: resolution: {integrity: sha512-dJ8xb5juiZVIbdSn3HTyHsjjIwUwZ4FNwV0RtYDScOyySOeie1oXZTymST6YPJ4Qwt3Po8g4quhYl4OxtACiuQ==} peerDependencies: @@ -4080,10 +4292,6 @@ packages: make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - make-fetch-happen@9.1.0: - resolution: {integrity: sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==} - engines: {node: '>= 10'} - makeerror@1.0.12: resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} @@ -4170,41 +4378,13 @@ packages: minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - minipass-collect@1.0.2: - resolution: {integrity: sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==} - engines: {node: '>= 8'} - - minipass-fetch@1.4.1: - resolution: {integrity: sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==} - engines: {node: '>=8'} - - minipass-flush@1.0.5: - resolution: {integrity: sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==} - engines: {node: '>= 8'} - - minipass-pipeline@1.2.4: - resolution: {integrity: sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==} - engines: {node: '>=8'} - - minipass-sized@1.0.3: - resolution: {integrity: sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==} - engines: {node: '>=8'} - - minipass@3.3.6: - resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} - engines: {node: '>=8'} - - minipass@5.0.0: - resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} - engines: {node: '>=8'} - minipass@7.1.2: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} - minizlib@2.1.2: - resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} - engines: {node: '>= 8'} + minizlib@3.1.0: + resolution: {integrity: sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==} + engines: {node: '>= 18'} mkdirp-classic@0.5.3: resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} @@ -4214,6 +4394,9 @@ packages: engines: {node: '>=10'} hasBin: true + module-details-from-path@1.0.4: + resolution: {integrity: sha512-EGWKgxALGMgzvxYF1UyGTy0HXX/2vHLkw6+NvDKW2jypWbHpjQuj4UMcqQWXHERJhVGKikolT06G3bcKe4fi7w==} + mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -4261,10 +4444,6 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - negotiator@0.6.4: - resolution: {integrity: sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==} - engines: {node: '>= 0.6'} - negotiator@1.0.0: resolution: {integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==} engines: {node: '>= 0.6'} @@ -4294,8 +4473,9 @@ packages: resolution: {integrity: sha512-OhYaY5sDsIka7H7AtijtI9jwGYLyl29eQn/W623DiN/MIv5sUqc4g7BIDThX+gb7di9f6xK02nkp8sdfFWZLTg==} engines: {node: '>=10'} - node-addon-api@7.1.1: - resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==} + node-addon-api@8.7.0: + resolution: {integrity: sha512-9MdFxmkKaOYVTV+XVRG8ArDwwQ77XIgIPyKASB1k3JPq3M8fGQQQE3YpMOrKm6g//Ktx8ivZr8xo1Qmtqub+GA==} + engines: {node: ^18 || ^20 || >= 21} node-domexception@1.0.0: resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} @@ -4315,9 +4495,9 @@ packages: resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - node-gyp@8.4.1: - resolution: {integrity: sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==} - engines: {node: '>= 10.12.0'} + node-gyp@12.3.0: + resolution: {integrity: sha512-QNcUWM+HgJplcPzBvFBZ9VXacyGZ4+VTOb80PwWR+TlVzoHbRKULNEzpRsnaoxG3Wzr7Qh7BYxGDU3CbKib2Yg==} + engines: {node: ^20.17.0 || >=22.9.0} hasBin: true node-int64@0.4.0: @@ -4331,9 +4511,9 @@ packages: engines: {node: '>=10'} hasBin: true - nopt@5.0.0: - resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==} - engines: {node: '>=6'} + nopt@9.0.0: + resolution: {integrity: sha512-Zhq3a+yFKrYwSBluL4H9XP3m3y5uvQkB/09CwDruCiRmR/UJYnn9W4R48ry0uGC70aeTPKLynBtscP9efFFcPw==} + engines: {node: ^20.17.0 || >=22.9.0} hasBin: true normalize-path@2.1.1: @@ -4348,11 +4528,6 @@ packages: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} - npmlog@6.0.2: - resolution: {integrity: sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - deprecated: This package is no longer supported. - nullthrows@1.1.1: resolution: {integrity: sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==} @@ -4401,6 +4576,9 @@ packages: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} + otlp-logger@1.1.13: + resolution: {integrity: sha512-r53tPnMLprtQSMOJUkj4Az4tR8NL+U+8C7M8BV1ZA9y7cDfAbWQp2mRL/eYS/O786oAi9KnN9hKsZ5cFKNchKw==} + outvariant@1.4.3: resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==} @@ -4617,9 +4795,25 @@ packages: pino-abstract-transport@2.0.0: resolution: {integrity: sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw==} + pino-abstract-transport@3.0.0: + resolution: {integrity: sha512-wlfUczU+n7Hy/Ha5j9a/gZNy7We5+cXp8YL+X+PG8S0KXxw7n/JXA3c46Y0zQznIJ83URJiwy7Lh56WLokNuxg==} + + pino-opentelemetry-transport@1.1.0: + resolution: {integrity: sha512-yLOaODDxavgkEJX6ySLGHGjRDaX/xtUs35XHrw1C5U2IRBWKakZHJ8UVrFvDQQ0WxJBRUuChC/Vi2zhynIZXgA==} + peerDependencies: + pino: ^8.21.0 || ^9.0.0 + + pino-pretty@13.1.3: + resolution: {integrity: sha512-ttXRkkOz6WWC95KeY9+xxWL6AtImwbyMHrL1mSwqwW9u+vLp/WIElvHvCSDg0xO/Dzrggz1zv3rN5ovTRVowKg==} + hasBin: true + pino-std-serializers@7.0.0: resolution: {integrity: sha512-e906FRY0+tV27iq4juKzSYPbUj2do2X2JX4EzSca1631EB2QJQUqGbDuERal7LCtOpxl6x3+nvo9NPZcmjkiFA==} + pino@9.14.0: + resolution: {integrity: sha512-8OEwKp5juEvb/MjpIc4hjqfgCNysrS94RIOMXYvpYCdm/jglrKEiAYmiumbmGhCvs+IcInsphYDFwqrjr7398w==} + hasBin: true + pino@9.6.0: resolution: {integrity: sha512-i85pKRCt4qMjZ1+L7sy2Ag4t1atFcdbEt76+7iRJn1g2BvsnRMGu9p8pivl9fs63M2kF/A0OacFZhTub+m/qMg==} hasBin: true @@ -4721,6 +4915,7 @@ packages: prebuild-install@7.1.3: resolution: {integrity: sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==} engines: {node: '>=10'} + deprecated: No longer maintained. Please contact the author of the relevant native addon; alternatives are available. hasBin: true prelude-ls@1.2.1: @@ -4731,6 +4926,10 @@ packages: resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + proc-log@6.1.0: + resolution: {integrity: sha512-iG+GYldRf2BQ0UDUAd6JQ/RwzaQy6mXmsk/IzlYyal4A4SNFw54MeH4/tLkF4I5WoWG9SQwuqWzS99jaFQHBuQ==} + engines: {node: ^20.17.0 || >=22.9.0} + process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} @@ -4744,18 +4943,6 @@ packages: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} engines: {node: '>= 0.6.0'} - promise-inflight@1.0.1: - resolution: {integrity: sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==} - peerDependencies: - bluebird: '*' - peerDependenciesMeta: - bluebird: - optional: true - - promise-retry@2.0.1: - resolution: {integrity: sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==} - engines: {node: '>=10'} - promise@7.3.1: resolution: {integrity: sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==} @@ -4915,6 +5102,10 @@ packages: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} + require-in-the-middle@7.5.2: + resolution: {integrity: sha512-gAZ+kLqBdHarXB64XpAe2VCjB7rIRv+mU8tfRWziHRJ5umKsIHN2tLLv6EtMw7WCdP19S0ERVMldNvxYCHnhSQ==} + engines: {node: '>=8.6.0'} + resolve-cwd@3.0.0: resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} engines: {node: '>=8'} @@ -5040,9 +5231,6 @@ packages: resolution: {integrity: sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==} engines: {node: '>= 18'} - set-blocking@2.0.0: - resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} - set-cookie-parser@2.7.1: resolution: {integrity: sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==} @@ -5064,6 +5252,9 @@ packages: resolution: {integrity: sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==} engines: {node: '>= 0.4'} + shimmer@1.2.1: + resolution: {integrity: sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==} + side-channel-list@1.0.0: resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} engines: {node: '>= 0.4'} @@ -5115,21 +5306,9 @@ packages: resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} engines: {node: '>=10'} - smart-buffer@4.2.0: - resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} - engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} - snake-case@3.0.4: resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} - socks-proxy-agent@6.2.1: - resolution: {integrity: sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ==} - engines: {node: '>= 10'} - - socks@2.8.4: - resolution: {integrity: sha512-D3YaD0aRxR3mEcqnidIs7ReYJFVzWdd6fXJYUM8ixcQcJRGTka/b3saV0KflYhyVJXKhb947GndU35SxYNResQ==} - engines: {node: '>= 10.0.0', npm: '>= 3.0.0'} - sonic-boom@4.2.0: resolution: {integrity: sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww==} @@ -5157,11 +5336,9 @@ packages: sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - sprintf-js@1.1.3: - resolution: {integrity: sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==} - - sqlite3@5.1.7: - resolution: {integrity: sha512-GGIyOiFaG+TUra3JIfkI/zGP8yZYLPQ0pl1bH+ODjiX57sPhrLU5sQJn1y9bDKZUFYkX1crlrPfSYt0BKKdkog==} + sqlite3@6.0.1: + resolution: {integrity: sha512-X0czUUMG2tmSqJpEQa3tCuZSHKIx8PwM53vLZzKp/o6Rpy25fiVfjdbnZ988M8+O3ZWR1ih0K255VumCb3MAnQ==} + engines: {node: '>=20.17.0'} ssh-remote-port-forward@1.0.4: resolution: {integrity: sha512-x0LV1eVDwjf1gmG7TTnfqIzf+3VPRz7vrNIjX6oYLbeCrf/PeVY6hkT68Mg+q02qXxQhrLjB0jfgvhevoCRmLQ==} @@ -5170,10 +5347,6 @@ packages: resolution: {integrity: sha512-r1X4KsBGedJqo7h8F5c4Ybpcr5RjyP+aWIG007uBPRjmdQWfEiVLzSK71Zji1B9sKxwaCvD8y8cwSkYrlLiRRg==} engines: {node: '>=10.16.0'} - ssri@8.0.1: - resolution: {integrity: sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==} - engines: {node: '>= 8'} - stack-utils@2.0.6: resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} engines: {node: '>=10'} @@ -5245,6 +5418,10 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} + strip-json-comments@5.0.3: + resolution: {integrity: sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw==} + engines: {node: '>=14.16'} + styled-jsx@5.1.1: resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==} engines: {node: '>= 12.0.0'} @@ -5290,6 +5467,12 @@ packages: resolution: {integrity: sha512-c7AfkZ9udatCuAy9RSfiGPpeOKKUAUK5e1cXadLOGUjasdxqYqAK0jTNkM/FSEyJ3a5Ra27j/tw/PS0qLmaF/A==} engines: {node: '>=18'} + systeminformation@5.23.8: + resolution: {integrity: sha512-Osd24mNKe6jr/YoXLLK3k8TMdzaxDffhpCxgkfgBHcapykIkd50HXThM3TCEuHO2pPuCsSx2ms/SunqhU5MmsQ==} + engines: {node: '>=8.0.0'} + os: [darwin, linux, win32, freebsd, openbsd, netbsd, sunos, android] + hasBin: true + tagged-tag@1.0.0: resolution: {integrity: sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==} engines: {node: '>=20'} @@ -5320,10 +5503,9 @@ packages: tar-stream@3.1.7: resolution: {integrity: sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==} - tar@6.2.1: - resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} - engines: {node: '>=10'} - deprecated: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me + tar@7.5.13: + resolution: {integrity: sha512-tOG/7GyXpFevhXVh8jOPJrmtRpOTsYqUIkVdVooZYJS/z8WhfQUX8RJILmeuJNinGAMSu1veBr4asSHFt5/hng==} + engines: {node: '>=18'} tarn@3.0.2: resolution: {integrity: sha512-51LAVKUSZSVfI05vjPESNc5vwqqZpbXCsU+/+wxlOrUjk2SnFTt97v9ZgQrD4YmxYW1Px6w2KjaDitCfkvgxMQ==} @@ -5572,11 +5754,6 @@ packages: resolution: {integrity: sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==} engines: {node: '>= 0.6'} - typescript@4.9.5: - resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} - engines: {node: '>=4.2.0'} - hasBin: true - typescript@5.8.2: resolution: {integrity: sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==} engines: {node: '>=14.17'} @@ -5611,11 +5788,9 @@ packages: resolution: {integrity: sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==} engines: {node: '>=14.0'} - unique-filename@1.1.1: - resolution: {integrity: sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==} - - unique-slug@2.0.2: - resolution: {integrity: sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==} + undici@6.25.0: + resolution: {integrity: sha512-ZgpWDC5gmNiuY9CnLVXEH8rl50xhRCuLNA97fAUnKi8RRuV4E6KG31pDTsLVUKnohJE0I3XDrTeEydAXRw47xg==} + engines: {node: '>=18.17'} unixify@1.0.0: resolution: {integrity: sha512-6bc58dPYhCMHHuwxldQxO3RRNZ4eCogZ/st++0+fcC1nr0jiGUtAdBJ2qzmLQWSxbtz42pWt4QQMiZ9HvZf5cg==} @@ -5712,8 +5887,10 @@ packages: engines: {node: '>= 8'} hasBin: true - wide-align@1.1.5: - resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} + which@6.0.1: + resolution: {integrity: sha512-oGLe46MIrCRqX7ytPUf66EAYvdeMIZYn3WaocqqKZAxrBpkqHfL/qvTyJ/bTk5+AqHCjXmrv3CEWgy368zhRUg==} + engines: {node: ^20.17.0 || >=22.9.0} + hasBin: true word-wrap@1.2.5: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} @@ -5761,8 +5938,9 @@ packages: yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} - yallist@4.0.0: - resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + yallist@5.0.0: + resolution: {integrity: sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==} + engines: {node: '>=18'} yaml-ast-parser@0.0.43: resolution: {integrity: sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==} @@ -5830,6 +6008,27 @@ snapshots: '@jridgewell/gen-mapping': 0.3.8 '@jridgewell/trace-mapping': 0.3.25 + '@anticapture/observability@1.0.1(@opentelemetry/api@1.9.1)(pino-pretty@13.1.3)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-prometheus': 0.57.2(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-trace-otlp-http': 0.57.2(@opentelemetry/api@1.9.1) + '@opentelemetry/host-metrics': 0.35.5(@opentelemetry/api@1.9.1) + '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.1) + '@opentelemetry/instrumentation-http': 0.57.2(@opentelemetry/api@1.9.1) + '@opentelemetry/instrumentation-pg': 0.57.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-metrics': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace-node': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/semantic-conventions': 1.40.0 + pino: 9.14.0 + pino-opentelemetry-transport: 1.1.0(@opentelemetry/api@1.9.1)(pino@9.14.0) + optionalDependencies: + pino-pretty: 13.1.3 + transitivePeerDependencies: + - supports-color + '@ardatan/relay-compiler@12.0.3(encoding@0.1.13)(graphql@16.11.0)': dependencies: '@babel/generator': 7.27.1 @@ -6234,9 +6433,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@gar/promisify@1.1.3': - optional: true - '@graphql-codegen/add@5.0.3(graphql@16.11.0)': dependencies: '@graphql-codegen/plugin-helpers': 5.1.1(graphql@16.11.0) @@ -6740,6 +6936,10 @@ snapshots: wrap-ansi: 8.1.0 wrap-ansi-cjs: wrap-ansi@7.0.0 + '@isaacs/fs-minipass@4.0.1': + dependencies: + minipass: 7.1.2 + '@istanbuljs/load-nyc-config@1.1.0': dependencies: camelcase: 5.3.1 @@ -6759,7 +6959,7 @@ snapshots: jest-util: 29.7.0 slash: 3.0.0 - '@jest/core@29.7.0(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@4.9.5))': + '@jest/core@29.7.0(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@5.8.3))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 @@ -6773,7 +6973,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.17.46)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@4.9.5)) + jest-config: 29.7.0(@types/node@20.17.46)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@5.8.3)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -7105,18 +7305,6 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.19.1 - '@npmcli/fs@1.1.1': - dependencies: - '@gar/promisify': 1.1.3 - semver: 7.7.1 - optional: true - - '@npmcli/move-file@1.1.2': - dependencies: - mkdirp: 1.0.4 - rimraf: 3.0.2 - optional: true - '@open-draft/deferred-promise@2.2.0': {} '@open-draft/logger@0.3.0': @@ -7126,14 +7314,273 @@ snapshots: '@open-draft/until@2.1.0': {} - '@pkgjs/parseargs@0.11.0': - optional: true + '@opentelemetry/api-logs@0.204.0': + dependencies: + '@opentelemetry/api': 1.9.1 - '@protobufjs/aspromise@1.1.2': {} + '@opentelemetry/api-logs@0.206.0': + dependencies: + '@opentelemetry/api': 1.9.1 - '@protobufjs/base64@1.1.2': {} + '@opentelemetry/api-logs@0.57.2': + dependencies: + '@opentelemetry/api': 1.9.1 - '@protobufjs/codegen@2.0.4': {} + '@opentelemetry/api@1.9.1': {} + + '@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + + '@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/semantic-conventions': 1.28.0 + + '@opentelemetry/core@2.1.0(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/semantic-conventions': 1.40.0 + + '@opentelemetry/core@2.7.0(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/semantic-conventions': 1.40.0 + + '@opentelemetry/exporter-logs-otlp-grpc@0.206.0(@opentelemetry/api@1.9.1)': + dependencies: + '@grpc/grpc-js': 1.13.4 + '@opentelemetry/api': 1.9.1 + '@opentelemetry/core': 2.1.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.206.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-grpc-exporter-base': 0.206.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.206.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-logs': 0.206.0(@opentelemetry/api@1.9.1) + + '@opentelemetry/exporter-logs-otlp-http@0.206.0(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/api-logs': 0.206.0 + '@opentelemetry/core': 2.1.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.206.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.206.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-logs': 0.206.0(@opentelemetry/api@1.9.1) + + '@opentelemetry/exporter-logs-otlp-proto@0.206.0(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/api-logs': 0.206.0 + '@opentelemetry/core': 2.1.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.206.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.206.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.1.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-logs': 0.206.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace-base': 2.1.0(@opentelemetry/api@1.9.1) + + '@opentelemetry/exporter-prometheus@0.57.2(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-metrics': 1.30.1(@opentelemetry/api@1.9.1) + + '@opentelemetry/exporter-trace-otlp-http@0.57.2(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.57.2(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.57.2(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace-base': 1.30.1(@opentelemetry/api@1.9.1) + + '@opentelemetry/host-metrics@0.35.5(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + systeminformation: 5.23.8 + + '@opentelemetry/instrumentation-http@0.57.2(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.1) + '@opentelemetry/semantic-conventions': 1.28.0 + forwarded-parse: 2.1.2 + semver: 7.7.1 + transitivePeerDependencies: + - supports-color + + '@opentelemetry/instrumentation-pg@0.57.0(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/core': 2.7.0(@opentelemetry/api@1.9.1) + '@opentelemetry/instrumentation': 0.204.0(@opentelemetry/api@1.9.1) + '@opentelemetry/semantic-conventions': 1.40.0 + '@opentelemetry/sql-common': 0.41.2(@opentelemetry/api@1.9.1) + '@types/pg': 8.15.5 + '@types/pg-pool': 2.0.6 + transitivePeerDependencies: + - supports-color + + '@opentelemetry/instrumentation@0.204.0(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/api-logs': 0.204.0 + import-in-the-middle: 1.15.0 + require-in-the-middle: 7.5.2 + transitivePeerDependencies: + - supports-color + + '@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/api-logs': 0.57.2 + '@types/shimmer': 1.2.0 + import-in-the-middle: 1.15.0 + require-in-the-middle: 7.5.2 + semver: 7.7.1 + shimmer: 1.2.1 + transitivePeerDependencies: + - supports-color + + '@opentelemetry/otlp-exporter-base@0.206.0(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/core': 2.1.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.206.0(@opentelemetry/api@1.9.1) + + '@opentelemetry/otlp-exporter-base@0.57.2(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.57.2(@opentelemetry/api@1.9.1) + + '@opentelemetry/otlp-grpc-exporter-base@0.206.0(@opentelemetry/api@1.9.1)': + dependencies: + '@grpc/grpc-js': 1.13.4 + '@opentelemetry/api': 1.9.1 + '@opentelemetry/core': 2.1.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.206.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.206.0(@opentelemetry/api@1.9.1) + + '@opentelemetry/otlp-transformer@0.206.0(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/api-logs': 0.206.0 + '@opentelemetry/core': 2.1.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.1.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-logs': 0.206.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-metrics': 2.1.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace-base': 2.1.0(@opentelemetry/api@1.9.1) + protobufjs: 7.5.3 + + '@opentelemetry/otlp-transformer@0.57.2(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/api-logs': 0.57.2 + '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-logs': 0.57.2(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-metrics': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace-base': 1.30.1(@opentelemetry/api@1.9.1) + protobufjs: 7.5.3 + + '@opentelemetry/propagator-b3@1.30.1(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.1) + + '@opentelemetry/propagator-jaeger@1.30.1(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.1) + + '@opentelemetry/resources@1.30.1(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/semantic-conventions': 1.28.0 + + '@opentelemetry/resources@2.1.0(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/core': 2.1.0(@opentelemetry/api@1.9.1) + '@opentelemetry/semantic-conventions': 1.40.0 + + '@opentelemetry/resources@2.7.0(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/core': 2.7.0(@opentelemetry/api@1.9.1) + '@opentelemetry/semantic-conventions': 1.40.0 + + '@opentelemetry/sdk-logs@0.206.0(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/api-logs': 0.206.0 + '@opentelemetry/core': 2.1.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.1.0(@opentelemetry/api@1.9.1) + + '@opentelemetry/sdk-logs@0.57.2(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/api-logs': 0.57.2 + '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 1.30.1(@opentelemetry/api@1.9.1) + + '@opentelemetry/sdk-metrics@1.30.1(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 1.30.1(@opentelemetry/api@1.9.1) + + '@opentelemetry/sdk-metrics@2.1.0(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/core': 2.1.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.1.0(@opentelemetry/api@1.9.1) + + '@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/semantic-conventions': 1.28.0 + + '@opentelemetry/sdk-trace-base@2.1.0(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/core': 2.1.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.1.0(@opentelemetry/api@1.9.1) + '@opentelemetry/semantic-conventions': 1.40.0 + + '@opentelemetry/sdk-trace-node@1.30.1(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/context-async-hooks': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/propagator-b3': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/propagator-jaeger': 1.30.1(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace-base': 1.30.1(@opentelemetry/api@1.9.1) + semver: 7.7.1 + + '@opentelemetry/semantic-conventions@1.28.0': {} + + '@opentelemetry/semantic-conventions@1.40.0': {} + + '@opentelemetry/sql-common@0.41.2(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/core': 2.7.0(@opentelemetry/api@1.9.1) + + '@pinojs/redact@0.4.0': {} + + '@pkgjs/parseargs@0.11.0': + optional: true + + '@protobufjs/aspromise@1.1.2': {} + + '@protobufjs/base64@1.1.2': {} + + '@protobufjs/codegen@2.0.4': {} '@protobufjs/eventemitter@1.1.0': {} @@ -7445,9 +7892,6 @@ snapshots: - bare-buffer - supports-color - '@tootallnate/once@1.1.2': - optional: true - '@tsconfig/node10@1.0.11': {} '@tsconfig/node12@1.0.11': {} @@ -7614,6 +8058,10 @@ snapshots: '@types/pako@2.0.4': {} + '@types/pg-pool@2.0.6': + dependencies: + '@types/pg': 8.15.5 + '@types/pg@8.15.2': dependencies: '@types/node': 20.17.46 @@ -7659,6 +8107,8 @@ snapshots: '@types/node': 20.17.46 '@types/send': 0.17.5 + '@types/shimmer@1.2.0': {} + '@types/ssh2-streams@0.1.12': dependencies: '@types/node': 20.17.46 @@ -7693,34 +8143,34 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5)': + '@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 5.62.0(eslint@8.57.1)(typescript@4.9.5) + '@typescript-eslint/parser': 5.62.0(eslint@8.57.1)(typescript@5.8.3) '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/type-utils': 5.62.0(eslint@8.57.1)(typescript@4.9.5) - '@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@4.9.5) + '@typescript-eslint/type-utils': 5.62.0(eslint@8.57.1)(typescript@5.8.3) + '@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@5.8.3) debug: 4.4.0(supports-color@5.5.0) eslint: 8.57.1 graphemer: 1.4.0 ignore: 5.3.2 natural-compare-lite: 1.4.0 semver: 7.7.1 - tsutils: 3.21.0(typescript@4.9.5) + tsutils: 3.21.0(typescript@5.8.3) optionalDependencies: - typescript: 4.9.5 + typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@4.9.5)': + '@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.8.3)': dependencies: '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0(typescript@4.9.5) + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.8.3) debug: 4.4.0(supports-color@5.5.0) eslint: 8.57.1 optionalDependencies: - typescript: 4.9.5 + typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -7729,21 +8179,21 @@ snapshots: '@typescript-eslint/types': 5.62.0 '@typescript-eslint/visitor-keys': 5.62.0 - '@typescript-eslint/type-utils@5.62.0(eslint@8.57.1)(typescript@4.9.5)': + '@typescript-eslint/type-utils@5.62.0(eslint@8.57.1)(typescript@5.8.3)': dependencies: - '@typescript-eslint/typescript-estree': 5.62.0(typescript@4.9.5) - '@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@4.9.5) + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.8.3) + '@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@5.8.3) debug: 4.4.0(supports-color@5.5.0) eslint: 8.57.1 - tsutils: 3.21.0(typescript@4.9.5) + tsutils: 3.21.0(typescript@5.8.3) optionalDependencies: - typescript: 4.9.5 + typescript: 5.8.3 transitivePeerDependencies: - supports-color '@typescript-eslint/types@5.62.0': {} - '@typescript-eslint/typescript-estree@5.62.0(typescript@4.9.5)': + '@typescript-eslint/typescript-estree@5.62.0(typescript@5.8.3)': dependencies: '@typescript-eslint/types': 5.62.0 '@typescript-eslint/visitor-keys': 5.62.0 @@ -7751,20 +8201,20 @@ snapshots: globby: 11.1.0 is-glob: 4.0.3 semver: 7.7.1 - tsutils: 3.21.0(typescript@4.9.5) + tsutils: 3.21.0(typescript@5.8.3) optionalDependencies: - typescript: 4.9.5 + typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@5.62.0(eslint@8.57.1)(typescript@4.9.5)': + '@typescript-eslint/utils@5.62.0(eslint@8.57.1)(typescript@5.8.3)': dependencies: '@eslint-community/eslint-utils': 4.7.0(eslint@8.57.1) '@types/json-schema': 7.0.15 '@types/semver': 7.7.0 '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0(typescript@4.9.5) + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.8.3) eslint: 8.57.1 eslint-scope: 5.1.1 semver: 7.7.1 @@ -7823,14 +8273,9 @@ snapshots: d3-selection: 3.0.0 d3-zoom: 3.0.0 - abbrev@1.1.1: + abbrev@4.0.0: optional: true - abitype@1.0.8(typescript@4.9.5)(zod@3.24.3): - optionalDependencies: - typescript: 4.9.5 - zod: 3.24.3 - abitype@1.0.8(typescript@5.8.2)(zod@3.24.3): optionalDependencies: typescript: 5.8.2 @@ -7852,9 +8297,13 @@ snapshots: mime-types: 3.0.1 negotiator: 1.0.0 - acorn-jsx@5.3.2(acorn@8.14.1): + acorn-import-attributes@1.9.5(acorn@8.15.0): dependencies: - acorn: 8.14.1 + acorn: 8.15.0 + + acorn-jsx@5.3.2(acorn@8.15.0): + dependencies: + acorn: 8.15.0 acorn-walk@8.3.4: dependencies: @@ -7864,20 +8313,8 @@ snapshots: acorn@8.15.0: {} - agent-base@6.0.2: - dependencies: - debug: 4.4.0(supports-color@5.5.0) - transitivePeerDependencies: - - supports-color - optional: true - agent-base@7.1.3: {} - agentkeepalive@4.6.0: - dependencies: - humanize-ms: 1.2.1 - optional: true - aggregate-error@3.1.0: dependencies: clean-stack: 2.2.0 @@ -7924,9 +8361,6 @@ snapshots: normalize-path: 3.0.0 picomatch: 2.3.1 - aproba@2.0.0: - optional: true - archiver-utils@5.0.2: dependencies: glob: 10.4.5 @@ -7947,12 +8381,6 @@ snapshots: tar-stream: 3.1.7 zip-stream: 6.0.1 - are-we-there-yet@3.0.1: - dependencies: - delegates: 1.0.0 - readable-stream: 3.6.2 - optional: true - arg@4.1.3: {} arg@5.0.2: {} @@ -8203,30 +8631,6 @@ snapshots: bytes@3.1.2: {} - cacache@15.3.0: - dependencies: - '@npmcli/fs': 1.1.1 - '@npmcli/move-file': 1.1.2 - chownr: 2.0.0 - fs-minipass: 2.1.0 - glob: 7.2.3 - infer-owner: 1.0.4 - lru-cache: 6.0.0 - minipass: 3.3.6 - minipass-collect: 1.0.2 - minipass-flush: 1.0.5 - minipass-pipeline: 1.2.4 - mkdirp: 1.0.4 - p-map: 4.0.0 - promise-inflight: 1.0.1 - rimraf: 3.0.2 - ssri: 8.0.1 - tar: 6.2.1 - unique-filename: 1.1.1 - transitivePeerDependencies: - - bluebird - optional: true - call-bind-apply-helpers@1.0.2: dependencies: es-errors: 1.3.0 @@ -8321,7 +8725,7 @@ snapshots: chownr@1.1.4: {} - chownr@2.0.0: {} + chownr@3.0.0: {} ci-info@3.9.0: {} @@ -8372,9 +8776,6 @@ snapshots: color-name@1.1.4: {} - color-support@1.1.3: - optional: true - colorette@2.0.19: {} combined-stream@1.0.8: @@ -8397,9 +8798,6 @@ snapshots: concat-map@0.0.1: {} - console-control-strings@1.1.0: - optional: true - constant-case@3.0.4: dependencies: no-case: 3.0.4 @@ -8451,13 +8849,13 @@ snapshots: crc-32: 1.2.2 readable-stream: 4.7.0 - create-jest@29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@4.9.5)): + create-jest@29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@5.8.3)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@4.9.5)) + jest-config: 29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@5.8.3)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -8607,6 +9005,8 @@ snapshots: dataloader@2.2.3: {} + dateformat@4.6.3: {} + debounce@1.2.1: {} debug@4.3.4: @@ -8639,9 +9039,6 @@ snapshots: delayed-stream@1.0.0: {} - delegates@1.0.0: - optional: true - depd@2.0.0: {} dependency-graph@0.11.0: {} @@ -8763,9 +9160,6 @@ snapshots: env-paths@2.2.1: optional: true - err-code@2.0.3: - optional: true - error-ex@1.3.2: dependencies: is-arrayish: 0.2.1 @@ -8882,8 +9276,8 @@ snapshots: espree@9.6.1: dependencies: - acorn: 8.14.1 - acorn-jsx: 5.3.2(acorn@8.14.1) + acorn: 8.15.0 + acorn-jsx: 5.3.2(acorn@8.15.0) eslint-visitor-keys: 3.4.3 esprima@4.0.1: {} @@ -8938,6 +9332,9 @@ snapshots: jest-message-util: 29.7.0 jest-util: 29.7.0 + exponential-backoff@3.1.3: + optional: true + express@5.1.0: dependencies: accepts: 2.0.0 @@ -8976,6 +9373,8 @@ snapshots: iconv-lite: 0.4.24 tmp: 0.0.33 + fast-copy@4.0.3: {} + fast-decode-uri-component@1.0.1: {} fast-deep-equal@3.1.3: {} @@ -9017,6 +9416,8 @@ snapshots: fast-redact@3.5.0: {} + fast-safe-stringify@2.1.1: {} + fast-uri@3.0.6: {} fastify-plugin@5.0.1: {} @@ -9167,6 +9568,8 @@ snapshots: dependencies: fetch-blob: 3.2.0 + forwarded-parse@2.1.2: {} + forwarded@0.2.0: {} fraction.js@5.3.4: {} @@ -9175,10 +9578,6 @@ snapshots: fs-constants@1.0.0: {} - fs-minipass@2.1.0: - dependencies: - minipass: 3.3.6 - fs.realpath@1.0.0: {} fsevents@2.3.3: @@ -9186,18 +9585,6 @@ snapshots: function-bind@1.1.2: {} - gauge@4.0.4: - dependencies: - aproba: 2.0.0 - color-support: 1.1.3 - console-control-strings: 1.1.0 - has-unicode: 2.0.1 - signal-exit: 3.0.7 - string-width: 4.2.3 - strip-ansi: 6.0.1 - wide-align: 1.1.5 - optional: true - gensync@1.0.0-beta.2: {} get-caller-file@2.0.5: {} @@ -9346,9 +9733,6 @@ snapshots: dependencies: has-symbols: 1.1.0 - has-unicode@2.0.1: - optional: true - hasown@2.0.2: dependencies: function-bind: 1.1.2 @@ -9360,6 +9744,8 @@ snapshots: headers-polyfill@4.0.3: {} + help-me@5.0.0: {} + html-escaper@2.0.2: {} html2canvas@1.4.1: @@ -9367,9 +9753,6 @@ snapshots: css-line-break: 2.1.0 text-segmentation: 1.0.3 - http-cache-semantics@4.2.0: - optional: true - http-errors@2.0.0: dependencies: depd: 2.0.0 @@ -9378,15 +9761,6 @@ snapshots: statuses: 2.0.1 toidentifier: 1.0.1 - http-proxy-agent@4.0.1: - dependencies: - '@tootallnate/once': 1.1.2 - agent-base: 6.0.2 - debug: 4.4.0(supports-color@5.5.0) - transitivePeerDependencies: - - supports-color - optional: true - http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.3 @@ -9394,14 +9768,6 @@ snapshots: transitivePeerDependencies: - supports-color - https-proxy-agent@5.0.1: - dependencies: - agent-base: 6.0.2 - debug: 4.4.0(supports-color@5.5.0) - transitivePeerDependencies: - - supports-color - optional: true - https-proxy-agent@7.0.6: dependencies: agent-base: 7.1.3 @@ -9411,11 +9777,6 @@ snapshots: human-signals@2.1.0: {} - humanize-ms@1.2.1: - dependencies: - ms: 2.1.3 - optional: true - iconv-lite@0.4.24: dependencies: safer-buffer: 2.1.2 @@ -9443,6 +9804,13 @@ snapshots: import-from@4.0.0: {} + import-in-the-middle@1.15.0: + dependencies: + acorn: 8.15.0 + acorn-import-attributes: 1.9.5(acorn@8.15.0) + cjs-module-lexer: 1.4.3 + module-details-from-path: 1.0.4 + import-local@3.2.0: dependencies: pkg-dir: 4.2.0 @@ -9452,9 +9820,6 @@ snapshots: indent-string@4.0.0: {} - infer-owner@1.0.4: - optional: true - inflight@1.0.6: dependencies: once: 1.4.0 @@ -9492,12 +9857,6 @@ snapshots: iobuffer@5.4.0: {} - ip-address@9.0.5: - dependencies: - jsbn: 1.1.0 - sprintf-js: 1.1.3 - optional: true - ipaddr.js@1.9.1: {} ipaddr.js@2.2.0: {} @@ -9531,9 +9890,6 @@ snapshots: is-interactive@1.0.0: {} - is-lambda@1.0.1: - optional: true - is-lower-case@2.0.2: dependencies: tslib: 2.8.1 @@ -9572,6 +9928,9 @@ snapshots: isexe@2.0.0: {} + isexe@4.0.0: + optional: true + isomorphic-ws@5.0.0(ws@8.18.3): dependencies: ws: 8.18.3 @@ -9670,16 +10029,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@4.9.5)): + jest-cli@29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@5.8.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@4.9.5)) + '@jest/core': 29.7.0(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@5.8.3)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@4.9.5)) + create-jest: 29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@5.8.3)) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@4.9.5)) + jest-config: 29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@5.8.3)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -9746,7 +10105,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@4.9.5)): + jest-config@29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@5.8.3)): dependencies: '@babel/core': 7.27.1 '@jest/test-sequencer': 29.7.0 @@ -9772,12 +10131,12 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 18.19.101 - ts-node: 10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@4.9.5) + ts-node: 10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@5.8.3) transitivePeerDependencies: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@20.17.46)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@4.9.5)): + jest-config@29.7.0(@types/node@20.17.46)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@5.8.3)): dependencies: '@babel/core': 7.27.1 '@jest/test-sequencer': 29.7.0 @@ -9803,7 +10162,7 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 20.17.46 - ts-node: 10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@4.9.5) + ts-node: 10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@5.8.3) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -10147,12 +10506,12 @@ snapshots: merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@4.9.5)): + jest@29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@5.8.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@4.9.5)) + '@jest/core': 29.7.0(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@5.8.3)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@4.9.5)) + jest-cli: 29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@5.8.3)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -10201,6 +10560,8 @@ snapshots: jose@5.10.0: {} + joycon@3.1.1: {} + js-tokens@4.0.0: {} js-yaml@3.14.1: @@ -10212,9 +10573,6 @@ snapshots: dependencies: argparse: 2.0.1 - jsbn@1.1.0: - optional: true - jsesc@3.1.0: {} json-buffer@3.0.1: {} @@ -10315,7 +10673,7 @@ snapshots: transitivePeerDependencies: - supports-color - knex@3.1.0(pg@8.16.3)(sqlite3@5.1.7): + knex@3.1.0(pg@8.16.3)(sqlite3@6.0.1): dependencies: colorette: 2.0.19 commander: 10.0.1 @@ -10333,7 +10691,7 @@ snapshots: tildify: 2.0.0 optionalDependencies: pg: 8.16.3 - sqlite3: 5.1.7 + sqlite3: 6.0.1 transitivePeerDependencies: - supports-color @@ -10435,11 +10793,6 @@ snapshots: dependencies: yallist: 3.1.1 - lru-cache@6.0.0: - dependencies: - yallist: 4.0.0 - optional: true - lucide-react@0.574.0(react@18.3.1): dependencies: react: 18.3.1 @@ -10450,29 +10803,6 @@ snapshots: make-error@1.3.6: {} - make-fetch-happen@9.1.0: - dependencies: - agentkeepalive: 4.6.0 - cacache: 15.3.0 - http-cache-semantics: 4.2.0 - http-proxy-agent: 4.0.1 - https-proxy-agent: 5.0.1 - is-lambda: 1.0.1 - lru-cache: 6.0.0 - minipass: 3.3.6 - minipass-collect: 1.0.2 - minipass-fetch: 1.4.1 - minipass-flush: 1.0.5 - minipass-pipeline: 1.2.4 - negotiator: 0.6.4 - promise-retry: 2.0.1 - socks-proxy-agent: 6.2.1 - ssri: 8.0.1 - transitivePeerDependencies: - - bluebird - - supports-color - optional: true - makeerror@1.0.12: dependencies: tmpl: 1.0.5 @@ -10534,52 +10864,18 @@ snapshots: minimist@1.2.8: {} - minipass-collect@1.0.2: - dependencies: - minipass: 3.3.6 - optional: true - - minipass-fetch@1.4.1: - dependencies: - minipass: 3.3.6 - minipass-sized: 1.0.3 - minizlib: 2.1.2 - optionalDependencies: - encoding: 0.1.13 - optional: true - - minipass-flush@1.0.5: - dependencies: - minipass: 3.3.6 - optional: true - - minipass-pipeline@1.2.4: - dependencies: - minipass: 3.3.6 - optional: true - - minipass-sized@1.0.3: - dependencies: - minipass: 3.3.6 - optional: true - - minipass@3.3.6: - dependencies: - yallist: 4.0.0 - - minipass@5.0.0: {} - minipass@7.1.2: {} - minizlib@2.1.2: + minizlib@3.1.0: dependencies: - minipass: 3.3.6 - yallist: 4.0.0 + minipass: 7.1.2 mkdirp-classic@0.5.3: {} mkdirp@1.0.4: {} + module-details-from-path@1.0.4: {} + mri@1.2.0: {} ms@2.1.2: {} @@ -10632,12 +10928,9 @@ snapshots: natural-compare@1.4.0: {} - negotiator@0.6.4: - optional: true - negotiator@1.0.0: {} - next@14.2.35(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next@14.2.35(@opentelemetry/api@1.9.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@next/env': 14.2.35 '@swc/helpers': 0.5.5 @@ -10658,6 +10951,7 @@ snapshots: '@next/swc-win32-arm64-msvc': 14.2.33 '@next/swc-win32-ia32-msvc': 14.2.33 '@next/swc-win32-x64-msvc': 14.2.33 + '@opentelemetry/api': 1.9.1 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros @@ -10671,7 +10965,7 @@ snapshots: dependencies: semver: 7.7.1 - node-addon-api@7.1.1: {} + node-addon-api@8.7.0: {} node-domexception@1.0.0: {} @@ -10687,21 +10981,18 @@ snapshots: fetch-blob: 3.2.0 formdata-polyfill: 4.0.10 - node-gyp@8.4.1: + node-gyp@12.3.0: dependencies: env-paths: 2.2.1 - glob: 7.2.3 + exponential-backoff: 3.1.3 graceful-fs: 4.2.11 - make-fetch-happen: 9.1.0 - nopt: 5.0.0 - npmlog: 6.0.2 - rimraf: 3.0.2 + nopt: 9.0.0 + proc-log: 6.1.0 semver: 7.7.1 - tar: 6.2.1 - which: 2.0.2 - transitivePeerDependencies: - - bluebird - - supports-color + tar: 7.5.13 + tinyglobby: 0.2.15 + undici: 6.25.0 + which: 6.0.1 optional: true node-int64@0.4.0: {} @@ -10721,9 +11012,9 @@ snapshots: touch: 3.1.1 undefsafe: 2.0.5 - nopt@5.0.0: + nopt@9.0.0: dependencies: - abbrev: 1.1.1 + abbrev: 4.0.0 optional: true normalize-path@2.1.1: @@ -10736,14 +11027,6 @@ snapshots: dependencies: path-key: 3.1.1 - npmlog@6.0.2: - dependencies: - are-we-there-yet: 3.0.1 - console-control-strings: 1.1.0 - gauge: 4.0.4 - set-blocking: 2.0.0 - optional: true - nullthrows@1.1.1: {} object-assign@4.1.1: {} @@ -10793,22 +11076,18 @@ snapshots: os-tmpdir@1.0.2: {} - outvariant@1.4.3: {} - - ox@0.8.7(typescript@4.9.5)(zod@3.24.3): + otlp-logger@1.1.13(@opentelemetry/api@1.9.1): dependencies: - '@adraffy/ens-normalize': 1.11.0 - '@noble/ciphers': 1.3.0 - '@noble/curves': 1.9.6 - '@noble/hashes': 1.8.0 - '@scure/bip32': 1.7.0 - '@scure/bip39': 1.6.0 - abitype: 1.0.8(typescript@4.9.5)(zod@3.24.3) - eventemitter3: 5.0.1 - optionalDependencies: - typescript: 4.9.5 + '@opentelemetry/api-logs': 0.206.0 + '@opentelemetry/exporter-logs-otlp-grpc': 0.206.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-logs-otlp-http': 0.206.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-logs-otlp-proto': 0.206.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.7.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-logs': 0.206.0(@opentelemetry/api@1.9.1) transitivePeerDependencies: - - zod + - '@opentelemetry/api' + + outvariant@1.4.3: {} ox@0.8.7(typescript@5.8.2)(zod@3.24.3): dependencies: @@ -11033,8 +11312,50 @@ snapshots: dependencies: split2: 4.2.0 + pino-abstract-transport@3.0.0: + dependencies: + split2: 4.2.0 + + pino-opentelemetry-transport@1.1.0(@opentelemetry/api@1.9.1)(pino@9.14.0): + dependencies: + otlp-logger: 1.1.13(@opentelemetry/api@1.9.1) + pino: 9.14.0 + pino-abstract-transport: 2.0.0 + transitivePeerDependencies: + - '@opentelemetry/api' + + pino-pretty@13.1.3: + dependencies: + colorette: 2.0.19 + dateformat: 4.6.3 + fast-copy: 4.0.3 + fast-safe-stringify: 2.1.1 + help-me: 5.0.0 + joycon: 3.1.1 + minimist: 1.2.8 + on-exit-leak-free: 2.1.2 + pino-abstract-transport: 3.0.0 + pump: 3.0.2 + secure-json-parse: 4.0.0 + sonic-boom: 4.2.0 + strip-json-comments: 5.0.3 + pino-std-serializers@7.0.0: {} + pino@9.14.0: + dependencies: + '@pinojs/redact': 0.4.0 + atomic-sleep: 1.0.0 + on-exit-leak-free: 2.1.2 + pino-abstract-transport: 2.0.0 + pino-std-serializers: 7.0.0 + process-warning: 5.0.0 + quick-format-unescaped: 4.0.4 + real-require: 0.2.0 + safe-stable-stringify: 2.5.0 + sonic-boom: 4.2.0 + thread-stream: 3.1.0 + pino@9.6.0: dependencies: atomic-sleep: 1.0.0 @@ -11145,6 +11466,9 @@ snapshots: ansi-styles: 5.2.0 react-is: 18.3.1 + proc-log@6.1.0: + optional: true + process-nextick-args@2.0.1: {} process-warning@4.0.1: {} @@ -11153,15 +11477,6 @@ snapshots: process@0.11.10: {} - promise-inflight@1.0.1: - optional: true - - promise-retry@2.0.1: - dependencies: - err-code: 2.0.3 - retry: 0.12.0 - optional: true - promise@7.3.1: dependencies: asap: 2.0.6 @@ -11362,6 +11677,14 @@ snapshots: require-from-string@2.0.2: {} + require-in-the-middle@7.5.2: + dependencies: + debug: 4.4.0(supports-color@5.5.0) + module-details-from-path: 1.0.4 + resolve: 1.22.10 + transitivePeerDependencies: + - supports-color + resolve-cwd@3.0.0: dependencies: resolve-from: 5.0.0 @@ -11485,9 +11808,6 @@ snapshots: transitivePeerDependencies: - supports-color - set-blocking@2.0.0: - optional: true - set-cookie-parser@2.7.1: {} setimmediate@1.0.5: {} @@ -11502,6 +11822,8 @@ snapshots: shell-quote@1.8.3: {} + shimmer@1.2.1: {} + side-channel-list@1.0.0: dependencies: es-errors: 1.3.0 @@ -11564,29 +11886,11 @@ snapshots: astral-regex: 2.0.0 is-fullwidth-code-point: 3.0.0 - smart-buffer@4.2.0: - optional: true - snake-case@3.0.4: dependencies: dot-case: 3.0.4 tslib: 2.8.1 - socks-proxy-agent@6.2.1: - dependencies: - agent-base: 6.0.2 - debug: 4.4.0(supports-color@5.5.0) - socks: 2.8.4 - transitivePeerDependencies: - - supports-color - optional: true - - socks@2.8.4: - dependencies: - ip-address: 9.0.5 - smart-buffer: 4.2.0 - optional: true - sonic-boom@4.2.0: dependencies: atomic-sleep: 1.0.0 @@ -11610,20 +11914,14 @@ snapshots: sprintf-js@1.0.3: {} - sprintf-js@1.1.3: - optional: true - - sqlite3@5.1.7: + sqlite3@6.0.1: dependencies: bindings: 1.5.0 - node-addon-api: 7.1.1 + node-addon-api: 8.7.0 prebuild-install: 7.1.3 - tar: 6.2.1 + tar: 7.5.13 optionalDependencies: - node-gyp: 8.4.1 - transitivePeerDependencies: - - bluebird - - supports-color + node-gyp: 12.3.0 ssh-remote-port-forward@1.0.4: dependencies: @@ -11638,11 +11936,6 @@ snapshots: cpu-features: 0.0.10 nan: 2.22.2 - ssri@8.0.1: - dependencies: - minipass: 3.3.6 - optional: true - stack-utils@2.0.6: dependencies: escape-string-regexp: 2.0.0 @@ -11708,6 +12001,8 @@ snapshots: strip-json-comments@3.1.1: {} + strip-json-comments@5.0.3: {} + styled-jsx@5.1.1(react@18.3.1): dependencies: client-only: 0.0.1 @@ -11750,6 +12045,8 @@ snapshots: timeout-signal: 2.0.0 whatwg-mimetype: 4.0.0 + systeminformation@5.23.8: {} + tagged-tag@1.0.0: {} tailwind-merge@3.4.1: {} @@ -11817,14 +12114,13 @@ snapshots: fast-fifo: 1.3.2 streamx: 2.22.1 - tar@6.2.1: + tar@7.5.13: dependencies: - chownr: 2.0.0 - fs-minipass: 2.1.0 - minipass: 5.0.0 - minizlib: 2.1.2 - mkdirp: 1.0.4 - yallist: 4.0.0 + '@isaacs/fs-minipass': 4.0.1 + chownr: 3.0.0 + minipass: 7.1.2 + minizlib: 3.1.0 + yallist: 5.0.0 tarn@3.0.2: {} @@ -11940,19 +12236,19 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.3.2(@babel/core@7.27.1)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.27.1))(jest@29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@4.9.5)))(typescript@4.9.5): + ts-jest@29.3.2(@babel/core@7.27.1)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.27.1))(jest@29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@5.8.3)))(typescript@5.8.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@4.9.5)) + jest: 29.7.0(@types/node@18.19.101)(ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@5.8.3)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 semver: 7.7.1 type-fest: 4.41.0 - typescript: 4.9.5 + typescript: 5.8.3 yargs-parser: 21.1.1 optionalDependencies: '@babel/core': 7.27.1 @@ -12042,7 +12338,7 @@ snapshots: ts-log@2.2.7: {} - ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@4.9.5): + ts-node@10.9.1(@swc/core@1.11.24)(@types/node@18.19.101)(typescript@5.8.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -12056,7 +12352,7 @@ snapshots: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.9.5 + typescript: 5.8.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: @@ -12130,10 +12426,10 @@ snapshots: tsscmp@1.0.6: {} - tsutils@3.21.0(typescript@4.9.5): + tsutils@3.21.0(typescript@5.8.3): dependencies: tslib: 1.14.1 - typescript: 4.9.5 + typescript: 5.8.3 tsx@4.19.4: dependencies: @@ -12197,8 +12493,6 @@ snapshots: media-typer: 1.1.0 mime-types: 3.0.1 - typescript@4.9.5: {} - typescript@5.8.2: {} typescript@5.8.3: {} @@ -12219,14 +12513,7 @@ snapshots: dependencies: '@fastify/busboy': 2.1.1 - unique-filename@1.1.1: - dependencies: - unique-slug: 2.0.2 - optional: true - - unique-slug@2.0.2: - dependencies: - imurmurhash: 0.1.4 + undici@6.25.0: optional: true unixify@1.0.0: @@ -12298,23 +12585,6 @@ snapshots: d3-time: 3.1.0 d3-timer: 3.0.1 - viem@2.34.0(typescript@4.9.5)(zod@3.24.3): - dependencies: - '@noble/curves': 1.9.6 - '@noble/hashes': 1.8.0 - '@scure/bip32': 1.7.0 - '@scure/bip39': 1.6.0 - abitype: 1.0.8(typescript@4.9.5)(zod@3.24.3) - isows: 1.0.7(ws@8.18.3) - ox: 0.8.7(typescript@4.9.5)(zod@3.24.3) - ws: 8.18.3 - optionalDependencies: - typescript: 4.9.5 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - zod - viem@2.34.0(typescript@5.8.2)(zod@3.24.3): dependencies: '@noble/curves': 1.9.6 @@ -12372,9 +12642,9 @@ snapshots: dependencies: isexe: 2.0.0 - wide-align@1.1.5: + which@6.0.1: dependencies: - string-width: 4.2.3 + isexe: 4.0.0 optional: true word-wrap@1.2.5: {} @@ -12412,7 +12682,7 @@ snapshots: yallist@3.1.1: {} - yallist@4.0.0: {} + yallist@5.0.0: {} yaml-ast-parser@0.0.43: {}