1 | /**
|
2 | * @license
|
3 | * Copyright 2017 Google LLC
|
4 | *
|
5 | * Licensed under the Apache License, Version 2.0 (the "License");
|
6 | * you may not use this file except in compliance with the License.
|
7 | * You may obtain a copy of the License at
|
8 | *
|
9 | * http://www.apache.org/licenses/LICENSE-2.0
|
10 | *
|
11 | * Unless required by applicable law or agreed to in writing, software
|
12 | * distributed under the License is distributed on an "AS IS" BASIS,
|
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 | * See the License for the specific language governing permissions and
|
15 | * limitations under the License.
|
16 | */
|
17 | /**
|
18 | * A class that holds metadata about a Repo object
|
19 | */
|
20 | export declare class RepoInfo {
|
21 | readonly secure: boolean;
|
22 | readonly namespace: string;
|
23 | readonly webSocketOnly: boolean;
|
24 | readonly nodeAdmin: boolean;
|
25 | readonly persistenceKey: string;
|
26 | readonly includeNamespaceInQueryParams: boolean;
|
27 | private _host;
|
28 | private _domain;
|
29 | internalHost: string;
|
30 | /**
|
31 | * @param host - Hostname portion of the url for the repo
|
32 | * @param secure - Whether or not this repo is accessed over ssl
|
33 | * @param namespace - The namespace represented by the repo
|
34 | * @param webSocketOnly - Whether to prefer websockets over all other transports (used by Nest).
|
35 | * @param nodeAdmin - Whether this instance uses Admin SDK credentials
|
36 | * @param persistenceKey - Override the default session persistence storage key
|
37 | */
|
38 | constructor(host: string, secure: boolean, namespace: string, webSocketOnly: boolean, nodeAdmin?: boolean, persistenceKey?: string, includeNamespaceInQueryParams?: boolean);
|
39 | isCacheableHost(): boolean;
|
40 | isCustomHost(): boolean;
|
41 | get host(): string;
|
42 | set host(newHost: string);
|
43 | toString(): string;
|
44 | toURLString(): string;
|
45 | }
|
46 | /**
|
47 | * Returns the websocket URL for this repo
|
48 | * @param repoInfo - RepoInfo object
|
49 | * @param type - of connection
|
50 | * @param params - list
|
51 | * @returns The URL for this repo
|
52 | */
|
53 | export declare function repoInfoConnectionURL(repoInfo: RepoInfo, type: string, params: {
|
54 | [k: string]: string;
|
55 | }): string;
|