issue :ENG-8179
maybe, union and interface were handled in the previous diff
dict, list, enums, irreducible cannot be the top-level type returned by the endpoint and at the same time have AdditionalResponseFields added
So subtype is the only type we have to handle. subtype is a TRefinement. It is a type + function that specifies some additional properties, narrowing the possible values. For example t.Number and (item) => item % 2 === 1, which defines odd numbers.
Details
Details
Changed inviteLinkVerificationResponseValidator to be
export const inviteLinkVerificationResponseValidator: TUnion<InviteLinkVerificationResponse> = t.union([ tShape({ status: t.enums.of(['valid', 'already_joined']), community: tShape({ name: t.String, id: tID, }), }), t.refinement( tShape({ status: t.enums.of(['invalid', 'expired']), }), input => true, ), ]);
and checked that invite links work
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable