Flattened vectors do not include fill information for its sub-vectors

Hi there,

I noticed that flattened Vectors do not get all of the fill information of their sub-vectors serialized from the REST api.

Take the following nodes, for example:

Screen Shot 2022-06-25 at 12.51.01 PM

The “Flattened” vector node has the same child vectors as the “Grouped” node. When requesting the document information via the REST api, the flattened node only sends JSON for the first fill of its sub-vectors, but will return JSON for the fill/stroke geometry for all of its sub-vectors.

For the flattened vector node, this is what is sent from the REST api - “Vector 1” and “Vector 2” have different fills, but only the fill for “Vector 2” ends up getting serialized:

Screen Shot 2022-06-25 at 12.58.12 PM

As far as I understand, the only way to get an accurate representation of a Vector node via the REST api is if the vector is NOT flattened. If it is flattened, it will only be accurate so long as there is only one kind of fill being used for the whole vector.

Am I missing something? Is there some other way to get a full representation of a flattened Vector node’s fills and path geometry?

If not, I think it would be helpful to change how flattened vectors get serialized via the api. Text nodes have characterStyleOverrides and styleOverrideTable properties; perhaps vectors could return extra fill information in a similar format, ie. fillOverrides and fillOverrideTable.