Swarms hooks

Hand-written shim. Implementation is generated; see ./swarms.gen.

Hooks

useCreateSwarm mutation

Create a swarm.

TypeScript
useCreateSwarm(options?: MutationOpts<Swarm, CreateSwarmParams>)

Types: Swarm · CreateSwarmParams

useDeleteSwarm mutation

Soft-delete a swarm.

TypeScript
useDeleteSwarm(options?: MutationOpts<SuccessResponse, string>)

Types: SuccessResponse

useListSwarms query

List swarms.

TypeScript
useListSwarms(params?: Omit<ListSwarmsParams, | > & { filter?: SwarmFilter; orderBy?: SwarmOrderBy[]; } & SwarmShorthands, options?: QueryOpts<Page<Swarm>>)

Types: ListSwarmsParams · SwarmFilter · SwarmOrderBy · SwarmShorthands · Page · Swarm

usePurgeSwarm composite

Permanently delete a soft-deleted swarm.

TypeScript
usePurgeSwarm(options?: MutationOpts<SuccessResponse, PurgeSwarmParams>)

Types: SuccessResponse · PurgeSwarmParams

useRestoreSwarm composite

Restore a soft-deleted swarm.

TypeScript
useRestoreSwarm(options?: MutationOpts<Swarm, string>)

Types: Swarm

useRetrieveSwarm query

Get a swarm by ID.

TypeScript
useRetrieveSwarm(id: string, options?: QueryOpts<Swarm>)

Types: Swarm

useUpdateSwarm mutation

Update a swarm.

TypeScript
useUpdateSwarm(options?: MutationOpts<Swarm, UpdateSwarmParams>)

Types: Swarm · UpdateSwarmParams