diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-24 16:34:46 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-24 16:34:46 +0200 |
commit | 1e5ed285141de779be3df51b7737400a57e12a8d (patch) | |
tree | 2f79208956b747d413d3da0a12c4a061721c4e42 /util | |
parent | generate schema (diff) | |
download | server-1e5ed285141de779be3df51b7737400a57e12a8d.tar.xz |
:sparkles: typeorm entities
Diffstat (limited to 'util')
-rw-r--r-- | util/src/entities/Application.ts | 111 | ||||
-rw-r--r-- | util/src/entities/AuditLog.ts | 147 | ||||
-rw-r--r-- | util/src/entities/Ban.ts | 34 | ||||
-rw-r--r-- | util/src/entities/BaseClass.ts | 61 | ||||
-rw-r--r-- | util/src/entities/Channel.ts | 104 | ||||
-rw-r--r-- | util/src/entities/ConnectedAccount.ts | 29 | ||||
-rw-r--r-- | util/src/entities/Emoji.ts | 39 | ||||
-rw-r--r-- | util/src/entities/Guild.ts | 179 | ||||
-rw-r--r-- | util/src/entities/Invite.ts | 60 | ||||
-rw-r--r-- | util/src/entities/Member.ts | 87 | ||||
-rw-r--r-- | util/src/entities/Message.ts | 260 | ||||
-rw-r--r-- | util/src/entities/RateLimit.ts | 25 | ||||
-rw-r--r-- | util/src/entities/ReadState.ts | 35 | ||||
-rw-r--r-- | util/src/entities/Relationship.ts | 26 | ||||
-rw-r--r-- | util/src/entities/Role.ts | 41 | ||||
-rw-r--r-- | util/src/entities/Team.ts | 27 | ||||
-rw-r--r-- | util/src/entities/TeamMember.ts | 31 | ||||
-rw-r--r-- | util/src/entities/Template.ts | 33 | ||||
-rw-r--r-- | util/src/entities/User.ts | 188 | ||||
-rw-r--r-- | util/src/entities/VoiceState.ts | 44 | ||||
-rw-r--r-- | util/src/entities/Webhook.ts | 40 | ||||
-rw-r--r-- | util/src/entities/index.ts | 21 | ||||
-rw-r--r-- | util/src/entities/schema.json | 19389 |
23 files changed, 21011 insertions, 0 deletions
diff --git a/util/src/entities/Application.ts b/util/src/entities/Application.ts new file mode 100644 index 00000000..64b5d2e2 --- /dev/null +++ b/util/src/entities/Application.ts @@ -0,0 +1,111 @@ +import { Column, Entity, JoinColumn, ManyToOne } from "typeorm"; +import { BaseClass } from "./BaseClass"; +import { Guild } from "./Guild"; +import { Team } from "./Team"; + +@Entity("applications") +export class Application extends BaseClass { + @Column() + name: string; + + @Column() + icon?: string; + + @Column() + description: string; + + @Column("simple-array") + rpc_origins?: string[]; + + @Column() + bot_public: boolean; + + @Column() + bot_require_code_grant: boolean; + + @Column() + terms_of_service_url?: string; + + @Column() + privacy_policy_url?: string; + + @Column() + owner_id: string; + + @Column() + summary?: string; + + @Column() + verify_key: string; + + @Column() + team_id: string; + + @JoinColumn({ name: "team_id" }) + @ManyToOne(() => Team, (team: Team) => team.id) + team?: Team; + + @Column() + guild_id: string; + + @JoinColumn({ name: "guild_id" }) + @ManyToOne(() => Guild, (guild: Guild) => guild.id) + guild: Guild; // if this application is a game sold, this field will be the guild to which it has been linked + + @Column() + primary_sku_id?: string; // if this application is a game sold, this field will be the id of the "Game SKU" that is created, + + @Column() + slug?: string; // if this application is a game sold, this field will be the URL slug that links to the store page + + @Column() + cover_image?: string; // the application's default rich presence invite cover image hash + + @Column() + flags: number; // the application's public flags +} + +export interface ApplicationCommand { + id: string; + application_id: string; + name: string; + description: string; + options?: ApplicationCommandOption[]; +} + +export interface ApplicationCommandOption { + type: ApplicationCommandOptionType; + name: string; + description: string; + required?: boolean; + choices?: ApplicationCommandOptionChoice[]; + options?: ApplicationCommandOption[]; +} + +export interface ApplicationCommandOptionChoice { + name: string; + value: string | number; +} + +export enum ApplicationCommandOptionType { + SUB_COMMAND = 1, + SUB_COMMAND_GROUP = 2, + STRING = 3, + INTEGER = 4, + BOOLEAN = 5, + USER = 6, + CHANNEL = 7, + ROLE = 8, +} + +export interface ApplicationCommandInteractionData { + id: string; + name: string; + options?: ApplicationCommandInteractionDataOption[]; +} + +export interface ApplicationCommandInteractionDataOption { + name: string; + value?: any; + options?: ApplicationCommandInteractionDataOption[]; +} diff --git a/util/src/entities/AuditLog.ts b/util/src/entities/AuditLog.ts new file mode 100644 index 00000000..53e99261 --- /dev/null +++ b/util/src/entities/AuditLog.ts @@ -0,0 +1,147 @@ +import { Column, Entity, JoinColumn, ManyToOne } from "typeorm"; +import { BaseClass } from "./BaseClass"; +import { ChannelPermissionOverwrite } from "./Channel"; +import { User } from "./User"; + +export enum AuditLogEvents { + GUILD_UPDATE = 1, + CHANNEL_CREATE = 10, + CHANNEL_UPDATE = 11, + CHANNEL_DELETE = 12, + CHANNEL_OVERWRITE_CREATE = 13, + CHANNEL_OVERWRITE_UPDATE = 14, + CHANNEL_OVERWRITE_DELETE = 15, + MEMBER_KICK = 20, + MEMBER_PRUNE = 21, + MEMBER_BAN_ADD = 22, + MEMBER_BAN_REMOVE = 23, + MEMBER_UPDATE = 24, + MEMBER_ROLE_UPDATE = 25, + MEMBER_MOVE = 26, + MEMBER_DISCONNECT = 27, + BOT_ADD = 28, + ROLE_CREATE = 30, + ROLE_UPDATE = 31, + ROLE_DELETE = 32, + INVITE_CREATE = 40, + INVITE_UPDATE = 41, + INVITE_DELETE = 42, + WEBHOOK_CREATE = 50, + WEBHOOK_UPDATE = 51, + WEBHOOK_DELETE = 52, + EMOJI_CREATE = 60, + EMOJI_UPDATE = 61, + EMOJI_DELETE = 62, + MESSAGE_DELETE = 72, + MESSAGE_BULK_DELETE = 73, + MESSAGE_PIN = 74, + MESSAGE_UNPIN = 75, + INTEGRATION_CREATE = 80, + INTEGRATION_UPDATE = 81, + INTEGRATION_DELETE = 82, +} + +@Entity("audit_logs") +export class AuditLogEntry extends BaseClass { + @Column() + target_id: string; + + @JoinColumn({ name: "user_id" }) + @ManyToOne(() => User, (user: User) => user.id) + target?: User; + + @Column() + user_id: string; + + @JoinColumn({ name: "user_id" }) + @ManyToOne(() => User, (user: User) => user.id) + user: User; + + @Column({ + type: "simple-enum", + enum: AuditLogEvents, + }) + action_type: AuditLogEvents; + + @Column("simple-json") + options?: { + delete_member_days?: string; + members_removed?: string; + channel_id?: string; + messaged_id?: string; + count?: string; + id?: string; + type?: string; + role_name?: string; + }; + + @Column() + @Column("simple-json") + changes: AuditLogChange[]; + + @Column() + reason?: string; +} + +export interface AuditLogChange { + new_value?: AuditLogChangeValue; + old_value?: AuditLogChangeValue; + key: string; +} + +export interface AuditLogChangeValue { + name?: string; + description?: string; + icon_hash?: string; + splash_hash?: string; + discovery_splash_hash?: string; + banner_hash?: string; + owner_id?: string; + region?: string; + preferred_locale?: string; + afk_channel_id?: string; + afk_timeout?: number; + rules_channel_id?: string; + public_updates_channel_id?: string; + mfa_level?: number; + verification_level?: number; + explicit_content_filter?: number; + default_message_notifications?: number; + vanity_url_code?: string; + $add?: {}[]; + $remove?: {}[]; + prune_delete_days?: number; + widget_enabled?: boolean; + widget_channel_id?: string; + system_channel_id?: string; + position?: number; + topic?: string; + bitrate?: number; + permission_overwrites?: ChannelPermissionOverwrite[]; + nsfw?: boolean; + application_id?: string; + rate_limit_per_user?: number; + permissions?: string; + color?: number; + hoist?: boolean; + mentionable?: boolean; + allow?: string; + deny?: string; + code?: string; + channel_id?: string; + inviter_id?: string; + max_uses?: number; + uses?: number; + max_age?: number; + temporary?: boolean; + deaf?: boolean; + mute?: boolean; + nick?: string; + avatar_hash?: string; + id?: string; + type?: number; + enable_emoticons?: boolean; + expire_behavior?: number; + expire_grace_period?: number; + user_limit?: number; +} diff --git a/util/src/entities/Ban.ts b/util/src/entities/Ban.ts new file mode 100644 index 00000000..ceea4a05 --- /dev/null +++ b/util/src/entities/Ban.ts @@ -0,0 +1,34 @@ +import { Column, Entity, JoinColumn, ManyToOne } from "typeorm"; +import { BaseClass } from "./BaseClass"; +import { Guild } from "./Guild"; +import { User } from "./User"; + +@Entity("bans") +export class Ban extends BaseClass { + @Column() + user_id: string; + + @JoinColumn({ name: "user_id" }) + @ManyToOne(() => User, (user: User) => user.id) + user: User; + + @Column() + guild_id: string; + + @JoinColumn({ name: "guild_id" }) + @ManyToOne(() => Guild, (guild: Guild) => guild.id) + guild: Guild; + + @Column() + executor_id: string; + + @JoinColumn({ name: "executor_id" }) + @ManyToOne(() => User, (user: User) => user.id) + executor: User; + + @Column() + ip: string; + + @Column() + reason?: string; +} diff --git a/util/src/entities/BaseClass.ts b/util/src/entities/BaseClass.ts new file mode 100644 index 00000000..38f6a71b --- /dev/null +++ b/util/src/entities/BaseClass.ts @@ -0,0 +1,61 @@ +import "reflect-metadata"; +import { BaseEntity, BeforeInsert, BeforeUpdate, PrimaryColumn } from "typeorm"; +import { Snowflake } from "../util/Snowflake"; +import Ajv, { ValidateFunction } from "ajv"; +import schema from "./schema.json"; + +const ajv = new Ajv({ + removeAdditional: "all", + useDefaults: true, + coerceTypes: true, + validateFormats: false, + allowUnionTypes: true, +}); +// const validator = ajv.compile<BaseClass>(schema); + +export class BaseClass extends BaseEntity { + @PrimaryColumn() + id: string; + + // @ts-ignore + constructor(props?: any, public opts: { id?: string } = {}) { + super(); + this.assign(props); + + if (!this.construct.schema) this.construct.schema = { ...schema, $ref: `#/definitions/${this.construct.name}` }; + } + + get construct(): any { + return this.constructor; + } + + assign(props: any) { + if (!props || typeof props !== "object") return; + + delete props.opts; + + for (const key in props) { + if (this.hasOwnProperty(key)) continue; + + Object.defineProperty(this, key, { value: props[key] }); + } + + this.id = this.opts.id || Snowflake.generate(); + } + + @BeforeUpdate() + @BeforeInsert() + validate() { + const valid = ajv.validate(this.construct.schema, this.toJSON()); + if (!valid) throw ajv.errors; + } + + get metadata() { + return this.construct.getRepository().metadata; + } + + toJSON(): any { + // @ts-ignore + return Object.fromEntries(this.metadata.columns.map((x) => [x.propertyName, this[x.propertyName]])); + } +} diff --git a/util/src/entities/Channel.ts b/util/src/entities/Channel.ts new file mode 100644 index 00000000..5845607a --- /dev/null +++ b/util/src/entities/Channel.ts @@ -0,0 +1,104 @@ +import { Column, Entity, JoinColumn, ManyToMany, ManyToOne } from "typeorm"; +import { BaseClass } from "./BaseClass"; +import { Guild } from "./Guild"; +import { Message } from "./Message"; +import { User } from "./User"; + +export enum ChannelType { + GUILD_TEXT = 0, // a text channel within a server + DM = 1, // a direct message between users + GUILD_VOICE = 2, // a voice channel within a server + GROUP_DM = 3, // a direct message between multiple users + GUILD_CATEGORY = 4, // an organizational category that contains up to 50 channels + GUILD_NEWS = 5, // a channel that users can follow and crosspost into their own server + GUILD_STORE = 6, // a channel in which game developers can sell their game on Discord +} + +@Entity("channels") +export class Channel extends BaseClass { + @Column() + created_at: Date; + + @Column() + name: string; + + @Column({ type: "simple-enum", enum: ChannelType }) + type: ChannelType; + + @Column("simple-array") + recipient_ids: string[]; + + @JoinColumn({ name: "recipient_ids" }) + @ManyToMany(() => User, (user: User) => user.id) + recipients?: User[]; + + @Column() + last_message_id: string; + + @JoinColumn({ name: "last_message_id" }) + @ManyToOne(() => Message, (message: Message) => message.id) + last_message?: Message; + + @Column() + guild_id?: string; + + @JoinColumn({ name: "guild_id" }) + @ManyToOne(() => Guild, (guild: Guild) => guild.id) + guild: Guild; + + @Column() + parent_id: string; + + @JoinColumn({ name: "parent_id" }) + @ManyToOne(() => Channel, (channel: Channel) => channel.id) + parent?: Channel; + + @Column() + owner_id: string; + + @JoinColumn({ name: "owner_id" }) + @ManyToOne(() => User, (user: User) => user.id) + owner: User; + + @Column() + last_pin_timestamp?: number; + + @Column() + default_auto_archive_duration?: number; + + @Column() + position: number; + + @Column("simple-json") + permission_overwrites: ChannelPermissionOverwrite[]; + + @Column() + video_quality_mode?: number; + + @Column() + bitrate?: number; + + @Column() + user_limit?: number; + + @Column() + nsfw: boolean; + + @Column() + rate_limit_per_user: number; + + @Column() + topic?: string; +} + +export interface ChannelPermissionOverwrite { + allow: bigint; // for bitfields we use bigints + deny: bigint; // for bitfields we use bigints + id: string; + type: ChannelPermissionOverwriteType; +} + +export enum ChannelPermissionOverwriteType { + role = 0, + member = 1, +} diff --git a/util/src/entities/ConnectedAccount.ts b/util/src/entities/ConnectedAccount.ts new file mode 100644 index 00000000..6aa2b401 --- /dev/null +++ b/util/src/entities/ConnectedAccount.ts @@ -0,0 +1,29 @@ +import { Column, Entity } from "typeorm"; +import { BaseClass } from "./BaseClass"; + +@Entity("connected_accounts") +export class ConnectedAccount extends BaseClass { + @Column() + access_token: string; + + @Column() + friend_sync: boolean; + + @Column() + name: string; + + @Column() + revoked: boolean; + + @Column() + show_activity: boolean; + + @Column() + type: string; + + @Column() + verifie: boolean; + + @Column() + visibility: number; +} diff --git a/util/src/entities/Emoji.ts b/util/src/entities/Emoji.ts new file mode 100644 index 00000000..366549db --- /dev/null +++ b/util/src/entities/Emoji.ts @@ -0,0 +1,39 @@ +import { Column, Entity, JoinColumn, ManyToMany, ManyToOne } from "typeorm"; +import { BaseClass } from "./BaseClass"; +import { Guild } from "./Guild"; +import { Role } from "./Role"; + +@Entity("emojis") +export class Emoji extends BaseClass { + @Column() + animated: boolean; + + @Column() + available: boolean; + + @Column() + guild_id: string; + + @JoinColumn({ name: "guild_id" }) + @ManyToOne(() => Guild, (guild: Guild) => guild.id) + guild: Guild; + + @Column() + managed: boolean; + + @Column() + name: string; + + @Column() + require_colons: boolean; + + @Column() + url: string; + + @Column("simple-array") + role_ids: string[]; + + @JoinColumn({ name: "role_ids" }) + @ManyToMany(() => Role, (role: Role) => role.id) + roles: Role[]; // roles this emoji is whitelisted to (new discord feature?) +} diff --git a/util/src/entities/Guild.ts b/util/src/entities/Guild.ts new file mode 100644 index 00000000..d46d31bc --- /dev/null +++ b/util/src/entities/Guild.ts @@ -0,0 +1,179 @@ +import { Column, Entity, JoinColumn, ManyToMany, ManyToOne, OneToOne } from "typeorm"; +import { BaseClass } from "./BaseClass"; +import { Channel } from "./Channel"; +import { Emoji } from "./Emoji"; +import { Invite } from "./Invite"; +import { Member } from "./Member"; +import { Role } from "./Role"; +import { User } from "./User"; +import { VoiceState } from "./VoiceState"; + +@Entity("guilds") +export class Guild extends BaseClass { + @Column() + afk_channel_id?: string; + + @JoinColumn({ name: "afk_channel_id" }) + @ManyToOne(() => Channel, (channel: Channel) => channel.id) + afk_channel?: Channel; + + @Column() + afk_timeout?: number; + + // * commented out -> use owner instead + // application id of the guild creator if it is bot-created + // @Column() + // application?: string; + + @Column() + banner?: string; + + @Column() + default_message_notifications?: number; + + @Column() + description?: string; + + @Column() + discovery_splash?: string; + + @Column() + explicit_content_filter?: number; + + @Column("simple-array") + features: string[]; + + @Column() + icon?: string; + + @Column() + large?: boolean; + + @Column() + max_members?: number; // e.g. default 100.000 + + @Column() + max_presences?: number; + + @Column() + max_video_channel_users?: number; // ? default: 25, is this max 25 streaming or watching + + @Column() + member_count?: number; + + @Column() + presence_count?: number; // users online + + @Column("simple-array") + member_ids: string[]; + + @JoinColumn({ name: "member_ids" }) + @ManyToMany(() => Member, (member: Member) => member.id) + members: Member[]; + + @Column("simple-array") + role_ids: string[]; + + @JoinColumn({ name: "role_ids" }) + @ManyToMany(() => Role, (role: Role) => role.id) + roles: Role[]; + + @Column("simple-array") + channel_ids: string[]; + + @JoinColumn({ name: "channel_ids" }) + @ManyToMany(() => Channel, (channel: Channel) => channel.id) + channels: Channel[]; + + @Column("simple-array") + emoji_ids: string[]; + + @JoinColumn({ name: "emoji_ids" }) + @ManyToMany(() => Emoji, (emoji: Emoji) => emoji.id) + emojis: Emoji[]; + + @Column("simple-array") + voice_state_ids: string[]; + + @JoinColumn({ name: "voice_state_ids" }) + @ManyToMany(() => VoiceState, (voicestate: VoiceState) => voicestate.id) + voice_states: VoiceState[]; + + @Column() + mfa_level?: number; + + @Column() + name: string; + + @Column() + owner_id: string; + + @JoinColumn({ name: "owner_id" }) + @ManyToOne(() => User, (user: User) => user.id) + owner: User; + + @Column() + preferred_locale?: string; // only community guilds can choose this + + @Column() + premium_subscription_count?: number; + + @Column() + premium_tier?: number; // nitro boost level + + @JoinColumn({ name: "public_updates_channel_id" }) + @ManyToOne(() => Channel, (channel: Channel) => channel.id) + public_updates_channel?: Channel; + + @Column() + rules_channel_id?: string; + + @JoinColumn({ name: "rules_channel_id" }) + @ManyToOne(() => Channel, (channel: Channel) => channel.id) + rules_channel?: string; + + @Column() + region?: string; + + @Column() + splash?: string; + + @Column() + system_channel_id?: string; + + @JoinColumn({ name: "system_channel_id" }) + @ManyToMany(() => Channel, (channel: Channel) => channel.id) + system_channel?: Channel; + + @Column() + system_channel_flags?: number; + + @Column() + unavailable?: boolean; + + @JoinColumn({ name: "vanity_url_code" }) + @OneToOne(() => Invite, (invite: Invite) => invite.code) + vanity_url?: Invite; + + @Column() + verification_level?: number; + + @Column("simple-json") + welcome_screen: { + enabled: boolean; + description: string; + welcome_channels: { + description: string; + emoji_id?: string; + emoji_name: string; + channel_id: string; + }[]; + }; + + @JoinColumn({ name: "widget_channel_id" }) + @ManyToOne(() => Channel, (channel: Channel) => channel.id) + widget_channel?: Channel; + + @Column() + widget_enabled?: boolean; +} diff --git a/util/src/entities/Invite.ts b/util/src/entities/Invite.ts new file mode 100644 index 00000000..19f7206a --- /dev/null +++ b/util/src/entities/Invite.ts @@ -0,0 +1,60 @@ +import { Column, Entity, JoinColumn, ManyToOne } from "typeorm"; +import { BaseClass } from "./BaseClass"; +import { Channel } from "./Channel"; +import { Guild } from "./Guild"; +import { User } from "./User"; + +@Entity("invites") +export class Invite extends BaseClass { + @Column() + code: string; + + @Column() + temporary: boolean; + + @Column() + uses: number; + + @Column() + max_uses: number; + + @Column() + max_age: number; + + @Column() + created_at: Date; + + @Column() + expires_at: Date; + + @Column() + guild_id: string; + + @JoinColumn({ name: "guild_id" }) + @ManyToOne(() => Guild, (guild: Guild) => guild.id) + guild: Guild; + + @Column() + channel_id: string; + + @JoinColumn({ name: "channel_id" }) + @ManyToOne(() => Channel, (channel: Channel) => channel.id) + channel: Channel; + + @Column() + inviter_id: string; + + @JoinColumn({ name: "inviter_id" }) + @ManyToOne(() => User, (user: User) => user.id) + inviter: User; + + @Column() + target_usser_id: string; + + @JoinColumn({ name: "target_user_id" }) + @ManyToOne(() => User, (user: User) => user.id) + target_user?: string; // could be used for "User specific invites" https://github.com/fosscord/fosscord/issues/62 + + @Column() + target_user_type?: number; +} diff --git a/util/src/entities/Member.ts b/util/src/entities/Member.ts new file mode 100644 index 00000000..c367755e --- /dev/null +++ b/util/src/entities/Member.ts @@ -0,0 +1,87 @@ +import { PublicUser, User } from "./User"; +import { BaseClass } from "./BaseClass"; +import { Column, Entity, JoinColumn, ManyToOne } from "typeorm"; +import { Guild } from "./Guild"; + +@Entity("members") +export class Member extends BaseClass { + @Column() + user_id: string; + + @JoinColumn({ name: "user_id" }) + @ManyToOne(() => User, (user: User) => user.id) + user: User; + + @Column() + guild_id: string; + + @JoinColumn({ name: "guild_id" }) + @ManyToOne(() => Guild, (guild: Guild) => guild.id) + guild: Guild; + + @Column() + nick?: string; + + @Column("simple-array") + roles: string[]; + + @Column() + joined_at: Date; + + @Column() + premium_since?: number; + + @Column() + deaf: boolean; + + @Column() + mute: boolean; + + @Column() + pending: boolean; + + @Column("simple-json") + settings: UserGuildSettings; + + // TODO: update + @Column("simple-json") + read_state: Record<string, string | null>; +} + +export interface UserGuildSettings { + channel_overrides: { + channel_id: string; + message_notifications: number; + mute_config: MuteConfig; + muted: boolean; + }[]; + message_notifications: number; + mobile_push: boolean; + mute_config: MuteConfig; + muted: boolean; + suppress_everyone: boolean; + suppress_roles: boolean; + version: number; +} + +export interface MuteConfig { + end_time: number; + selected_time_window: number; +} + +// @ts-ignore +export interface PublicMember extends Omit<Member, "settings" | "id" | "read_state"> { + user: PublicUser; +} + +export const PublicMemberProjection = { + id: true, + guild_id: true, + nick: true, + roles: true, + joined_at: true, + pending: true, + deaf: true, + mute: true, + premium_since: true, +}; diff --git a/util/src/entities/Message.ts b/util/src/entities/Message.ts new file mode 100644 index 00000000..2c0918c7 --- /dev/null +++ b/util/src/entities/Message.ts @@ -0,0 +1,260 @@ +import { User } from "./User"; +import { Member } from "./Member"; +import { Role } from "./Role"; +import { Channel } from "./Channel"; +import { InteractionType } from "../interfaces/Interaction"; +import { Application } from "./Application"; +import { Column, CreateDateColumn, Entity, JoinColumn, ManyToMany, ManyToOne, UpdateDateColumn } from "typeorm"; +import { BaseClass } from "./BaseClass"; +import { Guild } from "./Guild"; +import { Webhook } from "./Webhook"; + +export enum MessageType { + DEFAULT = 0, + RECIPIENT_ADD = 1, + RECIPIENT_REMOVE = 2, + CALL = 3, + CHANNEL_NAME_CHANGE = 4, + CHANNEL_ICON_CHANGE = 5, + CHANNEL_PINNED_MESSAGE = 6, + GUILD_MEMBER_JOIN = 7, + USER_PREMIUM_GUILD_SUBSCRIPTION = 8, + USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1 = 9, + USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2 = 10, + USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3 = 11, + CHANNEL_FOLLOW_ADD = 12, + GUILD_DISCOVERY_DISQUALIFIED = 14, + GUILD_DISCOVERY_REQUALIFIED = 15, + REPLY = 19, + APPLICATION_COMMAND = 20, +} + +@Entity("messages") +export class Message extends BaseClass { + @Column() + id: string; + + @Column() + channel_id: string; + + @JoinColumn({ name: "channel_id" }) + @ManyToOne(() => Channel, (channel: Channel) => channel.id) + channel: Channel; + + @Column() + guild_id: string; + + @JoinColumn({ name: "guild_id" }) + @ManyToOne(() => Guild, (guild: Guild) => guild.id) + guild?: Guild; + + @Column() + author_id: string; + + @JoinColumn({ name: "author_id" }) + @ManyToOne(() => User, (user: User) => user.id) + author?: User; + + @Column() + member_id: string; + + @JoinColumn({ name: "member_id" }) + @ManyToOne(() => Member, (member: Member) => member.id) + member?: Member; + + @Column() + webhook_id: string; + + @JoinColumn({ name: "webhook_id" }) + @ManyToOne(() => Webhook, (webhook: Webhook) => webhook.id) + webhook?: Webhook; + + @Column() + application_id: string; + + @JoinColumn({ name: "application_id" }) + @ManyToOne(() => Application, (application: Application) => application.id) + application?: Application; + + @Column() + content?: string; + + @Column() + @CreateDateColumn() + timestamp: Date; + + @Column() + @UpdateDateColumn() + edited_timestamp?: Date; + + @Column() + tts?: boolean; + + @Column() + mention_everyone?: boolean; + + @Column("simple-array") + mention_user_ids: string[]; + + @JoinColumn({ name: "mention_user_ids" }) + @ManyToMany(() => User, (user: User) => user.id) + mention_users: User[]; + + @Column("simple-array") + mention_role_ids: string[]; + + @JoinColumn({ name: "mention_role_ids" }) + @ManyToMany(() => Role, (role: Role) => role.id) + mention_roles: Role[]; + + @Column("simple-array") + mention_channel_ids: string[]; + + @JoinColumn({ name: "mention_channel_ids" }) + @ManyToMany(() => Channel, (channel: Channel) => channel.id) + mention_channels: Channel[]; + + @Column("simple-json") + attachments: Attachment[]; + + @Column("simple-json") + embeds: Embed[]; + + @Column("simple-json") + reactions: Reaction[]; + + @Column({ type: "text" }) + nonce?: string | number; + + @Column() + pinned?: boolean; + + @Column({ type: "simple-enum", enum: MessageType }) + type: MessageType; + + @Column("simple-json") + activity?: { + type: number; + party_id: string; + }; + + @Column({ type: "bigint" }) + flags?: bigint; + + @Column("simple-json") + stickers?: any[]; + + @Column("simple-json") + message_reference?: { + message_id: string; + channel_id?: string; + guild_id?: string; + }; + + @Column("simple-json") + interaction?: { + id: string; + type: InteractionType; + name: string; + user_id: string; // the user who invoked the interaction + // user: User; // TODO: autopopulate user + }; + + @Column("simple-json") + components: MessageComponent[]; +} + +export interface MessageComponent { + type: number; + style?: number; + label?: string; + emoji?: PartialEmoji; + custom_id?: string; + url?: string; + disabled?: boolean; + components: MessageComponent[]; +} + +export enum MessageComponentType { + ActionRow = 1, + Button = 2, +} + +export interface Attachment { + id: string; // attachment id + filename: string; // name of file attached + size: number; // size of file in bytes + url: string; // source url of file + proxy_url: string; // a proxied url of file + height?: number; // height of file (if image) + width?: number; // width of file (if image) + content_type?: string; +} + +export interface Embed { + title?: string; //title of embed + type?: EmbedType; // type of embed (always "rich" for webhook embeds) + description?: string; // description of embed + url?: string; // url of embed + timestamp?: Date; // timestamp of embed content + color?: number; // color code of the embed + footer?: { + text: string; + icon_url?: string; + proxy_icon_url?: string; + }; // footer object footer information + image?: EmbedImage; // image object image information + thumbnail?: EmbedImage; // thumbnail object thumbnail information + video?: EmbedImage; // video object video information + provider?: { + name?: string; + url?: string; + }; // provider object provider information + author?: { + name?: string; + url?: string; + icon_url?: string; + proxy_icon_url?: string; + }; // author object author information + fields?: { + name: string; + value: string; + inline?: boolean; + }[]; +} + +export enum EmbedType { + rich = "rich", + image = "image", + video = "video", + gifv = "gifv", + article = "article", + link = "link", +} + +export interface EmbedImage { + url?: string; + proxy_url?: string; + height?: number; + width?: number; +} + +export interface Reaction { + count: number; + //// not saved in the database // me: boolean; // whether the current user reacted using this emoji + emoji: PartialEmoji; + user_ids: string[]; +} + +export interface PartialEmoji { + id?: string; + name: string; + animated?: boolean; +} + +export interface AllowedMentions { + parse?: ("users" | "roles" | "everyone")[]; + roles?: string[]; + users?: string[]; + replied_user?: boolean; +} diff --git a/util/src/entities/RateLimit.ts b/util/src/entities/RateLimit.ts new file mode 100644 index 00000000..374a0759 --- /dev/null +++ b/util/src/entities/RateLimit.ts @@ -0,0 +1,25 @@ +import { Column, Entity, JoinColumn, ManyToOne } from "typeorm"; +import { BaseClass } from "./BaseClass"; +import { User } from "./User"; + +@Entity("rate_limits") +export class RateLimit extends BaseClass { + @Column() + id: "global" | "error" | string; // channel_239842397 | guild_238927349823 | webhook_238923423498 + + @Column() + user_id: string; + + @JoinColumn({ name: "user_id" }) + @ManyToOne(() => User, (user) => user.id) + user: User; + + @Column() + hits: number; + + @Column() + blocked: boolean; + + @Column() + expires_at: Date; +} diff --git a/util/src/entities/ReadState.ts b/util/src/entities/ReadState.ts new file mode 100644 index 00000000..7c56b6c6 --- /dev/null +++ b/util/src/entities/ReadState.ts @@ -0,0 +1,35 @@ +import { Column, Entity, JoinColumn, ManyToOne } from "typeorm"; +import { BaseClass } from "./BaseClass"; +import { Channel } from "./Channel"; +import { Message } from "./Message"; +import { User } from "./User"; + +@Entity("read_states") +export class ReadState extends BaseClass { + @Column() + channel_id: string; + + @JoinColumn({ name: "channel_id" }) + @ManyToOne(() => Channel, (channel: Channel) => channel.id) + channel: Channel; + + @Column() + user_id: string; + + @JoinColumn({ name: "user_id" }) + @ManyToOne(() => User, (user: User) => user.id) + user: User; + + @JoinColumn({ name: "last_message_id" }) + @ManyToOne(() => Message, (message: Message) => message.id) + last_message?: Message; + + @Column() + last_pin_timestamp?: Date; + + @Column() + mention_count: number; + + @Column() + manual: boolean; +} diff --git a/util/src/entities/Relationship.ts b/util/src/entities/Relationship.ts new file mode 100644 index 00000000..bd5861f0 --- /dev/null +++ b/util/src/entities/Relationship.ts @@ -0,0 +1,26 @@ +import { Column, Entity, JoinColumn, ManyToOne, OneToMany } from "typeorm"; +import { BaseClass } from "./BaseClass"; +import { User } from "./User"; + +export enum RelationshipType { + outgoing = 4, + incoming = 3, + blocked = 2, + friends = 1, +} + +@Entity("relationships") +export class Relationship extends BaseClass { + @Column() + user_id: string; + + @JoinColumn({ name: "user_id" }) + @ManyToOne(() => User, (user: User) => user.id) + user: User; + + @Column() + nickname?: string; + + @Column({ type: "simple-enum", enum: RelationshipType }) + type: RelationshipType; +} diff --git a/util/src/entities/Role.ts b/util/src/entities/Role.ts new file mode 100644 index 00000000..7bb144cc --- /dev/null +++ b/util/src/entities/Role.ts @@ -0,0 +1,41 @@ +import { Column, Entity, JoinColumn, ManyToOne } from "typeorm"; +import { BaseClass } from "./BaseClass"; +import { Guild } from "./Guild"; + +@Entity("roles") +export class Role extends BaseClass { + @Column() + guild_id: string; + + @JoinColumn({ name: "guild_id" }) + @ManyToOne(() => Guild, (guild: Guild) => guild.id) + guild: Guild; + + @Column() + color: number; + + @Column() + hoist: boolean; + + @Column() + managed: boolean; + + @Column() + mentionable: boolean; + + @Column() + name: string; + + @Column({ type: "bigint" }) + permissions: bigint; + + @Column() + position: number; + + @Column({ type: "simple-json" }) + tags?: { + bot_id?: string; + integration_id?: string; + premium_subscriber?: boolean; + }; +} diff --git a/util/src/entities/Team.ts b/util/src/entities/Team.ts new file mode 100644 index 00000000..5e645650 --- /dev/null +++ b/util/src/entities/Team.ts @@ -0,0 +1,27 @@ +import { Column, Entity, JoinColumn, ManyToMany, ManyToOne } from "typeorm"; +import { BaseClass } from "./BaseClass"; +import { TeamMember } from "./TeamMember"; +import { User } from "./User"; + +@Entity("teams") +export class Team extends BaseClass { + @Column() + icon?: string; + + @Column("simple-array") + member_ids: string[]; + + @JoinColumn({ name: "member_ids" }) + @ManyToMany(() => TeamMember, (member: TeamMember) => member.id) + members: TeamMember[]; + + @Column() + name: string; + + @Column() + owner_user_id: string; + + @JoinColumn({ name: "owner_user_id" }) + @ManyToOne(() => User, (user: User) => user.id) + owner_user: User; +} diff --git a/util/src/entities/TeamMember.ts b/util/src/entities/TeamMember.ts new file mode 100644 index 00000000..2b1c76f1 --- /dev/null +++ b/util/src/entities/TeamMember.ts @@ -0,0 +1,31 @@ +import { Column, Entity, JoinColumn, ManyToOne } from "typeorm"; +import { BaseClass } from "./BaseClass"; +import { User } from "./User"; + +export enum TeamMemberState { + INVITED = 1, + ACCEPTED = 2, +} + +@Entity("team_members") +export class TeamMember extends BaseClass { + @Column({ type: "simple-enum", enum: TeamMemberState }) + membership_state: TeamMemberState; + + @Column("simple-array") + permissions: string[]; + + @Column() + team_id: string; + + @JoinColumn({ name: "team_id" }) + @ManyToOne(() => require("./Team").Team, (team: import("./Team").Team) => team.id) + team: import("./Team").Team; + + @Column() + user_id: string; + + @JoinColumn({ name: "user_id" }) + @ManyToOne(() => User, (user: User) => user.id) + user: User; +} diff --git a/util/src/entities/Template.ts b/util/src/entities/Template.ts new file mode 100644 index 00000000..5c9a5120 --- /dev/null +++ b/util/src/entities/Template.ts @@ -0,0 +1,33 @@ +import { Column, Entity, JoinColumn, ManyToOne } from "typeorm"; +import { BaseClass } from "./BaseClass"; +import { Guild } from "./Guild"; +import { User } from "./User"; + +@Entity("templates") +export class Template extends BaseClass { + @Column() + code: string; + + @Column() + name: string; + + @Column() + description?: string; + + @Column() + usage_count?: number; + + @JoinColumn({ name: "creator_id" }) + @ManyToOne(() => User, (user: User) => user.id) + creator: User; + + @Column() + created_at: Date; + + @Column() + updated_at: Date; + + @JoinColumn({ name: "source_guild_id" }) + @ManyToOne(() => Guild, (guild: Guild) => guild.id) + source_guild: Guild; +} diff --git a/util/src/entities/User.ts b/util/src/entities/User.ts new file mode 100644 index 00000000..073f6217 --- /dev/null +++ b/util/src/entities/User.ts @@ -0,0 +1,188 @@ +import { Column, Entity, JoinColumn, OneToMany, OneToOne } from "typeorm"; +import { BaseClass } from "./BaseClass"; +import { BitField } from "../util/BitField"; +import { Relationship } from "./Relationship"; +import { ConnectedAccount } from "./ConnectedAccount"; + +export const PublicUserProjection = { + username: true, + discriminator: true, + id: true, + public_flags: true, + avatar: true, + accent_color: true, + banner: true, + bio: true, + bot: true, +}; + +@Entity("users") +export class User extends BaseClass { + @Column() + username: string; // username max length 32, min 2 (should be configurable) + + @Column() + discriminator: string; // #0001 4 digit long string from #0001 - #9999 + + @Column() + avatar?: string; // hash of the user avatar + + @Column() + accent_color?: number; // banner color of user + + @Column() + banner?: string; // hash of the user banner + + @Column() + phone?: string; // phone number of the user + + @Column() + desktop: boolean; // if the user has desktop app installed + + @Column() + mobile: boolean; // if the user has mobile app installed + + @Column() + premium: boolean; // if user bought nitro + + @Column() + premium_type: number; // nitro level + + @Column() + bot: boolean; // if user is bot + + @Column() + bio: string; // short description of the user (max 190 chars -> should be configurable) + + @Column() + system: boolean; // shouldn't be used, the api sents this field type true, if the generated message comes from a system generated author + + @Column() + nsfw_allowed: boolean; // if the user is older than 18 (resp. Config) + + @Column() + mfa_enabled: boolean; // if multi factor authentication is enabled + + @Column() + created_at: Date; // registration date + + @Column() + verified: boolean; // if the user is offically verified + + @Column() + disabled: boolean; // if the account is disabled + + @Column() + deleted: boolean; // if the user was deleted + + @Column() + email?: string; // email of the user + + @Column({ type: "bigint" }) + flags: bigint; // UserFlags + + @Column({ type: "bigint" }) + public_flags: bigint; + + @Column("simple-array") // string in simple-array must not contain commas + guilds: string[]; // array of guild ids the user is part of + + @Column("simple-array") // string in simple-array must not contain commas + relationship_ids: string[]; // array of guild ids the user is part of + + @JoinColumn({ name: "relationship_ids" }) + @OneToMany(() => User, (user: User) => user.id) + relationships: Relationship[]; + + @Column("simple-array") // string in simple-array must not contain commas + connected_account_ids: string[]; // array of guild ids the user is part of + + @JoinColumn({ name: "connected_account_ids" }) + @OneToMany(() => ConnectedAccount, (account: ConnectedAccount) => account.id) + connected_accounts: ConnectedAccount[]; + + @Column({ type: "simple-json", select: false }) + user_data: { + valid_tokens_since: Date; // all tokens with a previous issue date are invalid + hash: string; // hash of the password, salt is saved in password (bcrypt) + fingerprints: string[]; // array of fingerprints -> used to prevent multiple accounts + }; + + @Column("simple-json") + settings: UserSettings; +} + +export interface UserSettings { + afk_timeout: number; + allow_accessibility_detection: boolean; + animate_emoji: boolean; + animate_stickers: number; + contact_sync_enabled: boolean; + convert_emoticons: boolean; + custom_status: { + emoji_id?: string; + emoji_name?: string; + expires_at?: number; + text?: string; + }; + default_guilds_restricted: boolean; + detect_platform_accounts: boolean; + developer_mode: boolean; + disable_games_tab: boolean; + enable_tts_command: boolean; + explicit_content_filter: number; + friend_source_flags: { all: boolean }; + gateway_connected: boolean; + gif_auto_play: boolean; + // every top guild is displayed as a "folder" + guild_folders: { + color: number; + guild_ids: string[]; + id: number; + name: string; + }[]; + guild_positions: string[]; // guild ids ordered by position + inline_attachment_media: boolean; + inline_embed_media: boolean; + locale: string; // en_US + message_display_compact: boolean; + native_phone_integration_enabled: boolean; + render_embeds: boolean; + render_reactions: boolean; + restricted_guilds: string[]; + show_current_game: boolean; + status: "online" | "offline" | "dnd" | "idle"; + stream_notifications_enabled: boolean; + theme: "dark" | "white"; // dark + timezone_offset: number; // e.g -60 +} + +// Private user data that should never get sent to the client +export interface PublicUser { + id: string; + discriminator: string; + username: string; + avatar?: string; + accent_color?: number; + banner?: string; + public_flags: bigint; + bot: boolean; +} + +export class UserFlags extends BitField { + static FLAGS = { + DISCORD_EMPLOYEE: BigInt(1) << BigInt(0), + PARTNERED_SERVER_OWNER: BigInt(1) << BigInt(1), + HYPESQUAD_EVENTS: BigInt(1) << BigInt(2), + BUGHUNTER_LEVEL_1: BigInt(1) << BigInt(3), + HOUSE_BRAVERY: BigInt(1) << BigInt(6), + HOUSE_BRILLIANCE: BigInt(1) << BigInt(7), + HOUSE_BALANCE: BigInt(1) << BigInt(8), + EARLY_SUPPORTER: BigInt(1) << BigInt(9), + TEAM_USER: BigInt(1) << BigInt(10), + SYSTEM: BigInt(1) << BigInt(12), + BUGHUNTER_LEVEL_2: BigInt(1) << BigInt(14), + VERIFIED_BOT: BigInt(1) << BigInt(16), + EARLY_VERIFIED_BOT_DEVELOPER: BigInt(1) << BigInt(17), + }; +} diff --git a/util/src/entities/VoiceState.ts b/util/src/entities/VoiceState.ts new file mode 100644 index 00000000..2416c6c0 --- /dev/null +++ b/util/src/entities/VoiceState.ts @@ -0,0 +1,44 @@ +import { Column, Entity, JoinColumn, ManyToOne, OneToOne } from "typeorm"; +import { BaseClass } from "./BaseClass"; +import { Channel } from "./Channel"; +import { Guild } from "./Guild"; +import { User } from "./User"; + +@Entity("voice_states") +export class VoiceState extends BaseClass { + @JoinColumn({ name: "guild_id" }) + @ManyToOne(() => Guild, (guild: Guild) => guild.id) + guild?: Guild; + + @JoinColumn({ name: "channel_id" }) + @ManyToOne(() => Channel, (channel: Channel) => channel.id) + channel: Channel; + + @JoinColumn({ name: "user_id" }) + @ManyToOne(() => User, (user: User) => user.id) + user: User; + + @Column() + session_id: string; + + @Column() + deaf: boolean; + + @Column() + mute: boolean; + + @Column() + self_deaf: boolean; + + @Column() + self_mute: boolean; + + @Column() + self_stream?: boolean; + + @Column() + self_video: boolean; + + @Column() + suppress: boolean; // whether this user is muted by the current user +} diff --git a/util/src/entities/Webhook.ts b/util/src/entities/Webhook.ts new file mode 100644 index 00000000..54233638 --- /dev/null +++ b/util/src/entities/Webhook.ts @@ -0,0 +1,40 @@ +import { Column, Entity, JoinColumn } from "typeorm"; +import { BaseClass } from "./BaseClass"; + +export enum WebhookType { + Incoming = 1, + ChannelFollower = 2, +} + +@Entity("webhooks") +export class Webhook extends BaseClass { + @Column() + id: string; + + @Column({ type: "simple-enum", enum: WebhookType }) + type: WebhookType; + + @Column() + name?: string; + + @Column() + avatar?: string; + + @Column() + token?: string; + + @JoinColumn() + guild?: string; + + @JoinColumn() + channel: string; + + @JoinColumn() + application?: string; + + @JoinColumn() + user?: string; + + @JoinColumn() + source_guild: string; +} diff --git a/util/src/entities/index.ts b/util/src/entities/index.ts new file mode 100644 index 00000000..9cb10016 --- /dev/null +++ b/util/src/entities/index.ts @@ -0,0 +1,21 @@ +export * from "./Application"; +export * from "./AuditLog"; +export * from "./Ban"; +export * from "./BaseClass"; +export * from "./Channel"; +export * from "./ConnectedAccount"; +export * from "./Emoji"; +export * from "./Guild"; +export * from "./Invite"; +export * from "./Member"; +export * from "./Message"; +export * from "./RateLimit"; +export * from "./ReadState"; +export * from "./Relationship"; +export * from "./Role"; +export * from "./Team"; +export * from "./TeamMember"; +export * from "./Template"; +export * from "./User"; +export * from "./VoiceState"; +export * from "./Webhook"; diff --git a/util/src/entities/schema.json b/util/src/entities/schema.json new file mode 100644 index 00000000..603ea0d5 --- /dev/null +++ b/util/src/entities/schema.json @@ -0,0 +1,19389 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "Activity": { + "properties": { + "application_id": { + "type": "string" + }, + "assets": { + "properties": { + "large_image": { + "type": "string" + }, + "large_text": { + "type": "string" + }, + "small_image": { + "type": "string" + }, + "small_text": { + "type": "string" + } + }, + "type": "object" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "details": { + "type": "string" + }, + "emoji": { + "properties": { + "amimated": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "flags": { + "type": "bigint" + }, + "instance": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "party": { + "properties": { + "id": { + "type": "string" + }, + "size": { + "items": [ + { + "type": "number" + }, + { + "type": "number" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "type": "object" + }, + "secrets": { + "properties": { + "join": { + "type": "string" + }, + "match": { + "type": "string" + }, + "spectate": { + "type": "string" + } + }, + "type": "object" + }, + "state": { + "type": "string" + }, + "timestamps": { + "items": { + "properties": { + "end": { + "type": "number" + }, + "start": { + "type": "number" + } + }, + "type": "object" + }, + "type": "array" + }, + "type": { + "$ref": "#/definitions/ActivityType" + }, + "url": { + "type": "string" + } + }, + "type": "object" + }, + "ActivityType": { + "enum": [ + 0, + 1, + 2, + 4, + 5 + ], + "type": "number" + }, + "AllowedMentions": { + "properties": { + "parse": { + "items": { + "enum": [ + "everyone", + "roles", + "users" + ], + "type": "string" + }, + "type": "array" + }, + "replied_user": { + "type": "boolean" + }, + "roles": { + "items": { + "type": "string" + }, + "type": "array" + }, + "users": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Application": { + "properties": { + "bot_public": { + "type": "boolean" + }, + "bot_require_code_grant": { + "type": "boolean" + }, + "cover_image": { + "type": [ + "null", + "string" + ] + }, + "description": { + "type": "string" + }, + "flags": { + "type": "number" + }, + "guild": { + "$ref": "#/definitions/Guild" + }, + "guild_id": { + "type": "string" + }, + "icon": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "name": { + "type": "string" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "owner_id": { + "type": "string" + }, + "primary_sku_id": { + "type": [ + "null", + "string" + ] + }, + "privacy_policy_url": { + "type": [ + "null", + "string" + ] + }, + "rpc_origins": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "slug": { + "type": [ + "null", + "string" + ] + }, + "summary": { + "type": [ + "null", + "string" + ] + }, + "team": { + "anyOf": [ + { + "$ref": "#/definitions/Team" + }, + { + "type": "null" + } + ] + }, + "team_id": { + "type": "string" + }, + "terms_of_service_url": { + "type": [ + "null", + "string" + ] + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + }, + "verify_key": { + "type": "string" + } + }, + "type": "object" + }, + "ApplicationCommand": { + "properties": { + "application_id": { + "type": "string" + }, + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "options": { + "items": { + "$ref": "#/definitions/ApplicationCommandOption" + }, + "type": "array" + } + }, + "type": "object" + }, + "ApplicationCommandCreateEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "allOf": [ + { + "$ref": "#/definitions/ApplicationCommand" + }, + { + "properties": { + "guild_id": { + "type": "string" + } + }, + "type": "object" + } + ] + }, + "event": { + "enum": [ + "APPLICATION_COMMAND_CREATE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "ApplicationCommandDeleteEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "allOf": [ + { + "$ref": "#/definitions/ApplicationCommand" + }, + { + "properties": { + "guild_id": { + "type": "string" + } + }, + "type": "object" + } + ] + }, + "event": { + "enum": [ + "APPLICATION_COMMAND_DELETE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "ApplicationCommandInteractionData": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "options": { + "items": { + "$ref": "#/definitions/ApplicationCommandInteractionDataOption" + }, + "type": "array" + } + }, + "type": "object" + }, + "ApplicationCommandInteractionDataOption": { + "properties": { + "name": { + "type": "string" + }, + "options": { + "items": { + "$ref": "#/definitions/ApplicationCommandInteractionDataOption" + }, + "type": "array" + }, + "value": { + } + }, + "type": "object" + }, + "ApplicationCommandOption": { + "properties": { + "choices": { + "items": { + "$ref": "#/definitions/ApplicationCommandOptionChoice" + }, + "type": "array" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "options": { + "items": { + "$ref": "#/definitions/ApplicationCommandOption" + }, + "type": "array" + }, + "required": { + "type": "boolean" + }, + "type": { + "$ref": "#/definitions/ApplicationCommandOptionType" + } + }, + "type": "object" + }, + "ApplicationCommandOptionChoice": { + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": [ + "string", + "number" + ] + } + }, + "type": "object" + }, + "ApplicationCommandOptionType": { + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8 + ], + "type": "number" + }, + "ApplicationCommandPayload": { + "allOf": [ + { + "$ref": "#/definitions/ApplicationCommand" + }, + { + "properties": { + "guild_id": { + "type": "string" + } + }, + "type": "object" + } + ] + }, + "ApplicationCommandUpdateEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "allOf": [ + { + "$ref": "#/definitions/ApplicationCommand" + }, + { + "properties": { + "guild_id": { + "type": "string" + } + }, + "type": "object" + } + ] + }, + "event": { + "enum": [ + "APPLICATION_COMMAND_UPDATE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "AsyncSchema": { + "properties": { + "$async": { + "enum": [ + true + ], + "type": "boolean" + }, + "$id": { + "type": "string" + }, + "$schema": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "type": "object" + }, + "AsyncValidateFunction<any>": { + "properties": { + "$async": { + "enum": [ + true + ], + "type": "boolean" + }, + "errors": { + "anyOf": [ + { + "items": { + "$ref": "#/definitions/ErrorObject<string,Record<string,any>,unknown>" + }, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "evaluated": { + "$ref": "#/definitions/Evaluated" + }, + "schema": { + "anyOf": [ + { + "$ref": "#/definitions/SchemaObject" + }, + { + "$ref": "#/definitions/AsyncSchema" + }, + { + "type": "boolean" + } + ] + }, + "schemaEnv": { + "$ref": "#/definitions/SchemaEnv" + }, + "source": { + "$ref": "#/definitions/SourceCode" + } + }, + "type": "object" + }, + "Attachment": { + "properties": { + "content_type": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "height": { + "type": "number" + }, + "id": { + "type": "string" + }, + "proxy_url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "url": { + "type": "string" + }, + "width": { + "type": "number" + } + }, + "type": "object" + }, + "AuditLogChange": { + "properties": { + "key": { + "type": "string" + }, + "new_value": { + "$ref": "#/definitions/AuditLogChangeValue" + }, + "old_value": { + "$ref": "#/definitions/AuditLogChangeValue" + } + }, + "type": "object" + }, + "AuditLogChangeValue": { + "properties": { + "$add": { + "items": { + "properties": { + }, + "type": "object" + }, + "type": "array" + }, + "$remove": { + "items": { + "properties": { + }, + "type": "object" + }, + "type": "array" + }, + "afk_channel_id": { + "type": "string" + }, + "afk_timeout": { + "type": "number" + }, + "allow": { + "type": "string" + }, + "application_id": { + "type": "string" + }, + "avatar_hash": { + "type": "string" + }, + "banner_hash": { + "type": "string" + }, + "bitrate": { + "type": "number" + }, + "channel_id": { + "type": "string" + }, + "code": { + "type": "string" + }, + "color": { + "type": "number" + }, + "deaf": { + "type": "boolean" + }, + "default_message_notifications": { + "type": "number" + }, + "deny": { + "type": "string" + }, + "description": { + "type": "string" + }, + "discovery_splash_hash": { + "type": "string" + }, + "enable_emoticons": { + "type": "boolean" + }, + "expire_behavior": { + "type": "number" + }, + "expire_grace_period": { + "type": "number" + }, + "explicit_content_filter": { + "type": "number" + }, + "hoist": { + "type": "boolean" + }, + "icon_hash": { + "type": "string" + }, + "id": { + "type": "string" + }, + "inviter_id": { + "type": "string" + }, + "max_age": { + "type": "number" + }, + "max_uses": { + "type": "number" + }, + "mentionable": { + "type": "boolean" + }, + "mfa_level": { + "type": "number" + }, + "mute": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "nick": { + "type": "string" + }, + "nsfw": { + "type": "boolean" + }, + "owner_id": { + "type": "string" + }, + "permission_overwrites": { + "items": { + "$ref": "#/definitions/ChannelPermissionOverwrite" + }, + "type": "array" + }, + "permissions": { + "type": "string" + }, + "position": { + "type": "number" + }, + "preferred_locale": { + "type": "string" + }, + "prune_delete_days": { + "type": "number" + }, + "public_updates_channel_id": { + "type": "string" + }, + "rate_limit_per_user": { + "type": "number" + }, + "region": { + "type": "string" + }, + "rules_channel_id": { + "type": "string" + }, + "splash_hash": { + "type": "string" + }, + "system_channel_id": { + "type": "string" + }, + "temporary": { + "type": "boolean" + }, + "topic": { + "type": "string" + }, + "type": { + "type": "number" + }, + "user_limit": { + "type": "number" + }, + "uses": { + "type": "number" + }, + "vanity_url_code": { + "type": "string" + }, + "verification_level": { + "type": "number" + }, + "widget_channel_id": { + "type": "string" + }, + "widget_enabled": { + "type": "boolean" + } + }, + "type": "object" + }, + "AuditLogEntry": { + "properties": { + "action_type": { + "$ref": "#/definitions/AuditLogEvents" + }, + "changes": { + "items": { + "$ref": "#/definitions/AuditLogChange" + }, + "type": "array" + }, + "id": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "options": { + "properties": { + "channel_id": { + "type": "string" + }, + "count": { + "type": "string" + }, + "delete_member_days": { + "type": "string" + }, + "id": { + "type": "string" + }, + "members_removed": { + "type": "string" + }, + "messaged_id": { + "type": "string" + }, + "role_name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "reason": { + "type": "string" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "target": { + "$ref": "#/definitions/User" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + }, + "user": { + "$ref": "#/definitions/User" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "AuditLogEvents": { + "enum": [ + 1, + 10, + 11, + 12, + 13, + 14, + 15, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 30, + 31, + 32, + 40, + 41, + 42, + 50, + 51, + 52, + 60, + 61, + 62, + 72, + 73, + 74, + 75, + 80, + 81, + 82 + ], + "type": "number" + }, + "AuroraDataApiConnectionOptions": { + "description": "MySQL specific connection options.", + "properties": { + "cache": { + "anyOf": [ + { + "properties": { + "alwaysEnabled": { + "description": "If set to true then queries (using find methods and QueryBuilder's methods) will always be cached.", + "type": "boolean" + }, + "duration": { + "description": "Time in milliseconds in which cache will expire.\nThis can be setup per-query.\nDefault value is 1000 which is equivalent to 1 second.", + "type": "number" + }, + "ignoreErrors": { + "description": "Used to specify if cache errors should be ignored, and pass through the call to the Database.", + "type": "boolean" + }, + "options": { + "description": "Used to provide redis connection options." + }, + "provider": { + "description": "Factory function for custom cache providers that implement QueryResultCache.", + "type": "object" + }, + "tableName": { + "description": "Configurable table name for \"database\" type cache.\nDefault value is \"query-result-cache\"", + "type": "string" + }, + "type": { + "description": "Type of caching.\n\n- \"database\" means cached values will be stored in the separate table in database. This is default value.\n- \"redis\" means cached values will be stored inside redis. You must provide redis connection options.", + "enum": [ + "database", + "ioredis", + "ioredis/cluster", + "redis" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "type": "boolean" + } + ], + "description": "Allows to setup cache options." + }, + "cli": { + "description": "CLI settings.", + "properties": { + "entitiesDir": { + "description": "Directory where entities should be created by default.", + "type": "string" + }, + "migrationsDir": { + "description": "Directory where migrations should be created by default.", + "type": "string" + }, + "subscribersDir": { + "description": "Directory where subscribers should be created by default.", + "type": "string" + } + }, + "type": "object" + }, + "database": { + "description": "Database name to connect to.", + "type": "string" + }, + "dropSchema": { + "description": "Drops the schema each time connection is being established.\nBe careful with this option and don't use this in production - otherwise you'll lose all production data.\nThis option is useful during debug and development.", + "type": "boolean" + }, + "entities": { + "description": "Entities to be loaded for this connection.\nAccepts both entity classes and directories where from entities need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "$ref": "#/definitions/EntitySchema<any>" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "entityPrefix": { + "description": "Prefix to use on all tables (collections) of this connection in the database.", + "type": "string" + }, + "entitySkipConstructor": { + "description": "When creating new Entity instances, skip all constructors when true.", + "type": "boolean" + }, + "extra": { + "description": "Extra connection options to be passed to the underlying driver.\n\ntodo: deprecate this and move all database-specific types into hts own connection options object." + }, + "formatOptions": { + "additionalProperties": { + }, + "properties": { + "castParameters": { + "type": "boolean" + } + }, + "type": "object" + }, + "host": { + "description": "Database host.", + "type": "string" + }, + "legacySpatialSupport": { + "description": "Use spatial functions like GeomFromText and AsText which are removed in MySQL 8.\n(Default: true)", + "type": "boolean" + }, + "logger": { + "anyOf": [ + { + "$ref": "#/definitions/Logger" + }, + { + "enum": [ + "advanced-console", + "debug", + "file", + "simple-console" + ], + "type": "string" + } + ], + "description": "Logger instance used to log queries and events in the ORM." + }, + "logging": { + "anyOf": [ + { + "items": { + "enum": [ + "error", + "info", + "log", + "migration", + "query", + "schema", + "warn" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "all", + false, + true + ] + } + ], + "description": "Logging options." + }, + "maxQueryExecutionTime": { + "description": "Maximum number of milliseconds query should be executed before logger log a warning.", + "type": "number" + }, + "migrations": { + "description": "Migrations to be loaded for this connection.\nAccepts both migration classes and directories where from migrations need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "migrationsRun": { + "description": "Indicates if migrations should be auto run on every application launch.\nAlternative to it, you can use CLI and run migrations:run command.", + "type": "boolean" + }, + "migrationsTableName": { + "description": "Migrations table name, in case of different name from \"migrations\".\nAccepts single string name.", + "type": "string" + }, + "migrationsTransactionMode": { + "description": "Transaction mode for migrations to run in", + "enum": [ + "all", + "each", + "none" + ], + "type": "string" + }, + "name": { + "description": "Connection name. If connection name is not given then it will be called \"default\".\nDifferent connections must have different names.", + "type": "string" + }, + "namingStrategy": { + "$ref": "#/definitions/NamingStrategyInterface", + "description": "Naming strategy to be used to name tables and columns in the database." + }, + "password": { + "description": "Database password.", + "type": "string" + }, + "port": { + "description": "Database host port.", + "type": "number" + }, + "region": { + "type": "string" + }, + "resourceArn": { + "type": "string" + }, + "secretArn": { + "type": "string" + }, + "serviceConfigOptions": { + "additionalProperties": { + }, + "type": "object" + }, + "ssl": { + "description": "Object with ssl parameters or a string containing name of ssl profile." + }, + "subscribers": { + "description": "Subscribers to be loaded for this connection.\nAccepts both subscriber classes and directories where from subscribers need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "synchronize": { + "description": "Indicates if database schema should be auto created on every application launch.\nBe careful with this option and don't use this in production - otherwise you can lose production data.\nThis option is useful during debug and development.\nAlternative to it, you can use CLI and run schema:sync command.\n\nNote that for MongoDB database it does not create schema, because MongoDB is schemaless.\nInstead, it syncs just by creating indices.", + "type": "boolean" + }, + "type": { + "description": "Database type.", + "enum": [ + "aurora-data-api" + ], + "type": "string" + }, + "url": { + "description": "Connection url where perform connection to.", + "type": "string" + }, + "username": { + "description": "Database username.", + "type": "string" + } + }, + "type": "object" + }, + "AuroraDataApiPostgresConnectionOptions": { + "description": "Postgres-specific connection options.", + "properties": { + "cache": { + "anyOf": [ + { + "properties": { + "alwaysEnabled": { + "description": "If set to true then queries (using find methods and QueryBuilder's methods) will always be cached.", + "type": "boolean" + }, + "duration": { + "description": "Time in milliseconds in which cache will expire.\nThis can be setup per-query.\nDefault value is 1000 which is equivalent to 1 second.", + "type": "number" + }, + "ignoreErrors": { + "description": "Used to specify if cache errors should be ignored, and pass through the call to the Database.", + "type": "boolean" + }, + "options": { + "description": "Used to provide redis connection options." + }, + "provider": { + "description": "Factory function for custom cache providers that implement QueryResultCache.", + "type": "object" + }, + "tableName": { + "description": "Configurable table name for \"database\" type cache.\nDefault value is \"query-result-cache\"", + "type": "string" + }, + "type": { + "description": "Type of caching.\n\n- \"database\" means cached values will be stored in the separate table in database. This is default value.\n- \"redis\" means cached values will be stored inside redis. You must provide redis connection options.", + "enum": [ + "database", + "ioredis", + "ioredis/cluster", + "redis" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "type": "boolean" + } + ], + "description": "Allows to setup cache options." + }, + "cli": { + "description": "CLI settings.", + "properties": { + "entitiesDir": { + "description": "Directory where entities should be created by default.", + "type": "string" + }, + "migrationsDir": { + "description": "Directory where migrations should be created by default.", + "type": "string" + }, + "subscribersDir": { + "description": "Directory where subscribers should be created by default.", + "type": "string" + } + }, + "type": "object" + }, + "database": { + "type": "string" + }, + "dropSchema": { + "description": "Drops the schema each time connection is being established.\nBe careful with this option and don't use this in production - otherwise you'll lose all production data.\nThis option is useful during debug and development.", + "type": "boolean" + }, + "entities": { + "description": "Entities to be loaded for this connection.\nAccepts both entity classes and directories where from entities need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "$ref": "#/definitions/EntitySchema<any>" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "entityPrefix": { + "description": "Prefix to use on all tables (collections) of this connection in the database.", + "type": "string" + }, + "entitySkipConstructor": { + "description": "When creating new Entity instances, skip all constructors when true.", + "type": "boolean" + }, + "extra": { + "description": "Extra connection options to be passed to the underlying driver.\n\ntodo: deprecate this and move all database-specific types into hts own connection options object." + }, + "formatOptions": { + "additionalProperties": { + }, + "properties": { + "castParameters": { + "type": "boolean" + } + }, + "type": "object" + }, + "logger": { + "anyOf": [ + { + "$ref": "#/definitions/Logger" + }, + { + "enum": [ + "advanced-console", + "debug", + "file", + "simple-console" + ], + "type": "string" + } + ], + "description": "Logger instance used to log queries and events in the ORM." + }, + "logging": { + "anyOf": [ + { + "items": { + "enum": [ + "error", + "info", + "log", + "migration", + "query", + "schema", + "warn" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "all", + false, + true + ] + } + ], + "description": "Logging options." + }, + "maxQueryExecutionTime": { + "description": "Maximum number of milliseconds query should be executed before logger log a warning.", + "type": "number" + }, + "migrations": { + "description": "Migrations to be loaded for this connection.\nAccepts both migration classes and directories where from migrations need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "migrationsRun": { + "description": "Indicates if migrations should be auto run on every application launch.\nAlternative to it, you can use CLI and run migrations:run command.", + "type": "boolean" + }, + "migrationsTableName": { + "description": "Migrations table name, in case of different name from \"migrations\".\nAccepts single string name.", + "type": "string" + }, + "migrationsTransactionMode": { + "description": "Transaction mode for migrations to run in", + "enum": [ + "all", + "each", + "none" + ], + "type": "string" + }, + "name": { + "description": "Connection name. If connection name is not given then it will be called \"default\".\nDifferent connections must have different names.", + "type": "string" + }, + "namingStrategy": { + "$ref": "#/definitions/NamingStrategyInterface", + "description": "Naming strategy to be used to name tables and columns in the database." + }, + "poolErrorHandler": { + "type": "object" + }, + "region": { + "type": "string" + }, + "resourceArn": { + "type": "string" + }, + "secretArn": { + "type": "string" + }, + "serviceConfigOptions": { + "additionalProperties": { + }, + "type": "object" + }, + "subscribers": { + "description": "Subscribers to be loaded for this connection.\nAccepts both subscriber classes and directories where from subscribers need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "synchronize": { + "description": "Indicates if database schema should be auto created on every application launch.\nBe careful with this option and don't use this in production - otherwise you can lose production data.\nThis option is useful during debug and development.\nAlternative to it, you can use CLI and run schema:sync command.\n\nNote that for MongoDB database it does not create schema, because MongoDB is schemaless.\nInstead, it syncs just by creating indices.", + "type": "boolean" + }, + "transformParameters": { + "type": "boolean" + }, + "type": { + "description": "Database type.", + "enum": [ + "aurora-data-api-pg" + ], + "type": "string" + }, + "uuidExtension": { + "description": "The Postgres extension to use to generate UUID columns. Defaults to uuid-ossp.\nIf pgcrypto is selected, TypeORM will use the gen_random_uuid() function from this extension.\nIf uuid-ossp is selected, TypeORM will use the uuid_generate_v4() function from this extension.", + "enum": [ + "pgcrypto", + "uuid-ossp" + ], + "type": "string" + } + }, + "type": "object" + }, + "AzureActiveDirectoryAccessTokenAuthentication": { + "properties": { + "options": { + "properties": { + "token": { + "description": "A user need to provide `token` which they retrived else where\nto forming the connection.", + "type": "string" + } + }, + "type": "object" + }, + "type": { + "enum": [ + "azure-active-directory-access-token" + ], + "type": "string" + } + }, + "type": "object" + }, + "AzureActiveDirectoryMsiAppServiceAuthentication": { + "properties": { + "options": { + "properties": { + "clientId": { + "description": "If you user want to connect to an Azure app service using a specific client account\nthey need to provide `clientId` asscoiate to their created idnetity.\n\nThis is optional for retrieve token from azure web app service", + "type": "string" + }, + "msiEndpoint": { + "description": "A msi app service environment need to provide `msiEndpoint` for retriving the accesstoken.", + "type": "string" + }, + "msiSecret": { + "description": "A msi app service environment need to provide `msiSecret` for retriving the accesstoken.", + "type": "string" + } + }, + "type": "object" + }, + "type": { + "enum": [ + "azure-active-directory-msi-app-service" + ], + "type": "string" + } + }, + "type": "object" + }, + "AzureActiveDirectoryMsiVmAuthentication": { + "properties": { + "options": { + "properties": { + "clientId": { + "description": "If you user want to connect to an Azure app service using a specific client account\nthey need to provide `clientId` asscoiate to their created idnetity.\n\nThis is optional for retrieve token from azure web app service", + "type": "string" + }, + "msiEndpoint": { + "description": "A user need to provide `msiEndpoint` for retriving the accesstoken.", + "type": "string" + } + }, + "type": "object" + }, + "type": { + "enum": [ + "azure-active-directory-msi-vm" + ], + "type": "string" + } + }, + "type": "object" + }, + "AzureActiveDirectoryPasswordAuthentication": { + "properties": { + "options": { + "properties": { + "domain": { + "description": "Optional parameter for specific Azure tenant ID", + "type": "string" + }, + "password": { + "description": "A user need to provide `password` asscoiate to their account.", + "type": "string" + }, + "userName": { + "description": "A user need to provide `userName` asscoiate to their account.", + "type": "string" + } + }, + "type": "object" + }, + "type": { + "enum": [ + "azure-active-directory-password" + ], + "type": "string" + } + }, + "type": "object" + }, + "AzureActiveDirectoryServicePrincipalSecret": { + "properties": { + "options": { + "properties": { + "clientId": { + "description": "Application (`client`) ID from your registered Azure application", + "type": "string" + }, + "clientSecret": { + "description": "The created `client secret` for this registered Azure application", + "type": "string" + }, + "tenantId": { + "description": "Directory (`tenant`) ID from your registered Azure application", + "type": "string" + } + }, + "type": "object" + }, + "type": { + "enum": [ + "azure-active-directory-service-principal-secret" + ], + "type": "string" + } + }, + "type": "object" + }, + "Ban": { + "properties": { + "executor": { + "$ref": "#/definitions/User" + }, + "executor_id": { + "type": "string" + }, + "guild": { + "$ref": "#/definitions/Guild" + }, + "guild_id": { + "type": "string" + }, + "id": { + "type": "string" + }, + "ip": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "reason": { + "type": "string" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + }, + "user": { + "$ref": "#/definitions/User" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "BaseClass": { + "properties": { + "id": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + } + }, + "type": "object" + }, + "BaseConnectionOptions": { + "description": "BaseConnectionOptions is set of connection options shared by all database types.", + "properties": { + "cache": { + "anyOf": [ + { + "properties": { + "alwaysEnabled": { + "description": "If set to true then queries (using find methods and QueryBuilder's methods) will always be cached.", + "type": "boolean" + }, + "duration": { + "description": "Time in milliseconds in which cache will expire.\nThis can be setup per-query.\nDefault value is 1000 which is equivalent to 1 second.", + "type": "number" + }, + "ignoreErrors": { + "description": "Used to specify if cache errors should be ignored, and pass through the call to the Database.", + "type": "boolean" + }, + "options": { + "description": "Used to provide redis connection options." + }, + "provider": { + "description": "Factory function for custom cache providers that implement QueryResultCache.", + "type": "object" + }, + "tableName": { + "description": "Configurable table name for \"database\" type cache.\nDefault value is \"query-result-cache\"", + "type": "string" + }, + "type": { + "description": "Type of caching.\n\n- \"database\" means cached values will be stored in the separate table in database. This is default value.\n- \"redis\" means cached values will be stored inside redis. You must provide redis connection options.", + "enum": [ + "database", + "ioredis", + "ioredis/cluster", + "redis" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "type": "boolean" + } + ], + "description": "Allows to setup cache options." + }, + "cli": { + "description": "CLI settings.", + "properties": { + "entitiesDir": { + "description": "Directory where entities should be created by default.", + "type": "string" + }, + "migrationsDir": { + "description": "Directory where migrations should be created by default.", + "type": "string" + }, + "subscribersDir": { + "description": "Directory where subscribers should be created by default.", + "type": "string" + } + }, + "type": "object" + }, + "dropSchema": { + "description": "Drops the schema each time connection is being established.\nBe careful with this option and don't use this in production - otherwise you'll lose all production data.\nThis option is useful during debug and development.", + "type": "boolean" + }, + "entities": { + "description": "Entities to be loaded for this connection.\nAccepts both entity classes and directories where from entities need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "$ref": "#/definitions/EntitySchema<any>" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "entityPrefix": { + "description": "Prefix to use on all tables (collections) of this connection in the database.", + "type": "string" + }, + "entitySkipConstructor": { + "description": "When creating new Entity instances, skip all constructors when true.", + "type": "boolean" + }, + "extra": { + "description": "Extra connection options to be passed to the underlying driver.\n\ntodo: deprecate this and move all database-specific types into hts own connection options object." + }, + "logger": { + "anyOf": [ + { + "$ref": "#/definitions/Logger" + }, + { + "enum": [ + "advanced-console", + "debug", + "file", + "simple-console" + ], + "type": "string" + } + ], + "description": "Logger instance used to log queries and events in the ORM." + }, + "logging": { + "anyOf": [ + { + "items": { + "enum": [ + "error", + "info", + "log", + "migration", + "query", + "schema", + "warn" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "all", + false, + true + ] + } + ], + "description": "Logging options." + }, + "maxQueryExecutionTime": { + "description": "Maximum number of milliseconds query should be executed before logger log a warning.", + "type": "number" + }, + "migrations": { + "description": "Migrations to be loaded for this connection.\nAccepts both migration classes and directories where from migrations need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "migrationsRun": { + "description": "Indicates if migrations should be auto run on every application launch.\nAlternative to it, you can use CLI and run migrations:run command.", + "type": "boolean" + }, + "migrationsTableName": { + "description": "Migrations table name, in case of different name from \"migrations\".\nAccepts single string name.", + "type": "string" + }, + "migrationsTransactionMode": { + "description": "Transaction mode for migrations to run in", + "enum": [ + "all", + "each", + "none" + ], + "type": "string" + }, + "name": { + "description": "Connection name. If connection name is not given then it will be called \"default\".\nDifferent connections must have different names.", + "type": "string" + }, + "namingStrategy": { + "$ref": "#/definitions/NamingStrategyInterface", + "description": "Naming strategy to be used to name tables and columns in the database." + }, + "subscribers": { + "description": "Subscribers to be loaded for this connection.\nAccepts both subscriber classes and directories where from subscribers need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "synchronize": { + "description": "Indicates if database schema should be auto created on every application launch.\nBe careful with this option and don't use this in production - otherwise you can lose production data.\nThis option is useful during debug and development.\nAlternative to it, you can use CLI and run schema:sync command.\n\nNote that for MongoDB database it does not create schema, because MongoDB is schemaless.\nInstead, it syncs just by creating indices.", + "type": "boolean" + }, + "type": { + "$ref": "#/definitions/DatabaseType", + "description": "Database type. This value is required." + } + }, + "type": "object" + }, + "BetterSqlite3ConnectionOptions": { + "description": "Sqlite-specific connection options.", + "properties": { + "cache": { + "anyOf": [ + { + "properties": { + "alwaysEnabled": { + "description": "If set to true then queries (using find methods and QueryBuilder's methods) will always be cached.", + "type": "boolean" + }, + "duration": { + "description": "Time in milliseconds in which cache will expire.\nThis can be setup per-query.\nDefault value is 1000 which is equivalent to 1 second.", + "type": "number" + }, + "ignoreErrors": { + "description": "Used to specify if cache errors should be ignored, and pass through the call to the Database.", + "type": "boolean" + }, + "options": { + "description": "Used to provide redis connection options." + }, + "provider": { + "description": "Factory function for custom cache providers that implement QueryResultCache.", + "type": "object" + }, + "tableName": { + "description": "Configurable table name for \"database\" type cache.\nDefault value is \"query-result-cache\"", + "type": "string" + }, + "type": { + "description": "Type of caching.\n\n- \"database\" means cached values will be stored in the separate table in database. This is default value.\n- \"redis\" means cached values will be stored inside redis. You must provide redis connection options.", + "enum": [ + "database", + "ioredis", + "ioredis/cluster", + "redis" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "type": "boolean" + } + ], + "description": "Allows to setup cache options." + }, + "cli": { + "description": "CLI settings.", + "properties": { + "entitiesDir": { + "description": "Directory where entities should be created by default.", + "type": "string" + }, + "migrationsDir": { + "description": "Directory where migrations should be created by default.", + "type": "string" + }, + "subscribersDir": { + "description": "Directory where subscribers should be created by default.", + "type": "string" + } + }, + "type": "object" + }, + "database": { + "description": "Storage type or path to the storage.", + "type": "string" + }, + "dropSchema": { + "description": "Drops the schema each time connection is being established.\nBe careful with this option and don't use this in production - otherwise you'll lose all production data.\nThis option is useful during debug and development.", + "type": "boolean" + }, + "entities": { + "description": "Entities to be loaded for this connection.\nAccepts both entity classes and directories where from entities need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "$ref": "#/definitions/EntitySchema<any>" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "entityPrefix": { + "description": "Prefix to use on all tables (collections) of this connection in the database.", + "type": "string" + }, + "entitySkipConstructor": { + "description": "When creating new Entity instances, skip all constructors when true.", + "type": "boolean" + }, + "extra": { + "description": "Extra connection options to be passed to the underlying driver.\n\ntodo: deprecate this and move all database-specific types into hts own connection options object." + }, + "fileMustExist": { + "description": "If the database does not exist, an Error will be thrown instead of creating a new file.\nThis option does not affect in-memory or readonly database connections.\nDefault: false.", + "type": "boolean" + }, + "key": { + "description": "Encryption key for for SQLCipher.", + "type": "string" + }, + "logger": { + "anyOf": [ + { + "$ref": "#/definitions/Logger" + }, + { + "enum": [ + "advanced-console", + "debug", + "file", + "simple-console" + ], + "type": "string" + } + ], + "description": "Logger instance used to log queries and events in the ORM." + }, + "logging": { + "anyOf": [ + { + "items": { + "enum": [ + "error", + "info", + "log", + "migration", + "query", + "schema", + "warn" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "all", + false, + true + ] + } + ], + "description": "Logging options." + }, + "maxQueryExecutionTime": { + "description": "Maximum number of milliseconds query should be executed before logger log a warning.", + "type": "number" + }, + "migrations": { + "description": "Migrations to be loaded for this connection.\nAccepts both migration classes and directories where from migrations need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "migrationsRun": { + "description": "Indicates if migrations should be auto run on every application launch.\nAlternative to it, you can use CLI and run migrations:run command.", + "type": "boolean" + }, + "migrationsTableName": { + "description": "Migrations table name, in case of different name from \"migrations\".\nAccepts single string name.", + "type": "string" + }, + "migrationsTransactionMode": { + "description": "Transaction mode for migrations to run in", + "enum": [ + "all", + "each", + "none" + ], + "type": "string" + }, + "name": { + "description": "Connection name. If connection name is not given then it will be called \"default\".\nDifferent connections must have different names.", + "type": "string" + }, + "namingStrategy": { + "$ref": "#/definitions/NamingStrategyInterface", + "description": "Naming strategy to be used to name tables and columns in the database." + }, + "prepareDatabase": { + "description": "Function to run before a database is used in typeorm.\nYou can set pragmas, register plugins or register\nfunctions or aggregates in this function.", + "type": "object" + }, + "readonly": { + "description": "Open the database connection in readonly mode.\nDefault: false.", + "type": "boolean" + }, + "statementCacheSize": { + "description": "Cache size of sqlite statement to speed up queries.\nDefault: 100.", + "type": "number" + }, + "subscribers": { + "description": "Subscribers to be loaded for this connection.\nAccepts both subscriber classes and directories where from subscribers need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "synchronize": { + "description": "Indicates if database schema should be auto created on every application launch.\nBe careful with this option and don't use this in production - otherwise you can lose production data.\nThis option is useful during debug and development.\nAlternative to it, you can use CLI and run schema:sync command.\n\nNote that for MongoDB database it does not create schema, because MongoDB is schemaless.\nInstead, it syncs just by creating indices.", + "type": "boolean" + }, + "timeout": { + "description": "The number of milliseconds to wait when executing queries\non a locked database, before throwing a SQLITE_BUSY error.\nDefault: 5000.", + "type": "number" + }, + "type": { + "description": "Database type.", + "enum": [ + "better-sqlite3" + ], + "type": "string" + }, + "verbose": { + "$ref": "#/definitions/Function", + "description": "Provide a function that gets called with every SQL string executed by the database connection." + } + }, + "type": "object" + }, + "BigInt": { + "properties": { + "__@toStringTag": { + "enum": [ + "BigInt" + ], + "type": "string" + } + }, + "type": "object" + }, + "BitField": { + "description": "Data structure that makes it easy to interact with a bitfield.", + "properties": { + "bitfield": { + "type": "bigint" + } + }, + "type": "object" + }, + "BitFieldResolvable": { + "anyOf": [ + { + "$ref": "#/definitions/BigInt" + }, + { + "$ref": "#/definitions/BitField" + }, + { + "items": { + "$ref": "#/definitions/BitFieldResolvable" + }, + "type": "array" + }, + { + "type": [ + "string", + "number" + ] + } + ] + }, + "Boolean": { + "type": "object" + }, + "BooleanConstructor": { + "properties": { + "prototype": { + "$ref": "#/definitions/Boolean" + } + }, + "type": "object" + }, + "Broadcaster": { + "description": "Broadcaster provides a helper methods to broadcast events to the subscribers.", + "properties": { + "queryRunner": { + } + }, + "type": "object" + }, + "CUSTOMEVENTS": { + "enum": [ + "INVALIDATED" + ], + "type": "string" + }, + "CapacitorConnectionOptions": { + "description": "Sqlite-specific connection options.", + "properties": { + "cache": { + "anyOf": [ + { + "properties": { + "alwaysEnabled": { + "description": "If set to true then queries (using find methods and QueryBuilder's methods) will always be cached.", + "type": "boolean" + }, + "duration": { + "description": "Time in milliseconds in which cache will expire.\nThis can be setup per-query.\nDefault value is 1000 which is equivalent to 1 second.", + "type": "number" + }, + "ignoreErrors": { + "description": "Used to specify if cache errors should be ignored, and pass through the call to the Database.", + "type": "boolean" + }, + "options": { + "description": "Used to provide redis connection options." + }, + "provider": { + "description": "Factory function for custom cache providers that implement QueryResultCache.", + "type": "object" + }, + "tableName": { + "description": "Configurable table name for \"database\" type cache.\nDefault value is \"query-result-cache\"", + "type": "string" + }, + "type": { + "description": "Type of caching.\n\n- \"database\" means cached values will be stored in the separate table in database. This is default value.\n- \"redis\" means cached values will be stored inside redis. You must provide redis connection options.", + "enum": [ + "database", + "ioredis", + "ioredis/cluster", + "redis" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "type": "boolean" + } + ], + "description": "Allows to setup cache options." + }, + "cli": { + "description": "CLI settings.", + "properties": { + "entitiesDir": { + "description": "Directory where entities should be created by default.", + "type": "string" + }, + "migrationsDir": { + "description": "Directory where migrations should be created by default.", + "type": "string" + }, + "subscribersDir": { + "description": "Directory where subscribers should be created by default.", + "type": "string" + } + }, + "type": "object" + }, + "database": { + "description": "Database name (capacitor-sqlite will add the suffix `SQLite.db`)", + "type": "string" + }, + "driver": { + "description": "The capacitor-sqlite instance. For example, `new SQLiteConnection(CapacitorSQLite)`." + }, + "dropSchema": { + "description": "Drops the schema each time connection is being established.\nBe careful with this option and don't use this in production - otherwise you'll lose all production data.\nThis option is useful during debug and development.", + "type": "boolean" + }, + "entities": { + "description": "Entities to be loaded for this connection.\nAccepts both entity classes and directories where from entities need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "$ref": "#/definitions/EntitySchema<any>" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "entityPrefix": { + "description": "Prefix to use on all tables (collections) of this connection in the database.", + "type": "string" + }, + "entitySkipConstructor": { + "description": "When creating new Entity instances, skip all constructors when true.", + "type": "boolean" + }, + "extra": { + "description": "Extra connection options to be passed to the underlying driver.\n\ntodo: deprecate this and move all database-specific types into hts own connection options object." + }, + "journalMode": { + "description": "The SQLite journal mode (optional)", + "enum": [ + "DELETE", + "MEMORY", + "OFF", + "PERSIST", + "TRUNCATE", + "WAL" + ], + "type": "string" + }, + "logger": { + "anyOf": [ + { + "$ref": "#/definitions/Logger" + }, + { + "enum": [ + "advanced-console", + "debug", + "file", + "simple-console" + ], + "type": "string" + } + ], + "description": "Logger instance used to log queries and events in the ORM." + }, + "logging": { + "anyOf": [ + { + "items": { + "enum": [ + "error", + "info", + "log", + "migration", + "query", + "schema", + "warn" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "all", + false, + true + ] + } + ], + "description": "Logging options." + }, + "maxQueryExecutionTime": { + "description": "Maximum number of milliseconds query should be executed before logger log a warning.", + "type": "number" + }, + "migrations": { + "description": "Migrations to be loaded for this connection.\nAccepts both migration classes and directories where from migrations need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "migrationsRun": { + "description": "Indicates if migrations should be auto run on every application launch.\nAlternative to it, you can use CLI and run migrations:run command.", + "type": "boolean" + }, + "migrationsTableName": { + "description": "Migrations table name, in case of different name from \"migrations\".\nAccepts single string name.", + "type": "string" + }, + "migrationsTransactionMode": { + "description": "Transaction mode for migrations to run in", + "enum": [ + "all", + "each", + "none" + ], + "type": "string" + }, + "mode": { + "description": "Set the mode for database encryption", + "enum": [ + "encryption", + "newsecret", + "no-encryption", + "secret" + ], + "type": "string" + }, + "name": { + "description": "Connection name. If connection name is not given then it will be called \"default\".\nDifferent connections must have different names.", + "type": "string" + }, + "namingStrategy": { + "$ref": "#/definitions/NamingStrategyInterface", + "description": "Naming strategy to be used to name tables and columns in the database." + }, + "subscribers": { + "description": "Subscribers to be loaded for this connection.\nAccepts both subscriber classes and directories where from subscribers need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "synchronize": { + "description": "Indicates if database schema should be auto created on every application launch.\nBe careful with this option and don't use this in production - otherwise you can lose production data.\nThis option is useful during debug and development.\nAlternative to it, you can use CLI and run schema:sync command.\n\nNote that for MongoDB database it does not create schema, because MongoDB is schemaless.\nInstead, it syncs just by creating indices.", + "type": "boolean" + }, + "type": { + "description": "Database type.", + "enum": [ + "capacitor" + ], + "type": "string" + }, + "version": { + "description": "Database version", + "type": "number" + } + }, + "type": "object" + }, + "Channel": { + "properties": { + "bitrate": { + "type": "number" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "default_auto_archive_duration": { + "type": "number" + }, + "guild": { + "$ref": "#/definitions/Guild" + }, + "guild_id": { + "type": "string" + }, + "id": { + "type": "string" + }, + "last_message": { + "$ref": "#/definitions/Message" + }, + "last_message_id": { + "type": "string" + }, + "last_pin_timestamp": { + "type": "number" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "name": { + "type": "string" + }, + "nsfw": { + "type": "boolean" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "owner": { + "$ref": "#/definitions/User" + }, + "owner_id": { + "type": "string" + }, + "parent": { + "$ref": "#/definitions/Channel" + }, + "parent_id": { + "type": "string" + }, + "permission_overwrites": { + "items": { + "$ref": "#/definitions/ChannelPermissionOverwrite" + }, + "type": "array" + }, + "position": { + "type": "number" + }, + "rate_limit_per_user": { + "type": "number" + }, + "recipient_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "recipients": { + "anyOf": [ + { + "items": { + "$ref": "#/definitions/User" + }, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "topic": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/ChannelType" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + }, + "user_limit": { + "type": "number" + }, + "video_quality_mode": { + "type": "number" + } + }, + "type": "object" + }, + "ChannelCreateEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "$ref": "#/definitions/Channel" + }, + "event": { + "enum": [ + "CHANNEL_CREATE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "ChannelDeleteEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "$ref": "#/definitions/Channel" + }, + "event": { + "enum": [ + "CHANNEL_DELETE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "ChannelPermissionOverwrite": { + "properties": { + "allow": { + "type": "bigint" + }, + "deny": { + "type": "bigint" + }, + "id": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/ChannelPermissionOverwriteType" + } + }, + "type": "object" + }, + "ChannelPermissionOverwriteType": { + "enum": [ + 0, + 1 + ], + "type": "number" + }, + "ChannelPinsUpdateEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "channel_id": { + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "last_pin_timestamp": { + "type": "number" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "CHANNEL_PINS_UPDATE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "ChannelType": { + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], + "type": "number" + }, + "ChannelUpdateEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "$ref": "#/definitions/Channel" + }, + "event": { + "enum": [ + "CHANNEL_UPDATE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "Channel_1": { + "type": "object" + }, + "CheckMetadata": { + "description": "Check metadata contains all information about table's check constraints.", + "properties": { + "entityMetadata": { + "$ref": "#/definitions/EntityMetadata", + "description": "Entity metadata of the class to which this check constraint is applied." + }, + "expression": { + "description": "Check expression.", + "type": "string" + }, + "givenName": { + "description": "User specified check constraint name.", + "type": "string" + }, + "name": { + "description": "Final check constraint name.\nIf check constraint name was given by a user then it stores normalized (by naming strategy) givenName.\nIf check constraint name was not given then its generated.", + "type": "string" + }, + "target": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ], + "description": "Target class to which metadata is applied." + } + }, + "type": "object" + }, + "ClientStatus": { + "properties": { + "desktop": { + "type": "string" + }, + "mobile": { + "type": "string" + }, + "web": { + "type": "string" + } + }, + "type": "object" + }, + "ClosureTreeOptions": { + "properties": { + "ancestorColumnName": { + "type": "object" + }, + "closureTableName": { + "type": "string" + }, + "descendantColumnName": { + "type": "object" + } + }, + "type": "object" + }, + "CockroachConnectionCredentialsOptions": { + "description": "Cockroachdb specific connection credential options.", + "properties": { + "database": { + "description": "Database name to connect to.", + "type": "string" + }, + "host": { + "description": "Database host.", + "type": "string" + }, + "password": { + "description": "Database password.", + "type": "string" + }, + "port": { + "description": "Database host port.", + "type": "number" + }, + "ssl": { + "anyOf": [ + { + "$ref": "#/definitions/TlsOptions" + }, + { + "type": "boolean" + } + ], + "description": "Object with ssl parameters" + }, + "url": { + "description": "Connection url where perform connection to.", + "type": "string" + }, + "username": { + "description": "Database username.", + "type": "string" + } + }, + "type": "object" + }, + "CockroachConnectionOptions": { + "description": "Cockroachdb-specific connection options.", + "properties": { + "cache": { + "anyOf": [ + { + "properties": { + "alwaysEnabled": { + "description": "If set to true then queries (using find methods and QueryBuilder's methods) will always be cached.", + "type": "boolean" + }, + "duration": { + "description": "Time in milliseconds in which cache will expire.\nThis can be setup per-query.\nDefault value is 1000 which is equivalent to 1 second.", + "type": "number" + }, + "ignoreErrors": { + "description": "Used to specify if cache errors should be ignored, and pass through the call to the Database.", + "type": "boolean" + }, + "options": { + "description": "Used to provide redis connection options." + }, + "provider": { + "description": "Factory function for custom cache providers that implement QueryResultCache.", + "type": "object" + }, + "tableName": { + "description": "Configurable table name for \"database\" type cache.\nDefault value is \"query-result-cache\"", + "type": "string" + }, + "type": { + "description": "Type of caching.\n\n- \"database\" means cached values will be stored in the separate table in database. This is default value.\n- \"redis\" means cached values will be stored inside redis. You must provide redis connection options.", + "enum": [ + "database", + "ioredis", + "ioredis/cluster", + "redis" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "type": "boolean" + } + ], + "description": "Allows to setup cache options." + }, + "cli": { + "description": "CLI settings.", + "properties": { + "entitiesDir": { + "description": "Directory where entities should be created by default.", + "type": "string" + }, + "migrationsDir": { + "description": "Directory where migrations should be created by default.", + "type": "string" + }, + "subscribersDir": { + "description": "Directory where subscribers should be created by default.", + "type": "string" + } + }, + "type": "object" + }, + "database": { + "description": "Database name to connect to.", + "type": "string" + }, + "dropSchema": { + "description": "Drops the schema each time connection is being established.\nBe careful with this option and don't use this in production - otherwise you'll lose all production data.\nThis option is useful during debug and development.", + "type": "boolean" + }, + "entities": { + "description": "Entities to be loaded for this connection.\nAccepts both entity classes and directories where from entities need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "$ref": "#/definitions/EntitySchema<any>" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "entityPrefix": { + "description": "Prefix to use on all tables (collections) of this connection in the database.", + "type": "string" + }, + "entitySkipConstructor": { + "description": "When creating new Entity instances, skip all constructors when true.", + "type": "boolean" + }, + "extra": { + "description": "Extra connection options to be passed to the underlying driver.\n\ntodo: deprecate this and move all database-specific types into hts own connection options object." + }, + "host": { + "description": "Database host.", + "type": "string" + }, + "logger": { + "anyOf": [ + { + "$ref": "#/definitions/Logger" + }, + { + "enum": [ + "advanced-console", + "debug", + "file", + "simple-console" + ], + "type": "string" + } + ], + "description": "Logger instance used to log queries and events in the ORM." + }, + "logging": { + "anyOf": [ + { + "items": { + "enum": [ + "error", + "info", + "log", + "migration", + "query", + "schema", + "warn" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "all", + false, + true + ] + } + ], + "description": "Logging options." + }, + "maxQueryExecutionTime": { + "description": "Maximum number of milliseconds query should be executed before logger log a warning.", + "type": "number" + }, + "migrations": { + "description": "Migrations to be loaded for this connection.\nAccepts both migration classes and directories where from migrations need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "migrationsRun": { + "description": "Indicates if migrations should be auto run on every application launch.\nAlternative to it, you can use CLI and run migrations:run command.", + "type": "boolean" + }, + "migrationsTableName": { + "description": "Migrations table name, in case of different name from \"migrations\".\nAccepts single string name.", + "type": "string" + }, + "migrationsTransactionMode": { + "description": "Transaction mode for migrations to run in", + "enum": [ + "all", + "each", + "none" + ], + "type": "string" + }, + "name": { + "description": "Connection name. If connection name is not given then it will be called \"default\".\nDifferent connections must have different names.", + "type": "string" + }, + "namingStrategy": { + "$ref": "#/definitions/NamingStrategyInterface", + "description": "Naming strategy to be used to name tables and columns in the database." + }, + "password": { + "description": "Database password.", + "type": "string" + }, + "poolErrorHandler": { + "type": "object" + }, + "port": { + "description": "Database host port.", + "type": "number" + }, + "replication": { + "description": "Replication setup.", + "properties": { + "master": { + "$ref": "#/definitions/CockroachConnectionCredentialsOptions", + "description": "Master server used by orm to perform writes." + }, + "slaves": { + "description": "List of read-from severs (slaves).", + "items": { + "$ref": "#/definitions/CockroachConnectionCredentialsOptions" + }, + "type": "array" + } + }, + "type": "object" + }, + "schema": { + "description": "Schema name.", + "type": "string" + }, + "ssl": { + "anyOf": [ + { + "$ref": "#/definitions/TlsOptions" + }, + { + "type": "boolean" + } + ], + "description": "Object with ssl parameters" + }, + "subscribers": { + "description": "Subscribers to be loaded for this connection.\nAccepts both subscriber classes and directories where from subscribers need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "synchronize": { + "description": "Indicates if database schema should be auto created on every application launch.\nBe careful with this option and don't use this in production - otherwise you can lose production data.\nThis option is useful during debug and development.\nAlternative to it, you can use CLI and run schema:sync command.\n\nNote that for MongoDB database it does not create schema, because MongoDB is schemaless.\nInstead, it syncs just by creating indices.", + "type": "boolean" + }, + "type": { + "description": "Database type.", + "enum": [ + "cockroachdb" + ], + "type": "string" + }, + "url": { + "description": "Connection url where perform connection to.", + "type": "string" + }, + "username": { + "description": "Database username.", + "type": "string" + } + }, + "type": "object" + }, + "ColumnMetadata": { + "description": "This metadata contains all information about entity's column.", + "properties": { + "asExpression": { + "description": "Generated column expression. Supports only in MySQL.", + "type": "string" + }, + "charset": { + "description": "Defines column character set.", + "type": "string" + }, + "closureType": { + "description": "Column type in the case if this column is in the closure table.\nColumn can be ancestor or descendant in the closure tables.", + "enum": [ + "ancestor", + "descendant" + ], + "type": "string" + }, + "collation": { + "description": "Defines column collation.", + "type": "string" + }, + "comment": { + "description": "Column comment.\nThis feature is not supported by all databases.", + "type": "string" + }, + "databaseName": { + "description": "Complete column name in the database including its embedded prefixes.", + "type": "string" + }, + "databaseNameWithoutPrefixes": { + "description": "Database name in the database without embedded prefixes applied.", + "type": "string" + }, + "databasePath": { + "description": "Gets full path to this column database name (including column database name).\nFull path is relevant when column is used in embeds (one or multiple nested).\nFor example it will return \"counters.subcounters.likes\".\nIf property is not in embeds then it returns just database name of the column.", + "type": "string" + }, + "default": { + "anyOf": [ + { + "items": { + "type": [ + "string", + "number", + "boolean" + ] + }, + "type": "array" + }, + { + "$ref": "#/definitions/Record<string,object>" + }, + { + "type": [ + "null", + "string", + "number", + "object", + "boolean" + ] + } + ], + "description": "Default database value." + }, + "embeddedMetadata": { + "$ref": "#/definitions/EmbeddedMetadata", + "description": "Embedded metadata where this column metadata is.\nIf this column is not in embed then this property value is undefined." + }, + "entityMetadata": { + "$ref": "#/definitions/EntityMetadata", + "description": "Entity metadata where this column metadata is.\n\nFor example for @Column() name: string in Post, entityMetadata will be metadata of Post entity." + }, + "enum": { + "description": "Array of possible enumerated values.\n\n`postgres` and `mysql` store enum values as strings but we want to keep support\nfor numeric and heterogeneous based typescript enums, so we need (string|number)[]", + "items": { + "type": [ + "string", + "number" + ] + }, + "type": "array" + }, + "enumName": { + "description": "Exact name of enum", + "type": "string" + }, + "generatedType": { + "description": "Generated column type. Supports only in MySQL.", + "enum": [ + "STORED", + "VIRTUAL" + ], + "type": "string" + }, + "generationStrategy": { + "description": "Specifies generation strategy if this column will use auto increment.", + "enum": [ + "increment", + "rowid", + "uuid" + ], + "type": "string" + }, + "givenDatabaseName": { + "description": "Database name set by entity metadata builder, not yet passed naming strategy process and without embedded prefixes.", + "type": "string" + }, + "hstoreType": { + "description": "Return type of HSTORE column.\nReturns value as string or as object.", + "enum": [ + "object", + "string" + ], + "type": "string" + }, + "isArray": { + "description": "Indicates if this column is an array.", + "type": "boolean" + }, + "isCreateDate": { + "description": "Indicates if this column contains an entity creation date.", + "type": "boolean" + }, + "isDeleteDate": { + "description": "Indicates if this column contains an entity delete date.", + "type": "boolean" + }, + "isDiscriminator": { + "description": "Indicates if column is discriminator. Discriminator columns are not mapped to the entity.", + "type": "boolean" + }, + "isGenerated": { + "description": "Indicates if this column is generated (auto increment or generated other way).", + "type": "boolean" + }, + "isInsert": { + "description": "Indicates if column is inserted by default or not.", + "type": "boolean" + }, + "isMaterializedPath": { + "description": "Indicates if this column is materialized path's path column.\nUsed only in tree entities with materialized path type.", + "type": "boolean" + }, + "isNestedSetLeft": { + "description": "Indicates if this column is nested set's left column.\nUsed only in tree entities with nested-set type.", + "type": "boolean" + }, + "isNestedSetRight": { + "description": "Indicates if this column is nested set's right column.\nUsed only in tree entities with nested-set type.", + "type": "boolean" + }, + "isNullable": { + "description": "Indicates if column can contain nulls or not.", + "type": "boolean" + }, + "isObjectId": { + "description": "Indicates if this column contains an object id.", + "type": "boolean" + }, + "isPrimary": { + "description": "Indicates if this column is a primary key.", + "type": "boolean" + }, + "isSelect": { + "description": "Indicates if column is selected by query builder or not.", + "type": "boolean" + }, + "isTreeLevel": { + "description": "Indicates if column is tree-level column. Tree-level columns are used in closure entities.", + "type": "boolean" + }, + "isUpdate": { + "description": "Indicates if column allows updates or not.", + "type": "boolean" + }, + "isUpdateDate": { + "description": "Indicates if this column contains an entity update date.", + "type": "boolean" + }, + "isVersion": { + "description": "Indicates if this column contains an entity version.", + "type": "boolean" + }, + "isVirtual": { + "description": "Indicates if column is virtual. Virtual columns are not mapped to the entity.", + "type": "boolean" + }, + "length": { + "description": "Type's length in the database.", + "type": "string" + }, + "onUpdate": { + "description": "ON UPDATE trigger. Works only for MySQL.", + "type": "string" + }, + "precision": { + "description": "The precision for a decimal (exact numeric) column (applies only for decimal column),\nwhich is the maximum number of digits that are stored for the values.", + "type": [ + "null", + "number" + ] + }, + "propertyAliasName": { + "description": "Same as property path, but dots are replaced with '_'.\nUsed in query builder statements.", + "type": "string" + }, + "propertyName": { + "description": "Class's property name on which this column is applied.", + "type": "string" + }, + "propertyPath": { + "description": "Gets full path to this column property (including column property name).\nFull path is relevant when column is used in embeds (one or multiple nested).\nFor example it will return \"counters.subcounters.likes\".\nIf property is not in embeds then it returns just property name of the column.", + "type": "string" + }, + "referencedColumn": { + "$ref": "#/definitions/ColumnMetadata", + "description": "If this column is foreign key then it references some other column,\nand this property will contain reference to this column." + }, + "relationMetadata": { + "$ref": "#/definitions/RelationMetadata", + "description": "If column is a foreign key of some relation then this relation's metadata will be there.\nIf this column does not have a foreign key then this property value is undefined." + }, + "scale": { + "description": "The scale for a decimal (exact numeric) column (applies only for decimal column),\nwhich represents the number of digits to the right of the decimal point and must not be greater than precision.", + "type": "number" + }, + "spatialFeatureType": { + "description": "Spatial Feature Type (Geometry, Point, Polygon, etc.)", + "type": "string" + }, + "srid": { + "description": "SRID (Spatial Reference ID (EPSG code))", + "type": "number" + }, + "target": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ], + "description": "Target class where column decorator is used.\nThis may not be always equal to entity metadata (for example embeds or inheritance cases)." + }, + "transformer": { + "anyOf": [ + { + "$ref": "#/definitions/ValueTransformer" + }, + { + "items": { + "$ref": "#/definitions/ValueTransformer" + }, + "type": "array" + } + ], + "description": "Specifies a value transformer that is to be used to (un)marshal\nthis column when reading or writing to the database." + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "The database type of the column." + }, + "unsigned": { + "description": "Puts UNSIGNED attribute on to numeric column. Works only for MySQL.", + "type": "boolean" + }, + "width": { + "description": "Type's display width in the database.", + "type": "number" + }, + "zerofill": { + "description": "Puts ZEROFILL attribute on to numeric column. Works only for MySQL.\nIf you specify ZEROFILL for a numeric column, MySQL automatically adds the UNSIGNED attribute to the column", + "type": "boolean" + } + }, + "type": "object" + }, + "ConnectedAccount": { + "properties": { + "access_token": { + "type": "string" + }, + "friend_sync": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "name": { + "type": "string" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "revoked": { + "type": "boolean" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "show_activity": { + "type": "boolean" + }, + "type": { + "type": "string" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + }, + "verifie": { + "type": "boolean" + }, + "visibility": { + "type": "number" + } + }, + "type": "object" + }, + "Connection": { + "description": "Connection is a single database ORM connection to a specific database.\nIts not required to be a database connection, depend on database type it can create connection pool.\nYou can have multiple connections to multiple databases in your application.", + "properties": { + "driver": { + "$ref": "#/definitions/Driver", + "description": "Database driver used by this connection." + }, + "entityMetadatas": { + "description": "All entity metadatas that are registered for this connection.", + "items": { + "$ref": "#/definitions/EntityMetadata" + }, + "type": "array" + }, + "isConnected": { + "description": "Indicates if connection is initialized or not.", + "type": "boolean" + }, + "logger": { + "$ref": "#/definitions/Logger", + "description": "Logger used to log orm events." + }, + "manager": { + "$ref": "#/definitions/EntityManager", + "description": "EntityManager of this connection." + }, + "migrations": { + "description": "Migration instances that are registered for this connection.", + "items": { + "$ref": "#/definitions/MigrationInterface" + }, + "type": "array" + }, + "mongoManager": { + "$ref": "#/definitions/MongoEntityManager", + "description": "Gets the mongodb entity manager that allows to perform mongodb-specific repository operations\nwith any entity in this connection.\n\nAvailable only in mongodb connections." + }, + "name": { + "description": "Connection name.", + "type": "string" + }, + "namingStrategy": { + "$ref": "#/definitions/NamingStrategyInterface", + "description": "Naming strategy used in the connection." + }, + "options": { + "anyOf": [ + { + "$ref": "#/definitions/CockroachConnectionOptions" + }, + { + "$ref": "#/definitions/MysqlConnectionOptions" + }, + { + "$ref": "#/definitions/PostgresConnectionOptions" + }, + { + "$ref": "#/definitions/SqliteConnectionOptions" + }, + { + "$ref": "#/definitions/SqlServerConnectionOptions" + }, + { + "$ref": "#/definitions/OracleConnectionOptions" + }, + { + "$ref": "#/definitions/MongoConnectionOptions" + }, + { + "$ref": "#/definitions/CordovaConnectionOptions" + }, + { + "$ref": "#/definitions/SqljsConnectionOptions" + }, + { + "$ref": "#/definitions/ReactNativeConnectionOptions" + }, + { + "$ref": "#/definitions/NativescriptConnectionOptions" + }, + { + "$ref": "#/definitions/ExpoConnectionOptions" + }, + { + "$ref": "#/definitions/AuroraDataApiConnectionOptions" + }, + { + "$ref": "#/definitions/SapConnectionOptions" + }, + { + "$ref": "#/definitions/AuroraDataApiPostgresConnectionOptions" + }, + { + "$ref": "#/definitions/BetterSqlite3ConnectionOptions" + }, + { + "$ref": "#/definitions/CapacitorConnectionOptions" + } + ], + "description": "Connection options." + }, + "queryResultCache": { + "$ref": "#/definitions/QueryResultCache", + "description": "Used to work with query result cache." + }, + "relationLoader": { + "$ref": "#/definitions/RelationLoader", + "description": "Used to load relations and work with lazy relations." + }, + "sqljsManager": { + "$ref": "#/definitions/SqljsEntityManager", + "description": "Gets a sql.js specific Entity Manager that allows to perform special load and save operations\n\nAvailable only in connection with the sqljs driver." + }, + "subscribers": { + "description": "Entity subscriber instances that are registered for this connection.", + "items": { + "$ref": "#/definitions/EntitySubscriberInterface<any>" + }, + "type": "array" + } + }, + "type": "object" + }, + "CordovaConnectionOptions": { + "description": "Sqlite-specific connection options.", + "properties": { + "cache": { + "anyOf": [ + { + "properties": { + "alwaysEnabled": { + "description": "If set to true then queries (using find methods and QueryBuilder's methods) will always be cached.", + "type": "boolean" + }, + "duration": { + "description": "Time in milliseconds in which cache will expire.\nThis can be setup per-query.\nDefault value is 1000 which is equivalent to 1 second.", + "type": "number" + }, + "ignoreErrors": { + "description": "Used to specify if cache errors should be ignored, and pass through the call to the Database.", + "type": "boolean" + }, + "options": { + "description": "Used to provide redis connection options." + }, + "provider": { + "description": "Factory function for custom cache providers that implement QueryResultCache.", + "type": "object" + }, + "tableName": { + "description": "Configurable table name for \"database\" type cache.\nDefault value is \"query-result-cache\"", + "type": "string" + }, + "type": { + "description": "Type of caching.\n\n- \"database\" means cached values will be stored in the separate table in database. This is default value.\n- \"redis\" means cached values will be stored inside redis. You must provide redis connection options.", + "enum": [ + "database", + "ioredis", + "ioredis/cluster", + "redis" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "type": "boolean" + } + ], + "description": "Allows to setup cache options." + }, + "cli": { + "description": "CLI settings.", + "properties": { + "entitiesDir": { + "description": "Directory where entities should be created by default.", + "type": "string" + }, + "migrationsDir": { + "description": "Directory where migrations should be created by default.", + "type": "string" + }, + "subscribersDir": { + "description": "Directory where subscribers should be created by default.", + "type": "string" + } + }, + "type": "object" + }, + "database": { + "description": "Database name.", + "type": "string" + }, + "dropSchema": { + "description": "Drops the schema each time connection is being established.\nBe careful with this option and don't use this in production - otherwise you'll lose all production data.\nThis option is useful during debug and development.", + "type": "boolean" + }, + "entities": { + "description": "Entities to be loaded for this connection.\nAccepts both entity classes and directories where from entities need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "$ref": "#/definitions/EntitySchema<any>" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "entityPrefix": { + "description": "Prefix to use on all tables (collections) of this connection in the database.", + "type": "string" + }, + "entitySkipConstructor": { + "description": "When creating new Entity instances, skip all constructors when true.", + "type": "boolean" + }, + "extra": { + "description": "Extra connection options to be passed to the underlying driver.\n\ntodo: deprecate this and move all database-specific types into hts own connection options object." + }, + "location": { + "description": "Storage Location", + "type": "string" + }, + "logger": { + "anyOf": [ + { + "$ref": "#/definitions/Logger" + }, + { + "enum": [ + "advanced-console", + "debug", + "file", + "simple-console" + ], + "type": "string" + } + ], + "description": "Logger instance used to log queries and events in the ORM." + }, + "logging": { + "anyOf": [ + { + "items": { + "enum": [ + "error", + "info", + "log", + "migration", + "query", + "schema", + "warn" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "all", + false, + true + ] + } + ], + "description": "Logging options." + }, + "maxQueryExecutionTime": { + "description": "Maximum number of milliseconds query should be executed before logger log a warning.", + "type": "number" + }, + "migrations": { + "description": "Migrations to be loaded for this connection.\nAccepts both migration classes and directories where from migrations need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "migrationsRun": { + "description": "Indicates if migrations should be auto run on every application launch.\nAlternative to it, you can use CLI and run migrations:run command.", + "type": "boolean" + }, + "migrationsTableName": { + "description": "Migrations table name, in case of different name from \"migrations\".\nAccepts single string name.", + "type": "string" + }, + "migrationsTransactionMode": { + "description": "Transaction mode for migrations to run in", + "enum": [ + "all", + "each", + "none" + ], + "type": "string" + }, + "name": { + "description": "Connection name. If connection name is not given then it will be called \"default\".\nDifferent connections must have different names.", + "type": "string" + }, + "namingStrategy": { + "$ref": "#/definitions/NamingStrategyInterface", + "description": "Naming strategy to be used to name tables and columns in the database." + }, + "subscribers": { + "description": "Subscribers to be loaded for this connection.\nAccepts both subscriber classes and directories where from subscribers need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "synchronize": { + "description": "Indicates if database schema should be auto created on every application launch.\nBe careful with this option and don't use this in production - otherwise you can lose production data.\nThis option is useful during debug and development.\nAlternative to it, you can use CLI and run schema:sync command.\n\nNote that for MongoDB database it does not create schema, because MongoDB is schemaless.\nInstead, it syncs just by creating indices.", + "type": "boolean" + }, + "type": { + "description": "Database type.", + "enum": [ + "cordova" + ], + "type": "string" + } + }, + "type": "object" + }, + "DataTypeDefaults": { + "additionalProperties": { + "properties": { + "length": { + "type": "number" + }, + "precision": { + "type": "number" + }, + "scale": { + "type": "number" + }, + "width": { + "type": "number" + } + }, + "type": "object" + }, + "type": "object" + }, + "DatabaseType": { + "description": "Database type.", + "enum": [ + "aurora-data-api", + "aurora-data-api-pg", + "better-sqlite3", + "capacitor", + "cockroachdb", + "cordova", + "expo", + "mariadb", + "mongodb", + "mssql", + "mysql", + "nativescript", + "oracle", + "postgres", + "react-native", + "sap", + "sqlite", + "sqljs" + ], + "type": "string" + }, + "DateConstructor": { + "properties": { + "prototype": { + "format": "date-time", + "type": "string" + } + }, + "type": "object" + }, + "DefaultAuthentication": { + "properties": { + "options": { + "properties": { + "password": { + "description": "Password to use for sql server login.", + "type": "string" + }, + "userName": { + "description": "User name to use for sql server login.", + "type": "string" + } + }, + "type": "object" + }, + "type": { + "enum": [ + "default" + ], + "type": "string" + } + }, + "type": "object" + }, + "Driver": { + "description": "Driver organizes TypeORM communication with specific database management system.", + "properties": { + "dataTypeDefaults": { + "$ref": "#/definitions/DataTypeDefaults", + "description": "Default values of length, precision and scale depends on column data type.\nUsed in the cases when length/precision/scale is not specified by user." + }, + "database": { + "description": "Master database used to perform all write queries.\n\ntodo: probably move into query runner.", + "type": "string" + }, + "isReplicated": { + "description": "Indicates if replication is enabled.", + "type": "boolean" + }, + "mappedDataTypes": { + "$ref": "#/definitions/MappedColumnTypes", + "description": "Orm has special columns and we need to know what database column types should be for those types.\nColumn types are driver dependant." + }, + "maxAliasLength": { + "description": "Max length allowed by the DBMS for aliases (execution of queries).", + "type": "number" + }, + "options": { + "$ref": "#/definitions/BaseConnectionOptions", + "description": "Connection options." + }, + "spatialTypes": { + "description": "Gets list of spatial column data types.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Any column type column can be." + }, + "type": "array" + }, + "supportedDataTypes": { + "description": "Gets list of supported column data types by a driver.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Any column type column can be." + }, + "type": "array" + }, + "treeSupport": { + "description": "Indicates if tree tables are supported by this driver.", + "type": "boolean" + }, + "withLengthColumnTypes": { + "description": "Gets list of column data types that support length by a driver.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Any column type column can be." + }, + "type": "array" + }, + "withPrecisionColumnTypes": { + "description": "Gets list of column data types that support precision by a driver.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Any column type column can be." + }, + "type": "array" + }, + "withScaleColumnTypes": { + "description": "Gets list of column data types that support scale by a driver.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Any column type column can be." + }, + "type": "array" + } + }, + "type": "object" + }, + "EVENT": { + "enum": [ + "APPLICATION_COMMAND_CREATE", + "APPLICATION_COMMAND_DELETE", + "APPLICATION_COMMAND_UPDATE", + "CHANNEL_CREATE", + "CHANNEL_DELETE", + "CHANNEL_PINS_UPDATE", + "CHANNEL_UPDATE", + "GUILD_BAN_ADD", + "GUILD_BAN_REMOVE", + "GUILD_CREATE", + "GUILD_DELETE", + "GUILD_EMOJI_UPDATE", + "GUILD_INTEGRATIONS_UPDATE", + "GUILD_MEMBERS_CHUNK", + "GUILD_MEMBER_ADD", + "GUILD_MEMBER_REMOVE", + "GUILD_MEMBER_SPEAKING", + "GUILD_MEMBER_UPDATE", + "GUILD_ROLE_CREATE", + "GUILD_ROLE_DELETE", + "GUILD_ROLE_UPDATE", + "GUILD_UPDATE", + "INTERACTION_CREATE", + "INVALIDATED", + "INVITE_CREATE", + "INVITE_DELETE", + "MESSAGE_ACK", + "MESSAGE_CREATE", + "MESSAGE_DELETE", + "MESSAGE_DELETE_BULK", + "MESSAGE_REACTION_ADD", + "MESSAGE_REACTION_REMOVE", + "MESSAGE_REACTION_REMOVE_ALL", + "MESSAGE_REACTION_REMOVE_EMOJI", + "MESSAGE_UPDATE", + "PRESENCE_UPDATE", + "READY", + "RELATIONSHIP_ADD", + "RELATIONSHIP_REMOVE", + "TYPING_START", + "USER_UPDATE", + "VOICE_SERVER_UPDATE", + "VOICE_STATE_UPDATE", + "WEBHOOKS_UPDATE" + ], + "type": "string" + }, + "EVENTEnum": { + "enum": [ + "APPLICATION_COMMAND_CREATE", + "APPLICATION_COMMAND_DELETE", + "APPLICATION_COMMAND_UPDATE", + "CHANNEL_CREATE", + "CHANNEL_DELETE", + "CHANNEL_PINS_UPDATE", + "CHANNEL_UPDATE", + "GUILD_BAN_ADD", + "GUILD_BAN_REMOVE", + "GUILD_CREATE", + "GUILD_DELETE", + "GUILD_EMOJI_UPDATE", + "GUILD_INTEGRATIONS_UPDATE", + "GUILD_MEMBERS_CHUNK", + "GUILD_MEMBER_ADD", + "GUILD_MEMBER_REMOVE", + "GUILD_MEMBER_SPEAKING", + "GUILD_MEMBER_UPDATE", + "GUILD_ROLE_CREATE", + "GUILD_ROLE_DELETE", + "GUILD_ROLE_UPDATE", + "GUILD_UPDATE", + "INTERACTION_CREATE", + "INVITE_CREATE", + "INVITE_DELETE", + "MESSAGE_CREATE", + "MESSAGE_DELETE", + "MESSAGE_DELETE_BULK", + "MESSAGE_REACTION_ADD", + "MESSAGE_REACTION_REMOVE", + "MESSAGE_REACTION_REMOVE_ALL", + "MESSAGE_REACTION_REMOVE_EMOJI", + "MESSAGE_UPDATE", + "PRESENCE_UPDATE", + "READY", + "TYPING_START", + "USER_UPDATE", + "VOICE_SERVER_UPDATE", + "VOICE_STATE_UPDATE", + "WEBHOOKS_UPDATE" + ], + "type": "string" + }, + "Embed": { + "properties": { + "author": { + "properties": { + "icon_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "proxy_icon_url": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "type": "object" + }, + "color": { + "type": "number" + }, + "description": { + "type": "string" + }, + "fields": { + "items": { + "properties": { + "inline": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "footer": { + "properties": { + "icon_url": { + "type": "string" + }, + "proxy_icon_url": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "type": "object" + }, + "image": { + "$ref": "#/definitions/EmbedImage" + }, + "provider": { + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "type": "object" + }, + "thumbnail": { + "$ref": "#/definitions/EmbedImage" + }, + "timestamp": { + "format": "date-time", + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "enum": [ + "article", + "gifv", + "image", + "link", + "rich", + "video" + ], + "type": "string" + }, + "url": { + "type": "string" + }, + "video": { + "$ref": "#/definitions/EmbedImage" + } + }, + "type": "object" + }, + "EmbedImage": { + "properties": { + "height": { + "type": "number" + }, + "proxy_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "width": { + "type": "number" + } + }, + "type": "object" + }, + "EmbedType": { + "enum": [ + "article", + "gifv", + "image", + "link", + "rich", + "video" + ], + "type": "string" + }, + "EmbeddedMetadata": { + "description": "Contains all information about entity's embedded property.", + "properties": { + "columns": { + "description": "Columns inside this embed.", + "items": { + "$ref": "#/definitions/ColumnMetadata" + }, + "type": "array" + }, + "columnsFromTree": { + "description": "Embed metadatas from all levels of the parent tree.\n\nexample: post[data][information][counters].id where \"data\", \"information\" and \"counters\" are embeds\nthis method will return [embed metadata of data, embed metadata of information, embed metadata of counters]", + "items": { + "$ref": "#/definitions/ColumnMetadata" + }, + "type": "array" + }, + "customPrefix": { + "description": "Prefix of the embedded, used instead of propertyName.\nIf set to empty string or false, then prefix is not set at all.", + "type": [ + "string", + "boolean" + ] + }, + "embeddedMetadataTree": { + "description": "Returns embed metadatas from all levels of the parent tree.\n\nexample: post[data][information][counters].id where \"data\", \"information\" and \"counters\" are embeds\nthis method will return [embed metadata of data, embed metadata of information, embed metadata of counters]", + "items": { + "$ref": "#/definitions/EmbeddedMetadata" + }, + "type": "array" + }, + "embeddeds": { + "description": "Nested embeddable in this embeddable (which has current embedded as parent embedded).", + "items": { + "$ref": "#/definitions/EmbeddedMetadata" + }, + "type": "array" + }, + "entityMetadata": { + "$ref": "#/definitions/EntityMetadata", + "description": "Entity metadata where this embedded is." + }, + "indices": { + "description": "Indices applied to the embed columns.", + "items": { + "$ref": "#/definitions/IndexMetadata" + }, + "type": "array" + }, + "indicesFromTree": { + "description": "Indices of this embed and all indices from its child embeds.", + "items": { + "$ref": "#/definitions/IndexMetadata" + }, + "type": "array" + }, + "isAlwaysUsingConstructor": { + "description": "Indicates if the entity should be instantiated using the constructor\nor via allocating a new object via `Object.create()`.", + "type": "boolean" + }, + "isArray": { + "description": "Indicates if this embedded is in array mode.\n\nThis option works only in mongodb.", + "type": "boolean" + }, + "listeners": { + "description": "Entity listeners inside this embed.", + "items": { + "$ref": "#/definitions/EntityListenerMetadata" + }, + "type": "array" + }, + "listenersFromTree": { + "description": "Relations of this embed and all relations from its child embeds.", + "items": { + "$ref": "#/definitions/EntityListenerMetadata" + }, + "type": "array" + }, + "parentEmbeddedMetadata": { + "$ref": "#/definitions/EmbeddedMetadata", + "description": "Parent embedded in the case if this embedded inside other embedded." + }, + "parentPrefixes": { + "description": "Returns array of prefixes of current embed and all its parent embeds.", + "items": { + "type": "string" + }, + "type": "array" + }, + "parentPropertyNames": { + "description": "Returns array of property names of current embed and all its parent embeds.\n\nexample: post[data][information][counters].id where \"data\", \"information\" and \"counters\" are embeds\nwe need to get value of \"id\" column from the post real entity object.\nthis method will return [\"data\", \"information\", \"counters\"]", + "items": { + "type": "string" + }, + "type": "array" + }, + "prefix": { + "description": "Gets the prefix of the columns.\nBy default its a property name of the class where this prefix is.\nBut if custom prefix is set then it takes its value as a prefix.\nHowever if custom prefix is set to empty string or false, then prefix to column is not applied at all.", + "type": "string" + }, + "propertyName": { + "description": "Property name on which this embedded is attached.", + "type": "string" + }, + "propertyPath": { + "description": "Gets full path to this embedded property (including embedded property name).\nFull path is relevant when embedded is used inside other embeds (one or multiple nested).\nFor example it will return \"counters.subcounters\".", + "type": "string" + }, + "relationCounts": { + "description": "Relation counts inside this embed.", + "items": { + "$ref": "#/definitions/RelationCountMetadata" + }, + "type": "array" + }, + "relationCountsFromTree": { + "description": "Relation counts of this embed and all relation counts from its child embeds.", + "items": { + "$ref": "#/definitions/RelationCountMetadata" + }, + "type": "array" + }, + "relationIds": { + "description": "Relation ids inside this embed.", + "items": { + "$ref": "#/definitions/RelationIdMetadata" + }, + "type": "array" + }, + "relationIdsFromTree": { + "description": "Relation ids of this embed and all relation ids from its child embeds.", + "items": { + "$ref": "#/definitions/RelationIdMetadata" + }, + "type": "array" + }, + "relations": { + "description": "Relations inside this embed.", + "items": { + "$ref": "#/definitions/RelationMetadata" + }, + "type": "array" + }, + "relationsFromTree": { + "description": "Relations of this embed and all relations from its child embeds.", + "items": { + "$ref": "#/definitions/RelationMetadata" + }, + "type": "array" + }, + "type": { + "$ref": "#/definitions/Function", + "description": "Embedded target type." + }, + "uniques": { + "description": "Uniques applied to the embed columns.", + "items": { + "$ref": "#/definitions/UniqueMetadata" + }, + "type": "array" + }, + "uniquesFromTree": { + "description": "Uniques of this embed and all uniques from its child embeds.", + "items": { + "$ref": "#/definitions/UniqueMetadata" + }, + "type": "array" + } + }, + "type": "object" + }, + "Emoji": { + "properties": { + "animated": { + "type": "boolean" + }, + "available": { + "type": "boolean" + }, + "guild": { + "$ref": "#/definitions/Guild" + }, + "guild_id": { + "type": "string" + }, + "id": { + "type": "string" + }, + "managed": { + "type": "boolean" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "name": { + "type": "string" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "require_colons": { + "type": "boolean" + }, + "role_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "roles": { + "items": { + "$ref": "#/definitions/Role" + }, + "type": "array" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "url": { + "type": "string" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + } + }, + "type": "object" + }, + "EntityListenerMetadata": { + "description": "This metadata contains all information about entity's listeners.", + "properties": { + "embeddedMetadata": { + "$ref": "#/definitions/EmbeddedMetadata", + "description": "Embedded metadata of the listener, in the case if listener is in embedded." + }, + "entityMetadata": { + "$ref": "#/definitions/EntityMetadata", + "description": "Entity metadata of the listener." + }, + "propertyName": { + "description": "Target's property name to which this metadata is applied.", + "type": "string" + }, + "target": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ], + "description": "Target class to which metadata is applied.\nThis can be different then entityMetadata.target in the case if listener is in the embedded." + }, + "type": { + "$ref": "#/definitions/EventListenerType", + "description": "The type of the listener." + } + }, + "type": "object" + }, + "EntityManager": { + "description": "Entity manager supposed to work with any entity, automatically find its repository and call its methods,\nwhatever entity type are you passing.", + "properties": { + "connection": { + "$ref": "#/definitions/Connection", + "description": "Connection used by this entity manager." + }, + "plainObjectToEntityTransformer": { + "$ref": "#/definitions/PlainObjectToNewEntityTransformer", + "description": "Plain to object transformer used in create and merge operations." + }, + "queryRunner": { + "$ref": "#/definitions/QueryRunner", + "description": "Custom query runner to be used for operations in this entity manager.\nUsed only in non-global entity manager." + }, + "repositories": { + "description": "Once created and then reused by en repositories.", + "items": { + "$ref": "#/definitions/Repository<any>" + }, + "type": "array" + } + }, + "type": "object" + }, + "EntityMetadata": { + "description": "Contains all entity metadata.", + "properties": { + "afterInsertListeners": { + "description": "Listener metadatas with \"AFTER INSERT\" type.", + "items": { + "$ref": "#/definitions/EntityListenerMetadata" + }, + "type": "array" + }, + "afterLoadListeners": { + "description": "Listener metadatas with \"AFTER LOAD\" type.", + "items": { + "$ref": "#/definitions/EntityListenerMetadata" + }, + "type": "array" + }, + "afterRemoveListeners": { + "description": "Listener metadatas with \"AFTER REMOVE\" type.", + "items": { + "$ref": "#/definitions/EntityListenerMetadata" + }, + "type": "array" + }, + "afterUpdateListeners": { + "description": "Listener metadatas with \"AFTER UPDATE\" type.", + "items": { + "$ref": "#/definitions/EntityListenerMetadata" + }, + "type": "array" + }, + "allEmbeddeds": { + "description": "All embeddeds - embeddeds from this entity metadata and from all child embeddeds, etc.", + "items": { + "$ref": "#/definitions/EmbeddedMetadata" + }, + "type": "array" + }, + "ancestorColumns": { + "description": "Ancestor columns used only in closure junction tables.", + "items": { + "$ref": "#/definitions/ColumnMetadata" + }, + "type": "array" + }, + "beforeInsertListeners": { + "description": "Listener metadatas with \"AFTER INSERT\" type.", + "items": { + "$ref": "#/definitions/EntityListenerMetadata" + }, + "type": "array" + }, + "beforeRemoveListeners": { + "description": "Listener metadatas with \"AFTER REMOVE\" type.", + "items": { + "$ref": "#/definitions/EntityListenerMetadata" + }, + "type": "array" + }, + "beforeUpdateListeners": { + "description": "Listener metadatas with \"AFTER UPDATE\" type.", + "items": { + "$ref": "#/definitions/EntityListenerMetadata" + }, + "type": "array" + }, + "checks": { + "description": "Entity's check metadatas.", + "items": { + "$ref": "#/definitions/CheckMetadata" + }, + "type": "array" + }, + "childEntityMetadatas": { + "description": "Children entity metadatas. Used in inheritance patterns.", + "items": { + "$ref": "#/definitions/EntityMetadata" + }, + "type": "array" + }, + "closureJunctionTable": { + "$ref": "#/definitions/EntityMetadata", + "description": "If entity's table is a closure-typed table, then this entity will have a closure junction table metadata." + }, + "columns": { + "description": "Columns of the entity, including columns that are coming from the embeddeds of this entity.", + "items": { + "$ref": "#/definitions/ColumnMetadata" + }, + "type": "array" + }, + "connection": { + "$ref": "#/definitions/Connection", + "description": "Connection where this entity metadata is created." + }, + "createDateColumn": { + "$ref": "#/definitions/ColumnMetadata", + "description": "Gets entity column which contains a create date value." + }, + "database": { + "description": "Database name.", + "type": "string" + }, + "deleteDateColumn": { + "$ref": "#/definitions/ColumnMetadata", + "description": "Gets entity column which contains a delete date value." + }, + "descendantColumns": { + "description": "Descendant columns used only in closure junction tables.", + "items": { + "$ref": "#/definitions/ColumnMetadata" + }, + "type": "array" + }, + "discriminatorColumn": { + "$ref": "#/definitions/ColumnMetadata", + "description": "Gets the discriminator column used to store entity identificator in single-table inheritance tables." + }, + "discriminatorValue": { + "description": "If this entity metadata is a child table of some table, it should have a discriminator value.\nUsed to store a value in a discriminator column.", + "type": "string" + }, + "eagerRelations": { + "description": "List of eager relations this metadata has.", + "items": { + "$ref": "#/definitions/RelationMetadata" + }, + "type": "array" + }, + "embeddeds": { + "description": "Entity's embedded metadatas.", + "items": { + "$ref": "#/definitions/EmbeddedMetadata" + }, + "type": "array" + }, + "engine": { + "description": "Table's database engine type (like \"InnoDB\", \"MyISAM\", etc).", + "type": "string" + }, + "exclusions": { + "description": "Entity's exclusion metadatas.", + "items": { + "$ref": "#/definitions/ExclusionMetadata" + }, + "type": "array" + }, + "expression": { + "description": "View's expression.\nUsed in views", + "type": [ + "string", + "object" + ] + }, + "foreignKeys": { + "description": "Entity's foreign key metadatas.", + "items": { + "$ref": "#/definitions/ForeignKeyMetadata" + }, + "type": "array" + }, + "generatedColumns": { + "description": "Gets the column with generated flag.", + "items": { + "$ref": "#/definitions/ColumnMetadata" + }, + "type": "array" + }, + "getInverseEntityMetadata": { + }, + "givenTableName": { + "description": "Original user-given table name (taken from schema or @Entity(tableName) decorator).\nIf user haven't specified a table name this property will be undefined.", + "type": "string" + }, + "hasMultiplePrimaryKeys": { + "description": "Checks if entity's table has multiple primary columns.", + "type": "boolean" + }, + "hasNonNullableRelations": { + "description": "Checks if there any non-nullable column exist in this entity.", + "type": "boolean" + }, + "hasUUIDGeneratedColumns": { + "description": "Indicates if this entity metadata has uuid generated columns.", + "type": "boolean" + }, + "indices": { + "description": "Entity's index metadatas.", + "items": { + "$ref": "#/definitions/IndexMetadata" + }, + "type": "array" + }, + "inheritancePattern": { + "description": "If this entity metadata's table using one of the inheritance patterns,\nthen this will contain what pattern it uses.", + "enum": [ + "STI" + ], + "type": "string" + }, + "inheritanceTree": { + "description": "All \"inheritance tree\" from a target entity.\nFor example for target Post < ContentModel < Unit it will be an array of [Post, ContentModel, Unit].\nIt also contains child entities for single table inheritance.", + "items": { + "$ref": "#/definitions/Function" + }, + "type": "array" + }, + "inverseColumns": { + "description": "In the case if this entity metadata is junction table's entity metadata,\nthis will contain all referenced columns of inverse entity.", + "items": { + "$ref": "#/definitions/ColumnMetadata" + }, + "type": "array" + }, + "isAlwaysUsingConstructor": { + "description": "Indicates if the entity should be instantiated using the constructor\nor via allocating a new object via `Object.create()`.", + "type": "boolean" + }, + "isClosureJunction": { + "description": "Checks if this table is a junction table of the closure table.\nThis type is for tables that contain junction metadata of the closure tables.", + "type": "boolean" + }, + "isJunction": { + "description": "Indicates if this entity metadata of a junction table, or not.\nJunction table is a table created by many-to-many relationship.\n\nIts also possible to understand if entity is junction via tableType.", + "type": "boolean" + }, + "lazyRelations": { + "description": "List of eager relations this metadata has.", + "items": { + "$ref": "#/definitions/RelationMetadata" + }, + "type": "array" + }, + "listeners": { + "description": "Entity listener metadatas.", + "items": { + "$ref": "#/definitions/EntityListenerMetadata" + }, + "type": "array" + }, + "manyToManyRelations": { + "description": "Gets only many-to-many relations of the entity.", + "items": { + "$ref": "#/definitions/RelationMetadata" + }, + "type": "array" + }, + "manyToOneRelations": { + "description": "Gets only many-to-one relations of the entity.", + "items": { + "$ref": "#/definitions/RelationMetadata" + }, + "type": "array" + }, + "materializedPathColumn": { + "$ref": "#/definitions/ColumnMetadata", + "description": "Materialized path column.\nUsed only in tree entities with materialized path pattern applied." + }, + "name": { + "description": "Entity's name.\nEqual to entity target class's name if target is set to table.\nIf target class is not then then it equals to table name.", + "type": "string" + }, + "nestedSetLeftColumn": { + "$ref": "#/definitions/ColumnMetadata", + "description": "Nested set's left value column.\nUsed only in tree entities with nested set pattern applied." + }, + "nestedSetRightColumn": { + "$ref": "#/definitions/ColumnMetadata", + "description": "Nested set's right value column.\nUsed only in tree entities with nested set pattern applied." + }, + "nonVirtualColumns": { + "description": "All columns except for virtual columns.", + "items": { + "$ref": "#/definitions/ColumnMetadata" + }, + "type": "array" + }, + "objectIdColumn": { + "$ref": "#/definitions/ColumnMetadata", + "description": "Gets the object id column used with mongodb database." + }, + "oneToManyRelations": { + "description": "Gets only one-to-many relations of the entity.", + "items": { + "$ref": "#/definitions/RelationMetadata" + }, + "type": "array" + }, + "oneToOneRelations": { + "description": "Gets only one-to-one relations of the entity.", + "items": { + "$ref": "#/definitions/RelationMetadata" + }, + "type": "array" + }, + "orderBy": { + "additionalProperties": { + "anyOf": [ + { + "properties": { + "nulls": { + "enum": [ + "NULLS FIRST", + "NULLS LAST" + ], + "type": "string" + }, + "order": { + "enum": [ + "ASC", + "DESC" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "enum": [ + "ASC", + "DESC" + ], + "type": "string" + } + ] + }, + "description": "Special object that defines order condition for ORDER BY in sql.\n\nExample:\n{\n \"name\": \"ASC\",\n \"id\": \"DESC\"\n}", + "type": "object" + }, + "ownColumns": { + "description": "Entity's column metadatas defined by user.", + "items": { + "$ref": "#/definitions/ColumnMetadata" + }, + "type": "array" + }, + "ownIndices": { + "description": "Entity's own indices.", + "items": { + "$ref": "#/definitions/IndexMetadata" + }, + "type": "array" + }, + "ownListeners": { + "description": "Entity's own listener metadatas.", + "items": { + "$ref": "#/definitions/EntityListenerMetadata" + }, + "type": "array" + }, + "ownRelations": { + "description": "Entity's relation metadatas.", + "items": { + "$ref": "#/definitions/RelationMetadata" + }, + "type": "array" + }, + "ownUniques": { + "description": "Entity's own uniques.", + "items": { + "$ref": "#/definitions/UniqueMetadata" + }, + "type": "array" + }, + "ownerColumns": { + "description": "In the case if this entity metadata is junction table's entity metadata,\nthis will contain all referenced columns of owner entity.", + "items": { + "$ref": "#/definitions/ColumnMetadata" + }, + "type": "array" + }, + "ownerManyToManyRelations": { + "description": "Gets only owner many-to-many relations of the entity.", + "items": { + "$ref": "#/definitions/RelationMetadata" + }, + "type": "array" + }, + "ownerOneToOneRelations": { + "description": "Gets only owner one-to-one relations of the entity.", + "items": { + "$ref": "#/definitions/RelationMetadata" + }, + "type": "array" + }, + "parentClosureEntityMetadata": { + "$ref": "#/definitions/EntityMetadata", + "description": "If this is entity metadata for a junction closure table then its owner closure table metadata will be set here." + }, + "parentEntityMetadata": { + "$ref": "#/definitions/EntityMetadata", + "description": "Parent's entity metadata. Used in inheritance patterns." + }, + "primaryColumns": { + "description": "Gets the primary columns.", + "items": { + "$ref": "#/definitions/ColumnMetadata" + }, + "type": "array" + }, + "propertiesMap": { + "$ref": "#/definitions/ObjectLiteral", + "description": "Map of columns and relations of the entity.\n\nexample: Post{ id: number, name: string, counterEmbed: { count: number }, category: Category }.\nThis method will create following object:\n{ id: \"id\", counterEmbed: { count: \"counterEmbed.count\" }, category: \"category\" }" + }, + "relationCounts": { + "description": "Entity's relation id metadatas.", + "items": { + "$ref": "#/definitions/RelationCountMetadata" + }, + "type": "array" + }, + "relationIds": { + "description": "Entity's relation id metadatas.", + "items": { + "$ref": "#/definitions/RelationIdMetadata" + }, + "type": "array" + }, + "relations": { + "description": "Relations of the entity, including relations that are coming from the embeddeds of this entity.", + "items": { + "$ref": "#/definitions/RelationMetadata" + }, + "type": "array" + }, + "relationsWithJoinColumns": { + "description": "Gets only owner one-to-one and many-to-one relations.", + "items": { + "$ref": "#/definitions/RelationMetadata" + }, + "type": "array" + }, + "schema": { + "description": "Schema name. Used in Postgres and Sql Server.", + "type": "string" + }, + "synchronize": { + "description": "Indicates if schema will be synchronized for this entity or not.", + "type": "boolean" + }, + "tableMetadataArgs": { + "$ref": "#/definitions/TableMetadataArgs", + "description": "Metadata arguments used to build this entity metadata." + }, + "tableName": { + "description": "Entity table name in the database.\nThis is final table name of the entity.\nThis name already passed naming strategy, and generated based on\nmultiple criteria, including user table name and global table prefix.", + "type": "string" + }, + "tableNameWithoutPrefix": { + "description": "Gets the table name without global table prefix.\nWhen querying table you need a table name with prefix, but in some scenarios,\nfor example when you want to name a junction table that contains names of two other tables,\nyou may want a table name without prefix.", + "type": "string" + }, + "tablePath": { + "description": "Entity table path. Contains database name, schema name and table name.\nE.g. myDB.mySchema.myTable", + "type": "string" + }, + "tableType": { + "$ref": "#/definitions/TableType", + "description": "Table type. Tables can be closure, junction, etc." + }, + "target": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ], + "description": "Target class to which this entity metadata is bind.\nNote, that when using table inheritance patterns target can be different rather then table's target.\nFor virtual tables which lack of real entity (like junction tables) target is equal to their table name." + }, + "targetName": { + "description": "Gets the name of the target.", + "type": "string" + }, + "treeChildrenRelation": { + "$ref": "#/definitions/RelationMetadata", + "description": "Tree children relation. Used only in tree-tables." + }, + "treeLevelColumn": { + "$ref": "#/definitions/ColumnMetadata", + "description": "Special column that stores tree level in tree entities." + }, + "treeOptions": { + "$ref": "#/definitions/ClosureTreeOptions", + "description": "Indicates if this entity is a tree, what options of tree it has." + }, + "treeParentRelation": { + "$ref": "#/definitions/RelationMetadata", + "description": "Tree parent relation. Used only in tree-tables." + }, + "treeType": { + "description": "Indicates if this entity is a tree, what type of tree it is.", + "enum": [ + "adjacency-list", + "closure-table", + "materialized-path", + "nested-set" + ], + "type": "string" + }, + "uniques": { + "description": "Entity's unique metadatas.", + "items": { + "$ref": "#/definitions/UniqueMetadata" + }, + "type": "array" + }, + "updateDateColumn": { + "$ref": "#/definitions/ColumnMetadata", + "description": "Gets entity column which contains an update date value." + }, + "versionColumn": { + "$ref": "#/definitions/ColumnMetadata", + "description": "Gets entity column which contains an entity version." + }, + "withoutRowid": { + "description": "Enables Sqlite \"WITHOUT ROWID\" modifier for the \"CREATE TABLE\" statement", + "type": "boolean" + } + }, + "type": "object" + }, + "EntitySchema<any>": { + "description": "Interface for entity metadata mappings stored inside \"schemas\" instead of models decorated by decorators.", + "properties": { + "options": { + "$ref": "#/definitions/EntitySchemaOptions<any>" + } + }, + "type": "object" + }, + "EntitySchemaCheckOptions": { + "properties": { + "expression": { + "description": "Check expression.", + "type": "string" + }, + "name": { + "description": "Check constraint name.", + "type": "string" + } + }, + "type": "object" + }, + "EntitySchemaExclusionOptions": { + "properties": { + "expression": { + "description": "Exclusion expression.", + "type": "string" + }, + "name": { + "description": "Exclusion constraint name.", + "type": "string" + } + }, + "type": "object" + }, + "EntitySchemaIndexOptions": { + "properties": { + "columns": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "object" + } + ], + "description": "Index column names." + }, + "fulltext": { + "description": "The FULLTEXT modifier indexes the entire column and does not allow prefixing.\nWorks only in MySQL.", + "type": "boolean" + }, + "name": { + "description": "Index name.", + "type": "string" + }, + "parser": { + "description": "Fulltext parser.\nWorks only in MySQL.", + "type": "string" + }, + "sparse": { + "description": "If true, the index only references documents with the specified field.\nThese indexes use less space but behave differently in some situations (particularly sorts).\nThis option is only supported for mongodb database.", + "type": "boolean" + }, + "spatial": { + "description": "The SPATIAL modifier indexes the entire column and does not allow indexed columns to contain NULL values.\nWorks only in MySQL and PostgreSQL.", + "type": "boolean" + }, + "synchronize": { + "description": "Indicates if index must sync with database index.", + "type": "boolean" + }, + "unique": { + "description": "Indicates if this index must be unique or not.", + "type": "boolean" + }, + "where": { + "description": "Index filter condition.", + "type": "string" + } + }, + "type": "object" + }, + "EntitySchemaOptions<any>": { + "description": "Interface for entity metadata mappings stored inside \"schemas\" instead of models decorated by decorators.", + "properties": { + "checks": { + "description": "Entity check options.", + "items": { + "$ref": "#/definitions/EntitySchemaCheckOptions" + }, + "type": "array" + }, + "columns": { + "$ref": "#/definitions/{[x:string]:EntitySchemaColumnOptions|undefined;}", + "description": "Entity column's options." + }, + "database": { + "description": "Database name. Used in MySql and Sql Server.", + "type": "string" + }, + "exclusions": { + "description": "Entity exclusion options.", + "items": { + "$ref": "#/definitions/EntitySchemaExclusionOptions" + }, + "type": "array" + }, + "expression": { + "description": "View expression.", + "type": [ + "string", + "object" + ] + }, + "extends": { + "description": "Name of the schema it extends.", + "type": "string" + }, + "indices": { + "description": "Entity indices options.", + "items": { + "$ref": "#/definitions/EntitySchemaIndexOptions" + }, + "type": "array" + }, + "name": { + "description": "Entity name.", + "type": "string" + }, + "orderBy": { + "additionalProperties": { + "anyOf": [ + { + "properties": { + "nulls": { + "enum": [ + "NULLS FIRST", + "NULLS LAST" + ], + "type": "string" + }, + "order": { + "enum": [ + "ASC", + "DESC" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "enum": [ + "ASC", + "DESC" + ], + "type": "string" + } + ] + }, + "description": "Special object that defines order condition for ORDER BY in sql.\n\nExample:\n{\n \"name\": \"ASC\",\n \"id\": \"DESC\"\n}", + "type": "object" + }, + "relations": { + "$ref": "#/definitions/{[x:string]:EntitySchemaRelationOptions|undefined;}", + "description": "Entity relation's options." + }, + "schema": { + "description": "Schema name. Used in Postgres and Sql Server.", + "type": "string" + }, + "synchronize": { + "description": "Indicates if schema synchronization is enabled or disabled for this entity.\nIf it will be set to false then schema sync will and migrations ignore this entity.\nBy default schema synchronization is enabled for all entities.", + "type": "boolean" + }, + "tableName": { + "description": "Table name.", + "type": "string" + }, + "target": { + "$ref": "#/definitions/Function", + "description": "Target bind to this entity schema. Optional." + }, + "type": { + "description": "Table type.", + "enum": [ + "closure", + "closure-junction", + "entity-child", + "junction", + "regular", + "view" + ], + "type": "string" + }, + "uniques": { + "description": "Entity uniques options.", + "items": { + "$ref": "#/definitions/EntitySchemaUniqueOptions" + }, + "type": "array" + } + }, + "type": "object" + }, + "EntitySchemaUniqueOptions": { + "properties": { + "columns": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "object" + } + ], + "description": "Unique column names." + }, + "name": { + "description": "Unique constraint name.", + "type": "string" + } + }, + "type": "object" + }, + "EntitySubscriberInterface<any>": { + "description": "Classes that implement this interface are subscribers that subscribe for the specific events in the ORM.", + "type": "object" + }, + "ErrorObject<string,Record<string,any>,unknown>": { + "properties": { + "data": { + }, + "instancePath": { + "type": "string" + }, + "keyword": { + "type": "string" + }, + "message": { + "type": "string" + }, + "params": { + "$ref": "#/definitions/Record<string,any>" + }, + "parentSchema": { + "anyOf": [ + { + "$ref": "#/definitions/SchemaObject" + }, + { + "$ref": "#/definitions/AsyncSchema" + } + ] + }, + "propertyName": { + "type": "string" + }, + "schema": { + }, + "schemaPath": { + "type": "string" + } + }, + "type": "object" + }, + "Evaluated": { + "properties": { + "dynamicItems": { + "type": "boolean" + }, + "dynamicProps": { + "type": "boolean" + }, + "items": { + "anyOf": [ + { + "enum": [ + true + ], + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "props": { + "anyOf": [ + { + "$ref": "#/definitions/{[x:string]:true|undefined;}" + }, + { + "enum": [ + true + ], + "type": "boolean" + } + ] + } + }, + "type": "object" + }, + "Event": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + }, + "event": { + "$ref": "#/definitions/EVENT" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "EventListenerType": { + "description": "All types that entity listener can be.", + "enum": [ + "after-insert", + "after-load", + "after-remove", + "after-update", + "before-insert", + "before-remove", + "before-update" + ], + "type": "string" + }, + "EventOpts": { + "properties": { + "acknowledge": { + "$ref": "#/definitions/Function" + }, + "cancel": { + "$ref": "#/definitions/Function" + }, + "channel": { + "$ref": "#/definitions/Channel_1" + }, + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + }, + "event": { + "$ref": "#/definitions/EVENT" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "ExclusionMetadata": { + "description": "Exclusion metadata contains all information about table's exclusion constraints.", + "properties": { + "entityMetadata": { + "$ref": "#/definitions/EntityMetadata", + "description": "Entity metadata of the class to which this exclusion constraint is applied." + }, + "expression": { + "description": "Exclusion expression.", + "type": "string" + }, + "givenName": { + "description": "User specified exclusion constraint name.", + "type": "string" + }, + "name": { + "description": "Final exclusion constraint name.\nIf exclusion constraint name was given by a user then it stores normalized (by naming strategy) givenName.\nIf exclusion constraint name was not given then its generated.", + "type": "string" + }, + "target": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ], + "description": "Target class to which metadata is applied." + } + }, + "type": "object" + }, + "ExpoConnectionOptions": { + "description": "Sqlite-specific connection options.", + "properties": { + "cache": { + "anyOf": [ + { + "properties": { + "alwaysEnabled": { + "description": "If set to true then queries (using find methods and QueryBuilder's methods) will always be cached.", + "type": "boolean" + }, + "duration": { + "description": "Time in milliseconds in which cache will expire.\nThis can be setup per-query.\nDefault value is 1000 which is equivalent to 1 second.", + "type": "number" + }, + "ignoreErrors": { + "description": "Used to specify if cache errors should be ignored, and pass through the call to the Database.", + "type": "boolean" + }, + "options": { + "description": "Used to provide redis connection options." + }, + "provider": { + "description": "Factory function for custom cache providers that implement QueryResultCache.", + "type": "object" + }, + "tableName": { + "description": "Configurable table name for \"database\" type cache.\nDefault value is \"query-result-cache\"", + "type": "string" + }, + "type": { + "description": "Type of caching.\n\n- \"database\" means cached values will be stored in the separate table in database. This is default value.\n- \"redis\" means cached values will be stored inside redis. You must provide redis connection options.", + "enum": [ + "database", + "ioredis", + "ioredis/cluster", + "redis" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "type": "boolean" + } + ], + "description": "Allows to setup cache options." + }, + "cli": { + "description": "CLI settings.", + "properties": { + "entitiesDir": { + "description": "Directory where entities should be created by default.", + "type": "string" + }, + "migrationsDir": { + "description": "Directory where migrations should be created by default.", + "type": "string" + }, + "subscribersDir": { + "description": "Directory where subscribers should be created by default.", + "type": "string" + } + }, + "type": "object" + }, + "database": { + "description": "Database name.", + "type": "string" + }, + "driver": { + "description": "Driver module" + }, + "dropSchema": { + "description": "Drops the schema each time connection is being established.\nBe careful with this option and don't use this in production - otherwise you'll lose all production data.\nThis option is useful during debug and development.", + "type": "boolean" + }, + "entities": { + "description": "Entities to be loaded for this connection.\nAccepts both entity classes and directories where from entities need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "$ref": "#/definitions/EntitySchema<any>" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "entityPrefix": { + "description": "Prefix to use on all tables (collections) of this connection in the database.", + "type": "string" + }, + "entitySkipConstructor": { + "description": "When creating new Entity instances, skip all constructors when true.", + "type": "boolean" + }, + "extra": { + "description": "Extra connection options to be passed to the underlying driver.\n\ntodo: deprecate this and move all database-specific types into hts own connection options object." + }, + "logger": { + "anyOf": [ + { + "$ref": "#/definitions/Logger" + }, + { + "enum": [ + "advanced-console", + "debug", + "file", + "simple-console" + ], + "type": "string" + } + ], + "description": "Logger instance used to log queries and events in the ORM." + }, + "logging": { + "anyOf": [ + { + "items": { + "enum": [ + "error", + "info", + "log", + "migration", + "query", + "schema", + "warn" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "all", + false, + true + ] + } + ], + "description": "Logging options." + }, + "maxQueryExecutionTime": { + "description": "Maximum number of milliseconds query should be executed before logger log a warning.", + "type": "number" + }, + "migrations": { + "description": "Migrations to be loaded for this connection.\nAccepts both migration classes and directories where from migrations need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "migrationsRun": { + "description": "Indicates if migrations should be auto run on every application launch.\nAlternative to it, you can use CLI and run migrations:run command.", + "type": "boolean" + }, + "migrationsTableName": { + "description": "Migrations table name, in case of different name from \"migrations\".\nAccepts single string name.", + "type": "string" + }, + "migrationsTransactionMode": { + "description": "Transaction mode for migrations to run in", + "enum": [ + "all", + "each", + "none" + ], + "type": "string" + }, + "name": { + "description": "Connection name. If connection name is not given then it will be called \"default\".\nDifferent connections must have different names.", + "type": "string" + }, + "namingStrategy": { + "$ref": "#/definitions/NamingStrategyInterface", + "description": "Naming strategy to be used to name tables and columns in the database." + }, + "subscribers": { + "description": "Subscribers to be loaded for this connection.\nAccepts both subscriber classes and directories where from subscribers need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "synchronize": { + "description": "Indicates if database schema should be auto created on every application launch.\nBe careful with this option and don't use this in production - otherwise you can lose production data.\nThis option is useful during debug and development.\nAlternative to it, you can use CLI and run schema:sync command.\n\nNote that for MongoDB database it does not create schema, because MongoDB is schemaless.\nInstead, it syncs just by creating indices.", + "type": "boolean" + }, + "type": { + "description": "Database type.", + "enum": [ + "expo" + ], + "type": "string" + } + }, + "type": "object" + }, + "ForeignKeyMetadata": { + "description": "Contains all information about entity's foreign key.", + "properties": { + "columnNames": { + "description": "Gets array of column names.", + "items": { + "type": "string" + }, + "type": "array" + }, + "columns": { + "description": "Array of columns of this foreign key.", + "items": { + "$ref": "#/definitions/ColumnMetadata" + }, + "type": "array" + }, + "deferrable": { + "description": "When to check the constraints of a foreign key.", + "enum": [ + "INITIALLY DEFERRED", + "INITIALLY IMMEDIATE" + ], + "type": "string" + }, + "entityMetadata": { + "$ref": "#/definitions/EntityMetadata", + "description": "Entity metadata where this foreign key is." + }, + "name": { + "description": "Gets foreign key name.", + "type": "string" + }, + "onDelete": { + "description": "What to do with a relation on deletion of the row containing a foreign key.", + "enum": [ + "CASCADE", + "DEFAULT", + "NO ACTION", + "RESTRICT", + "SET NULL" + ], + "type": "string" + }, + "onUpdate": { + "description": "What to do with a relation on update of the row containing a foreign key.", + "enum": [ + "CASCADE", + "DEFAULT", + "NO ACTION", + "RESTRICT", + "SET NULL" + ], + "type": "string" + }, + "referencedColumnNames": { + "description": "Gets array of referenced column names.", + "items": { + "type": "string" + }, + "type": "array" + }, + "referencedColumns": { + "description": "Array of referenced columns.", + "items": { + "$ref": "#/definitions/ColumnMetadata" + }, + "type": "array" + }, + "referencedEntityMetadata": { + "$ref": "#/definitions/EntityMetadata", + "description": "Entity metadata which this foreign key references." + }, + "referencedTablePath": { + "description": "Gets the table name to which this foreign key is referenced.", + "type": "string" + } + }, + "type": "object" + }, + "Function": { + "properties": { + "arguments": { + }, + "caller": { + "$ref": "#/definitions/Function" + }, + "length": { + "type": "number" + }, + "name": { + "type": "string" + }, + "prototype": { + } + }, + "type": "object" + }, + "Guild": { + "properties": { + "afk_channel": { + "$ref": "#/definitions/Channel" + }, + "afk_timeout": { + "type": "number" + }, + "banner": { + "type": "string" + }, + "channel_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "channels": { + "items": { + "$ref": "#/definitions/Channel" + }, + "type": "array" + }, + "default_message_notifications": { + "type": "number" + }, + "description": { + "type": "string" + }, + "discovery_splash": { + "type": "string" + }, + "emoji_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "emojis": { + "items": { + "$ref": "#/definitions/Emoji" + }, + "type": "array" + }, + "explicit_content_filter": { + "type": "number" + }, + "features": { + "items": { + "type": "string" + }, + "type": "array" + }, + "icon": { + "type": "string" + }, + "id": { + "type": "string" + }, + "large": { + "type": "boolean" + }, + "max_members": { + "type": "number" + }, + "max_presences": { + "type": "number" + }, + "max_video_channel_users": { + "type": "number" + }, + "member_count": { + "type": "number" + }, + "member_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "members": { + "items": { + "$ref": "#/definitions/Member" + }, + "type": "array" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "mfa_level": { + "type": "number" + }, + "name": { + "type": "string" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "owner": { + "$ref": "#/definitions/User" + }, + "owner_id": { + "type": "string" + }, + "preferred_locale": { + "type": "string" + }, + "premium_subscription_count": { + "type": "number" + }, + "premium_tier": { + "type": "number" + }, + "presence_count": { + "type": "number" + }, + "public_updates_channel": { + "$ref": "#/definitions/Channel" + }, + "region": { + "type": "string" + }, + "role_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "roles": { + "items": { + "$ref": "#/definitions/Role" + }, + "type": "array" + }, + "rules_channel": { + "type": "string" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "splash": { + "type": "string" + }, + "system_channel": { + "$ref": "#/definitions/Channel" + }, + "system_channel_flags": { + "type": "number" + }, + "unavailable": { + "type": "boolean" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + }, + "vanity_url": { + "$ref": "#/definitions/Invite" + }, + "verification_level": { + "type": "number" + }, + "voice_state_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "voice_states": { + "items": { + "$ref": "#/definitions/VoiceState" + }, + "type": "array" + }, + "welcome_screen": { + "properties": { + "description": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "welcome_channels": { + "items": { + "properties": { + "channel_id": { + "type": "string" + }, + "description": { + "type": "string" + }, + "emoji_id": { + "type": "string" + }, + "emoji_name": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "widget_channel": { + "$ref": "#/definitions/Channel" + }, + "widget_enabled": { + "type": "boolean" + } + }, + "type": "object" + }, + "GuildBanAddEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "guild_id": { + "type": "string" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "GUILD_BAN_ADD" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "GuildBanRemoveEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "guild_id": { + "type": "string" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "GUILD_BAN_REMOVE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "GuildCreateEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "$ref": "#/definitions/Guild" + }, + "event": { + "enum": [ + "GUILD_CREATE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "GuildDeleteEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "id": { + "type": "string" + }, + "unavailable": { + "type": "boolean" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "GUILD_DELETE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "GuildEmojiUpdateEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "emojis": { + "items": { + "$ref": "#/definitions/Emoji" + }, + "type": "array" + }, + "guild_id": { + "type": "string" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "GUILD_EMOJI_UPDATE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "GuildIntegrationUpdateEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "guild_id": { + "type": "string" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "GUILD_INTEGRATIONS_UPDATE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "GuildMemberAddEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "allOf": [ + { + "$ref": "#/definitions/PublicMember" + }, + { + "properties": { + "guild_id": { + "type": "string" + } + }, + "type": "object" + } + ] + }, + "event": { + "enum": [ + "GUILD_MEMBER_ADD" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "GuildMemberRemoveEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "guild_id": { + "type": "string" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "GUILD_MEMBER_REMOVE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "GuildMemberUpdateEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "guild_id": { + "type": "string" + }, + "joined_at": { + "format": "date-time", + "type": "string" + }, + "nick": { + "type": "string" + }, + "pending": { + "type": "boolean" + }, + "premium_since": { + "type": "number" + }, + "roles": { + "items": { + "type": "string" + }, + "type": "array" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "GUILD_MEMBER_UPDATE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "GuildMembersChunkEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "chunk_count": { + "type": "number" + }, + "chunk_index": { + "type": "number" + }, + "guild_id": { + "type": "string" + }, + "members": { + "items": { + "$ref": "#/definitions/PublicMember" + }, + "type": "array" + }, + "nonce": { + "type": "string" + }, + "not_found": { + "items": { + "type": "string" + }, + "type": "array" + }, + "presences": { + "items": { + "$ref": "#/definitions/Presence" + }, + "type": "array" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "GUILD_MEMBERS_CHUNK" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "GuildRoleCreateEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "guild_id": { + "type": "string" + }, + "role": { + "$ref": "#/definitions/Role" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "GUILD_ROLE_CREATE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "GuildRoleDeleteEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "guild_id": { + "type": "string" + }, + "role_id": { + "type": "string" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "GUILD_ROLE_DELETE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "GuildRoleUpdateEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "guild_id": { + "type": "string" + }, + "role": { + "$ref": "#/definitions/Role" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "GUILD_ROLE_UPDATE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "GuildUpdateEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "$ref": "#/definitions/Guild" + }, + "event": { + "enum": [ + "GUILD_UPDATE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "IndexMetadata": { + "description": "Index metadata contains all information about table's index.", + "properties": { + "columnNamesWithOrderingMap": { + "additionalProperties": { + "type": "number" + }, + "description": "Map of column names with order set.\nUsed only by MongoDB driver.", + "type": "object" + }, + "columns": { + "description": "Indexed columns.", + "items": { + "$ref": "#/definitions/ColumnMetadata" + }, + "type": "array" + }, + "embeddedMetadata": { + "$ref": "#/definitions/EmbeddedMetadata", + "description": "Embedded metadata if this index was applied on embedded." + }, + "entityMetadata": { + "$ref": "#/definitions/EntityMetadata", + "description": "Entity metadata of the class to which this index is applied." + }, + "expireAfterSeconds": { + "description": "Specifies a time to live, in seconds.\nThis option is only supported for mongodb database.", + "type": "number" + }, + "givenColumnNames": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "object" + } + ], + "description": "User specified column names." + }, + "givenName": { + "description": "User specified index name.", + "type": "string" + }, + "isBackground": { + "description": "Builds the index in the background so that building an index an does not block other database activities.\nThis option is only supported for mongodb database.", + "type": "boolean" + }, + "isFulltext": { + "description": "The FULLTEXT modifier indexes the entire column and does not allow prefixing.\nWorks only in MySQL.", + "type": "boolean" + }, + "isSparse": { + "description": "If true, the index only references documents with the specified field.\nThese indexes use less space but behave differently in some situations (particularly sorts).\nThis option is only supported for mongodb database.", + "type": "boolean" + }, + "isSpatial": { + "description": "The SPATIAL modifier indexes the entire column and does not allow indexed columns to contain NULL values.\nWorks only in MySQL.", + "type": "boolean" + }, + "isUnique": { + "description": "Indicates if this index must be unique.", + "type": "boolean" + }, + "name": { + "description": "Final index name.\nIf index name was given by a user then it stores normalized (by naming strategy) givenName.\nIf index name was not given then its generated.", + "type": "string" + }, + "parser": { + "description": "Fulltext parser.\nWorks only in MySQL.", + "type": "string" + }, + "synchronize": { + "description": "Indicates if this index must synchronize with database index.", + "type": "boolean" + }, + "target": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ], + "description": "Target class to which metadata is applied." + }, + "where": { + "description": "Index filter condition.", + "type": "string" + } + }, + "type": "object" + }, + "Intents": { + "properties": { + "bitfield": { + "type": "bigint" + } + }, + "type": "object" + }, + "Interaction": { + "properties": { + "channel_id": { + "type": "string" + }, + "data": { + "properties": { + }, + "type": "object" + }, + "guild_id": { + "type": "string" + }, + "id": { + "type": "string" + }, + "member_id": { + "type": "string" + }, + "token": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/InteractionType" + }, + "version": { + "type": "number" + } + }, + "type": "object" + }, + "InteractionApplicationCommandCallbackData": { + "properties": { + "allowed_mentions": { + "$ref": "#/definitions/AllowedMentions" + }, + "content": { + "type": "string" + }, + "embeds": { + "items": { + "$ref": "#/definitions/Embed" + }, + "type": "array" + }, + "tts": { + "type": "boolean" + } + }, + "type": "object" + }, + "InteractionCreateEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "$ref": "#/definitions/Interaction" + }, + "event": { + "enum": [ + "INTERACTION_CREATE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "InteractionResponseType": { + "enum": [ + 1, + 2, + 3, + 4, + 5 + ], + "type": "number" + }, + "InteractionType": { + "enum": [ + 1, + 2 + ], + "type": "number" + }, + "InvalidatedEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + }, + "event": { + "enum": [ + "INVALIDATED" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "Invite": { + "properties": { + "channel": { + "$ref": "#/definitions/Channel" + }, + "channel_id": { + "type": "string" + }, + "code": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "expires_at": { + "format": "date-time", + "type": "string" + }, + "guild": { + "$ref": "#/definitions/Guild" + }, + "guild_id": { + "type": "string" + }, + "id": { + "type": "string" + }, + "inviter": { + "$ref": "#/definitions/User" + }, + "inviter_id": { + "type": "string" + }, + "max_age": { + "type": "number" + }, + "max_uses": { + "type": "number" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "target_user": { + "type": "string" + }, + "target_user_type": { + "type": "number" + }, + "target_usser_id": { + "type": "string" + }, + "temporary": { + "type": "boolean" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + }, + "uses": { + "type": "number" + } + }, + "type": "object" + }, + "InviteCreateEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "allOf": [ + { + "$ref": "#/definitions/Omit<Invite,\"guild\"|\"channel\">" + }, + { + "properties": { + "channel_id": { + "type": "string" + }, + "guild_id": { + "type": "string" + } + }, + "type": "object" + } + ] + }, + "event": { + "enum": [ + "INVITE_CREATE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "InviteDeleteEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "channel_id": { + "type": "string" + }, + "code": { + "type": "string" + }, + "guild_id": { + "type": "string" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "INVITE_DELETE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "KeyObject": { + "properties": { + "passphrase": { + "description": "Optional passphrase.", + "type": "string" + }, + "pem": { + "anyOf": [ + { + "description": "Raw data is stored in instances of the Buffer class.\nA Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.\nValid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Private keys in PEM format." + } + }, + "type": "object" + }, + "ListenEventOpts": { + "properties": { + "acknowledge": { + "type": "boolean" + }, + "channel": { + "$ref": "#/definitions/Channel_1" + } + }, + "type": "object" + }, + "LocalRefs": { + "type": "object" + }, + "Logger": { + "description": "Performs logging of the events in TypeORM.", + "type": "object" + }, + "MappedColumnTypes": { + "description": "Orm has special columns and we need to know what database column types should be for those types.\nColumn types are driver dependant.", + "properties": { + "cacheDuration": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Column type for duration column in query result cache table." + }, + "cacheId": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Column type for identifier column in query result cache table." + }, + "cacheIdentifier": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Column type for identifier column in query result cache table." + }, + "cacheQuery": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Column type for query column in query result cache table." + }, + "cacheResult": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Column type for result column in query result cache table." + }, + "cacheTime": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Column type for time column in query result cache table." + }, + "createDate": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Column type for the create date column." + }, + "createDateDefault": { + "description": "Default value should be used by a database for \"created date\" column.", + "type": "string" + }, + "createDatePrecision": { + "description": "Precision of datetime column. Used in MySql to define milliseconds.", + "type": "number" + }, + "deleteDate": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Column type for the delete date column." + }, + "deleteDateNullable": { + "description": "Nullable value should be used by a database for \"deleted date\" column.", + "type": "boolean" + }, + "deleteDatePrecision": { + "description": "Precision of datetime column. Used in MySql to define milliseconds.", + "type": "number" + }, + "metadataDatabase": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Column type for metadata database name column in typeorm metadata table." + }, + "metadataName": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Column type for metadata name column in typeorm metadata table." + }, + "metadataSchema": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Column type for metadata schema name column in typeorm metadata table." + }, + "metadataTable": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Column type for metadata table name column in typeorm metadata table." + }, + "metadataType": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Column type for metadata type column in typeorm metadata table.\nStores type of metadata. E.g. 'VIEW' or 'CHECK'" + }, + "metadataValue": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Column type for metadata value column in typeorm metadata table." + }, + "migrationId": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Column type of id column used for migrations table." + }, + "migrationName": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Column type for migration name column used for migrations table." + }, + "migrationTimestamp": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Column type of timestamp column used for migrations table." + }, + "treeLevel": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Column type for the tree level column." + }, + "updateDate": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Column type for the update date column." + }, + "updateDateDefault": { + "description": "Default value should be used by a database for \"updated date\" column.", + "type": "string" + }, + "updateDatePrecision": { + "description": "Precision of datetime column. Used in MySql to define milliseconds.", + "type": "number" + }, + "version": { + "anyOf": [ + { + "$ref": "#/definitions/StringConstructor" + }, + { + "$ref": "#/definitions/BooleanConstructor" + }, + { + "$ref": "#/definitions/NumberConstructor" + }, + { + "$ref": "#/definitions/DateConstructor" + }, + { + "enum": [ + "alphanum", + "array", + "bfile", + "bigint", + "binary", + "bit", + "bit varying", + "blob", + "bool", + "boolean", + "box", + "bytea", + "bytes", + "char", + "char varying", + "character", + "character varying", + "cidr", + "circle", + "citext", + "clob", + "cube", + "date", + "daterange", + "datetime", + "datetime2", + "datetimeoffset", + "dec", + "decimal", + "double", + "double precision", + "enum", + "fixed", + "float", + "float4", + "float8", + "geography", + "geometry", + "geometrycollection", + "hierarchyid", + "hstore", + "image", + "inet", + "int", + "int2", + "int4", + "int4range", + "int64", + "int8", + "int8range", + "integer", + "interval", + "interval day to second", + "interval year to month", + "json", + "jsonb", + "line", + "linestring", + "long", + "long raw", + "longblob", + "longtext", + "lseg", + "ltree", + "macaddr", + "mediumblob", + "mediumint", + "mediumtext", + "money", + "multilinestring", + "multipoint", + "multipolygon", + "national char", + "national varchar", + "native character", + "nchar", + "nclob", + "ntext", + "number", + "numeric", + "numrange", + "nvarchar", + "nvarchar2", + "path", + "point", + "polygon", + "raw", + "real", + "rowid", + "rowversion", + "seconddate", + "set", + "shorttext", + "simple-array", + "simple-enum", + "simple-json", + "smalldatetime", + "smalldecimal", + "smallint", + "smallmoney", + "sql_variant", + "st_geometry", + "st_point", + "string", + "text", + "time", + "time with time zone", + "time without time zone", + "timestamp", + "timestamp with local time zone", + "timestamp with time zone", + "timestamp without time zone", + "timestamptz", + "timetz", + "tinyblob", + "tinyint", + "tinytext", + "tsquery", + "tsrange", + "tstzrange", + "tsvector", + "uniqueidentifier", + "unsigned big int", + "urowid", + "uuid", + "varbinary", + "varbit", + "varchar", + "varchar2", + "varying character", + "xml", + "year" + ], + "type": "string" + } + ], + "description": "Column type for the version column." + } + }, + "type": "object" + }, + "Member": { + "properties": { + "deaf": { + "type": "boolean" + }, + "guild": { + "$ref": "#/definitions/Guild" + }, + "guild_id": { + "type": "string" + }, + "id": { + "type": "string" + }, + "joined_at": { + "format": "date-time", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "mute": { + "type": "boolean" + }, + "nick": { + "type": "string" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "pending": { + "type": "boolean" + }, + "premium_since": { + "type": "number" + }, + "read_state": { + "$ref": "#/definitions/Record<string,string|null>" + }, + "roles": { + "items": { + "type": "string" + }, + "type": "array" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "settings": { + "$ref": "#/definitions/UserGuildSettings" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + }, + "user": { + "$ref": "#/definitions/User" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "Message": { + "properties": { + "activity": { + "properties": { + "party_id": { + "type": "string" + }, + "type": { + "type": "number" + } + }, + "type": "object" + }, + "application": { + "$ref": "#/definitions/Application" + }, + "application_id": { + "type": "string" + }, + "attachments": { + "items": { + "$ref": "#/definitions/Attachment" + }, + "type": "array" + }, + "author": { + "$ref": "#/definitions/User" + }, + "author_id": { + "type": "string" + }, + "channel": { + "$ref": "#/definitions/Channel" + }, + "channel_id": { + "type": "string" + }, + "components": { + "items": { + "$ref": "#/definitions/MessageComponent" + }, + "type": "array" + }, + "content": { + "type": "string" + }, + "edited_timestamp": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "embeds": { + "items": { + "$ref": "#/definitions/Embed" + }, + "type": "array" + }, + "flags": { + "type": "bigint" + }, + "guild": { + "$ref": "#/definitions/Guild" + }, + "guild_id": { + "type": "string" + }, + "id": { + "type": "string" + }, + "interaction": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/InteractionType" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "member": { + "$ref": "#/definitions/Member" + }, + "member_id": { + "type": "string" + }, + "mention_channel_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "mention_channels": { + "items": { + "$ref": "#/definitions/Channel" + }, + "type": "array" + }, + "mention_everyone": { + "type": "boolean" + }, + "mention_role_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "mention_roles": { + "items": { + "$ref": "#/definitions/Role" + }, + "type": "array" + }, + "mention_user_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "mention_users": { + "items": { + "$ref": "#/definitions/User" + }, + "type": "array" + }, + "message_reference": { + "properties": { + "channel_id": { + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "message_id": { + "type": "string" + } + }, + "type": "object" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "nonce": { + "type": [ + "string", + "number" + ] + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "pinned": { + "type": "boolean" + }, + "reactions": { + "items": { + "$ref": "#/definitions/Reaction" + }, + "type": "array" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "stickers": { + "items": { + }, + "type": "array" + }, + "timestamp": { + "format": "date-time", + "type": "string" + }, + "tts": { + "type": "boolean" + }, + "type": { + "$ref": "#/definitions/MessageType" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + }, + "webhook": { + "$ref": "#/definitions/Webhook" + }, + "webhook_id": { + "type": "string" + } + }, + "type": "object" + }, + "MessageAckEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "channel_id": { + "type": "string" + }, + "manual": { + "type": "boolean" + }, + "mention_count": { + "type": "number" + }, + "message_id": { + "type": "string" + }, + "version": { + "type": "number" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "MESSAGE_ACK" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "MessageComponent": { + "properties": { + "components": { + "items": { + "$ref": "#/definitions/MessageComponent" + }, + "type": "array" + }, + "custom_id": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "emoji": { + "$ref": "#/definitions/PartialEmoji" + }, + "label": { + "type": "string" + }, + "style": { + "type": "number" + }, + "type": { + "type": "number" + }, + "url": { + "type": "string" + } + }, + "type": "object" + }, + "MessageComponentType": { + "enum": [ + 1, + 2 + ], + "type": "number" + }, + "MessageCreateEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "allOf": [ + { + "$ref": "#/definitions/Omit<Message,\"author_id\">" + }, + { + "properties": { + "author": { + "$ref": "#/definitions/PublicUser" + }, + "channel_id": { + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "member": { + "$ref": "#/definitions/PublicMember" + }, + "mentions": { + "items": { + "allOf": [ + { + "$ref": "#/definitions/PublicUser" + }, + { + "properties": { + "member": { + "$ref": "#/definitions/PublicMember" + } + }, + "type": "object" + } + ] + }, + "type": "array" + } + }, + "type": "object" + } + ] + }, + "event": { + "enum": [ + "MESSAGE_CREATE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "MessageDeleteBulkEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "channel_id": { + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "ids": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "MESSAGE_DELETE_BULK" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "MessageDeleteEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "channel_id": { + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "MESSAGE_DELETE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "MessageFields": { + "properties": { + "consumerTag": { + "type": "string" + }, + "deliveryTag": { + "type": "number" + }, + "exchange": { + "type": "string" + }, + "messageCount": { + "type": "number" + }, + "redelivered": { + "type": "boolean" + }, + "routingKey": { + "type": "string" + } + }, + "type": "object" + }, + "MessageFlags": { + "properties": { + "bitfield": { + "type": "bigint" + } + }, + "type": "object" + }, + "MessagePayload": { + "allOf": [ + { + "$ref": "#/definitions/Omit<Message,\"author_id\">" + }, + { + "properties": { + "author": { + "$ref": "#/definitions/PublicUser" + }, + "channel_id": { + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "member": { + "$ref": "#/definitions/PublicMember" + }, + "mentions": { + "items": { + "allOf": [ + { + "$ref": "#/definitions/PublicUser" + }, + { + "properties": { + "member": { + "$ref": "#/definitions/PublicMember" + } + }, + "type": "object" + } + ] + }, + "type": "array" + } + }, + "type": "object" + } + ] + }, + "MessageProperties": { + "properties": { + "appId": { + }, + "clusterId": { + }, + "contentEncoding": { + }, + "contentType": { + }, + "correlationId": { + }, + "deliveryMode": { + }, + "expiration": { + }, + "headers": { + "$ref": "#/definitions/MessagePropertyHeaders" + }, + "messageId": { + }, + "priority": { + }, + "replyTo": { + }, + "timestamp": { + }, + "type": { + }, + "userId": { + } + }, + "type": "object" + }, + "MessagePropertyHeaders": { + "additionalProperties": { + }, + "properties": { + "x-death": { + "items": { + "$ref": "#/definitions/XDeath" + }, + "type": "array" + }, + "x-first-death-exchange": { + "type": "string" + }, + "x-first-death-queue": { + "type": "string" + }, + "x-first-death-reason": { + "type": "string" + } + }, + "type": "object" + }, + "MessageReactionAddEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "channel_id": { + "type": "string" + }, + "emoji": { + "$ref": "#/definitions/PartialEmoji" + }, + "guild_id": { + "type": "string" + }, + "member": { + "$ref": "#/definitions/PublicMember" + }, + "message_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "MESSAGE_REACTION_ADD" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "MessageReactionRemoveAllEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "channel_id": { + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "message_id": { + "type": "string" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "MESSAGE_REACTION_REMOVE_ALL" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "MessageReactionRemoveEmojiEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "channel_id": { + "type": "string" + }, + "emoji": { + "$ref": "#/definitions/PartialEmoji" + }, + "guild_id": { + "type": "string" + }, + "message_id": { + "type": "string" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "MESSAGE_REACTION_REMOVE_EMOJI" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "MessageReactionRemoveEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "channel_id": { + "type": "string" + }, + "emoji": { + "$ref": "#/definitions/PartialEmoji" + }, + "guild_id": { + "type": "string" + }, + "message_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "MESSAGE_REACTION_REMOVE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "MessageType": { + "enum": [ + 0, + 1, + 10, + 11, + 12, + 14, + 15, + 19, + 2, + 20, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "type": "number" + }, + "MessageUpdateEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "allOf": [ + { + "$ref": "#/definitions/Omit<Message,\"author_id\">" + }, + { + "properties": { + "author": { + "$ref": "#/definitions/PublicUser" + }, + "channel_id": { + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "member": { + "$ref": "#/definitions/PublicMember" + }, + "mentions": { + "items": { + "allOf": [ + { + "$ref": "#/definitions/PublicUser" + }, + { + "properties": { + "member": { + "$ref": "#/definitions/PublicMember" + } + }, + "type": "object" + } + ] + }, + "type": "array" + } + }, + "type": "object" + } + ] + }, + "event": { + "enum": [ + "MESSAGE_UPDATE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "MigrationInterface": { + "description": "Migrations should implement this interface and all its methods.", + "properties": { + "name": { + "description": "Optional migration name, defaults to class name.", + "type": "string" + } + }, + "type": "object" + }, + "MongoClient": { + "description": "Creates a new MongoClient instance.", + "type": "object" + }, + "MongoConnectionOptions": { + "description": "MongoDB specific connection options.\nSynced with http://mongodb.github.io/node-mongodb-native/3.1/api/MongoClient.html", + "properties": { + "acceptableLatencyMS": { + "description": "Sets the range of servers to pick when using NEAREST (lowest ping ms + the latency fence, ex: range of 1 to (1 + 15) ms).\nDefault: 15", + "type": "number" + }, + "appname": { + "description": "The name of the application that created this MongoClient instance. MongoDB 3.4 and newer will print this value in the server log upon establishing each connection. It is also recorded in the slow query log and profile collections", + "type": "string" + }, + "authMechanism": { + "description": "Sets the authentication mechanism that MongoDB will use to authenticate the connection", + "type": "string" + }, + "authSource": { + "description": "If the database authentication is dependent on another databaseName.", + "type": "string" + }, + "autoEncryption": { + "description": "Automatic Client-Side Field Level Encryption configuration." + }, + "autoReconnect": { + "description": "Reconnect on error. Default: true", + "type": "boolean" + }, + "auto_reconnect": { + "description": "Enable auto reconnecting for single server instances. Default: true", + "type": "boolean" + }, + "bufferMaxEntries": { + "description": "Sets a cap on how many operations the driver will buffer up before giving up on getting a working connection,\ndefault is -1 which is unlimited.", + "type": "number" + }, + "cache": { + "anyOf": [ + { + "properties": { + "alwaysEnabled": { + "description": "If set to true then queries (using find methods and QueryBuilder's methods) will always be cached.", + "type": "boolean" + }, + "duration": { + "description": "Time in milliseconds in which cache will expire.\nThis can be setup per-query.\nDefault value is 1000 which is equivalent to 1 second.", + "type": "number" + }, + "ignoreErrors": { + "description": "Used to specify if cache errors should be ignored, and pass through the call to the Database.", + "type": "boolean" + }, + "options": { + "description": "Used to provide redis connection options." + }, + "provider": { + "description": "Factory function for custom cache providers that implement QueryResultCache.", + "type": "object" + }, + "tableName": { + "description": "Configurable table name for \"database\" type cache.\nDefault value is \"query-result-cache\"", + "type": "string" + }, + "type": { + "description": "Type of caching.\n\n- \"database\" means cached values will be stored in the separate table in database. This is default value.\n- \"redis\" means cached values will be stored inside redis. You must provide redis connection options.", + "enum": [ + "database", + "ioredis", + "ioredis/cluster", + "redis" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "type": "boolean" + } + ], + "description": "Allows to setup cache options." + }, + "checkServerIdentity": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "boolean" + } + ], + "description": "Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function\nDefault: true" + }, + "cli": { + "description": "CLI settings.", + "properties": { + "entitiesDir": { + "description": "Directory where entities should be created by default.", + "type": "string" + }, + "migrationsDir": { + "description": "Directory where migrations should be created by default.", + "type": "string" + }, + "subscribersDir": { + "description": "Directory where subscribers should be created by default.", + "type": "string" + } + }, + "type": "object" + }, + "compression": { + "description": "Type of compression to use: snappy or zlib" + }, + "connectTimeoutMS": { + "description": "TCP Connection timeout setting. Default: 30000", + "type": "number" + }, + "connectWithNoPrimary": { + "description": "Sets if the driver should connect even if no primary is available. Default: false", + "type": "boolean" + }, + "database": { + "description": "Database name to connect to.", + "type": "string" + }, + "domainsEnabled": { + "description": "Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit. Default: false", + "type": "boolean" + }, + "dropSchema": { + "description": "Drops the schema each time connection is being established.\nBe careful with this option and don't use this in production - otherwise you'll lose all production data.\nThis option is useful during debug and development.", + "type": "boolean" + }, + "entities": { + "description": "Entities to be loaded for this connection.\nAccepts both entity classes and directories where from entities need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "$ref": "#/definitions/EntitySchema<any>" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "entityPrefix": { + "description": "Prefix to use on all tables (collections) of this connection in the database.", + "type": "string" + }, + "entitySkipConstructor": { + "description": "When creating new Entity instances, skip all constructors when true.", + "type": "boolean" + }, + "extra": { + "description": "Extra connection options to be passed to the underlying driver.\n\ntodo: deprecate this and move all database-specific types into hts own connection options object." + }, + "family": { + "description": "Version of IP stack. Can be 4, 6.\nIf undefined, will attempt to connect with IPv6, and will fall back to IPv4 on failure", + "type": "number" + }, + "forceServerObjectId": { + "description": "Force server to assign _id values instead of driver. Default: false", + "type": "boolean" + }, + "fsync": { + "description": "Specify a file sync write concern. Default: false", + "type": "boolean" + }, + "ha": { + "description": "Control if high availability monitoring runs for Replicaset or Mongos proxies. Default true", + "type": "boolean" + }, + "haInterval": { + "description": "The High availability period for replicaset inquiry. Default: 10000", + "type": "number" + }, + "host": { + "description": "Database host.", + "type": "string" + }, + "hostReplicaSet": { + "description": "Database host replica set.", + "type": "string" + }, + "ignoreUndefined": { + "description": "Specify if the BSON serializer should ignore undefined fields. Default: false", + "type": "boolean" + }, + "j": { + "description": "Specify a journal write concern. Default: false", + "type": "boolean" + }, + "keepAlive": { + "description": "The number of milliseconds to wait before initiating keepAlive on the TCP socket. Default: 30000", + "type": "number" + }, + "logger": { + "anyOf": [ + { + "$ref": "#/definitions/Logger" + }, + { + "enum": [ + "advanced-console", + "debug", + "file", + "simple-console" + ], + "type": "string" + } + ], + "description": "Logger instance used to log queries and events in the ORM." + }, + "loggerLevel": { + "description": "Specify the log level used by the driver logger (error/warn/info/debug).", + "enum": [ + "debug", + "error", + "info", + "warn" + ], + "type": "string" + }, + "logging": { + "anyOf": [ + { + "items": { + "enum": [ + "error", + "info", + "log", + "migration", + "query", + "schema", + "warn" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "all", + false, + true + ] + } + ], + "description": "Logging options." + }, + "maxQueryExecutionTime": { + "description": "Maximum number of milliseconds query should be executed before logger log a warning.", + "type": "number" + }, + "maxStalenessSeconds": { + "description": "Specify a maxStalenessSeconds value for secondary reads, minimum is 90 seconds", + "type": "number" + }, + "migrations": { + "description": "Migrations to be loaded for this connection.\nAccepts both migration classes and directories where from migrations need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "migrationsRun": { + "description": "Indicates if migrations should be auto run on every application launch.\nAlternative to it, you can use CLI and run migrations:run command.", + "type": "boolean" + }, + "migrationsTableName": { + "description": "Migrations table name, in case of different name from \"migrations\".\nAccepts single string name.", + "type": "string" + }, + "migrationsTransactionMode": { + "description": "Transaction mode for migrations to run in", + "enum": [ + "all", + "each", + "none" + ], + "type": "string" + }, + "minSize": { + "description": "If present, the connection pool will be initialized with minSize connections, and will never dip below minSize connections", + "type": "number" + }, + "monitorCommands": { + "description": "Enable command monitoring for this client. Default: false", + "type": "boolean" + }, + "name": { + "description": "Connection name. If connection name is not given then it will be called \"default\".\nDifferent connections must have different names.", + "type": "string" + }, + "namingStrategy": { + "$ref": "#/definitions/NamingStrategyInterface", + "description": "Naming strategy to be used to name tables and columns in the database." + }, + "noDelay": { + "description": "TCP Socket NoDelay option. Default: true", + "type": "boolean" + }, + "numberOfRetries": { + "description": "The number of retries for a tailable cursor. Default: 5", + "type": "number" + }, + "password": { + "description": "Database password.", + "type": "string" + }, + "pkFactory": { + "description": "A primary key factory object for generation of custom _id keys." + }, + "poolSize": { + "description": "Set the maximum poolSize for each individual server or proxy connection.", + "type": "number" + }, + "port": { + "description": "Database host port.", + "type": "number" + }, + "promiseLibrary": { + "description": "A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible." + }, + "promoteBuffers": { + "description": "Promotes Binary BSON values to native Node Buffers. Default: false", + "type": "boolean" + }, + "promoteLongs": { + "description": "Promotes Long values to number if they fit inside the 53 bits resolution. Default: true", + "type": "boolean" + }, + "promoteValues": { + "description": "Promotes BSON values to native types where possible, set to false to only receive wrapper types. Default: true", + "type": "boolean" + }, + "raw": { + "description": "Return document results as raw BSON buffers. Default: false", + "type": "boolean" + }, + "readConcern": { + "description": "Specify a read concern for the collection. (only MongoDB 3.2 or higher supported)." + }, + "readPreference": { + "anyOf": [ + { + "$ref": "#/definitions/ReadPreference" + }, + { + "type": "string" + } + ], + "description": "The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY,\nReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST)." + }, + "readPreferenceTags": { + "description": "Read preference tags", + "items": { + }, + "type": "array" + }, + "reconnectInterval": { + "description": "Server will wait #milliseconds between retries. Default 1000", + "type": "number" + }, + "reconnectTries": { + "description": "Server attempt to reconnect #times. Default 30", + "type": "number" + }, + "replicaSet": { + "description": "The name of the replicaset to connect to", + "type": "string" + }, + "secondaryAcceptableLatencyMS": { + "description": "Sets the range of servers to pick when using NEAREST (lowest ping ms + the latency fence, ex: range of 1 to (1 + 15) ms).\nDefault: 15", + "type": "number" + }, + "serializeFunctions": { + "description": "Serialize functions on any object. Default: false", + "type": "boolean" + }, + "socketTimeoutMS": { + "description": "TCP Socket timeout setting. Default: 360000", + "type": "number" + }, + "ssl": { + "description": "Use ssl connection (needs to have a mongod server with ssl support). Default: false", + "type": "boolean" + }, + "sslCA": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "items": { + "description": "Raw data is stored in instances of the Buffer class.\nA Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.\nValid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'", + "items": { + "type": "number" + }, + "type": "array" + }, + "type": "array" + } + ], + "description": "Array of valid certificates either as Buffers or Strings\n(needs to have a mongod server with ssl support, 2.4 or higher)." + }, + "sslCRL": { + "anyOf": [ + { + "description": "Raw data is stored in instances of the Buffer class.\nA Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.\nValid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "SSL Certificate revocation list binary buffer\n(needs to have a mongod server with ssl support, 2.4 or higher)" + }, + "sslCert": { + "anyOf": [ + { + "description": "Raw data is stored in instances of the Buffer class.\nA Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.\nValid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "String or buffer containing the certificate we wish to present\n(needs to have a mongod server with ssl support, 2.4 or higher)" + }, + "sslKey": { + "description": "String or buffer containing the certificate private key we wish to present\n(needs to have a mongod server with ssl support, 2.4 or higher)", + "type": "string" + }, + "sslPass": { + "anyOf": [ + { + "description": "Raw data is stored in instances of the Buffer class.\nA Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.\nValid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "String or buffer containing the certificate password\n(needs to have a mongod server with ssl support, 2.4 or higher)" + }, + "sslValidate": { + "description": "Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher).\nDefault: true", + "type": "boolean" + }, + "subscribers": { + "description": "Subscribers to be loaded for this connection.\nAccepts both subscriber classes and directories where from subscribers need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "synchronize": { + "description": "Indicates if database schema should be auto created on every application launch.\nBe careful with this option and don't use this in production - otherwise you can lose production data.\nThis option is useful during debug and development.\nAlternative to it, you can use CLI and run schema:sync command.\n\nNote that for MongoDB database it does not create schema, because MongoDB is schemaless.\nInstead, it syncs just by creating indices.", + "type": "boolean" + }, + "type": { + "description": "Database type.", + "enum": [ + "mongodb" + ], + "type": "string" + }, + "url": { + "description": "Connection url where perform connection to.", + "type": "string" + }, + "useNewUrlParser": { + "description": "Determines whether or not to use the new url parser. Default: false", + "type": "boolean" + }, + "useUnifiedTopology": { + "description": "Determines whether or not to use the new Server Discovery and Monitoring engine. Default: false\nhttps://github.com/mongodb/node-mongodb-native/releases/tag/v3.2.1", + "type": "boolean" + }, + "username": { + "description": "Database username.", + "type": "string" + }, + "validateOptions": { + "description": "Validate MongoClient passed in options for correctness. Default: false" + }, + "w": { + "description": "The write concern.", + "type": [ + "string", + "number" + ] + }, + "wtimeout": { + "description": "The write concern timeout value.", + "type": "number" + } + }, + "type": "object" + }, + "MongoEntityManager": { + "description": "Entity manager supposed to work with any entity, automatically find its repository and call its methods,\nwhatever entity type are you passing.\n\nThis implementation is used for MongoDB driver which has some specifics in its EntityManager.", + "properties": { + "connection": { + "$ref": "#/definitions/Connection", + "description": "Connection used by this entity manager." + }, + "mongoQueryRunner": { + "$ref": "#/definitions/MongoQueryRunner" + }, + "plainObjectToEntityTransformer": { + "$ref": "#/definitions/PlainObjectToNewEntityTransformer", + "description": "Plain to object transformer used in create and merge operations." + }, + "queryRunner": { + "$ref": "#/definitions/QueryRunner", + "description": "Custom query runner to be used for operations in this entity manager.\nUsed only in non-global entity manager." + }, + "repositories": { + "description": "Once created and then reused by en repositories.", + "items": { + "$ref": "#/definitions/Repository<any>" + }, + "type": "array" + } + }, + "type": "object" + }, + "MongoQueryRunner": { + "description": "Runs queries on a single MongoDB connection.", + "properties": { + "broadcaster": { + "$ref": "#/definitions/Broadcaster", + "description": "Broadcaster used on this query runner to broadcast entity events." + }, + "connection": { + "$ref": "#/definitions/Connection", + "description": "Connection used by this query runner." + }, + "data": { + "description": "Stores temporarily user data.\nUseful for sharing data with subscribers.", + "properties": { + }, + "type": "object" + }, + "databaseConnection": { + "$ref": "#/definitions/MongoClient", + "description": "Real database connection from a connection pool used to perform queries." + }, + "isReleased": { + "description": "Indicates if connection for this query runner is released.\nOnce its released, query runner cannot run queries anymore.\nAlways false for mongodb since mongodb has a single query executor instance.", + "type": "boolean" + }, + "isTransactionActive": { + "description": "Indicates if transaction is active in this query executor.\nAlways false for mongodb since mongodb does not support transactions.", + "type": "boolean" + }, + "loadedTables": { + "description": "All synchronized tables in the database.", + "items": { + "$ref": "#/definitions/Table" + }, + "type": "array" + }, + "loadedViews": { + "description": "All synchronized views in the database.", + "items": { + "$ref": "#/definitions/View" + }, + "type": "array" + }, + "manager": { + "$ref": "#/definitions/MongoEntityManager", + "description": "Entity manager working only with current query runner." + } + }, + "type": "object" + }, + "MuteConfig": { + "properties": { + "end_time": { + "type": "number" + }, + "selected_time_window": { + "type": "number" + } + }, + "type": "object" + }, + "MysqlConnectionCredentialsOptions": { + "description": "MySQL specific connection credential options.", + "properties": { + "database": { + "description": "Database name to connect to.", + "type": "string" + }, + "host": { + "description": "Database host.", + "type": "string" + }, + "password": { + "description": "Database password.", + "type": "string" + }, + "port": { + "description": "Database host port.", + "type": "number" + }, + "socketPath": { + "description": "Database socket path", + "type": "string" + }, + "ssl": { + "description": "Object with ssl parameters or a string containing name of ssl profile." + }, + "url": { + "description": "Connection url where perform connection to.", + "type": "string" + }, + "username": { + "description": "Database username.", + "type": "string" + } + }, + "type": "object" + }, + "MysqlConnectionOptions": { + "description": "MySQL specific connection options.", + "properties": { + "acquireTimeout": { + "description": "The milliseconds before a timeout occurs during the initial connection to the MySQL server. (Default: 10000)\nThis difference between connectTimeout and acquireTimeout is subtle and is described in the mysqljs/mysql docs\nhttps://github.com/mysqljs/mysql/tree/master#pool-options", + "type": "number" + }, + "bigNumberStrings": { + "description": "Enabling both supportBigNumbers and bigNumberStrings forces big numbers (BIGINT and DECIMAL columns) to be always\nreturned as JavaScript String objects (Default: false). Enabling supportBigNumbers but leaving bigNumberStrings\ndisabled will return big numbers as String objects only when they cannot be accurately represented with\n[JavaScript Number objects](http://ecma262-5.com/ELS5_HTML.htm#Section_8.5) (which happens when they exceed the [-2^53, +2^53] range),\notherwise they will be returned as Number objects. This option is ignored if supportBigNumbers is disabled.", + "type": "boolean" + }, + "cache": { + "anyOf": [ + { + "properties": { + "alwaysEnabled": { + "description": "If set to true then queries (using find methods and QueryBuilder's methods) will always be cached.", + "type": "boolean" + }, + "duration": { + "description": "Time in milliseconds in which cache will expire.\nThis can be setup per-query.\nDefault value is 1000 which is equivalent to 1 second.", + "type": "number" + }, + "ignoreErrors": { + "description": "Used to specify if cache errors should be ignored, and pass through the call to the Database.", + "type": "boolean" + }, + "options": { + "description": "Used to provide redis connection options." + }, + "provider": { + "description": "Factory function for custom cache providers that implement QueryResultCache.", + "type": "object" + }, + "tableName": { + "description": "Configurable table name for \"database\" type cache.\nDefault value is \"query-result-cache\"", + "type": "string" + }, + "type": { + "description": "Type of caching.\n\n- \"database\" means cached values will be stored in the separate table in database. This is default value.\n- \"redis\" means cached values will be stored inside redis. You must provide redis connection options.", + "enum": [ + "database", + "ioredis", + "ioredis/cluster", + "redis" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "type": "boolean" + } + ], + "description": "Allows to setup cache options." + }, + "charset": { + "description": "The charset for the connection. This is called \"collation\" in the SQL-level of MySQL (like utf8_general_ci).\nIf a SQL-level charset is specified (like utf8mb4) then the default collation for that charset is used.\nDefault: 'UTF8_GENERAL_CI'", + "type": "string" + }, + "cli": { + "description": "CLI settings.", + "properties": { + "entitiesDir": { + "description": "Directory where entities should be created by default.", + "type": "string" + }, + "migrationsDir": { + "description": "Directory where migrations should be created by default.", + "type": "string" + }, + "subscribersDir": { + "description": "Directory where subscribers should be created by default.", + "type": "string" + } + }, + "type": "object" + }, + "connectTimeout": { + "description": "The milliseconds before a timeout occurs during the initial connection to the MySQL server. (Default: 10000)", + "type": "number" + }, + "database": { + "description": "Database name to connect to.", + "type": "string" + }, + "dateStrings": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "boolean" + } + ], + "description": "Force date types (TIMESTAMP, DATETIME, DATE) to be returned as strings rather then inflated into JavaScript Date objects.\nCan be true/false or an array of type names to keep as strings." + }, + "debug": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "boolean" + } + ], + "description": "Prints protocol details to stdout. Can be true/false or an array of packet type names that should be printed.\n(Default: false)" + }, + "dropSchema": { + "description": "Drops the schema each time connection is being established.\nBe careful with this option and don't use this in production - otherwise you'll lose all production data.\nThis option is useful during debug and development.", + "type": "boolean" + }, + "entities": { + "description": "Entities to be loaded for this connection.\nAccepts both entity classes and directories where from entities need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "$ref": "#/definitions/EntitySchema<any>" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "entityPrefix": { + "description": "Prefix to use on all tables (collections) of this connection in the database.", + "type": "string" + }, + "entitySkipConstructor": { + "description": "When creating new Entity instances, skip all constructors when true.", + "type": "boolean" + }, + "extra": { + "description": "Extra connection options to be passed to the underlying driver.\n\ntodo: deprecate this and move all database-specific types into hts own connection options object." + }, + "flags": { + "description": "List of connection flags to use other than the default ones. It is also possible to blacklist default ones.\nFor more information, check https://github.com/mysqljs/mysql#connection-flags.", + "items": { + "type": "string" + }, + "type": "array" + }, + "host": { + "description": "Database host.", + "type": "string" + }, + "insecureAuth": { + "description": "Allow connecting to MySQL instances that ask for the old (insecure) authentication method. (Default: false)", + "type": "boolean" + }, + "legacySpatialSupport": { + "description": "Use spatial functions like GeomFromText and AsText which are removed in MySQL 8.\n(Default: true)", + "type": "boolean" + }, + "logger": { + "anyOf": [ + { + "$ref": "#/definitions/Logger" + }, + { + "enum": [ + "advanced-console", + "debug", + "file", + "simple-console" + ], + "type": "string" + } + ], + "description": "Logger instance used to log queries and events in the ORM." + }, + "logging": { + "anyOf": [ + { + "items": { + "enum": [ + "error", + "info", + "log", + "migration", + "query", + "schema", + "warn" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "all", + false, + true + ] + } + ], + "description": "Logging options." + }, + "maxQueryExecutionTime": { + "description": "Maximum number of milliseconds query should be executed before logger log a warning.", + "type": "number" + }, + "migrations": { + "description": "Migrations to be loaded for this connection.\nAccepts both migration classes and directories where from migrations need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "migrationsRun": { + "description": "Indicates if migrations should be auto run on every application launch.\nAlternative to it, you can use CLI and run migrations:run command.", + "type": "boolean" + }, + "migrationsTableName": { + "description": "Migrations table name, in case of different name from \"migrations\".\nAccepts single string name.", + "type": "string" + }, + "migrationsTransactionMode": { + "description": "Transaction mode for migrations to run in", + "enum": [ + "all", + "each", + "none" + ], + "type": "string" + }, + "multipleStatements": { + "description": "Allow multiple mysql statements per query. Be careful with this, it could increase the scope of SQL injection attacks.\n(Default: false)", + "type": "boolean" + }, + "name": { + "description": "Connection name. If connection name is not given then it will be called \"default\".\nDifferent connections must have different names.", + "type": "string" + }, + "namingStrategy": { + "$ref": "#/definitions/NamingStrategyInterface", + "description": "Naming strategy to be used to name tables and columns in the database." + }, + "password": { + "description": "Database password.", + "type": "string" + }, + "port": { + "description": "Database host port.", + "type": "number" + }, + "replication": { + "description": "Replication setup.", + "properties": { + "canRetry": { + "description": "If true, PoolCluster will attempt to reconnect when connection fails. (Default: true)", + "type": "boolean" + }, + "master": { + "$ref": "#/definitions/MysqlConnectionCredentialsOptions", + "description": "Master server used by orm to perform writes." + }, + "removeNodeErrorCount": { + "description": "If connection fails, node's errorCount increases.\nWhen errorCount is greater than removeNodeErrorCount, remove a node in the PoolCluster. (Default: 5)", + "type": "number" + }, + "restoreNodeTimeout": { + "description": "If connection fails, specifies the number of milliseconds before another connection attempt will be made.\nIf set to 0, then node will be removed instead and never re-used. (Default: 0)", + "type": "number" + }, + "selector": { + "description": "Determines how slaves are selected:\nRR: Select one alternately (Round-Robin).\nRANDOM: Select the node by random function.\nORDER: Select the first node available unconditionally.", + "enum": [ + "ORDER", + "RANDOM", + "RR" + ], + "type": "string" + }, + "slaves": { + "description": "List of read-from severs (slaves).", + "items": { + "$ref": "#/definitions/MysqlConnectionCredentialsOptions" + }, + "type": "array" + } + }, + "type": "object" + }, + "socketPath": { + "description": "Database socket path", + "type": "string" + }, + "ssl": { + "description": "Object with ssl parameters or a string containing name of ssl profile." + }, + "subscribers": { + "description": "Subscribers to be loaded for this connection.\nAccepts both subscriber classes and directories where from subscribers need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "supportBigNumbers": { + "description": "When dealing with big numbers (BIGINT and DECIMAL columns) in the database, you should enable this option (Default: false)", + "type": "boolean" + }, + "synchronize": { + "description": "Indicates if database schema should be auto created on every application launch.\nBe careful with this option and don't use this in production - otherwise you can lose production data.\nThis option is useful during debug and development.\nAlternative to it, you can use CLI and run schema:sync command.\n\nNote that for MongoDB database it does not create schema, because MongoDB is schemaless.\nInstead, it syncs just by creating indices.", + "type": "boolean" + }, + "timezone": { + "description": "The timezone configured on the MySQL server.\nThis is used to type cast server date/time values to JavaScript Date object and vice versa.\nThis can be 'local', 'Z', or an offset in the form +HH:MM or -HH:MM. (Default: 'local')", + "type": "string" + }, + "trace": { + "description": "Generates stack traces on Error to include call site of library entrance (\"long stack traces\").\nSlight performance penalty for most calls. (Default: true)", + "type": "boolean" + }, + "type": { + "description": "Database type.", + "enum": [ + "mariadb", + "mysql" + ], + "type": "string" + }, + "url": { + "description": "Connection url where perform connection to.", + "type": "string" + }, + "username": { + "description": "Database username.", + "type": "string" + } + }, + "type": "object" + }, + "Name": { + "properties": { + "names": { + "$ref": "#/definitions/UsedNames" + }, + "str": { + "type": "string" + } + }, + "type": "object" + }, + "NameValue": { + "properties": { + "code": { + "anyOf": [ + { + "$ref": "#/definitions/Name" + }, + { + "$ref": "#/definitions/_Code" + } + ] + }, + "key": { + }, + "ref": { + } + }, + "type": "object" + }, + "NamingStrategyInterface": { + "description": "Naming strategy defines how auto-generated names for such things like table name, or table column gonna be\ngenerated.", + "properties": { + "materializedPathColumnName": { + "description": "Column name for materialized paths.", + "type": "string" + }, + "name": { + "description": "Naming strategy name.", + "type": "string" + }, + "nestedSetColumnNames": { + "description": "Column names for nested sets.", + "properties": { + "left": { + "type": "string" + }, + "right": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "NativescriptConnectionOptions": { + "description": "NativeScript-specific connection options.", + "properties": { + "androidFlags": { + "description": "Flags to pass to SQLite when opening the database on Android. (see https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html)", + "type": "number" + }, + "cache": { + "anyOf": [ + { + "properties": { + "alwaysEnabled": { + "description": "If set to true then queries (using find methods and QueryBuilder's methods) will always be cached.", + "type": "boolean" + }, + "duration": { + "description": "Time in milliseconds in which cache will expire.\nThis can be setup per-query.\nDefault value is 1000 which is equivalent to 1 second.", + "type": "number" + }, + "ignoreErrors": { + "description": "Used to specify if cache errors should be ignored, and pass through the call to the Database.", + "type": "boolean" + }, + "options": { + "description": "Used to provide redis connection options." + }, + "provider": { + "description": "Factory function for custom cache providers that implement QueryResultCache.", + "type": "object" + }, + "tableName": { + "description": "Configurable table name for \"database\" type cache.\nDefault value is \"query-result-cache\"", + "type": "string" + }, + "type": { + "description": "Type of caching.\n\n- \"database\" means cached values will be stored in the separate table in database. This is default value.\n- \"redis\" means cached values will be stored inside redis. You must provide redis connection options.", + "enum": [ + "database", + "ioredis", + "ioredis/cluster", + "redis" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "type": "boolean" + } + ], + "description": "Allows to setup cache options." + }, + "cli": { + "description": "CLI settings.", + "properties": { + "entitiesDir": { + "description": "Directory where entities should be created by default.", + "type": "string" + }, + "migrationsDir": { + "description": "Directory where migrations should be created by default.", + "type": "string" + }, + "subscribersDir": { + "description": "Directory where subscribers should be created by default.", + "type": "string" + } + }, + "type": "object" + }, + "database": { + "description": "Database name.", + "type": "string" + }, + "driver": { + "description": "The driver object\nyou should pass `require('nativescript-sqlite') here" + }, + "dropSchema": { + "description": "Drops the schema each time connection is being established.\nBe careful with this option and don't use this in production - otherwise you'll lose all production data.\nThis option is useful during debug and development.", + "type": "boolean" + }, + "entities": { + "description": "Entities to be loaded for this connection.\nAccepts both entity classes and directories where from entities need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "$ref": "#/definitions/EntitySchema<any>" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "entityPrefix": { + "description": "Prefix to use on all tables (collections) of this connection in the database.", + "type": "string" + }, + "entitySkipConstructor": { + "description": "When creating new Entity instances, skip all constructors when true.", + "type": "boolean" + }, + "extra": { + "description": "Extra connection options to be passed to the underlying driver.\n\ntodo: deprecate this and move all database-specific types into hts own connection options object." + }, + "iosFlags": { + "description": "Flags to pass to SQLite when opening the database on iOS. (see https://www.sqlite.org/c3ref/open.html)", + "type": "number" + }, + "key": { + "description": "The key to use for for using/opening encrypted databases. (requires the \"Encrypted Plugin\")", + "type": "string" + }, + "logger": { + "anyOf": [ + { + "$ref": "#/definitions/Logger" + }, + { + "enum": [ + "advanced-console", + "debug", + "file", + "simple-console" + ], + "type": "string" + } + ], + "description": "Logger instance used to log queries and events in the ORM." + }, + "logging": { + "anyOf": [ + { + "items": { + "enum": [ + "error", + "info", + "log", + "migration", + "query", + "schema", + "warn" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "all", + false, + true + ] + } + ], + "description": "Logging options." + }, + "maxQueryExecutionTime": { + "description": "Maximum number of milliseconds query should be executed before logger log a warning.", + "type": "number" + }, + "migrate": { + "description": "Migrates a Encrypted Sql database from v3 to the new v4. If you are a new user you do not need to set this flag as new created databases will already be in v4.\nIf you are upgrading a app that used v1.3.0 or earlier of NS-Sqlite-Encrypted; then you will probably want to set this flag to true. (requires the \"Encrypted Plugin\")", + "type": "boolean" + }, + "migrations": { + "description": "Migrations to be loaded for this connection.\nAccepts both migration classes and directories where from migrations need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "migrationsRun": { + "description": "Indicates if migrations should be auto run on every application launch.\nAlternative to it, you can use CLI and run migrations:run command.", + "type": "boolean" + }, + "migrationsTableName": { + "description": "Migrations table name, in case of different name from \"migrations\".\nAccepts single string name.", + "type": "string" + }, + "migrationsTransactionMode": { + "description": "Transaction mode for migrations to run in", + "enum": [ + "all", + "each", + "none" + ], + "type": "string" + }, + "multithreading": { + "description": "Whether to enable background multitasking. All SQL is ran on a background worker thread. (requires the \"Commercial Plugin\")", + "type": "boolean" + }, + "name": { + "description": "Connection name. If connection name is not given then it will be called \"default\".\nDifferent connections must have different names.", + "type": "string" + }, + "namingStrategy": { + "$ref": "#/definitions/NamingStrategyInterface", + "description": "Naming strategy to be used to name tables and columns in the database." + }, + "readOnly": { + "description": "Whether to mark the mark the database as read only on open (iOS only).", + "type": "boolean" + }, + "subscribers": { + "description": "Subscribers to be loaded for this connection.\nAccepts both subscriber classes and directories where from subscribers need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "synchronize": { + "description": "Indicates if database schema should be auto created on every application launch.\nBe careful with this option and don't use this in production - otherwise you can lose production data.\nThis option is useful during debug and development.\nAlternative to it, you can use CLI and run schema:sync command.\n\nNote that for MongoDB database it does not create schema, because MongoDB is schemaless.\nInstead, it syncs just by creating indices.", + "type": "boolean" + }, + "type": { + "description": "Database type.", + "enum": [ + "nativescript" + ], + "type": "string" + } + }, + "type": "object" + }, + "NtlmAuthentication": { + "properties": { + "options": { + "properties": { + "domain": { + "description": "Once you set domain for ntlm authentication type, driver will connect to SQL Server using domain login.\n\nThis is necessary for forming a connection using ntlm type", + "type": "string" + }, + "password": { + "description": "Password from your windows account.", + "type": "string" + }, + "userName": { + "description": "User name from your windows account.", + "type": "string" + } + }, + "type": "object" + }, + "type": { + "enum": [ + "ntlm" + ], + "type": "string" + } + }, + "type": "object" + }, + "Number": { + "type": "object" + }, + "NumberConstructor": { + "properties": { + "EPSILON": { + "type": "number" + }, + "MAX_SAFE_INTEGER": { + "type": "number" + }, + "MAX_VALUE": { + "type": "number" + }, + "MIN_SAFE_INTEGER": { + "type": "number" + }, + "MIN_VALUE": { + "type": "number" + }, + "NEGATIVE_INFINITY": { + "type": "number" + }, + "NaN": { + "type": "number" + }, + "POSITIVE_INFINITY": { + "type": "number" + }, + "prototype": { + "$ref": "#/definitions/Number" + } + }, + "type": "object" + }, + "ObjectLiteral": { + "additionalProperties": { + }, + "description": "Interface of the simple literal object with any string keys.", + "type": "object" + }, + "Omit<Invite,\"guild\"|\"channel\">": { + "properties": { + "assign": { + "type": "object" + }, + "channel_id": { + "type": "string" + }, + "code": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "expires_at": { + "format": "date-time", + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "hasId": { + "description": "Checks if entity has an id.\nIf entity composite compose ids, it will check them all.", + "type": "object" + }, + "id": { + "type": "string" + }, + "inviter": { + "$ref": "#/definitions/User" + }, + "inviter_id": { + "type": "string" + }, + "max_age": { + "type": "number" + }, + "max_uses": { + "type": "number" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "recover": { + "description": "Recovers a given entity in the database.", + "type": "object" + }, + "reload": { + "description": "Reloads entity data from the database.", + "type": "object" + }, + "remove": { + "description": "Removes current entity from the database.", + "type": "object" + }, + "save": { + "description": "Saves current entity in the database.\nIf entity does not exist in the database then inserts, otherwise updates.", + "type": "object" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "softRemove": { + "description": "Records the delete date of current entity.", + "type": "object" + }, + "target_user": { + "type": "string" + }, + "target_user_type": { + "type": "number" + }, + "target_usser_id": { + "type": "string" + }, + "temporary": { + "type": "boolean" + }, + "toJSON": { + "type": "object" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + }, + "uses": { + "type": "number" + }, + "validate": { + "type": "object" + } + }, + "type": "object" + }, + "Omit<Member,\"settings\"|\"user\">": { + "properties": { + "assign": { + "type": "object" + }, + "deaf": { + "type": "boolean" + }, + "guild": { + "$ref": "#/definitions/Guild" + }, + "guild_id": { + "type": "string" + }, + "hasId": { + "description": "Checks if entity has an id.\nIf entity composite compose ids, it will check them all.", + "type": "object" + }, + "id": { + "type": "string" + }, + "joined_at": { + "format": "date-time", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "mute": { + "type": "boolean" + }, + "nick": { + "type": "string" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "pending": { + "type": "boolean" + }, + "premium_since": { + "type": "number" + }, + "read_state": { + "$ref": "#/definitions/Record<string,string|null>" + }, + "recover": { + "description": "Recovers a given entity in the database.", + "type": "object" + }, + "reload": { + "description": "Reloads entity data from the database.", + "type": "object" + }, + "remove": { + "description": "Removes current entity from the database.", + "type": "object" + }, + "roles": { + "items": { + "type": "string" + }, + "type": "array" + }, + "save": { + "description": "Saves current entity in the database.\nIf entity does not exist in the database then inserts, otherwise updates.", + "type": "object" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "softRemove": { + "description": "Records the delete date of current entity.", + "type": "object" + }, + "toJSON": { + "type": "object" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + }, + "user_id": { + "type": "string" + }, + "validate": { + "type": "object" + } + }, + "type": "object" + }, + "Omit<Message,\"author_id\">": { + "properties": { + "activity": { + "properties": { + "party_id": { + "type": "string" + }, + "type": { + "type": "number" + } + }, + "type": "object" + }, + "application": { + "$ref": "#/definitions/Application" + }, + "application_id": { + "type": "string" + }, + "assign": { + "type": "object" + }, + "attachments": { + "items": { + "$ref": "#/definitions/Attachment" + }, + "type": "array" + }, + "author": { + "$ref": "#/definitions/User" + }, + "channel": { + "$ref": "#/definitions/Channel" + }, + "channel_id": { + "type": "string" + }, + "components": { + "items": { + "$ref": "#/definitions/MessageComponent" + }, + "type": "array" + }, + "content": { + "type": "string" + }, + "edited_timestamp": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "embeds": { + "items": { + "$ref": "#/definitions/Embed" + }, + "type": "array" + }, + "flags": { + "type": "bigint" + }, + "guild": { + "$ref": "#/definitions/Guild" + }, + "guild_id": { + "type": "string" + }, + "hasId": { + "description": "Checks if entity has an id.\nIf entity composite compose ids, it will check them all.", + "type": "object" + }, + "id": { + "type": "string" + }, + "interaction": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/InteractionType" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "member": { + "$ref": "#/definitions/Member" + }, + "member_id": { + "type": "string" + }, + "mention_channel_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "mention_channels": { + "items": { + "$ref": "#/definitions/Channel" + }, + "type": "array" + }, + "mention_everyone": { + "type": "boolean" + }, + "mention_role_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "mention_roles": { + "items": { + "$ref": "#/definitions/Role" + }, + "type": "array" + }, + "mention_user_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "mention_users": { + "items": { + "$ref": "#/definitions/User" + }, + "type": "array" + }, + "message_reference": { + "properties": { + "channel_id": { + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "message_id": { + "type": "string" + } + }, + "type": "object" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "nonce": { + "type": [ + "string", + "number" + ] + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "pinned": { + "type": "boolean" + }, + "reactions": { + "items": { + "$ref": "#/definitions/Reaction" + }, + "type": "array" + }, + "recover": { + "description": "Recovers a given entity in the database.", + "type": "object" + }, + "reload": { + "description": "Reloads entity data from the database.", + "type": "object" + }, + "remove": { + "description": "Removes current entity from the database.", + "type": "object" + }, + "save": { + "description": "Saves current entity in the database.\nIf entity does not exist in the database then inserts, otherwise updates.", + "type": "object" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "softRemove": { + "description": "Records the delete date of current entity.", + "type": "object" + }, + "stickers": { + "items": { + }, + "type": "array" + }, + "timestamp": { + "format": "date-time", + "type": "string" + }, + "toJSON": { + "type": "object" + }, + "tts": { + "type": "boolean" + }, + "type": { + "$ref": "#/definitions/MessageType" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + }, + "validate": { + "type": "object" + }, + "webhook": { + "$ref": "#/definitions/Webhook" + }, + "webhook_id": { + "type": "string" + } + }, + "type": "object" + }, + "Omit<Relationship,\"nickname\">": { + "properties": { + "assign": { + "type": "object" + }, + "hasId": { + "description": "Checks if entity has an id.\nIf entity composite compose ids, it will check them all.", + "type": "object" + }, + "id": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "recover": { + "description": "Recovers a given entity in the database.", + "type": "object" + }, + "reload": { + "description": "Reloads entity data from the database.", + "type": "object" + }, + "remove": { + "description": "Removes current entity from the database.", + "type": "object" + }, + "save": { + "description": "Saves current entity in the database.\nIf entity does not exist in the database then inserts, otherwise updates.", + "type": "object" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "softRemove": { + "description": "Records the delete date of current entity.", + "type": "object" + }, + "toJSON": { + "type": "object" + }, + "type": { + "$ref": "#/definitions/RelationshipType" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + }, + "user": { + "$ref": "#/definitions/User" + }, + "user_id": { + "type": "string" + }, + "validate": { + "type": "object" + } + }, + "type": "object" + }, + "OracleConnectionCredentialsOptions": { + "description": "Oracle specific connection credential options.", + "properties": { + "connectString": { + "description": "Embedded TNS Connection String", + "type": "string" + }, + "database": { + "description": "Database name to connect to.", + "type": "string" + }, + "host": { + "description": "Database host.", + "type": "string" + }, + "password": { + "description": "Database password.", + "type": "string" + }, + "port": { + "description": "Database host port.", + "type": "number" + }, + "serviceName": { + "description": "Connection Service Name.", + "type": "string" + }, + "sid": { + "description": "Connection SID.", + "type": "string" + }, + "url": { + "description": "Connection url where perform connection to.", + "type": "string" + }, + "username": { + "description": "Database username.", + "type": "string" + } + }, + "type": "object" + }, + "OracleConnectionOptions": { + "description": "Oracle-specific connection options.", + "properties": { + "cache": { + "anyOf": [ + { + "properties": { + "alwaysEnabled": { + "description": "If set to true then queries (using find methods and QueryBuilder's methods) will always be cached.", + "type": "boolean" + }, + "duration": { + "description": "Time in milliseconds in which cache will expire.\nThis can be setup per-query.\nDefault value is 1000 which is equivalent to 1 second.", + "type": "number" + }, + "ignoreErrors": { + "description": "Used to specify if cache errors should be ignored, and pass through the call to the Database.", + "type": "boolean" + }, + "options": { + "description": "Used to provide redis connection options." + }, + "provider": { + "description": "Factory function for custom cache providers that implement QueryResultCache.", + "type": "object" + }, + "tableName": { + "description": "Configurable table name for \"database\" type cache.\nDefault value is \"query-result-cache\"", + "type": "string" + }, + "type": { + "description": "Type of caching.\n\n- \"database\" means cached values will be stored in the separate table in database. This is default value.\n- \"redis\" means cached values will be stored inside redis. You must provide redis connection options.", + "enum": [ + "database", + "ioredis", + "ioredis/cluster", + "redis" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "type": "boolean" + } + ], + "description": "Allows to setup cache options." + }, + "cli": { + "description": "CLI settings.", + "properties": { + "entitiesDir": { + "description": "Directory where entities should be created by default.", + "type": "string" + }, + "migrationsDir": { + "description": "Directory where migrations should be created by default.", + "type": "string" + }, + "subscribersDir": { + "description": "Directory where subscribers should be created by default.", + "type": "string" + } + }, + "type": "object" + }, + "connectString": { + "description": "Embedded TNS Connection String", + "type": "string" + }, + "database": { + "description": "Database name to connect to.", + "type": "string" + }, + "dropSchema": { + "description": "Drops the schema each time connection is being established.\nBe careful with this option and don't use this in production - otherwise you'll lose all production data.\nThis option is useful during debug and development.", + "type": "boolean" + }, + "entities": { + "description": "Entities to be loaded for this connection.\nAccepts both entity classes and directories where from entities need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "$ref": "#/definitions/EntitySchema<any>" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "entityPrefix": { + "description": "Prefix to use on all tables (collections) of this connection in the database.", + "type": "string" + }, + "entitySkipConstructor": { + "description": "When creating new Entity instances, skip all constructors when true.", + "type": "boolean" + }, + "extra": { + "description": "Extra connection options to be passed to the underlying driver.\n\ntodo: deprecate this and move all database-specific types into hts own connection options object." + }, + "host": { + "description": "Database host.", + "type": "string" + }, + "logger": { + "anyOf": [ + { + "$ref": "#/definitions/Logger" + }, + { + "enum": [ + "advanced-console", + "debug", + "file", + "simple-console" + ], + "type": "string" + } + ], + "description": "Logger instance used to log queries and events in the ORM." + }, + "logging": { + "anyOf": [ + { + "items": { + "enum": [ + "error", + "info", + "log", + "migration", + "query", + "schema", + "warn" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "all", + false, + true + ] + } + ], + "description": "Logging options." + }, + "maxQueryExecutionTime": { + "description": "Maximum number of milliseconds query should be executed before logger log a warning.", + "type": "number" + }, + "migrations": { + "description": "Migrations to be loaded for this connection.\nAccepts both migration classes and directories where from migrations need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "migrationsRun": { + "description": "Indicates if migrations should be auto run on every application launch.\nAlternative to it, you can use CLI and run migrations:run command.", + "type": "boolean" + }, + "migrationsTableName": { + "description": "Migrations table name, in case of different name from \"migrations\".\nAccepts single string name.", + "type": "string" + }, + "migrationsTransactionMode": { + "description": "Transaction mode for migrations to run in", + "enum": [ + "all", + "each", + "none" + ], + "type": "string" + }, + "name": { + "description": "Connection name. If connection name is not given then it will be called \"default\".\nDifferent connections must have different names.", + "type": "string" + }, + "namingStrategy": { + "$ref": "#/definitions/NamingStrategyInterface", + "description": "Naming strategy to be used to name tables and columns in the database." + }, + "password": { + "description": "Database password.", + "type": "string" + }, + "port": { + "description": "Database host port.", + "type": "number" + }, + "replication": { + "description": "Replication setup.", + "properties": { + "master": { + "$ref": "#/definitions/OracleConnectionCredentialsOptions", + "description": "Master server used by orm to perform writes." + }, + "slaves": { + "description": "List of read-from severs (slaves).", + "items": { + "$ref": "#/definitions/OracleConnectionCredentialsOptions" + }, + "type": "array" + } + }, + "type": "object" + }, + "schema": { + "description": "Schema name. By default is \"public\".", + "type": "string" + }, + "serviceName": { + "description": "Connection Service Name.", + "type": "string" + }, + "sid": { + "description": "Connection SID.", + "type": "string" + }, + "subscribers": { + "description": "Subscribers to be loaded for this connection.\nAccepts both subscriber classes and directories where from subscribers need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "synchronize": { + "description": "Indicates if database schema should be auto created on every application launch.\nBe careful with this option and don't use this in production - otherwise you can lose production data.\nThis option is useful during debug and development.\nAlternative to it, you can use CLI and run schema:sync command.\n\nNote that for MongoDB database it does not create schema, because MongoDB is schemaless.\nInstead, it syncs just by creating indices.", + "type": "boolean" + }, + "type": { + "description": "Database type.", + "enum": [ + "oracle" + ], + "type": "string" + }, + "url": { + "description": "Connection url where perform connection to.", + "type": "string" + }, + "useUTC": { + "description": "A boolean determining whether to pass time values in UTC or local time. (default: true).", + "type": "boolean" + }, + "username": { + "description": "Database username.", + "type": "string" + } + }, + "type": "object" + }, + "PartialEmoji": { + "properties": { + "animated": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "PermissionCache": { + "properties": { + "channel": { + "anyOf": [ + { + "$ref": "#/definitions/Channel" + }, + { + "type": "null" + } + ] + }, + "guild": { + "anyOf": [ + { + "$ref": "#/definitions/Guild" + }, + { + "type": "null" + } + ] + }, + "member": { + "anyOf": [ + { + "$ref": "#/definitions/Member" + }, + { + "type": "null" + } + ] + }, + "roles": { + "anyOf": [ + { + "items": { + "$ref": "#/definitions/Role" + }, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "PermissionResolvable": { + "anyOf": [ + { + "$ref": "#/definitions/Permissions" + }, + { + "items": { + "$ref": "#/definitions/PermissionResolvable" + }, + "type": "array" + }, + { + "enum": [ + "ADD_REACTIONS", + "ADMINISTRATOR", + "ATTACH_FILES", + "BAN_MEMBERS", + "CHANGE_NICKNAME", + "CONNECT", + "CREATE_INSTANT_INVITE", + "DEAFEN_MEMBERS", + "EMBED_LINKS", + "KICK_MEMBERS", + "MANAGE_CHANNELS", + "MANAGE_EMOJIS_AND_STICKERS", + "MANAGE_GUILD", + "MANAGE_MESSAGES", + "MANAGE_NICKNAMES", + "MANAGE_ROLES", + "MANAGE_WEBHOOKS", + "MENTION_EVERYONE", + "MOVE_MEMBERS", + "MUTE_MEMBERS", + "PRIORITY_SPEAKER", + "READ_MESSAGE_HISTORY", + "SEND_MESSAGES", + "SEND_TTS_MESSAGES", + "SPEAK", + "STREAM", + "USE_EXTERNAL_EMOJIS", + "USE_VAD", + "VIEW_AUDIT_LOG", + "VIEW_CHANNEL", + "VIEW_GUILD_INSIGHTS" + ], + "type": "string" + }, + { + "type": [ + "number", + "bigint" + ] + } + ] + }, + "PermissionString": { + "enum": [ + "ADD_REACTIONS", + "ADMINISTRATOR", + "ATTACH_FILES", + "BAN_MEMBERS", + "CHANGE_NICKNAME", + "CONNECT", + "CREATE_INSTANT_INVITE", + "DEAFEN_MEMBERS", + "EMBED_LINKS", + "KICK_MEMBERS", + "MANAGE_CHANNELS", + "MANAGE_EMOJIS_AND_STICKERS", + "MANAGE_GUILD", + "MANAGE_MESSAGES", + "MANAGE_NICKNAMES", + "MANAGE_ROLES", + "MANAGE_WEBHOOKS", + "MENTION_EVERYONE", + "MOVE_MEMBERS", + "MUTE_MEMBERS", + "PRIORITY_SPEAKER", + "READ_MESSAGE_HISTORY", + "SEND_MESSAGES", + "SEND_TTS_MESSAGES", + "SPEAK", + "STREAM", + "USE_EXTERNAL_EMOJIS", + "USE_VAD", + "VIEW_AUDIT_LOG", + "VIEW_CHANNEL", + "VIEW_GUILD_INSIGHTS" + ], + "type": "string" + }, + "Permissions": { + "properties": { + "bitfield": { + "type": "bigint" + }, + "cache": { + "properties": { + "channel": { + "anyOf": [ + { + "$ref": "#/definitions/Channel" + }, + { + "type": "null" + } + ] + }, + "guild": { + "anyOf": [ + { + "$ref": "#/definitions/Guild" + }, + { + "type": "null" + } + ] + }, + "member": { + "anyOf": [ + { + "$ref": "#/definitions/Member" + }, + { + "type": "null" + } + ] + }, + "roles": { + "anyOf": [ + { + "items": { + "$ref": "#/definitions/Role" + }, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "PlainObjectToNewEntityTransformer": { + "description": "Transforms plain old javascript object\nEntity is constructed based on its entity metadata.", + "properties": { + "groupAndTransform": { + "description": "Since db returns a duplicated rows of the data where accuracies of the same object can be duplicated\nwe need to group our result and we must have some unique id (primary key in our case)" + } + }, + "type": "object" + }, + "PostgresConnectionCredentialsOptions": { + "description": "Postgres specific connection credential options.", + "properties": { + "database": { + "description": "Database name to connect to.", + "type": "string" + }, + "host": { + "description": "Database host.", + "type": "string" + }, + "password": { + "description": "Database password.", + "type": [ + "string", + "object" + ] + }, + "port": { + "description": "Database host port.", + "type": "number" + }, + "ssl": { + "anyOf": [ + { + "$ref": "#/definitions/TlsOptions" + }, + { + "type": "boolean" + } + ], + "description": "Object with ssl parameters" + }, + "url": { + "description": "Connection url where perform connection to.", + "type": "string" + }, + "username": { + "description": "Database username.", + "type": "string" + } + }, + "type": "object" + }, + "PostgresConnectionOptions": { + "description": "Postgres-specific connection options.", + "properties": { + "applicationName": { + "description": "sets the application_name var to help db administrators identify\nthe service using this connection. Defaults to 'undefined'", + "type": "string" + }, + "cache": { + "anyOf": [ + { + "properties": { + "alwaysEnabled": { + "description": "If set to true then queries (using find methods and QueryBuilder's methods) will always be cached.", + "type": "boolean" + }, + "duration": { + "description": "Time in milliseconds in which cache will expire.\nThis can be setup per-query.\nDefault value is 1000 which is equivalent to 1 second.", + "type": "number" + }, + "ignoreErrors": { + "description": "Used to specify if cache errors should be ignored, and pass through the call to the Database.", + "type": "boolean" + }, + "options": { + "description": "Used to provide redis connection options." + }, + "provider": { + "description": "Factory function for custom cache providers that implement QueryResultCache.", + "type": "object" + }, + "tableName": { + "description": "Configurable table name for \"database\" type cache.\nDefault value is \"query-result-cache\"", + "type": "string" + }, + "type": { + "description": "Type of caching.\n\n- \"database\" means cached values will be stored in the separate table in database. This is default value.\n- \"redis\" means cached values will be stored inside redis. You must provide redis connection options.", + "enum": [ + "database", + "ioredis", + "ioredis/cluster", + "redis" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "type": "boolean" + } + ], + "description": "Allows to setup cache options." + }, + "cli": { + "description": "CLI settings.", + "properties": { + "entitiesDir": { + "description": "Directory where entities should be created by default.", + "type": "string" + }, + "migrationsDir": { + "description": "Directory where migrations should be created by default.", + "type": "string" + }, + "subscribersDir": { + "description": "Directory where subscribers should be created by default.", + "type": "string" + } + }, + "type": "object" + }, + "connectTimeoutMS": { + "description": "The milliseconds before a timeout occurs during the initial connection to the postgres\nserver. If undefined, or set to 0, there is no timeout. Defaults to undefined.", + "type": "number" + }, + "database": { + "description": "Database name to connect to.", + "type": "string" + }, + "dropSchema": { + "description": "Drops the schema each time connection is being established.\nBe careful with this option and don't use this in production - otherwise you'll lose all production data.\nThis option is useful during debug and development.", + "type": "boolean" + }, + "entities": { + "description": "Entities to be loaded for this connection.\nAccepts both entity classes and directories where from entities need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "$ref": "#/definitions/EntitySchema<any>" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "entityPrefix": { + "description": "Prefix to use on all tables (collections) of this connection in the database.", + "type": "string" + }, + "entitySkipConstructor": { + "description": "When creating new Entity instances, skip all constructors when true.", + "type": "boolean" + }, + "extra": { + "description": "Extra connection options to be passed to the underlying driver.\n\ntodo: deprecate this and move all database-specific types into hts own connection options object." + }, + "host": { + "description": "Database host.", + "type": "string" + }, + "installExtensions": { + "description": "Automatically install postgres extensions", + "type": "boolean" + }, + "logNotifications": { + "description": "Include notification messages from Postgres server in client logs", + "type": "boolean" + }, + "logger": { + "anyOf": [ + { + "$ref": "#/definitions/Logger" + }, + { + "enum": [ + "advanced-console", + "debug", + "file", + "simple-console" + ], + "type": "string" + } + ], + "description": "Logger instance used to log queries and events in the ORM." + }, + "logging": { + "anyOf": [ + { + "items": { + "enum": [ + "error", + "info", + "log", + "migration", + "query", + "schema", + "warn" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "all", + false, + true + ] + } + ], + "description": "Logging options." + }, + "maxQueryExecutionTime": { + "description": "Maximum number of milliseconds query should be executed before logger log a warning.", + "type": "number" + }, + "migrations": { + "description": "Migrations to be loaded for this connection.\nAccepts both migration classes and directories where from migrations need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "migrationsRun": { + "description": "Indicates if migrations should be auto run on every application launch.\nAlternative to it, you can use CLI and run migrations:run command.", + "type": "boolean" + }, + "migrationsTableName": { + "description": "Migrations table name, in case of different name from \"migrations\".\nAccepts single string name.", + "type": "string" + }, + "migrationsTransactionMode": { + "description": "Transaction mode for migrations to run in", + "enum": [ + "all", + "each", + "none" + ], + "type": "string" + }, + "name": { + "description": "Connection name. If connection name is not given then it will be called \"default\".\nDifferent connections must have different names.", + "type": "string" + }, + "namingStrategy": { + "$ref": "#/definitions/NamingStrategyInterface", + "description": "Naming strategy to be used to name tables and columns in the database." + }, + "password": { + "description": "Database password.", + "type": [ + "string", + "object" + ] + }, + "poolErrorHandler": { + "type": "object" + }, + "port": { + "description": "Database host port.", + "type": "number" + }, + "replication": { + "description": "Replication setup.", + "properties": { + "master": { + "$ref": "#/definitions/PostgresConnectionCredentialsOptions", + "description": "Master server used by orm to perform writes." + }, + "slaves": { + "description": "List of read-from severs (slaves).", + "items": { + "$ref": "#/definitions/PostgresConnectionCredentialsOptions" + }, + "type": "array" + } + }, + "type": "object" + }, + "schema": { + "description": "Schema name.", + "type": "string" + }, + "ssl": { + "anyOf": [ + { + "$ref": "#/definitions/TlsOptions" + }, + { + "type": "boolean" + } + ], + "description": "Object with ssl parameters" + }, + "subscribers": { + "description": "Subscribers to be loaded for this connection.\nAccepts both subscriber classes and directories where from subscribers need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "synchronize": { + "description": "Indicates if database schema should be auto created on every application launch.\nBe careful with this option and don't use this in production - otherwise you can lose production data.\nThis option is useful during debug and development.\nAlternative to it, you can use CLI and run schema:sync command.\n\nNote that for MongoDB database it does not create schema, because MongoDB is schemaless.\nInstead, it syncs just by creating indices.", + "type": "boolean" + }, + "type": { + "description": "Database type.", + "enum": [ + "postgres" + ], + "type": "string" + }, + "url": { + "description": "Connection url where perform connection to.", + "type": "string" + }, + "useUTC": { + "description": "A boolean determining whether to pass time values in UTC or local time. (default: true).", + "type": "boolean" + }, + "username": { + "description": "Database username.", + "type": "string" + }, + "uuidExtension": { + "description": "The Postgres extension to use to generate UUID columns. Defaults to uuid-ossp.\nIf pgcrypto is selected, TypeORM will use the gen_random_uuid() function from this extension.\nIf uuid-ossp is selected, TypeORM will use the uuid_generate_v4() function from this extension.", + "enum": [ + "pgcrypto", + "uuid-ossp" + ], + "type": "string" + } + }, + "type": "object" + }, + "Presence": { + "properties": { + "activities": { + "items": { + "$ref": "#/definitions/Activity" + }, + "type": "array" + }, + "client_status": { + "$ref": "#/definitions/ClientStatus" + }, + "guild_id": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/Status" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "type": "object" + }, + "PresenceUpdateEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "$ref": "#/definitions/Presence" + }, + "event": { + "enum": [ + "PRESENCE_UPDATE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "PublicMember": { + "properties": { + "assign": { + "type": "object" + }, + "deaf": { + "type": "boolean" + }, + "guild": { + "$ref": "#/definitions/Guild" + }, + "guild_id": { + "type": "string" + }, + "hasId": { + "description": "Checks if entity has an id.\nIf entity composite compose ids, it will check them all.", + "type": "object" + }, + "joined_at": { + "format": "date-time", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "mute": { + "type": "boolean" + }, + "nick": { + "type": "string" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "pending": { + "type": "boolean" + }, + "premium_since": { + "type": "number" + }, + "recover": { + "description": "Recovers a given entity in the database.", + "type": "object" + }, + "reload": { + "description": "Reloads entity data from the database.", + "type": "object" + }, + "remove": { + "description": "Removes current entity from the database.", + "type": "object" + }, + "roles": { + "items": { + "type": "string" + }, + "type": "array" + }, + "save": { + "description": "Saves current entity in the database.\nIf entity does not exist in the database then inserts, otherwise updates.", + "type": "object" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "softRemove": { + "description": "Records the delete date of current entity.", + "type": "object" + }, + "toJSON": { + "type": "object" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + }, + "user": { + "$ref": "#/definitions/PublicUser" + }, + "user_id": { + "type": "string" + }, + "validate": { + "type": "object" + } + }, + "type": "object" + }, + "PublicUser": { + "properties": { + "accent_color": { + "type": "number" + }, + "avatar": { + "type": [ + "null", + "string" + ] + }, + "banner": { + "type": [ + "null", + "string" + ] + }, + "bot": { + "type": "boolean" + }, + "discriminator": { + "type": "string" + }, + "id": { + "type": "string" + }, + "public_flags": { + "type": "bigint" + }, + "username": { + "type": "string" + } + }, + "type": "object" + }, + "PxfObject": { + "properties": { + "buf": { + "anyOf": [ + { + "description": "Raw data is stored in instances of the Buffer class.\nA Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.\nValid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "PFX or PKCS12 encoded private key and certificate chain." + }, + "passphrase": { + "description": "Optional passphrase.", + "type": "string" + } + }, + "type": "object" + }, + "QueryResultCache": { + "description": "Implementations of this interface provide different strategies to cache query builder results.", + "type": "object" + }, + "QueryRunner": { + "description": "Runs queries on a single database connection.", + "properties": { + "broadcaster": { + "$ref": "#/definitions/Broadcaster", + "description": "Broadcaster used on this query runner to broadcast entity events." + }, + "connection": { + "$ref": "#/definitions/Connection", + "description": "Connection used by this query runner." + }, + "data": { + "$ref": "#/definitions/ObjectLiteral", + "description": "Stores temporarily user data.\nUseful for sharing data with subscribers." + }, + "isReleased": { + "description": "Indicates if connection for this query runner is released.\nOnce its released, query runner cannot run queries anymore.", + "type": "boolean" + }, + "isTransactionActive": { + "description": "Indicates if transaction is in progress.", + "type": "boolean" + }, + "loadedTables": { + "description": "All synchronized tables in the database.", + "items": { + "$ref": "#/definitions/Table" + }, + "type": "array" + }, + "loadedViews": { + "description": "All synchronized views in the database.", + "items": { + "$ref": "#/definitions/View" + }, + "type": "array" + }, + "manager": { + "$ref": "#/definitions/EntityManager", + "description": "Entity manager working only with this query runner." + } + }, + "type": "object" + }, + "RateLimit": { + "properties": { + "blocked": { + "type": "boolean" + }, + "expires_at": { + "format": "date-time", + "type": "string" + }, + "hits": { + "type": "number" + }, + "id": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + }, + "user": { + "$ref": "#/definitions/User" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "ReactNativeConnectionOptions": { + "description": "Sqlite-specific connection options.", + "properties": { + "cache": { + "anyOf": [ + { + "properties": { + "alwaysEnabled": { + "description": "If set to true then queries (using find methods and QueryBuilder's methods) will always be cached.", + "type": "boolean" + }, + "duration": { + "description": "Time in milliseconds in which cache will expire.\nThis can be setup per-query.\nDefault value is 1000 which is equivalent to 1 second.", + "type": "number" + }, + "ignoreErrors": { + "description": "Used to specify if cache errors should be ignored, and pass through the call to the Database.", + "type": "boolean" + }, + "options": { + "description": "Used to provide redis connection options." + }, + "provider": { + "description": "Factory function for custom cache providers that implement QueryResultCache.", + "type": "object" + }, + "tableName": { + "description": "Configurable table name for \"database\" type cache.\nDefault value is \"query-result-cache\"", + "type": "string" + }, + "type": { + "description": "Type of caching.\n\n- \"database\" means cached values will be stored in the separate table in database. This is default value.\n- \"redis\" means cached values will be stored inside redis. You must provide redis connection options.", + "enum": [ + "database", + "ioredis", + "ioredis/cluster", + "redis" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "type": "boolean" + } + ], + "description": "Allows to setup cache options." + }, + "cli": { + "description": "CLI settings.", + "properties": { + "entitiesDir": { + "description": "Directory where entities should be created by default.", + "type": "string" + }, + "migrationsDir": { + "description": "Directory where migrations should be created by default.", + "type": "string" + }, + "subscribersDir": { + "description": "Directory where subscribers should be created by default.", + "type": "string" + } + }, + "type": "object" + }, + "database": { + "description": "Database name.", + "type": "string" + }, + "dropSchema": { + "description": "Drops the schema each time connection is being established.\nBe careful with this option and don't use this in production - otherwise you'll lose all production data.\nThis option is useful during debug and development.", + "type": "boolean" + }, + "entities": { + "description": "Entities to be loaded for this connection.\nAccepts both entity classes and directories where from entities need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "$ref": "#/definitions/EntitySchema<any>" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "entityPrefix": { + "description": "Prefix to use on all tables (collections) of this connection in the database.", + "type": "string" + }, + "entitySkipConstructor": { + "description": "When creating new Entity instances, skip all constructors when true.", + "type": "boolean" + }, + "extra": { + "description": "Extra connection options to be passed to the underlying driver.\n\ntodo: deprecate this and move all database-specific types into hts own connection options object." + }, + "location": { + "description": "Storage Location", + "type": "string" + }, + "logger": { + "anyOf": [ + { + "$ref": "#/definitions/Logger" + }, + { + "enum": [ + "advanced-console", + "debug", + "file", + "simple-console" + ], + "type": "string" + } + ], + "description": "Logger instance used to log queries and events in the ORM." + }, + "logging": { + "anyOf": [ + { + "items": { + "enum": [ + "error", + "info", + "log", + "migration", + "query", + "schema", + "warn" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "all", + false, + true + ] + } + ], + "description": "Logging options." + }, + "maxQueryExecutionTime": { + "description": "Maximum number of milliseconds query should be executed before logger log a warning.", + "type": "number" + }, + "migrations": { + "description": "Migrations to be loaded for this connection.\nAccepts both migration classes and directories where from migrations need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "migrationsRun": { + "description": "Indicates if migrations should be auto run on every application launch.\nAlternative to it, you can use CLI and run migrations:run command.", + "type": "boolean" + }, + "migrationsTableName": { + "description": "Migrations table name, in case of different name from \"migrations\".\nAccepts single string name.", + "type": "string" + }, + "migrationsTransactionMode": { + "description": "Transaction mode for migrations to run in", + "enum": [ + "all", + "each", + "none" + ], + "type": "string" + }, + "name": { + "description": "Connection name. If connection name is not given then it will be called \"default\".\nDifferent connections must have different names.", + "type": "string" + }, + "namingStrategy": { + "$ref": "#/definitions/NamingStrategyInterface", + "description": "Naming strategy to be used to name tables and columns in the database." + }, + "subscribers": { + "description": "Subscribers to be loaded for this connection.\nAccepts both subscriber classes and directories where from subscribers need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "synchronize": { + "description": "Indicates if database schema should be auto created on every application launch.\nBe careful with this option and don't use this in production - otherwise you can lose production data.\nThis option is useful during debug and development.\nAlternative to it, you can use CLI and run schema:sync command.\n\nNote that for MongoDB database it does not create schema, because MongoDB is schemaless.\nInstead, it syncs just by creating indices.", + "type": "boolean" + }, + "type": { + "description": "Database type.", + "enum": [ + "react-native" + ], + "type": "string" + } + }, + "type": "object" + }, + "Reaction": { + "properties": { + "count": { + "type": "number" + }, + "emoji": { + "$ref": "#/definitions/PartialEmoji" + }, + "user_ids": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ReadPreference": { + "description": "Creates a new ReadPreference instance.", + "properties": { + "mode": { + "description": "The ReadPreference mode as listed above.", + "type": "string" + }, + "tags": { + "description": "An object representing read preference tags." + } + }, + "type": "object" + }, + "ReadState": { + "properties": { + "channel": { + "$ref": "#/definitions/Channel" + }, + "channel_id": { + "type": "string" + }, + "id": { + "type": "string" + }, + "last_message": { + "$ref": "#/definitions/Message" + }, + "last_pin_timestamp": { + "format": "date-time", + "type": "string" + }, + "manual": { + "type": "boolean" + }, + "mention_count": { + "type": "number" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + }, + "user": { + "$ref": "#/definitions/User" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "ReadyEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "$ref": "#/definitions/ReadyEventData" + }, + "event": { + "enum": [ + "READY" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "ReadyEventData": { + "properties": { + "analytics_token": { + "type": "string" + }, + "application": { + "properties": { + "flags": { + "type": "bigint" + }, + "id": { + "type": "string" + } + }, + "type": "object" + }, + "connected_accounts": { + "items": { + "$ref": "#/definitions/ConnectedAccount" + }, + "type": "array" + }, + "consents": { + "properties": { + "personalization": { + "properties": { + "consented": { + "type": "boolean" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "country_code": { + "type": "string" + }, + "experiments": { + "items": { + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "maxItems": 5, + "minItems": 5, + "type": "array" + }, + "type": "array" + }, + "friend_suggestion_count": { + "type": "number" + }, + "geo_ordered_rtc_regions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "guild_experiments": { + "items": { + "items": [ + { + "type": "number" + }, + { + "type": "null" + }, + { + "type": "number" + }, + { + "items": [ + { + "items": [ + { + "type": "number" + }, + { + "items": { + "properties": { + "e": { + "type": "number" + }, + "s": { + "type": "number" + } + }, + "type": "object" + }, + "type": "array" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + ], + "maxItems": 1, + "minItems": 1, + "type": "array" + }, + { + "items": [ + { + "type": "number" + }, + { + "items": [ + { + "items": [ + { + "type": "number" + }, + { + "items": [ + { + "type": "number" + }, + { + "type": "number" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + ], + "maxItems": 1, + "minItems": 1, + "type": "array" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + { + "items": { + "properties": { + "b": { + "type": "number" + }, + "k": { + "items": { + "type": "bigint" + }, + "type": "array" + } + }, + "type": "object" + }, + "type": "array" + } + ], + "maxItems": 6, + "minItems": 6, + "type": "array" + }, + "type": "array" + }, + "guild_join_requests": { + "items": { + }, + "type": "array" + }, + "guilds": { + "items": { + "$ref": "#/definitions/Guild" + }, + "type": "array" + }, + "merged_members": { + "items": { + "items": { + "$ref": "#/definitions/Omit<Member,\"settings\"|\"user\">" + }, + "type": "array" + }, + "type": "array" + }, + "private_channels": { + "items": { + "$ref": "#/definitions/Channel" + }, + "type": "array" + }, + "read_state": { + "properties": { + "entries": { + "items": { + }, + "type": "array" + }, + "partial": { + "type": "boolean" + }, + "version": { + "type": "number" + } + }, + "type": "object" + }, + "relationships": { + "items": { + "$ref": "#/definitions/Relationship" + }, + "type": "array" + }, + "session_id": { + "type": "string" + }, + "shard": { + "items": [ + { + "type": "number" + }, + { + "type": "number" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "user": { + "allOf": [ + { + "$ref": "#/definitions/PublicUser" + }, + { + "properties": { + "bot": { + "type": "boolean" + }, + "desktop": { + "type": "boolean" + }, + "email": { + "type": [ + "null", + "string" + ] + }, + "flags": { + "type": "bigint" + }, + "mfa_enabled": { + "type": "boolean" + }, + "mobile": { + "type": "boolean" + }, + "nsfw_allowed": { + "type": "boolean" + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "premium": { + "type": "boolean" + }, + "premium_type": { + "type": "number" + }, + "verified": { + "type": "boolean" + } + }, + "type": "object" + } + ] + }, + "user_guild_settings": { + "properties": { + "entries": { + "items": { + "$ref": "#/definitions/UserGuildSettings" + }, + "type": "array" + }, + "partial": { + "type": "boolean" + }, + "version": { + "type": "number" + } + }, + "type": "object" + }, + "user_settings": { + "$ref": "#/definitions/UserSettings" + }, + "users": { + "items": { + "properties": { + "avatar": { + "type": [ + "null", + "string" + ] + }, + "bot": { + "type": "boolean" + }, + "discriminator": { + "type": "string" + }, + "id": { + "type": "string" + }, + "public_flags": { + "type": "bigint" + }, + "username": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "v": { + "type": "number" + } + }, + "type": "object" + }, + "Record<string,any>": { + "type": "object" + }, + "Record<string,object>": { + "type": "object" + }, + "Record<string,string|null>": { + "type": "object" + }, + "RelationCountMetadata": { + "description": "Contains all information about entity's relation count.", + "properties": { + "alias": { + "description": "Alias of the joined (destination) table.", + "type": "string" + }, + "entityMetadata": { + "$ref": "#/definitions/EntityMetadata", + "description": "Entity metadata where this column metadata is." + }, + "propertyName": { + "description": "Target's property name to which this metadata is applied.", + "type": "string" + }, + "queryBuilderFactory": { + "description": "Extra condition applied to \"ON\" section of join.", + "type": "object" + }, + "relation": { + "$ref": "#/definitions/RelationMetadata", + "description": "Relation which needs to be counted." + }, + "relationNameOrFactory": { + "description": "Relation name which need to count.", + "type": [ + "string", + "object" + ] + }, + "target": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ], + "description": "Target class to which metadata is applied." + } + }, + "type": "object" + }, + "RelationIdMetadata": { + "description": "Contains all information about entity's relation count.", + "properties": { + "alias": { + "description": "Alias of the joined (destination) table.", + "type": "string" + }, + "entityMetadata": { + "$ref": "#/definitions/EntityMetadata", + "description": "Entity metadata where this column metadata is." + }, + "propertyName": { + "description": "Target's property name to which this metadata is applied.", + "type": "string" + }, + "queryBuilderFactory": { + "description": "Extra condition applied to \"ON\" section of join.", + "type": "object" + }, + "relation": { + "$ref": "#/definitions/RelationMetadata", + "description": "Relation from which ids will be extracted." + }, + "relationNameOrFactory": { + "description": "Relation name which need to count.", + "type": [ + "string", + "object" + ] + }, + "target": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ], + "description": "Target class to which metadata is applied." + } + }, + "type": "object" + }, + "RelationLoader": { + "description": "Wraps entities and creates getters/setters for their relations\nto be able to lazily load relations when accessing these relations.", + "properties": { + "connection": { + } + }, + "type": "object" + }, + "RelationMetadata": { + "description": "Contains all information about some entity's relation.", + "properties": { + "createForeignKeyConstraints": { + "description": "Indicates whether foreign key constraints will be created for join columns.\nCan be used only for many-to-one and owner one-to-one relations.\nDefaults to true.", + "type": "boolean" + }, + "deferrable": { + "description": "What to do with a relation on update of the row containing a foreign key.", + "enum": [ + "INITIALLY DEFERRED", + "INITIALLY IMMEDIATE" + ], + "type": "string" + }, + "embeddedMetadata": { + "$ref": "#/definitions/EmbeddedMetadata", + "description": "Embedded metadata where this relation is.\nIf this relation is not in embed then this property value is undefined." + }, + "entityMetadata": { + "$ref": "#/definitions/EntityMetadata", + "description": "Entity metadata of the entity where this relation is placed.\n\nFor example for @ManyToMany(type => Category) in Post, entityMetadata will be metadata of Post entity." + }, + "foreignKeys": { + "description": "Foreign keys created for this relation.", + "items": { + "$ref": "#/definitions/ForeignKeyMetadata" + }, + "type": "array" + }, + "givenInverseSidePropertyFactory": { + "description": "Inverse side of the relation set by user.\n\nInverse side set in the relation can be either string - property name of the column on inverse side,\neither can be a function that accepts a map of properties with the object and returns one of them.\nSecond approach is used to achieve type-safety.", + "type": [ + "string", + "object" + ] + }, + "inverseEntityMetadata": { + "$ref": "#/definitions/EntityMetadata", + "description": "Entity metadata of the entity that is targeted by this relation.\n\nFor example for @ManyToMany(type => Category) in Post, inverseEntityMetadata will be metadata of Category entity." + }, + "inverseJoinColumns": { + "description": "Inverse join table columns.\nInverse join columns are supported only for many-to-many relations\nand can be obtained only from owner side of the relation.\nFrom non-owner side of the relation join columns will be undefined.", + "items": { + "$ref": "#/definitions/ColumnMetadata" + }, + "type": "array" + }, + "inverseRelation": { + "$ref": "#/definitions/RelationMetadata", + "description": "Gets the relation metadata of the inverse side of this relation." + }, + "inverseSidePropertyPath": { + "description": "Gets the property path of the inverse side of the relation.", + "type": "string" + }, + "isCascadeInsert": { + "description": "If set to true then related objects are allowed to be inserted to the database.", + "type": "boolean" + }, + "isCascadeRecover": { + "description": "If set to true then related objects are allowed to be recovered from the database.", + "type": "boolean" + }, + "isCascadeRemove": { + "description": "If set to true then related objects are allowed to be remove from the database.", + "type": "boolean" + }, + "isCascadeSoftRemove": { + "description": "If set to true then related objects are allowed to be soft-removed from the database.", + "type": "boolean" + }, + "isCascadeUpdate": { + "description": "If set to true then related objects are allowed to be updated in the database.", + "type": "boolean" + }, + "isEager": { + "description": "Indicates if this relation is eagerly loaded.", + "type": "boolean" + }, + "isLazy": { + "description": "Indicates if this relation is lazily loaded.", + "type": "boolean" + }, + "isManyToMany": { + "description": "Checks if this relation's type is \"many-to-many\".", + "type": "boolean" + }, + "isManyToManyNotOwner": { + "description": "Checks if this relation's type is \"many-to-many\", and is NOT owner side of the relationship.\nNot owner side means this side of relation does not have a join table.", + "type": "boolean" + }, + "isManyToManyOwner": { + "description": "Checks if this relation's type is \"many-to-many\", and is owner side of the relationship.\nOwner side means this side of relation has a join table.", + "type": "boolean" + }, + "isManyToOne": { + "description": "Checks if this relation's type is \"many-to-one\".", + "type": "boolean" + }, + "isNullable": { + "description": "Indicates if relation column value can be nullable or not.", + "type": "boolean" + }, + "isOneToMany": { + "description": "Checks if this relation's type is \"one-to-many\".", + "type": "boolean" + }, + "isOneToOne": { + "description": "Checks if this relation's type is \"one-to-one\".", + "type": "boolean" + }, + "isOneToOneNotOwner": { + "description": "Checks if this relation is NOT owner side of the \"one-to-one\" relation.\nNOT owner side means this side of relation does not have a join column in the table.", + "type": "boolean" + }, + "isOneToOneOwner": { + "description": "Checks if this relation is owner side of the \"one-to-one\" relation.\nOwner side means this side of relation has a join column in the table.", + "type": "boolean" + }, + "isOwning": { + "description": "Indicates if this side is an owner of this relation.", + "type": "boolean" + }, + "isPrimary": { + "description": "Indicates if this relation's column is a primary key.\nCan be used only for many-to-one and owner one-to-one relations.", + "type": "boolean" + }, + "isTreeChildren": { + "description": "Indicates if this is a children (can be only one-to-many relation) relation in the tree tables.", + "type": "boolean" + }, + "isTreeParent": { + "description": "Indicates if this is a parent (can be only many-to-one relation) relation in the tree tables.", + "type": "boolean" + }, + "isWithJoinColumn": { + "description": "Checks if this relation has a join column (e.g. is it many-to-one or one-to-one owner side).", + "type": "boolean" + }, + "joinColumns": { + "description": "Join table columns.\nJoin columns can be obtained only from owner side of the relation.\nFrom non-owner side of the relation join columns will be empty.\nIf this relation is a many-to-one/one-to-one then it takes join columns from the current entity.\nIf this relation is many-to-many then it takes all owner join columns from the junction entity.", + "items": { + "$ref": "#/definitions/ColumnMetadata" + }, + "type": "array" + }, + "joinTableName": { + "description": "Join table name.", + "type": "string" + }, + "junctionEntityMetadata": { + "$ref": "#/definitions/EntityMetadata", + "description": "Entity metadata of the junction table.\nJunction tables have their own entity metadata objects.\nDefined only for many-to-many relations." + }, + "onDelete": { + "description": "What to do with a relation on deletion of the row containing a foreign key.", + "enum": [ + "CASCADE", + "DEFAULT", + "NO ACTION", + "RESTRICT", + "SET NULL" + ], + "type": "string" + }, + "onUpdate": { + "description": "What to do with a relation on update of the row containing a foreign key.", + "enum": [ + "CASCADE", + "DEFAULT", + "NO ACTION", + "RESTRICT", + "SET NULL" + ], + "type": "string" + }, + "orphanedRowAction": { + "description": "When a child row is removed from its parent, determines if the child row should be orphaned (default) or deleted.", + "enum": [ + "delete", + "nullify" + ], + "type": "string" + }, + "persistenceEnabled": { + "description": "Indicates if persistence is enabled for the relation.\nBy default its enabled, but if you want to avoid any changes in the relation to be reflected in the database you can disable it.\nIf its disabled you can only change a relation from inverse side of a relation or using relation query builder functionality.\nThis is useful for performance optimization since its disabling avoid multiple extra queries during entity save.", + "type": "boolean" + }, + "propertyName": { + "description": "Target's property name to which relation decorator is applied.", + "type": "string" + }, + "propertyPath": { + "description": "Gets full path to this column property (including relation name).\nFull path is relevant when column is used in embeds (one or multiple nested).\nFor example it will return \"counters.subcounters.likes\".\nIf property is not in embeds then it returns just property name of the column.", + "type": "string" + }, + "relationType": { + "$ref": "#/definitions/RelationType", + "description": "Relation type, e.g. is it one-to-one, one-to-many, many-to-one or many-to-many." + }, + "target": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ], + "description": "Target entity to which this relation is applied.\nTarget IS NOT equal to entityMetadata.target, because relation\n\nFor example for @ManyToMany(type => Category) in Post, target will be Post.\nIf @ManyToMany(type => Category) is in Counters which is embedded into Post, target will be Counters.\nIf @ManyToMany(type => Category) is in abstract class BaseUser which Post extends, target will be BaseUser.\nTarget can be string if its defined in entity schema instead of class." + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ], + "description": "Gets the property's type to which this relation is applied.\n\nFor example for @ManyToMany(type => Category) in Post, target will be Category." + } + }, + "type": "object" + }, + "RelationType": { + "description": "All types that relation can be.", + "enum": [ + "many-to-many", + "many-to-one", + "one-to-many", + "one-to-one" + ], + "type": "string" + }, + "Relationship": { + "properties": { + "id": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "nickname": { + "type": "string" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "type": { + "$ref": "#/definitions/RelationshipType" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + }, + "user": { + "$ref": "#/definitions/User" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "RelationshipAddEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "allOf": [ + { + "$ref": "#/definitions/Relationship" + }, + { + "properties": { + "should_notify": { + "type": "boolean" + }, + "user": { + "$ref": "#/definitions/PublicUser" + } + }, + "type": "object" + } + ] + }, + "event": { + "enum": [ + "RELATIONSHIP_ADD" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "RelationshipRemoveEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "$ref": "#/definitions/Omit<Relationship,\"nickname\">" + }, + "event": { + "enum": [ + "RELATIONSHIP_REMOVE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "RelationshipType": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "number" + }, + "Repository<any>": { + "description": "Repository is supposed to work with your entity objects. Find entities, insert, update, delete, etc.", + "properties": { + "manager": { + "$ref": "#/definitions/EntityManager", + "description": "Entity Manager used by this repository." + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata", + "description": "Entity metadata of the entity current repository manages." + }, + "queryRunner": { + "$ref": "#/definitions/QueryRunner", + "description": "Query runner provider used for this repository." + }, + "target": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ], + "description": "Returns object that is managed by this repository.\nIf this repository manages entity from schema,\nthen it returns a name of that schema instead." + } + }, + "type": "object" + }, + "Role": { + "properties": { + "color": { + "type": "number" + }, + "guild": { + "$ref": "#/definitions/Guild" + }, + "guild_id": { + "type": "string" + }, + "hoist": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "managed": { + "type": "boolean" + }, + "mentionable": { + "type": "boolean" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "name": { + "type": "string" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "permissions": { + "type": "bigint" + }, + "position": { + "type": "number" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "tags": { + "properties": { + "bot_id": { + "type": "string" + }, + "integration_id": { + "type": "string" + }, + "premium_subscriber": { + "type": "boolean" + } + }, + "type": "object" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + } + }, + "type": "object" + }, + "SapConnectionOptions": { + "description": "SAP Hana specific connection options.", + "properties": { + "ca": { + "description": "Ca for encrypted connection", + "type": "string" + }, + "cache": { + "anyOf": [ + { + "properties": { + "alwaysEnabled": { + "description": "If set to true then queries (using find methods and QueryBuilder's methods) will always be cached.", + "type": "boolean" + }, + "duration": { + "description": "Time in milliseconds in which cache will expire.\nThis can be setup per-query.\nDefault value is 1000 which is equivalent to 1 second.", + "type": "number" + }, + "ignoreErrors": { + "description": "Used to specify if cache errors should be ignored, and pass through the call to the Database.", + "type": "boolean" + }, + "options": { + "description": "Used to provide redis connection options." + }, + "provider": { + "description": "Factory function for custom cache providers that implement QueryResultCache.", + "type": "object" + }, + "tableName": { + "description": "Configurable table name for \"database\" type cache.\nDefault value is \"query-result-cache\"", + "type": "string" + }, + "type": { + "description": "Type of caching.\n\n- \"database\" means cached values will be stored in the separate table in database. This is default value.\n- \"redis\" means cached values will be stored inside redis. You must provide redis connection options.", + "enum": [ + "database", + "ioredis", + "ioredis/cluster", + "redis" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "type": "boolean" + } + ], + "description": "Allows to setup cache options." + }, + "cert": { + "description": "Cert for encrypted connection", + "type": "string" + }, + "cli": { + "description": "CLI settings.", + "properties": { + "entitiesDir": { + "description": "Directory where entities should be created by default.", + "type": "string" + }, + "migrationsDir": { + "description": "Directory where migrations should be created by default.", + "type": "string" + }, + "subscribersDir": { + "description": "Directory where subscribers should be created by default.", + "type": "string" + } + }, + "type": "object" + }, + "database": { + "description": "Database name to connect to.", + "type": "string" + }, + "dropSchema": { + "description": "Drops the schema each time connection is being established.\nBe careful with this option and don't use this in production - otherwise you'll lose all production data.\nThis option is useful during debug and development.", + "type": "boolean" + }, + "encrypt": { + "description": "Encrypt database connection", + "type": "boolean" + }, + "entities": { + "description": "Entities to be loaded for this connection.\nAccepts both entity classes and directories where from entities need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "$ref": "#/definitions/EntitySchema<any>" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "entityPrefix": { + "description": "Prefix to use on all tables (collections) of this connection in the database.", + "type": "string" + }, + "entitySkipConstructor": { + "description": "When creating new Entity instances, skip all constructors when true.", + "type": "boolean" + }, + "extra": { + "description": "Extra connection options to be passed to the underlying driver.\n\ntodo: deprecate this and move all database-specific types into hts own connection options object." + }, + "host": { + "description": "Database host.", + "type": "string" + }, + "key": { + "description": "Key for encrypted connection", + "type": "string" + }, + "logger": { + "anyOf": [ + { + "$ref": "#/definitions/Logger" + }, + { + "enum": [ + "advanced-console", + "debug", + "file", + "simple-console" + ], + "type": "string" + } + ], + "description": "Logger instance used to log queries and events in the ORM." + }, + "logging": { + "anyOf": [ + { + "items": { + "enum": [ + "error", + "info", + "log", + "migration", + "query", + "schema", + "warn" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "all", + false, + true + ] + } + ], + "description": "Logging options." + }, + "maxQueryExecutionTime": { + "description": "Maximum number of milliseconds query should be executed before logger log a warning.", + "type": "number" + }, + "migrations": { + "description": "Migrations to be loaded for this connection.\nAccepts both migration classes and directories where from migrations need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "migrationsRun": { + "description": "Indicates if migrations should be auto run on every application launch.\nAlternative to it, you can use CLI and run migrations:run command.", + "type": "boolean" + }, + "migrationsTableName": { + "description": "Migrations table name, in case of different name from \"migrations\".\nAccepts single string name.", + "type": "string" + }, + "migrationsTransactionMode": { + "description": "Transaction mode for migrations to run in", + "enum": [ + "all", + "each", + "none" + ], + "type": "string" + }, + "name": { + "description": "Connection name. If connection name is not given then it will be called \"default\".\nDifferent connections must have different names.", + "type": "string" + }, + "namingStrategy": { + "$ref": "#/definitions/NamingStrategyInterface", + "description": "Naming strategy to be used to name tables and columns in the database." + }, + "password": { + "description": "Database password.", + "type": "string" + }, + "pool": { + "description": "Pool options.", + "properties": { + "checkInterval": { + "description": "How often to run resource timeout checks. (default=0, disabled)", + "type": "number" + }, + "idleTimeout": { + "description": "Idle timeout", + "type": "number" + }, + "max": { + "description": "Max number of connections.", + "type": "number" + }, + "maxWaitingRequests": { + "description": "Maximum number of waiting requests allowed. (default=0, no limit).", + "type": "number" + }, + "min": { + "description": "Minimum number of connections.", + "type": "number" + }, + "poolErrorHandler": { + "description": "Function handling errors thrown by drivers pool.\nDefaults to logging error with `warn` level.", + "type": "object" + }, + "requestTimeout": { + "description": "Max milliseconds a request will wait for a resource before timing out. (default=5000)", + "type": "number" + } + }, + "type": "object" + }, + "port": { + "description": "Database host port.", + "type": "number" + }, + "schema": { + "description": "Database schema.", + "type": "string" + }, + "sslValidateCertificate": { + "description": "Validate database certificate", + "type": "boolean" + }, + "subscribers": { + "description": "Subscribers to be loaded for this connection.\nAccepts both subscriber classes and directories where from subscribers need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "synchronize": { + "description": "Indicates if database schema should be auto created on every application launch.\nBe careful with this option and don't use this in production - otherwise you can lose production data.\nThis option is useful during debug and development.\nAlternative to it, you can use CLI and run schema:sync command.\n\nNote that for MongoDB database it does not create schema, because MongoDB is schemaless.\nInstead, it syncs just by creating indices.", + "type": "boolean" + }, + "type": { + "description": "Database type.", + "enum": [ + "sap" + ], + "type": "string" + }, + "username": { + "description": "Database username.", + "type": "string" + } + }, + "type": "object" + }, + "SchemaEnv": { + "properties": { + "$async": { + "type": "boolean" + }, + "baseId": { + "type": "string" + }, + "dynamicAnchors": { + "$ref": "#/definitions/{[x:string]:true|undefined;}_1" + }, + "localRefs": { + "$ref": "#/definitions/LocalRefs" + }, + "meta": { + "type": "boolean" + }, + "parse": { + "type": "object" + }, + "parseName": { + "$ref": "#/definitions/ValueScopeName" + }, + "refs": { + "$ref": "#/definitions/SchemaRefs" + }, + "root": { + "$ref": "#/definitions/SchemaEnv" + }, + "schema": { + "anyOf": [ + { + "$ref": "#/definitions/SchemaObject" + }, + { + "$ref": "#/definitions/AsyncSchema" + }, + { + "type": "boolean" + } + ] + }, + "schemaId": { + "enum": [ + "$id", + "id" + ], + "type": "string" + }, + "schemaPath": { + "type": "string" + }, + "serialize": { + "type": "object" + }, + "serializeName": { + "$ref": "#/definitions/ValueScopeName" + }, + "validate": { + "anyOf": [ + { + "$ref": "#/definitions/ValidateFunction<any>" + }, + { + "$ref": "#/definitions/AsyncValidateFunction<any>" + } + ] + }, + "validateName": { + "$ref": "#/definitions/ValueScopeName" + } + }, + "type": "object" + }, + "SchemaObject": { + "additionalProperties": { + }, + "properties": { + "$async": { + "enum": [ + false + ], + "type": "boolean" + }, + "$id": { + "type": "string" + }, + "$schema": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "type": "object" + }, + "SchemaRefs": { + "type": "object" + }, + "ScopeValueSets": { + "type": "object" + }, + "SecureContext": { + "properties": { + "context": { + } + }, + "type": "object" + }, + "Snowflake": { + "description": "A container for useful snowflake-related methods.", + "type": "object" + }, + "SourceCode": { + "properties": { + "evaluated": { + "anyOf": [ + { + "$ref": "#/definitions/Name" + }, + { + "$ref": "#/definitions/_Code" + } + ] + }, + "scopeValues": { + "$ref": "#/definitions/ScopeValueSets" + }, + "validateCode": { + "type": "string" + }, + "validateName": { + "$ref": "#/definitions/ValueScopeName" + } + }, + "type": "object" + }, + "SqlServerConnectionCredentialsOptions": { + "description": "SqlServer specific connection credential options.", + "properties": { + "authentication": { + "anyOf": [ + { + "$ref": "#/definitions/DefaultAuthentication" + }, + { + "$ref": "#/definitions/AzureActiveDirectoryAccessTokenAuthentication" + }, + { + "$ref": "#/definitions/AzureActiveDirectoryMsiAppServiceAuthentication" + }, + { + "$ref": "#/definitions/AzureActiveDirectoryMsiVmAuthentication" + }, + { + "$ref": "#/definitions/AzureActiveDirectoryPasswordAuthentication" + }, + { + "$ref": "#/definitions/AzureActiveDirectoryServicePrincipalSecret" + }, + { + "$ref": "#/definitions/NtlmAuthentication" + } + ], + "description": "Authentication settings\nIt overrides username and password, when passed." + }, + "database": { + "description": "Database name to connect to.", + "type": "string" + }, + "domain": { + "description": "Once you set domain, driver will connect to SQL Server using domain login.", + "type": "string" + }, + "host": { + "description": "Database host.", + "type": "string" + }, + "password": { + "description": "Database password.", + "type": "string" + }, + "port": { + "description": "Database host port.", + "type": "number" + }, + "url": { + "description": "Connection url where perform connection to.", + "type": "string" + }, + "username": { + "description": "Database username.", + "type": "string" + } + }, + "type": "object" + }, + "SqlServerConnectionOptions": { + "description": "Microsoft Sql Server specific connection options.", + "properties": { + "authentication": { + "anyOf": [ + { + "$ref": "#/definitions/DefaultAuthentication" + }, + { + "$ref": "#/definitions/AzureActiveDirectoryAccessTokenAuthentication" + }, + { + "$ref": "#/definitions/AzureActiveDirectoryMsiAppServiceAuthentication" + }, + { + "$ref": "#/definitions/AzureActiveDirectoryMsiVmAuthentication" + }, + { + "$ref": "#/definitions/AzureActiveDirectoryPasswordAuthentication" + }, + { + "$ref": "#/definitions/AzureActiveDirectoryServicePrincipalSecret" + }, + { + "$ref": "#/definitions/NtlmAuthentication" + } + ], + "description": "Authentication settings\nIt overrides username and password, when passed." + }, + "cache": { + "anyOf": [ + { + "properties": { + "alwaysEnabled": { + "description": "If set to true then queries (using find methods and QueryBuilder's methods) will always be cached.", + "type": "boolean" + }, + "duration": { + "description": "Time in milliseconds in which cache will expire.\nThis can be setup per-query.\nDefault value is 1000 which is equivalent to 1 second.", + "type": "number" + }, + "ignoreErrors": { + "description": "Used to specify if cache errors should be ignored, and pass through the call to the Database.", + "type": "boolean" + }, + "options": { + "description": "Used to provide redis connection options." + }, + "provider": { + "description": "Factory function for custom cache providers that implement QueryResultCache.", + "type": "object" + }, + "tableName": { + "description": "Configurable table name for \"database\" type cache.\nDefault value is \"query-result-cache\"", + "type": "string" + }, + "type": { + "description": "Type of caching.\n\n- \"database\" means cached values will be stored in the separate table in database. This is default value.\n- \"redis\" means cached values will be stored inside redis. You must provide redis connection options.", + "enum": [ + "database", + "ioredis", + "ioredis/cluster", + "redis" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "type": "boolean" + } + ], + "description": "Allows to setup cache options." + }, + "cli": { + "description": "CLI settings.", + "properties": { + "entitiesDir": { + "description": "Directory where entities should be created by default.", + "type": "string" + }, + "migrationsDir": { + "description": "Directory where migrations should be created by default.", + "type": "string" + }, + "subscribersDir": { + "description": "Directory where subscribers should be created by default.", + "type": "string" + } + }, + "type": "object" + }, + "connectionTimeout": { + "description": "Connection timeout in ms (default: 15000).", + "type": "number" + }, + "database": { + "description": "Database name to connect to.", + "type": "string" + }, + "domain": { + "description": "Once you set domain, driver will connect to SQL Server using domain login.", + "type": "string" + }, + "dropSchema": { + "description": "Drops the schema each time connection is being established.\nBe careful with this option and don't use this in production - otherwise you'll lose all production data.\nThis option is useful during debug and development.", + "type": "boolean" + }, + "entities": { + "description": "Entities to be loaded for this connection.\nAccepts both entity classes and directories where from entities need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "$ref": "#/definitions/EntitySchema<any>" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "entityPrefix": { + "description": "Prefix to use on all tables (collections) of this connection in the database.", + "type": "string" + }, + "entitySkipConstructor": { + "description": "When creating new Entity instances, skip all constructors when true.", + "type": "boolean" + }, + "extra": { + "description": "Extra connection options to be passed to the underlying driver.\n\ntodo: deprecate this and move all database-specific types into hts own connection options object." + }, + "host": { + "description": "Database host.", + "type": "string" + }, + "logger": { + "anyOf": [ + { + "$ref": "#/definitions/Logger" + }, + { + "enum": [ + "advanced-console", + "debug", + "file", + "simple-console" + ], + "type": "string" + } + ], + "description": "Logger instance used to log queries and events in the ORM." + }, + "logging": { + "anyOf": [ + { + "items": { + "enum": [ + "error", + "info", + "log", + "migration", + "query", + "schema", + "warn" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "all", + false, + true + ] + } + ], + "description": "Logging options." + }, + "maxQueryExecutionTime": { + "description": "Maximum number of milliseconds query should be executed before logger log a warning.", + "type": "number" + }, + "migrations": { + "description": "Migrations to be loaded for this connection.\nAccepts both migration classes and directories where from migrations need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "migrationsRun": { + "description": "Indicates if migrations should be auto run on every application launch.\nAlternative to it, you can use CLI and run migrations:run command.", + "type": "boolean" + }, + "migrationsTableName": { + "description": "Migrations table name, in case of different name from \"migrations\".\nAccepts single string name.", + "type": "string" + }, + "migrationsTransactionMode": { + "description": "Transaction mode for migrations to run in", + "enum": [ + "all", + "each", + "none" + ], + "type": "string" + }, + "name": { + "description": "Connection name. If connection name is not given then it will be called \"default\".\nDifferent connections must have different names.", + "type": "string" + }, + "namingStrategy": { + "$ref": "#/definitions/NamingStrategyInterface", + "description": "Naming strategy to be used to name tables and columns in the database." + }, + "options": { + "description": "Extra options", + "properties": { + "abortTransactionOnError": { + "description": "A boolean determining whether to rollback a transaction automatically if any error is encountered during\nthe given transaction's execution. This sets the value for SET XACT_ABORT during the initial SQL phase\nof a connection (documentation).", + "type": "boolean" + }, + "camelCaseColumns": { + "description": "A boolean, controlling whether the column names returned will have the first letter converted to lower case\n(true) or not. This value is ignored if you provide a columnNameReplacer. (default: false).", + "type": "boolean" + }, + "cancelTimeout": { + "description": "The number of milliseconds before the cancel (abort) of a request is considered failed (default: 5000).", + "type": "number" + }, + "connectTimeout": { + "description": "The number of milliseconds before the attempt to connect is considered failed (default: 15000).", + "type": "number" + }, + "connectionIsolationLevel": { + "description": "The default isolation level for new connections. All out-of-transaction queries are executed with this\nsetting. The isolation levels are available from require('tedious').ISOLATION_LEVEL .", + "enum": [ + "READ_COMMITTED", + "READ_UNCOMMITTED", + "REPEATABLE_READ", + "SERIALIZABLE", + "SNAPSHOT" + ], + "type": "string" + }, + "cryptoCredentialsDetails": { + "description": "When encryption is used, an object may be supplied that will be used for the first argument when calling\ntls.createSecurePair (default: {})." + }, + "debug": { + "description": "Debug options", + "properties": { + "data": { + "description": "A boolean, controlling whether debug events will be emitted with text describing packet data details\n(default: false).", + "type": "boolean" + }, + "packet": { + "description": "A boolean, controlling whether debug events will be emitted with text describing packet details\n(default: false).", + "type": "boolean" + }, + "payload": { + "description": "A boolean, controlling whether debug events will be emitted with text describing packet payload details\n(default: false).", + "type": "boolean" + }, + "token": { + "description": "A boolean, controlling whether debug events will be emitted with text describing token stream tokens\n(default: false).", + "type": "boolean" + } + }, + "type": "object" + }, + "disableOutputReturning": { + "description": "A boolean, controlling whatever to disable RETURNING / OUTPUT statements.", + "type": "boolean" + }, + "enableAnsiNullDefault": { + "description": "If true, SET ANSI_NULL_DFLT_ON ON will be set in the initial sql. This means new columns will be nullable by\ndefault. See the T-SQL documentation for more details. (Default: true).", + "type": "boolean" + }, + "enableArithAbort": { + "description": "A boolean, that when true will abort a query when an overflow or divide-by-zero error occurs during query execution.", + "type": "boolean" + }, + "encrypt": { + "description": "A boolean determining whether or not the connection will be encrypted. Set to true if you're on\nWindows Azure. (default: false).", + "type": "boolean" + }, + "fallbackToDefaultDb": { + "description": "By default, if the database requestion by options.database cannot be accessed, the connection will fail with\nan error. However, if options.fallbackToDefaultDb is set to true, then the user's default database will\nbe used instead (Default: false).", + "type": "boolean" + }, + "isolation": { + "description": "The default isolation level that transactions will be run with. The isolation levels are available\nfrom require('tedious').ISOLATION_LEVEL. (default: READ_COMMITTED).", + "enum": [ + "READ_COMMITTED", + "READ_UNCOMMITTED", + "REPEATABLE_READ", + "SERIALIZABLE", + "SNAPSHOT" + ], + "type": "string" + }, + "localAddress": { + "description": "A string indicating which network interface (ip address) to use when connecting to SQL Server.", + "type": "string" + }, + "packetSize": { + "description": "The size of TDS packets (subject to negotiation with the server). Should be a power of 2. (default: 4096).", + "type": "number" + }, + "readOnlyIntent": { + "description": "A boolean, determining whether the connection will request read only access from a SQL Server\nAvailability Group. For more information, see here. (default: false).", + "type": "boolean" + }, + "rowCollectionOnDone": { + "description": "A boolean, that when true will expose received rows in Requests' done* events. See done, doneInProc and\ndoneProc. (default: false)\nCaution: If many row are received, enabling this option could result in excessive memory usage.", + "type": "boolean" + }, + "rowCollectionOnRequestCompletion": { + "description": "A boolean, that when true will expose received rows in Requests' completion callback. See new Request. (default: false)\nCaution: If many row are received, enabling this option could result in excessive memory usage.", + "type": "boolean" + }, + "tdsVersion": { + "description": "The version of TDS to use. If server doesn't support specified version, negotiated version is used instead.\nThe versions are available from require('tedious').TDS_VERSION. (default: 7_4).", + "type": "string" + }, + "useColumnNames": { + "description": "A boolean determining whether to return rows as arrays or key-value collections. (default: false).", + "type": "boolean" + }, + "useUTC": { + "description": "A boolean determining whether to pass time values in UTC or local time. (default: true).", + "type": "boolean" + } + }, + "type": "object" + }, + "password": { + "description": "Database password.", + "type": "string" + }, + "pool": { + "description": "An optional object/dictionary with the any of the properties", + "properties": { + "acquireTimeoutMillis": { + "description": "Max milliseconds an acquire call will wait for a resource before timing out. (default no limit), if supplied should non-zero positive integer.", + "type": "number" + }, + "errorHandler": { + "type": "object" + }, + "evictionRunIntervalMillis": { + "description": "How often to run eviction checks. Default: 0 (does not run).", + "type": "number" + }, + "fifo": { + "description": "If true the oldest resources will be first to be allocated. If false the most recently released resources will\nbe the first to be allocated. This in effect turns the pool's behaviour from a queue into a stack. boolean,\n(default true)", + "type": "boolean" + }, + "idleTimeoutMillis": { + "description": "The minimum amount of time that an object may sit idle in the pool before it is eligible for eviction due\nto idle time. Supercedes softIdleTimeoutMillis Default: 30000", + "type": "number" + }, + "max": { + "description": "Maximum number of resources to create at any given time. (default=1)", + "type": "number" + }, + "maxWaitingClients": { + "description": "Maximum number of queued requests allowed, additional acquire calls will be callback with an err in a future\ncycle of the event loop.", + "type": "number" + }, + "min": { + "description": "Minimum number of resources to keep in pool at any given time. If this is set >= max, the pool will silently\nset the min to equal max. (default=0)", + "type": "number" + }, + "numTestsPerRun": { + "description": "Number of resources to check each eviction run. Default: 3.", + "type": "number" + }, + "priorityRange": { + "description": "Int between 1 and x - if set, borrowers can specify their relative priority in the queue if no resources\nare available. see example. (default 1)", + "type": "number" + }, + "softIdleTimeoutMillis": { + "description": "Amount of time an object may sit idle in the pool before it is eligible for eviction by the idle object\nevictor (if any), with the extra condition that at least \"min idle\" object instances remain in the pool.\nDefault -1 (nothing can get evicted)", + "type": "number" + }, + "testOnBorrow": { + "description": "Should the pool validate resources before giving them to clients. Requires that either factory.validate or\nfactory.validateAsync to be specified", + "type": "boolean" + } + }, + "type": "object" + }, + "port": { + "description": "Database host port.", + "type": "number" + }, + "replication": { + "description": "Replication setup.", + "properties": { + "master": { + "$ref": "#/definitions/SqlServerConnectionCredentialsOptions", + "description": "Master server used by orm to perform writes." + }, + "slaves": { + "description": "List of read-from severs (slaves).", + "items": { + "$ref": "#/definitions/SqlServerConnectionCredentialsOptions" + }, + "type": "array" + } + }, + "type": "object" + }, + "requestTimeout": { + "description": "Request timeout in ms (default: 15000). NOTE: msnodesqlv8 driver doesn't support timeouts < 1 second.", + "type": "number" + }, + "schema": { + "description": "Database schema.", + "type": "string" + }, + "stream": { + "description": "Stream recordsets/rows instead of returning them all at once as an argument of callback (default: false).\nYou can also enable streaming for each request independently (request.stream = true).\nAlways set to true if you plan to work with large amount of rows.", + "type": "boolean" + }, + "subscribers": { + "description": "Subscribers to be loaded for this connection.\nAccepts both subscriber classes and directories where from subscribers need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "synchronize": { + "description": "Indicates if database schema should be auto created on every application launch.\nBe careful with this option and don't use this in production - otherwise you can lose production data.\nThis option is useful during debug and development.\nAlternative to it, you can use CLI and run schema:sync command.\n\nNote that for MongoDB database it does not create schema, because MongoDB is schemaless.\nInstead, it syncs just by creating indices.", + "type": "boolean" + }, + "type": { + "description": "Database type.", + "enum": [ + "mssql" + ], + "type": "string" + }, + "url": { + "description": "Connection url where perform connection to.", + "type": "string" + }, + "username": { + "description": "Database username.", + "type": "string" + } + }, + "type": "object" + }, + "SqliteConnectionOptions": { + "description": "Sqlite-specific connection options.", + "properties": { + "busyErrorRetry": { + "description": "In your SQLite application when you perform parallel writes its common to face SQLITE_BUSY error.\nThis error indicates that SQLite failed to write to the database file since someone else already writes into it.\nSince SQLite cannot handle parallel saves this error cannot be avoided.\n\nTo simplify life's of those who have this error this particular option sets a timeout within which ORM will try\nto perform requested write operation again and again until it receives SQLITE_BUSY error.\n\nEnabling WAL can improve your app performance and face less SQLITE_BUSY issues.\nTime in milliseconds.", + "type": "number" + }, + "cache": { + "anyOf": [ + { + "properties": { + "alwaysEnabled": { + "description": "If set to true then queries (using find methods and QueryBuilder's methods) will always be cached.", + "type": "boolean" + }, + "duration": { + "description": "Time in milliseconds in which cache will expire.\nThis can be setup per-query.\nDefault value is 1000 which is equivalent to 1 second.", + "type": "number" + }, + "ignoreErrors": { + "description": "Used to specify if cache errors should be ignored, and pass through the call to the Database.", + "type": "boolean" + }, + "options": { + "description": "Used to provide redis connection options." + }, + "provider": { + "description": "Factory function for custom cache providers that implement QueryResultCache.", + "type": "object" + }, + "tableName": { + "description": "Configurable table name for \"database\" type cache.\nDefault value is \"query-result-cache\"", + "type": "string" + }, + "type": { + "description": "Type of caching.\n\n- \"database\" means cached values will be stored in the separate table in database. This is default value.\n- \"redis\" means cached values will be stored inside redis. You must provide redis connection options.", + "enum": [ + "database", + "ioredis", + "ioredis/cluster", + "redis" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "type": "boolean" + } + ], + "description": "Allows to setup cache options." + }, + "cli": { + "description": "CLI settings.", + "properties": { + "entitiesDir": { + "description": "Directory where entities should be created by default.", + "type": "string" + }, + "migrationsDir": { + "description": "Directory where migrations should be created by default.", + "type": "string" + }, + "subscribersDir": { + "description": "Directory where subscribers should be created by default.", + "type": "string" + } + }, + "type": "object" + }, + "database": { + "description": "Storage type or path to the storage.", + "type": "string" + }, + "dropSchema": { + "description": "Drops the schema each time connection is being established.\nBe careful with this option and don't use this in production - otherwise you'll lose all production data.\nThis option is useful during debug and development.", + "type": "boolean" + }, + "enableWAL": { + "description": "Enables WAL mode. By default its disabled.", + "type": "boolean" + }, + "entities": { + "description": "Entities to be loaded for this connection.\nAccepts both entity classes and directories where from entities need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "$ref": "#/definitions/EntitySchema<any>" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "entityPrefix": { + "description": "Prefix to use on all tables (collections) of this connection in the database.", + "type": "string" + }, + "entitySkipConstructor": { + "description": "When creating new Entity instances, skip all constructors when true.", + "type": "boolean" + }, + "extra": { + "description": "Extra connection options to be passed to the underlying driver.\n\ntodo: deprecate this and move all database-specific types into hts own connection options object." + }, + "key": { + "description": "Encryption key for for SQLCipher.", + "type": "string" + }, + "logger": { + "anyOf": [ + { + "$ref": "#/definitions/Logger" + }, + { + "enum": [ + "advanced-console", + "debug", + "file", + "simple-console" + ], + "type": "string" + } + ], + "description": "Logger instance used to log queries and events in the ORM." + }, + "logging": { + "anyOf": [ + { + "items": { + "enum": [ + "error", + "info", + "log", + "migration", + "query", + "schema", + "warn" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "all", + false, + true + ] + } + ], + "description": "Logging options." + }, + "maxQueryExecutionTime": { + "description": "Maximum number of milliseconds query should be executed before logger log a warning.", + "type": "number" + }, + "migrations": { + "description": "Migrations to be loaded for this connection.\nAccepts both migration classes and directories where from migrations need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "migrationsRun": { + "description": "Indicates if migrations should be auto run on every application launch.\nAlternative to it, you can use CLI and run migrations:run command.", + "type": "boolean" + }, + "migrationsTableName": { + "description": "Migrations table name, in case of different name from \"migrations\".\nAccepts single string name.", + "type": "string" + }, + "migrationsTransactionMode": { + "description": "Transaction mode for migrations to run in", + "enum": [ + "all", + "each", + "none" + ], + "type": "string" + }, + "name": { + "description": "Connection name. If connection name is not given then it will be called \"default\".\nDifferent connections must have different names.", + "type": "string" + }, + "namingStrategy": { + "$ref": "#/definitions/NamingStrategyInterface", + "description": "Naming strategy to be used to name tables and columns in the database." + }, + "subscribers": { + "description": "Subscribers to be loaded for this connection.\nAccepts both subscriber classes and directories where from subscribers need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "synchronize": { + "description": "Indicates if database schema should be auto created on every application launch.\nBe careful with this option and don't use this in production - otherwise you can lose production data.\nThis option is useful during debug and development.\nAlternative to it, you can use CLI and run schema:sync command.\n\nNote that for MongoDB database it does not create schema, because MongoDB is schemaless.\nInstead, it syncs just by creating indices.", + "type": "boolean" + }, + "type": { + "description": "Database type.", + "enum": [ + "sqlite" + ], + "type": "string" + } + }, + "type": "object" + }, + "SqljsConnectionOptions": { + "description": "Sql.js-specific connection options.", + "properties": { + "autoSave": { + "description": "Enables the autoSave mechanism which either saves to location\nor calls autoSaveCallback every time a change to the database is made.", + "type": "boolean" + }, + "autoSaveCallback": { + "$ref": "#/definitions/Function", + "description": "A function that gets called on every change instead of the internal autoSave function.\nautoSave has to be enabled for this to work." + }, + "cache": { + "anyOf": [ + { + "properties": { + "alwaysEnabled": { + "description": "If set to true then queries (using find methods and QueryBuilder's methods) will always be cached.", + "type": "boolean" + }, + "duration": { + "description": "Time in milliseconds in which cache will expire.\nThis can be setup per-query.\nDefault value is 1000 which is equivalent to 1 second.", + "type": "number" + }, + "ignoreErrors": { + "description": "Used to specify if cache errors should be ignored, and pass through the call to the Database.", + "type": "boolean" + }, + "options": { + "description": "Used to provide redis connection options." + }, + "provider": { + "description": "Factory function for custom cache providers that implement QueryResultCache.", + "type": "object" + }, + "tableName": { + "description": "Configurable table name for \"database\" type cache.\nDefault value is \"query-result-cache\"", + "type": "string" + }, + "type": { + "description": "Type of caching.\n\n- \"database\" means cached values will be stored in the separate table in database. This is default value.\n- \"redis\" means cached values will be stored inside redis. You must provide redis connection options.", + "enum": [ + "database", + "ioredis", + "ioredis/cluster", + "redis" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "type": "boolean" + } + ], + "description": "Allows to setup cache options." + }, + "cli": { + "description": "CLI settings.", + "properties": { + "entitiesDir": { + "description": "Directory where entities should be created by default.", + "type": "string" + }, + "migrationsDir": { + "description": "Directory where migrations should be created by default.", + "type": "string" + }, + "subscribersDir": { + "description": "Directory where subscribers should be created by default.", + "type": "string" + } + }, + "type": "object" + }, + "database": { + "additionalProperties": false, + "description": "A Uint8Array that gets imported when the connection is opened.", + "patternProperties": { + "^[0-9]+$": { + "type": "number" + } + }, + "type": "object" + }, + "dropSchema": { + "description": "Drops the schema each time connection is being established.\nBe careful with this option and don't use this in production - otherwise you'll lose all production data.\nThis option is useful during debug and development.", + "type": "boolean" + }, + "entities": { + "description": "Entities to be loaded for this connection.\nAccepts both entity classes and directories where from entities need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "$ref": "#/definitions/EntitySchema<any>" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "entityPrefix": { + "description": "Prefix to use on all tables (collections) of this connection in the database.", + "type": "string" + }, + "entitySkipConstructor": { + "description": "When creating new Entity instances, skip all constructors when true.", + "type": "boolean" + }, + "extra": { + "description": "Extra connection options to be passed to the underlying driver.\n\ntodo: deprecate this and move all database-specific types into hts own connection options object." + }, + "location": { + "description": "File path (Node.js) or local storage key (browser) to load and save database from.\nIf this is specified without autoSave, the database is loaded from the location\nand can be saved manually via the SqljsEntityManager. If autoSave is enabled,\nlocation is used to automatically save the database.", + "type": "string" + }, + "logger": { + "anyOf": [ + { + "$ref": "#/definitions/Logger" + }, + { + "enum": [ + "advanced-console", + "debug", + "file", + "simple-console" + ], + "type": "string" + } + ], + "description": "Logger instance used to log queries and events in the ORM." + }, + "logging": { + "anyOf": [ + { + "items": { + "enum": [ + "error", + "info", + "log", + "migration", + "query", + "schema", + "warn" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "all", + false, + true + ] + } + ], + "description": "Logging options." + }, + "maxQueryExecutionTime": { + "description": "Maximum number of milliseconds query should be executed before logger log a warning.", + "type": "number" + }, + "migrations": { + "description": "Migrations to be loaded for this connection.\nAccepts both migration classes and directories where from migrations need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "migrationsRun": { + "description": "Indicates if migrations should be auto run on every application launch.\nAlternative to it, you can use CLI and run migrations:run command.", + "type": "boolean" + }, + "migrationsTableName": { + "description": "Migrations table name, in case of different name from \"migrations\".\nAccepts single string name.", + "type": "string" + }, + "migrationsTransactionMode": { + "description": "Transaction mode for migrations to run in", + "enum": [ + "all", + "each", + "none" + ], + "type": "string" + }, + "name": { + "description": "Connection name. If connection name is not given then it will be called \"default\".\nDifferent connections must have different names.", + "type": "string" + }, + "namingStrategy": { + "$ref": "#/definitions/NamingStrategyInterface", + "description": "Naming strategy to be used to name tables and columns in the database." + }, + "sqlJsConfig": { + "description": "Config that's used to initialize sql.js." + }, + "subscribers": { + "description": "Subscribers to be loaded for this connection.\nAccepts both subscriber classes and directories where from subscribers need to be loaded.\nDirectories support glob patterns.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "synchronize": { + "description": "Indicates if database schema should be auto created on every application launch.\nBe careful with this option and don't use this in production - otherwise you can lose production data.\nThis option is useful during debug and development.\nAlternative to it, you can use CLI and run schema:sync command.\n\nNote that for MongoDB database it does not create schema, because MongoDB is schemaless.\nInstead, it syncs just by creating indices.", + "type": "boolean" + }, + "type": { + "description": "Database type.", + "enum": [ + "sqljs" + ], + "type": "string" + }, + "useLocalForage": { + "description": "Enables the usage of the localforage library to save & load the database asynchronously from the\nindexedDB instead of using the synchron local storage methods in a browser environment.", + "type": "boolean" + } + }, + "type": "object" + }, + "SqljsEntityManager": { + "description": "A special EntityManager that includes import/export and load/save function\nthat are unique to Sql.js.", + "properties": { + "connection": { + "$ref": "#/definitions/Connection", + "description": "Connection used by this entity manager." + }, + "driver": { + }, + "plainObjectToEntityTransformer": { + "$ref": "#/definitions/PlainObjectToNewEntityTransformer", + "description": "Plain to object transformer used in create and merge operations." + }, + "queryRunner": { + "$ref": "#/definitions/QueryRunner", + "description": "Custom query runner to be used for operations in this entity manager.\nUsed only in non-global entity manager." + }, + "repositories": { + "description": "Once created and then reused by en repositories.", + "items": { + "$ref": "#/definitions/Repository<any>" + }, + "type": "array" + } + }, + "type": "object" + }, + "Status": { + "enum": [ + "dnd", + "idle", + "offline", + "online" + ], + "type": "string" + }, + "StringConstructor": { + "properties": { + "prototype": { + "additionalProperties": false, + "patternProperties": { + "^[0-9]+$": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "Table": { + "description": "Table in the database represented in this class.", + "properties": { + "checks": { + "description": "Table check constraints.", + "items": { + "$ref": "#/definitions/TableCheck" + }, + "type": "array" + }, + "columns": { + "description": "Table columns.", + "items": { + "$ref": "#/definitions/TableColumn" + }, + "type": "array" + }, + "database": { + "description": "Database name that this table resides in if it applies.", + "type": "string" + }, + "engine": { + "description": "Table engine.", + "type": "string" + }, + "exclusions": { + "description": "Table exclusion constraints.", + "items": { + "$ref": "#/definitions/TableExclusion" + }, + "type": "array" + }, + "foreignKeys": { + "description": "Table foreign keys.", + "items": { + "$ref": "#/definitions/TableForeignKey" + }, + "type": "array" + }, + "indices": { + "description": "Table indices.", + "items": { + "$ref": "#/definitions/TableIndex" + }, + "type": "array" + }, + "justCreated": { + "description": "Indicates if table was just created.\nThis is needed, for example to check if we need to skip primary keys creation\nfor new tables.", + "type": "boolean" + }, + "name": { + "description": "May contain database name, schema name and table name, unless they're the current database.\n\nE.g. myDB.mySchema.myTable", + "type": "string" + }, + "primaryColumns": { + "items": { + "$ref": "#/definitions/TableColumn" + }, + "type": "array" + }, + "schema": { + "description": "Schema name that this table resides in if it applies.", + "type": "string" + }, + "uniques": { + "description": "Table unique constraints.", + "items": { + "$ref": "#/definitions/TableUnique" + }, + "type": "array" + } + }, + "type": "object" + }, + "TableCheck": { + "description": "Database's table check constraint stored in this class.", + "properties": { + "columnNames": { + "description": "Column that contains this constraint.", + "items": { + "type": "string" + }, + "type": "array" + }, + "expression": { + "description": "Check expression.", + "type": "string" + }, + "name": { + "description": "Constraint name.", + "type": "string" + } + }, + "type": "object" + }, + "TableColumn": { + "description": "Table's columns in the database represented in this class.", + "properties": { + "asExpression": { + "description": "Generated column expression. Supports only in MySQL.", + "type": "string" + }, + "charset": { + "description": "Defines column character set.", + "type": "string" + }, + "collation": { + "description": "Defines column collation.", + "type": "string" + }, + "comment": { + "description": "Column's comment.", + "type": "string" + }, + "default": { + "description": "Column's default value." + }, + "enum": { + "description": "Array of possible enumerated values.", + "items": { + "type": "string" + }, + "type": "array" + }, + "enumName": { + "description": "Exact name of enum", + "type": "string" + }, + "generatedType": { + "description": "Generated column type. Supports only in MySQL.", + "enum": [ + "STORED", + "VIRTUAL" + ], + "type": "string" + }, + "generationStrategy": { + "description": "Specifies generation strategy if this column will use auto increment.\n`rowid` option supported only in CockroachDB.", + "enum": [ + "increment", + "rowid", + "uuid" + ], + "type": "string" + }, + "isArray": { + "description": "Indicates if column stores array.", + "type": "boolean" + }, + "isGenerated": { + "description": "Indicates if column is auto-generated sequence.", + "type": "boolean" + }, + "isNullable": { + "description": "Indicates if column is NULL, or is NOT NULL in the database.", + "type": "boolean" + }, + "isPrimary": { + "description": "Indicates if column is a primary key.", + "type": "boolean" + }, + "isUnique": { + "description": "Indicates if column has unique value.", + "type": "boolean" + }, + "length": { + "description": "Column type's length. Used only on some column types.\nFor example type = \"string\" and length = \"100\" means that ORM will create a column with type varchar(100).", + "type": "string" + }, + "name": { + "description": "Column name.", + "type": "string" + }, + "onUpdate": { + "description": "ON UPDATE trigger. Works only for MySQL.", + "type": "string" + }, + "precision": { + "description": "The precision for a decimal (exact numeric) column (applies only for decimal column), which is the maximum\nnumber of digits that are stored for the values.", + "type": [ + "null", + "number" + ] + }, + "scale": { + "description": "The scale for a decimal (exact numeric) column (applies only for decimal column), which represents the number\nof digits to the right of the decimal point and must not be greater than precision.", + "type": "number" + }, + "spatialFeatureType": { + "description": "Spatial Feature Type (Geometry, Point, Polygon, etc.)", + "type": "string" + }, + "srid": { + "description": "SRID (Spatial Reference ID (EPSG code))", + "type": "number" + }, + "type": { + "description": "Column type.", + "type": "string" + }, + "unsigned": { + "description": "Puts UNSIGNED attribute on to numeric column. Works only for MySQL.", + "type": "boolean" + }, + "width": { + "description": "Column type's display width. Used only on some column types in MySQL.\nFor example, INT(4) specifies an INT with a display width of four digits.", + "type": "number" + }, + "zerofill": { + "description": "Puts ZEROFILL attribute on to numeric column. Works only for MySQL.\nIf you specify ZEROFILL for a numeric column, MySQL automatically adds the UNSIGNED attribute to the column", + "type": "boolean" + } + }, + "type": "object" + }, + "TableExclusion": { + "description": "Database's table exclusion constraint stored in this class.", + "properties": { + "expression": { + "description": "Exclusion expression.", + "type": "string" + }, + "name": { + "description": "Constraint name.", + "type": "string" + } + }, + "type": "object" + }, + "TableForeignKey": { + "description": "Foreign key from the database stored in this class.", + "properties": { + "columnNames": { + "description": "Column names which included by this foreign key.", + "items": { + "type": "string" + }, + "type": "array" + }, + "deferrable": { + "description": "Set this foreign key constraint as \"DEFERRABLE\" e.g. check constraints at start\nor at the end of a transaction", + "type": "string" + }, + "name": { + "description": "Name of the foreign key constraint.", + "type": "string" + }, + "onDelete": { + "description": "\"ON DELETE\" of this foreign key, e.g. what action database should perform when\nreferenced stuff is being deleted.", + "type": "string" + }, + "onUpdate": { + "description": "\"ON UPDATE\" of this foreign key, e.g. what action database should perform when\nreferenced stuff is being updated.", + "type": "string" + }, + "referencedColumnNames": { + "description": "Column names which included by this foreign key.", + "items": { + "type": "string" + }, + "type": "array" + }, + "referencedDatabase": { + "description": "Database of Table referenced in the foreign key.", + "type": "string" + }, + "referencedSchema": { + "description": "Database of Table referenced in the foreign key.", + "type": "string" + }, + "referencedTableName": { + "description": "Table referenced in the foreign key.", + "type": "string" + } + }, + "type": "object" + }, + "TableIndex": { + "description": "Database's table index stored in this class.", + "properties": { + "columnNames": { + "description": "Columns included in this index.", + "items": { + "type": "string" + }, + "type": "array" + }, + "isFulltext": { + "description": "The FULLTEXT modifier indexes the entire column and does not allow prefixing.\nWorks only in MySQL.", + "type": "boolean" + }, + "isSpatial": { + "description": "The SPATIAL modifier indexes the entire column and does not allow indexed columns to contain NULL values.\nWorks only in MySQL.", + "type": "boolean" + }, + "isUnique": { + "description": "Indicates if this index is unique.", + "type": "boolean" + }, + "name": { + "description": "Index name.", + "type": "string" + }, + "parser": { + "description": "Fulltext parser.\nWorks only in MySQL.", + "type": "string" + }, + "where": { + "description": "Index filter condition.", + "type": "string" + } + }, + "type": "object" + }, + "TableMetadataArgs": { + "description": "Arguments for TableMetadata class, helps to construct an TableMetadata object.", + "properties": { + "database": { + "description": "Database name. Used in MySql and Sql Server.", + "type": "string" + }, + "engine": { + "description": "Table's database engine type (like \"InnoDB\", \"MyISAM\", etc).", + "type": "string" + }, + "expression": { + "description": "View expression.", + "type": [ + "string", + "object" + ] + }, + "materialized": { + "description": "Indicates if view is materialized", + "type": "boolean" + }, + "name": { + "description": "Table's name. If name is not set then table's name will be generated from target's name.", + "type": "string" + }, + "orderBy": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "properties": { + "nulls": { + "enum": [ + "NULLS FIRST", + "NULLS LAST" + ], + "type": "string" + }, + "order": { + "enum": [ + "ASC", + "DESC" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "enum": [ + "ASC", + "DESC" + ], + "type": "string" + } + ] + }, + "description": "Special object that defines order condition for ORDER BY in sql.\n\nExample:\n{\n \"name\": \"ASC\",\n \"id\": \"DESC\"\n}", + "type": "object" + }, + { + "type": "object" + } + ], + "description": "Specifies a default order by used for queries from this table when no explicit order by is specified." + }, + "schema": { + "description": "Schema name. Used in Postgres and Sql Server.", + "type": "string" + }, + "synchronize": { + "description": "Indicates if schema synchronization is enabled or disabled for this entity.\nIf it will be set to false then schema sync will and migrations ignore this entity.\nBy default schema synchronization is enabled for all entities.", + "type": "boolean" + }, + "target": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ], + "description": "Class to which table is applied.\nFunction target is a table defined in the class.\nString target is a table defined in a json schema." + }, + "type": { + "$ref": "#/definitions/TableType", + "description": "Table type. Tables can be abstract, closure, junction, embedded, etc." + }, + "withoutRowid": { + "description": "If set to 'true' this option disables Sqlite's default behaviour of secretly creating\nan integer primary key column named 'rowid' on table creation.", + "type": "boolean" + } + }, + "type": "object" + }, + "TableType": { + "description": "Table type. Tables can be closure, junction,, etc.", + "enum": [ + "closure", + "closure-junction", + "entity-child", + "junction", + "regular", + "view" + ], + "type": "string" + }, + "TableUnique": { + "description": "Database's table unique constraint stored in this class.", + "properties": { + "columnNames": { + "description": "Columns that contains this constraint.", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Constraint name.", + "type": "string" + } + }, + "type": "object" + }, + "Team": { + "properties": { + "icon": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": "string" + }, + "members": { + "items": { + "$ref": "#/definitions/TeamMember" + }, + "type": "array" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "name": { + "type": "string" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "owner_user": { + "$ref": "#/definitions/User" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + } + }, + "type": "object" + }, + "TeamMember": { + "properties": { + "id": { + "type": "string" + }, + "membership_state": { + "$ref": "#/definitions/TeamMemberState" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "permissions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "team": { + "$ref": "#/definitions/Team" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "type": "object" + }, + "TeamMemberState": { + "enum": [ + 1, + 2 + ], + "type": "number" + }, + "Template": { + "properties": { + "code": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "creator": { + "$ref": "#/definitions/User" + }, + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "name": { + "type": "string" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "source_guild": { + "$ref": "#/definitions/Guild" + }, + "updated_at": { + "format": "date-time", + "type": "string" + }, + "usage_count": { + "type": "number" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + } + }, + "type": "object" + }, + "TlsOptions": { + "properties": { + "ALPNProtocols": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "additionalProperties": false, + "patternProperties": { + "^[0-9]+$": { + "type": "number" + } + }, + "type": "object" + }, + { + "items": { + "additionalProperties": false, + "patternProperties": { + "^[0-9]+$": { + "type": "number" + } + }, + "type": "object" + }, + "type": "array" + } + ], + "description": "An array of strings or a Buffer naming possible ALPN protocols.\n(Protocols should be ordered by their priority.)" + }, + "SNICallback": { + "description": "SNICallback(servername, cb) <Function> A function that will be\ncalled if the client supports SNI TLS extension. Two arguments\nwill be passed when called: servername and cb. SNICallback should\ninvoke cb(null, ctx), where ctx is a SecureContext instance.\n(tls.createSecureContext(...) can be used to get a proper\nSecureContext.) If SNICallback wasn't provided the default callback\nwith high-level API will be used (see below).", + "type": "object" + }, + "allowHalfOpen": { + "default": false, + "description": "Indicates whether half-opened TCP connections are allowed.", + "type": "boolean" + }, + "ca": { + "anyOf": [ + { + "description": "Raw data is stored in instances of the Buffer class.\nA Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.\nValid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "items": { + "anyOf": [ + { + "description": "Raw data is stored in instances of the Buffer class.\nA Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.\nValid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Optionally override the trusted CA certificates. Default is to trust\nthe well-known CAs curated by Mozilla. Mozilla's CAs are completely\nreplaced when CAs are explicitly specified using this option." + }, + "cert": { + "anyOf": [ + { + "description": "Raw data is stored in instances of the Buffer class.\nA Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.\nValid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "items": { + "anyOf": [ + { + "description": "Raw data is stored in instances of the Buffer class.\nA Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.\nValid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Cert chains in PEM format. One cert chain should be provided per\nprivate key. Each cert chain should consist of the PEM formatted\ncertificate for a provided private key, followed by the PEM\nformatted intermediate certificates (if any), in order, and not\nincluding the root CA (the root CA must be pre-known to the peer,\nsee ca). When providing multiple cert chains, they do not have to\nbe in the same order as their private keys in key. If the\nintermediate certificates are not provided, the peer will not be\nable to validate the certificate, and the handshake will fail." + }, + "ciphers": { + "description": "Cipher suite specification, replacing the default. For more\ninformation, see modifying the default cipher suite. Permitted\nciphers can be obtained via tls.getCiphers(). Cipher names must be\nuppercased in order for OpenSSL to accept them.", + "type": "string" + }, + "clientCertEngine": { + "description": "Name of an OpenSSL engine which can provide the client certificate.", + "type": "string" + }, + "crl": { + "anyOf": [ + { + "description": "Raw data is stored in instances of the Buffer class.\nA Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.\nValid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "items": { + "anyOf": [ + { + "description": "Raw data is stored in instances of the Buffer class.\nA Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.\nValid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "PEM formatted CRLs (Certificate Revocation Lists)." + }, + "dhparam": { + "anyOf": [ + { + "description": "Raw data is stored in instances of the Buffer class.\nA Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.\nValid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Diffie Hellman parameters, required for Perfect Forward Secrecy. Use\nopenssl dhparam to create the parameters. The key length must be\ngreater than or equal to 1024 bits or else an error will be thrown.\nAlthough 1024 bits is permissible, use 2048 bits or larger for\nstronger security. If omitted or invalid, the parameters are\nsilently discarded and DHE ciphers will not be available." + }, + "ecdhCurve": { + "description": "A string describing a named curve or a colon separated list of curve\nNIDs or names, for example P-521:P-384:P-256, to use for ECDH key\nagreement. Set to auto to select the curve automatically. Use\ncrypto.getCurves() to obtain a list of available curve names. On\nrecent releases, openssl ecparam -list_curves will also display the\nname and description of each available elliptic curve. Default:\ntls.DEFAULT_ECDH_CURVE.", + "type": "string" + }, + "enableTrace": { + "default": false, + "description": "When enabled, TLS packet trace information is written to `stderr`. This can be\nused to debug TLS connection problems.", + "type": "boolean" + }, + "handshakeTimeout": { + "description": "Abort the connection if the SSL/TLS handshake does not finish in the\nspecified number of milliseconds. A 'tlsClientError' is emitted on\nthe tls.Server object whenever a handshake times out. Default:\n120000 (120 seconds).", + "type": "number" + }, + "honorCipherOrder": { + "description": "Attempt to use the server's cipher suite preferences instead of the\nclient's. When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be\nset in secureOptions", + "type": "boolean" + }, + "key": { + "anyOf": [ + { + "description": "Raw data is stored in instances of the Buffer class.\nA Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.\nValid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "items": { + "anyOf": [ + { + "description": "Raw data is stored in instances of the Buffer class.\nA Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.\nValid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/KeyObject" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Private keys in PEM format. PEM allows the option of private keys\nbeing encrypted. Encrypted keys will be decrypted with\noptions.passphrase. Multiple keys using different algorithms can be\nprovided either as an array of unencrypted key strings or buffers,\nor an array of objects in the form {pem: <string|buffer>[,\npassphrase: <string>]}. The object form can only occur in an array.\nobject.passphrase is optional. Encrypted keys will be decrypted with\nobject.passphrase if provided, or options.passphrase if it is not." + }, + "maxVersion": { + "description": "Optionally set the maximum TLS version to allow. One\nof `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the\n`secureProtocol` option, use one or the other.\n**Default:** `'TLSv1.3'`, unless changed using CLI options. Using\n`--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to\n`'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used.", + "enum": [ + "TLSv1", + "TLSv1.1", + "TLSv1.2", + "TLSv1.3" + ], + "type": "string" + }, + "minVersion": { + "description": "Optionally set the minimum TLS version to allow. One\nof `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the\n`secureProtocol` option, use one or the other. It is not recommended to use\nless than TLSv1.2, but it may be required for interoperability.\n**Default:** `'TLSv1.2'`, unless changed using CLI options. Using\n`--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to\n`'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to\n'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used.", + "enum": [ + "TLSv1", + "TLSv1.1", + "TLSv1.2", + "TLSv1.3" + ], + "type": "string" + }, + "passphrase": { + "description": "Shared passphrase used for a single private key and/or a PFX.", + "type": "string" + }, + "pauseOnConnect": { + "default": false, + "description": "Indicates whether the socket should be paused on incoming connections.", + "type": "boolean" + }, + "pfx": { + "anyOf": [ + { + "description": "Raw data is stored in instances of the Buffer class.\nA Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.\nValid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "items": { + "anyOf": [ + { + "description": "Raw data is stored in instances of the Buffer class.\nA Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.\nValid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/PxfObject" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "PFX or PKCS12 encoded private key and certificate chain. pfx is an\nalternative to providing key and cert individually. PFX is usually\nencrypted, if it is, passphrase will be used to decrypt it. Multiple\nPFX can be provided either as an array of unencrypted PFX buffers,\nor an array of objects in the form {buf: <string|buffer>[,\npassphrase: <string>]}. The object form can only occur in an array.\nobject.passphrase is optional. Encrypted PFX will be decrypted with\nobject.passphrase if provided, or options.passphrase if it is not." + }, + "privateKeyEngine": { + "description": "Name of an OpenSSL engine to get private key from. Should be used\ntogether with privateKeyIdentifier.", + "type": "string" + }, + "privateKeyIdentifier": { + "description": "Identifier of a private key managed by an OpenSSL engine. Should be\nused together with privateKeyEngine. Should not be set together with\nkey, because both options define a private key in different ways.", + "type": "string" + }, + "pskIdentityHint": { + "description": "hint to send to a client to help\nwith selecting the identity during TLS-PSK negotiation. Will be ignored\nin TLS 1.3. Upon failing to set pskIdentityHint `tlsClientError` will be\nemitted with `ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED` code.", + "type": "string" + }, + "rejectUnauthorized": { + "default": true, + "description": "If true the server will reject any connection which is not\nauthorized with the list of supplied CAs. This option only has an\neffect if requestCert is true.", + "type": "boolean" + }, + "requestCert": { + "description": "If true the server will request a certificate from clients that\nconnect and attempt to verify that certificate. Defaults to\nfalse.", + "type": "boolean" + }, + "secureContext": { + "$ref": "#/definitions/SecureContext", + "description": "An optional TLS context object from tls.createSecureContext()" + }, + "secureOptions": { + "description": "Optionally affect the OpenSSL protocol behavior, which is not\nusually necessary. This should be used carefully if at all! Value is\na numeric bitmask of the SSL_OP_* options from OpenSSL Options", + "type": "number" + }, + "secureProtocol": { + "description": "Legacy mechanism to select the TLS protocol version to use, it does\nnot support independent control of the minimum and maximum version,\nand does not support limiting the protocol to TLSv1.3. Use\nminVersion and maxVersion instead. The possible values are listed as\nSSL_METHODS, use the function names as strings. For example, use\n'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow\nany TLS protocol version up to TLSv1.3. It is not recommended to use\nTLS versions less than 1.2, but it may be required for\ninteroperability. Default: none, see minVersion.", + "type": "string" + }, + "sessionIdContext": { + "description": "Opaque identifier used by servers to ensure session state is not\nshared between applications. Unused by clients.", + "type": "string" + }, + "sessionTimeout": { + "description": "The number of seconds after which a TLS session created by the\nserver will no longer be resumable. See Session Resumption for more\ninformation. Default: 300.", + "type": "number" + }, + "sigalgs": { + "description": "Colon-separated list of supported signature algorithms. The list\ncan contain digest algorithms (SHA256, MD5 etc.), public key\nalgorithms (RSA-PSS, ECDSA etc.), combination of both (e.g\n'RSA+SHA384') or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512).", + "type": "string" + }, + "ticketKeys": { + "description": "Raw data is stored in instances of the Buffer class.\nA Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.\nValid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'", + "items": { + "type": "number" + }, + "type": "array" + } + }, + "type": "object" + }, + "TypingStartEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "channel_id": { + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "member": { + "$ref": "#/definitions/PublicMember" + }, + "timestamp": { + "type": "number" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "TYPING_START" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "UniqueMetadata": { + "description": "Unique metadata contains all information about table's unique constraints.", + "properties": { + "columnNamesWithOrderingMap": { + "additionalProperties": { + "type": "number" + }, + "description": "Map of column names with order set.\nUsed only by MongoDB driver.", + "type": "object" + }, + "columns": { + "description": "Unique columns.", + "items": { + "$ref": "#/definitions/ColumnMetadata" + }, + "type": "array" + }, + "embeddedMetadata": { + "$ref": "#/definitions/EmbeddedMetadata", + "description": "Embedded metadata if this unique was applied on embedded." + }, + "entityMetadata": { + "$ref": "#/definitions/EntityMetadata", + "description": "Entity metadata of the class to which this unique constraint is applied." + }, + "givenColumnNames": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "object" + } + ], + "description": "User specified column names." + }, + "givenName": { + "description": "User specified unique constraint name.", + "type": "string" + }, + "name": { + "description": "Final unique constraint name.\nIf unique constraint name was given by a user then it stores normalized (by naming strategy) givenName.\nIf unique constraint name was not given then its generated.", + "type": "string" + }, + "target": { + "anyOf": [ + { + "$ref": "#/definitions/Function" + }, + { + "type": "string" + } + ], + "description": "Target class to which metadata is applied." + } + }, + "type": "object" + }, + "UsedNames": { + "type": "object" + }, + "User": { + "properties": { + "accent_color": { + "type": [ + "null", + "number" + ] + }, + "avatar": { + "type": [ + "null", + "string" + ] + }, + "banner": { + "type": [ + "null", + "string" + ] + }, + "bio": { + "type": "string" + }, + "bot": { + "type": "boolean" + }, + "connected_accounts": { + "items": { + "$ref": "#/definitions/ConnectedAccount" + }, + "type": "array" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "deleted": { + "type": "boolean" + }, + "desktop": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "discriminator": { + "type": "string" + }, + "email": { + "type": [ + "null", + "string" + ] + }, + "flags": { + "type": "bigint" + }, + "guilds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "mfa_enabled": { + "type": "boolean" + }, + "mobile": { + "type": "boolean" + }, + "nsfw_allowed": { + "type": "boolean" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "premium": { + "type": "boolean" + }, + "premium_type": { + "type": "number" + }, + "public_flags": { + "type": "bigint" + }, + "relationships": { + "items": { + "$ref": "#/definitions/Relationship" + }, + "type": "array" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "settings": { + "$ref": "#/definitions/UserSettings" + }, + "system": { + "type": "boolean" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + }, + "user_data": { + "properties": { + "fingerprints": { + "items": { + "type": "string" + }, + "type": "array" + }, + "hash": { + "type": "string" + }, + "valid_tokens_since": { + "format": "date-time", + "type": "string" + } + }, + "type": "object" + }, + "username": { + "type": "string" + }, + "verified": { + "type": "boolean" + } + }, + "type": "object" + }, + "UserFlags": { + "properties": { + "bitfield": { + "type": "bigint" + } + }, + "type": "object" + }, + "UserGuildSettings": { + "properties": { + "channel_overrides": { + "items": { + "properties": { + "channel_id": { + "type": "string" + }, + "message_notifications": { + "type": "number" + }, + "mute_config": { + "$ref": "#/definitions/MuteConfig" + }, + "muted": { + "type": "boolean" + } + }, + "type": "object" + }, + "type": "array" + }, + "message_notifications": { + "type": "number" + }, + "mobile_push": { + "type": "boolean" + }, + "mute_config": { + "$ref": "#/definitions/MuteConfig" + }, + "muted": { + "type": "boolean" + }, + "suppress_everyone": { + "type": "boolean" + }, + "suppress_roles": { + "type": "boolean" + }, + "version": { + "type": "number" + } + }, + "type": "object" + }, + "UserSettings": { + "properties": { + "afk_timeout": { + "type": "number" + }, + "allow_accessibility_detection": { + "type": "boolean" + }, + "animate_emoji": { + "type": "boolean" + }, + "animate_stickers": { + "type": "number" + }, + "contact_sync_enabled": { + "type": "boolean" + }, + "convert_emoticons": { + "type": "boolean" + }, + "custom_status": { + "properties": { + "emoji_id": { + "type": [ + "null", + "string" + ] + }, + "emoji_name": { + "type": [ + "null", + "string" + ] + }, + "expires_at": { + "type": [ + "null", + "number" + ] + }, + "text": { + "type": [ + "null", + "string" + ] + } + }, + "type": "object" + }, + "default_guilds_restricted": { + "type": "boolean" + }, + "detect_platform_accounts": { + "type": "boolean" + }, + "developer_mode": { + "type": "boolean" + }, + "disable_games_tab": { + "type": "boolean" + }, + "enable_tts_command": { + "type": "boolean" + }, + "explicit_content_filter": { + "type": "number" + }, + "friend_source_flags": { + "properties": { + "all": { + "type": "boolean" + } + }, + "type": "object" + }, + "gateway_connected": { + "type": "boolean" + }, + "gif_auto_play": { + "type": "boolean" + }, + "guild_folders": { + "items": { + "properties": { + "color": { + "type": "number" + }, + "guild_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "guild_positions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "inline_attachment_media": { + "type": "boolean" + }, + "inline_embed_media": { + "type": "boolean" + }, + "locale": { + "type": "string" + }, + "message_display_compact": { + "type": "boolean" + }, + "native_phone_integration_enabled": { + "type": "boolean" + }, + "render_embeds": { + "type": "boolean" + }, + "render_reactions": { + "type": "boolean" + }, + "restricted_guilds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "show_current_game": { + "type": "boolean" + }, + "status": { + "enum": [ + "dnd", + "idle", + "offline", + "online" + ], + "type": "string" + }, + "stream_notifications_enabled": { + "type": "boolean" + }, + "theme": { + "enum": [ + "dark", + "white" + ], + "type": "string" + }, + "timezone_offset": { + "type": "number" + } + }, + "type": "object" + }, + "UserUpdateEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "$ref": "#/definitions/User" + }, + "event": { + "enum": [ + "USER_UPDATE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "ValidateFunction<any>": { + "properties": { + "errors": { + "anyOf": [ + { + "items": { + "$ref": "#/definitions/ErrorObject<string,Record<string,any>,unknown>" + }, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "evaluated": { + "$ref": "#/definitions/Evaluated" + }, + "schema": { + "anyOf": [ + { + "$ref": "#/definitions/SchemaObject" + }, + { + "$ref": "#/definitions/AsyncSchema" + }, + { + "type": "boolean" + } + ] + }, + "schemaEnv": { + "$ref": "#/definitions/SchemaEnv" + }, + "source": { + "$ref": "#/definitions/SourceCode" + } + }, + "type": "object" + }, + "ValidateFunction<unknown>": { + "properties": { + "errors": { + "anyOf": [ + { + "items": { + "$ref": "#/definitions/ErrorObject<string,Record<string,any>,unknown>" + }, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "evaluated": { + "$ref": "#/definitions/Evaluated" + }, + "schema": { + "anyOf": [ + { + "$ref": "#/definitions/SchemaObject" + }, + { + "$ref": "#/definitions/AsyncSchema" + }, + { + "type": "boolean" + } + ] + }, + "schemaEnv": { + "$ref": "#/definitions/SchemaEnv" + }, + "source": { + "$ref": "#/definitions/SourceCode" + } + }, + "type": "object" + }, + "ValueScopeName": { + "properties": { + "names": { + "$ref": "#/definitions/UsedNames" + }, + "prefix": { + "type": "string" + }, + "scopePath": { + "anyOf": [ + { + "$ref": "#/definitions/Name" + }, + { + "$ref": "#/definitions/_Code" + } + ] + }, + "str": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/NameValue" + } + }, + "type": "object" + }, + "ValueTransformer": { + "description": "Interface for objects that deal with (un)marshalling data.", + "type": "object" + }, + "View": { + "description": "View in the database represented in this class.", + "properties": { + "database": { + "description": "Database name that this view resides in if it applies.", + "type": "string" + }, + "expression": { + "description": "View definition.", + "type": [ + "string", + "object" + ] + }, + "materialized": { + "description": "Indicates if view is materialized.", + "type": "boolean" + }, + "name": { + "description": "View name", + "type": "string" + }, + "schema": { + "description": "Schema name that this view resides in if it applies.", + "type": "string" + } + }, + "type": "object" + }, + "VoiceServerUpdateEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "endpoint": { + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "token": { + "type": "string" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "VOICE_SERVER_UPDATE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "VoiceState": { + "properties": { + "channel": { + "$ref": "#/definitions/Channel" + }, + "deaf": { + "type": "boolean" + }, + "guild": { + "$ref": "#/definitions/Guild" + }, + "id": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "mute": { + "type": "boolean" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "self_deaf": { + "type": "boolean" + }, + "self_mute": { + "type": "boolean" + }, + "self_stream": { + "type": "boolean" + }, + "self_video": { + "type": "boolean" + }, + "session_id": { + "type": "string" + }, + "suppress": { + "type": "boolean" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "type": "object" + }, + "VoiceStateUpdateEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "allOf": [ + { + "$ref": "#/definitions/VoiceState" + }, + { + "properties": { + "member": { + "$ref": "#/definitions/PublicMember" + } + }, + "type": "object" + } + ] + }, + "event": { + "enum": [ + "VOICE_STATE_UPDATE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "Webhook": { + "properties": { + "application": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "channel": { + "type": "string" + }, + "guild": { + "type": "string" + }, + "id": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/EntityMetadata" + }, + "name": { + "type": "string" + }, + "opts": { + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "schemaValidator": { + "$ref": "#/definitions/ValidateFunction<unknown>" + }, + "source_guild": { + "type": "string" + }, + "token": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/WebhookType" + }, + "usedConnection": { + "$ref": "#/definitions/Connection" + }, + "user": { + "type": "string" + } + }, + "type": "object" + }, + "WebhookType": { + "enum": [ + 1, + 2 + ], + "type": "number" + }, + "WebhooksUpdateEvent": { + "properties": { + "channel_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "data": { + "properties": { + "channel_id": { + "type": "string" + }, + "guild_id": { + "type": "string" + } + }, + "type": "object" + }, + "event": { + "enum": [ + "WEBHOOKS_UPDATE" + ], + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object" + }, + "XDeath": { + "properties": { + "count": { + "type": "number" + }, + "exchange": { + "type": "string" + }, + "original-expiration": { + }, + "queue": { + "type": "string" + }, + "reason": { + "enum": [ + "expired", + "maxlen", + "rejected" + ], + "type": "string" + }, + "routing-keys": { + "items": { + "type": "string" + }, + "type": "array" + }, + "time": { + "properties": { + "!": { + "enum": [ + "timestamp" + ], + "type": "string" + }, + "value": { + "type": "number" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "_Code": { + "properties": { + "_items": { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Name" + }, + { + "type": [ + "null", + "string", + "number", + "boolean" + ] + } + ] + }, + "type": "array" + }, + "_names": { + }, + "_str": { + }, + "names": { + "$ref": "#/definitions/UsedNames" + }, + "str": { + "type": "string" + } + }, + "type": "object" + }, + "{[x:string]:EntitySchemaColumnOptions|undefined;}": { + "description": "Entity column's options.", + "type": "object" + }, + "{[x:string]:EntitySchemaRelationOptions|undefined;}": { + "description": "Entity relation's options.", + "type": "object" + }, + "{[x:string]:true|undefined;}": { + "type": "object" + }, + "{[x:string]:true|undefined;}_1": { + "type": "object" + } + } +} + |