UNPKG

794 BTypeScriptView Raw
1import Observable from 'zen-observable-ts';
2import { PubSubProvider, ProviderOptions } from '../types/Provider';
3import { CustomUserAgentDetails } from '@aws-amplify/core';
4import { PubSubContent } from '../types/PubSub';
5export declare abstract class AbstractPubSubProvider<T extends ProviderOptions> implements PubSubProvider {
6 private _config;
7 constructor(options: T);
8 configure(config: T): T;
9 getCategory(): string;
10 abstract getProviderName(): string;
11 protected get options(): T;
12 abstract newClient(clientOptions: T): Promise<any>;
13 abstract publish(topics: string[] | string, msg: PubSubContent, options?: T): void;
14 abstract subscribe(topics: string[] | string, options?: T, customUserAgentDetails?: CustomUserAgentDetails): Observable<PubSubContent>;
15}