import { type ErrorType, type Result } from '../ErrorResult.js'; import type { ArchiveEntitySyncEvent, ChangelogEvent, CreateEntitySyncEvent, PublishEntitiesSyncEvent, SyncEvent, UnarchiveEntitySyncEvent, UnpublishEntitiesSyncEvent, UpdateEntitySyncEvent, UpdateSchemaSyncEvent } from '../events/EventTypes.js'; import type { Connection, Edge, Entity, EntityCreatePayload, EntityDeletePayload, EntityInfo, EntityPublishingPayload, EntityUpdatePayload, EntityUpsertPayload, PageInfo, PublishedEntity, PublishedEntityInfo } from '../Types.js'; export interface JsonConnection> { pageInfo: PageInfo; edges: T[]; } export interface JsonEdge { node: JsonResult; cursor: string; } export type JsonResult = { value: TOk; } | { error: TError; message: string; }; interface JsonEntityInfo extends Omit { createdAt: string; updatedAt: string; } export interface JsonEntity extends Omit { info: JsonEntityInfo; } interface JsonPublishedEntityInfo extends Omit { createdAt: string; } export interface JsonPublishedEntity extends Omit { info: JsonPublishedEntityInfo; } export interface JsonEntityCreatePayload extends Omit { entity: JsonEntity; } export interface JsonEntityUpdatePayload extends Omit { entity: JsonEntity; } export interface JsonEntityUpsertPayload extends Omit { entity: JsonEntity; } export interface JsonEntityPublishingPayload extends Omit, 'updatedAt'> { updatedAt: string; } export interface JsonEntityDeletePayload extends Omit { deletedAt: string; } type WithCreatedAt = Omit & { createdAt: string; }; export type JsonChangelogEvent = WithCreatedAt; export type JsonSyncEvent = WithCreatedAt | WithCreatedAt | WithCreatedAt | WithCreatedAt | WithCreatedAt | WithCreatedAt | WithCreatedAt; export declare function convertJsonConnection, TOut extends Edge>(jsonConnection: JsonConnection | null, edgeConverter: (edge: TIn) => TOut): Connection | null; export declare function convertJsonEdge(jsonEdge: JsonEdge, nodeConverter: (node: TOkIn) => TOkOut): Edge; export declare function convertJsonResult(jsonResult: JsonResult): Result; export declare function convertJsonEntity(entity: JsonEntity): Entity; export declare function convertJsonPublishedEntity(entity: JsonPublishedEntity): PublishedEntity; export declare function convertJsonPublishingPayload(payload: JsonEntityPublishingPayload): EntityPublishingPayload; export declare function convertJsonDeletePayload(payload: JsonEntityDeletePayload): EntityDeletePayload; export declare function convertJsonChangelogEventEdge(edge: JsonEdge, TError>): Edge; export declare function convertJsonSyncEvent(syncEvent: JsonSyncEvent): SyncEvent; export {};