@aws-amplify/pubsub

  • Version 4.1.3
  • Published
  • 1.7 MB
  • 7 dependencies
  • Apache-2.0 license

Install

npm i @aws-amplify/pubsub
yarn add @aws-amplify/pubsub
pnpm add @aws-amplify/pubsub

Overview

Pubsub category of aws-amplify

Index

Variables

variable PubSub

const PubSub: PubSubClass;

    Functions

    function mqttTopicMatch

    mqttTopicMatch: (filter: string, topic: string) => boolean;

      Classes

      class AbstractPubSubProvider

      abstract class AbstractPubSubProvider implements PubSubProvider {}

        constructor

        constructor(options?: ProvidertOptions);

          property options

          readonly options: ProvidertOptions;

            method configure

            configure: (config?: ProvidertOptions) => ProvidertOptions;

              method getCategory

              getCategory: () => string;

                method getProviderName

                abstract getProviderName: () => string;

                  method newClient

                  abstract newClient: (clientOptions: ProvidertOptions) => Promise<any>;

                    method publish

                    abstract publish: (
                    topics: string[] | string,
                    msg: any,
                    options?: ProvidertOptions
                    ) => void;

                      method subscribe

                      abstract subscribe: (
                      topics: string[] | string,
                      options?: ProvidertOptions
                      ) => any;

                        class AWSAppSyncProvider

                        class AWSAppSyncProvider extends MqttOverWSProvider {}

                          property endpoint

                          readonly endpoint: void;

                            method disconnect

                            protected disconnect: (clientId: string) => Promise<void>;

                              method getProviderName

                              getProviderName: () => string;

                                method onDisconnect

                                onDisconnect: ({
                                clientId,
                                errorCode,
                                ...args
                                }: {
                                [x: string]: any;
                                clientId: any;
                                errorCode: any;
                                }) => void;

                                  method publish

                                  publish: (topics: string[] | string, msg: any, options?: any) => Promise<void>;

                                    method subscribe

                                    subscribe: (topics: string[] | string, options?: any) => any;

                                      class AWSAppSyncRealTimeProvider

                                      class AWSAppSyncRealTimeProvider extends AbstractPubSubProvider {}

                                        property isSSLEnabled

                                        readonly isSSLEnabled: boolean;

                                          method getProviderName

                                          getProviderName: () => string;

                                            method newClient

                                            newClient: () => Promise<any>;

                                              method publish

                                              publish: (
                                              _topics: string[] | string,
                                              _msg: any,
                                              _options?: any
                                              ) => Promise<void>;

                                                method subscribe

                                                subscribe: (_topics: string[] | string, options?: ProvidertOptions) => any;

                                                  class AWSIoTProvider

                                                  class AWSIoTProvider extends MqttOverWSProvider {}

                                                    property endpoint

                                                    readonly endpoint: Promise<string>;

                                                      property region

                                                      readonly region: any;

                                                        method getProviderName

                                                        getProviderName: () => string;

                                                          class MqttOverWSProvider

                                                          class MqttOverWSProvider extends AbstractPubSubProvider {}

                                                            constructor

                                                            constructor(options?: MqttProvidertOptions);

                                                              property clientId

                                                              readonly clientId: any;

                                                                property clientsQueue

                                                                readonly clientsQueue: ClientsQueue;

                                                                  property endpoint

                                                                  readonly endpoint: any;

                                                                    property isSSLEnabled

                                                                    readonly isSSLEnabled: boolean;

                                                                      method connect

                                                                      protected connect: (
                                                                      clientId: string,
                                                                      options?: MqttProvidertOptions
                                                                      ) => Promise<any>;

                                                                        method disconnect

                                                                        protected disconnect: (clientId: string) => Promise<void>;

                                                                          method getProviderName

                                                                          getProviderName: () => string;

                                                                            method getTopicForValue

                                                                            protected getTopicForValue: (value: any) => any;

                                                                              method newClient

                                                                              newClient: ({ url, clientId }: MqttProvidertOptions) => Promise<any>;

                                                                                method onDisconnect

                                                                                onDisconnect: ({
                                                                                clientId,
                                                                                errorCode,
                                                                                ...args
                                                                                }: {
                                                                                [x: string]: any;
                                                                                clientId: any;
                                                                                errorCode: any;
                                                                                }) => void;

                                                                                  method publish

                                                                                  publish: (topics: string[] | string, msg: any) => Promise<void>;

                                                                                    method subscribe

                                                                                    subscribe: (topics: string[] | string, options?: MqttProvidertOptions) => any;

                                                                                      Interfaces

                                                                                      interface MqttProvidertOptions

                                                                                      interface MqttProvidertOptions extends ProvidertOptions {}

                                                                                        property clientId

                                                                                        clientId?: string;

                                                                                          property url

                                                                                          url?: string;

                                                                                            Enums

                                                                                            enum CONTROL_MSG

                                                                                            enum CONTROL_MSG {
                                                                                            CONNECTION_CLOSED = 'Connection closed',
                                                                                            CONNECTION_FAILED = 'Connection failed',
                                                                                            REALTIME_SUBSCRIPTION_INIT_ERROR = 'AppSync Realtime subscription init error',
                                                                                            SUBSCRIPTION_ACK = 'Subscription ack',
                                                                                            TIMEOUT_DISCONNECT = 'Timeout disconnect',
                                                                                            }

                                                                                              member CONNECTION_CLOSED

                                                                                              CONNECTION_CLOSED = 'Connection closed'

                                                                                                member CONNECTION_FAILED

                                                                                                CONNECTION_FAILED = 'Connection failed'

                                                                                                  member REALTIME_SUBSCRIPTION_INIT_ERROR

                                                                                                  REALTIME_SUBSCRIPTION_INIT_ERROR = 'AppSync Realtime subscription init error'

                                                                                                    member SUBSCRIPTION_ACK

                                                                                                    SUBSCRIPTION_ACK = 'Subscription ack'

                                                                                                      member TIMEOUT_DISCONNECT

                                                                                                      TIMEOUT_DISCONNECT = 'Timeout disconnect'

                                                                                                        Package Files (7)

                                                                                                        Dependencies (7)

                                                                                                        Dev Dependencies (2)

                                                                                                        Peer Dependencies (0)

                                                                                                        No peer dependencies.

                                                                                                        Badge

                                                                                                        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@aws-amplify/pubsub.

                                                                                                        • Markdown
                                                                                                          [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@aws-amplify/pubsub)
                                                                                                        • HTML
                                                                                                          <a href="https://www.jsdocs.io/package/@aws-amplify/pubsub"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>