@bygnet/types 1.3.2 → 1.4.0
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/dist/content/notification.d.ts +12 -0
- package/dist/index.d.ts +2 -1
- package/dist/web/push.d.ts +23 -0
- package/package.json +2 -2
- package/src/index.ts +2 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BygSubscription } from '../unions/subscription';
|
|
2
|
+
export type BygNotificationType = 'follow' | 'post_comment' | 'image_comment';
|
|
3
|
+
export interface BygNotification {
|
|
4
|
+
id: string;
|
|
5
|
+
type: BygNotificationType;
|
|
6
|
+
actorUsername: string;
|
|
7
|
+
actorAvatarUrl: string | null;
|
|
8
|
+
actorSubscriptionState: BygSubscription;
|
|
9
|
+
text: string;
|
|
10
|
+
path: string;
|
|
11
|
+
createdDate: string;
|
|
12
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export * from './content/ad';
|
|
2
2
|
export * from './content/comment';
|
|
3
3
|
export * from './content/image';
|
|
4
|
+
export * from './content/notification';
|
|
4
5
|
export * from './content/post';
|
|
5
|
-
export * from './content/shop';
|
|
6
6
|
export * from './people/profile';
|
|
7
7
|
export * from './people/user';
|
|
8
8
|
export * from './unions/create';
|
|
9
9
|
export * from './unions/subscription';
|
|
10
10
|
export * from './web/page';
|
|
11
|
+
export * from './web/push';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface BygPushSubscriptionKeys {
|
|
2
|
+
p256dh: string;
|
|
3
|
+
auth: string;
|
|
4
|
+
}
|
|
5
|
+
export interface BygPushSubscription {
|
|
6
|
+
endpoint: string;
|
|
7
|
+
expirationTime: number | null;
|
|
8
|
+
keys: BygPushSubscriptionKeys;
|
|
9
|
+
}
|
|
10
|
+
export interface BygPushUnsubscribeRequest {
|
|
11
|
+
endpoint: string;
|
|
12
|
+
}
|
|
13
|
+
export interface BygPushPublicKeyResponse {
|
|
14
|
+
publicKey: string;
|
|
15
|
+
}
|
|
16
|
+
export interface BygPushAlertPayload {
|
|
17
|
+
type: 'follow' | 'post_comment' | 'image_comment';
|
|
18
|
+
title: string;
|
|
19
|
+
body: string;
|
|
20
|
+
path: string;
|
|
21
|
+
tag: string;
|
|
22
|
+
createdDate: string;
|
|
23
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bygnet/types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Byg Platform's types for posts, images, and more, for Byg devs and the community.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"social-network",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"format:check": "prettier --check ."
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@
|
|
40
|
+
"@opk/ts-pkg": "^0.6.1",
|
|
41
41
|
"prettier": "^3.8.1"
|
|
42
42
|
}
|
|
43
43
|
}
|
package/src/index.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
export * from './content/ad'
|
|
3
3
|
export * from './content/comment'
|
|
4
4
|
export * from './content/image'
|
|
5
|
+
export * from './content/notification'
|
|
5
6
|
export * from './content/post'
|
|
6
|
-
export * from './content/shop'
|
|
7
7
|
|
|
8
8
|
// people
|
|
9
9
|
export * from './people/profile'
|
|
@@ -15,3 +15,4 @@ export * from './unions/subscription'
|
|
|
15
15
|
|
|
16
16
|
// web
|
|
17
17
|
export * from './web/page'
|
|
18
|
+
export * from './web/push'
|