useMembrane():
Hooks for individual entities
Hooks for individual entities are used to fetch and manage data for a single workspace element such as Flow or Field Mapping. They have the following structure:selector | String or object that uniquely identifies the entity. It can be the entity’s ID or a combination of entity key and connection selector. |
flow | Current state of the entity |
apply | Applies universal entity to selected integrations |
reset | Resets entity to its initial state (only works for entities that have parents) |
refresh | Refresh entity data from the server |
accessor | SDK-provided object for working with the entity. |
loading | Whether initial data is being loaded |
saving | Whether entity is being saved to the server |
error | Error that occurred during last operation |
refreshing | Whether entity is being refreshed from server |
create | Create new entity |
patch | Partially update entity |
put | Fully update entity (replace all its properties with provided ones) |
archive | Archive (soft delete) entity |
Hooks for lists
Hooks for fetching lists of entities look like this:query | Query for fetching / filtering the list of entities |
items | Current list of entities (including all the loaded pages) |
loadMore | Load the next page of entities from the server (if there is no more pages - nothing will happen) |
loadingMore | Whether more entities are being loaded from the server |
refresh | Refresh the list of entities from the server (if multiple pages were fetched previously - only the first page will remain after the refresh) |
loading | Whether the list is being loaded from the server |
error | Error that occurred during the last operation |