@forge/migrations

3.1.1-next.1-experimental-e03cc853.2.0-next.2
README.md
~README.mdModified
+22
Index: package/README.md
===================================================================
--- package/README.md
+++ package/README.md
@@ -51,8 +51,30 @@
 ```typescript
 getConfluenceMacroIndexUrl: (transferId: string) => Promise<ConfluenceMacroIndexUrlResponse>;
 ```
 
+### Iterate Confluence macro index rows
+
+Downloads the transfer's Confluence macro index (an NDJSON file) and returns an iterator that yields one parsed row per call to `next()`, beginning on `rowIndex` (default `0`).
+
+```typescript
+getConfluenceMacroIndexIterator: (
+  transferId: string,
+  options?: { rowIndex?: number }
+) => AsyncIterableIterator<{ macroname: string; contentIds: string[] }>;
+```
+
+Keep track of the index of the row you are processing so that you can resume from it if processing is interrupted:
+
+```typescript
+let rowIndex = 0; // e.g. restored from where you last left off
+
+for await (const row of migration.getConfluenceMacroIndexIterator(transferId, { rowIndex })) {
+  console.log(rowIndex, row.macroname, row.contentIds.length);
+  rowIndex++;
+}
+```
+
 ### Retrieve Containers
 
 Returns a set of containers with a specified `containerType`.