Skip to content

queryParams

queryParams

queryParams.buildQueryString(source) ⇒ string

Serializes a request DTO into a backend-compatible query string.

Rules:

  • keys are PascalCased per segment (postalCodePostalCode);
  • nested objects use dot notation (createdAt: { from }CreatedAt.From), which is how ASP.NET binds PaginationRangeFilter<T> and PaginationFilter<T>;
  • arrays repeat the key (statuses: [1, 2]Statuses=1&Statuses=2);
  • null, undefined, empty and whitespace-only strings are omitted, so an absent filter means "no condition" instead of "match empty";
  • strings are trimmed;
  • Date is serialized as ISO 8601 UTC.

Note: an empty array produces no output and is therefore indistinguishable from an absent field on the wire. Endpoints where null and [] differ (facet-only reads on Api/Recalls/Wait and Api/Tasks) must receive undefined to mean "facets only".

Takes a plain object rather than QueryParamsSource: a request DTO is declared as an interface without an index signature, so TypeScript would reject it as an argument.

Kind: static method of queryParams
Returns: string - Query string without the leading ?.

ParamTypeDescription
sourceObjectRequest DTO to serialize.

queryParams~WIRE_KEY_ALIASES

Frontend field names that do not match the backend wire name. Keyed by the already-PascalCased full path, so only the intended nesting level is renamed.

Kind: inner constant of queryParams