@@ -53,15 +53,15 @@ For example, to acknowledge a notice:
53
53
import { getFunctions , httpsCallable } from " firebase/functions" ;
54
54
55
55
const functions = getFunctions ();
56
- await httpsCallable (functions, ' ext-firestore-firestore-record-acknowledgments-acknowledgeNotice)({
56
+ await httpsCallable (functions, ' ext-firestore-firestore-record-acknowledgments-acknowledgeNotice' )({
57
57
noticeId: ' EA9QhZKKta9KXcckiasc' ,
58
58
});
59
59
```
60
60
61
61
In-case you need to capture custom preferences relating to an acknowledgment, you can provide custom metadata to the function, for example:
62
62
63
63
``` js
64
- await httpsCallable(functions, ' ext- firestore- firestore- record- acknowledgments- acknowledgeNotice)({
64
+ await httpsCallable (functions, ' ext-firestore-firestore-record-acknowledgments-acknowledgeNotice' )({
65
65
noticeId: ' EA9QhZKKta9KXcckiasc' ,
66
66
metadata: { preference1: true , preference2: false },
67
67
});
@@ -70,7 +70,7 @@ await httpsCallable(functions, 'ext-firestore-firestore-record-acknowledgments-a
70
70
You can also provide a custom “type” of acknowledgment (the default type is “seen”), for example:
71
71
72
72
``` js
73
- await httpsCallable (functions, ' ext-firestore-firestore-record-acknowledgments-acknowledgeNotice)({
73
+ await httpsCallable (functions, ' ext-firestore-firestore-record-acknowledgments-acknowledgeNotice' )({
74
74
noticeId: ' EA9QhZKKta9KXcckiasc' ,
75
75
type: ' seen' ,
76
76
});
@@ -79,7 +79,7 @@ await httpsCallable(functions, 'ext-firestore-firestore-record-acknowledgments-a
79
79
If you wish to unacknowledge a notice, call the ` unacknowledgeNotice ` function:
80
80
81
81
``` js
82
- await httpsCallable(functions, ' ext- firestore- firestore- record- acknowledgments- unacknowledgeNotice)({
82
+ await httpsCallable (functions, ' ext-firestore-firestore-record-acknowledgments-unacknowledgeNotice' )({
83
83
noticeId: ' EA9QhZKKta9KXcckiasc' ,
84
84
metadata: { reason: ' ...' },
85
85
});
@@ -93,7 +93,7 @@ To retrieve all previous user notice acknowledgments, call the `getAcknowledgmen
93
93
import { getFunctions , httpsCallable } from " firebase/functions" ;
94
94
95
95
const functions = getFunctions ();
96
- const acknowledgments = await httpsCallable (functions, ' ext-firestore-firestore-record-acknowledgments-getAcknowledgments)();
96
+ const acknowledgments = await httpsCallable (functions, ' ext-firestore-firestore-record-acknowledgments-getAcknowledgments' )();
97
97
```
98
98
99
99
By default this won’t include unacknowledgment documents, however if those are required you can provide a ` includeUnacknowledgments ` property to the call:
@@ -102,7 +102,7 @@ By default this won’t include unacknowledgment documents, however if those are
102
102
import { getFunctions , httpsCallable } from " firebase/functions" ;
103
103
104
104
const functions = getFunctions ();
105
- const acknowledgments = await httpsCallable(functions, ' ext- firestore- firestore- record- acknowledgments- getAcknowledgments)({
105
+ const acknowledgments = await httpsCallable (functions, ' ext-firestore-firestore-record-acknowledgments-getAcknowledgments' )({
106
106
includeUnacknowledgments: true ,
107
107
});
108
108
```
0 commit comments