@bygnet/types 1.4.2 → 1.6.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/index.d.mts +117 -0
- package/package.json +12 -10
- package/src/index.ts +1 -0
- package/dist/content/ad.d.ts +0 -4
- package/dist/content/comment.d.ts +0 -6
- package/dist/content/image.d.ts +0 -10
- package/dist/content/message.d.ts +0 -86
- package/dist/content/notification.d.ts +0 -12
- package/dist/content/post.d.ts +0 -10
- package/dist/content/shop.d.ts +0 -7
- package/dist/content/user.d.ts +0 -1
- package/dist/index.d.ts +0 -11
- package/dist/people/profile.d.ts +0 -7
- package/dist/people/user.d.ts +0 -11
- package/dist/unions/create.d.ts +0 -1
- package/dist/unions/subscription.d.ts +0 -1
- package/dist/web/page.d.ts +0 -7
- package/dist/web/push.d.ts +0 -23
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
//#region src/content/ad.d.ts
|
|
2
|
+
interface BygAd {
|
|
3
|
+
name: string;
|
|
4
|
+
image: string;
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region src/content/comment.d.ts
|
|
8
|
+
interface BygComment {
|
|
9
|
+
id: number;
|
|
10
|
+
author: string;
|
|
11
|
+
content: string;
|
|
12
|
+
createdDate: string;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/content/image.d.ts
|
|
16
|
+
interface BygImage {
|
|
17
|
+
id: number;
|
|
18
|
+
title: string;
|
|
19
|
+
imageUrl: string;
|
|
20
|
+
author: string;
|
|
21
|
+
createdDate: string;
|
|
22
|
+
likes: number;
|
|
23
|
+
shares: number;
|
|
24
|
+
commentCount: number;
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/content/notification.d.ts
|
|
28
|
+
type BygNotificationType = 'follow' | 'post_comment' | 'image_comment';
|
|
29
|
+
interface BygNotification {
|
|
30
|
+
id: string;
|
|
31
|
+
type: BygNotificationType;
|
|
32
|
+
actorUsername: string;
|
|
33
|
+
actorAvatarUrl: string | null;
|
|
34
|
+
actorSubscriptionState: BygSubscription;
|
|
35
|
+
text: string;
|
|
36
|
+
path: string;
|
|
37
|
+
createdDate: string;
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/content/post.d.ts
|
|
41
|
+
interface BygPost {
|
|
42
|
+
id: number;
|
|
43
|
+
title: string;
|
|
44
|
+
content: string;
|
|
45
|
+
author: string;
|
|
46
|
+
createdDate: string;
|
|
47
|
+
likes: number;
|
|
48
|
+
shares: number;
|
|
49
|
+
commentCount: number;
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/people/profile.d.ts
|
|
53
|
+
interface BygProfile {
|
|
54
|
+
user: BygUser;
|
|
55
|
+
followerCount: number;
|
|
56
|
+
followingCount: number;
|
|
57
|
+
isFollowing?: boolean;
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/people/user.d.ts
|
|
61
|
+
interface BygUser {
|
|
62
|
+
id: number;
|
|
63
|
+
email: string;
|
|
64
|
+
username: string;
|
|
65
|
+
createdAt: string;
|
|
66
|
+
bio: string | null;
|
|
67
|
+
avatarUrl: string | null;
|
|
68
|
+
bannerUrl: string | null;
|
|
69
|
+
color: string | null;
|
|
70
|
+
subscriptionState: BygSubscription;
|
|
71
|
+
verification: BygVerification;
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/unions/create.d.ts
|
|
75
|
+
type CreateType = 'post' | 'image';
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region src/unions/subscription.d.ts
|
|
78
|
+
type BygSubscription = 'free' | 'plus_legacy' | 'plus' | 'pro' | 'enterprise';
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/unions/verification.d.ts
|
|
81
|
+
type BygVerification = 'notable' | 'organization' | 'government' | 'identity';
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region src/web/page.d.ts
|
|
84
|
+
interface BygPage {
|
|
85
|
+
title: string;
|
|
86
|
+
description: string;
|
|
87
|
+
path: string;
|
|
88
|
+
icon: string;
|
|
89
|
+
color: string;
|
|
90
|
+
}
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region src/web/push.d.ts
|
|
93
|
+
interface BygPushSubscriptionKeys {
|
|
94
|
+
p256dh: string;
|
|
95
|
+
auth: string;
|
|
96
|
+
}
|
|
97
|
+
interface BygPushSubscription {
|
|
98
|
+
endpoint: string;
|
|
99
|
+
expirationTime: number | null;
|
|
100
|
+
keys: BygPushSubscriptionKeys;
|
|
101
|
+
}
|
|
102
|
+
interface BygPushUnsubscribeRequest {
|
|
103
|
+
endpoint: string;
|
|
104
|
+
}
|
|
105
|
+
interface BygPushPublicKeyResponse {
|
|
106
|
+
publicKey: string;
|
|
107
|
+
}
|
|
108
|
+
interface BygPushAlertPayload {
|
|
109
|
+
type: 'follow' | 'post_comment' | 'image_comment';
|
|
110
|
+
title: string;
|
|
111
|
+
body: string;
|
|
112
|
+
path: string;
|
|
113
|
+
tag: string;
|
|
114
|
+
createdDate: string;
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export { BygAd, BygComment, BygImage, BygNotification, BygNotificationType, BygPage, BygPost, BygProfile, BygPushAlertPayload, BygPushPublicKeyResponse, BygPushSubscription, BygPushSubscriptionKeys, BygPushUnsubscribeRequest, BygSubscription, BygUser, BygVerification, CreateType };
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
+
"alert": "THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY. Instead, edit package.ts and run 'ts-pkg' to regenerate.",
|
|
2
3
|
"name": "@bygnet/types",
|
|
3
|
-
"version": "1.
|
|
4
|
+
"version": "1.6.0",
|
|
4
5
|
"description": "Byg Platform's types for posts, images, and more, for Byg devs and the community.",
|
|
5
6
|
"keywords": [
|
|
6
7
|
"social-network",
|
|
@@ -20,24 +21,25 @@
|
|
|
20
21
|
},
|
|
21
22
|
"type": "module",
|
|
22
23
|
"main": "src/index.ts",
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
23
27
|
"types": "dist/index.d.ts",
|
|
24
28
|
"exports": {
|
|
25
29
|
".": {
|
|
26
30
|
"types": "./dist/index.d.ts"
|
|
27
31
|
}
|
|
28
32
|
},
|
|
29
|
-
"files": [
|
|
30
|
-
"dist"
|
|
31
|
-
],
|
|
32
33
|
"scripts": {
|
|
33
|
-
"build": "tsc",
|
|
34
|
-
"build:watch": "tsc --watch",
|
|
35
|
-
"typecheck": "tsc --noEmit",
|
|
36
34
|
"format": "prettier --write .",
|
|
37
|
-
"format:check": "prettier --check ."
|
|
35
|
+
"format:check": "prettier --check .",
|
|
36
|
+
"build": "tsdown",
|
|
37
|
+
"dev": "tsdown --watch",
|
|
38
|
+
"typecheck": "tsc --noEmit"
|
|
38
39
|
},
|
|
39
|
-
"
|
|
40
|
+
"devDependencies": {
|
|
40
41
|
"@opk/ts-pkg": "^0.6.1",
|
|
41
|
-
"prettier": "^3.8.1"
|
|
42
|
+
"prettier": "^3.8.1",
|
|
43
|
+
"tsdown": "^0.21.7"
|
|
42
44
|
}
|
|
43
45
|
}
|
package/src/index.ts
CHANGED
package/dist/content/ad.d.ts
DELETED
package/dist/content/image.d.ts
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { BygSubscription } from '../unions/subscription';
|
|
2
|
-
export interface BygMessageSharedPost {
|
|
3
|
-
id: number;
|
|
4
|
-
title: string;
|
|
5
|
-
content: string;
|
|
6
|
-
author: string;
|
|
7
|
-
createdDate: string;
|
|
8
|
-
}
|
|
9
|
-
export interface BygMessageSharedImage {
|
|
10
|
-
id: number;
|
|
11
|
-
title: string;
|
|
12
|
-
imageUrl: string;
|
|
13
|
-
author: string;
|
|
14
|
-
createdDate: string;
|
|
15
|
-
}
|
|
16
|
-
export interface BygMessage {
|
|
17
|
-
id: number;
|
|
18
|
-
senderId: number;
|
|
19
|
-
senderUsername: string;
|
|
20
|
-
senderAvatarUrl: string | null;
|
|
21
|
-
senderSubscriptionState: BygSubscription;
|
|
22
|
-
recipientId: number;
|
|
23
|
-
recipientUsername: string;
|
|
24
|
-
recipientAvatarUrl: string | null;
|
|
25
|
-
recipientSubscriptionState: BygSubscription;
|
|
26
|
-
content: string;
|
|
27
|
-
createdDate: string;
|
|
28
|
-
sharedPost: BygMessageSharedPost | null;
|
|
29
|
-
sharedImage: BygMessageSharedImage | null;
|
|
30
|
-
}
|
|
31
|
-
export interface BygMessageThread {
|
|
32
|
-
userId: number;
|
|
33
|
-
username: string;
|
|
34
|
-
avatarUrl: string | null;
|
|
35
|
-
subscriptionState: BygSubscription;
|
|
36
|
-
lastMessagePreview: string;
|
|
37
|
-
lastMessageDate: string;
|
|
38
|
-
}
|
|
39
|
-
export interface BygMessageConversation {
|
|
40
|
-
userId: number;
|
|
41
|
-
username: string;
|
|
42
|
-
avatarUrl: string | null;
|
|
43
|
-
subscriptionState: BygSubscription;
|
|
44
|
-
messages: BygMessage[];
|
|
45
|
-
}
|
|
46
|
-
export interface BygMessageShareTarget {
|
|
47
|
-
userId: number;
|
|
48
|
-
username: string;
|
|
49
|
-
avatarUrl: string | null;
|
|
50
|
-
subscriptionState: BygSubscription;
|
|
51
|
-
source: 'recent' | 'following';
|
|
52
|
-
}
|
|
53
|
-
export interface BygMessageSendRequest {
|
|
54
|
-
recipientId: number;
|
|
55
|
-
content?: string;
|
|
56
|
-
sharedPostId?: number;
|
|
57
|
-
sharedImageId?: number;
|
|
58
|
-
}
|
|
59
|
-
export type BygMessageLiveClientEvent = {
|
|
60
|
-
type: 'auth';
|
|
61
|
-
token: string;
|
|
62
|
-
} | {
|
|
63
|
-
type: 'typing';
|
|
64
|
-
toUserId: number;
|
|
65
|
-
isTyping: boolean;
|
|
66
|
-
};
|
|
67
|
-
export type BygMessageLiveServerEvent = {
|
|
68
|
-
type: 'auth:required';
|
|
69
|
-
} | {
|
|
70
|
-
type: 'auth:ok';
|
|
71
|
-
userId: number;
|
|
72
|
-
username: string;
|
|
73
|
-
} | {
|
|
74
|
-
type: 'auth:error';
|
|
75
|
-
} | {
|
|
76
|
-
type: 'error';
|
|
77
|
-
reason: string;
|
|
78
|
-
} | {
|
|
79
|
-
type: 'typing';
|
|
80
|
-
fromUserId: number;
|
|
81
|
-
fromUsername: string;
|
|
82
|
-
isTyping: boolean;
|
|
83
|
-
} | {
|
|
84
|
-
type: 'message:new';
|
|
85
|
-
message: BygMessage;
|
|
86
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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/content/post.d.ts
DELETED
package/dist/content/shop.d.ts
DELETED
package/dist/content/user.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from './content/ad';
|
|
2
|
-
export * from './content/comment';
|
|
3
|
-
export * from './content/image';
|
|
4
|
-
export * from './content/notification';
|
|
5
|
-
export * from './content/post';
|
|
6
|
-
export * from './people/profile';
|
|
7
|
-
export * from './people/user';
|
|
8
|
-
export * from './unions/create';
|
|
9
|
-
export * from './unions/subscription';
|
|
10
|
-
export * from './web/page';
|
|
11
|
-
export * from './web/push';
|
package/dist/people/profile.d.ts
DELETED
package/dist/people/user.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BygSubscription } from '../unions/subscription';
|
|
2
|
-
export interface BygUser {
|
|
3
|
-
id: number;
|
|
4
|
-
email: string;
|
|
5
|
-
username: string;
|
|
6
|
-
createdAt: string;
|
|
7
|
-
bio: string | null;
|
|
8
|
-
avatarUrl: string | null;
|
|
9
|
-
bannerUrl: string | null;
|
|
10
|
-
subscriptionState: BygSubscription;
|
|
11
|
-
}
|
package/dist/unions/create.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type CreateType = 'post' | 'image';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type BygSubscription = 'free' | 'plus_legacy' | 'plus' | 'pro' | 'enterprise';
|
package/dist/web/page.d.ts
DELETED
package/dist/web/push.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
}
|