import { Request , Response } from "express" ; import PubsubEvent = GoogleCloudPlatform . CloudFunctions . PubsubEvent ; import StorageEvent = GoogleCloudPlatform . CloudFunctions . StorageEvent ; import Callback = GoogleCloudPlatform . CloudFunctions . Callback ; import * as settings from "./settings.json" ; console . log ( settings ) ; export function helloWorldHTTP ( req , res ) { console . log ( req ) ; res . status ( 200 ) . type ( "application/json" ) . send ( "{ \"result\": \"Hello World!\"}" ) . end ( ) ; } export function helloWorldPubSub ( event , callback ) { console . log ( "Hello World! I have got event from Google Cloud Pub/Sub topic: " , event . data ) ; callback ( ) ; } export function helloWorldStorage ( event , callback ) { console . log ( "Hello World! I have got event from Google Cloud Storage bucket: " , event . data ) ; callback ( ) ; }