@devpad/api 2.2.5 → 2.2.7
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/chunk-ZPEX7KVX.js +238 -0
- package/dist/{errors.d-DcjQAql-.d.ts → errors.d-ByyBTSwW.d.ts} +1 -1
- package/dist/index.d.ts +183 -6
- package/dist/index.js +827 -97
- package/dist/{media.d-CQ56ckoR.d.ts → media.d-R87HGuRp.d.ts} +1 -1
- package/dist/schema/blog.d.ts +1702 -2
- package/dist/schema/blog.js +11 -11
- package/dist/schema/index.d.ts +3 -3
- package/dist/schema/index.js +39 -1
- package/dist/schema/media.d.ts +4 -4
- package/dist/schema/media.js +330 -330
- package/dist/{schema.d-Bka8880l.d.ts → schema.d-DFyjWZV1.d.ts} +1679 -1
- package/dist/{types.d-DLE9TSql.d.ts → types.d-B3vp62jJ.d.ts} +7 -7
- package/dist/{types.d-VdW3W-u7.d.ts → types.d-YhCFiUtt.d.ts} +52 -52
- package/dist/types.d-i9gbGlha.d.ts +852 -0
- package/package.json +4 -3
- package/dist/chunk-7SQVSGWV.js +0 -105
- package/dist/types.d-CW-e2BrO.d.ts +0 -455
package/dist/schema/media.js
CHANGED
|
@@ -46,380 +46,380 @@ var profileId = (id) => id;
|
|
|
46
46
|
var connectionId = (id) => id;
|
|
47
47
|
var isValidId = (id) => typeof id === "string" && id.length > 0;
|
|
48
48
|
|
|
49
|
-
// ../schema/dist/media/platforms
|
|
49
|
+
// ../schema/dist/media/platforms.js
|
|
50
50
|
import { z } from "zod";
|
|
51
|
-
var
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
author_date: z.string().datetime(),
|
|
57
|
-
committer_name: z.string(),
|
|
58
|
-
committer_email: z.string(),
|
|
59
|
-
committer_date: z.string().datetime(),
|
|
60
|
-
url: z.string().url(),
|
|
61
|
-
branch: z.string(),
|
|
62
|
-
additions: z.number().optional(),
|
|
63
|
-
deletions: z.number().optional(),
|
|
64
|
-
files_changed: z.number().optional()
|
|
65
|
-
});
|
|
66
|
-
var GitHubRepoCommitsStoreSchema = z.object({
|
|
67
|
-
owner: z.string(),
|
|
68
|
-
repo: z.string(),
|
|
69
|
-
branches: z.array(z.string()),
|
|
70
|
-
commits: z.array(GitHubRepoCommitSchema),
|
|
71
|
-
total_commits: z.number(),
|
|
51
|
+
var PLATFORMS = ["github", "bluesky", "youtube", "devpad", "reddit", "twitter"];
|
|
52
|
+
var PlatformSchema = z.enum(PLATFORMS);
|
|
53
|
+
var MULTI_STORE_PLATFORMS = ["github", "reddit", "twitter"];
|
|
54
|
+
var isMultiStorePlatform = (p) => MULTI_STORE_PLATFORMS.includes(p);
|
|
55
|
+
var FetchedAtSchema = z.object({
|
|
72
56
|
fetched_at: z.string().datetime()
|
|
73
57
|
});
|
|
74
|
-
var
|
|
75
|
-
|
|
58
|
+
var GitHubRepoSchema = z.object({
|
|
59
|
+
id: z.number(),
|
|
76
60
|
name: z.string(),
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
61
|
+
url: z.string()
|
|
62
|
+
});
|
|
63
|
+
var GitHubBaseEventSchema = z.object({
|
|
64
|
+
id: z.string(),
|
|
65
|
+
type: z.string(),
|
|
66
|
+
created_at: z.string(),
|
|
67
|
+
repo: GitHubRepoSchema,
|
|
68
|
+
payload: z.record(z.unknown())
|
|
69
|
+
});
|
|
70
|
+
var GitHubEventSchema = GitHubBaseEventSchema;
|
|
71
|
+
var GitHubExtendedCommitSchema = z.object({
|
|
72
|
+
sha: z.string(),
|
|
73
|
+
message: z.string(),
|
|
74
|
+
date: z.string(),
|
|
75
|
+
url: z.string(),
|
|
76
|
+
repo: z.string(),
|
|
77
|
+
branch: z.string()
|
|
90
78
|
});
|
|
91
|
-
var
|
|
79
|
+
var GitHubPullRequestSchema = z.object({
|
|
92
80
|
id: z.number(),
|
|
93
81
|
number: z.number(),
|
|
94
82
|
title: z.string(),
|
|
95
|
-
body: z.string().nullable(),
|
|
96
83
|
state: z.enum(["open", "closed", "merged"]),
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
merged_at: z.string().
|
|
84
|
+
action: z.string(),
|
|
85
|
+
url: z.string(),
|
|
86
|
+
repo: z.string(),
|
|
87
|
+
created_at: z.string(),
|
|
88
|
+
merged_at: z.string().optional(),
|
|
102
89
|
head_ref: z.string(),
|
|
103
90
|
base_ref: z.string(),
|
|
104
|
-
commit_shas: z.array(z.string()),
|
|
105
|
-
merge_commit_sha: z.string().
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
});
|
|
112
|
-
var
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
91
|
+
commit_shas: z.array(z.string()).default([]),
|
|
92
|
+
merge_commit_sha: z.string().optional()
|
|
93
|
+
});
|
|
94
|
+
var GitHubRawSchema = FetchedAtSchema.extend({
|
|
95
|
+
events: z.array(GitHubEventSchema),
|
|
96
|
+
commits: z.array(GitHubExtendedCommitSchema).default([]),
|
|
97
|
+
pull_requests: z.array(GitHubPullRequestSchema).default([])
|
|
98
|
+
});
|
|
99
|
+
var BlueskyAuthorSchema = z.object({
|
|
100
|
+
did: z.string(),
|
|
101
|
+
handle: z.string(),
|
|
102
|
+
displayName: z.string().optional(),
|
|
103
|
+
avatar: z.string().url().optional()
|
|
104
|
+
});
|
|
105
|
+
var BlueskyPostSchema = z.object({
|
|
106
|
+
uri: z.string(),
|
|
107
|
+
cid: z.string(),
|
|
108
|
+
author: BlueskyAuthorSchema,
|
|
109
|
+
record: z.object({
|
|
110
|
+
text: z.string(),
|
|
111
|
+
createdAt: z.string(),
|
|
112
|
+
reply: z.object({
|
|
113
|
+
parent: z.object({ uri: z.string() }),
|
|
114
|
+
root: z.object({ uri: z.string() })
|
|
115
|
+
}).optional()
|
|
116
|
+
}),
|
|
117
|
+
replyCount: z.number().default(0),
|
|
118
|
+
repostCount: z.number().default(0),
|
|
119
|
+
likeCount: z.number().default(0),
|
|
120
|
+
embed: z.object({
|
|
121
|
+
images: z.array(z.object({
|
|
122
|
+
thumb: z.string(),
|
|
123
|
+
fullsize: z.string()
|
|
124
|
+
})).optional()
|
|
125
|
+
}).optional()
|
|
126
|
+
});
|
|
127
|
+
var BlueskyFeedItemSchema = z.object({
|
|
128
|
+
post: BlueskyPostSchema,
|
|
129
|
+
reason: z.object({
|
|
130
|
+
$type: z.string(),
|
|
131
|
+
by: BlueskyAuthorSchema.optional()
|
|
132
|
+
}).optional()
|
|
133
|
+
});
|
|
134
|
+
var BlueskyRawSchema = FetchedAtSchema.extend({
|
|
135
|
+
feed: z.array(BlueskyFeedItemSchema),
|
|
136
|
+
cursor: z.string().optional()
|
|
137
|
+
});
|
|
138
|
+
var YouTubeThumbnailSchema = z.object({
|
|
139
|
+
url: z.string().url(),
|
|
140
|
+
width: z.number().optional(),
|
|
141
|
+
height: z.number().optional()
|
|
142
|
+
});
|
|
143
|
+
var YouTubeVideoSchema = z.object({
|
|
144
|
+
kind: z.string(),
|
|
145
|
+
etag: z.string(),
|
|
146
|
+
id: z.object({
|
|
147
|
+
kind: z.string(),
|
|
148
|
+
videoId: z.string()
|
|
149
|
+
}),
|
|
150
|
+
snippet: z.object({
|
|
151
|
+
publishedAt: z.string(),
|
|
152
|
+
channelId: z.string(),
|
|
153
|
+
title: z.string(),
|
|
154
|
+
description: z.string(),
|
|
155
|
+
thumbnails: z.object({
|
|
156
|
+
default: YouTubeThumbnailSchema.optional(),
|
|
157
|
+
medium: YouTubeThumbnailSchema.optional(),
|
|
158
|
+
high: YouTubeThumbnailSchema.optional()
|
|
159
|
+
}),
|
|
160
|
+
channelTitle: z.string()
|
|
161
|
+
})
|
|
162
|
+
});
|
|
163
|
+
var YouTubeRawSchema = FetchedAtSchema.extend({
|
|
164
|
+
items: z.array(YouTubeVideoSchema),
|
|
165
|
+
nextPageToken: z.string().optional(),
|
|
166
|
+
pageInfo: z.object({
|
|
167
|
+
totalResults: z.number(),
|
|
168
|
+
resultsPerPage: z.number()
|
|
169
|
+
}).optional()
|
|
170
|
+
});
|
|
171
|
+
var DevpadTaskSchema = z.object({
|
|
172
|
+
id: z.string(),
|
|
173
|
+
title: z.string(),
|
|
174
|
+
status: z.enum(["todo", "in_progress", "done", "archived"]),
|
|
175
|
+
priority: z.enum(["low", "medium", "high"]).optional(),
|
|
176
|
+
project: z.string().optional(),
|
|
177
|
+
tags: z.array(z.string()).default([]),
|
|
178
|
+
created_at: z.string(),
|
|
179
|
+
updated_at: z.string(),
|
|
180
|
+
due_date: z.string().optional(),
|
|
181
|
+
completed_at: z.string().optional()
|
|
182
|
+
});
|
|
183
|
+
var DevpadRawSchema = FetchedAtSchema.extend({
|
|
184
|
+
tasks: z.array(DevpadTaskSchema)
|
|
118
185
|
});
|
|
119
186
|
|
|
120
|
-
// ../schema/dist/media/platforms/
|
|
187
|
+
// ../schema/dist/media/platforms/github.js
|
|
121
188
|
import { z as z2 } from "zod";
|
|
122
|
-
var
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
comments: z2.array(RedditCommentSchema),
|
|
144
|
-
total_comments: z2.number(),
|
|
189
|
+
var GitHubRepoCommitSchema = z2.object({
|
|
190
|
+
sha: z2.string(),
|
|
191
|
+
message: z2.string(),
|
|
192
|
+
author_name: z2.string(),
|
|
193
|
+
author_email: z2.string(),
|
|
194
|
+
author_date: z2.string().datetime(),
|
|
195
|
+
committer_name: z2.string(),
|
|
196
|
+
committer_email: z2.string(),
|
|
197
|
+
committer_date: z2.string().datetime(),
|
|
198
|
+
url: z2.string().url(),
|
|
199
|
+
branch: z2.string(),
|
|
200
|
+
additions: z2.number().optional(),
|
|
201
|
+
deletions: z2.number().optional(),
|
|
202
|
+
files_changed: z2.number().optional()
|
|
203
|
+
});
|
|
204
|
+
var GitHubRepoCommitsStoreSchema = z2.object({
|
|
205
|
+
owner: z2.string(),
|
|
206
|
+
repo: z2.string(),
|
|
207
|
+
branches: z2.array(z2.string()),
|
|
208
|
+
commits: z2.array(GitHubRepoCommitSchema),
|
|
209
|
+
total_commits: z2.number(),
|
|
145
210
|
fetched_at: z2.string().datetime()
|
|
146
211
|
});
|
|
147
|
-
var
|
|
212
|
+
var GitHubRepoMetaSchema = z2.object({
|
|
213
|
+
owner: z2.string(),
|
|
214
|
+
name: z2.string(),
|
|
215
|
+
full_name: z2.string(),
|
|
216
|
+
default_branch: z2.string(),
|
|
217
|
+
branches: z2.array(z2.string()),
|
|
218
|
+
is_private: z2.boolean(),
|
|
219
|
+
pushed_at: z2.string().datetime().nullable(),
|
|
220
|
+
updated_at: z2.string().datetime()
|
|
221
|
+
});
|
|
222
|
+
var GitHubMetaStoreSchema = z2.object({
|
|
148
223
|
username: z2.string(),
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
link_karma: z2.number(),
|
|
153
|
-
comment_karma: z2.number(),
|
|
154
|
-
created_utc: z2.number(),
|
|
155
|
-
is_gold: z2.boolean().default(false),
|
|
156
|
-
subreddits_active: z2.array(z2.string()).default([]),
|
|
224
|
+
repositories: z2.array(GitHubRepoMetaSchema),
|
|
225
|
+
total_repos_available: z2.number(),
|
|
226
|
+
repos_fetched: z2.number(),
|
|
157
227
|
fetched_at: z2.string().datetime()
|
|
158
228
|
});
|
|
159
|
-
var
|
|
160
|
-
id: z2.
|
|
161
|
-
|
|
229
|
+
var GitHubRepoPRSchema = z2.object({
|
|
230
|
+
id: z2.number(),
|
|
231
|
+
number: z2.number(),
|
|
162
232
|
title: z2.string(),
|
|
163
|
-
|
|
233
|
+
body: z2.string().nullable(),
|
|
234
|
+
state: z2.enum(["open", "closed", "merged"]),
|
|
164
235
|
url: z2.string().url(),
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
username: z2.string(),
|
|
185
|
-
posts: z2.array(RedditPostSchema),
|
|
186
|
-
total_posts: z2.number(),
|
|
236
|
+
created_at: z2.string().datetime(),
|
|
237
|
+
updated_at: z2.string().datetime(),
|
|
238
|
+
closed_at: z2.string().datetime().nullable(),
|
|
239
|
+
merged_at: z2.string().datetime().nullable(),
|
|
240
|
+
head_ref: z2.string(),
|
|
241
|
+
base_ref: z2.string(),
|
|
242
|
+
commit_shas: z2.array(z2.string()),
|
|
243
|
+
merge_commit_sha: z2.string().nullable(),
|
|
244
|
+
author_login: z2.string(),
|
|
245
|
+
author_avatar_url: z2.string().url().optional(),
|
|
246
|
+
additions: z2.number().optional(),
|
|
247
|
+
deletions: z2.number().optional(),
|
|
248
|
+
changed_files: z2.number().optional()
|
|
249
|
+
});
|
|
250
|
+
var GitHubRepoPRsStoreSchema = z2.object({
|
|
251
|
+
owner: z2.string(),
|
|
252
|
+
repo: z2.string(),
|
|
253
|
+
pull_requests: z2.array(GitHubRepoPRSchema),
|
|
254
|
+
total_prs: z2.number(),
|
|
187
255
|
fetched_at: z2.string().datetime()
|
|
188
256
|
});
|
|
189
257
|
|
|
190
|
-
// ../schema/dist/media/platforms/
|
|
258
|
+
// ../schema/dist/media/platforms/reddit.js
|
|
191
259
|
import { z as z3 } from "zod";
|
|
192
|
-
var
|
|
193
|
-
followers_count: z3.number(),
|
|
194
|
-
following_count: z3.number(),
|
|
195
|
-
tweet_count: z3.number(),
|
|
196
|
-
listed_count: z3.number()
|
|
197
|
-
});
|
|
198
|
-
var TwitterMetaStoreSchema = z3.object({
|
|
260
|
+
var RedditCommentSchema = z3.object({
|
|
199
261
|
id: z3.string(),
|
|
200
|
-
username: z3.string(),
|
|
201
262
|
name: z3.string(),
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
263
|
+
body: z3.string(),
|
|
264
|
+
body_html: z3.string().optional(),
|
|
265
|
+
permalink: z3.string(),
|
|
266
|
+
link_id: z3.string(),
|
|
267
|
+
link_title: z3.string(),
|
|
268
|
+
link_permalink: z3.string(),
|
|
269
|
+
subreddit: z3.string(),
|
|
270
|
+
subreddit_prefixed: z3.string(),
|
|
271
|
+
author: z3.string(),
|
|
272
|
+
created_utc: z3.number(),
|
|
273
|
+
score: z3.number(),
|
|
274
|
+
is_submitter: z3.boolean().default(false),
|
|
275
|
+
stickied: z3.boolean().default(false),
|
|
276
|
+
edited: z3.union([z3.boolean(), z3.number()]).default(false),
|
|
277
|
+
parent_id: z3.string()
|
|
278
|
+
});
|
|
279
|
+
var RedditCommentsStoreSchema = z3.object({
|
|
280
|
+
username: z3.string(),
|
|
281
|
+
comments: z3.array(RedditCommentSchema),
|
|
282
|
+
total_comments: z3.number(),
|
|
213
283
|
fetched_at: z3.string().datetime()
|
|
214
284
|
});
|
|
215
|
-
var
|
|
216
|
-
|
|
217
|
-
reply_count: z3.number().default(0),
|
|
218
|
-
like_count: z3.number().default(0),
|
|
219
|
-
quote_count: z3.number().default(0),
|
|
220
|
-
impression_count: z3.number().optional(),
|
|
221
|
-
bookmark_count: z3.number().optional()
|
|
222
|
-
});
|
|
223
|
-
var TweetMediaSchema = z3.object({
|
|
224
|
-
media_key: z3.string(),
|
|
225
|
-
type: z3.enum(["photo", "video", "animated_gif"]),
|
|
226
|
-
url: z3.string().url().optional(),
|
|
227
|
-
preview_image_url: z3.string().url().optional(),
|
|
228
|
-
alt_text: z3.string().optional(),
|
|
229
|
-
duration_ms: z3.number().optional(),
|
|
230
|
-
width: z3.number().optional(),
|
|
231
|
-
height: z3.number().optional()
|
|
232
|
-
});
|
|
233
|
-
var TweetUrlSchema = z3.object({
|
|
234
|
-
start: z3.number(),
|
|
235
|
-
end: z3.number(),
|
|
236
|
-
url: z3.string(),
|
|
237
|
-
expanded_url: z3.string().optional(),
|
|
238
|
-
display_url: z3.string().optional(),
|
|
239
|
-
title: z3.string().optional(),
|
|
240
|
-
description: z3.string().optional()
|
|
241
|
-
});
|
|
242
|
-
var TwitterTweetSchema = z3.object({
|
|
243
|
-
id: z3.string(),
|
|
244
|
-
text: z3.string(),
|
|
245
|
-
created_at: z3.string().datetime(),
|
|
246
|
-
author_id: z3.string(),
|
|
247
|
-
conversation_id: z3.string().optional(),
|
|
248
|
-
in_reply_to_user_id: z3.string().optional(),
|
|
249
|
-
public_metrics: TweetMetricsSchema,
|
|
250
|
-
possibly_sensitive: z3.boolean().default(false),
|
|
251
|
-
lang: z3.string().optional(),
|
|
252
|
-
source: z3.string().optional(),
|
|
253
|
-
referenced_tweets: z3.array(z3.object({
|
|
254
|
-
type: z3.enum(["retweeted", "quoted", "replied_to"]),
|
|
255
|
-
id: z3.string()
|
|
256
|
-
})).optional(),
|
|
257
|
-
attachments: z3.object({
|
|
258
|
-
media_keys: z3.array(z3.string()).optional(),
|
|
259
|
-
poll_ids: z3.array(z3.string()).optional()
|
|
260
|
-
}).optional(),
|
|
261
|
-
entities: z3.object({
|
|
262
|
-
urls: z3.array(TweetUrlSchema).optional(),
|
|
263
|
-
mentions: z3.array(z3.object({
|
|
264
|
-
start: z3.number(),
|
|
265
|
-
end: z3.number(),
|
|
266
|
-
username: z3.string(),
|
|
267
|
-
id: z3.string()
|
|
268
|
-
})).optional(),
|
|
269
|
-
hashtags: z3.array(z3.object({
|
|
270
|
-
start: z3.number(),
|
|
271
|
-
end: z3.number(),
|
|
272
|
-
tag: z3.string()
|
|
273
|
-
})).optional()
|
|
274
|
-
}).optional()
|
|
275
|
-
});
|
|
276
|
-
var TwitterTweetsStoreSchema = z3.object({
|
|
285
|
+
var RedditMetaStoreSchema = z3.object({
|
|
286
|
+
username: z3.string(),
|
|
277
287
|
user_id: z3.string(),
|
|
288
|
+
icon_img: z3.string().url().optional(),
|
|
289
|
+
total_karma: z3.number(),
|
|
290
|
+
link_karma: z3.number(),
|
|
291
|
+
comment_karma: z3.number(),
|
|
292
|
+
created_utc: z3.number(),
|
|
293
|
+
is_gold: z3.boolean().default(false),
|
|
294
|
+
subreddits_active: z3.array(z3.string()).default([]),
|
|
295
|
+
fetched_at: z3.string().datetime()
|
|
296
|
+
});
|
|
297
|
+
var RedditPostSchema = z3.object({
|
|
298
|
+
id: z3.string(),
|
|
299
|
+
name: z3.string(),
|
|
300
|
+
title: z3.string(),
|
|
301
|
+
selftext: z3.string().default(""),
|
|
302
|
+
url: z3.string().url(),
|
|
303
|
+
permalink: z3.string(),
|
|
304
|
+
subreddit: z3.string(),
|
|
305
|
+
subreddit_prefixed: z3.string(),
|
|
306
|
+
author: z3.string(),
|
|
307
|
+
created_utc: z3.number(),
|
|
308
|
+
score: z3.number(),
|
|
309
|
+
upvote_ratio: z3.number().optional(),
|
|
310
|
+
num_comments: z3.number(),
|
|
311
|
+
is_self: z3.boolean(),
|
|
312
|
+
is_video: z3.boolean().default(false),
|
|
313
|
+
thumbnail: z3.string().optional(),
|
|
314
|
+
link_flair_text: z3.string().nullable().optional(),
|
|
315
|
+
over_18: z3.boolean().default(false),
|
|
316
|
+
spoiler: z3.boolean().default(false),
|
|
317
|
+
stickied: z3.boolean().default(false),
|
|
318
|
+
locked: z3.boolean().default(false),
|
|
319
|
+
archived: z3.boolean().default(false)
|
|
320
|
+
});
|
|
321
|
+
var RedditPostsStoreSchema = z3.object({
|
|
278
322
|
username: z3.string(),
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
total_tweets: z3.number(),
|
|
282
|
-
oldest_tweet_id: z3.string().optional(),
|
|
283
|
-
newest_tweet_id: z3.string().optional(),
|
|
323
|
+
posts: z3.array(RedditPostSchema),
|
|
324
|
+
total_posts: z3.number(),
|
|
284
325
|
fetched_at: z3.string().datetime()
|
|
285
326
|
});
|
|
286
327
|
|
|
287
|
-
// ../schema/dist/media/platforms.js
|
|
328
|
+
// ../schema/dist/media/platforms/twitter.js
|
|
288
329
|
import { z as z4 } from "zod";
|
|
289
|
-
var
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
fetched_at: z4.string().datetime()
|
|
295
|
-
});
|
|
296
|
-
var GitHubRepoSchema = z4.object({
|
|
297
|
-
id: z4.number(),
|
|
298
|
-
name: z4.string(),
|
|
299
|
-
url: z4.string()
|
|
330
|
+
var TwitterUserMetricsSchema = z4.object({
|
|
331
|
+
followers_count: z4.number(),
|
|
332
|
+
following_count: z4.number(),
|
|
333
|
+
tweet_count: z4.number(),
|
|
334
|
+
listed_count: z4.number()
|
|
300
335
|
});
|
|
301
|
-
var
|
|
336
|
+
var TwitterMetaStoreSchema = z4.object({
|
|
302
337
|
id: z4.string(),
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
var GitHubPullRequestSchema = z4.object({
|
|
318
|
-
id: z4.number(),
|
|
319
|
-
number: z4.number(),
|
|
320
|
-
title: z4.string(),
|
|
321
|
-
state: z4.enum(["open", "closed", "merged"]),
|
|
322
|
-
action: z4.string(),
|
|
323
|
-
url: z4.string(),
|
|
324
|
-
repo: z4.string(),
|
|
325
|
-
created_at: z4.string(),
|
|
326
|
-
merged_at: z4.string().optional(),
|
|
327
|
-
head_ref: z4.string(),
|
|
328
|
-
base_ref: z4.string(),
|
|
329
|
-
commit_shas: z4.array(z4.string()).default([]),
|
|
330
|
-
merge_commit_sha: z4.string().optional()
|
|
331
|
-
});
|
|
332
|
-
var GitHubRawSchema = FetchedAtSchema.extend({
|
|
333
|
-
events: z4.array(GitHubEventSchema),
|
|
334
|
-
commits: z4.array(GitHubExtendedCommitSchema).default([]),
|
|
335
|
-
pull_requests: z4.array(GitHubPullRequestSchema).default([])
|
|
336
|
-
});
|
|
337
|
-
var BlueskyAuthorSchema = z4.object({
|
|
338
|
-
did: z4.string(),
|
|
339
|
-
handle: z4.string(),
|
|
340
|
-
displayName: z4.string().optional(),
|
|
341
|
-
avatar: z4.string().url().optional()
|
|
342
|
-
});
|
|
343
|
-
var BlueskyPostSchema = z4.object({
|
|
344
|
-
uri: z4.string(),
|
|
345
|
-
cid: z4.string(),
|
|
346
|
-
author: BlueskyAuthorSchema,
|
|
347
|
-
record: z4.object({
|
|
348
|
-
text: z4.string(),
|
|
349
|
-
createdAt: z4.string(),
|
|
350
|
-
reply: z4.object({
|
|
351
|
-
parent: z4.object({ uri: z4.string() }),
|
|
352
|
-
root: z4.object({ uri: z4.string() })
|
|
353
|
-
}).optional()
|
|
354
|
-
}),
|
|
355
|
-
replyCount: z4.number().default(0),
|
|
356
|
-
repostCount: z4.number().default(0),
|
|
357
|
-
likeCount: z4.number().default(0),
|
|
358
|
-
embed: z4.object({
|
|
359
|
-
images: z4.array(z4.object({
|
|
360
|
-
thumb: z4.string(),
|
|
361
|
-
fullsize: z4.string()
|
|
362
|
-
})).optional()
|
|
363
|
-
}).optional()
|
|
364
|
-
});
|
|
365
|
-
var BlueskyFeedItemSchema = z4.object({
|
|
366
|
-
post: BlueskyPostSchema,
|
|
367
|
-
reason: z4.object({
|
|
368
|
-
$type: z4.string(),
|
|
369
|
-
by: BlueskyAuthorSchema.optional()
|
|
370
|
-
}).optional()
|
|
371
|
-
});
|
|
372
|
-
var BlueskyRawSchema = FetchedAtSchema.extend({
|
|
373
|
-
feed: z4.array(BlueskyFeedItemSchema),
|
|
374
|
-
cursor: z4.string().optional()
|
|
338
|
+
username: z4.string(),
|
|
339
|
+
name: z4.string(),
|
|
340
|
+
description: z4.string().optional(),
|
|
341
|
+
profile_image_url: z4.string().url().optional(),
|
|
342
|
+
profile_banner_url: z4.string().url().optional(),
|
|
343
|
+
url: z4.string().url().optional(),
|
|
344
|
+
location: z4.string().optional(),
|
|
345
|
+
created_at: z4.string().datetime(),
|
|
346
|
+
verified: z4.boolean().default(false),
|
|
347
|
+
verified_type: z4.enum(["blue", "business", "government", "none"]).default("none"),
|
|
348
|
+
protected: z4.boolean().default(false),
|
|
349
|
+
public_metrics: TwitterUserMetricsSchema,
|
|
350
|
+
pinned_tweet_id: z4.string().optional(),
|
|
351
|
+
fetched_at: z4.string().datetime()
|
|
375
352
|
});
|
|
376
|
-
var
|
|
377
|
-
|
|
353
|
+
var TweetMetricsSchema = z4.object({
|
|
354
|
+
retweet_count: z4.number().default(0),
|
|
355
|
+
reply_count: z4.number().default(0),
|
|
356
|
+
like_count: z4.number().default(0),
|
|
357
|
+
quote_count: z4.number().default(0),
|
|
358
|
+
impression_count: z4.number().optional(),
|
|
359
|
+
bookmark_count: z4.number().optional()
|
|
360
|
+
});
|
|
361
|
+
var TweetMediaSchema = z4.object({
|
|
362
|
+
media_key: z4.string(),
|
|
363
|
+
type: z4.enum(["photo", "video", "animated_gif"]),
|
|
364
|
+
url: z4.string().url().optional(),
|
|
365
|
+
preview_image_url: z4.string().url().optional(),
|
|
366
|
+
alt_text: z4.string().optional(),
|
|
367
|
+
duration_ms: z4.number().optional(),
|
|
378
368
|
width: z4.number().optional(),
|
|
379
369
|
height: z4.number().optional()
|
|
380
370
|
});
|
|
381
|
-
var
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
publishedAt: z4.string(),
|
|
390
|
-
channelId: z4.string(),
|
|
391
|
-
title: z4.string(),
|
|
392
|
-
description: z4.string(),
|
|
393
|
-
thumbnails: z4.object({
|
|
394
|
-
default: YouTubeThumbnailSchema.optional(),
|
|
395
|
-
medium: YouTubeThumbnailSchema.optional(),
|
|
396
|
-
high: YouTubeThumbnailSchema.optional()
|
|
397
|
-
}),
|
|
398
|
-
channelTitle: z4.string()
|
|
399
|
-
})
|
|
400
|
-
});
|
|
401
|
-
var YouTubeRawSchema = FetchedAtSchema.extend({
|
|
402
|
-
items: z4.array(YouTubeVideoSchema),
|
|
403
|
-
nextPageToken: z4.string().optional(),
|
|
404
|
-
pageInfo: z4.object({
|
|
405
|
-
totalResults: z4.number(),
|
|
406
|
-
resultsPerPage: z4.number()
|
|
407
|
-
}).optional()
|
|
371
|
+
var TweetUrlSchema = z4.object({
|
|
372
|
+
start: z4.number(),
|
|
373
|
+
end: z4.number(),
|
|
374
|
+
url: z4.string(),
|
|
375
|
+
expanded_url: z4.string().optional(),
|
|
376
|
+
display_url: z4.string().optional(),
|
|
377
|
+
title: z4.string().optional(),
|
|
378
|
+
description: z4.string().optional()
|
|
408
379
|
});
|
|
409
|
-
var
|
|
380
|
+
var TwitterTweetSchema = z4.object({
|
|
410
381
|
id: z4.string(),
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
382
|
+
text: z4.string(),
|
|
383
|
+
created_at: z4.string().datetime(),
|
|
384
|
+
author_id: z4.string(),
|
|
385
|
+
conversation_id: z4.string().optional(),
|
|
386
|
+
in_reply_to_user_id: z4.string().optional(),
|
|
387
|
+
public_metrics: TweetMetricsSchema,
|
|
388
|
+
possibly_sensitive: z4.boolean().default(false),
|
|
389
|
+
lang: z4.string().optional(),
|
|
390
|
+
source: z4.string().optional(),
|
|
391
|
+
referenced_tweets: z4.array(z4.object({
|
|
392
|
+
type: z4.enum(["retweeted", "quoted", "replied_to"]),
|
|
393
|
+
id: z4.string()
|
|
394
|
+
})).optional(),
|
|
395
|
+
attachments: z4.object({
|
|
396
|
+
media_keys: z4.array(z4.string()).optional(),
|
|
397
|
+
poll_ids: z4.array(z4.string()).optional()
|
|
398
|
+
}).optional(),
|
|
399
|
+
entities: z4.object({
|
|
400
|
+
urls: z4.array(TweetUrlSchema).optional(),
|
|
401
|
+
mentions: z4.array(z4.object({
|
|
402
|
+
start: z4.number(),
|
|
403
|
+
end: z4.number(),
|
|
404
|
+
username: z4.string(),
|
|
405
|
+
id: z4.string()
|
|
406
|
+
})).optional(),
|
|
407
|
+
hashtags: z4.array(z4.object({
|
|
408
|
+
start: z4.number(),
|
|
409
|
+
end: z4.number(),
|
|
410
|
+
tag: z4.string()
|
|
411
|
+
})).optional()
|
|
412
|
+
}).optional()
|
|
420
413
|
});
|
|
421
|
-
var
|
|
422
|
-
|
|
414
|
+
var TwitterTweetsStoreSchema = z4.object({
|
|
415
|
+
user_id: z4.string(),
|
|
416
|
+
username: z4.string(),
|
|
417
|
+
tweets: z4.array(TwitterTweetSchema),
|
|
418
|
+
media: z4.array(TweetMediaSchema).default([]),
|
|
419
|
+
total_tweets: z4.number(),
|
|
420
|
+
oldest_tweet_id: z4.string().optional(),
|
|
421
|
+
newest_tweet_id: z4.string().optional(),
|
|
422
|
+
fetched_at: z4.string().datetime()
|
|
423
423
|
});
|
|
424
424
|
|
|
425
425
|
// ../schema/dist/media/profiles.js
|