Skip to content

Commit 72fd837

Browse files
cabljacdackers86
andauthored
chore: renaming of extension and updated documentation
Co-authored-by: dackers86 <[email protected]>
1 parent 619f448 commit 72fd837

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+340
-21412
lines changed

.github/workflows/validate.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ jobs:
1919
run: npm run check:formatting
2020
- name: Check TS Compiles
2121
run: npm run check:typescript
22+
- name: Check Spelling & Grammar
23+
run: npm run check:spelling

dictionary.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ module.exports = [
5959
/^firebase/,
6060
/^href/,
6161
/^stringified/,
62-
/^acknowledgement/,
63-
/^acknowledgements/,
62+
/^acknowledgment/,
63+
/^acknowledgments/,
6464
/^unacknowledge/,
65+
/^uid/,
66+
/^nodemailer/,
67+
/^archiver/,
68+
/^unacknowledgment/,
6569
];

docs.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
]
1717
],
1818
[
19-
"Record User Acknowledgements",
19+
"Firestore Record Acknowledgments",
2020
[
21-
["Overview", "/record-user-acknowledgements"],
22-
["Reference API", "/record-user-acknowledgements/reference"]
21+
["Overview", "/firestore-record-acknowledgments"],
22+
["Reference API", "/firestore-record-acknowledgments/reference"]
2323
]
2424
],
2525
[

docs/export-user-data/usage.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ listResults.forEach((result) => {
156156
});
157157
```
158158

159-
To generate download links for the client, use the `getDownloadURL` function using a export files path:
159+
To generate download links for the client, use the `getDownloadURL` function using an export files path:
160160

161161
```js
162162
import { listAll, ref, getDownloadURL } from 'firebase/storage';
Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Record User Acknowledgements
1+
# Firestore Record Acknowledgments
22

3-
The extension stores notices and acknowledgements as documents in a collection inside Firestore. You configure the collection during the installation process, when you set up the extension instance's configuration parameters.
3+
The extension stores notices and acknowledgments as documents in a collection inside Firestore. You configure the collection during the installation process, when you set up the extension instance's configuration parameters.
44

5-
The extensions' source code contains a [web app providing admin utilities](https://github.com/invertase/firebase-extensions/tree/main/extensions/firestore-record-user-acknowledgements/admin-dashboard) that you can run locally. This contains a notice builder UI that you can use to easily create and customize notices. Setup instructions are available in the above link provided. Once set up, navigate to [localhost:3000](http://localhost:3000) to see the notice builder tool.
5+
The extensions' source code contains a [web app providing admin utilities](https://github.com/invertase/firebase-extensions/tree/main/extensions/firestore-firestore-record-acknowledgments/admin-dashboard) that you can run locally. This contains a notice builder UI that you can use to easily create and customize notices. Setup instructions are available in the above link provided. Once set up, navigate to [localhost:3000](http://localhost:3000) to see the notice builder tool.
66

7-
![Admin Dashboard](/record-user-acknowldegements/assets/admin-dashboard-example.png)
7+
![Admin Dashboard](/firestore-record-acknowldegements/assets/admin-dashboard-example.png)
88

99
## Retrieving a notice
1010

@@ -16,13 +16,13 @@ import { getFunctions, httpsCallable } from 'firebase/functions';
1616
const functions = getFunctions();
1717
const notice = await httpsCallable(
1818
functions,
19-
'ext-firestore-record-user-acknowledgements-getNotice',
19+
'ext-firestore-firestore-record-acknowledgments-getNotice',
2020
)({
2121
type: 'banner',
2222
});
2323
```
2424

25-
Note: if multiple instances of this extension are installed the callable function name might contain a unique identifier, e.g. `ext-firestore-record-user-acknowledgements-<id>-getNotice`.
25+
Note: if multiple instances of this extension are installed the callable function name might contain a unique identifier, e.g. `ext-firestore-firestore-record-acknowledgments-<id>-getNotice`.
2626

2727
The response of the function call will contain the notice document data, along with whether the current authenticated user has acknowledged the notice.
2828

@@ -34,43 +34,43 @@ import { getFunctions, httpsCallable } from 'firebase/functions';
3434
const functions = getFunctions();
3535
const notice = await httpsCallable(
3636
functions,
37-
'ext-firestore-record-user-acknowledgements-getNotice',
37+
'ext-firestore-firestore-record-acknowledgments-getNotice',
3838
)({
3939
type: 'banner',
4040
version: 2,
4141
});
4242
```
4343

44-
View the [reference API](/record-user-acknowldegements/reference) for full details on the response interface.
44+
View the [reference API](/firestore-record-acknowldegements/reference) for full details on the response interface.
4545

4646
## Acknowledging a notice
4747

48-
To acknowledge a notice, the extension provides two callable functions which accept the notice ID: `acknowledgeNotice` & `unacknowledgeNotice`. The extension will keep historical records of each acknowledgement the callable functions are called multiple times for the same user and notice.
48+
To acknowledge a notice, the extension provides two callable functions which accept the notice ID: `acknowledgeNotice` & `unacknowledgeNotice`. The extension will keep historical records of each acknowledgment the callable functions are called multiple times for the same user and notice.
4949

5050
For example, to acknowledge a notice:
5151

5252
```js
5353
import { getFunctions, httpsCallable } from "firebase/functions";
5454

5555
const functions = getFunctions();
56-
await httpsCallable(functions, 'ext-firestore-record-user-acknowledgements-acknowledgeNotice)({
56+
await httpsCallable(functions, 'ext-firestore-firestore-record-acknowledgments-acknowledgeNotice)({
5757
noticeId: 'EA9QhZKKta9KXcckiasc',
5858
});
5959
```
6060
61-
In-case you need to capture custom preferences relating to an acknowledgement, you can provide custom metadata to the function, for example:
61+
In-case you need to capture custom preferences relating to an acknowledgment, you can provide custom metadata to the function, for example:
6262
6363
```js
64-
await httpsCallable(functions, 'ext-firestore-record-user-acknowledgements-acknowledgeNotice)({
64+
await httpsCallable(functions, 'ext-firestore-firestore-record-acknowledgments-acknowledgeNotice)({
6565
noticeId: 'EA9QhZKKta9KXcckiasc',
6666
metadata: { preference1: true, preference2: false },
6767
});
6868
```
6969

70-
You can also provide a custom “type” of acknowledgement (the default type is “seen”), for example:
70+
You can also provide a custom “type” of acknowledgment (the default type is “seen”), for example:
7171

7272
```js
73-
await httpsCallable(functions, 'ext-firestore-record-user-acknowledgements-acknowledgeNotice)({
73+
await httpsCallable(functions, 'ext-firestore-firestore-record-acknowledgments-acknowledgeNotice)({
7474
noticeId: 'EA9QhZKKta9KXcckiasc',
7575
type: 'seen',
7676
});
@@ -79,40 +79,40 @@ await httpsCallable(functions, 'ext-firestore-record-user-acknowledgements-ackno
7979
If you wish to unacknowledge a notice, call the `unacknowledgeNotice` function:
8080
8181
```js
82-
await httpsCallable(functions, 'ext-firestore-record-user-acknowledgements-unacknowledgeNotice)({
82+
await httpsCallable(functions, 'ext-firestore-firestore-record-acknowledgments-unacknowledgeNotice)({
8383
noticeId: 'EA9QhZKKta9KXcckiasc',
8484
metadata: { reason: '...' },
8585
});
8686
```
8787

88-
## Retrieving acknowledgements
88+
## Retrieving acknowledgments
8989

90-
To retrieve all previous user notice acknowledgements, call the `getAcknowledgements` callable function. This function will return an ordered array of all acknowledgements along with the notice data:
90+
To retrieve all previous user notice acknowledgments, call the `getAcknowledgments` callable function. This function will return an ordered array of all acknowledgments along with the notice data:
9191

9292
```js
9393
import { getFunctions, httpsCallable } from "firebase/functions";
9494

9595
const functions = getFunctions();
96-
const acknowledgements = await httpsCallable(functions, 'ext-firestore-record-user-acknowledgements-getAcknowledgements)();
96+
const acknowledgments = await httpsCallable(functions, 'ext-firestore-firestore-record-acknowledgments-getAcknowledgments)();
9797
```
9898
99-
By default this won’t include unacknowledgement documents, however if those are required you can provide a `includeUnacknowledgements` property to the call:
99+
By default this won’t include unacknowledgment documents, however if those are required you can provide a `includeUnacknowledgments` property to the call:
100100
101101
```js
102102
import { getFunctions, httpsCallable } from "firebase/functions";
103103
104104
const functions = getFunctions();
105-
const acknowledgements = await httpsCallable(functions, 'ext-firestore-record-user-acknowledgements-getAcknowledgements)({
106-
includeUnacknowledgements: true,
105+
const acknowledgments = await httpsCallable(functions, 'ext-firestore-firestore-record-acknowledgments-getAcknowledgments)({
106+
includeUnacknowledgments: true,
107107
});
108108
```
109109

110-
## User specific acknowledgements
110+
## User specific acknowledgments
111111

112112
You may need to create custom notices that are shown to and can only be acknowledged by a specific subset of users. To accomplish this, specify an `allowList` array of UIDs to the notice document. If the user requesting a notice by type is not within the list of UIDs, a `not-found` error will be returned.
113113

114114
## Updating a notice
115115

116116
When it's time to update a notice, for example when additional user preferences are required, create a new notice document with the same `type` as the existing notice you wish to update.
117117

118-
When the notice is retrieved, a new notice document will be returned with no user acknowledgement, allowing users to acknowledge the newer notice.
118+
When the notice is retrieved, a new notice document will be returned with no acknowledgment, allowing users to acknowledge the newer notice.

docs/record-user-acknowledgements/reference.mdx renamed to docs/firestore-record-acknowledgments/reference.mdx

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# API Reference
22

3-
Below contains an overview of the specifications for the Record User Acknowledgements extension, including TypeScript definitions & detailed descriptions.
3+
Below contains an overview of the specifications for the Firestore Record Acknowledgments extension, including TypeScript definitions & detailed descriptions.
44

55
## `NoticeDocument` Interface
66

@@ -27,12 +27,12 @@ export interface NoticeDocument {
2727
}
2828
```
2929

30-
## `AcknowledgementDocument` Interface
30+
## `AcknowledgmentDocument` Interface
3131

3232
The specification for a single document within a notice sub-collection:
3333

3434
```ts
35-
type BaseAcknowledgement = {
35+
type BaseAcknowledgment = {
3636
// The document ID.
3737
id: string;
3838
// The UID of the user who acknowledged the notice.
@@ -41,19 +41,19 @@ type BaseAcknowledgement = {
4141
noticeId: string;
4242
// The timestamp when the notice was acknowledged.
4343
createdAt: Timestamp;
44-
// The optional metadata of the acknowledgement.
44+
// The optional metadata of the acknowledgment.
4545
metadata: any;
4646
};
4747

48-
export type AcknowledgementDocument =
49-
| (BaseAcknowledgement & {
50-
// The type of the acknowledgement.
48+
export type AcknowledgmentDocument =
49+
| (BaseAcknowledgment & {
50+
// The type of the acknowledgment.
5151
ackEvent: 'acknowledged';
52-
// The type of the acknowledgement. Defaults to `seen`.
52+
// The type of the acknowledgment. Defaults to `seen`.
5353
type: string;
5454
})
55-
| (BaseAcknowledgement & {
56-
// The type of the acknowledgement.
55+
| (BaseAcknowledgment & {
56+
// The type of the acknowledgment.
5757
ackEvent: 'unacknowledged';
5858
});
5959
```
@@ -80,8 +80,8 @@ export type GetNoticeResponse = Omit<NoticeDocument, ‘allowList’> & {
8080
// The timestamp when the notice was unacknowledged by the user (undefined if the user has not unacknowledged this notice).
8181
unacknowledgedAt?: Timestamp;
8282

83-
// An ordered array of user acknowledgements.
84-
acknowledgements: AcknowledgementDocument[];
83+
// An ordered array of acknowledgments.
84+
acknowledgments: AcknowledgmentDocument[];
8585
}
8686
```
8787
@@ -93,9 +93,9 @@ The response interface provided to a `acknowledgeNotice` callable function:
9393
export interface AcknowledgeNoticeRequest {
9494
// The notice ID to acknowledge.
9595
noticeId: string;
96-
// A custom type to provide as the acknowledgement. Defaults to `seen`.
96+
// A custom type to provide as the acknowledgment. Defaults to `seen`.
9797
type?: string;
98-
// Optional preference metadata to store with this acknowledgement.
98+
// Optional preference metadata to store with this acknowledgment.
9999
metadata?: any;
100100
}
101101
```
@@ -108,29 +108,29 @@ The response interface provided to a `unacknowledgeNotice` callable function:
108108
export interface UnacknowledgeNoticeRequest {
109109
// The notice ID to unacknowledge.
110110
noticeId: string;
111-
// Optional preference metadata to store with this unacknowledgement.
111+
// Optional preference metadata to store with this unacknowledgment.
112112
metadata?: any;
113113
}
114114
```
115115

116-
## `GetAcknowledgementsRequest` Interface
116+
## `GetAcknowledgmentsRequest` Interface
117117

118-
The response interface provided to a `getAcknowledgements` callable function:
118+
The response interface provided to a `getAcknowledgments` callable function:
119119

120120
```ts
121-
export interface GetAcknowledgementsRequest {
122-
// If true, include unacknowledgement documents.
123-
includeUnacknowledgements?: boolean;
121+
export interface GetAcknowledgmentsRequest {
122+
// If true, include unacknowledgment documents.
123+
includeUnacknowledgments?: boolean;
124124
}
125125
```
126126

127-
## `GetAcknowledgementsResponse` Interface
127+
## `GetAcknowledgmentsResponse` Interface
128128

129-
The response interface provided to a `getAcknowledgements` callable function:
129+
The response interface provided to a `getAcknowledgments` callable function:
130130

131131
```ts
132-
export type GetAcknowledgementsResponse = (AcknowledgementDocument & {
133-
// The notice of this acknowledgement, excluding the allowList.
132+
export type GetAcknowledgmentsResponse = (AcknowledgmentDocument & {
133+
// The notice of this acknowledgment, excluding the allowList.
134134
notice: Omit<NoticeDocument, ‘allowList’>;
135135
})[];
136136
```

docs/index.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<h2 align="center">Invertase Firebase Extensions</h2>
77
</p>
88

9-
| Name | Description |
10-
| ------------------------------------------------------------- | :----------------------------------------------------------------------------: |
11-
| [Image Processing Api](/image-processing-api) | Firebase deployed function for processing and rendering images. |
12-
| [Record User Acknowledgements](/record-user-acknowledgements) | Provides an out of the box acknowledgement management extension for Firestore. |
9+
| Name | Description |
10+
| --------------------------------------------------------------------- | :---------------------------------------------------------------------------: |
11+
| [Image Processing Api](/image-processing-api) | Firebase deployed function for processing and rendering images. |
12+
| [Firestore Record Acknowledgments](/firestore-record-acknowledgments) | Provides an out of the box acknowledgment management extension for Firestore. |

0 commit comments

Comments
 (0)