# Type Alias ViewTemplate

type ViewTemplate = {
authorise_get?: (
opts: { query: any; req: NonNullable<any>; table_id: number },
queries: any,
) => Promise<boolean>;
authorise_post?: (
opts: { body: any; req: NonNullable<any>; table_id: number },
queries: any,
) => Promise<boolean>;
configCheck?: (
cfg: any,
) => Promise<string[] | { errors: string[]; warnings: string[] }>;
configuration_workflow?: (req: Req) => AbstractWorkflow;
connectedObjects?: (configuration?: any) => Promise<ConnectedObjects>;
default_state_form?: (arg0: { default_state: any }) => any;
description?: string;
get_state_fields?: (
table_id: number | string | undefined,
viewname: string,
configuration: any,
) => Promise<FieldLike[]> | FieldLike[];
getStringsForI18n?: (configuration?: any) => string[];
initial_config?: (arg0: { table_id: number }) => Promise<any>;
interpolate_title_string?: (
table_id: number | string | undefined,
title: string,
query: any,
) => Promise<string>;
mobile_render_server_side?: boolean;
name: string;
on_delete?: (
table_id: number,
viewname: string,
configuration: { default_state: any },
) => Promise<void>;
openDataStream?: (
table_id: number | undefined,
viewName: string,
id: number | undefined,
fieldName: string,
fieldView: string,
user: any,
configuration: any,
targetOpts: any,
) => Promise<any>;
queries?: (configuration?: any, req?: any) => Record<string, any>;
renderRows?: (
table: AbstractTable,
viewname: string,
{ columns, layout }: { columns: Column[]; layout: Layout },
extra: any,
rows: Row[],
state: any,
) => Promise<string[]>;
routes?: Record<string, RouteAction>;
run: (
table_id: string | number | undefined,
viewname: string,
opts: any,
state: any,
arg4: RunExtra,
queries: any,
) => Promise<string>;
runMany?: (
table_id: number,
viewname: string,
{ columns, layout }: { columns: Column[]; layout: Layout },
state: any,
extra: RunExtra,
queries: any,
) => Promise<string[]>;
runPost?: (
table_id: number | number | undefined,
viewname: string,
optsOne: {
columns: any[];
fixed: any;
formula_destinations: any;
layout: Layout;
view_when_done: any;
},
state: GenObj,
body: GenObj,
extraArgs: RunExtra,
queries: any,
remote?: boolean,
) => Promise<void>;
singleton?: boolean;
table_optional?: boolean;
tableless?: boolean;
view_quantity?: "Many" | "ZeroOrOne" | "One";
virtual_triggers?: (
table_id: number | undefined,
name: string,
configuration: any,
) => Promise<AbstractTrigger[]>;
}

- Defined in base_types.ts:253

##### Index

### Properties

authorise_get?
authorise_post?
configCheck?
configuration_workflow?
connectedObjects?
default_state_form?
description?
get_state_fields?
getStringsForI18n?
initial_config?
interpolate_title_string?
mobile_render_server_side?
name
on_delete?
openDataStream?
queries?
renderRows?
routes?
run
runMany?
runPost?
singleton?
table_optional?
tableless?
view_quantity?
virtual_triggers?

## Properties

### `Optional` authorise_get

authorise_get?: (
opts: { query: any; req: NonNullable<any>; table_id: number },
queries: any,
) => Promise<boolean>

- Defined in base_types.ts:313

### `Optional` authorise_post

authorise_post?: (
opts: { body: any; req: NonNullable<any>; table_id: number },
queries: any,
) => Promise<boolean>

- Defined in base_types.ts:300

### `Optional` configCheck

configCheck?: (
cfg: any,
) => Promise<string[] | { errors: string[]; warnings: string[] }>

- Defined in base_types.ts:268

### `Optional` configuration_workflow

configuration_workflow?: (req: Req) => AbstractWorkflow

- Defined in base_types.ts:265

### `Optional` connectedObjects

connectedObjects?: (configuration?: any) => Promise<ConnectedObjects>

- Defined in base_types.ts:358

### `Optional` default_state_form

default_state_form?: (arg0: { default_state: any }) => any

- Defined in base_types.ts:350

### `Optional` description

description?: string

- Defined in base_types.ts:255

### `Optional` get_state_fields

get_state_fields?: (
table_id: number | string | undefined,
viewname: string,
configuration: any,
) => Promise<FieldLike[]> | FieldLike[]

- Defined in base_types.ts:260

### `Optional` getStringsForI18n

getStringsForI18n?: (configuration?: any) => string[]

- Defined in base_types.ts:349

### `Optional` initial_config

initial_config?: (arg0: { table_id: number }) => Promise<any>

- Defined in base_types.ts:267

### `Optional` interpolate_title_string

interpolate_title_string?: (
table_id: number | string | undefined,
title: string,
query: any,
) => Promise<string>

- Defined in base_types.ts:308

### `Optional` mobile_render_server_side

mobile_render_server_side?: boolean

- Defined in base_types.ts:259

### name

name: string

- Defined in base_types.ts:254

### `Optional` on_delete

on_delete?: (
table_id: number,
viewname: string,
configuration: { default_state: any },
) => Promise<void>

- Defined in base_types.ts:295

### `Optional` openDataStream

openDataStream?: (
table_id: number | undefined,
viewName: string,
id: number | undefined,
fieldName: string,
fieldView: string,
user: any,
configuration: any,
targetOpts: any,
) => Promise<any>

- Defined in base_types.ts:338

### `Optional` queries

queries?: (configuration?: any, req?: any) => Record<string, any>

- Defined in base_types.ts:357

### `Optional` renderRows

renderRows?: (
table: AbstractTable,
viewname: string,
{ columns, layout }: { columns: Column[]; layout: Layout },
extra: any,
rows: Row[],
state: any,
) => Promise<string[]>

- Defined in base_types.ts:287

### `Optional` routes

routes?: Record<string, RouteAction>

- Defined in base_types.ts:351

### run

run: (
table_id: string | number | undefined,
viewname: string,
opts: any,
state: any,
arg4: RunExtra,
queries: any,
) => Promise<string>

- Defined in base_types.ts:271

### `Optional` runMany

runMany?: (
table_id: number,
viewname: string,
{ columns, layout }: { columns: Column[]; layout: Layout },
state: any,
extra: RunExtra,
queries: any,
) => Promise<string[]>

- Defined in base_types.ts:279

### `Optional` runPost

runPost?: (
table_id: number | number | undefined,
viewname: string,
optsOne: {
columns: any[];
fixed: any;
formula_destinations: any;
layout: Layout;
view_when_done: any;
},
state: GenObj,
body: GenObj,
extraArgs: RunExtra,
queries: any,
remote?: boolean,
) => Promise<void>

- Defined in base_types.ts:321

### `Optional` singleton

singleton?: boolean

- Defined in base_types.ts:258

### `Optional` table_optional

table_optional?: boolean

- Defined in base_types.ts:257

### `Optional` tableless

tableless?: boolean

- Defined in base_types.ts:256

### `Optional` view_quantity

view_quantity?: "Many" | "ZeroOrOne" | "One"

- Defined in base_types.ts:266

### `Optional` virtual_triggers

virtual_triggers?: (
table_id: number | undefined,
name: string,
configuration: any,
) => Promise<AbstractTrigger[]>

- Defined in base_types.ts:352