UNPKG

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

Version:

## Peer dependencies

426 lines (425 loc) 14.8 kB
import * as z from 'zod'; import { type Api } from '../api'; 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; }[]; }>; } & { ledger: z.ZodArray<z.ZodObject<{ accountId: z.ZodString; rootUnitId: z.ZodString; volume: z.ZodNumber; }, "strip", z.ZodTypeAny, { volume: number; rootUnitId: string; accountId: string; }, { volume: number; rootUnitId: string; accountId: string; }>, "many">; }, "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; }[]; }>; } & { ledger: z.ZodArray<z.ZodObject<{ accountId: z.ZodString; rootUnitId: z.ZodString; volume: z.ZodNumber; }, "strip", z.ZodTypeAny, { volume: number; rootUnitId: string; accountId: string; }, { volume: number; rootUnitId: string; accountId: string; }>, "many">; }, 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; }[]; }>; } & { ledger: z.ZodArray<z.ZodObject<{ accountId: z.ZodString; rootUnitId: z.ZodString; volume: z.ZodNumber; }, "strip", z.ZodTypeAny, { volume: number; rootUnitId: string; accountId: string; }, { volume: number; rootUnitId: string; accountId: string; }>, "many">; }, 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; }[]; }; ledger: { volume: number; rootUnitId: string; accountId: 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; }[]; }; ledger: { volume: number; rootUnitId: string; accountId: string; }[]; } & { [k: string]: unknown; }; topic?: undefined; }>; export declare const LedgerUpdate: (api: Api) => { new (config: unknown): { onInput(message: z.infer<typeof InputMessage>): 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; }[]; }>; } & { ledger: z.ZodArray<z.ZodObject<{ accountId: z.ZodString; rootUnitId: z.ZodString; volume: z.ZodNumber; }, "strip", z.ZodTypeAny, { volume: number; rootUnitId: string; accountId: string; }, { volume: number; rootUnitId: string; accountId: string; }>, "many">; }, "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; }[]; }>; } & { ledger: z.ZodArray<z.ZodObject<{ accountId: z.ZodString; rootUnitId: z.ZodString; volume: z.ZodNumber; }, "strip", z.ZodTypeAny, { volume: number; rootUnitId: string; accountId: string; }, { volume: number; rootUnitId: string; accountId: string; }>, "many">; }, 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; }[]; }>; } & { ledger: z.ZodArray<z.ZodObject<{ accountId: z.ZodString; rootUnitId: z.ZodString; volume: z.ZodNumber; }, "strip", z.ZodTypeAny, { volume: number; rootUnitId: string; accountId: string; }, { volume: number; rootUnitId: string; accountId: string; }>, "many">; }, 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; }[]; }; ledger: { volume: number; rootUnitId: string; accountId: 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; }[]; }; ledger: { volume: number; rootUnitId: string; accountId: 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 {};