-
-
Notifications
You must be signed in to change notification settings - Fork 225
/
next-types.d.ts
733 lines (670 loc) · 17.8 KB
/
next-types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
// User defined type definitions. Please add type definitions for global types here
// Thanks Chance Strickland!
// https://www.linkedin.com/feed/update/urn:li:activity:7163544802427437056/
declare module React {
export interface CSSProperties extends CSS.Properties<string | number> {
[key: `--${string}`]: string | number;
}
}
interface DbRepoInfo {
readonly id: number;
readonly size: number;
readonly issues: number;
readonly stars: number;
readonly forks: number;
readonly watchers: number;
readonly subscribers: number;
readonly network: number;
readonly is_fork: boolean;
readonly is_private: boolean;
readonly is_template: boolean;
readonly is_archived: boolean;
readonly is_disabled: boolean;
readonly has_issues: boolean;
readonly has_projects: boolean;
readonly has_downloads: boolean;
readonly has_wiki: boolean;
readonly has_pages: boolean;
readonly has_discussions: boolean;
readonly created_at: string;
readonly updated_at: string;
readonly pushed_at: string;
readonly default_branch: string;
readonly node_id: string;
readonly git_url: string;
readonly ssh_url: string;
readonly clone_url: string;
readonly svn_url: string;
readonly mirror_url: string;
readonly name: string;
readonly full_name: string;
readonly description: string;
readonly language: string;
readonly license: string;
readonly pushed_at: string;
readonly url: string;
readonly homepage: string;
readonly topics: string[];
readonly ossf_scorecard_total_score: number;
readonly ossf_scorecard_dependency_update_score: number;
readonly ossf_scorecard_fuzzing_score: number;
readonly ossf_scorecard_maintained_score: number;
readonly ossf_scorecard_updated_at: string;
}
interface DbRepo {
readonly id: string;
readonly host_id: string;
readonly size: number;
readonly stars: number;
readonly forks: number;
readonly issues: number;
readonly full_name: string;
readonly url: string;
readonly pr_active_count?: number;
readonly open_prs_count?: number;
readonly merged_prs_count?: number;
readonly closed_prs_count?: number;
readonly draft_prs_count?: number;
readonly spam_prs_count?: number;
readonly pr_velocity_count?: number;
readonly opened_issues_count?: number;
readonly closed_issues_count?: number;
readonly issues_velocity_count?: number;
readonly churnTotalCount?: number;
readonly activity_ratio?: number;
readonly contributor_confidence?: number;
readonly language: string;
readonly stars: number;
readonly description: string;
readonly license?: string;
readonly updated_at?: string;
}
interface DbRecommendedInsightsRepo {
readonly id: string;
readonly size: number;
readonly stars: number;
readonly issues: number;
readonly full_name: string;
readonly pr_active_count?: number;
readonly open_prs_count?: number;
readonly merged_prs_count?: number;
readonly closed_prs_count?: number;
readonly draft_prs_count?: number;
readonly spam_prs_count?: number;
readonly pr_velocity_count?: number;
readonly churnTotalCount?: number;
readonly language: string;
readonly stars: number;
readonly description: string;
readonly forks: number;
readonly created_at: string;
readonly updated_at: string;
readonly watchers: number;
readonly url: string;
readonly topics: string[];
readonly pushed_at: string;
readonly node_id: string;
readonly name: string;
readonly default_branch: string;
}
interface DbContributorInsightUser {
readonly avatar_url: string;
readonly company: string;
readonly created_at: string;
readonly id: number;
readonly list_id: string;
readonly location: string;
readonly login: string;
readonly oscr?: number;
readonly user_id: string;
readonly username: string;
readonly total_contributions: number;
readonly devstats_updated_at: string;
}
interface DbRepoPREvents {
readonly event_id: number;
readonly pr_number: number;
readonly pr_state: "open" | "closed";
readonly pr_is_draft: bool;
readonly pr_is_merged: bool;
readonly pr_mergeable_state: string;
readonly pr_is_rebaseable: bool;
readonly pr_title: string;
readonly pr_head_label: string;
readonly pr_base_label: string;
readonly pr_head_ref: string;
readonly pr_base_ref: string;
readonly pr_author_login: string;
readonly pr_created_at: string;
readonly pr_closed_at: string;
readonly pr_merged_at: string;
readonly pr_updated_at: string;
readonly pr_comments: number;
readonly pr_additions: number;
readonly pr_deletions: number;
readonly pr_changed_files: number;
readonly repo_name: string;
readonly pr_commits: number;
linesCount: number;
}
interface DbRepoIssueEvents {
readonly event_id: number;
readonly id: string;
readonly issue_number: number;
readonly issue_state: "open" | "closed" | "reopened";
readonly issue_title: string;
readonly issue_body: string;
readonly issue_author_login: string;
readonly issue_created_at: string;
readonly issue_closed_at: string;
readonly issue_updated_at: string;
readonly issue_comments: string;
readonly repo_name: string;
readonly issue_reactions_plus_one: number;
readonly issue_reactions_minus_one: number;
readonly issue_reactions_laugh: number;
readonly issue_reactions_hooray: number;
readonly issue_reactions_confused: number;
readonly issue_reactions_heart: number;
readonly issue_reactions_rocket: number;
readonly issue_reactions_eyes: number;
}
interface DbIssueComment {
readonly event_id: number;
readonly actor_login: string;
readonly event_time: string;
readonly repo_name: string;
readonly comment_body: string;
readonly comment_html_url: string;
}
interface DbPRContributor {
readonly author_login: string;
readonly oscr?: number;
readonly username: string;
readonly updated_at: string;
readonly user_id: number;
readonly devstats_updated_at: string;
readonly updated_at: string;
}
interface DbFollowUser {
readonly id: number;
readonly user_id: number;
readonly following_user_id: number;
readonly created_at: string;
readonly updated_at: string;
}
interface DbRepoCommit {
readonly title: string;
readonly commit_time: string;
}
interface Meta {
readonly itemCount: number;
readonly limit: number;
readonly page: number;
readonly pageCount: number;
readonly hasNextPage: boolean;
readonly hasPreviousPage: boolean;
}
interface DbContribution {
readonly id: number;
readonly commits: string;
readonly commit_days: string;
readonly files_modified: string;
readonly first_commit_time: string;
readonly last_commit_time: string;
readonly email: string;
readonly name: string;
readonly host_login: string;
readonly langs: string;
readonly recent_repo_list: string;
readonly recent_pr_total: number;
readonly recent_contribution_count: number;
readonly recent_opened_prs: number;
readonly recent_pr_reviews: number;
readonly recent_pr_velocity: number;
readonly recent_merged_prs: number;
}
interface DbInsight {
readonly id: number;
readonly interval: number;
readonly day: string;
readonly all_prs: number;
readonly accepted_prs: number;
readonly spam_prs: number;
readonly all_authors: number;
readonly spam_authors: number;
readonly accepted_authors: number;
readonly all_repos: number;
readonly spam_repos: number;
readonly accepted_repos: number;
readonly all_contributors: number;
readonly spam_contributors: number;
readonly accepted_contributors: number;
readonly all_repo_total: number;
readonly spam_repo_total: number;
readonly accepted_repo_total: number;
}
interface DbInsightMember {
readonly id: string;
readonly insight_id: number;
readonly user_id: number;
readonly name: string;
readonly access: "pending" | "admin" | "edit" | "view";
readonly created_at: string;
readonly updated_at: string;
readonly deleted_at: string;
readonly invitation_emailed_at: string;
readonly invitation_email: string;
}
type WorkspaceMemberRole = "owner" | "editor" | "viewer";
interface DbWorkspaceMember {
readonly id: string;
readonly user_id: number;
readonly workspace_id: string;
readonly role: WorkspaceMemberRole;
readonly created_at: string;
readonly updated_at: string;
readonly deleted_at: string;
}
type DbUserInsightWorkspace = Workspace & { workspace_id: string };
interface DbUserInsight {
readonly id: number;
readonly name: string;
readonly is_public: boolean;
readonly is_favorite: boolean;
readonly is_featured: boolean;
readonly short_code: string;
readonly created_at: string;
readonly updated_at: string;
readonly repos: DbUserInsightRepo[];
readonly members: DbInsightMember[];
readonly workspaces?: DbUserInsightWorkspace;
}
interface DbWorkspaceRepositoryInsight {
readonly id: number;
readonly name: string;
readonly is_public: boolean;
readonly is_favorite: boolean;
readonly is_featured: boolean;
readonly short_code: string;
readonly created_at: string;
readonly updated_at: string;
}
interface DbUserInsightRepo {
readonly id: number;
readonly insight_id: number;
readonly repo_id: number;
readonly full_name: string;
readonly created_at?: string;
}
interface DbUser {
readonly avatar_url: string;
readonly email: string;
readonly id: number;
readonly open_issues: number;
readonly is_private: boolean;
readonly is_open_sauced_member: boolean;
readonly created_at: string;
readonly updated_at: string;
readonly login: string;
readonly is_onboarded: boolean;
readonly is_waitlisted: boolean;
readonly role: number;
readonly bio: string;
readonly url: string;
readonly twitter_username: string;
readonly company: string;
readonly location: string;
readonly display_local_time: boolean;
readonly name: string;
readonly user_name?: string;
readonly interests?: string;
readonly receive_collaboration: boolean;
readonly display_email: boolean;
readonly timezone: string;
readonly github_sponsors_url: string;
readonly linkedin_url: string;
readonly discord_url: string;
readonly notification_count: number;
readonly insights_count: number;
readonly languages: { [lang: string]: number };
readonly first_opened_pr_at: string;
readonly followers_count: number;
readonly following_count: number;
readonly highlights_count: number;
readonly is_maintainer: boolean;
readonly coupon_code: string;
readonly receive_product_updates: boolean;
readonly personal_workspace_id: string;
readonly oscr: number;
readonly devstats_updated_at: string;
}
interface DbHighlight {
readonly id: string;
readonly user_id: string;
readonly url: string;
readonly title: string;
readonly highlight: string;
readonly pinned: boolean;
readonly created_at: string;
readonly updated_at: string;
readonly deleted_at: string;
readonly name: string;
readonly login: string;
readonly shipped_at: string;
readonly type: "issue" | "pull_request";
readonly tagged_repos: string[];
}
interface SEOobject {
title?: string;
description?: string;
image?: string;
twitterCard?: string;
noindex?: boolean;
}
interface GhUser {
readonly login: string;
readonly id: number;
readonly node_id: string;
readonly avatar_url: string;
readonly gravatar_id: string;
readonly url: string;
readonly repos_url: string;
}
interface GhRepo {
id: number;
name: string;
full_name: string;
private: boolean;
owner: GhUser;
}
interface GhOrg {
id: number;
name: string;
full_name: string;
pushed_at: string;
private: boolean;
}
interface GhPRInfoResponse {
readonly head: { repo: { name: string; full_name: string }; user: { login: string; full_name: string } };
readonly title: string;
readonly number: number;
readonly comments: number;
readonly user: GhUser;
readonly created_at: string;
}
interface DbEmojis {
readonly id: string;
readonly name: string;
readonly url: string;
readonly display_order: number;
readonly created_at: string;
readonly updated_at: string;
}
interface DbUserNotification {
readonly id: string;
readonly message: string;
readonly type: "highlight_reaction" | "follow";
readonly from_user_id: number;
readonly notified_at: string;
readonly user_id: number;
readonly meta_id: string;
readonly from_user: DbUser;
}
interface DbUserConnection {
readonly id: string;
readonly user_id: number;
readonly request_user_id: number;
readonly request_user: DbUser;
readonly created_at: string;
readonly updated_at: string;
readonly deleted_at: string;
readonly request_emailed_at: string;
readonly collaboration_emailed_at: string;
readonly status: "pending" | "accept" | "reject";
readonly message: string;
}
interface DbListOwner {
readonly id: number;
readonly login: string;
readonly name: string;
}
interface DbListContributor {
readonly id: string;
readonly list_id: string;
readonly user_id: string;
readonly login: string;
readonly created_at: string;
readonly username: string;
}
type UserListWorkspace = Workspace & { workspace_id: string };
interface DbUserList {
readonly id: string;
readonly user: DbListOwner;
readonly name: string;
readonly is_public: boolean;
readonly created_at: string;
readonly updated_at: string;
readonly workspaces?: UserListWorkspace;
}
interface DbWorkspaceContributorInsight {
readonly id: string;
readonly user_id: number;
readonly created_at: string;
readonly updated_at: string;
readonly deleted_at: string;
readonly name: string;
readonly is_public: boolean;
readonly is_featured: boolean;
}
interface DBList {
id: string;
user_id: number;
name: string;
is_public: boolean;
created_at: string;
updated_at: string;
deleted_at: string | null;
}
interface PagedData<T> {
data?: T[];
meta: Meta;
}
interface DbUserContributor extends DbUser {
commits: number;
prs_created: number;
issues_created: number;
issue_comments: number;
commit_comments: number;
pr_review_comments: number;
total_contributions: number;
}
interface DbRepoContributor {
id: number;
login: string;
company: string;
location: string;
avatar_url: string;
oscr: number;
commits: number;
prs_created: number;
issues_created: number;
issue_comments: number;
commit_comments: number;
pr_review_comments: number;
total_contributions: number;
devstats_updated_at: string;
updated_at: string;
}
interface DbListContributorStat {
login: string;
commits: number;
prs_created: number;
prs_reviewed: number;
issues_created: number;
commit_comments: number;
issue_comments: number;
pr_review_comments: number;
comments: number;
total_contributions: number;
recent_pull_requests_count?: number;
recent_pull_request_velocity_count?: number;
}
interface DbProjectContributions {
repo_name: string;
commits: number;
prs_created: number;
issues_created: number;
commit_comments: number;
issue_comments: number;
pr_review_comments: number;
comments: number;
total_contributions: number;
}
interface DBProjectContributor {
login: string;
commits: number;
prs_created: number;
prs_reviewed: number;
issues_created: number;
commit_comments: number;
issue_comments: number;
pr_review_comments: number;
comments: number;
total_contributions: number;
}
interface DbUserOrganization {
id: number;
user_id: number;
organization_id: number;
user: DbUser;
organization_user: DbUser;
}
interface GhOrgTeam {
id: number;
name: string;
slug: string;
}
interface GhOrgTeamMember {
id: number;
login: string;
}
interface DbPullRequestGitHubEventsHistogram {
bucket: string;
interval: number;
prs_count: number;
accepted_prs: number;
open_prs: number;
closed_prs: number;
draft_prs: number;
active_prs: number;
spam_prs: number;
pr_velocity: number;
}
interface Workspace {
id: string;
name: string;
description: string;
created_at: string | null;
updated_at: string | null;
deleted_at: string | null;
is_public: boolean;
members: WorkspaceMember[];
}
interface WorkspaceMember {
id: string;
user_id: number;
role: string;
member: DbUser;
}
interface DbWorkspacesReposStats {
pull_requests: {
opened: number;
merged: number;
velocity: number;
};
issues: {
opened: number;
closed: number;
velocity: number;
};
repos: {
stars: number;
forks: number;
activity_ratio: number;
};
}
type LottoFactor = "very-high" | "high" | "moderate" | "low";
interface ContributorLottoFactor {
contributor: string;
count: number;
percent_of_total: number;
lotto_factor: LottoFactor;
}
interface RepositoryLottoFactor {
all_contribs: ContributorLottoFactor[];
all_lotto_factor: LottoFactor;
}
interface RepositoryRoss {
ross: { bucket: string; index: number }[];
contributors: {
bucket: string;
new: number;
recurring: number;
internal: number;
}[];
}
interface RepositoryYolo {
num_yolo_pushes: number;
num_yolo_pushed_commits: number;
data: {
actor_login: string;
event_time: string;
sha: string;
push_num_commits: number;
}[];
}
// sourced from open-sauced/api
type ThreadHistoryItem = {
id: string;
created_at: string;
updated_at: string;
deleted_at: string | null;
type: string;
message: string;
is_error: boolean;
error: string | null;
actor: string;
mood: number;
starsearch_thread_id: string;
};
interface StarSearchThread {
id: string;
title: string;
created_at: string;
updated_at: string;
deleted_at: string | null;
archived_at: string | null;
thread_summary: string | null;
is_publicly_viewable: boolean;
public_link: string | null;
thread_history: ThreadHistoryItem[];
}
type StarSearchEvent = "content" | "final" | "function_call" | "user_prompt";
type StarSearchPayloadStatus = "in_progress" | "done";
interface StarSearchContent {
type: StarSearchEvent;
parts: string[];
}
interface StarSearchError {
type: string;
message: string;
}
interface StarSearchPayload {
id?: string;
author?: string;
iso_time: string;
content: StarSearchContent;
status: StarSearchPayloadStatus;
error?: StarSearchError;
}