intervention-pages
Version:
165 lines (164 loc) • 3.9 kB
TypeScript
import { PolymerElement } from '@polymer/polymer';
export declare type Constructor<T> = new (...args: any[]) => T;
export interface AnyObject {
[key: string]: any;
}
export declare type GenericObject<T> = {
[key: string]: T;
};
export declare type LocationObject = {
id: string;
name: string;
p_code: string;
parent: string;
gateway: {
id: number;
created: string;
modified: string;
name: string;
admin_level: null;
};
};
export declare type Section = {
id: string;
created: string;
modified: string;
name: string;
description: string;
alternate_id: null;
alternate_name: string;
dashboard: boolean;
color: string;
active: boolean;
};
export declare type Disaggregation = {
active: boolean;
disaggregation_values: DisaggregationValue[];
id: number;
name: string;
};
export declare type DisaggregationValue = {
active: boolean;
id: number;
value: string;
};
export interface Permission<T> {
edit: T;
required: T;
}
export interface UserPermissions {
ICT: boolean;
PME: boolean;
editAgreementDetails: boolean;
editInterventionDetails: boolean;
editPartnerDetails: boolean;
loggedInDefault: boolean;
partnershipManager: boolean;
userInfoMenu: boolean;
viewAgreementDetails: boolean;
viewInterventionDetails: boolean;
viewPartnerDetails: boolean;
}
export declare class MinimalUser {
first_name: string;
last_name: string;
middle_name: string;
name: string;
email: string;
}
export declare class User extends MinimalUser {
country: MinimalCountry;
country_override: number;
countries_available: MinimalCountry[];
groups: UserGroup[];
}
export interface UserGroup {
id: number;
name: string;
permissions: any[];
}
export interface EtoolsTab {
tab: string;
tabLabel: string;
hidden?: boolean;
showTabCounter?: boolean;
counter?: number;
}
export interface DomRepeatEvent extends CustomEvent {
model: any;
}
export declare class Paginator {
page: number;
page_size: number;
count: number | null;
visible_range: string[] | number[];
}
export interface CpStructure {
id: string;
name: string;
expired: boolean;
future: boolean;
active: boolean;
special: boolean;
invalid: boolean;
from_date: string;
to_date: string;
wbs: string;
}
export interface MinimalCountry {
id: number;
name: string;
business_area_code: string;
}
export interface Country extends MinimalCountry {
country_short_code: string;
initial_zoom: number;
latitude: string;
local_currency: string;
local_currency_code: string;
local_currency_id: number;
longitude: string;
}
export interface LabelAndValue {
label: string;
value: string;
}
export interface IdAndName {
id: string;
name: string;
}
export interface EnvFlags {
prp_mode_off: boolean;
prp_server_on: boolean;
active_flags?: string[];
}
export interface Office {
id: number;
name: string;
email: string;
username: string;
}
export interface ValidatableField extends PolymerElement {
invalid: boolean;
validate: () => any;
}
export interface RouteQueryParam {
[key: string]: string;
}
export interface RouteParams {
[key: string]: number | string;
}
export interface RouteQueryParams {
[key: string]: string;
}
export interface RouteCallbackParams {
matchDetails: string[];
queryParams: RouteQueryParams;
}
export interface RouteDetails {
routeName: string;
subRouteName: string | null;
path: string;
queryParams: RouteQueryParam | null;
params: RouteParams | null;
}