@ceramic-sdk/model-instance-client v0.2.1 • Docs
Ceramic SDK / @ceramic-sdk/model-instance-client / createDataEventPayload
createDataEventPayload(
current,data,header?):DocumentDataEventPayload
Creates a data event payload for a ModelInstanceDocument stream.
• current: CommitID
The current commit ID of the stream.
• data: (MapIn<object, $TypeOf> | MapIn<object, $TypeOf> | MapIn<object, $TypeOf> | MapIn<object, $TypeOf> | MapIn<object, $TypeOf> | MapIn<object, $TypeOf>)[]
The JSON patch operations to apply to the stream content.
• header?: MapIn<RequiredProps<object>, $TypeOf> & MapIn<OptionalProps<object>, $TypeOf>
Optional header information for the data event.
A valid data event payload.
Will throw an error if the JSON patch operations are invalid.