Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "lib/decoders"

Index

Variables

Const rDecoder

rDecoder: Decoder<Object> = object({recordId: string(),featureId: string(),projectName: string(),formId: string(),formSpecificId: string(),username: string(),datetimeUtc: string().map((value: string) => new Date(value)),zone: string(),latitude: number(),longitude: number(),altitude: number(),mediaList: array(object({type: union(constant<"IMAGE">("IMAGE"),constant<"AUDIO">("AUDIO"),constant<"VIDEO">("VIDEO")),fileName: string(),})),data: object().map((fields) => {const obj: any = {};for (const [key, value] of Object.entries(fields)) {if ((value as any).type === "DATE")(value as any).date = new Date((value as any).date);obj[key] = value;}return obj;}),})

Functions

projectDecoder

  • projectDecoder(): Decoder<Project>
  • Returns Decoder<Project>

recordDecoder

  • Parameters

    Returns Decoder<Record>

recordDecoderNoValidation

  • recordDecoderNoValidation(): Decoder<Record>
  • Returns Decoder<Record>

reqAdminTokenDecoder

reqLinkChangePswDecoder

reqProjectLoginDecoder

reqSignUpDecoder

  • Returns Decoder<ReqSignUp>

reqUploadRecordListDecoder

resAdminTokenDecoder

resCollabsDecoder

  • Returns Decoder<ResCollabs>

resEmptySuccessfulDecoder

resErrorDecoder

  • Returns Decoder<ResError>

resProjectTokenDecoder

resRecordListDecoder

Generated using TypeDoc