import type { LogContext } from '@rocicorp/logger'; import type { ReadonlyJSONValue } from '../../../shared/src/json.ts'; import type { Store } from '../dag/store.ts'; import { type Pusher, type PusherResult } from '../pusher.ts'; import { type ClientGroupID, type ClientID } from './ids.ts'; export declare const PUSH_VERSION_SDD = 0; export declare const PUSH_VERSION_DD31 = 1; /** * Mutation describes a single mutation done on the client. */ export type MutationV1 = { readonly id: number; readonly name: string; readonly args: ReadonlyJSONValue; readonly timestamp: number; readonly clientID: ClientID; }; export type Mutation = MutationV1; /** * The JSON value used as the body when doing a POST to the [push * endpoint](/reference/server-push). */ export type PushRequestV1 = { pushVersion: 1; /** * `schemaVersion` can optionally be used to specify to the push endpoint * version information about the mutators the app is using (e.g., format of * mutator args). */ schemaVersion: string; profileID: string; clientGroupID: ClientGroupID; mutations: MutationV1[]; }; export type PushRequest = PushRequestV1; export declare function assertPushRequestV1(value: unknown): asserts value is PushRequestV1; export declare function push(requestID: string, store: Store, lc: LogContext, profileID: string, clientGroupID: ClientGroupID | undefined, _clientID: ClientID, pusher: Pusher, schemaVersion: string, pushVersion: typeof PUSH_VERSION_SDD | typeof PUSH_VERSION_DD31): Promise; //# sourceMappingURL=push.d.ts.map