import type { ISession } from '../session/types.js';
import type { STATUS_ACTIONS, JobResponse, NewCheckJobPayload, NewCheckJobResults } from './types.js';
import type { JsonObject } from '@curvenote/blocks';
import type { SubmissionDTO, SubmissionVersionDTO, WorkDTO } from '@curvenote/common';
export declare function formatDate(date: string): string;
/**
 * Perform json GET request to `url`
 *
 * If request is successful, return the response json.
 * If request fails, throw an error.
 */
export declare function getFromUrl(session: ISession, url: string): Promise<any>;
/**
 * Perform json GET request to `pathname` on the journals API
 *
 * If request is successful, return the response json.
 * If request fails, throw an error.
 */
export declare function getFromJournals(session: ISession, pathname: string): Promise<any>;
export declare function postToUrl(session: ISession, url: string, body: JsonObject, opts?: {
    method?: 'POST' | 'PATCH' | 'PUT';
}): Promise<import("node-fetch").Response>;
export declare function postToJournals(session: ISession, pathname: string, body: JsonObject, opts?: {
    method?: 'POST' | 'PATCH';
}): Promise<import("node-fetch").Response>;
export declare function postNewWork(session: ISession, cdnKey: string, cdn: string, key?: string): Promise<WorkDTO>;
export declare function postNewWorkVersion(session: ISession, versionsUrl: string, cdnKey: string, cdn: string): Promise<WorkDTO>;
export declare function postNewCliCheckJob(session: ISession, payload: NewCheckJobPayload, results: NewCheckJobResults): Promise<JobResponse>;
export declare function patchUpdateCliCheckJob(session: ISession, jobId: string, status: string, message: string, results: Record<string, any>): Promise<JobResponse>;
export declare function postNewSubmission(session: ISession, venue: string, collection_id: string, kind_id: string, work_version_id: string, draft: boolean, job_id: string): Promise<SubmissionDTO>;
export declare function postUpdateSubmissionWorkVersion(session: ISession, venue: string, versionsUrl: string, work_version_id: string, job_id: string): Promise<SubmissionVersionDTO>;
export declare function patchUpdateSubmissionStatus(session: ISession, venue: string, submissionUrl: string, action: STATUS_ACTIONS, date?: string): Promise<void>;
export declare function exitOnInvalidKeyOption(session: ISession, key: string): void;
//# sourceMappingURL=utils.d.ts.map