UNPKG

3.06 kBTypeScriptView Raw
1/**
2 * @hidden
3 * @alpha
4 */
5import { BooleanParam, Expression, IntParam, Param, ParamOptions, SecretParam, StringParam, ListParam } from "./types";
6export { BUCKET_PICKER, TextInput, SelectInput, SelectOptions, MultiSelectInput, select, multiSelect, } from "./types";
7export { ParamOptions, Expression };
8type SecretOrExpr = Param<any> | SecretParam;
9export declare const declaredParams: SecretOrExpr[];
10/**
11 * A built-in parameter that resolves to the default RTDB database URL associated
12 * with the project, without prompting the deployer. Empty string if none exists.
13 */
14export declare const databaseURL: Param<string>;
15/**
16 * A built-in parameter that resolves to the Cloud project ID associated with
17 * the project, without prompting the deployer.
18 */
19export declare const projectID: Param<string>;
20/**
21 * A built-in parameter that resolves to the Cloud project ID, without prompting
22 * the deployer.
23 */
24export declare const gcloudProject: Param<string>;
25/**
26 * A builtin parameter that resolves to the Cloud storage bucket associated
27 * with the function, without prompting the deployer. Empty string if not
28 * defined.
29 */
30export declare const storageBucket: Param<string>;
31/**
32 * Declares a secret param, that will persist values only in Cloud Secret Manager.
33 * Secrets are stored interally as bytestrings. Use `ParamOptions.as` to provide type
34 * hinting during parameter resolution.
35 *
36 * @param name The name of the environment variable to use to load the parameter.
37 * @param options Configuration options for the parameter.
38 * @returns A parameter with a `string` return type for `.value`.
39 */
40export declare function defineSecret(name: string): SecretParam;
41/**
42 * Declare a string parameter.
43 *
44 * @param name The name of the environment variable to use to load the parameter.
45 * @param options Configuration options for the parameter.
46 * @returns A parameter with a `string` return type for `.value`.
47 */
48export declare function defineString(name: string, options?: ParamOptions<string>): StringParam;
49/**
50 * Declare a boolean parameter.
51 *
52 * @param name The name of the environment variable to use to load the parameter.
53 * @param options Configuration options for the parameter.
54 * @returns A parameter with a `boolean` return type for `.value`.
55 */
56export declare function defineBoolean(name: string, options?: ParamOptions<boolean>): BooleanParam;
57/**
58 * Declare an integer parameter.
59 *
60 * @param name The name of the environment variable to use to load the parameter.
61 * @param options Configuration options for the parameter.
62 * @returns A parameter with a `number` return type for `.value`.
63 */
64export declare function defineInt(name: string, options?: ParamOptions<number>): IntParam;
65/**
66 * Declare a list parameter.
67 *
68 * @param name The name of the environment variable to use to load the parameter.
69 * @param options Configuration options for the parameter.
70 * @returns A parameter with a `string[]` return type for `.value`.
71 */
72export declare function defineList(name: string, options?: ParamOptions<string[]>): ListParam;