UNPKG

@energyweb/node-red-contrib-green-proof-worker

Version:

## Peer dependencies

332 lines (331 loc) 11.8 kB
import type { Kysely } from 'kysely'; import * as z from 'zod'; import type { Api } from '../api'; import type { SqliteDatabase } from '../types'; declare const InputMessage: z.ZodObject<{ topic: z.ZodLiteral<undefined>; payload: z.ZodObject<{ type: z.ZodLiteral<import("../input-message").MessageType>; txLog: z.ZodObject<{ rootUnitId: z.ZodString; changes: z.ZodArray<z.ZodObject<{ prevOwner: z.ZodNullable<z.ZodString>; owner: z.ZodString; volume: z.ZodNumber; unitId: z.ZodString; }, "strip", z.ZodTypeAny, { prevOwner: string | null; owner: string; volume: number; unitId: string; }, { prevOwner: string | null; owner: string; volume: number; unitId: string; }>, "many">; }, "strip", z.ZodTypeAny, { rootUnitId: string; changes: { prevOwner: string | null; owner: string; volume: number; unitId: string; }[]; }, { rootUnitId: string; changes: { prevOwner: string | null; owner: string; volume: number; unitId: string; }[]; }>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ type: z.ZodLiteral<import("../input-message").MessageType>; txLog: z.ZodObject<{ rootUnitId: z.ZodString; changes: z.ZodArray<z.ZodObject<{ prevOwner: z.ZodNullable<z.ZodString>; owner: z.ZodString; volume: z.ZodNumber; unitId: z.ZodString; }, "strip", z.ZodTypeAny, { prevOwner: string | null; owner: string; volume: number; unitId: string; }, { prevOwner: string | null; owner: string; volume: number; unitId: string; }>, "many">; }, "strip", z.ZodTypeAny, { rootUnitId: string; changes: { prevOwner: string | null; owner: string; volume: number; unitId: string; }[]; }, { rootUnitId: string; changes: { prevOwner: string | null; owner: string; volume: number; unitId: string; }[]; }>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ type: z.ZodLiteral<import("../input-message").MessageType>; txLog: z.ZodObject<{ rootUnitId: z.ZodString; changes: z.ZodArray<z.ZodObject<{ prevOwner: z.ZodNullable<z.ZodString>; owner: z.ZodString; volume: z.ZodNumber; unitId: z.ZodString; }, "strip", z.ZodTypeAny, { prevOwner: string | null; owner: string; volume: number; unitId: string; }, { prevOwner: string | null; owner: string; volume: number; unitId: string; }>, "many">; }, "strip", z.ZodTypeAny, { rootUnitId: string; changes: { prevOwner: string | null; owner: string; volume: number; unitId: string; }[]; }, { rootUnitId: string; changes: { prevOwner: string | null; owner: string; volume: number; unitId: string; }[]; }>; }, z.ZodTypeAny, "passthrough">>; }, "strip", z.ZodTypeAny, { payload: { type: import("../input-message").MessageType; txLog: { rootUnitId: string; changes: { prevOwner: string | null; owner: string; volume: number; unitId: string; }[]; }; } & { [k: string]: unknown; }; topic?: undefined; }, { payload: { type: import("../input-message").MessageType; txLog: { rootUnitId: string; changes: { prevOwner: string | null; owner: string; volume: number; unitId: string; }[]; }; } & { [k: string]: unknown; }; topic?: undefined; }>; declare const Config: z.ZodObject<{ sqliteConfig: z.ZodString; }, "strip", z.ZodTypeAny, { sqliteConfig: string; }, { sqliteConfig: string; }>; export declare const ProcessedUpdateSqlite: (api: Api) => { new (config: z.infer<typeof Config>): { database: Promise<Kysely<SqliteDatabase>>; onInput(message: z.infer<typeof InputMessage>): Promise<void>; api: Api; nodeConfig: unknown; messageZod: z.ZodObject<{ topic: z.ZodLiteral<undefined>; payload: z.ZodObject<{ type: z.ZodLiteral<import("../input-message").MessageType>; txLog: z.ZodObject<{ rootUnitId: z.ZodString; changes: z.ZodArray<z.ZodObject<{ prevOwner: z.ZodNullable<z.ZodString>; owner: z.ZodString; volume: z.ZodNumber; unitId: z.ZodString; }, "strip", z.ZodTypeAny, { prevOwner: string | null; owner: string; volume: number; unitId: string; }, { prevOwner: string | null; owner: string; volume: number; unitId: string; }>, "many">; }, "strip", z.ZodTypeAny, { rootUnitId: string; changes: { prevOwner: string | null; owner: string; volume: number; unitId: string; }[]; }, { rootUnitId: string; changes: { prevOwner: string | null; owner: string; volume: number; unitId: string; }[]; }>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ type: z.ZodLiteral<import("../input-message").MessageType>; txLog: z.ZodObject<{ rootUnitId: z.ZodString; changes: z.ZodArray<z.ZodObject<{ prevOwner: z.ZodNullable<z.ZodString>; owner: z.ZodString; volume: z.ZodNumber; unitId: z.ZodString; }, "strip", z.ZodTypeAny, { prevOwner: string | null; owner: string; volume: number; unitId: string; }, { prevOwner: string | null; owner: string; volume: number; unitId: string; }>, "many">; }, "strip", z.ZodTypeAny, { rootUnitId: string; changes: { prevOwner: string | null; owner: string; volume: number; unitId: string; }[]; }, { rootUnitId: string; changes: { prevOwner: string | null; owner: string; volume: number; unitId: string; }[]; }>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ type: z.ZodLiteral<import("../input-message").MessageType>; txLog: z.ZodObject<{ rootUnitId: z.ZodString; changes: z.ZodArray<z.ZodObject<{ prevOwner: z.ZodNullable<z.ZodString>; owner: z.ZodString; volume: z.ZodNumber; unitId: z.ZodString; }, "strip", z.ZodTypeAny, { prevOwner: string | null; owner: string; volume: number; unitId: string; }, { prevOwner: string | null; owner: string; volume: number; unitId: string; }>, "many">; }, "strip", z.ZodTypeAny, { rootUnitId: string; changes: { prevOwner: string | null; owner: string; volume: number; unitId: string; }[]; }, { rootUnitId: string; changes: { prevOwner: string | null; owner: string; volume: number; unitId: string; }[]; }>; }, z.ZodTypeAny, "passthrough">>; }, "strip", z.ZodTypeAny, { payload: { type: import("../input-message").MessageType; txLog: { rootUnitId: string; changes: { prevOwner: string | null; owner: string; volume: number; unitId: string; }[]; }; } & { [k: string]: unknown; }; topic?: undefined; }, { payload: { type: import("../input-message").MessageType; txLog: { rootUnitId: string; changes: { prevOwner: string | null; owner: string; volume: number; unitId: string; }[]; }; } & { [k: string]: unknown; }; topic?: undefined; }>; getBaseUrls(): Promise<{ kafka_url?: string | string[] | undefined; kafka_proxy_url?: string | undefined; indexer_url?: string | undefined; rpc_url?: string | undefined; }>; getNodeEnvConfig(): { BASE_URL_CDN?: string | undefined; EWX_SOLUTION_ID?: string | undefined; EWX_SOLUTION_GROUP_ID?: string | undefined; EWX_WORKLOGIC_ID?: string | undefined; EWX_SQLITE_PATH?: string | undefined; EWX_WORKER_ADDRESS?: string | undefined; }; sendBuilder(inputMessage: import("../types").NodeMessage<any>): import("../node").SendBuilder; onDestroy?(): void | Promise<void>; handleMaybePromise<T>(maybePromiseCb: () => T | Promise<T>, done: (err?: Error | undefined) => void): void; }; }; export {};