Skip to content

Commit 9dec16a

Browse files
committed
wip(feathers-webpush): Migrate feathers-webpush to this monorepo #2 (docs)
1 parent 61e00d4 commit 9dec16a

14 files changed

Lines changed: 14 additions & 22 deletions

File tree

docs/packages/feathers-webpush/api/client.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
title: Client
2+
title: Client API
3+
description: Client-side utilities for web push notifications
34
---
45

56
# Client
@@ -18,8 +19,6 @@ It verifies:
1819
|------|-------------|
1920
| `NotificationsNotSupported` (498) | If the browser does not support push notifications or the Notifications API. |
2021

21-
---
22-
2322
## requestNotificationPermission()
2423

2524
Requests the user's permission to display notifications.
@@ -38,8 +37,6 @@ If the current permission state is `default`, the browser prompts the user to gr
3837
|------|-------------|
3938
| `PermissionDeniedNotifications` (499) | If permission is denied (either previously or during the request). |
4039

41-
---
42-
4340
## getPushSubscription()
4441

4542
Retrieves the current push subscription from the registered service worker.
@@ -56,8 +53,6 @@ Retrieves the current push subscription from the registered service worker.
5653
|------|-------------|
5754
| `ServiceWorkerNotRegistered` (497) | If no service worker is registered. |
5855

59-
---
60-
6156
## subscribePushNotifications(publicVapidKey)
6257

6358
Subscribes the user to push notifications using the provided VAPID public key.
@@ -74,8 +69,6 @@ Subscribes the user to push notifications using the provided VAPID public key.
7469
|------|-------------|
7570
| `Promise<Object>` | Resolves to a serializable push subscription object. |
7671

77-
---
78-
7972
## unsubscribePushNotifications()
8073

8174
Unsubscribes the current push subscription.
@@ -86,8 +79,6 @@ Unsubscribes the current push subscription.
8679
|------|-------------|
8780
| `Promise<PushSubscription>` | Resolves to the unsubscribed `PushSubscription` object. |
8881

89-
---
90-
9182
## addSubscription(subscription, currentSubscription, subscriptionProperty)
9283

9384
Adds a push subscription to a subscription container object if it does not already exist.
@@ -108,8 +99,6 @@ If the subscription already exists (same `endpoint`), it is not duplicated.
10899
|------|-------------|
109100
| `Array` | The updated array of subscriptions. |
110101

111-
---
112-
113102
## removeSubscription(subscription, currentSubscription, subscriptionProperty)
114103

115104
Removes a push subscription from a subscription container object.

docs/packages/feathers-webpush/api/server/hooks.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: hooks
3+
description: Feathers hooks for managing and cleaning up web push subscriptions automatically
34
---
45

56
# Hooks

docs/packages/feathers-webpush/api/server/service.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Service
3+
description: A Feathers service for sending web push notifications
34
---
45

56
# Service

docs/packages/feathers-webpush/index.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: feathers-webpush
3+
description: Overview of feathers-webpush
4+
---
5+
16
# feathers-webpush
27

38
**feathers-webpush** module provides a simplified way to send web push notifications in a FeathersJS application. It leverages the [web-push package](https://github.com/web-push-libs/web-push) to interact with the [Web Push protocol](https://web.dev/articles/push-notifications-web-push-protocol).
@@ -12,14 +17,10 @@ pnpm add @kalisio/feathers-webpush
1217

1318
## Configuration
1419

15-
The provided [example](./example/README.md) illustrates how to setup:
1620

17-
* a server app
1821

19-
https://github.com/kalisio/feathers-webpush/blob/6b09d58428923c95e26cd5keycloak-listener8d130bc6b268c4cb30/example/server.mjs#L1-L46
2022

21-
* a client app
23+
## Examples
2224

23-
https://github.com/kalisio/feathers-webpush/blob/6b09d58428923c95e26cd58d130bc6b268c4cb30/example/src/index.html#L1-L66
25+
A complete [example](https://github.com/kalisio/feathers-ekosystem/tree/master/packages/examples/feathers-webpush) is provided.
2426

25-
https://github.com/kalisio/feathers-webpush/blob/6b09d58428923c95e26cd58d130bc6b268c4cb30/example/src/index.js#L1-L122
File renamed without changes.
File renamed without changes.
File renamed without changes.

packages/examples/feathers-webpush/client/service-worker.js renamed to examples/feathers-webpush/client/service-worker.js

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)