Summary
The generated list operations for collection endpoints model no query parameters (query?: never), so there is no typed way to page or filter collections. Consumers are forced to bypass the typed SDK and hand-write query params against the untyped raw transport — with zero type-safety, which recently let an invalid Actionstep filter operator ship to production undetected.
Where
In dist/clients/*/types.gen.d.ts the list operations declare query?: never:
// clients/actions/types.gen.d.ts
export type GetActionsData = {
body?: never;
path?: never;
query?: never; // ← no paging / no filtering modelled
url: "/actions";
};
Same for:
GetParticipantsData (clients/participants/types.gen.d.ts) — query?: never
GetActionparticipantsData (clients/actionparticipants/types.gen.d.ts) — query?: never
(observed in @forsyteco/actionstep-client-typescript@0.1.6)
Impact
Actionstep collection endpoints do support paging and filtering as query params — documented at https://docs.actionstep.com/api-requests/ :
- Paging:
page, pageSize (default 50, max 200)
- Filtering (field-operator form):
{field}{operator}={value} where Datetime operators are _eq / _nteq / _in / _ntin / _gt / _lt / _gteq / _lteq (e.g. createdTimestamp_gteq=…&createdTimestamp_lteq=…)
- Filtering (SQL-like form):
filter=status ilike '%active%' AND priority > 0
Because the generated types expose none of these, a consumer must call the raw transport (requestWithResponse(scoped, { url: "/actions", query: { … } })) and hand-build the query object. With query typed as Record<string, unknown>, TypeScript cannot validate operator names — we shipped createdTimestamp_gte/_lte (invalid; the correct operators are _gteq/_lteq), Actionstep silently ignored the unknown params and returned the entire tenant on every request. A typed query model would have caught this at compile time.
Endpoint reference
Suggested fix
Model the collection query params in the generated types (from the OpenAPI spec's parameters, or a hand-authored augmentation if the upstream spec omits them):
page?: number, pageSize?: number
- the field-operator filter params (or at least a typed
filter?: string for the SQL-like form)
- ideally a typed operator suffix union for filterable fields so
_gte vs _gteq mistakes fail to compile
At minimum, adding page/pageSize and a typed filter string to the list ops would remove the need to drop to the untyped transport for the common case.
Repro
import { getActions } from "@forsyteco/actionstep-client-typescript" — observe there is no way to pass page, pageSize, or a filter.
- Fall back to the raw transport and pass any misspelled operator (e.g.
createdTimestamp_gte) — it compiles, and Actionstep returns unfiltered results.
Summary
The generated list operations for collection endpoints model no query parameters (
query?: never), so there is no typed way to page or filter collections. Consumers are forced to bypass the typed SDK and hand-write query params against the untyped raw transport — with zero type-safety, which recently let an invalid Actionstep filter operator ship to production undetected.Where
In
dist/clients/*/types.gen.d.tsthe list operations declarequery?: never:Same for:
GetParticipantsData(clients/participants/types.gen.d.ts) —query?: neverGetActionparticipantsData(clients/actionparticipants/types.gen.d.ts) —query?: never(observed in
@forsyteco/actionstep-client-typescript@0.1.6)Impact
Actionstep collection endpoints do support paging and filtering as query params — documented at https://docs.actionstep.com/api-requests/ :
page,pageSize(default 50, max 200){field}{operator}={value}where Datetime operators are_eq / _nteq / _in / _ntin / _gt / _lt / _gteq / _lteq(e.g.createdTimestamp_gteq=…&createdTimestamp_lteq=…)filter=status ilike '%active%' AND priority > 0Because the generated types expose none of these, a consumer must call the raw transport (
requestWithResponse(scoped, { url: "/actions", query: { … } })) and hand-build the query object. Withquerytyped asRecord<string, unknown>, TypeScript cannot validate operator names — we shippedcreatedTimestamp_gte/_lte(invalid; the correct operators are_gteq/_lteq), Actionstep silently ignored the unknown params and returned the entire tenant on every request. A typed query model would have caught this at compile time.Endpoint reference
Suggested fix
Model the collection query params in the generated types (from the OpenAPI spec's
parameters, or a hand-authored augmentation if the upstream spec omits them):page?: number,pageSize?: numberfilter?: stringfor the SQL-like form)_gtevs_gteqmistakes fail to compileAt minimum, adding
page/pageSizeand a typedfilterstring to the list ops would remove the need to drop to the untyped transport for the common case.Repro
import { getActions } from "@forsyteco/actionstep-client-typescript"— observe there is no way to passpage,pageSize, or a filter.createdTimestamp_gte) — it compiles, and Actionstep returns unfiltered results.