How to use the io-ts.UnknownRecord function in io-ts

To help you get started, we’ve selected a few io-ts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github maasglobal / maas-schemas / maas-schemas-ts / src / maas-backend / bookings / v2 / bookings-create / request.ts View on Github external
import * as t from 'io-ts';
import * as Units_ from 'maas-schemas-ts/core/components/units';
import * as Common_ from 'maas-schemas-ts/core/components/common';
import * as Response_ from 'maas-schemas-ts/maas-backend/bookings/bookings-agency-options/response';
import * as CustomerSelection_ from 'maas-schemas-ts/core/components/customerSelection';
import * as ApiCommon_ from 'maas-schemas-ts/core/components/api-common';

type Defined =
  | Record
  | Array
  | string
  | boolean
  | number
  | null;
const Defined = t.union([
  t.UnknownRecord,
  t.UnknownArray,
  t.string,
  t.boolean,
  t.number,
  t.null,
]);

export const schemaId =
  'http://maasglobal.com/maas-backend/bookings/v2/bookings-create/request.json';

// Request
// The default export. More information at the top.
export type Request = t.Branded<
  {
    identityId?: Units_.IdentityId;
    payload?: {
github maasglobal / maas-schemas / maas-schemas-ts / src / maas-backend / customers / personal-data-delete / request.ts View on Github external
*/

import * as t from 'io-ts';
import * as Units_ from 'maas-schemas-ts/core/components/units';
import * as ApiCommon_ from 'maas-schemas-ts/core/components/api-common';

type Defined =
  | Record
  | Array
  | string
  | boolean
  | number
  | null;
const Defined = t.union([
  t.UnknownRecord,
  t.UnknownArray,
  t.string,
  t.boolean,
  t.number,
  t.null,
]);

export const schemaId =
  'http://maasglobal.com/maas-backend/customers/personal-data-delete/request.json';

// Request
// The default export. More information at the top.
export type Request = t.Branded<
  {
    identityId?: Units_.IdentityId;
    customerId?: Units_.IdentityId;
github maasglobal / maas-schemas / maas-schemas-ts / src / maas-backend / customers / verification / status / response.ts View on Github external
!!! AUTO GENERATED BY CONVERT.TS REFRAIN FROM MANUAL EDITING !!!

*/

import * as t from 'io-ts';
import * as VerificationObject_ from 'maas-schemas-ts/maas-backend/customers/verification/verification-object';

type Defined =
  | Record
  | Array
  | string
  | boolean
  | number
  | null;
const Defined = t.union([
  t.UnknownRecord,
  t.UnknownArray,
  t.string,
  t.boolean,
  t.number,
  t.null,
]);

export const schemaId =
  'http://maasglobal.com/maas-backend/customers/verification/status/response.json';

// Response
// The default export. More information at the top.
export type Response = t.Branded<
  {
    customer?: {
      verification?: Array;
github maasglobal / maas-schemas / maas-schemas-ts / src / tsp / booking-create / response.ts View on Github external
import * as Booking_ from 'maas-schemas-ts/core/booking';
import * as State_ from 'maas-schemas-ts/core/components/state';
import * as BookingOption_ from 'maas-schemas-ts/core/booking-option';
import * as BookingMeta_ from 'maas-schemas-ts/core/booking-meta';
import * as Configurator_ from 'maas-schemas-ts/core/components/configurator';
import * as CustomerSelection_ from 'maas-schemas-ts/core/components/customerSelection';

type Defined =
  | Record
  | Array
  | string
  | boolean
  | number
  | null;
const Defined = t.union([
  t.UnknownRecord,
  t.UnknownArray,
  t.string,
  t.boolean,
  t.number,
  t.null,
]);

export const schemaId = 'http://maasglobal.com/tsp/bookings-create/response.json';

// Response
// The default export. More information at the top.
export type Response = t.Branded<
  {
    tspId?: Booking_.TspId;
    state?: State_.BookingState;
    cost?: Booking_.Cost;
github maasglobal / maas-schemas / maas-schemas-ts / src / maas-backend / customers / verification / verification-object.ts View on Github external
*/

import * as t from 'io-ts';
import * as Units_ from 'maas-schemas-ts/core/components/units';
import * as Common_ from 'maas-schemas-ts/core/components/common';

type Defined =
  | Record
  | Array
  | string
  | boolean
  | number
  | null;
const Defined = t.union([
  t.UnknownRecord,
  t.UnknownArray,
  t.string,
  t.boolean,
  t.number,
  t.null,
]);

export const schemaId =
  'http://maasglobal.com/maas-backend/customers/verification/verification-object.json';

// Verification
// The purpose of this remains a mystery
export type Verification = t.Branded<
  {
    id?: string;
    identityId?: Units_.IdentityId;
github maasglobal / maas-schemas / maas-schemas-ts / src / maas-backend / geocoding / geocoding-query / request.ts View on Github external
import * as t from 'io-ts';
import * as Units_ from 'maas-schemas-ts/core/components/units';
import * as UnitsGeo_ from 'maas-schemas-ts/core/components/units-geo';
import * as I18n_ from 'maas-schemas-ts/core/components/i18n';
import * as ApiCommon_ from 'maas-schemas-ts/core/components/api-common';

type Defined =
  | Record
  | Array
  | string
  | boolean
  | number
  | null;
const Defined = t.union([
  t.UnknownRecord,
  t.UnknownArray,
  t.string,
  t.boolean,
  t.number,
  t.null,
]);

export const schemaId =
  'http://maasglobal.com/maas-backend/geocoding/geocoding-query/request.json';

// Request
// The default export. More information at the top.
export type Request = t.Branded<
  {
    identityId?: Units_.IdentityId;
    payload?: {
github maasglobal / maas-schemas / maas-schemas-ts / src / maas-backend / subscriptions / subscriptions-customer-retrieve / request.ts View on Github external
*/

import * as t from 'io-ts';
import * as Units_ from 'maas-schemas-ts/core/components/units';
import * as ApiCommon_ from 'maas-schemas-ts/core/components/api-common';

type Defined =
  | Record
  | Array
  | string
  | boolean
  | number
  | null;
const Defined = t.union([
  t.UnknownRecord,
  t.UnknownArray,
  t.string,
  t.boolean,
  t.number,
  t.null,
]);

export const schemaId =
  'http://maasglobal.com/maas-backend/subscriptions/subscriptions-customer-retrieve/request.json';

// Request
// The default export. More information at the top.
export type Request = t.Branded<
  {
    userId?: Units_.IdentityId;
    customerId?: Units_.IdentityId;
github maasglobal / maas-schemas / maas-schemas-ts / src / core / components / place.ts View on Github external
*/

import * as t from 'io-ts';
import * as UnitsGeo_ from 'maas-schemas-ts/core/components/units-geo';
import * as Address_ from 'maas-schemas-ts/core/components/address';
import * as Station_ from 'maas-schemas-ts/core/components/station';

type Defined =
  | Record
  | Array
  | string
  | boolean
  | number
  | null;
const Defined = t.union([
  t.UnknownRecord,
  t.UnknownArray,
  t.string,
  t.boolean,
  t.number,
  t.null,
]);

export const schemaId = 'http://maasglobal.com/core/components/place.json';

// Place
// The default export. More information at the top.
export type Place = t.Branded<
  {} & {
    lat: Defined;
    lon: Defined;
  } & (UnitsGeo_.RelaxedLocation & {
github maasglobal / maas-schemas / maas-schemas-ts / src / maas-backend / webhooks / webhooks-payments / response.ts View on Github external
!!! AUTO GENERATED BY CONVERT.TS REFRAIN FROM MANUAL EDITING !!!

*/

import * as t from 'io-ts';

type Defined =
  | Record
  | Array
  | string
  | boolean
  | number
  | null;
const Defined = t.union([
  t.UnknownRecord,
  t.UnknownArray,
  t.string,
  t.boolean,
  t.number,
  t.null,
]);

export const schemaId =
  'http://maasglobal.com/maas-backend/webhooks/webhooks-payments/response.json';

// AvainpayResponse
// The purpose of this remains a mystery
export type AvainpayResponse = t.Branded<
  {
    action_str?: string;
    data_type?: string;
github maasglobal / maas-schemas / maas-schemas-ts / src / maas-backend / customers / customer.ts View on Github external
import * as Units_ from 'maas-schemas-ts/core/components/units';
import * as PersonalData_ from 'maas-schemas-ts/maas-backend/customers/personalData';
import * as PaymentSource_ from 'maas-schemas-ts/maas-backend/customers/payment-sources/paymentSource';
import * as Fare_ from 'maas-schemas-ts/core/components/fare';
import * as Region_ from 'maas-schemas-ts/core/region';
import * as Authorization_ from 'maas-schemas-ts/core/components/authorization';

type Defined =
  | Record
  | Array
  | string
  | boolean
  | number
  | null;
const Defined = t.union([
  t.UnknownRecord,
  t.UnknownArray,
  t.string,
  t.boolean,
  t.number,
  t.null,
]);

export const schemaId = 'http://maasglobal.com/maas-backend/customers/customer.json';

// Customer
// The default export. More information at the top.
export type Customer = t.Branded<
  {
    identityId?: Units_.IdentityId;
    profileImageUrl?: string;
    personalData?: PersonalData_.PersonalData;