File

projects/netgrif-components-core/src/commons/schema.ts

Index

Properties

Properties

name
name:
params
params: object
Type : object
export type Resources =
    | Resource
    | Array<Resource>;

/**
 * Schema for NAE configuration object
 */
export interface NetgrifApplicationEngine {
    providers: SetAuthAndResourcesAddress;
    theme: Theme;
    locales?: Locales;
    filters?: Filters;
    views: Views;
    services?: Services;

    [k: string]: any;
}

export interface Locales {
    /**
     * Key is locale code (ISO639-1 '-' ISO3166-1)
     * Value is a file of translation
     */
    [k: string]: string;
}

export interface SetAuthAndResourcesAddress {
    auth: Auth;
    resources: Resources;

    [k: string]: any;
}

export interface Auth {
    address: string;
    authentication: string;
    sessionBearer?: string;
    endpoints?: string | { [k: string]: string };

    [k: string]: any;
}

export interface Resource {
    name: string;
    address: string;
    format: string;
    openApi?: string;
}

export interface Theme {
    name: string;
    pallets: {
        light: {
            primary:
                string
                | {
                '50'?: string;
                '100'?: string;
                '200'?: string;
                '300'?: string;
                '400'?: string;
                '500'?: string;
                '600'?: string;
                '700'?: string;
                '800'?: string;
                '900'?: string;
                contrast?: { 'light': Array<string>; 'dark': Array<string>; };
                [k: string]: any;
            };
            secondary?:
                string
                | {
                '50'?: string;
                '100'?: string;
                '200'?: string;
                '300'?: string;
                '400'?: string;
                '500'?: string;
                '600'?: string;
                '700'?: string;
                '800'?: string;
                '900'?: string;
                contrast?: { 'light': Array<string>; 'dark': Array<string>; };
                [k: string]: any;
            };
            warn?:
                string
                | {
                '50'?: string;
                '100'?: string;
                '200'?: string;
                '300'?: string;
                '400'?: string;
                '500'?: string;
                '600'?: string;
                '700'?: string;
                '800'?: string;
                '900'?: string;
                contrast?: { 'light': Array<string>; 'dark': Array<string>; };
                [k: string]: any;
            };
            [k: string]: any;
        };
        dark?: {
            primary?:
                string
                | {
                '50'?: string;
                '100'?: string;
                '200'?: string;
                '300'?: string;
                '400'?: string;
                '500'?: string;
                '600'?: string;
                '700'?: string;
                '800'?: string;
                '900'?: string;
                contrast?: { 'light': Array<string>; 'dark': Array<string>; };
                [k: string]: any;
            };
            secondary?:
                string
                | {
                '50'?: string;
                '100'?: string;
                '200'?: string;
                '300'?: string;
                '400'?: string;
                '500'?: string;
                '600'?: string;
                '700'?: string;
                '800'?: string;
                '900'?: string;
                contrast?: { 'light': Array<string>; 'dark': Array<string>; };
                [k: string]: any;
            };
            warn?:
                string
                | {
                '50'?: string;
                '100'?: string;
                '200'?: string;
                '300'?: string;
                '400'?: string;
                '500'?: string;
                '600'?: string;
                '700'?: string;
                '800'?: string;
                '900'?: string;
                contrast?: { 'light': Array<string>; 'dark': Array<string>; };
                [k: string]: any;
            };
            [k: string]: any;
        };
        [k: string]: any;
    };

    [k: string]: any;
}

export interface Filters {
    [k: string]: ConfigFilter;
}

export interface ConfigFilter {
    title: string;
    access?: string;
    body: object | Array<object>;
    type: 'Task' | 'Case';
    mergeOperator?: 'AND' | 'OR';

    [k: string]: any;
}

export interface Views {
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^[a-zA-Z0-9_]+$".
     */
    [k: string]: View;
}

