Skip to content

Commit

Permalink
docs: small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexiglesias93 committed Jan 10, 2023
1 parent 0275c75 commit 6de0a21
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/new-cycles-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'fireworkers': patch
---

docs: small fixes
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ Type: `string`

The `private_key` defined in the `serviceAccountKey.json`.

#### options.client_email
#### options.private_key_id

Type: `string`

The `client_email` defined in the `serviceAccountKey.json`.
The `private_key_id` defined in the `serviceAccountKey.json`.

#### (Optional) options.claims

Type: `Record<string, string | number | boolean>` | `undefined`

Optional custom claims to include in the Security Rules `auth / request.auth` variables
Optional custom claims to include in the [Security Rules](https://firebase.google.com/docs/firestore/security/get-started) `auth / request.auth` variables.

```typescript
const db = await Firestore.init({
Expand All @@ -88,7 +88,7 @@ const db = await Firestore.init({
});
```

### get(db, collection, documentId)
### get(db, collection, document)

Gets a single document.

Expand All @@ -114,7 +114,7 @@ The document ID.
const todo = await Firestore.get(db, 'todos', 'aDyjLiTViX1G7HyF74Ax');
```

### create(db, collection, documentId)
### create(db, collection, document)

Creates a new document.

Expand Down Expand Up @@ -143,7 +143,7 @@ const newTodo = await Firestore.create(db, 'todos', {
});
```

### update(db, collection, documentId)
### update(db, collection, document)

Updates or inserts a document.

Expand Down Expand Up @@ -177,7 +177,7 @@ const updatedTodo = await Firestore.update(db, 'todos', 'aDyjLiTViX1G7HyF74Ax',
});
```

### remove(db, collection, documentId)
### remove(db, collection, document)

Removes a document.

Expand All @@ -203,7 +203,7 @@ The document ID.
const todo = await Firestore.remove(db, 'todos', 'aDyjLiTViX1G7HyF74Ax');
```

### query(db, collection, documentId)
### query(db, collection, document)

Runs a query.

Expand Down

0 comments on commit 6de0a21

Please sign in to comment.