pl-api
    Preparing search index...

    Function pushNotificationsCategory

    • Parameters

      Returns {
          createSubscription: (
              params: CreatePushNotificationsSubscriptionParams,
          ) => Promise<
              {
                  alerts: { [key: string]: boolean };
                  endpoint: string;
                  id: string;
                  server_key: string;
                  standard: boolean;
              },
          >;
          deleteSubscription: () => Promise<EmptyObject>;
          getSubscription: () => Promise<
              {
                  alerts: { [key: string]: boolean };
                  endpoint: string;
                  id: string;
                  server_key: string;
                  standard: boolean;
              },
          >;
          updateSubscription: (
              params: UpdatePushNotificationsSubscriptionParams,
          ) => Promise<
              {
                  alerts: { [key: string]: boolean };
                  endpoint: string;
                  id: string;
                  server_key: string;
                  standard: boolean;
              },
          >;
      }

      • createSubscription: (
            params: CreatePushNotificationsSubscriptionParams,
        ) => Promise<
            {
                alerts: { [key: string]: boolean };
                endpoint: string;
                id: string;
                server_key: string;
                standard: boolean;
            },
        >

        Subscribe to push notifications Add a Web Push API subscription to receive notifications. Each access token can have one push subscription. If you create a new subscription, the old subscription is deleted.

      • deleteSubscription: () => Promise<EmptyObject>

        Remove current subscription Removes the current Web Push API subscription.

      • getSubscription: () => Promise<
            {
                alerts: { [key: string]: boolean };
                endpoint: string;
                id: string;
                server_key: string;
                standard: boolean;
            },
        >

        Get current subscription View the PushSubscription currently associated with this access token.

      • updateSubscription: (
            params: UpdatePushNotificationsSubscriptionParams,
        ) => Promise<
            {
                alerts: { [key: string]: boolean };
                endpoint: string;
                id: string;
                server_key: string;
                standard: boolean;
            },
        >

        Change types of notifications Updates the current push subscription. Only the data part can be updated. To change fundamentals, a new subscription must be created instead.