# Variable room

room: {
authorize_join: (
opts: { participant_field: object },
room_id: string,
user: object,
) => Promise<object>;
configuration_workflow: (req: object) => Workflow;
connectedObjects: (configuration: any) => Promise<ConnectedObjects>;
description: string;
get_state_fields: () => object[];
name: string;
noAutoTest: boolean;
queries: (
__namedParameters: {
configuration: { columns: any; default_state: any };
req: any;
table_id: any;
viewname: any;
},
) => {
ackReadQuery(
participant_field: any,
participant_maxread_field: any,
body: any,
): Promise<
| { json: { error: string; success?: undefined } }
| { json: { error?: undefined; success: string } },
>;
fetchOlderMsgQuery(participant_field: any, body: any): Promise<Row | null>;
getRowQuery(
state_id: any,
part_table_name: any,
part_user_field: any,
part_key_to_room: any,
): Promise<Row | null>;
optionsQuery(
reftable_name: any,
type: any,
attributes: any,
where: any,
): Promise<any>;
submitAjaxQuery(
msg_relation: any,
participant_field: any,
body: any,
msgform: any,
msgsender_field: any,
participant_maxread_field: any,
): Promise<
| {
json: {
error?: undefined;
msgid: { error: string }
| { success: PrimaryKeyValue };
};
}
| { json: { error: any; msgid?: undefined } },
>;
updateQuery(
partRow: any,
part_table_name: any,
max_read_id: any,
part_maxread_field: any,
): Promise<void>;
};
routes: boolean;
run: (
table_id: string,
viewname: string,
optsOne: {
msg_relation: string;
msgform: string;
msgsender_field: any;
msgview: string;
participant_field: string;
participant_maxread_field: string;
},
state: object,
optsTwo: { req: object; res: object },
__namedParameters: {
getRowQuery: any;
optionsQuery: any;
updateQuery: any;
},
) => Promise<TagFunction>;
virtual_triggers: (
table_id: any,
viewname: string,
opts: {
msg_relation: string;
msgform: any;
msgsender_field: string;
msgview: string;
participant_field: any;
participant_maxread_field: any;
},
) => object[];
getStringsForI18n(): object[];
}

#### Type Declaration

- ##### authorize_join: (
  opts: { participant_field: object },
  room_id: string,
  user: object,
  ) => Promise<object>

- ##### configuration_workflow: (req: object) => Workflow

- ##### connectedObjects: (configuration: any) => Promise<ConnectedObjects>

- ##### description: string

- ##### get_state_fields: () => object[]

- ##### name: string

- ##### noAutoTest: boolean

- ##### queries: (
  __namedParameters: {
  configuration: { columns: any; default_state: any };
  req: any;
  table_id: any;
  viewname: any;
  },
  ) => {
  ackReadQuery(
  participant_field: any,
  participant_maxread_field: any,
  body: any,
  ): Promise<
  | { json: { error: string; success?: undefined } }
  | { json: { error?: undefined; success: string } },
  >;
  fetchOlderMsgQuery(participant_field: any, body: any): Promise<Row | null>;
  getRowQuery(
  state_id: any,
  part_table_name: any,
  part_user_field: any,
  part_key_to_room: any,
  ): Promise<Row | null>;
  optionsQuery(
  reftable_name: any,
  type: any,
  attributes: any,
  where: any,
  ): Promise<any>;
  submitAjaxQuery(
  msg_relation: any,
  participant_field: any,
  body: any,
  msgform: any,
  msgsender_field: any,
  participant_maxread_field: any,
  ): Promise<
  | {
  json: {
  error?: undefined;
  msgid: { error: string }
  | { success: PrimaryKeyValue };
  };
  }
  | { json: { error: any; msgid?: undefined } },
  >;
  updateQuery(
  partRow: any,
  part_table_name: any,
  max_read_id: any,
  part_maxread_field: any,
  ): Promise<void>;
  }

- ##### routes: boolean

- ##### run: (
  table_id: string,
  viewname: string,
  optsOne: {
  msg_relation: string;
  msgform: string;
  msgsender_field: any;
  msgview: string;
  participant_field: string;
  participant_maxread_field: string;
  },
  state: object,
  optsTwo: { req: object; res: object },
  __namedParameters: {
  getRowQuery: any;
  optionsQuery: any;
  updateQuery: any;
  },
  ) => Promise<TagFunction>

  #### Throws

- ##### virtual_triggers: (
  table_id: any,
  viewname: string,
  opts: {
  msg_relation: string;
  msgform: any;
  msgsender_field: string;
  msgview: string;
  participant_field: any;
  participant_maxread_field: any;
  },
  ) => object[]

- ##### getStringsForI18n: function

  - getStringsForI18n(): object[]

    #### Returns object[]

    - Defined in packages/saltcorn-data/base-plugin/viewtemplates/room.js:671

- Defined in packages/saltcorn-data/base-plugin/viewtemplates/room.js:628