@distilled.cloud/forgejo 0.0.0 → 1.0.0-rc.9
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/LICENSE +201 -0
- package/README.md +71 -0
- package/lib/credentials.d.ts +35 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +57 -0
- package/lib/credentials.js.map +1 -0
- package/lib/errors.d.ts +56 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +36 -0
- package/lib/errors.js.map +1 -0
- package/lib/index.d.ts +28 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +28 -0
- package/lib/index.js.map +1 -0
- package/lib/protocol.d.ts +18 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +61 -0
- package/lib/protocol.js.map +1 -0
- package/lib/retry.d.ts +50 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +43 -0
- package/lib/retry.js.map +1 -0
- package/lib/services/activitypub.d.ts +121 -0
- package/lib/services/activitypub.d.ts.map +1 -0
- package/lib/services/activitypub.js +202 -0
- package/lib/services/activitypub.js.map +1 -0
- package/lib/services/admin.d.ts +1196 -0
- package/lib/services/admin.d.ts.map +1 -0
- package/lib/services/admin.js +1276 -0
- package/lib/services/admin.js.map +1 -0
- package/lib/services/index.d.ts +11 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +12 -0
- package/lib/services/index.js.map +1 -0
- package/lib/services/issue.d.ts +1479 -0
- package/lib/services/issue.d.ts.map +1 -0
- package/lib/services/issue.js +1732 -0
- package/lib/services/issue.js.map +1 -0
- package/lib/services/miscellaneous.d.ts +494 -0
- package/lib/services/miscellaneous.d.ts.map +1 -0
- package/lib/services/miscellaneous.js +471 -0
- package/lib/services/miscellaneous.js.map +1 -0
- package/lib/services/notification.d.ts +390 -0
- package/lib/services/notification.d.ts.map +1 -0
- package/lib/services/notification.js +344 -0
- package/lib/services/notification.js.map +1 -0
- package/lib/services/organization.d.ts +1593 -0
- package/lib/services/organization.d.ts.map +1 -0
- package/lib/services/organization.js +1672 -0
- package/lib/services/organization.js.map +1 -0
- package/lib/services/package.d.ts +347 -0
- package/lib/services/package.d.ts.map +1 -0
- package/lib/services/package.js +320 -0
- package/lib/services/package.js.map +1 -0
- package/lib/services/repository.d.ts +4770 -0
- package/lib/services/repository.d.ts.map +1 -0
- package/lib/services/repository.js +5449 -0
- package/lib/services/repository.js.map +1 -0
- package/lib/services/settings.d.ts +67 -0
- package/lib/services/settings.d.ts.map +1 -0
- package/lib/services/settings.js +87 -0
- package/lib/services/settings.js.map +1 -0
- package/lib/services/user.d.ts +1764 -0
- package/lib/services/user.d.ts.map +1 -0
- package/lib/services/user.js +1921 -0
- package/lib/services/user.js.map +1 -0
- package/lib/traits.d.ts +10 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +11 -0
- package/lib/traits.js.map +1 -0
- package/package.json +78 -6
- package/src/credentials.ts +89 -0
- package/src/errors.ts +72 -0
- package/src/index.ts +31 -0
- package/src/protocol.ts +86 -0
- package/src/retry.ts +74 -0
- package/src/services/activitypub.ts +415 -0
- package/src/services/admin.ts +3103 -0
- package/src/services/index.ts +11 -0
- package/src/services/issue.ts +3949 -0
- package/src/services/miscellaneous.ts +1118 -0
- package/src/services/notification.ts +847 -0
- package/src/services/organization.ts +4008 -0
- package/src/services/package.ts +767 -0
- package/src/services/repository.ts +12839 -0
- package/src/services/settings.ts +190 -0
- package/src/services/user.ts +4669 -0
- package/src/traits.ts +44 -0
|
@@ -0,0 +1,767 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-forgejo). Do not edit.
|
|
2
|
+
import * as S from "@distilled.cloud/core/schema";
|
|
3
|
+
import * as API from "@distilled.cloud/core/api";
|
|
4
|
+
import * as C from "@distilled.cloud/core/category";
|
|
5
|
+
import * as T from "../traits.ts";
|
|
6
|
+
import {
|
|
7
|
+
ForgejoProtocol,
|
|
8
|
+
type ForgejoOpError,
|
|
9
|
+
type ForgejoOpContext,
|
|
10
|
+
} from "../protocol.ts";
|
|
11
|
+
import * as Retry from "../retry.ts";
|
|
12
|
+
|
|
13
|
+
export type { ForgejoOpError, ForgejoOpContext };
|
|
14
|
+
|
|
15
|
+
export class NotFound
|
|
16
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
17
|
+
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
18
|
+
code: S.Number,
|
|
19
|
+
message: S.String,
|
|
20
|
+
}).pipe(C.withBadRequestError),
|
|
21
|
+
[{ status: 404 }],
|
|
22
|
+
) {}
|
|
23
|
+
|
|
24
|
+
export interface DeletePackageRequest {
|
|
25
|
+
/** owner of the package */
|
|
26
|
+
owner: string;
|
|
27
|
+
/** type of the package */
|
|
28
|
+
type: string;
|
|
29
|
+
/** name of the package */
|
|
30
|
+
name: string;
|
|
31
|
+
/** version of the package */
|
|
32
|
+
version: string;
|
|
33
|
+
}
|
|
34
|
+
export const DeletePackageRequest = /*@__PURE__*/ S.suspend(() =>
|
|
35
|
+
S.Struct({
|
|
36
|
+
owner: S.String.pipe(T.Label()),
|
|
37
|
+
type: S.String.pipe(T.Label()),
|
|
38
|
+
name: S.String.pipe(T.Label()),
|
|
39
|
+
version: S.String.pipe(T.Label()),
|
|
40
|
+
}).pipe(
|
|
41
|
+
T.Http({
|
|
42
|
+
method: "DELETE",
|
|
43
|
+
uri: "/packages/{owner}/{type}/{name}/{version}",
|
|
44
|
+
code: 200,
|
|
45
|
+
}),
|
|
46
|
+
),
|
|
47
|
+
).annotate({
|
|
48
|
+
identifier: "DeletePackageRequest",
|
|
49
|
+
}) as any as S.Schema<DeletePackageRequest>;
|
|
50
|
+
|
|
51
|
+
export interface DeletePackageResponse {}
|
|
52
|
+
export const DeletePackageResponse = /*@__PURE__*/ S.suspend(() =>
|
|
53
|
+
S.Struct({}),
|
|
54
|
+
).annotate({
|
|
55
|
+
identifier: "DeletePackageResponse",
|
|
56
|
+
}) as any as S.Schema<DeletePackageResponse>;
|
|
57
|
+
|
|
58
|
+
export interface GetPackageRequest {
|
|
59
|
+
/** owner of the package */
|
|
60
|
+
owner: string;
|
|
61
|
+
/** type of the package */
|
|
62
|
+
type: string;
|
|
63
|
+
/** name of the package */
|
|
64
|
+
name: string;
|
|
65
|
+
/** version of the package */
|
|
66
|
+
version: string;
|
|
67
|
+
}
|
|
68
|
+
export const GetPackageRequest = /*@__PURE__*/ S.suspend(() =>
|
|
69
|
+
S.Struct({
|
|
70
|
+
owner: S.String.pipe(T.Label()),
|
|
71
|
+
type: S.String.pipe(T.Label()),
|
|
72
|
+
name: S.String.pipe(T.Label()),
|
|
73
|
+
version: S.String.pipe(T.Label()),
|
|
74
|
+
}).pipe(
|
|
75
|
+
T.Http({
|
|
76
|
+
method: "GET",
|
|
77
|
+
uri: "/packages/{owner}/{type}/{name}/{version}",
|
|
78
|
+
code: 200,
|
|
79
|
+
}),
|
|
80
|
+
),
|
|
81
|
+
).annotate({
|
|
82
|
+
identifier: "GetPackageRequest",
|
|
83
|
+
}) as any as S.Schema<GetPackageRequest>;
|
|
84
|
+
|
|
85
|
+
/** User represents a user */
|
|
86
|
+
export interface User {
|
|
87
|
+
/** Is user active */
|
|
88
|
+
active?: boolean;
|
|
89
|
+
/** URL to the user's avatar */
|
|
90
|
+
avatar_url?: string;
|
|
91
|
+
created?: string;
|
|
92
|
+
/** the user's description */
|
|
93
|
+
description?: string;
|
|
94
|
+
email?: string;
|
|
95
|
+
/** user counts */
|
|
96
|
+
followers_count?: number;
|
|
97
|
+
following_count?: number;
|
|
98
|
+
/** the user's full name */
|
|
99
|
+
full_name?: string;
|
|
100
|
+
/** URL to the user's profile page */
|
|
101
|
+
html_url?: string;
|
|
102
|
+
/** the user's id */
|
|
103
|
+
id: number;
|
|
104
|
+
/** Is the user an administrator */
|
|
105
|
+
is_admin?: boolean;
|
|
106
|
+
/** User locale */
|
|
107
|
+
language?: string;
|
|
108
|
+
last_login?: string;
|
|
109
|
+
/** the user's location */
|
|
110
|
+
location?: string;
|
|
111
|
+
/** the user's username */
|
|
112
|
+
login: string;
|
|
113
|
+
/** the user's authentication sign-in name. */
|
|
114
|
+
login_name?: string;
|
|
115
|
+
/** Is user login prohibited */
|
|
116
|
+
prohibit_login?: boolean;
|
|
117
|
+
/** the user's pronouns */
|
|
118
|
+
pronouns?: string;
|
|
119
|
+
/** Is user restricted */
|
|
120
|
+
restricted?: boolean;
|
|
121
|
+
/** The ID of the user's Authentication Source */
|
|
122
|
+
source_id?: number;
|
|
123
|
+
starred_repos_count?: number;
|
|
124
|
+
/** User visibility level option: public, limited, private */
|
|
125
|
+
visibility?: string;
|
|
126
|
+
/** the user's website */
|
|
127
|
+
website?: string;
|
|
128
|
+
}
|
|
129
|
+
export const User = /*@__PURE__*/ S.suspend(() =>
|
|
130
|
+
S.Struct({
|
|
131
|
+
active: S.optional(S.Boolean),
|
|
132
|
+
avatar_url: S.optional(S.String),
|
|
133
|
+
created: S.optional(S.String),
|
|
134
|
+
description: S.optional(S.String),
|
|
135
|
+
email: S.optional(S.String),
|
|
136
|
+
followers_count: S.optional(S.Number),
|
|
137
|
+
following_count: S.optional(S.Number),
|
|
138
|
+
full_name: S.optional(S.String),
|
|
139
|
+
html_url: S.optional(S.String),
|
|
140
|
+
id: S.Number,
|
|
141
|
+
is_admin: S.optional(S.Boolean),
|
|
142
|
+
language: S.optional(S.String),
|
|
143
|
+
last_login: S.optional(S.String),
|
|
144
|
+
location: S.optional(S.String),
|
|
145
|
+
login: S.String,
|
|
146
|
+
login_name: S.optional(S.String),
|
|
147
|
+
prohibit_login: S.optional(S.Boolean),
|
|
148
|
+
pronouns: S.optional(S.String),
|
|
149
|
+
restricted: S.optional(S.Boolean),
|
|
150
|
+
source_id: S.optional(S.Number),
|
|
151
|
+
starred_repos_count: S.optional(S.Number),
|
|
152
|
+
visibility: S.optional(S.String),
|
|
153
|
+
website: S.optional(S.String),
|
|
154
|
+
}),
|
|
155
|
+
).annotate({ identifier: "User" }) as any as S.Schema<User>;
|
|
156
|
+
|
|
157
|
+
/** ExternalTracker represents settings for external tracker */
|
|
158
|
+
export interface ExternalTracker {
|
|
159
|
+
/** External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index. */
|
|
160
|
+
external_tracker_format?: string;
|
|
161
|
+
/** External Issue Tracker issue regular expression */
|
|
162
|
+
external_tracker_regexp_pattern?: string;
|
|
163
|
+
/** External Issue Tracker Number Format, either `numeric`, `alphanumeric`, or `regexp` */
|
|
164
|
+
external_tracker_style?: string;
|
|
165
|
+
/** URL of external issue tracker. */
|
|
166
|
+
external_tracker_url?: string;
|
|
167
|
+
}
|
|
168
|
+
export const ExternalTracker = /*@__PURE__*/ S.suspend(() =>
|
|
169
|
+
S.Struct({
|
|
170
|
+
external_tracker_format: S.optional(S.String),
|
|
171
|
+
external_tracker_regexp_pattern: S.optional(S.String),
|
|
172
|
+
external_tracker_style: S.optional(S.String),
|
|
173
|
+
external_tracker_url: S.optional(S.String),
|
|
174
|
+
}),
|
|
175
|
+
).annotate({
|
|
176
|
+
identifier: "ExternalTracker",
|
|
177
|
+
}) as any as S.Schema<ExternalTracker>;
|
|
178
|
+
|
|
179
|
+
/** ExternalWiki represents setting for external wiki */
|
|
180
|
+
export interface ExternalWiki {
|
|
181
|
+
/** URL of external wiki. */
|
|
182
|
+
external_wiki_url?: string;
|
|
183
|
+
}
|
|
184
|
+
export const ExternalWiki = /*@__PURE__*/ S.suspend(() =>
|
|
185
|
+
S.Struct({
|
|
186
|
+
external_wiki_url: S.optional(S.String),
|
|
187
|
+
}),
|
|
188
|
+
).annotate({ identifier: "ExternalWiki" }) as any as S.Schema<ExternalWiki>;
|
|
189
|
+
|
|
190
|
+
/** InternalTracker represents settings for internal tracker */
|
|
191
|
+
export interface InternalTracker {
|
|
192
|
+
/** Let only contributors track time (Built-in issue tracker) */
|
|
193
|
+
allow_only_contributors_to_track_time?: boolean;
|
|
194
|
+
/** Enable dependencies for issues and pull requests (Built-in issue tracker) */
|
|
195
|
+
enable_issue_dependencies?: boolean;
|
|
196
|
+
/** Enable time tracking (Built-in issue tracker) */
|
|
197
|
+
enable_time_tracker?: boolean;
|
|
198
|
+
}
|
|
199
|
+
export const InternalTracker = /*@__PURE__*/ S.suspend(() =>
|
|
200
|
+
S.Struct({
|
|
201
|
+
allow_only_contributors_to_track_time: S.optional(S.Boolean),
|
|
202
|
+
enable_issue_dependencies: S.optional(S.Boolean),
|
|
203
|
+
enable_time_tracker: S.optional(S.Boolean),
|
|
204
|
+
}),
|
|
205
|
+
).annotate({
|
|
206
|
+
identifier: "InternalTracker",
|
|
207
|
+
}) as any as S.Schema<InternalTracker>;
|
|
208
|
+
|
|
209
|
+
/** ObjectFormatName of the underlying git repository */
|
|
210
|
+
export type RepositoryObjectFormatName = "sha1" | "sha256";
|
|
211
|
+
export const RepositoryObjectFormatName = /*@__PURE__*/ S.String;
|
|
212
|
+
|
|
213
|
+
/** Permission represents a set of permissions */
|
|
214
|
+
export interface Permission {
|
|
215
|
+
admin?: boolean;
|
|
216
|
+
pull?: boolean;
|
|
217
|
+
push?: boolean;
|
|
218
|
+
}
|
|
219
|
+
export const Permission = /*@__PURE__*/ S.suspend(() =>
|
|
220
|
+
S.Struct({
|
|
221
|
+
admin: S.optional(S.Boolean),
|
|
222
|
+
pull: S.optional(S.Boolean),
|
|
223
|
+
push: S.optional(S.Boolean),
|
|
224
|
+
}),
|
|
225
|
+
).annotate({ identifier: "Permission" }) as any as S.Schema<Permission>;
|
|
226
|
+
|
|
227
|
+
/** Organization represents an organization */
|
|
228
|
+
export interface Organization {
|
|
229
|
+
avatar_url?: string;
|
|
230
|
+
created?: string;
|
|
231
|
+
description?: string;
|
|
232
|
+
email?: string;
|
|
233
|
+
full_name?: string;
|
|
234
|
+
id: number;
|
|
235
|
+
location?: string;
|
|
236
|
+
name?: string;
|
|
237
|
+
repo_admin_change_team_access?: boolean;
|
|
238
|
+
/** deprecated */
|
|
239
|
+
username: string;
|
|
240
|
+
visibility?: string;
|
|
241
|
+
website?: string;
|
|
242
|
+
}
|
|
243
|
+
export const Organization = /*@__PURE__*/ S.suspend(() =>
|
|
244
|
+
S.Struct({
|
|
245
|
+
avatar_url: S.optional(S.String),
|
|
246
|
+
created: S.optional(S.String),
|
|
247
|
+
description: S.optional(S.String),
|
|
248
|
+
email: S.optional(S.String),
|
|
249
|
+
full_name: S.optional(S.String),
|
|
250
|
+
id: S.Number,
|
|
251
|
+
location: S.optional(S.String),
|
|
252
|
+
name: S.optional(S.String),
|
|
253
|
+
repo_admin_change_team_access: S.optional(S.Boolean),
|
|
254
|
+
username: S.String,
|
|
255
|
+
visibility: S.optional(S.String),
|
|
256
|
+
website: S.optional(S.String),
|
|
257
|
+
}),
|
|
258
|
+
).annotate({ identifier: "Organization" }) as any as S.Schema<Organization>;
|
|
259
|
+
|
|
260
|
+
export type TeamPermission = "none" | "read" | "write" | "admin" | "owner";
|
|
261
|
+
export const TeamPermission = /*@__PURE__*/ S.String;
|
|
262
|
+
|
|
263
|
+
export type TeamUnitsList = Array<string>;
|
|
264
|
+
export const TeamUnitsList = /*@__PURE__*/ S.Array(
|
|
265
|
+
S.String,
|
|
266
|
+
) as any as S.Schema<TeamUnitsList>;
|
|
267
|
+
|
|
268
|
+
export type TeamUnitsMapMap = { [key: string]: string | undefined };
|
|
269
|
+
export const TeamUnitsMapMap = /*@__PURE__*/ S.Record(
|
|
270
|
+
S.String,
|
|
271
|
+
S.String,
|
|
272
|
+
) as any as S.Schema<TeamUnitsMapMap>;
|
|
273
|
+
|
|
274
|
+
/** Team represents a team in an organization */
|
|
275
|
+
export interface Team {
|
|
276
|
+
can_create_org_repo?: boolean;
|
|
277
|
+
description?: string;
|
|
278
|
+
id: number;
|
|
279
|
+
includes_all_repositories?: boolean;
|
|
280
|
+
name: string;
|
|
281
|
+
organization?: Organization;
|
|
282
|
+
permission?: TeamPermission;
|
|
283
|
+
units?: TeamUnitsList;
|
|
284
|
+
units_map?: TeamUnitsMapMap;
|
|
285
|
+
}
|
|
286
|
+
export const Team = /*@__PURE__*/ S.suspend(() =>
|
|
287
|
+
S.Struct({
|
|
288
|
+
can_create_org_repo: S.optional(S.Boolean),
|
|
289
|
+
description: S.optional(S.String),
|
|
290
|
+
id: S.Number,
|
|
291
|
+
includes_all_repositories: S.optional(S.Boolean),
|
|
292
|
+
name: S.String,
|
|
293
|
+
organization: S.optional(Organization),
|
|
294
|
+
permission: S.optional(TeamPermission),
|
|
295
|
+
units: S.optional(TeamUnitsList),
|
|
296
|
+
units_map: S.optional(TeamUnitsMapMap),
|
|
297
|
+
}),
|
|
298
|
+
).annotate({ identifier: "Team" }) as any as S.Schema<Team>;
|
|
299
|
+
|
|
300
|
+
export type RepoTransferTeamsList = Array<Team>;
|
|
301
|
+
export const RepoTransferTeamsList = /*@__PURE__*/ S.Array(
|
|
302
|
+
Team,
|
|
303
|
+
) as any as S.Schema<RepoTransferTeamsList>;
|
|
304
|
+
|
|
305
|
+
/** RepoTransfer represents a pending repo transfer */
|
|
306
|
+
export interface RepoTransfer {
|
|
307
|
+
doer?: User;
|
|
308
|
+
recipient?: User;
|
|
309
|
+
teams?: RepoTransferTeamsList;
|
|
310
|
+
}
|
|
311
|
+
export const RepoTransfer = /*@__PURE__*/ S.suspend(() =>
|
|
312
|
+
S.Struct({
|
|
313
|
+
doer: S.optional(User),
|
|
314
|
+
recipient: S.optional(User),
|
|
315
|
+
teams: S.optional(RepoTransferTeamsList),
|
|
316
|
+
}),
|
|
317
|
+
).annotate({ identifier: "RepoTransfer" }) as any as S.Schema<RepoTransfer>;
|
|
318
|
+
|
|
319
|
+
export type RepositoryTopicsList = Array<string>;
|
|
320
|
+
export const RepositoryTopicsList = /*@__PURE__*/ S.Array(
|
|
321
|
+
S.String,
|
|
322
|
+
) as any as S.Schema<RepositoryTopicsList>;
|
|
323
|
+
|
|
324
|
+
/** Repository represents a repository */
|
|
325
|
+
export interface Repository {
|
|
326
|
+
allow_fast_forward_only_merge?: boolean;
|
|
327
|
+
allow_merge_commits?: boolean;
|
|
328
|
+
allow_rebase?: boolean;
|
|
329
|
+
allow_rebase_explicit?: boolean;
|
|
330
|
+
allow_rebase_update?: boolean;
|
|
331
|
+
allow_squash_merge?: boolean;
|
|
332
|
+
archived?: boolean;
|
|
333
|
+
archived_at?: string;
|
|
334
|
+
avatar_url?: string;
|
|
335
|
+
clone_url: string;
|
|
336
|
+
created_at: string;
|
|
337
|
+
default_allow_maintainer_edit?: boolean;
|
|
338
|
+
default_branch: string;
|
|
339
|
+
default_delete_branch_after_merge?: boolean;
|
|
340
|
+
default_merge_style?: string;
|
|
341
|
+
default_update_style?: string;
|
|
342
|
+
description?: string;
|
|
343
|
+
empty?: boolean;
|
|
344
|
+
external_tracker?: ExternalTracker;
|
|
345
|
+
external_wiki?: ExternalWiki;
|
|
346
|
+
fork?: boolean;
|
|
347
|
+
forks_count?: number;
|
|
348
|
+
full_name: string;
|
|
349
|
+
globally_editable_wiki?: boolean;
|
|
350
|
+
has_actions?: boolean;
|
|
351
|
+
has_issues?: boolean;
|
|
352
|
+
has_packages?: boolean;
|
|
353
|
+
has_projects?: boolean;
|
|
354
|
+
has_pull_requests?: boolean;
|
|
355
|
+
has_releases?: boolean;
|
|
356
|
+
/** is the wiki enabled */
|
|
357
|
+
has_wiki?: boolean;
|
|
358
|
+
/** have wiki pages ever been created */
|
|
359
|
+
has_wiki_contents?: boolean;
|
|
360
|
+
html_url: string;
|
|
361
|
+
id: number;
|
|
362
|
+
ignore_whitespace_conflicts?: boolean;
|
|
363
|
+
internal?: boolean;
|
|
364
|
+
internal_tracker?: InternalTracker;
|
|
365
|
+
language?: string;
|
|
366
|
+
languages_url?: string;
|
|
367
|
+
link?: string;
|
|
368
|
+
mirror?: boolean;
|
|
369
|
+
mirror_interval?: string;
|
|
370
|
+
mirror_updated?: string;
|
|
371
|
+
name: string;
|
|
372
|
+
/** ObjectFormatName of the underlying git repository */
|
|
373
|
+
object_format_name?: RepositoryObjectFormatName;
|
|
374
|
+
open_issues_count?: number;
|
|
375
|
+
open_pr_counter?: number;
|
|
376
|
+
original_url?: string;
|
|
377
|
+
owner: User;
|
|
378
|
+
parent?: Repository;
|
|
379
|
+
permissions?: Permission;
|
|
380
|
+
private?: boolean;
|
|
381
|
+
release_counter?: number;
|
|
382
|
+
repo_transfer?: RepoTransfer;
|
|
383
|
+
size?: number;
|
|
384
|
+
ssh_url: string;
|
|
385
|
+
stars_count?: number;
|
|
386
|
+
template?: boolean;
|
|
387
|
+
topics?: RepositoryTopicsList;
|
|
388
|
+
updated_at: string;
|
|
389
|
+
url?: string;
|
|
390
|
+
watchers_count?: number;
|
|
391
|
+
website?: string;
|
|
392
|
+
wiki_branch?: string;
|
|
393
|
+
wiki_clone_url?: string;
|
|
394
|
+
wiki_ssh_url?: string;
|
|
395
|
+
}
|
|
396
|
+
export const Repository = /*@__PURE__*/ S.suspend(() =>
|
|
397
|
+
S.Struct({
|
|
398
|
+
allow_fast_forward_only_merge: S.optional(S.Boolean),
|
|
399
|
+
allow_merge_commits: S.optional(S.Boolean),
|
|
400
|
+
allow_rebase: S.optional(S.Boolean),
|
|
401
|
+
allow_rebase_explicit: S.optional(S.Boolean),
|
|
402
|
+
allow_rebase_update: S.optional(S.Boolean),
|
|
403
|
+
allow_squash_merge: S.optional(S.Boolean),
|
|
404
|
+
archived: S.optional(S.Boolean),
|
|
405
|
+
archived_at: S.optional(S.String),
|
|
406
|
+
avatar_url: S.optional(S.String),
|
|
407
|
+
clone_url: S.String,
|
|
408
|
+
created_at: S.String,
|
|
409
|
+
default_allow_maintainer_edit: S.optional(S.Boolean),
|
|
410
|
+
default_branch: S.String,
|
|
411
|
+
default_delete_branch_after_merge: S.optional(S.Boolean),
|
|
412
|
+
default_merge_style: S.optional(S.String),
|
|
413
|
+
default_update_style: S.optional(S.String),
|
|
414
|
+
description: S.optional(S.String),
|
|
415
|
+
empty: S.optional(S.Boolean),
|
|
416
|
+
external_tracker: S.optional(ExternalTracker),
|
|
417
|
+
external_wiki: S.optional(ExternalWiki),
|
|
418
|
+
fork: S.optional(S.Boolean),
|
|
419
|
+
forks_count: S.optional(S.Number),
|
|
420
|
+
full_name: S.String,
|
|
421
|
+
globally_editable_wiki: S.optional(S.Boolean),
|
|
422
|
+
has_actions: S.optional(S.Boolean),
|
|
423
|
+
has_issues: S.optional(S.Boolean),
|
|
424
|
+
has_packages: S.optional(S.Boolean),
|
|
425
|
+
has_projects: S.optional(S.Boolean),
|
|
426
|
+
has_pull_requests: S.optional(S.Boolean),
|
|
427
|
+
has_releases: S.optional(S.Boolean),
|
|
428
|
+
has_wiki: S.optional(S.Boolean),
|
|
429
|
+
has_wiki_contents: S.optional(S.Boolean),
|
|
430
|
+
html_url: S.String,
|
|
431
|
+
id: S.Number,
|
|
432
|
+
ignore_whitespace_conflicts: S.optional(S.Boolean),
|
|
433
|
+
internal: S.optional(S.Boolean),
|
|
434
|
+
internal_tracker: S.optional(InternalTracker),
|
|
435
|
+
language: S.optional(S.String),
|
|
436
|
+
languages_url: S.optional(S.String),
|
|
437
|
+
link: S.optional(S.String),
|
|
438
|
+
mirror: S.optional(S.Boolean),
|
|
439
|
+
mirror_interval: S.optional(S.String),
|
|
440
|
+
mirror_updated: S.optional(S.String),
|
|
441
|
+
name: S.String,
|
|
442
|
+
object_format_name: S.optional(RepositoryObjectFormatName),
|
|
443
|
+
open_issues_count: S.optional(S.Number),
|
|
444
|
+
open_pr_counter: S.optional(S.Number),
|
|
445
|
+
original_url: S.optional(S.String),
|
|
446
|
+
owner: User,
|
|
447
|
+
parent: S.optional(Repository),
|
|
448
|
+
permissions: S.optional(Permission),
|
|
449
|
+
private: S.optional(S.Boolean),
|
|
450
|
+
release_counter: S.optional(S.Number),
|
|
451
|
+
repo_transfer: S.optional(RepoTransfer),
|
|
452
|
+
size: S.optional(S.Number),
|
|
453
|
+
ssh_url: S.String,
|
|
454
|
+
stars_count: S.optional(S.Number),
|
|
455
|
+
template: S.optional(S.Boolean),
|
|
456
|
+
topics: S.optional(RepositoryTopicsList),
|
|
457
|
+
updated_at: S.String,
|
|
458
|
+
url: S.optional(S.String),
|
|
459
|
+
watchers_count: S.optional(S.Number),
|
|
460
|
+
website: S.optional(S.String),
|
|
461
|
+
wiki_branch: S.optional(S.String),
|
|
462
|
+
wiki_clone_url: S.optional(S.String),
|
|
463
|
+
wiki_ssh_url: S.optional(S.String),
|
|
464
|
+
}),
|
|
465
|
+
).annotate({ identifier: "Repository" }) as any as S.Schema<Repository>;
|
|
466
|
+
|
|
467
|
+
/** Package represents a package */
|
|
468
|
+
export interface Package {
|
|
469
|
+
created_at?: string;
|
|
470
|
+
creator?: User;
|
|
471
|
+
html_url?: string;
|
|
472
|
+
id?: number;
|
|
473
|
+
name?: string;
|
|
474
|
+
owner?: User;
|
|
475
|
+
repository?: Repository;
|
|
476
|
+
type?: string;
|
|
477
|
+
version?: string;
|
|
478
|
+
}
|
|
479
|
+
export const Package = /*@__PURE__*/ S.suspend(() =>
|
|
480
|
+
S.Struct({
|
|
481
|
+
created_at: S.optional(S.String),
|
|
482
|
+
creator: S.optional(User),
|
|
483
|
+
html_url: S.optional(S.String),
|
|
484
|
+
id: S.optional(S.Number),
|
|
485
|
+
name: S.optional(S.String),
|
|
486
|
+
owner: S.optional(User),
|
|
487
|
+
repository: S.optional(Repository),
|
|
488
|
+
type: S.optional(S.String),
|
|
489
|
+
version: S.optional(S.String),
|
|
490
|
+
}),
|
|
491
|
+
).annotate({ identifier: "Package" }) as any as S.Schema<Package>;
|
|
492
|
+
|
|
493
|
+
export interface LinkPackageRequest {
|
|
494
|
+
/** owner of the package */
|
|
495
|
+
owner: string;
|
|
496
|
+
/** type of the package */
|
|
497
|
+
type: string;
|
|
498
|
+
/** name of the package */
|
|
499
|
+
name: string;
|
|
500
|
+
/** name of the repository to link. */
|
|
501
|
+
repo_name: string;
|
|
502
|
+
}
|
|
503
|
+
export const LinkPackageRequest = /*@__PURE__*/ S.suspend(() =>
|
|
504
|
+
S.Struct({
|
|
505
|
+
owner: S.String.pipe(T.Label()),
|
|
506
|
+
type: S.String.pipe(T.Label()),
|
|
507
|
+
name: S.String.pipe(T.Label()),
|
|
508
|
+
repo_name: S.String.pipe(T.Label()),
|
|
509
|
+
}).pipe(
|
|
510
|
+
T.Http({
|
|
511
|
+
method: "POST",
|
|
512
|
+
uri: "/packages/{owner}/{type}/{name}/-/link/{repo_name}",
|
|
513
|
+
code: 200,
|
|
514
|
+
}),
|
|
515
|
+
),
|
|
516
|
+
).annotate({
|
|
517
|
+
identifier: "LinkPackageRequest",
|
|
518
|
+
}) as any as S.Schema<LinkPackageRequest>;
|
|
519
|
+
|
|
520
|
+
export interface LinkPackageResponse {}
|
|
521
|
+
export const LinkPackageResponse = /*@__PURE__*/ S.suspend(() =>
|
|
522
|
+
S.Struct({}),
|
|
523
|
+
).annotate({
|
|
524
|
+
identifier: "LinkPackageResponse",
|
|
525
|
+
}) as any as S.Schema<LinkPackageResponse>;
|
|
526
|
+
|
|
527
|
+
export interface ListPackageFilesRequest {
|
|
528
|
+
/** owner of the package */
|
|
529
|
+
owner: string;
|
|
530
|
+
/** type of the package */
|
|
531
|
+
type: string;
|
|
532
|
+
/** name of the package */
|
|
533
|
+
name: string;
|
|
534
|
+
/** version of the package */
|
|
535
|
+
version: string;
|
|
536
|
+
}
|
|
537
|
+
export const ListPackageFilesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
538
|
+
S.Struct({
|
|
539
|
+
owner: S.String.pipe(T.Label()),
|
|
540
|
+
type: S.String.pipe(T.Label()),
|
|
541
|
+
name: S.String.pipe(T.Label()),
|
|
542
|
+
version: S.String.pipe(T.Label()),
|
|
543
|
+
}).pipe(
|
|
544
|
+
T.Http({
|
|
545
|
+
method: "GET",
|
|
546
|
+
uri: "/packages/{owner}/{type}/{name}/{version}/files",
|
|
547
|
+
code: 200,
|
|
548
|
+
}),
|
|
549
|
+
),
|
|
550
|
+
).annotate({
|
|
551
|
+
identifier: "ListPackageFilesRequest",
|
|
552
|
+
}) as any as S.Schema<ListPackageFilesRequest>;
|
|
553
|
+
|
|
554
|
+
/** PackageFile represents a package file */
|
|
555
|
+
export interface PackageFile {
|
|
556
|
+
Size?: number;
|
|
557
|
+
id?: number;
|
|
558
|
+
md5?: string;
|
|
559
|
+
name?: string;
|
|
560
|
+
sha1?: string;
|
|
561
|
+
sha256?: string;
|
|
562
|
+
sha512?: string;
|
|
563
|
+
}
|
|
564
|
+
export const PackageFile = /*@__PURE__*/ S.suspend(() =>
|
|
565
|
+
S.Struct({
|
|
566
|
+
Size: S.optional(S.Number),
|
|
567
|
+
id: S.optional(S.Number),
|
|
568
|
+
md5: S.optional(S.String),
|
|
569
|
+
name: S.optional(S.String),
|
|
570
|
+
sha1: S.optional(S.String),
|
|
571
|
+
sha256: S.optional(S.String),
|
|
572
|
+
sha512: S.optional(S.String),
|
|
573
|
+
}),
|
|
574
|
+
).annotate({ identifier: "PackageFile" }) as any as S.Schema<PackageFile>;
|
|
575
|
+
|
|
576
|
+
export type ListPackageFilesResponseBodyList = Array<PackageFile>;
|
|
577
|
+
export const ListPackageFilesResponseBodyList = /*@__PURE__*/ S.Array(
|
|
578
|
+
PackageFile,
|
|
579
|
+
) as any as S.Schema<ListPackageFilesResponseBodyList>;
|
|
580
|
+
|
|
581
|
+
export type ListPackageFilesResponse = ListPackageFilesResponseBodyList;
|
|
582
|
+
export const ListPackageFilesResponse = /*@__PURE__*/ S.suspend(() =>
|
|
583
|
+
ListPackageFilesResponseBodyList.pipe(T.RawResponseRoot()),
|
|
584
|
+
).annotate({
|
|
585
|
+
identifier: "ListPackageFilesResponse",
|
|
586
|
+
}) as any as S.Schema<ListPackageFilesResponse>;
|
|
587
|
+
|
|
588
|
+
export type ListPackagesRequestType =
|
|
589
|
+
| "alpine"
|
|
590
|
+
| "cargo"
|
|
591
|
+
| "chef"
|
|
592
|
+
| "composer"
|
|
593
|
+
| "conan"
|
|
594
|
+
| "conda"
|
|
595
|
+
| "container"
|
|
596
|
+
| "cran"
|
|
597
|
+
| "debian"
|
|
598
|
+
| "generic"
|
|
599
|
+
| "go"
|
|
600
|
+
| "helm"
|
|
601
|
+
| "maven"
|
|
602
|
+
| "npm"
|
|
603
|
+
| "nuget"
|
|
604
|
+
| "pub"
|
|
605
|
+
| "pypi"
|
|
606
|
+
| "rpm"
|
|
607
|
+
| "rubygems"
|
|
608
|
+
| "swift"
|
|
609
|
+
| "vagrant";
|
|
610
|
+
export const ListPackagesRequestType = /*@__PURE__*/ S.String;
|
|
611
|
+
|
|
612
|
+
export interface ListPackagesRequest {
|
|
613
|
+
/** owner of the packages */
|
|
614
|
+
owner: string;
|
|
615
|
+
/** page number of results to return (1-based) */
|
|
616
|
+
page?: number;
|
|
617
|
+
/** page size of results */
|
|
618
|
+
limit?: number;
|
|
619
|
+
/** package type filter */
|
|
620
|
+
type?: ListPackagesRequestType | (string & {});
|
|
621
|
+
/** name filter */
|
|
622
|
+
q?: string;
|
|
623
|
+
}
|
|
624
|
+
export const ListPackagesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
625
|
+
S.Struct({
|
|
626
|
+
owner: S.String.pipe(T.Label()),
|
|
627
|
+
page: S.optional(S.Number.pipe(T.Query())),
|
|
628
|
+
limit: S.optional(S.Number.pipe(T.Query())),
|
|
629
|
+
type: S.optional(ListPackagesRequestType.pipe(T.Query())),
|
|
630
|
+
q: S.optional(S.String.pipe(T.Query())),
|
|
631
|
+
}).pipe(T.Http({ method: "GET", uri: "/packages/{owner}", code: 200 })),
|
|
632
|
+
).annotate({
|
|
633
|
+
identifier: "ListPackagesRequest",
|
|
634
|
+
}) as any as S.Schema<ListPackagesRequest>;
|
|
635
|
+
|
|
636
|
+
export type ListPackagesResponseBodyList = Array<Package>;
|
|
637
|
+
export const ListPackagesResponseBodyList = /*@__PURE__*/ S.Array(
|
|
638
|
+
Package,
|
|
639
|
+
) as any as S.Schema<ListPackagesResponseBodyList>;
|
|
640
|
+
|
|
641
|
+
export type ListPackagesResponse = ListPackagesResponseBodyList;
|
|
642
|
+
export const ListPackagesResponse = /*@__PURE__*/ S.suspend(() =>
|
|
643
|
+
ListPackagesResponseBodyList.pipe(T.RawResponseRoot()),
|
|
644
|
+
).annotate({
|
|
645
|
+
identifier: "ListPackagesResponse",
|
|
646
|
+
}) as any as S.Schema<ListPackagesResponse>;
|
|
647
|
+
|
|
648
|
+
export interface UnlinkPackageRequest {
|
|
649
|
+
/** owner of the package */
|
|
650
|
+
owner: string;
|
|
651
|
+
/** type of the package */
|
|
652
|
+
type: string;
|
|
653
|
+
/** name of the package */
|
|
654
|
+
name: string;
|
|
655
|
+
}
|
|
656
|
+
export const UnlinkPackageRequest = /*@__PURE__*/ S.suspend(() =>
|
|
657
|
+
S.Struct({
|
|
658
|
+
owner: S.String.pipe(T.Label()),
|
|
659
|
+
type: S.String.pipe(T.Label()),
|
|
660
|
+
name: S.String.pipe(T.Label()),
|
|
661
|
+
}).pipe(
|
|
662
|
+
T.Http({
|
|
663
|
+
method: "POST",
|
|
664
|
+
uri: "/packages/{owner}/{type}/{name}/-/unlink",
|
|
665
|
+
code: 200,
|
|
666
|
+
}),
|
|
667
|
+
),
|
|
668
|
+
).annotate({
|
|
669
|
+
identifier: "UnlinkPackageRequest",
|
|
670
|
+
}) as any as S.Schema<UnlinkPackageRequest>;
|
|
671
|
+
|
|
672
|
+
export interface UnlinkPackageResponse {}
|
|
673
|
+
export const UnlinkPackageResponse = /*@__PURE__*/ S.suspend(() =>
|
|
674
|
+
S.Struct({}),
|
|
675
|
+
).annotate({
|
|
676
|
+
identifier: "UnlinkPackageResponse",
|
|
677
|
+
}) as any as S.Schema<UnlinkPackageResponse>;
|
|
678
|
+
|
|
679
|
+
export type DeletePackageError = NotFound | ForgejoOpError;
|
|
680
|
+
/** Delete a package */
|
|
681
|
+
export const deletePackage: API.OperationMethod<
|
|
682
|
+
DeletePackageRequest,
|
|
683
|
+
DeletePackageResponse,
|
|
684
|
+
DeletePackageError,
|
|
685
|
+
ForgejoOpContext
|
|
686
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
687
|
+
input: DeletePackageRequest,
|
|
688
|
+
output: DeletePackageResponse,
|
|
689
|
+
errors: [NotFound],
|
|
690
|
+
protocol: ForgejoProtocol,
|
|
691
|
+
retry: Retry.Retry,
|
|
692
|
+
}));
|
|
693
|
+
|
|
694
|
+
export type GetPackageError = NotFound | ForgejoOpError;
|
|
695
|
+
/** Gets a package */
|
|
696
|
+
export const getPackage: API.OperationMethod<
|
|
697
|
+
GetPackageRequest,
|
|
698
|
+
Package,
|
|
699
|
+
GetPackageError,
|
|
700
|
+
ForgejoOpContext
|
|
701
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
702
|
+
input: GetPackageRequest,
|
|
703
|
+
output: Package,
|
|
704
|
+
errors: [NotFound],
|
|
705
|
+
protocol: ForgejoProtocol,
|
|
706
|
+
retry: Retry.Retry,
|
|
707
|
+
}));
|
|
708
|
+
|
|
709
|
+
export type LinkPackageError = NotFound | ForgejoOpError;
|
|
710
|
+
/** Link a package to a repository */
|
|
711
|
+
export const linkPackage: API.OperationMethod<
|
|
712
|
+
LinkPackageRequest,
|
|
713
|
+
LinkPackageResponse,
|
|
714
|
+
LinkPackageError,
|
|
715
|
+
ForgejoOpContext
|
|
716
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
717
|
+
input: LinkPackageRequest,
|
|
718
|
+
output: LinkPackageResponse,
|
|
719
|
+
errors: [NotFound],
|
|
720
|
+
protocol: ForgejoProtocol,
|
|
721
|
+
retry: Retry.Retry,
|
|
722
|
+
}));
|
|
723
|
+
|
|
724
|
+
export type ListPackageFilesError = NotFound | ForgejoOpError;
|
|
725
|
+
/** Gets all files of a package */
|
|
726
|
+
export const listPackageFiles: API.OperationMethod<
|
|
727
|
+
ListPackageFilesRequest,
|
|
728
|
+
ListPackageFilesResponse,
|
|
729
|
+
ListPackageFilesError,
|
|
730
|
+
ForgejoOpContext
|
|
731
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
732
|
+
input: ListPackageFilesRequest,
|
|
733
|
+
output: ListPackageFilesResponse,
|
|
734
|
+
errors: [NotFound],
|
|
735
|
+
protocol: ForgejoProtocol,
|
|
736
|
+
retry: Retry.Retry,
|
|
737
|
+
}));
|
|
738
|
+
|
|
739
|
+
export type ListPackagesError = NotFound | ForgejoOpError;
|
|
740
|
+
/** Gets all packages of an owner */
|
|
741
|
+
export const listPackages: API.OperationMethod<
|
|
742
|
+
ListPackagesRequest,
|
|
743
|
+
ListPackagesResponse,
|
|
744
|
+
ListPackagesError,
|
|
745
|
+
ForgejoOpContext
|
|
746
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
747
|
+
input: ListPackagesRequest,
|
|
748
|
+
output: ListPackagesResponse,
|
|
749
|
+
errors: [NotFound],
|
|
750
|
+
protocol: ForgejoProtocol,
|
|
751
|
+
retry: Retry.Retry,
|
|
752
|
+
}));
|
|
753
|
+
|
|
754
|
+
export type UnlinkPackageError = NotFound | ForgejoOpError;
|
|
755
|
+
/** Unlink a package from a repository */
|
|
756
|
+
export const unlinkPackage: API.OperationMethod<
|
|
757
|
+
UnlinkPackageRequest,
|
|
758
|
+
UnlinkPackageResponse,
|
|
759
|
+
UnlinkPackageError,
|
|
760
|
+
ForgejoOpContext
|
|
761
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
762
|
+
input: UnlinkPackageRequest,
|
|
763
|
+
output: UnlinkPackageResponse,
|
|
764
|
+
errors: [NotFound],
|
|
765
|
+
protocol: ForgejoProtocol,
|
|
766
|
+
retry: Retry.Retry,
|
|
767
|
+
}));
|