From 9fd7018e15c44f8e7a23e309c8aff0757f60a103 Mon Sep 17 00:00:00 2001 From: Eric Gilmore Date: Mon, 26 Oct 2020 12:08:55 -0700 Subject: [PATCH 1/7] Adding required tags to page template. --- docgen/theme/layouts/default.hbs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docgen/theme/layouts/default.hbs b/docgen/theme/layouts/default.hbs index 72111fb4e..17106e8d8 100644 --- a/docgen/theme/layouts/default.hbs +++ b/docgen/theme/layouts/default.hbs @@ -7,6 +7,8 @@ + + {{#ifCond model.name '==' project.name}}{{project.name}}{{else}}{{model.name}} | {{project.name}}{{/ifCond}} From 34db981d4c6eec0fc17f07cef05740d927050d6b Mon Sep 17 00:00:00 2001 From: Eric Gilmore Date: Mon, 26 Oct 2020 14:35:04 -0700 Subject: [PATCH 2/7] Adding formatting and fixing typo discovered in internal review. --- src/function-builder.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/function-builder.ts b/src/function-builder.ts index 919f9f09b..8fc7ce585 100644 --- a/src/function-builder.ts +++ b/src/function-builder.ts @@ -133,15 +133,15 @@ export function region( /** * Configure runtime options for the function. * @param runtimeOptions Object with optional fields: - * 1. memory: amount of memory to allocate to the function, possible values + * 1. `memory`: amount of memory to allocate to the function, possible values * are: '128MB', '256MB', '512MB', '1GB', and '2GB'. - * 2. timeoutSeconds: timeout for the function in seconds, possible values are + * 2. `timeoutSeconds`: timeout for the function in seconds, possible values are * 0 to 540. - * 3. failurePolicy: failure policy of the function, with boolean `true` being + * 3. `failurePolicy`: failure policy of the function, with boolean `true` being * equivalent to providing an empty retry object. - * 4. vpcConnector: id of a VPC connector in same project and region - * 5. vpcConnectorEgressSettings: when a vpcConnector is set, control which - * egress traffic is sent through the vpcConnector. + * 4. `vpcConnector`: id of a VPC connector in the same project and region + * 5. `vpcConnectorEgressSettings`: when a `vpcConnector` is set, control which + * egress traffic is sent through the `vpcConnector`. * * Value must not be null. */ From 67a53d5c046faefbd0a2a4804729d3d791482e7b Mon Sep 17 00:00:00 2001 From: Eric Gilmore Date: Mon, 26 Oct 2020 15:05:13 -0700 Subject: [PATCH 3/7] More fixes/additions discovered in internal review. --- docgen/content-sources/toc.yaml | 25 ++++++++++++++++++++----- src/function-builder.ts | 15 +++++++++------ 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/docgen/content-sources/toc.yaml b/docgen/content-sources/toc.yaml index 37093f7c2..722b0f818 100644 --- a/docgen/content-sources/toc.yaml +++ b/docgen/content-sources/toc.yaml @@ -23,6 +23,20 @@ toc: - title: 'config.Config' path: /docs/reference/functions/config_.config.config.html + - title: 'functions.function-configuration' + path: /docs/reference/functions/function_configuration_.html + section: + - title: 'config.DeploymentOptions' + path: /docs/reference/functions/function_configuration_.deploymentoptions.html + - title: 'config.FailurePolicy' + path: /docs/reference/functions/function_configuration_.failurepolicy.html + - title: 'config.RuntimeOptions' + path: /docs/reference/functions/function_configuration_.runtimeoptions.html + - title: 'config.Schedule' + path: /docs/reference/functions/function_configuration_.schedule.html + - title: 'config.ScheduleRetryConfig' + path: /docs/reference/functions/function_configuration_.scheduleretryconfig.html + - title: 'functions.analytics' path: /docs/reference/functions/providers_analytics_.html section: @@ -127,11 +141,6 @@ toc: - title: 'ObjectMetadata' path: /docs/reference/functions/providers_storage_.objectmetadata.html - - title: 'functions.handler' - path: /docs/reference/functions/handler_builder_.html - section: - - title: 'HandlerBuilder' - path: /docs/reference/functions/handler_builder_.handlerbuilder.html - title: 'functions.testLab' path: /docs/reference/functions/providers_testlab_.html section: @@ -143,3 +152,9 @@ toc: path: /docs/reference/functions/providers_testlab_.testmatrix.html - title: 'testLab.testMatrixBuilder' path: /docs/reference/functions/providers_testlab_.testmatrixbuilder.html + + - title: 'functions.handler' + path: /docs/reference/functions/handler_builder_.html + section: + - title: 'HandlerBuilder' + path: /docs/reference/functions/handler_builder_.handlerbuilder.html \ No newline at end of file diff --git a/src/function-builder.ts b/src/function-builder.ts index 8fc7ce585..9b5f5660b 100644 --- a/src/function-builder.ts +++ b/src/function-builder.ts @@ -173,13 +173,16 @@ export class FunctionBuilder { /** * Configure runtime options for the function. - * @param runtimeOptions Object with three optional fields: - * 1. failurePolicy: failure policy of the function, with boolean `true` being + * @param runtimeOptions Object with optional fields: + * 1. `memory`: amount of memory to allocate to the function, possible values + * are: '128MB', '256MB', '512MB', '1GB', and '2GB'. + * 2. `timeoutSeconds`: timeout for the function in seconds, possible values are + * 0 to 540. + * 3. `failurePolicy`: failure policy of the function, with boolean `true` being * equivalent to providing an empty retry object. - * 2. memory: amount of memory to allocate to the function, with possible - * values being '128MB', '256MB', '512MB', '1GB', and '2GB'. - * 3. timeoutSeconds: timeout for the function in seconds, with possible - * values being 0 to 540. + * 4. `vpcConnector`: id of a VPC connector in the same project and region + * 5. `vpcConnectorEgressSettings`: when a `vpcConnector` is set, control which + * egress traffic is sent through the `vpcConnector`. * * Value must not be null. */ From 0d0f05e6ca16d47ca3657f6ee18080d1d17cf715 Mon Sep 17 00:00:00 2001 From: Eric Gilmore Date: Thu, 29 Oct 2020 14:12:29 -0700 Subject: [PATCH 4/7] Fixing format of toc.yaml file. --- docgen/content-sources/toc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docgen/content-sources/toc.yaml b/docgen/content-sources/toc.yaml index 722b0f818..5758eb74e 100644 --- a/docgen/content-sources/toc.yaml +++ b/docgen/content-sources/toc.yaml @@ -157,4 +157,4 @@ toc: path: /docs/reference/functions/handler_builder_.html section: - title: 'HandlerBuilder' - path: /docs/reference/functions/handler_builder_.handlerbuilder.html \ No newline at end of file + path: /docs/reference/functions/handler_builder_.handlerbuilder.html From a1b1d26f385096986049630e0fb0a43570caa97f Mon Sep 17 00:00:00 2001 From: Eric Gilmore Date: Fri, 6 Aug 2021 12:03:09 -0700 Subject: [PATCH 5/7] Adding EAP TOC and index top matter. --- docgen/content-sources/v2/HOME.md | 8 ++-- docgen/content-sources/v2/toc.yaml | 63 ++++++++++++++++++------------ 2 files changed, 41 insertions(+), 30 deletions(-) diff --git a/docgen/content-sources/v2/HOME.md b/docgen/content-sources/v2/HOME.md index d70db12a3..dc6fe541f 100644 --- a/docgen/content-sources/v2/HOME.md +++ b/docgen/content-sources/v2/HOME.md @@ -1,8 +1,8 @@ # Firebase Functions v2 SDK Reference -The `firebase-functions` package provides an SDK for defining Cloud Functions for Firebase. +This package provides an SDK for defining Cloud Functions for Firebase v2. -To get started using Cloud Functions, see -[Get started: write, test, and deploy your first functions](/docs/functions/get-started). +To get started using Cloud Functions v2, see +the early access guide you were provided when you joined the EAP program. -For source code, see the [Cloud Functions for Firebase GitHub repo](https://github.com/firebase/firebase-functions). +**Important:** This API reference is confidential. Do not share or discuss until authorized to do so. diff --git a/docgen/content-sources/v2/toc.yaml b/docgen/content-sources/v2/toc.yaml index 04b95a495..5b2d5c06e 100644 --- a/docgen/content-sources/v2/toc.yaml +++ b/docgen/content-sources/v2/toc.yaml @@ -1,27 +1,38 @@ toc: - - title: globals.html - path: /docs/reference/functions/globals.html - - title: index.html - path: /docs/reference/functions/index.html - - title: logger_common_.html - path: /docs/reference/functions/logger_common_.html - - title: logger_compat_.html - path: /docs/reference/functions/logger_compat_.html - - title: logger_index_.html - path: /docs/reference/functions/logger_index_.html - - title: logger_index_.logentry.html - path: /docs/reference/functions/logger_index_.logentry.html - - title: v2_base_.html - path: /docs/reference/functions/v2_base_.html - - title: v2_index_.html - path: /docs/reference/functions/v2_index_.html - - title: v2_options_.eventhandleroptions.html - path: /docs/reference/functions/v2_options_.eventhandleroptions.html - - title: v2_options_.globaloptions.html - path: /docs/reference/functions/v2_options_.globaloptions.html - - title: v2_options_.html - path: /docs/reference/functions/v2_options_.html - - title: v2_providers_https_.html - path: /docs/reference/functions/v2_providers_https_.html - - title: v2_providers_https_.httpsoptions.html - path: /docs/reference/functions/v2_providers_https_.httpsoptions.html + - title: functions + path: /docs/functions/alpha/v2_index_.html + - title: functions.core + path: /docs/functions/alpha/v2_core.html + section: + - title: functions.CloudEvent + path: /docs/functions/alpha/v2_core_.cloudevent.html + - title: functions.CloudFunction + path: /docs/functions/alpha/v2_core_.cloudfunction.html + - title: functions.https + path: /docs/functions/alpha/v2_providers_https_.html + section: + - title: functions.https.options + path: /docs/functions/alpha/v2_providers_https_.httpsoptions.html + - title: 'functions.logger' + path: /docs/functions/alpha/logger_index_.html + section: + - title: 'LogEntry' + path: /docs/functions/alpha/logger_index_.logentry.html + - title: functions.options + path: /docs/functions/alpha/v2_options_.html + section: + - title: functions.options.GlobalOptions + path: /docs/functions/alpha/v2_options_.globaloptions.html + - title: functions.options.EventHandlerOptions + path: /docs/functions/alpha/v2_options_.eventhandleroptions.html + - title: functions.params + path: /docs/functions/alpha/v2_params_index_.html + - title: 'functions.pubsub' + path: /docs/functions/providers_pubsub_.html + section: + - title: 'Message' + path: /docs/functions/alpha/v2_providers_pubsub_.message.html + - title: 'TopicBuilder' + path: /docs/functions/alpha/v2_providers_pubsub_.messagepublishddata.html + - title: 'ScheduleBuilder' + path: /docs/functions/alpha/v2_providers_pubsub_.pubsuboptions.html \ No newline at end of file From ff11c26857d51c34b5838a2f48fd199ce6390e2e Mon Sep 17 00:00:00 2001 From: Eric Gilmore Date: Wed, 11 Aug 2021 13:55:17 -0700 Subject: [PATCH 6/7] Refine TOC, fix paths in template, attempt to hide params. --- docgen/content-sources/v2/toc.yaml | 20 +++++++++++--------- docgen/theme/layouts/default.hbs | 4 ++-- src/v2/params/index.ts | 1 + src/v2/params/types.ts | 1 + 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/docgen/content-sources/v2/toc.yaml b/docgen/content-sources/v2/toc.yaml index 438098bf3..0e67bccf7 100644 --- a/docgen/content-sources/v2/toc.yaml +++ b/docgen/content-sources/v2/toc.yaml @@ -1,18 +1,22 @@ toc: - title: functions - path: /docs/functions/alpha/v2.html + path: /docs/functions/alpha/index.html - title: functions.core path: /docs/functions/alpha/v2_core.html section: + - title: Functions v2 + path: /docs/functions/alpha/v2.html - title: functions.CloudEvent - path: /docs/functions/alpha/v2_core.cloudevent.html + path: /docs/functions/alpha/v2_core.CloudEvent.html - title: functions.CloudFunction - path: /docs/functions/alpha/v2_core.cloudfunction.html + path: /docs/functions/alpha/v2_core.CloudFunction.html - title: functions.https path: /docs/functions/alpha/v2_providers_https.html section: + - title: functions.https.CallableFunction + path: /docs/functions/alpha/v2_providers_https.CallableFunction.html - title: functions.https.options - path: /docs/functions/alpha/v2_providers_https.httpsoptions.html + path: /docs/functions/alpha/v2_providers_https.HttpsOptions.html - title: 'functions.logger' path: /docs/functions/alpha/logger.html section: @@ -22,13 +26,11 @@ toc: path: /docs/functions/alpha/v2_options.html section: - title: functions.options.GlobalOptions - path: /docs/functions/alpha/v2_options.globaloptions.html + path: /docs/functions/alpha/v2_options.GlobalOptions.html - title: functions.options.EventHandlerOptions - path: /docs/functions/alpha/v2_options.eventhandleroptions.html - - title: functions.params - path: /docs/functions/alpha/v2_params.html + path: /docs/functions/alpha/v2_options.EventHandlerOptions.html - title: 'functions.pubsub' - path: /docs/functions/v2_providers_pubsub.html + path: /docs/functions/alpha/v2_providers_pubsub.html section: - title: 'Message' path: /docs/functions/alpha/v2_providers_pubsub.Message.html diff --git a/docgen/theme/layouts/default.hbs b/docgen/theme/layouts/default.hbs index 17106e8d8..5e749dd87 100644 --- a/docgen/theme/layouts/default.hbs +++ b/docgen/theme/layouts/default.hbs @@ -5,8 +5,8 @@ - - + + {{#ifCond model.name '==' project.name}}{{project.name}}{{else}}{{model.name}} | {{project.name}}{{/ifCond}} diff --git a/src/v2/params/index.ts b/src/v2/params/index.ts index 48361b8fc..f4ea32b53 100644 --- a/src/v2/params/index.ts +++ b/src/v2/params/index.ts @@ -1,3 +1,4 @@ +/** @hidden */ import { BooleanParam, FloatParam, diff --git a/src/v2/params/types.ts b/src/v2/params/types.ts index ffa0fa5de..4bd80df4c 100644 --- a/src/v2/params/types.ts +++ b/src/v2/params/types.ts @@ -1,3 +1,4 @@ +/** @hidden */ type ParamValueType = 'string' | 'list' | 'boolean' | 'int' | 'float' | 'json'; export interface ParamSpec { From 9ceafff3da488125ed325e29938f610b85a2a0f4 Mon Sep 17 00:00:00 2001 From: Eric Gilmore Date: Thu, 12 Aug 2021 10:45:17 -0700 Subject: [PATCH 7/7] Doing all possible to make this YAML valid. VSCode extensions believe that it is. --- docgen/content-sources/v2/toc.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docgen/content-sources/v2/toc.yaml b/docgen/content-sources/v2/toc.yaml index 0e67bccf7..917a7a402 100644 --- a/docgen/content-sources/v2/toc.yaml +++ b/docgen/content-sources/v2/toc.yaml @@ -1,33 +1,33 @@ toc: - - title: functions + - title: 'functions' path: /docs/functions/alpha/index.html - - title: functions.core + - title: 'functions.core' path: /docs/functions/alpha/v2_core.html section: - - title: Functions v2 + - title: 'Functions v2' path: /docs/functions/alpha/v2.html - - title: functions.CloudEvent + - title: 'functions.CloudEvent' path: /docs/functions/alpha/v2_core.CloudEvent.html - - title: functions.CloudFunction + - title: 'functions.CloudFunction' path: /docs/functions/alpha/v2_core.CloudFunction.html - - title: functions.https + - title: 'functions.https' path: /docs/functions/alpha/v2_providers_https.html section: - - title: functions.https.CallableFunction + - title: 'functions.https.CallableFunction' path: /docs/functions/alpha/v2_providers_https.CallableFunction.html - - title: functions.https.options + - title: 'functions.https.options' path: /docs/functions/alpha/v2_providers_https.HttpsOptions.html - title: 'functions.logger' path: /docs/functions/alpha/logger.html section: - title: 'LogEntry' path: /docs/functions/alpha/logger.LogEntry.html - - title: functions.options + - title: 'functions.options' path: /docs/functions/alpha/v2_options.html section: - - title: functions.options.GlobalOptions + - title: 'functions.options.GlobalOptions' path: /docs/functions/alpha/v2_options.GlobalOptions.html - - title: functions.options.EventHandlerOptions + - title: 'functions.options.EventHandlerOptions' path: /docs/functions/alpha/v2_options.EventHandlerOptions.html - title: 'functions.pubsub' path: /docs/functions/alpha/v2_providers_pubsub.html @@ -37,4 +37,4 @@ toc: - title: 'TopicBuilder' path: /docs/functions/alpha/v2_providers_pubsub.MessagePublishedData.html - title: 'PubSubOptions' - path: /docs/functions/alpha/v2_providers_pubsub.PubSubOptions.html \ No newline at end of file + path: /docs/functions/alpha/v2_providers_pubsub.PubSubOptions.html