@hatsuboshi/types
    Preparing search index...

    Class PIdol

    A produce idol / P-Idol (プロデュースアイドル / Pアイドル).

    These are units available for use in produce scenarios. For example, "極光" / "Kyokkou", "世界一可愛い私" / "Sekaiichi Kawaii Watashi", "サンフェーデッド" / "SUNFADED" are produce idol units of their respective characters.

    Tip

    See PIdolFilter for the list of filtering options.

    See IPIdol for the list of fields that can be used for sorting.

    Hierarchy (View Summary)

    Implements

    Index
    • Constructs a PIdol instance from an optional IPIdol object, at a specified training & potential level.

      If obj, or any of its required fields are undefined, the default value of each property's type will be used to construct the object.

      If upgradeState is undefined, the constructed instance will have a currentTrainingLevel and currentPotentialLevel of 0.

      Parameters

      • Optionalobj: Partial<IPIdol>

        Data to construct the object from.

      • OptionalupgradeState: Partial<PIdolUpgradeState>

        The training / potential level to set for the constructed instance.

      Returns PIdol

      // Default instance
      new PIdol()

      // From partial data
      new PIdol({ name: { ja: "Hello" } })

      // From JSON data returned by an API
      const res = await fetch(...)
      const data = new PIdol(await res.json())

      // From JSON data returned by an API, at specific upgrade levels
      const res = await fetch(...)
      const data = new PIdol(await res.json(), { trainingLevel: 6, potentialLevel: 4 })
    • Constructs a PIdol instance from a DBPIdol object by rehydrating missing fields using populate methods, at a specified training & potential level.

      If upgradeState is undefined, the constructed instance will have a currentTrainingLevel and currentPotentialLevel of 0.

      Parameters

      • obj: DBPIdol

        Data to construct the object from.

      • populate: PopulatePIdol

        Methods used to rehydrate fields overridden by DBPIdol.

      • OptionalupgradeState: Partial<PIdolUpgradeState>

        The training / potential level to set for the constructed instance.

      Returns Promise<PIdol>

      // From JSON data returned by a document store repository
      const res = await collection.findOne({ ... })
      const data = await PIdol.fromDB(res, { ... })

      // From JSON data returned by a document store repository, at specific upgrade levels
      const res = await collection.findOne({ ... })
      const data = await PIdol.fromDB(res, { ... }, { trainingLevel: 6, potentialLevel: 4 })
    • Returns the document-store representation of this object.

      Caution

      Unlike toJSON(), the resulting document-store representation may be in a significantly different shape to that of its implementing class, and it cannot be passed back into the constructor to reconstruct an equivalent instance.

      Use fromDB() instead, which reconstructs the instance and rehydrates any fields truncated by the conversion.

      Returns DBPIdol

    • Returns the JSON-serializable representation of this object.

      Tip

      The result can be passed back into the constructor to reconstruct an equivalent instance.

      Returns IPIdol

      // t1 and t2 are deeply equal
      const t1: T = new T({ ... })
      const t2: T = new T(t1.toJSON())
    • get dbRef(): string

      The unique reference to this object in persistent storage.

      Returns string

    character: Character

    The character behind the produce idol unit.

    createdAt: string

    The time the object was created, as an ISO 8601 (RFC 3339) timestamp.

    ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(.\d+)?(Z|[+-]\d{2}:\d{2})$

    "2026-07-08T07:35:46.741Z"
    
    currentAbilities: Ability[]

    The list of abilities this PIdol instance has (including any level upgrades).

    currentGrowth: ParameterSet

    The parameter growth stats of this PIdol instance (including any level upgrades).

    currentParameter: ParameterSet

    The base / flat parameters of this PIdol instance (including any level upgrades).

    currentPotentialLevel: number

    The current potential / bloom (才能開花) level of this PIdol instance.

    currentStamina: number

    The maximum stamina of this PIdol instance (including any level upgrades).

    currentTrainingLevel: number

    The current training (特訓) level of this PIdol instance.

    id: string

    An ID associated with the object.

    index: number = 0

    An auto-incremented index to keep object IDs unique during runtime.

    initialAbilities: Ability[]

    The list of abilities the produce idol unit has, at training & potential levels 0. Use PIdol.currentAbilities for the list of abilities including any level upgrades.

    initialGrowth: ParameterSet

    The parameter growth stats of the produce idol unit, at training & potential levels 0. Use PIdol.currentGrowth for the parameter growth stats including any level upgrades.

    initialParameter: ParameterSet

    The base / flat parameters of the produce idol unit, at training & potential levels 0. Use PIdol.currentParameter for the base / flat parameters including any level upgrades.

    initialStamina: number

    The maximum stamina of the produce idol unit, at training & potential levels 0. Use PIdol.currentStamina for the maximum stamina including any level upgrades.

    isWelfare: boolean

    Whether the produce idol unit was distributed for free (i.e. as event reward, login bonus, etc.).

    The name of the produce idol unit.

    plan: PIdolPlan

    The gameplay plan of the produce idol unit. For a more specific classification, see IPIdol.subplan.

    potentialLevels: PIdolLevelEffect[]

    A list of potential / bloom level upgrade effects for the produce idol unit. Use potentialLevels.length for its maximum potential / bloom level.

    primaStellaUpgrade: Nullable<PrimaStellaUpgrade>

    The contents of the upgrade if the produce idol unit is able to be upgraded to Prima Stella, otherwise null.

    rarity: Rarity

    The rarity of the produce idol unit.

    signaturePItem: PItem

    The P-Item (produce item) that belongs to the produce idol unit.

    signatureSkill: Skill[]

    The skill(s) that belong(s) to the produce idol unit.

    Note

    Some produce idol units, like ガラクタロード units, have two signature skills.

    sortableFields: readonly [
        "id",
        "createdAt",
        "updatedAt",
        "name",
        "plan",
        "rarity",
        "subplan",
        "isWelfare",
        "initialStamina",
    ] = ...
    subplan: PIdolSubplan

    The recommended gameplay sub-plan of the produce idol unit.

    trainingLevels: PIdolLevelEffect[]

    A list of training level upgrade effects for the produce idol unit. Use trainingLevels.length for its maximum training level.

    updatedAt: string

    The time the object was last updated, as an ISO 8601 (RFC 3339) timestamp.

    ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(.\d+)?(Z|[+-]\d{2}:\d{2})$

    "2026-07-09T14:02:11.508Z"
    
    visual: PIdolVisual

    The visuals (card artworks) of the produce idol unit.