@curvenote/cli
Version:
CLI Client library for Curvenote
46 lines • 1.59 kB
TypeScript
import type { WorkDTO } from '@curvenote/common';
import type { PushOpts } from './types.js';
import type { ISession } from '../session/types.js';
export declare function postNewWork(session: ISession, cdnKey: string, cdn: string, key?: string, metadata?: {
title?: string;
description?: string;
authors?: string[];
author_details?: Record<string, any>[];
doi?: string;
date?: string;
canonical?: boolean;
contains?: string[];
cdn?: string;
cdn_key?: string;
metadata?: Record<string, any>;
tags?: string[];
}): Promise<WorkDTO>;
export declare function postNewWorkVersion(session: ISession, versionsUrl: string, cdnKey: string, cdn: string, extra?: {
metadata?: Record<string, any>;
tags?: string[];
}): Promise<WorkDTO>;
export declare function postNewWorkVersionFromMetadata(session: ISession, versionsUrl: string, metadata: {
title?: string;
description?: string;
authors?: string[];
author_details?: Record<string, any>[];
doi?: string;
date?: string;
canonical?: boolean;
metadata?: Record<string, any>;
contains?: string[];
cdn?: string;
cdn_key?: string;
tags?: string[];
}): Promise<WorkDTO>;
/**
* Push a new work or new version of work based on myst contents in a folder
*
* This will:
* - Check for project.id (work key) and add it if missing
* - Upload content to CDN
* - Check if work exists and if not, create new work
* - Create new version of work
*/
export declare function push(session: ISession, opts?: PushOpts): Promise<void>;
//# sourceMappingURL=push.d.ts.map