export interface View {
    layout?: {
        name: string;
        enableCaseTitle?: boolean;
        isCaseTitleRequired?: boolean;
        showDeleteMenu?: boolean;
        confirmWorkflowDeletion?: boolean;
        params?: {
            orientation?: string;
            [k: string]: any;
        };
        /**
         * Override autogenerated name. 'Component' will be appended automatically.
         */
        componentName?: string;
        [k: string]: any;
    };
    /**
     * Use own custom component for this view
     */
    component?: {
        class: string;
        from: string;
    };
    // layout: CaseLayout | TaskLayout;
    access:
        | 'public' | 'private'
        | Access;
    navigation:
        | boolean
        | {
        title?: string;
        icon?: string;
        translate?: boolean;
        [k: string]: any;
    };
    children?: Views;
    routing: {
        path: string;
        match?: boolean;
    };

    [k: string]: any;
}

/**
 * Defines the access constraints of an application view
 */
export interface Access {
    /**
     * `string` and `Array<string>` types are deprecated and support for them will be removed in a future version.
     *
     *  For `string` values the format is: <net import id>.<role name>
     */
    role?: Array<string> | string | RoleAccess | Array<RoleAccess>;
    bannedRole?: Array<string> | string | RoleAccess | Array<RoleAccess>;
    group?: Array<string> | string;
    authority?: Array<string> | string;

    [k: string]: any;
}

/**
 * Defines a single role access constraint
 */
export interface RoleAccess {
    /**
     * Process identifier (import ID)
     */
    processId: string;
    /**
     * Role import ID
     */
    roleId: string;
}

export interface CaseLayout {
    name: 'caseView';
    params: object;
}

export interface TaskLayout {
    name: 'taskView';
    params: object;
}

export interface Services {
    log?: {
        level?: string;
        logWithDate?: boolean;
        serializeParams?: boolean;
        includeLogLevel?: boolean;
        publishers?: Array<any>;
        [k: string]: any;
    };
    auth?: {
        /**
         * @deprecated in 6.3.0 use [onLogoutRedirect]{@link Services#auth.onLogoutRedirect} instead
         *
         * Determines the route the application should redirect to when the logout action is performed
         *
         * This value should be retrieved by calling the [getOnLogoutPath]{@link ConfigurationService#getOnLogoutPath} method of the
         * {@link ConfigurationService} as it handles fall backs on deprecated attributes.
         */
        logoutRedirect?: string;
        /**
         * @deprecated in 6.3.0 use [toLoginRedirect]{@link Services#auth.toLoginRedirect} instead
         *
         * Determines the route the application should redirect to when a guard prevents entry to some route
         *
         * This value should be retrieved by calling the [getToLoginPath]{@link ConfigurationService#getToLoginPath} method of the
         * {@link ConfigurationService} as it handles fall backs on deprecated attributes.
         */
        loginRedirect?: string;
        /**
         * Determines the route the application should redirect to when the logout action is performed
         *
         * This value should be retrieved by calling the [getOnLogoutPath]{@link ConfigurationService#getOnLogoutPath} method of the
         * {@link ConfigurationService} as it handles fall backs on deprecated attributes.
         */
        onLogoutRedirect?: string;
        /**
         * Determines the route the application should redirect to when a guard prevents entry to some route
         *
         * This value should be retrieved by calling the [getToLoginPath]{@link ConfigurationService#getToLoginPath} method of the
         * {@link ConfigurationService} as it handles fall backs on deprecated attributes.
         */
        toLoginRedirect?: string;
        /**
         * Determines the route the application should redirect to when the login action is performed
         *
         * This value should be retrieved by calling the [getOnLoginPath]{@link ConfigurationService#getOnLoginPath} method of the
         * {@link ConfigurationService}
         */
        onLoginRedirect?: string;
    };
    routing?: {
        defaultRedirect?: string;
        wildcardRedirect?: string;
    };
    dataFields?: {
        template?: string,
        appearance?: string
    };
    legal: {
        termsOfService: string,
        privacyPolicy: string
    };
    groupNavigation?: {
        groupNavigationRoute: string,
    };

    [k: string]: any;
}

result-matching ""

    No results matching ""