Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import * as Booking_ from 'maas-schemas-ts/core/booking';
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-receipt/request.json';
// Request
// The default export. More information at the top.
export type Request = t.Branded<
{
tspId?: Booking_.TspId;
} & {
tspId: Defined;
},
RequestBrand
>;
export const Request = t.brand(
t.intersection([
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/core/modes/MODE_SHARED_BICYCLE.json';
// MODE_SHARED_BICYCLE
// The default export. More information at the top.
export type MODE_SHARED_BICYCLE = t.Branded<
{
bike?: {
id?: string;
type?: string;
} & {
id: Defined;
};
},
MODE_SHARED_BICYCLEBrand
import * as Units_ from 'maas-schemas-ts/core/components/units';
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/media/list/request.json';
// Request
// The default export. More information at the top.
export type Request = t.Branded<
{
identityId?: Units_.IdentityId;
customerId?: Units_.IdentityId;
} & {
identityId: Defined;
customerId: Defined;
},
RequestBrand
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/core/modes/MODE_SCOOTER.json';
// MODE_SCOOTER
// The default export. More information at the top.
export type MODE_SCOOTER = t.Branded<
{
scooter?: {
id?: string;
} & {
id: Defined;
};
},
MODE_SCOOTERBrand
>;
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/itineraries/itinerary-list/request.json';
// Request
// The default export. More information at the top.
export type Request = t.Branded<
{
identityId?: Units_.IdentityId;
payload?: {
startTime?: Units_.Time;
endTime?: Units_.Time;
states?: string;
bookingId?: Booking_.Id;
originalFare?: string;
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/retrieve/request.json';
// Request
// The default export. More information at the top.
export type Request = t.Branded<
{
identityId?: Units_.IdentityId;
customerId?: Units_.IdentityId;
headers?: ApiCommon_.Headers;
} & {
identityId: Defined;
customerId: Defined;
headers: Defined;
import * as Fare_ from 'maas-schemas-ts/core/components/fare';
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/profile.json';
// SubscriptionInstance
// The purpose of this remains a mystery
export type SubscriptionInstance = t.Branded<
{
id?: number;
name?: string;
plan?: {
id?: string;
} & {
id: Defined;
};
addons?: Array;
t.literal('InfoMessage'),
t.literal('ZendeskReply'),
t.literal('VerificationUpdate'),
]),
data: t.union([
t.intersection([
t.partial({
objectType: t.union([t.literal('Itinerary'), t.literal('Booking')]),
ids: t.array(Units_.Uuid),
}),
t.type({
objectType: Defined,
ids: Defined,
}),
]),
t.null,
t.intersection([
t.partial({
objectType: t.union([t.literal('Profile'), t.literal('Subscription')]),
ids: t.array(Units_.IdentityId),
}),
t.type({
objectType: Defined,
ids: Defined,
}),
]),
]),
}),
t.type({
identityId: Defined,
severity: Defined,
badge: Defined,
});
const runStatus = t.union([
t.literal('scheduled'),
t.literal('running'),
t.literal('paused'),
t.literal('finished'),
t.literal('error'),
]);
const runEntity = t.type({
ID: t.string,
job: t.string,
status: runStatus,
scheduled_at: t.string,
started_at: t.union([t.string, t.null]),
finished_at: t.union([t.string, t.null]),
rest_url: t.string,
job_url: t.string,
console_url: t.string,
});
const runResponse = t.array(runEntity);
const dispatchResponse = runEntity;
export const jobsDelta = ({ ajax$ }: JobsServices) => (
actions$: Stream,
state$: Property,
): Observable => {
const fetch$ = state$
.sampledBy(
CarRentalBrand
>;
export const CarRental = t.brand(
t.intersection([
t.partial({
id: t.string,
name: t.string,
description: t.string,
image: Units_.Url,
terms: t.unknown,
car: t.intersection([
t.partial({
passengers: t.number,
doors: t.array(t.number),
luggage: t.array(t.number),
transmission: t.union([t.literal('manual'), t.literal('automatic'), t.null]),
fuel: t.union([
t.literal('diesel'),
t.literal('electric'),
t.literal('ethanol'),
t.literal('gasoline'),
t.literal('hybrid'),
t.literal('hydrogen'),
t.literal('lpg'),
t.literal('multifuel'),
t.null,
]),
classification: t.union([ACRISS_.ACRISS, t.null]),
registrationPlate: t.string,
damage: t.string,
fuelLevel: t.number,
location: UnitsGeo_.Location,