(
volumeId: string,
nodeId: string,
thumbnail: { ThumbnailID: string | null; Type: 1 | 2 | 3 },
)
| 868 | }; |
| 869 | } |
| 870 | |
| 871 | export function* groupNodeUidsByVolumeAndIteratePerBatch( |
| 872 | nodeUids: string[], |
| 873 | ): Generator<{ volumeId: string; batchNodeIds: string[]; batchNodeUids: string[] }> { |
| 874 | const allNodeIds = nodeUids.map((nodeUid: string) => { |
| 875 | const { volumeId, nodeId } = splitNodeUid(nodeUid); |
| 876 | return { volumeId, nodeIds: { nodeId, nodeUid } }; |
| 877 | }); |
| 878 | |
| 879 | const nodeIdsByVolumeId = new Map<string, { nodeId: string; nodeUid: string }[]>(); |
| 880 | for (const { volumeId, nodeIds } of allNodeIds) { |
| 881 | if (!nodeIdsByVolumeId.has(volumeId)) { |
| 882 | nodeIdsByVolumeId.set(volumeId, []); |
| 883 | } |
| 884 | nodeIdsByVolumeId.get(volumeId)?.push(nodeIds); |
no test coverage detected