Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
t.type({
account: t.string,
}),
t.partial({
universe: t.string,
marketId: t.string,
outcome: t.number,
}),
]);
const getUserAccountParams = t.partial({
universe: t.string,
account: t.string,
});
const getProfitLossSummaryParams = t.partial({
universe: t.string,
account: t.string,
endTime: t.number,
});
const getProfitLossParams = t.intersection([
getProfitLossSummaryParams,
t.partial({
startTime: t.number,
periodInterval: t.number,
outcome: t.number,
}),
]);
export interface AccountTimeRangedStatsResult {
// Yea. The ProfitLossChanged event then
import { MessageStatusValue } from "./MessageStatusValue";
import { Timestamp } from "./Timestamp";
/**
*
*/
import * as t from "io-ts";
import { strictInterfaceWithOptionals } from "../../utils/types";
// required attributes
const MessageStatusR = t.interface({});
// optional attributes
const MessageStatusO = t.partial({
status: MessageStatusValue,
updateAt: Timestamp
});
export const MessageStatus = strictInterfaceWithOptionals(
MessageStatusR.props,
MessageStatusO.props,
"MessageStatus"
);
export type MessageStatus = t.TypeOf;
import * as t from 'io-ts';
export const schemaId =
'http://maasglobal.com/core/components/personalDataAllowItem.json';
// PersonalDataAllowItem
// The default export. More information at the top.
export type PersonalDataAllowItem = t.Branded<
{
type?: 'allOf' | 'anyOf';
items?: Array;
},
PersonalDataAllowItemBrand
>;
export const PersonalDataAllowItem = t.brand(
t.partial({
type: t.union([t.literal('allOf'), t.literal('anyOf')]),
items: t.array(t.string),
}),
(
x,
): x is t.Branded<
{
type?: 'allOf' | 'anyOf';
items?: Array;
},
PersonalDataAllowItemBrand
> => true,
'PersonalDataAllowItem',
);
export interface PersonalDataAllowItemBrand {
readonly PersonalDataAllowItem: unique symbol;
import * as Profile_ from 'maas-schemas-ts/core/profile';
export const schemaId =
'http://maasglobal.com/maas-backend/profile/profile-favoriteLocations-add/response.json';
// Response
// The default export. More information at the top.
export type Response = t.Branded<
{
profile?: Profile_.Profile;
debug?: {};
},
ResponseBrand
>;
export const Response = t.brand(
t.partial({
profile: Profile_.Profile,
debug: t.type({}),
}),
(
x,
): x is t.Branded<
{
profile?: Profile_.Profile;
debug?: {};
},
ResponseBrand
> => true,
'Response',
);
export interface ResponseBrand {
readonly Response: unique symbol;
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
>;
export const MODE_SCOOTER = t.brand(
t.partial({
scooter: t.intersection([
t.partial({
id: t.string,
}),
t.type({
id: Defined,
}),
]),
}),
(
x,
): x is t.Branded<
{
scooter?: {
id?: string;
} & {
logAlias,
fields: { container, host, pod, tiebreaker, timestamp },
logColumns,
};
};
/**
* Static source configuration as read from the configuration file
*/
const StaticSourceConfigurationFieldsRuntimeType = runtimeTypes.partial({
...SavedSourceConfigurationFieldsRuntimeType.props,
message: runtimeTypes.array(runtimeTypes.string),
});
export const StaticSourceConfigurationRuntimeType = runtimeTypes.partial({
name: runtimeTypes.string,
description: runtimeTypes.string,
metricAlias: runtimeTypes.string,
logAlias: runtimeTypes.string,
fields: StaticSourceConfigurationFieldsRuntimeType,
logColumns: runtimeTypes.array(SavedSourceConfigurationColumnRuntimeType),
});
export interface InfraStaticSourceConfiguration
extends runtimeTypes.TypeOf {}
/**
* Full source configuration type after all cleanup has been done at the edges
*/
const SourceConfigurationFieldsRuntimeType = runtimeTypes.type({
t.type({
name: t.string,
street: t.string,
city: t.string,
state: t.string,
postcode: t.string,
country: t.string,
branch: t.string,
ts: t.number,
date: t.string,
amount: t.number,
unit: t.string,
email: t.string,
payment_source: t.string,
id: t.string,
extra_data: t.partial({
comment: t.string,
aud_value: t.number
})
}),
t.partial({
_id: t.string,
})
])
export type Donation = t.TypeOf
export interface DonationsResp {donations: Donation[], totalDonations: number, pageN: number, limit: number, sortMethod: number}
export interface RoleResp {role: string, users: UserV1Object[]}
export interface RolesResp {roles: string[]}
import * as t from "io-ts";
import * as Knex from "knex";
import { Dict, Maybe } from "./util-types";
import { has } from "lodash";
import { ColumnSelection } from "./SingleSourceQueryOperationResolver";
import { AliasHierarchyVisitor } from "./AliasHierarchyVisitor";
export const BasePaginationConfigRT = t.partial({
pageSize: t.union([
t.number,
t.partial({
max: t.number,
default: t.number,
}),
]),
});
export const AutoPaginationConfigRT = t.intersection([
t.interface({
cursorColumn: t.string,
}),
BasePaginationConfigRT,
]);
export const Request = t.brand(
t.intersection([
t.partial({
payload: t.intersection([
t.partial({
id: t.string,
type: t.string,
data: t.partial({
object: t.partial({
id: t.string,
amount: t.number,
amount_capturable: t.number,
amount_received: t.number,
charges: t.partial({
data: t.array(
t.partial({
id: t.string,
object: t.string,
amount: t.number,
amount_refunded: t.number,
}),
),
}),
}),
}),
}),
t.type({
type: Defined,
id: Defined,
data: Defined,
}),
]),
startTimeReturn: Units_.Time,
endTimeReturn: Units_.Time,
}),
t.type({
startTime: Defined,
endTime: Defined,
}),
]),
reusable: t.boolean,
reconcilable: t.boolean,
restrictions: t.partial({
singleDevice: t.boolean,
skipRestrictionCheck: t.boolean,
freeTicket: t.type({}),
}),
surcharges: t.partial({
midnight: Surcharge,
pickup: Surcharge,
}),
cancellation: t.partial({
cancellationFormActionUrl: Units_.Url,
outward: Cancellation,
return: Cancellation,
}),
amendment: t.partial({
outward: Amendment,
return: Amendment,
}),
fareRates: t.array(
t.intersection([
t.partial({
amount: t.number,