@flighthq/notification 0.5.0-next.1944.cd6b6e7 → 0.5.1-edge.638.d4dbd4e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/notification.d.ts +35 -47
- package/dist/notification.d.ts.map +1 -1
- package/dist/notification.js +258 -697
- package/dist/notification.js.map +1 -1
- package/package.json +4 -2
- package/src/notification.test.ts +424 -827
package/README.md
CHANGED
|
@@ -13,5 +13,5 @@ Import the supported application-facing API from `@flighthq/notification`. The `
|
|
|
13
13
|
This package is part of the locked-version Flight SDK graph. Applications may instead install and import `@flighthq/sdk` when package-level tree shaking is sufficient.
|
|
14
14
|
|
|
15
15
|
- [Flight project](https://github.com/flighthq/flight)
|
|
16
|
-
- [Source for @flighthq/notification@0.5.
|
|
17
|
-
- [License](https://github.com/flighthq/flight/blob/
|
|
16
|
+
- [Source for @flighthq/notification@0.5.1-edge.638.d4dbd4e](https://github.com/flighthq/flight/tree/d4dbd4e347dc8be10b180c85a766ab50333dcb51/packages/notification)
|
|
17
|
+
- [License](https://github.com/flighthq/flight/blob/d4dbd4e347dc8be10b180c85a766ab50333dcb51/LICENSE.md)
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { attachNotificationActionSubscription, attachNotificationClickSubscription, attachNotificationDismissSubscription, attachNotificationReceivedSubscription, attachNotificationReplySubscription, cancelScheduledNotification, closeAllNotifications, closeNotification, createNotificationActionSubscription, createNotificationClickSubscription, createNotificationDismissSubscription, createNotificationReceivedSubscription, createNotificationReplySubscription, destroyNotificationCapabilities, detachNotificationActionSubscription, detachNotificationClickSubscription, detachNotificationDismissSubscription, detachNotificationReceivedSubscription, detachNotificationReplySubscription, disposeNotificationActionSubscription, disposeNotificationClickSubscription, disposeNotificationDismissSubscription, disposeNotificationReceivedSubscription, disposeNotificationReplySubscription, getActiveNotifications, getNotificationPermission, getPendingNotifications, requestNotificationPermission, scheduleNotification, showNotification, } from './contract';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oCAAoC,EACpC,mCAAmC,EACnC,qCAAqC,EACrC,sCAAsC,EACtC,mCAAmC,EACnC,2BAA2B,EAC3B,qBAAqB,EACrB,iBAAiB,EACjB,oCAAoC,EACpC,mCAAmC,EACnC,qCAAqC,EACrC,sCAAsC,EACtC,mCAAmC,EACnC,+BAA+B,EAC/B,oCAAoC,EACpC,mCAAmC,EACnC,qCAAqC,EACrC,sCAAsC,EACtC,mCAAmC,EACnC,qCAAqC,EACrC,oCAAoC,EACpC,sCAAsC,EACtC,uCAAuC,EACvC,oCAAoC,EACpC,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,EACvB,6BAA6B,EAC7B,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { attachNotificationActionSubscription, attachNotificationClickSubscription, attachNotificationDismissSubscription, attachNotificationReceivedSubscription, attachNotificationReplySubscription, cancelScheduledNotification, closeAllNotifications, closeNotification, createNotificationActionSubscription, createNotificationClickSubscription, createNotificationDismissSubscription, createNotificationReceivedSubscription, createNotificationReplySubscription, destroyNotificationCapabilities, detachNotificationActionSubscription, detachNotificationClickSubscription, detachNotificationDismissSubscription, detachNotificationReceivedSubscription, detachNotificationReplySubscription, disposeNotificationActionSubscription, disposeNotificationClickSubscription, disposeNotificationDismissSubscription, disposeNotificationReceivedSubscription, disposeNotificationReplySubscription, getActiveNotifications, getNotificationPermission, getPendingNotifications, requestNotificationPermission, scheduleNotification, showNotification, } from './contract';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oCAAoC,EACpC,mCAAmC,EACnC,qCAAqC,EACrC,sCAAsC,EACtC,mCAAmC,EACnC,2BAA2B,EAC3B,qBAAqB,EACrB,iBAAiB,EACjB,oCAAoC,EACpC,mCAAmC,EACnC,qCAAqC,EACrC,sCAAsC,EACtC,mCAAmC,EACnC,+BAA+B,EAC/B,oCAAoC,EACpC,mCAAmC,EACnC,qCAAqC,EACrC,sCAAsC,EACtC,mCAAmC,EACnC,qCAAqC,EACrC,oCAAoC,EACpC,sCAAsC,EACtC,uCAAuC,EACvC,oCAAoC,EACpC,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,EACvB,6BAA6B,EAC7B,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,YAAY,CAAC"}
|
package/dist/notification.d.ts
CHANGED
|
@@ -1,48 +1,36 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export declare function
|
|
13
|
-
export declare function
|
|
14
|
-
export declare function
|
|
15
|
-
export declare function
|
|
16
|
-
export declare function
|
|
17
|
-
export declare function
|
|
18
|
-
export declare function
|
|
19
|
-
export declare function
|
|
20
|
-
export declare function
|
|
21
|
-
export declare function
|
|
22
|
-
export declare function
|
|
23
|
-
export declare function
|
|
24
|
-
export declare function
|
|
25
|
-
export declare function
|
|
26
|
-
export declare function
|
|
27
|
-
export declare function
|
|
28
|
-
export declare function
|
|
29
|
-
export declare function
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
export declare function
|
|
36
|
-
export declare function onNotificationAction(listener: (id: string, actionId: string) => void): () => void;
|
|
37
|
-
export declare function onNotificationClick(listener: (id: string) => void): () => void;
|
|
38
|
-
export declare function onNotificationDismiss(listener: (id: string) => void): () => void;
|
|
39
|
-
export declare function onNotificationReply(listener: (id: string, actionId: string, text: string) => void): () => void;
|
|
40
|
-
export declare function onNotificationShow(listener: (id: string) => void): () => void;
|
|
41
|
-
export declare function requestNotificationPermission(): Promise<NotificationPermission>;
|
|
42
|
-
export declare function resetNotificationBackendForTest(): void;
|
|
43
|
-
export declare function scheduleNotification(request: Readonly<NotificationRequest>, schedule: Readonly<NotificationSchedule>): Promise<string>;
|
|
44
|
-
export declare function setNotificationBackend(backend: NotificationBackend | null): void;
|
|
45
|
-
export declare function showNotification(request: Readonly<NotificationRequest>): Promise<string>;
|
|
46
|
-
export declare function updateNotification(id: string, partial: Readonly<Partial<NotificationRequest>>): Promise<boolean>;
|
|
47
|
-
export {};
|
|
1
|
+
import type { HasNotificationAction, HasNotificationActiveList, HasNotificationClick, HasNotificationClose, HasNotificationDelivery, HasNotificationDismiss, HasNotificationLifecycle, HasNotificationPermission, HasNotificationReceived, HasNotificationReply, HasNotificationScheduling, Notification, NotificationActionSubscription, NotificationActiveListOutcome, NotificationCancelOutcome, NotificationClickSubscription, NotificationCloseOutcome, NotificationDeliveryOutcome, NotificationDismissSubscription, NotificationLifecycleOutcome, NotificationPendingListOutcome, NotificationPermissionQueryOutcome, NotificationPermissionRequestOutcome, NotificationReceivedSubscription, NotificationReplySubscription, NotificationRequest, NotificationSchedule, NotificationScheduleOutcome, NotificationSubscriptionAttachOutcome, NotificationSubscriptionDetachOutcome, NotificationSubscriptionDisposeOutcome, ScheduledNotification } from '@flighthq/types/contract';
|
|
2
|
+
export declare function attachNotificationActionSubscription(host: HasNotificationAction, subscription: NotificationActionSubscription): Promise<NotificationSubscriptionAttachOutcome>;
|
|
3
|
+
export declare function attachNotificationClickSubscription(host: HasNotificationClick, subscription: NotificationClickSubscription): Promise<NotificationSubscriptionAttachOutcome>;
|
|
4
|
+
export declare function attachNotificationDismissSubscription(host: HasNotificationDismiss, subscription: NotificationDismissSubscription): Promise<NotificationSubscriptionAttachOutcome>;
|
|
5
|
+
export declare function attachNotificationReceivedSubscription(host: HasNotificationReceived, subscription: NotificationReceivedSubscription): Promise<NotificationSubscriptionAttachOutcome>;
|
|
6
|
+
export declare function attachNotificationReplySubscription(host: HasNotificationReply, subscription: NotificationReplySubscription): Promise<NotificationSubscriptionAttachOutcome>;
|
|
7
|
+
export declare function bindNotificationClose(notification: Notification, close: () => Promise<NotificationCloseOutcome>): void;
|
|
8
|
+
export declare function bindScheduledNotificationCancel(scheduled: ScheduledNotification, cancel: () => Promise<NotificationCancelOutcome>): void;
|
|
9
|
+
export declare function cancelScheduledNotification(scheduled: ScheduledNotification): Promise<NotificationCancelOutcome>;
|
|
10
|
+
export declare function closeAllNotifications(host: HasNotificationClose): Promise<NotificationLifecycleOutcome>;
|
|
11
|
+
export declare function closeNotification(notification: Notification): Promise<NotificationCloseOutcome>;
|
|
12
|
+
export declare function createNotificationActionSubscription(): NotificationActionSubscription;
|
|
13
|
+
export declare function createNotificationClickSubscription(): NotificationClickSubscription;
|
|
14
|
+
export declare function createNotificationDismissSubscription(): NotificationDismissSubscription;
|
|
15
|
+
export declare function createNotificationReceivedSubscription(): NotificationReceivedSubscription;
|
|
16
|
+
export declare function createNotificationReplySubscription(): NotificationReplySubscription;
|
|
17
|
+
export declare function createNotificationResource(id: string, title: string, tag?: string): Notification;
|
|
18
|
+
export declare function createScheduledNotificationResource(id: string, request: Readonly<NotificationRequest>, schedule: Readonly<NotificationSchedule>): ScheduledNotification;
|
|
19
|
+
export declare function destroyNotificationCapabilities(host: HasNotificationLifecycle): Promise<NotificationLifecycleOutcome>;
|
|
20
|
+
export declare function detachNotificationActionSubscription(subscription: NotificationActionSubscription): Promise<NotificationSubscriptionDetachOutcome>;
|
|
21
|
+
export declare function detachNotificationClickSubscription(subscription: NotificationClickSubscription): Promise<NotificationSubscriptionDetachOutcome>;
|
|
22
|
+
export declare function detachNotificationDismissSubscription(subscription: NotificationDismissSubscription): Promise<NotificationSubscriptionDetachOutcome>;
|
|
23
|
+
export declare function detachNotificationReceivedSubscription(subscription: NotificationReceivedSubscription): Promise<NotificationSubscriptionDetachOutcome>;
|
|
24
|
+
export declare function detachNotificationReplySubscription(subscription: NotificationReplySubscription): Promise<NotificationSubscriptionDetachOutcome>;
|
|
25
|
+
export declare function disposeNotificationActionSubscription(subscription: NotificationActionSubscription): Promise<NotificationSubscriptionDisposeOutcome>;
|
|
26
|
+
export declare function disposeNotificationClickSubscription(subscription: NotificationClickSubscription): Promise<NotificationSubscriptionDisposeOutcome>;
|
|
27
|
+
export declare function disposeNotificationDismissSubscription(subscription: NotificationDismissSubscription): Promise<NotificationSubscriptionDisposeOutcome>;
|
|
28
|
+
export declare function disposeNotificationReceivedSubscription(subscription: NotificationReceivedSubscription): Promise<NotificationSubscriptionDisposeOutcome>;
|
|
29
|
+
export declare function disposeNotificationReplySubscription(subscription: NotificationReplySubscription): Promise<NotificationSubscriptionDisposeOutcome>;
|
|
30
|
+
export declare function getActiveNotifications(host: HasNotificationActiveList): Promise<NotificationActiveListOutcome>;
|
|
31
|
+
export declare function getNotificationPermission(host: HasNotificationPermission): Promise<NotificationPermissionQueryOutcome>;
|
|
32
|
+
export declare function getPendingNotifications(host: HasNotificationScheduling): Promise<NotificationPendingListOutcome>;
|
|
33
|
+
export declare function requestNotificationPermission(host: HasNotificationPermission): Promise<NotificationPermissionRequestOutcome>;
|
|
34
|
+
export declare function scheduleNotification(host: HasNotificationScheduling, request: Readonly<NotificationRequest>, schedule: Readonly<NotificationSchedule>): Promise<NotificationScheduleOutcome>;
|
|
35
|
+
export declare function showNotification(host: HasNotificationDelivery, request: Readonly<NotificationRequest>): Promise<NotificationDeliveryOutcome>;
|
|
48
36
|
//# sourceMappingURL=notification.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../src/notification.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../src/notification.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,EACzB,YAAY,EACZ,8BAA8B,EAC9B,6BAA6B,EAC7B,yBAAyB,EACzB,6BAA6B,EAC7B,wBAAwB,EACxB,2BAA2B,EAC3B,+BAA+B,EAG/B,4BAA4B,EAC5B,8BAA8B,EAC9B,kCAAkC,EAClC,oCAAoC,EACpC,gCAAgC,EAChC,6BAA6B,EAC7B,mBAAmB,EACnB,oBAAoB,EACpB,2BAA2B,EAC3B,qCAAqC,EACrC,qCAAqC,EACrC,sCAAsC,EACtC,qBAAqB,EAEtB,MAAM,0BAA0B,CAAC;AAElC,wBAAsB,oCAAoC,CACxD,IAAI,EAAE,qBAAqB,EAC3B,YAAY,EAAE,8BAA8B,GAC3C,OAAO,CAAC,qCAAqC,CAAC,CAOhD;AAED,wBAAsB,mCAAmC,CACvD,IAAI,EAAE,oBAAoB,EAC1B,YAAY,EAAE,6BAA6B,GAC1C,OAAO,CAAC,qCAAqC,CAAC,CAMhD;AAED,wBAAsB,qCAAqC,CACzD,IAAI,EAAE,sBAAsB,EAC5B,YAAY,EAAE,+BAA+B,GAC5C,OAAO,CAAC,qCAAqC,CAAC,CAMhD;AAED,wBAAsB,sCAAsC,CAC1D,IAAI,EAA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