11import * as admin from "firebase-admin" ;
2- import * as functions from "firebase-functions" ;
2+ import * as functions from "firebase-functions/v1 " ;
33import { REGION } from "../region" ;
44import { sanitizeData } from "../utils" ;
55
6- export const firestoreDocumentOnCreateTests : any = functions
6+ export const firestoreDocumentOnCreateTests = functions
77 . runWith ( {
88 timeoutSeconds : 540 ,
99 } )
1010 . region ( REGION )
1111 . firestore . document ( "tests/{testId}" )
12- . onCreate ( async ( snapshot , context ) => {
12+ . onCreate ( async ( _snapshot , context ) => {
1313 const testId = context . params . testId ;
1414 await admin
1515 . firestore ( )
@@ -18,13 +18,13 @@ export const firestoreDocumentOnCreateTests: any = functions
1818 . set ( sanitizeData ( context ) ) ;
1919 } ) ;
2020
21- export const firestoreDocumentOnDeleteTests : any = functions
21+ export const firestoreDocumentOnDeleteTests = functions
2222 . runWith ( {
2323 timeoutSeconds : 540 ,
2424 } )
2525 . region ( REGION )
2626 . firestore . document ( "tests/{testId}" )
27- . onDelete ( async ( snapshot , context ) => {
27+ . onDelete ( async ( _snapshot , context ) => {
2828 const testId = context . params . testId ;
2929 await admin
3030 . firestore ( )
@@ -33,13 +33,13 @@ export const firestoreDocumentOnDeleteTests: any = functions
3333 . set ( sanitizeData ( context ) ) ;
3434 } ) ;
3535
36- export const firestoreDocumentOnUpdateTests : any = functions
36+ export const firestoreDocumentOnUpdateTests = functions
3737 . runWith ( {
3838 timeoutSeconds : 540 ,
3939 } )
4040 . region ( REGION )
4141 . firestore . document ( "tests/{testId}" )
42- . onUpdate ( async ( change , context ) => {
42+ . onUpdate ( async ( _change , context ) => {
4343 const testId = context . params . testId ;
4444 await admin
4545 . firestore ( )
@@ -48,13 +48,13 @@ export const firestoreDocumentOnUpdateTests: any = functions
4848 . set ( sanitizeData ( context ) ) ;
4949 } ) ;
5050
51- export const firestoreDocumentOnWriteTests : any = functions
51+ export const firestoreDocumentOnWriteTests = functions
5252 . runWith ( {
5353 timeoutSeconds : 540 ,
5454 } )
5555 . region ( REGION )
5656 . firestore . document ( "tests/{testId}" )
57- . onWrite ( async ( change , context ) => {
57+ . onWrite ( async ( _change , context ) => {
5858 const testId = context . params . testId ;
5959 await admin
6060 . firestore ( )
0 commit comments