noggin-cli 0.4.4 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/noggin-api.d.mts +19 -0
- package/package.json +1 -1
package/noggin-api.d.mts
CHANGED
|
@@ -339,6 +339,25 @@ export interface Verbs {
|
|
|
339
339
|
note(noggin: Noggin, opts: NoteOptions, ctx?: VerbContext): Promise<CurrentTreeView>;
|
|
340
340
|
/** Remove an item (and optionally its subtree). */
|
|
341
341
|
delete(noggin: Noggin, opts: DeleteOptions): Promise<DeleteResult>;
|
|
342
|
+
/**
|
|
343
|
+
* Append every item from `source` into `dest` (whole-noggin,
|
|
344
|
+
* append-only). New keys are generated; notes (including system
|
|
345
|
+
* "closed" notes), `done` state, and `createdAt` are preserved
|
|
346
|
+
* verbatim. Source is read-only; dest's active pointer is unchanged.
|
|
347
|
+
* Same-noggin copy is supported.
|
|
348
|
+
*/
|
|
349
|
+
copy(source: Noggin, dest: Noggin, opts?: CopyOptions): Promise<CopyResult>;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/** @public Options for {@link Verbs.copy}. Reserved for forward-compat — v1 has no options. */
|
|
353
|
+
export interface CopyOptions {}
|
|
354
|
+
|
|
355
|
+
/** @public Result of {@link Verbs.copy}. */
|
|
356
|
+
export interface CopyResult {
|
|
357
|
+
/** Number of items appended to dest. */
|
|
358
|
+
copied: number;
|
|
359
|
+
/** Map from source item key → new key in dest. */
|
|
360
|
+
mapping: Record<string, string>;
|
|
342
361
|
}
|
|
343
362
|
|
|
344
363
|
/** @public The singleton verbs object. See {@link Verbs}. */
|