onPair session methods not working

I’m trying to programmatically control the pairing flow if the app has already a setting. But it doesn’t work. Seems that showView and nextView are not implemented once the Typescript definitions are not in place and I must ignore them:

  async onPair(session: PairSession) {
    const pat = this.homey.settings.get("personalAccessToken");
    if (await this.validateSTToken(pat)) {
      this.log("Validated");
      // @ts-ignore
      await session.showView("list_devices");
      this.log("Page should change");
      // @ts-ignore
      await session.nextView();
      this.log("Nothing after the validate works");
    }

    session.setHandler("login_credentials", async (data) => {
      const valid = await this.validateSTToken(data.password);
      if (valid) this.homey.settings.set("personalAccessToken", data.password);
      return valid;
    });

    session.setHandler("list_devices", async () => {
      const myDevices = await this.client().devices.list({
        capability: this.capability,
      });
      const devices = myDevices?.map((device) => {
        const capabilities = getHomeyCapabilitiesForDevice(device);
        return {
          name: device.label ?? device.name,
          data: { id: device.deviceId },
          capabilities,
        };
      });

      return devices;
    });
  }

I’m using Homey Pro v8.0.2 and the homey-apps-sdk-v3-types library at 0.3.1

Already posted an issue about this: `PairSession` type declaration incomplete · Issue #8 · athombv/node-homey-apps-sdk-v3-types · GitHub

But it was only posted 5 months ago, so it’s understandable it hasn’t been fixed yet /s

But what is not clear is that even ignoring typing it still doesn’t work. But it’s documented in their website Custom pairing views - Homey Apps SDK

Seems to work fine for me (at least showView() does, haven’t tested nextView()).

Am I doing something wrong on my code? I have the views defined in the driver and I just want to skip the first one if there’s already a setting saved.

It doesn’t look like it, but how is your app.json configured, specifically the pair part of the driver?

"pair": [
    {
      "id": "personal_token"
    },
    {
      "id": "list_devices",
      "template": "list_devices",
      "navigation": {
        "next": "add_devices"
      }
    },
    {
      "id": "add_devices",
      "template": "add_devices"
    }
  ],