Capacitor API Push Notifications methods in documentation not available

I am using Capacitor Push Notifications API but there are few mismatches with the document provided.

I am using the API as guided.

import {
  Plugins,
  PluginListenerHandle,
  PushNotification,
  PushNotificationToken,
  PushNotificationActionPerformed
} from '@capacitor/core';

const { PushNotifications } = Plugins;
  1. Method requestPermission is not a valid method instead I am able to get method requestPermissions which returns an Array of type any. In android, it is returning undefined.

  2. Method removeAllListeners is not a valid method

Is the official document updated?

Only the following methods are available in core-plugin-definations.d.ts when I am looking for in the source.

export interface PushNotificationsPlugin extends Plugin {
    register(): Promise<void>;
    getDeliveredNotifications(): Promise<PushNotificationDeliveredList>;
    removeDeliveredNotifications(delivered: PushNotificationDeliveredList): Promise<void>;
    removeAllDeliveredNotifications(): Promise<void>;
    createChannel(channel: PushNotificationChannel): Promise<void>;
    deleteChannel(channel: PushNotificationChannel): Promise<void>;
    listChannels(): Promise<PushNotificationChannelList>;
    addListener(eventName: 'registration', listenerFunc: (token: PushNotificationToken) => void): PluginListenerHandle;
    addListener(eventName: 'registrationError', listenerFunc: (error: any) => void): PluginListenerHandle;
    addListener(eventName: 'pushNotificationReceived', listenerFunc: (notification: PushNotification) => void): PluginListenerHandle;
    addListener(eventName: 'pushNotificationActionPerformed', listenerFunc: (notification: PushNotificationActionPerformed) => void): PluginListenerHandle;
}

Docs are not versioned, current docs apply to latest capacitor version, that’s 2.x, so you have to update capacitor core and the iOS/android platforms lot latest (2.0.2 at the moment)