This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const functions = require('firebase-functions'); | |
const Logging = require('@google-cloud/logging'); | |
const { | |
WebhookClient | |
} = require('dialogflow-fulfillment'); | |
const admin = require('firebase-admin'); | |
admin.initializeApp(); | |
const db = admin.firestore(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const functions = require('firebase-functions'); | |
const { | |
Logging | |
} = require('@google-cloud/logging'); | |
const { | |
WebhookClient | |
} = require('dialogflow-fulfillment'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// const logging = new Logging(); | |
// const log = logging.log(logName); | |
// function getLogEntries() { | |
// const logging = Logging(); | |
// const options = { | |
// pageSize: 10, | |
// filter: 'resource.type="cloud_function"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const functions = require('firebase-functions'); | |
const {Logging } = require('@google-cloud/logging'); | |
const {WebhookClient} = require('dialogflow-fulfillment'); | |
const admin = require('firebase-admin'); | |
admin.initializeApp(); | |
const db = admin.firestore(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "functions", | |
"description": "Cloud Functions for Firebase", | |
"scripts": { | |
"serve": "firebase emulators:start --only functions", | |
"shell": "firebase functions:shell", | |
"start": "npm run shell", | |
"deploy": "firebase deploy --only functions", | |
"deployDialogflowFulfilment": "firebase deploy --only functions:dialogflowFirebaseFulfillment", | |
"logs": "firebase functions:log" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// Importar os módulos necessários | |
const {dialogflow} = require('actions-on-google'); | |
const functions = require('firebase-functions'); | |
const admin = require('firebase-admin'); | |
//Inicializar a app Firebase | |
admin.initializeApp({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The Cloud Functions for Firebase SDK to create Cloud Functions and setup triggers. | |
const functions = require('firebase-functions'); | |
// The Firebase Admin SDK to access the Firebase Realtime Database. | |
const admin = require('firebase-admin'); | |
admin.initializeApp(functions.config().firebase); | |
exports.dialogflowFirebaseFulfillment = functions.https.onRequest((request, response) => { | |
console.log('Request headers: ' + JSON.stringify(request.headers)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const functions = require('firebase-functions'); | |
const {Logging } = require('@google-cloud/logging'); | |
const {WebhookClient} = require('dialogflow-fulfillment'); | |
const admin = require('firebase-admin'); | |
admin.initializeApp(); | |
const db = admin.firestore(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const functions = require('firebase-functions'); | |
const { | |
Logging | |
} = require('@google-cloud/logging'); | |
const { | |
WebhookClient | |
} = require('dialogflow-fulfillment'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const functions = require('firebase-functions'); | |
const { | |
Logging | |
} = require('@google-cloud/logging'); | |
const { | |
WebhookClient | |
} = require('dialogflow-fulfillment'); |
OlderNewer