Map of status code and its body data type.
Default success status code.
contracts/common.md#principled-implementation Each configured status becomes a branch whose success flag is true for configured success statuses, 200 and 201 by default. A false-success fallback with numeric status and unknown data represents unconfigured responses; TypeScript cannot subtract numeric literals from number, so this fallback also overlaps configured failure statuses and status-only narrowing cannot prove their payload shape.
contracts/common.md#clear-and-simple-design One mapped type indexed into a union, plus the fallback branch.
Propagation type.
IPropagationis a type gathering all possible status codes and their body data types as a discriminated union type. You can specify the status code and its body data type just by using conditional statement like below.For reference, this
IPropagationtype is utilized by SDK library generated by@nestia/sdk, when you've configured INestiaConfig.propagate to betrue. In that case, SDK functions generated by@nestia/sdkno more returns response DTO typed data directly, but returns thisIPropagationtyped object instead.