@foss.global/interfaces 0.2.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/changelog.md +10 -0
- package/dist_ts/00_commitinfo_data.d.ts +8 -0
- package/dist_ts/00_commitinfo_data.js +9 -0
- package/dist_ts/data/codefeed.d.ts +12 -0
- package/dist_ts/data/codefeed.js +2 -0
- package/dist_ts/data/gitmanager.d.ts +66 -0
- package/dist_ts/data/gitmanager.js +2 -0
- package/dist_ts/data/index.d.ts +3 -0
- package/dist_ts/data/index.js +4 -0
- package/dist_ts/data/public.d.ts +193 -0
- package/dist_ts/data/public.js +2 -0
- package/dist_ts/index.d.ts +5 -0
- package/dist_ts/index.js +6 -0
- package/dist_ts/plugins.d.ts +2 -0
- package/dist_ts/plugins.js +4 -0
- package/dist_ts/requests/index.d.ts +1 -0
- package/dist_ts/requests/index.js +2 -0
- package/dist_ts/requests/public.d.ts +85 -0
- package/dist_ts/requests/public.js +3 -0
- package/license.md +21 -0
- package/package.json +56 -0
- package/readme.md +82 -0
- package/ts/00_commitinfo_data.ts +8 -0
- package/ts/data/codefeed.ts +12 -0
- package/ts/data/gitmanager.ts +79 -0
- package/ts/data/index.ts +3 -0
- package/ts/data/public.ts +225 -0
- package/ts/index.ts +7 -0
- package/ts/plugins.ts +4 -0
- package/ts/requests/index.ts +1 -0
- package/ts/requests/public.ts +115 -0
package/changelog.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 2026-06-22 - 0.2.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- initialize shared TypeScript DTOs and request contracts (interfaces)
|
|
8
|
+
- Defined public, codefeed, and GitManager data interfaces.
|
|
9
|
+
- Added TypedRequest contracts for codefeed and public API endpoints.
|
|
10
|
+
- Added package entry points, TypeScript configuration, and an export smoke test.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* autocreated commitinfo by @push.rocks/commitinfo
|
|
3
|
+
*/
|
|
4
|
+
export const commitinfo = {
|
|
5
|
+
name: '@foss.global/interfaces',
|
|
6
|
+
version: '0.2.0',
|
|
7
|
+
description: 'Shared TypeScript interfaces and TypedRequest contracts for the foss.global Git platform ecosystem.'
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx5QkFBeUI7SUFDL0IsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLHFHQUFxRztDQUNuSCxDQUFBIn0=
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ICodefeedCommitResult {
|
|
2
|
+
baseUrl: string;
|
|
3
|
+
org: string;
|
|
4
|
+
repo: string;
|
|
5
|
+
timestamp: string;
|
|
6
|
+
hash: string;
|
|
7
|
+
commitMessage: string;
|
|
8
|
+
tagged: boolean;
|
|
9
|
+
publishedOnNpm: boolean;
|
|
10
|
+
prettyAgoTime: string;
|
|
11
|
+
changelog: string | undefined;
|
|
12
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export type TGitManagerRefType = 'branch' | 'tag' | 'other';
|
|
2
|
+
export type TGitManagerObjectType = 'blob' | 'tree' | 'commit' | 'tag' | 'other';
|
|
3
|
+
export type TGitManagerTreeEntryType = 'file' | 'dir' | 'symlink' | 'submodule' | 'other';
|
|
4
|
+
export interface IGitManagerRepositorySelector {
|
|
5
|
+
org: string;
|
|
6
|
+
repo: string;
|
|
7
|
+
}
|
|
8
|
+
export interface IGitManagerRepositoryInfo extends IGitManagerRepositorySelector {
|
|
9
|
+
repoPath: string;
|
|
10
|
+
defaultBranch: string;
|
|
11
|
+
isBare: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface IGitManagerInitBareRepositoryRequest extends IGitManagerRepositorySelector {
|
|
14
|
+
defaultBranch?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface IGitManagerImportMirrorRequest extends IGitManagerRepositorySelector {
|
|
17
|
+
remoteUrl: string;
|
|
18
|
+
}
|
|
19
|
+
export interface IGitManagerRef extends IGitManagerRepositorySelector {
|
|
20
|
+
name: string;
|
|
21
|
+
shortName: string;
|
|
22
|
+
objectId: string;
|
|
23
|
+
objectType: TGitManagerObjectType;
|
|
24
|
+
refType: TGitManagerRefType;
|
|
25
|
+
updatedAt: string;
|
|
26
|
+
subject: string;
|
|
27
|
+
}
|
|
28
|
+
export interface IGitManagerRefRequest extends IGitManagerRepositorySelector {
|
|
29
|
+
}
|
|
30
|
+
export interface IGitManagerTreeRequest extends IGitManagerRepositorySelector {
|
|
31
|
+
ref?: string;
|
|
32
|
+
path?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface IGitManagerTreeEntry {
|
|
35
|
+
path: string;
|
|
36
|
+
name: string;
|
|
37
|
+
mode: string;
|
|
38
|
+
objectId: string;
|
|
39
|
+
objectType: TGitManagerObjectType;
|
|
40
|
+
entryType: TGitManagerTreeEntryType;
|
|
41
|
+
size: number | null;
|
|
42
|
+
}
|
|
43
|
+
export interface IGitManagerReadFileRequest extends IGitManagerRepositorySelector {
|
|
44
|
+
ref?: string;
|
|
45
|
+
path: string;
|
|
46
|
+
}
|
|
47
|
+
export interface IGitManagerFileContent {
|
|
48
|
+
path: string;
|
|
49
|
+
objectId: string;
|
|
50
|
+
size: number;
|
|
51
|
+
encoding: 'base64';
|
|
52
|
+
contentBase64: string;
|
|
53
|
+
isBinary: boolean;
|
|
54
|
+
}
|
|
55
|
+
export interface IGitManagerListCommitsRequest extends IGitManagerRepositorySelector {
|
|
56
|
+
ref?: string;
|
|
57
|
+
limit?: number;
|
|
58
|
+
}
|
|
59
|
+
export interface IGitManagerCommitSummary extends IGitManagerRepositorySelector {
|
|
60
|
+
sha: string;
|
|
61
|
+
shortSha: string;
|
|
62
|
+
createdAt: string;
|
|
63
|
+
authorName: string;
|
|
64
|
+
authorEmail: string;
|
|
65
|
+
subject: string;
|
|
66
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export * from './codefeed.js';
|
|
2
|
+
export * from './gitmanager.js';
|
|
3
|
+
export * from './public.js';
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9kYXRhL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsaUJBQWlCLENBQUM7QUFDaEMsY0FBYyxhQUFhLENBQUMifQ==
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
export interface IPublicUser {
|
|
2
|
+
login: string;
|
|
3
|
+
fullName: string;
|
|
4
|
+
description: string;
|
|
5
|
+
website: string;
|
|
6
|
+
location: string;
|
|
7
|
+
avatarUrl: string;
|
|
8
|
+
htmlUrl: string;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IPublicOrg {
|
|
12
|
+
name: string;
|
|
13
|
+
fullName: string;
|
|
14
|
+
description: string;
|
|
15
|
+
website: string;
|
|
16
|
+
location: string;
|
|
17
|
+
avatarUrl: string;
|
|
18
|
+
htmlUrl: string;
|
|
19
|
+
repoCount: number;
|
|
20
|
+
starsCount: number;
|
|
21
|
+
memberCount: number;
|
|
22
|
+
languages: Record<string, number>;
|
|
23
|
+
}
|
|
24
|
+
export interface IPublicRepo {
|
|
25
|
+
id: number;
|
|
26
|
+
org: string;
|
|
27
|
+
name: string;
|
|
28
|
+
slug: string;
|
|
29
|
+
orgAvatarUrl: string;
|
|
30
|
+
description: string;
|
|
31
|
+
language: string;
|
|
32
|
+
htmlUrl: string;
|
|
33
|
+
cloneUrl: string;
|
|
34
|
+
sshUrl: string;
|
|
35
|
+
starsCount: number;
|
|
36
|
+
forksCount: number;
|
|
37
|
+
watchersCount: number;
|
|
38
|
+
openIssuesCount: number;
|
|
39
|
+
openPrCount: number;
|
|
40
|
+
releaseCount: number;
|
|
41
|
+
size: number;
|
|
42
|
+
defaultBranch: string;
|
|
43
|
+
updatedAt: string;
|
|
44
|
+
createdAt: string;
|
|
45
|
+
archived: boolean;
|
|
46
|
+
topics: string[];
|
|
47
|
+
}
|
|
48
|
+
export interface IPublicContentItem {
|
|
49
|
+
name: string;
|
|
50
|
+
path: string;
|
|
51
|
+
type: 'file' | 'dir' | 'symlink' | 'submodule';
|
|
52
|
+
size: number;
|
|
53
|
+
htmlUrl: string;
|
|
54
|
+
downloadUrl: string;
|
|
55
|
+
lastCommitSha: string;
|
|
56
|
+
lastAuthorDate: string;
|
|
57
|
+
lastCommitMessage: string;
|
|
58
|
+
}
|
|
59
|
+
export interface IPublicReleaseAsset {
|
|
60
|
+
name: string;
|
|
61
|
+
size: number;
|
|
62
|
+
downloadCount: number;
|
|
63
|
+
browserDownloadUrl: string;
|
|
64
|
+
}
|
|
65
|
+
export interface IPublicRelease {
|
|
66
|
+
tagName: string;
|
|
67
|
+
name: string;
|
|
68
|
+
body: string;
|
|
69
|
+
htmlUrl: string;
|
|
70
|
+
publishedAt: string;
|
|
71
|
+
prerelease: boolean;
|
|
72
|
+
draft: boolean;
|
|
73
|
+
author: IPublicUser;
|
|
74
|
+
assets: IPublicReleaseAsset[];
|
|
75
|
+
}
|
|
76
|
+
export type TPublicActivityKind = 'feat' | 'fix' | 'perf' | 'docs' | 'test' | 'refactor' | 'build' | 'ci' | 'chore' | 'rel' | 'break' | 'code';
|
|
77
|
+
export interface IPublicActivityEntry {
|
|
78
|
+
id: string;
|
|
79
|
+
org: string;
|
|
80
|
+
repo: string;
|
|
81
|
+
repoSlug: string;
|
|
82
|
+
tagName: string;
|
|
83
|
+
version: string;
|
|
84
|
+
kind: TPublicActivityKind;
|
|
85
|
+
title: string;
|
|
86
|
+
body: string;
|
|
87
|
+
createdAt: string;
|
|
88
|
+
}
|
|
89
|
+
export interface IPublicIssueLabel {
|
|
90
|
+
name: string;
|
|
91
|
+
color: string;
|
|
92
|
+
}
|
|
93
|
+
export interface IPublicIssue {
|
|
94
|
+
number: number;
|
|
95
|
+
title: string;
|
|
96
|
+
body: string;
|
|
97
|
+
htmlUrl: string;
|
|
98
|
+
state: string;
|
|
99
|
+
comments: number;
|
|
100
|
+
createdAt: string;
|
|
101
|
+
updatedAt: string;
|
|
102
|
+
user: IPublicUser;
|
|
103
|
+
labels: IPublicIssueLabel[];
|
|
104
|
+
}
|
|
105
|
+
export interface IPublicIssueComment {
|
|
106
|
+
id: number;
|
|
107
|
+
body: string;
|
|
108
|
+
htmlUrl: string;
|
|
109
|
+
createdAt: string;
|
|
110
|
+
updatedAt: string;
|
|
111
|
+
user: IPublicUser;
|
|
112
|
+
}
|
|
113
|
+
export interface IPublicCommit {
|
|
114
|
+
sha: string;
|
|
115
|
+
shortSha: string;
|
|
116
|
+
message: string;
|
|
117
|
+
title: string;
|
|
118
|
+
body: string;
|
|
119
|
+
htmlUrl: string;
|
|
120
|
+
createdAt: string;
|
|
121
|
+
authorName: string;
|
|
122
|
+
authorLogin: string;
|
|
123
|
+
authorAvatarUrl: string;
|
|
124
|
+
repoSlug: string;
|
|
125
|
+
files: string[];
|
|
126
|
+
additions: number;
|
|
127
|
+
deletions: number;
|
|
128
|
+
verified: boolean;
|
|
129
|
+
kind: TPublicActivityKind;
|
|
130
|
+
}
|
|
131
|
+
export type TPublicDiffLineKind = 'add' | 'del' | 'context';
|
|
132
|
+
export interface IPublicDiffLine {
|
|
133
|
+
kind: TPublicDiffLineKind;
|
|
134
|
+
content: string;
|
|
135
|
+
oldNumber: number | null;
|
|
136
|
+
newNumber: number | null;
|
|
137
|
+
}
|
|
138
|
+
export interface IPublicDiffHunk {
|
|
139
|
+
header: string;
|
|
140
|
+
lines: IPublicDiffLine[];
|
|
141
|
+
}
|
|
142
|
+
export type TPublicDiffFileStatus = 'added' | 'modified' | 'deleted' | 'renamed';
|
|
143
|
+
export interface IPublicDiffFile {
|
|
144
|
+
path: string;
|
|
145
|
+
previousPath: string;
|
|
146
|
+
status: TPublicDiffFileStatus;
|
|
147
|
+
language: string;
|
|
148
|
+
additions: number;
|
|
149
|
+
deletions: number;
|
|
150
|
+
isBinary: boolean;
|
|
151
|
+
hunks: IPublicDiffHunk[];
|
|
152
|
+
}
|
|
153
|
+
export interface IPublicCommitDetail {
|
|
154
|
+
sha: string;
|
|
155
|
+
shortSha: string;
|
|
156
|
+
message: string;
|
|
157
|
+
title: string;
|
|
158
|
+
body: string;
|
|
159
|
+
htmlUrl: string;
|
|
160
|
+
createdAt: string;
|
|
161
|
+
authorName: string;
|
|
162
|
+
authorLogin: string;
|
|
163
|
+
authorAvatarUrl: string;
|
|
164
|
+
verified: boolean;
|
|
165
|
+
parents: string[];
|
|
166
|
+
additions: number;
|
|
167
|
+
deletions: number;
|
|
168
|
+
files: IPublicDiffFile[];
|
|
169
|
+
diffTruncated: boolean;
|
|
170
|
+
}
|
|
171
|
+
export interface IPublicFile {
|
|
172
|
+
path: string;
|
|
173
|
+
name: string;
|
|
174
|
+
size: number;
|
|
175
|
+
htmlUrl: string;
|
|
176
|
+
downloadUrl: string;
|
|
177
|
+
content: string;
|
|
178
|
+
isBinary: boolean;
|
|
179
|
+
truncated: boolean;
|
|
180
|
+
}
|
|
181
|
+
export interface IPublicNewsItem {
|
|
182
|
+
title: string;
|
|
183
|
+
excerpt: string;
|
|
184
|
+
url: string;
|
|
185
|
+
category: string;
|
|
186
|
+
publishedAt: string;
|
|
187
|
+
}
|
|
188
|
+
export interface IPublicStats {
|
|
189
|
+
orgCount: number;
|
|
190
|
+
repoCount: number;
|
|
191
|
+
releaseCount: number;
|
|
192
|
+
openIssueCount: number;
|
|
193
|
+
}
|
package/dist_ts/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as data from './data/index.js';
|
|
2
|
+
import * as requests from './requests/index.js';
|
|
3
|
+
export { data, requests };
|
|
4
|
+
export * from './data/index.js';
|
|
5
|
+
export * from './requests/index.js';
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssSUFBSSxNQUFNLGlCQUFpQixDQUFDO0FBQ3hDLE9BQU8sS0FBSyxRQUFRLE1BQU0scUJBQXFCLENBQUM7QUFFaEQsT0FBTyxFQUFFLElBQUksRUFBRSxRQUFRLEVBQUUsQ0FBQztBQUUxQixjQUFjLGlCQUFpQixDQUFDO0FBQ2hDLGNBQWMscUJBQXFCLENBQUMifQ==
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// @api.global scope
|
|
2
|
+
import * as typedrequestInterfaces from '@api.global/typedrequest-interfaces';
|
|
3
|
+
export { typedrequestInterfaces };
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3BsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsb0JBQW9CO0FBQ3BCLE9BQU8sS0FBSyxzQkFBc0IsTUFBTSxxQ0FBcUMsQ0FBQztBQUU5RSxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsQ0FBQyJ9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public.js';
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
import * as data from '../data/index.js';
|
|
3
|
+
export interface IReq_Codefeed extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Codefeed> {
|
|
4
|
+
method: 'codefeed';
|
|
5
|
+
request: Record<string, never>;
|
|
6
|
+
response: {
|
|
7
|
+
commits: data.ICodefeedCommitResult[];
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface IReq_PublicOverview extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_PublicOverview> {
|
|
11
|
+
method: 'publicOverview';
|
|
12
|
+
request: {
|
|
13
|
+
query?: string;
|
|
14
|
+
};
|
|
15
|
+
response: {
|
|
16
|
+
orgs: data.IPublicOrg[];
|
|
17
|
+
repos: data.IPublicRepo[];
|
|
18
|
+
activity: data.IPublicActivityEntry[];
|
|
19
|
+
commitFeed: data.IPublicCommit[];
|
|
20
|
+
news: data.IPublicNewsItem[];
|
|
21
|
+
stats: data.IPublicStats;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export interface IReq_PublicOrg extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_PublicOrg> {
|
|
25
|
+
method: 'publicOrg';
|
|
26
|
+
request: {
|
|
27
|
+
org: string;
|
|
28
|
+
};
|
|
29
|
+
response: {
|
|
30
|
+
org: data.IPublicOrg | null;
|
|
31
|
+
repos: data.IPublicRepo[];
|
|
32
|
+
members: data.IPublicUser[];
|
|
33
|
+
activity: data.IPublicActivityEntry[];
|
|
34
|
+
commitFeed: data.IPublicCommit[];
|
|
35
|
+
stats: data.IPublicStats;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export interface IReq_PublicRepo extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_PublicRepo> {
|
|
39
|
+
method: 'publicRepo';
|
|
40
|
+
request: {
|
|
41
|
+
org: string;
|
|
42
|
+
repo: string;
|
|
43
|
+
path?: string;
|
|
44
|
+
issueNumber?: number;
|
|
45
|
+
};
|
|
46
|
+
response: {
|
|
47
|
+
repo: data.IPublicRepo | null;
|
|
48
|
+
contents: data.IPublicContentItem[];
|
|
49
|
+
readme: string;
|
|
50
|
+
releases: data.IPublicRelease[];
|
|
51
|
+
activity: data.IPublicActivityEntry[];
|
|
52
|
+
issues: data.IPublicIssue[];
|
|
53
|
+
selectedIssue: data.IPublicIssue | null;
|
|
54
|
+
selectedIssueComments: data.IPublicIssueComment[];
|
|
55
|
+
commits: data.IPublicCommit[];
|
|
56
|
+
languages: Record<string, number>;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export interface IReq_PublicFile extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_PublicFile> {
|
|
60
|
+
method: 'publicFile';
|
|
61
|
+
request: {
|
|
62
|
+
org: string;
|
|
63
|
+
repo: string;
|
|
64
|
+
path: string;
|
|
65
|
+
};
|
|
66
|
+
response: {
|
|
67
|
+
repo: data.IPublicRepo | null;
|
|
68
|
+
file: data.IPublicFile | null;
|
|
69
|
+
activity: data.IPublicActivityEntry[];
|
|
70
|
+
commits: data.IPublicCommit[];
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
export interface IReq_PublicCommits extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_PublicCommits> {
|
|
74
|
+
method: 'publicCommits';
|
|
75
|
+
request: {
|
|
76
|
+
org: string;
|
|
77
|
+
repo: string;
|
|
78
|
+
sha?: string;
|
|
79
|
+
};
|
|
80
|
+
response: {
|
|
81
|
+
repo: data.IPublicRepo | null;
|
|
82
|
+
commits: data.IPublicCommit[];
|
|
83
|
+
selectedCommit: data.IPublicCommitDetail | null;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
import * as data from '../data/index.js';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdHMvcHVibGljLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sS0FBSyxJQUFJLE1BQU0sa0JBQWtCLENBQUMifQ==
|
package/license.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Task Venture Capital GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@foss.global/interfaces",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Shared TypeScript interfaces and TypedRequest contracts for the foss.global Git platform ecosystem.",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./dist_ts/index.js"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"author": "Task Venture Capital GmbH",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@api.global/typedrequest-interfaces": "^3.0.19"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@git.zone/tsbuild": "^4.4.2",
|
|
17
|
+
"@git.zone/tsdoc": "^2.1.1",
|
|
18
|
+
"@git.zone/tsrun": "^2.0.4",
|
|
19
|
+
"@git.zone/tstest": "^3.6.6",
|
|
20
|
+
"@types/node": "^26.0.0"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"ts/**/*",
|
|
24
|
+
"dist/**/*",
|
|
25
|
+
"dist_*/**/*",
|
|
26
|
+
"dist_ts/**/*",
|
|
27
|
+
"readme.md",
|
|
28
|
+
"changelog.md",
|
|
29
|
+
"license.md"
|
|
30
|
+
],
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+ssh://git@code.foss.global:29419/foss.global/interfaces.git"
|
|
34
|
+
},
|
|
35
|
+
"bugs": {
|
|
36
|
+
"url": "https://code.foss.global/foss.global/interfaces/issues"
|
|
37
|
+
},
|
|
38
|
+
"homepage": "https://code.foss.global/foss.global/interfaces#readme",
|
|
39
|
+
"keywords": [
|
|
40
|
+
"foss.global",
|
|
41
|
+
"interfaces",
|
|
42
|
+
"typedrequest",
|
|
43
|
+
"contracts",
|
|
44
|
+
"git",
|
|
45
|
+
"forge",
|
|
46
|
+
"typescript"
|
|
47
|
+
],
|
|
48
|
+
"browserslist": [
|
|
49
|
+
"last 1 chrome versions"
|
|
50
|
+
],
|
|
51
|
+
"scripts": {
|
|
52
|
+
"test": "tstest test/ --verbose --logfile --timeout 60",
|
|
53
|
+
"build": "tsbuild tsfolders",
|
|
54
|
+
"buildDocs": "tsdoc"
|
|
55
|
+
}
|
|
56
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# @foss.global/interfaces
|
|
2
|
+
|
|
3
|
+
Shared TypeScript DTOs and TypedRequest contracts for the foss.global Git platform ecosystem.
|
|
4
|
+
|
|
5
|
+
This package intentionally contains contracts only. Runtime forge adapters belong in `@foss.global/codefeed`, and the Git storage/protocol engine belongs in `@foss.global/gitmanager`.
|
|
6
|
+
|
|
7
|
+
## Issue Reporting and Security
|
|
8
|
+
|
|
9
|
+
For reporting bugs, issues, or security vulnerabilities, please visit [community.foss.global/](https://community.foss.global/). This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a [code.foss.global/](https://code.foss.global/) account to submit Pull Requests directly.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pnpm add @foss.global/interfaces
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import type { data, requests } from '@foss.global/interfaces';
|
|
21
|
+
|
|
22
|
+
const repo: data.IPublicRepo = {
|
|
23
|
+
id: 1,
|
|
24
|
+
org: 'foss.global',
|
|
25
|
+
name: 'interfaces',
|
|
26
|
+
slug: 'foss.global/interfaces',
|
|
27
|
+
orgAvatarUrl: '',
|
|
28
|
+
description: 'Shared contracts',
|
|
29
|
+
language: 'TypeScript',
|
|
30
|
+
htmlUrl: 'https://code.foss.global/foss.global/interfaces',
|
|
31
|
+
cloneUrl: 'https://code.foss.global/foss.global/interfaces.git',
|
|
32
|
+
sshUrl: 'ssh://git@code.foss.global:29419/foss.global/interfaces.git',
|
|
33
|
+
starsCount: 0,
|
|
34
|
+
forksCount: 0,
|
|
35
|
+
watchersCount: 0,
|
|
36
|
+
openIssuesCount: 0,
|
|
37
|
+
openPrCount: 0,
|
|
38
|
+
releaseCount: 0,
|
|
39
|
+
size: 0,
|
|
40
|
+
defaultBranch: 'main',
|
|
41
|
+
updatedAt: new Date().toISOString(),
|
|
42
|
+
createdAt: new Date().toISOString(),
|
|
43
|
+
archived: false,
|
|
44
|
+
topics: [],
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
type PublicOverviewRequest = requests.IReq_PublicOverview;
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Exports
|
|
51
|
+
|
|
52
|
+
- `data`: public DTOs for users, organizations, repositories, contents, commits, diffs, releases, issues, activity, news, stats, codefeed commit results, and GitManager repository/read API results.
|
|
53
|
+
- `requests`: TypedRequest contracts for `codefeed`, `publicOverview`, `publicOrg`, `publicRepo`, `publicFile`, and `publicCommits`.
|
|
54
|
+
- Barrel exports: all public data and request interfaces are also exported from the package root.
|
|
55
|
+
|
|
56
|
+
## Testing
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pnpm test
|
|
60
|
+
pnpm run build
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## License and Legal Information
|
|
64
|
+
|
|
65
|
+
This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the repository license file.
|
|
66
|
+
|
|
67
|
+
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
|
|
68
|
+
|
|
69
|
+
### Trademarks
|
|
70
|
+
|
|
71
|
+
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein.
|
|
72
|
+
|
|
73
|
+
Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar.
|
|
74
|
+
|
|
75
|
+
### Company Information
|
|
76
|
+
|
|
77
|
+
Task Venture Capital GmbH<br>
|
|
78
|
+
Registered at District Court Bremen HRB 35230 HB, Germany
|
|
79
|
+
|
|
80
|
+
For any legal inquiries or further information, please contact us via email at hello@task.vc.
|
|
81
|
+
|
|
82
|
+
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* autocreated commitinfo by @push.rocks/commitinfo
|
|
3
|
+
*/
|
|
4
|
+
export const commitinfo = {
|
|
5
|
+
name: '@foss.global/interfaces',
|
|
6
|
+
version: '0.2.0',
|
|
7
|
+
description: 'Shared TypeScript interfaces and TypedRequest contracts for the foss.global Git platform ecosystem.'
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ICodefeedCommitResult {
|
|
2
|
+
baseUrl: string;
|
|
3
|
+
org: string;
|
|
4
|
+
repo: string;
|
|
5
|
+
timestamp: string;
|
|
6
|
+
hash: string;
|
|
7
|
+
commitMessage: string;
|
|
8
|
+
tagged: boolean;
|
|
9
|
+
publishedOnNpm: boolean;
|
|
10
|
+
prettyAgoTime: string;
|
|
11
|
+
changelog: string | undefined;
|
|
12
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export type TGitManagerRefType = 'branch' | 'tag' | 'other';
|
|
2
|
+
|
|
3
|
+
export type TGitManagerObjectType = 'blob' | 'tree' | 'commit' | 'tag' | 'other';
|
|
4
|
+
|
|
5
|
+
export type TGitManagerTreeEntryType = 'file' | 'dir' | 'symlink' | 'submodule' | 'other';
|
|
6
|
+
|
|
7
|
+
export interface IGitManagerRepositorySelector {
|
|
8
|
+
org: string;
|
|
9
|
+
repo: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface IGitManagerRepositoryInfo extends IGitManagerRepositorySelector {
|
|
13
|
+
repoPath: string;
|
|
14
|
+
defaultBranch: string;
|
|
15
|
+
isBare: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface IGitManagerInitBareRepositoryRequest extends IGitManagerRepositorySelector {
|
|
19
|
+
defaultBranch?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface IGitManagerImportMirrorRequest extends IGitManagerRepositorySelector {
|
|
23
|
+
remoteUrl: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface IGitManagerRef extends IGitManagerRepositorySelector {
|
|
27
|
+
name: string;
|
|
28
|
+
shortName: string;
|
|
29
|
+
objectId: string;
|
|
30
|
+
objectType: TGitManagerObjectType;
|
|
31
|
+
refType: TGitManagerRefType;
|
|
32
|
+
updatedAt: string;
|
|
33
|
+
subject: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface IGitManagerRefRequest extends IGitManagerRepositorySelector {}
|
|
37
|
+
|
|
38
|
+
export interface IGitManagerTreeRequest extends IGitManagerRepositorySelector {
|
|
39
|
+
ref?: string;
|
|
40
|
+
path?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface IGitManagerTreeEntry {
|
|
44
|
+
path: string;
|
|
45
|
+
name: string;
|
|
46
|
+
mode: string;
|
|
47
|
+
objectId: string;
|
|
48
|
+
objectType: TGitManagerObjectType;
|
|
49
|
+
entryType: TGitManagerTreeEntryType;
|
|
50
|
+
size: number | null;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface IGitManagerReadFileRequest extends IGitManagerRepositorySelector {
|
|
54
|
+
ref?: string;
|
|
55
|
+
path: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface IGitManagerFileContent {
|
|
59
|
+
path: string;
|
|
60
|
+
objectId: string;
|
|
61
|
+
size: number;
|
|
62
|
+
encoding: 'base64';
|
|
63
|
+
contentBase64: string;
|
|
64
|
+
isBinary: boolean;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface IGitManagerListCommitsRequest extends IGitManagerRepositorySelector {
|
|
68
|
+
ref?: string;
|
|
69
|
+
limit?: number;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface IGitManagerCommitSummary extends IGitManagerRepositorySelector {
|
|
73
|
+
sha: string;
|
|
74
|
+
shortSha: string;
|
|
75
|
+
createdAt: string;
|
|
76
|
+
authorName: string;
|
|
77
|
+
authorEmail: string;
|
|
78
|
+
subject: string;
|
|
79
|
+
}
|
package/ts/data/index.ts
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
export interface IPublicUser {
|
|
2
|
+
login: string;
|
|
3
|
+
fullName: string;
|
|
4
|
+
description: string;
|
|
5
|
+
website: string;
|
|
6
|
+
location: string;
|
|
7
|
+
avatarUrl: string;
|
|
8
|
+
htmlUrl: string;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface IPublicOrg {
|
|
13
|
+
name: string;
|
|
14
|
+
fullName: string;
|
|
15
|
+
description: string;
|
|
16
|
+
website: string;
|
|
17
|
+
location: string;
|
|
18
|
+
avatarUrl: string;
|
|
19
|
+
htmlUrl: string;
|
|
20
|
+
repoCount: number;
|
|
21
|
+
starsCount: number;
|
|
22
|
+
memberCount: number;
|
|
23
|
+
languages: Record<string, number>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface IPublicRepo {
|
|
27
|
+
id: number;
|
|
28
|
+
org: string;
|
|
29
|
+
name: string;
|
|
30
|
+
slug: string;
|
|
31
|
+
orgAvatarUrl: string;
|
|
32
|
+
description: string;
|
|
33
|
+
language: string;
|
|
34
|
+
htmlUrl: string;
|
|
35
|
+
cloneUrl: string;
|
|
36
|
+
sshUrl: string;
|
|
37
|
+
starsCount: number;
|
|
38
|
+
forksCount: number;
|
|
39
|
+
watchersCount: number;
|
|
40
|
+
openIssuesCount: number;
|
|
41
|
+
openPrCount: number;
|
|
42
|
+
releaseCount: number;
|
|
43
|
+
size: number;
|
|
44
|
+
defaultBranch: string;
|
|
45
|
+
updatedAt: string;
|
|
46
|
+
createdAt: string;
|
|
47
|
+
archived: boolean;
|
|
48
|
+
topics: string[];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface IPublicContentItem {
|
|
52
|
+
name: string;
|
|
53
|
+
path: string;
|
|
54
|
+
type: 'file' | 'dir' | 'symlink' | 'submodule';
|
|
55
|
+
size: number;
|
|
56
|
+
htmlUrl: string;
|
|
57
|
+
downloadUrl: string;
|
|
58
|
+
lastCommitSha: string;
|
|
59
|
+
lastAuthorDate: string;
|
|
60
|
+
lastCommitMessage: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface IPublicReleaseAsset {
|
|
64
|
+
name: string;
|
|
65
|
+
size: number;
|
|
66
|
+
downloadCount: number;
|
|
67
|
+
browserDownloadUrl: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface IPublicRelease {
|
|
71
|
+
tagName: string;
|
|
72
|
+
name: string;
|
|
73
|
+
body: string;
|
|
74
|
+
htmlUrl: string;
|
|
75
|
+
publishedAt: string;
|
|
76
|
+
prerelease: boolean;
|
|
77
|
+
draft: boolean;
|
|
78
|
+
author: IPublicUser;
|
|
79
|
+
assets: IPublicReleaseAsset[];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type TPublicActivityKind =
|
|
83
|
+
| 'feat'
|
|
84
|
+
| 'fix'
|
|
85
|
+
| 'perf'
|
|
86
|
+
| 'docs'
|
|
87
|
+
| 'test'
|
|
88
|
+
| 'refactor'
|
|
89
|
+
| 'build'
|
|
90
|
+
| 'ci'
|
|
91
|
+
| 'chore'
|
|
92
|
+
| 'rel'
|
|
93
|
+
| 'break'
|
|
94
|
+
| 'code';
|
|
95
|
+
|
|
96
|
+
export interface IPublicActivityEntry {
|
|
97
|
+
id: string;
|
|
98
|
+
org: string;
|
|
99
|
+
repo: string;
|
|
100
|
+
repoSlug: string;
|
|
101
|
+
tagName: string;
|
|
102
|
+
version: string;
|
|
103
|
+
kind: TPublicActivityKind;
|
|
104
|
+
title: string;
|
|
105
|
+
body: string;
|
|
106
|
+
createdAt: string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface IPublicIssueLabel {
|
|
110
|
+
name: string;
|
|
111
|
+
color: string;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface IPublicIssue {
|
|
115
|
+
number: number;
|
|
116
|
+
title: string;
|
|
117
|
+
body: string;
|
|
118
|
+
htmlUrl: string;
|
|
119
|
+
state: string;
|
|
120
|
+
comments: number;
|
|
121
|
+
createdAt: string;
|
|
122
|
+
updatedAt: string;
|
|
123
|
+
user: IPublicUser;
|
|
124
|
+
labels: IPublicIssueLabel[];
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export interface IPublicIssueComment {
|
|
128
|
+
id: number;
|
|
129
|
+
body: string;
|
|
130
|
+
htmlUrl: string;
|
|
131
|
+
createdAt: string;
|
|
132
|
+
updatedAt: string;
|
|
133
|
+
user: IPublicUser;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface IPublicCommit {
|
|
137
|
+
sha: string;
|
|
138
|
+
shortSha: string;
|
|
139
|
+
message: string;
|
|
140
|
+
title: string;
|
|
141
|
+
body: string;
|
|
142
|
+
htmlUrl: string;
|
|
143
|
+
createdAt: string;
|
|
144
|
+
authorName: string;
|
|
145
|
+
authorLogin: string;
|
|
146
|
+
authorAvatarUrl: string;
|
|
147
|
+
repoSlug: string;
|
|
148
|
+
files: string[];
|
|
149
|
+
additions: number;
|
|
150
|
+
deletions: number;
|
|
151
|
+
verified: boolean;
|
|
152
|
+
kind: TPublicActivityKind;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export type TPublicDiffLineKind = 'add' | 'del' | 'context';
|
|
156
|
+
|
|
157
|
+
export interface IPublicDiffLine {
|
|
158
|
+
kind: TPublicDiffLineKind;
|
|
159
|
+
content: string;
|
|
160
|
+
oldNumber: number | null;
|
|
161
|
+
newNumber: number | null;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export interface IPublicDiffHunk {
|
|
165
|
+
header: string;
|
|
166
|
+
lines: IPublicDiffLine[];
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export type TPublicDiffFileStatus = 'added' | 'modified' | 'deleted' | 'renamed';
|
|
170
|
+
|
|
171
|
+
export interface IPublicDiffFile {
|
|
172
|
+
path: string;
|
|
173
|
+
previousPath: string;
|
|
174
|
+
status: TPublicDiffFileStatus;
|
|
175
|
+
language: string;
|
|
176
|
+
additions: number;
|
|
177
|
+
deletions: number;
|
|
178
|
+
isBinary: boolean;
|
|
179
|
+
hunks: IPublicDiffHunk[];
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export interface IPublicCommitDetail {
|
|
183
|
+
sha: string;
|
|
184
|
+
shortSha: string;
|
|
185
|
+
message: string;
|
|
186
|
+
title: string;
|
|
187
|
+
body: string;
|
|
188
|
+
htmlUrl: string;
|
|
189
|
+
createdAt: string;
|
|
190
|
+
authorName: string;
|
|
191
|
+
authorLogin: string;
|
|
192
|
+
authorAvatarUrl: string;
|
|
193
|
+
verified: boolean;
|
|
194
|
+
parents: string[];
|
|
195
|
+
additions: number;
|
|
196
|
+
deletions: number;
|
|
197
|
+
files: IPublicDiffFile[];
|
|
198
|
+
diffTruncated: boolean;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export interface IPublicFile {
|
|
202
|
+
path: string;
|
|
203
|
+
name: string;
|
|
204
|
+
size: number;
|
|
205
|
+
htmlUrl: string;
|
|
206
|
+
downloadUrl: string;
|
|
207
|
+
content: string;
|
|
208
|
+
isBinary: boolean;
|
|
209
|
+
truncated: boolean;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export interface IPublicNewsItem {
|
|
213
|
+
title: string;
|
|
214
|
+
excerpt: string;
|
|
215
|
+
url: string;
|
|
216
|
+
category: string;
|
|
217
|
+
publishedAt: string;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export interface IPublicStats {
|
|
221
|
+
orgCount: number;
|
|
222
|
+
repoCount: number;
|
|
223
|
+
releaseCount: number;
|
|
224
|
+
openIssueCount: number;
|
|
225
|
+
}
|
package/ts/index.ts
ADDED
package/ts/plugins.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public.js';
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
import * as data from '../data/index.js';
|
|
3
|
+
|
|
4
|
+
export interface IReq_Codefeed
|
|
5
|
+
extends plugins.typedrequestInterfaces.implementsTR<
|
|
6
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
7
|
+
IReq_Codefeed
|
|
8
|
+
> {
|
|
9
|
+
method: 'codefeed';
|
|
10
|
+
request: Record<string, never>;
|
|
11
|
+
response: {
|
|
12
|
+
commits: data.ICodefeedCommitResult[];
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface IReq_PublicOverview
|
|
17
|
+
extends plugins.typedrequestInterfaces.implementsTR<
|
|
18
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
19
|
+
IReq_PublicOverview
|
|
20
|
+
> {
|
|
21
|
+
method: 'publicOverview';
|
|
22
|
+
request: {
|
|
23
|
+
query?: string;
|
|
24
|
+
};
|
|
25
|
+
response: {
|
|
26
|
+
orgs: data.IPublicOrg[];
|
|
27
|
+
repos: data.IPublicRepo[];
|
|
28
|
+
activity: data.IPublicActivityEntry[];
|
|
29
|
+
commitFeed: data.IPublicCommit[];
|
|
30
|
+
news: data.IPublicNewsItem[];
|
|
31
|
+
stats: data.IPublicStats;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface IReq_PublicOrg
|
|
36
|
+
extends plugins.typedrequestInterfaces.implementsTR<
|
|
37
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
38
|
+
IReq_PublicOrg
|
|
39
|
+
> {
|
|
40
|
+
method: 'publicOrg';
|
|
41
|
+
request: {
|
|
42
|
+
org: string;
|
|
43
|
+
};
|
|
44
|
+
response: {
|
|
45
|
+
org: data.IPublicOrg | null;
|
|
46
|
+
repos: data.IPublicRepo[];
|
|
47
|
+
members: data.IPublicUser[];
|
|
48
|
+
activity: data.IPublicActivityEntry[];
|
|
49
|
+
commitFeed: data.IPublicCommit[];
|
|
50
|
+
stats: data.IPublicStats;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface IReq_PublicRepo
|
|
55
|
+
extends plugins.typedrequestInterfaces.implementsTR<
|
|
56
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
57
|
+
IReq_PublicRepo
|
|
58
|
+
> {
|
|
59
|
+
method: 'publicRepo';
|
|
60
|
+
request: {
|
|
61
|
+
org: string;
|
|
62
|
+
repo: string;
|
|
63
|
+
path?: string;
|
|
64
|
+
issueNumber?: number;
|
|
65
|
+
};
|
|
66
|
+
response: {
|
|
67
|
+
repo: data.IPublicRepo | null;
|
|
68
|
+
contents: data.IPublicContentItem[];
|
|
69
|
+
readme: string;
|
|
70
|
+
releases: data.IPublicRelease[];
|
|
71
|
+
activity: data.IPublicActivityEntry[];
|
|
72
|
+
issues: data.IPublicIssue[];
|
|
73
|
+
selectedIssue: data.IPublicIssue | null;
|
|
74
|
+
selectedIssueComments: data.IPublicIssueComment[];
|
|
75
|
+
commits: data.IPublicCommit[];
|
|
76
|
+
languages: Record<string, number>;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface IReq_PublicFile
|
|
81
|
+
extends plugins.typedrequestInterfaces.implementsTR<
|
|
82
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
83
|
+
IReq_PublicFile
|
|
84
|
+
> {
|
|
85
|
+
method: 'publicFile';
|
|
86
|
+
request: {
|
|
87
|
+
org: string;
|
|
88
|
+
repo: string;
|
|
89
|
+
path: string;
|
|
90
|
+
};
|
|
91
|
+
response: {
|
|
92
|
+
repo: data.IPublicRepo | null;
|
|
93
|
+
file: data.IPublicFile | null;
|
|
94
|
+
activity: data.IPublicActivityEntry[];
|
|
95
|
+
commits: data.IPublicCommit[];
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface IReq_PublicCommits
|
|
100
|
+
extends plugins.typedrequestInterfaces.implementsTR<
|
|
101
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
102
|
+
IReq_PublicCommits
|
|
103
|
+
> {
|
|
104
|
+
method: 'publicCommits';
|
|
105
|
+
request: {
|
|
106
|
+
org: string;
|
|
107
|
+
repo: string;
|
|
108
|
+
sha?: string;
|
|
109
|
+
};
|
|
110
|
+
response: {
|
|
111
|
+
repo: data.IPublicRepo | null;
|
|
112
|
+
commits: data.IPublicCommit[];
|
|
113
|
+
selectedCommit: data.IPublicCommitDetail | null;
|
|
114
|
+
};
|
|
115
|
+
}
|