<commit_before>/**
 * Types for things in the Zulip data model, as seen in the API.
 *
 * @flow strict
 */

//
//
//
// ===================================================================
// Data attached to the realm or the server.
//
//

export type ImageEmojiType = $ReadOnly<{|
  author?: $ReadOnly<{|
    email: string,
    full_name: string,
    id: number,
  |}>,
  deactivated: boolean,
  id?: number,
  code: string,
  name: string,
  source_url: string,
  // This prevents accidentally using this type as a map.
  // See https://github.com/facebook/flow/issues/4257#issuecomment-321951793
  [empty]: mixed,
|}>;

export type RealmEmojiById = $ReadOnly<{
  [id: string]: ImageEmojiType,
}>;

export type RealmFilter = [string, string, number];

//
//
//
// ===================================================================
// Users and data about them.
//
//

export type DevUser = {|
  realm_uri: string,
  email: string,
|};

/**
 * A Zulip user.
 *
 * This is a user object as found in properties `realm_users` and
 * `realm_non_active_users` of a `/register` response.
 *
 * For details on the properties, see the Zulip API docs on `/users`:
 *   https://zulipchat.com/api/get-all-users#response<commit_msg>flow: Remove an old workaround that causes its own trouble.<commit_after>/**
 * Types for things in the Zulip data model, as seen in the API.
 *
 * @flow strict
 */

//
//
//
// ===================================================================
// Data attached to the realm or the server.
//
//

export type ImageEmojiType = $ReadOnly<{|
  author?: $ReadOnly<{|
    email: string,
    full_name: string,
    id: number,
  |}>,
  deactivated: boolean,
  id?: number,
  code: string,
  name: string,
  source_url: string,
|}>;

export type RealmEmojiById = $ReadOnly<{
  [id: string]: ImageEmojiType,
}>;

export type RealmFilter = [string, string, number];

//
//
//
// ===================================================================
// Users and data about them.
//
//

export type DevUser = {|
  realm_uri: string,
  email: string,
|};

/**
 * A Zulip user.
 *
 * This is a user object as found in properties `realm_users` and
 * `realm_non_active_users` of a `/register` response.
 *
 * For details on the properties, see the Zulip API docs on `/users`:
 *   https://zulipchat.com/api/get-all-users#response
{'fraction_non_alphanumeric': 0.2443303380402225, 'fraction_numerical': 0.005562687205819427, 'mean_word_length': 3.5222437137330753, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1838275', 'n_tokens_mistral': 757, 'n_tokens_neox': 734, 'n_words': 227}