1 | import { CustomUserAgentDetails } from '@aws-amplify/core';
|
2 | import { PubSubProvider, PubSubOptions, ProviderOptions } from '../types';
|
3 | import { PubSubContent } from '../types/PubSub';
|
4 | import Observable from 'zen-observable-ts';
|
5 | declare type PubSubObservable = {
|
6 | provider: PubSubProvider;
|
7 | value: string | Record<string, unknown>;
|
8 | };
|
9 | export declare class InternalPubSubClass {
|
10 | private _options;
|
11 | private _pluggables;
|
12 | |
13 |
|
14 |
|
15 | private _awsAppSyncRealTimeProvider?;
|
16 | |
17 |
|
18 |
|
19 | private get awsAppSyncRealTimeProvider();
|
20 | |
21 |
|
22 |
|
23 |
|
24 |
|
25 | constructor(options?: PubSubOptions);
|
26 | getModuleName(): string;
|
27 | /**
|
28 | * Configure PubSub part with configurations
|
29 | *
|
30 | * @param {PubSubOptions} config - Configuration for PubSub
|
31 | * @return {Object} - The current configuration
|
32 | */
|
33 | configure(options: PubSubOptions): PubSubOptions;
|
34 | |
35 |
|
36 |
|
37 |
|
38 | addPluggable(pluggable: PubSubProvider): Promise<Record<string, unknown>>;
|
39 | |
40 |
|
41 |
|
42 |
|
43 | removePluggable(providerName: string): void;
|
44 | private getProviderByName;
|
45 | private getProviders;
|
46 | publish(topics: string[] | string, msg: PubSubContent, options?: ProviderOptions): Promise<void[]>;
|
47 | subscribe(topics: string[] | string, options?: ProviderOptions, customUserAgentDetails?: CustomUserAgentDetails): Observable<PubSubObservable>;
|
48 | }
|
49 | export declare const InternalPubSub: InternalPubSubClass;
|
50 | export {};
|