@modrinth/api-client 0.31.0 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +7103 -28
- package/dist/index.js +1 -0
- package/dist/index.js.map +7 -0
- package/package.json +4 -2
- package/dist/core/abstract-client.d.ts +0 -163
- package/dist/core/abstract-feature.d.ts +0 -72
- package/dist/core/abstract-module.d.ts +0 -10
- package/dist/core/abstract-sync.d.ts +0 -61
- package/dist/core/abstract-upload-client.d.ts +0 -20
- package/dist/core/abstract-websocket.d.ts +0 -52
- package/dist/core/errors.d.ts +0 -48
- package/dist/features/auth.d.ts +0 -47
- package/dist/features/circuit-breaker.d.ts +0 -139
- package/dist/features/node-auth.d.ts +0 -58
- package/dist/features/panel-version.d.ts +0 -7
- package/dist/features/retry.d.ts +0 -87
- package/dist/features/verbose-logging.d.ts +0 -6
- package/dist/modules/archon/actions/v1.d.ts +0 -10
- package/dist/modules/archon/backups/v1.d.ts +0 -44
- package/dist/modules/archon/backups-queue/v1.d.ts +0 -25
- package/dist/modules/archon/content/v1.d.ts +0 -48
- package/dist/modules/archon/index.d.ts +0 -8
- package/dist/modules/archon/nodes/internal.d.ts +0 -10
- package/dist/modules/archon/notices/v0.d.ts +0 -38
- package/dist/modules/archon/options/v1.d.ts +0 -9
- package/dist/modules/archon/properties/v1.d.ts +0 -9
- package/dist/modules/archon/server-users/v1.d.ts +0 -30
- package/dist/modules/archon/servers/v0.d.ts +0 -122
- package/dist/modules/archon/servers/v1.d.ts +0 -30
- package/dist/modules/archon/transfers/internal.d.ts +0 -25
- package/dist/modules/archon/types.d.ts +0 -941
- package/dist/modules/index.d.ts +0 -181
- package/dist/modules/iso3166/index.d.ts +0 -24
- package/dist/modules/iso3166/types.d.ts +0 -21
- package/dist/modules/kyros/content/v1.d.ts +0 -23
- package/dist/modules/kyros/files/v0.d.ts +0 -123
- package/dist/modules/kyros/logs/v1.d.ts +0 -6
- package/dist/modules/kyros/types.d.ts +0 -44
- package/dist/modules/kyros/upload-sessions/v1.d.ts +0 -18
- package/dist/modules/labrinth/affiliate/internal.d.ts +0 -30
- package/dist/modules/labrinth/analytics/v3.d.ts +0 -56
- package/dist/modules/labrinth/attribution/internal.d.ts +0 -47
- package/dist/modules/labrinth/auth/internal.d.ts +0 -19
- package/dist/modules/labrinth/auth/v2.d.ts +0 -98
- package/dist/modules/labrinth/billing/internal.d.ts +0 -65
- package/dist/modules/labrinth/campaign/internal.d.ts +0 -10
- package/dist/modules/labrinth/collections.d.ts +0 -80
- package/dist/modules/labrinth/content/v3.d.ts +0 -6
- package/dist/modules/labrinth/external-projects/internal.d.ts +0 -9
- package/dist/modules/labrinth/friends/v3.d.ts +0 -23
- package/dist/modules/labrinth/globals/internal.d.ts +0 -11
- package/dist/modules/labrinth/images/v3.d.ts +0 -7
- package/dist/modules/labrinth/index.d.ts +0 -31
- package/dist/modules/labrinth/limits/v3.d.ts +0 -17
- package/dist/modules/labrinth/moderation/internal.d.ts +0 -12
- package/dist/modules/labrinth/notifications/v2.d.ts +0 -73
- package/dist/modules/labrinth/oauth/internal.d.ts +0 -97
- package/dist/modules/labrinth/organizations/v3.d.ts +0 -66
- package/dist/modules/labrinth/pats/v2.d.ts +0 -31
- package/dist/modules/labrinth/payout/v3.d.ts +0 -30
- package/dist/modules/labrinth/payouts/v3.d.ts +0 -15
- package/dist/modules/labrinth/projects/v2.d.ts +0 -169
- package/dist/modules/labrinth/projects/v3.d.ts +0 -110
- package/dist/modules/labrinth/reports/v3.d.ts +0 -81
- package/dist/modules/labrinth/server-ping/internal.d.ts +0 -10
- package/dist/modules/labrinth/sessions/v2.d.ts +0 -17
- package/dist/modules/labrinth/state/index.d.ts +0 -17
- package/dist/modules/labrinth/tags/v2.d.ts +0 -19
- package/dist/modules/labrinth/teams/v2.d.ts +0 -57
- package/dist/modules/labrinth/teams/v3.d.ts +0 -18
- package/dist/modules/labrinth/tech-review/internal.d.ts +0 -77
- package/dist/modules/labrinth/threads/v3.d.ts +0 -57
- package/dist/modules/labrinth/types.d.ts +0 -2119
- package/dist/modules/labrinth/users/v2.d.ts +0 -101
- package/dist/modules/labrinth/users/v3.d.ts +0 -37
- package/dist/modules/labrinth/versions/v2.d.ts +0 -75
- package/dist/modules/labrinth/versions/v3.d.ts +0 -123
- package/dist/modules/launcher-meta/types.d.ts +0 -25
- package/dist/modules/launcher-meta/v0.d.ts +0 -17
- package/dist/modules/mclogs/insights/v1.d.ts +0 -6
- package/dist/modules/mclogs/logs/v1.d.ts +0 -6
- package/dist/modules/mclogs/types.d.ts +0 -60
- package/dist/modules/paper/types.d.ts +0 -22
- package/dist/modules/paper/v3.d.ts +0 -19
- package/dist/modules/purpur/types.d.ts +0 -15
- package/dist/modules/purpur/v2.d.ts +0 -16
- package/dist/modules/types.d.ts +0 -8
- package/dist/platform/generic.d.ts +0 -28
- package/dist/platform/nuxt.d.ts +0 -88
- package/dist/platform/sync-generic.d.ts +0 -16
- package/dist/platform/tauri.d.ts +0 -35
- package/dist/platform/websocket-generic.d.ts +0 -16
- package/dist/platform/xhr-upload-client.d.ts +0 -15
- package/dist/state/node-auth.d.ts +0 -36
- package/dist/types/client.d.ts +0 -70
- package/dist/types/errors.d.ts +0 -43
- package/dist/types/index.d.ts +0 -10
- package/dist/types/request.d.ts +0 -124
- package/dist/types/upload.d.ts +0 -92
- package/dist/utils/fetch.d.ts +0 -4
- package/dist/utils/jwt-retry.d.ts +0 -5
- package/dist/utils/node-url.d.ts +0 -2
- package/dist/utils/pingtest.d.ts +0 -8
- package/dist/utils/sse.d.ts +0 -24
- package/dist/utils/types.d.ts +0 -2
|
@@ -1,2119 +0,0 @@
|
|
|
1
|
-
import type { RawDecimal } from '../../utils/types';
|
|
2
|
-
import type { ISO3166 } from '../iso3166/types';
|
|
3
|
-
export declare namespace Labrinth {
|
|
4
|
-
namespace Content {
|
|
5
|
-
namespace v3 {
|
|
6
|
-
type ContentType = 'mod' | 'plugin' | 'datapack' | 'resourcepack' | 'shader' | 'modpack';
|
|
7
|
-
type ResolutionPreferences = {
|
|
8
|
-
game_versions?: string[];
|
|
9
|
-
loaders?: string[];
|
|
10
|
-
};
|
|
11
|
-
type ResolveContentRequest = {
|
|
12
|
-
project_id: string;
|
|
13
|
-
version_id?: string | null;
|
|
14
|
-
content_type: ContentType;
|
|
15
|
-
selected?: ResolutionPreferences;
|
|
16
|
-
target?: ResolutionPreferences;
|
|
17
|
-
existing_project_ids?: string[];
|
|
18
|
-
};
|
|
19
|
-
type ResolveContentPlan = {
|
|
20
|
-
primary: ResolvedContent;
|
|
21
|
-
dependencies: ResolvedContent[];
|
|
22
|
-
skipped: SkippedContent[];
|
|
23
|
-
};
|
|
24
|
-
type ResolvedContent = {
|
|
25
|
-
project_id: string;
|
|
26
|
-
version_id: string;
|
|
27
|
-
dependent_on_version_id?: string | null;
|
|
28
|
-
};
|
|
29
|
-
type SkippedContent = {
|
|
30
|
-
project_id: string;
|
|
31
|
-
version_id?: string | null;
|
|
32
|
-
dependent_on_version_id?: string | null;
|
|
33
|
-
reason: 'already_installed' | 'duplicate_project' | 'conflicting_dependency' | 'no_compatible_version' | 'missing_version' | 'quilt_fabric_api';
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
namespace Campaign {
|
|
38
|
-
namespace Internal {
|
|
39
|
-
type CampaignInfo = {
|
|
40
|
-
total_donations_usd: RawDecimal;
|
|
41
|
-
target_usd: RawDecimal;
|
|
42
|
-
num_donators: number;
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
namespace Billing {
|
|
47
|
-
namespace Internal {
|
|
48
|
-
type PriceDuration = 'five-days' | 'monthly' | 'quarterly' | 'yearly';
|
|
49
|
-
type SubscriptionStatus = 'provisioned' | 'unprovisioned';
|
|
50
|
-
type UserSubscription = {
|
|
51
|
-
id: string;
|
|
52
|
-
user_id: string;
|
|
53
|
-
price_id: string;
|
|
54
|
-
interval: PriceDuration;
|
|
55
|
-
status: SubscriptionStatus;
|
|
56
|
-
created: string;
|
|
57
|
-
metadata?: SubscriptionMetadata;
|
|
58
|
-
next_charge_tax_amount?: number | null;
|
|
59
|
-
};
|
|
60
|
-
type SubscriptionMetadata = {
|
|
61
|
-
type: 'pyro';
|
|
62
|
-
id: string;
|
|
63
|
-
region?: string;
|
|
64
|
-
} | {
|
|
65
|
-
type: 'medal';
|
|
66
|
-
id: string;
|
|
67
|
-
};
|
|
68
|
-
type ChargeStatus = 'open' | 'processing' | 'succeeded' | 'failed' | 'cancelled' | 'expiring';
|
|
69
|
-
type ChargeType = 'one-time' | 'subscription' | 'proration' | 'refund';
|
|
70
|
-
type PaymentPlatform = 'Stripe' | 'None';
|
|
71
|
-
type Charge = {
|
|
72
|
-
id: string;
|
|
73
|
-
user_id: string;
|
|
74
|
-
price_id: string;
|
|
75
|
-
amount: number;
|
|
76
|
-
currency_code: string;
|
|
77
|
-
status: ChargeStatus;
|
|
78
|
-
due: string;
|
|
79
|
-
last_attempt: string | null;
|
|
80
|
-
type: ChargeType;
|
|
81
|
-
subscription_id: string | null;
|
|
82
|
-
subscription_interval: PriceDuration | null;
|
|
83
|
-
platform: PaymentPlatform;
|
|
84
|
-
parent_charge_id: string | null;
|
|
85
|
-
net: number | null;
|
|
86
|
-
};
|
|
87
|
-
type ProductMetadata = {
|
|
88
|
-
type: 'midas';
|
|
89
|
-
} | {
|
|
90
|
-
type: 'pyro';
|
|
91
|
-
cpu: number;
|
|
92
|
-
ram: number;
|
|
93
|
-
swap: number;
|
|
94
|
-
storage: number;
|
|
95
|
-
} | {
|
|
96
|
-
type: 'medal';
|
|
97
|
-
cpu: number;
|
|
98
|
-
ram: number;
|
|
99
|
-
swap: number;
|
|
100
|
-
storage: number;
|
|
101
|
-
region: string;
|
|
102
|
-
};
|
|
103
|
-
type Price = {
|
|
104
|
-
type: 'one-time';
|
|
105
|
-
price: number;
|
|
106
|
-
} | {
|
|
107
|
-
type: 'recurring';
|
|
108
|
-
intervals: Record<PriceDuration, number>;
|
|
109
|
-
};
|
|
110
|
-
type ProductPrice = {
|
|
111
|
-
id: string;
|
|
112
|
-
product_id: string;
|
|
113
|
-
prices: Price;
|
|
114
|
-
currency_code: string;
|
|
115
|
-
};
|
|
116
|
-
type Product = {
|
|
117
|
-
id: string;
|
|
118
|
-
metadata: ProductMetadata;
|
|
119
|
-
prices: ProductPrice[];
|
|
120
|
-
unitary: boolean;
|
|
121
|
-
};
|
|
122
|
-
type EditSubscriptionRequest = {
|
|
123
|
-
interval?: PriceDuration;
|
|
124
|
-
payment_method?: string;
|
|
125
|
-
cancelled?: boolean;
|
|
126
|
-
region?: string;
|
|
127
|
-
product?: string;
|
|
128
|
-
};
|
|
129
|
-
type EditSubscriptionResponse = {
|
|
130
|
-
payment_intent_id: string;
|
|
131
|
-
client_secret: string;
|
|
132
|
-
tax: number;
|
|
133
|
-
total: number;
|
|
134
|
-
};
|
|
135
|
-
type AddPaymentMethodFlowResponse = {
|
|
136
|
-
client_secret: string;
|
|
137
|
-
};
|
|
138
|
-
type EditPaymentMethodRequest = {
|
|
139
|
-
primary: boolean;
|
|
140
|
-
};
|
|
141
|
-
type InitiatePaymentRequest = {
|
|
142
|
-
type: 'payment_method' | 'confirmation_token';
|
|
143
|
-
id?: string;
|
|
144
|
-
token?: string;
|
|
145
|
-
charge: {
|
|
146
|
-
type: 'existing';
|
|
147
|
-
id: string;
|
|
148
|
-
} | {
|
|
149
|
-
type: 'new';
|
|
150
|
-
product_id: string;
|
|
151
|
-
interval?: PriceDuration;
|
|
152
|
-
};
|
|
153
|
-
existing_payment_intent?: string;
|
|
154
|
-
metadata?: {
|
|
155
|
-
type: 'pyro';
|
|
156
|
-
server_name?: string;
|
|
157
|
-
server_region?: string;
|
|
158
|
-
source: unknown;
|
|
159
|
-
};
|
|
160
|
-
};
|
|
161
|
-
type InitiatePaymentResponse = {
|
|
162
|
-
payment_intent_id?: string;
|
|
163
|
-
client_secret?: string;
|
|
164
|
-
price_id: string;
|
|
165
|
-
tax: number;
|
|
166
|
-
total: number;
|
|
167
|
-
payment_method?: string;
|
|
168
|
-
};
|
|
169
|
-
type RefundChargeRequest = {
|
|
170
|
-
type: 'full' | 'partial' | 'none';
|
|
171
|
-
amount?: number;
|
|
172
|
-
unprovision?: boolean;
|
|
173
|
-
};
|
|
174
|
-
type CreditRequest = {
|
|
175
|
-
subscription_ids: string[];
|
|
176
|
-
days: number;
|
|
177
|
-
send_email: boolean;
|
|
178
|
-
message: string;
|
|
179
|
-
} | {
|
|
180
|
-
nodes: string[];
|
|
181
|
-
days: number;
|
|
182
|
-
send_email: boolean;
|
|
183
|
-
message: string;
|
|
184
|
-
} | {
|
|
185
|
-
region: string;
|
|
186
|
-
days: number;
|
|
187
|
-
send_email: boolean;
|
|
188
|
-
message: string;
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
namespace Payout {
|
|
193
|
-
namespace v3 {
|
|
194
|
-
type PayoutBalance = {
|
|
195
|
-
available: number;
|
|
196
|
-
withdrawn_lifetime: number;
|
|
197
|
-
withdrawn_ytd: number;
|
|
198
|
-
pending: number;
|
|
199
|
-
dates: Record<string, number>;
|
|
200
|
-
requested_form_type: string | null;
|
|
201
|
-
form_completion_status: string | null;
|
|
202
|
-
};
|
|
203
|
-
type PayoutStatus = 'success' | 'in-transit' | 'cancelled' | 'cancelling' | 'failed' | 'unknown';
|
|
204
|
-
type PayoutMethodType = 'venmo' | 'paypal' | 'tremendous' | 'muralpay';
|
|
205
|
-
type PayoutSource = 'creator_rewards' | 'affilites';
|
|
206
|
-
type TransactionItem = {
|
|
207
|
-
type: 'withdrawal';
|
|
208
|
-
id: string;
|
|
209
|
-
status: PayoutStatus;
|
|
210
|
-
created: string;
|
|
211
|
-
amount: number;
|
|
212
|
-
fee: number | null;
|
|
213
|
-
method_type: PayoutMethodType | null;
|
|
214
|
-
method_id: string | null;
|
|
215
|
-
method_address: string | null;
|
|
216
|
-
} | {
|
|
217
|
-
type: 'payout_available';
|
|
218
|
-
created: string;
|
|
219
|
-
payout_source: PayoutSource;
|
|
220
|
-
amount: number;
|
|
221
|
-
};
|
|
222
|
-
type WithdrawalFees = {
|
|
223
|
-
net_usd: number;
|
|
224
|
-
fee: number;
|
|
225
|
-
exchange_rate: number | null;
|
|
226
|
-
};
|
|
227
|
-
type PayoutDecimal = number;
|
|
228
|
-
type PayoutInterval = {
|
|
229
|
-
standard?: {
|
|
230
|
-
min: number;
|
|
231
|
-
max: number;
|
|
232
|
-
};
|
|
233
|
-
fixed?: {
|
|
234
|
-
values: PayoutDecimal[];
|
|
235
|
-
};
|
|
236
|
-
};
|
|
237
|
-
type PayoutMethod = {
|
|
238
|
-
id: string;
|
|
239
|
-
type: PayoutMethodType;
|
|
240
|
-
name: string;
|
|
241
|
-
category: string | null;
|
|
242
|
-
image_url: string | null;
|
|
243
|
-
image_logo_url: string | null;
|
|
244
|
-
interval: PayoutInterval;
|
|
245
|
-
currency_code: string | null;
|
|
246
|
-
exchange_rate: number | null;
|
|
247
|
-
};
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
namespace Affiliate {
|
|
251
|
-
namespace Internal {
|
|
252
|
-
type AffiliateCode = {
|
|
253
|
-
id: string;
|
|
254
|
-
created_at: string | null;
|
|
255
|
-
created_by: string | null;
|
|
256
|
-
affiliate: string;
|
|
257
|
-
source_name: string;
|
|
258
|
-
};
|
|
259
|
-
type CreateRequest = {
|
|
260
|
-
affiliate?: string;
|
|
261
|
-
source_name: string;
|
|
262
|
-
};
|
|
263
|
-
type PatchRequest = {
|
|
264
|
-
source_name: string;
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
namespace Attribution {
|
|
269
|
-
namespace Internal {
|
|
270
|
-
type AttributionPermissionKind = 'license' | 'my_project' | 'special_permissions' | 'globally_allowed' | 'no_permission';
|
|
271
|
-
type AttributionResolutionKind = AttributionPermissionKind;
|
|
272
|
-
type AttributionLicense = string | {
|
|
273
|
-
name: string;
|
|
274
|
-
};
|
|
275
|
-
type AttributionModerationStatusKind = 'not_allowed' | 'approved' | 'bad_proof';
|
|
276
|
-
type AttributionModerationStatus = {
|
|
277
|
-
kind: AttributionModerationStatusKind;
|
|
278
|
-
reason: string;
|
|
279
|
-
moderated_at?: string;
|
|
280
|
-
moderated_by?: string;
|
|
281
|
-
};
|
|
282
|
-
type AttributionResolutionBase = {
|
|
283
|
-
notes: string;
|
|
284
|
-
image_urls: string[];
|
|
285
|
-
moderation_status?: AttributionModerationStatus | null;
|
|
286
|
-
updated_by_moderator: boolean;
|
|
287
|
-
};
|
|
288
|
-
type AttributionResolution = (AttributionResolutionBase & {
|
|
289
|
-
kind: 'license';
|
|
290
|
-
license: AttributionLicense;
|
|
291
|
-
link_to_work: string;
|
|
292
|
-
}) | (AttributionResolutionBase & {
|
|
293
|
-
kind: 'my_project';
|
|
294
|
-
license: AttributionLicense;
|
|
295
|
-
}) | (AttributionResolutionBase & {
|
|
296
|
-
kind: 'special_permissions';
|
|
297
|
-
link_to_work: string;
|
|
298
|
-
}) | (AttributionResolutionBase & {
|
|
299
|
-
kind: 'globally_allowed';
|
|
300
|
-
link_to_work: string;
|
|
301
|
-
}) | (AttributionResolutionBase & {
|
|
302
|
-
kind: 'no_permission';
|
|
303
|
-
link_to_work?: string;
|
|
304
|
-
});
|
|
305
|
-
type FlameProject = {
|
|
306
|
-
id: number;
|
|
307
|
-
title: string;
|
|
308
|
-
url: string;
|
|
309
|
-
icon_url: string;
|
|
310
|
-
};
|
|
311
|
-
type AttributionFile = {
|
|
312
|
-
name: string;
|
|
313
|
-
sha1: string;
|
|
314
|
-
versions: string[];
|
|
315
|
-
moderation_external_license_id?: number;
|
|
316
|
-
moderation_external_license?: ExternalProjects.Internal.ExternalProject;
|
|
317
|
-
};
|
|
318
|
-
type AttributionVersionInfo = {
|
|
319
|
-
id: string;
|
|
320
|
-
name: string;
|
|
321
|
-
version_number: string;
|
|
322
|
-
date_created: string;
|
|
323
|
-
};
|
|
324
|
-
type OverrideFileOnPlatform = {
|
|
325
|
-
file_path: string;
|
|
326
|
-
sha1: string;
|
|
327
|
-
version_id: string;
|
|
328
|
-
platform_version_id: string;
|
|
329
|
-
platform_project_id: string;
|
|
330
|
-
};
|
|
331
|
-
type AttributionGroup = {
|
|
332
|
-
id: string;
|
|
333
|
-
flame_project: FlameProject | null;
|
|
334
|
-
attribution: AttributionResolution | null;
|
|
335
|
-
attributed_at: string | null;
|
|
336
|
-
attributed_by: string | null;
|
|
337
|
-
files: AttributionFile[];
|
|
338
|
-
versions: AttributionVersionInfo[];
|
|
339
|
-
override_files_on_platform: OverrideFileOnPlatform[];
|
|
340
|
-
};
|
|
341
|
-
type UpdateGroupRequest = {
|
|
342
|
-
attribution: AttributionResolution;
|
|
343
|
-
};
|
|
344
|
-
type AssignRequest = {
|
|
345
|
-
sha1: string;
|
|
346
|
-
target_group_id: number;
|
|
347
|
-
project_id: string;
|
|
348
|
-
};
|
|
349
|
-
type SplitRequest = {
|
|
350
|
-
sha1: string;
|
|
351
|
-
project_id: string;
|
|
352
|
-
};
|
|
353
|
-
type FileScanResponse = {
|
|
354
|
-
new_attribution_groups: number;
|
|
355
|
-
new_attribution_files: number;
|
|
356
|
-
scanned_file_names: string[];
|
|
357
|
-
};
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
namespace Images {
|
|
361
|
-
namespace v3 {
|
|
362
|
-
/** Extensions accepted by POST /v3/image (Labrinth image pipeline). */
|
|
363
|
-
type ImageExtension = 'bmp' | 'gif' | 'jpeg' | 'jpg' | 'png' | 'webp';
|
|
364
|
-
/** `context` query values accepted by POST /v3/image. */
|
|
365
|
-
type ImageUploadContext = 'project' | 'version' | 'thread_message' | 'report';
|
|
366
|
-
type UploadedImage = {
|
|
367
|
-
id: string;
|
|
368
|
-
url: string;
|
|
369
|
-
size: number;
|
|
370
|
-
created: string;
|
|
371
|
-
owner_id: string;
|
|
372
|
-
} & ({
|
|
373
|
-
context: 'project';
|
|
374
|
-
project_id: string;
|
|
375
|
-
} | {
|
|
376
|
-
context: 'version';
|
|
377
|
-
version_id: string;
|
|
378
|
-
} | {
|
|
379
|
-
context: 'thread_message';
|
|
380
|
-
thread_message_id: string;
|
|
381
|
-
} | {
|
|
382
|
-
context: 'report';
|
|
383
|
-
report_id: string;
|
|
384
|
-
});
|
|
385
|
-
type UploadedImageFor<C extends ImageUploadContext> = Extract<UploadedImage, {
|
|
386
|
-
context: C;
|
|
387
|
-
}>;
|
|
388
|
-
/**
|
|
389
|
-
* Target for POST /v3/image (per-context id query params, plus `context`).
|
|
390
|
-
* `ext` is passed as a separate argument on the client module.
|
|
391
|
-
*/
|
|
392
|
-
type UploadImageParams = {
|
|
393
|
-
context: 'project';
|
|
394
|
-
project_id: string;
|
|
395
|
-
} | {
|
|
396
|
-
context: 'version';
|
|
397
|
-
version_id: string;
|
|
398
|
-
} | {
|
|
399
|
-
context: 'thread_message';
|
|
400
|
-
thread_message_id: string;
|
|
401
|
-
} | {
|
|
402
|
-
context: 'report';
|
|
403
|
-
report_id: string;
|
|
404
|
-
};
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
namespace Analytics {
|
|
408
|
-
namespace v3 {
|
|
409
|
-
type AnalyticsEventId = number;
|
|
410
|
-
type AnalyticsEventMetricKind = 'views' | 'revenue' | 'downloads' | 'playtime';
|
|
411
|
-
type AnalyticsEvent = {
|
|
412
|
-
announcement_url: string | null;
|
|
413
|
-
for_metric_kind: AnalyticsEventMetricKind[] | null;
|
|
414
|
-
title: string;
|
|
415
|
-
ends: string;
|
|
416
|
-
id: AnalyticsEventId;
|
|
417
|
-
starts: string;
|
|
418
|
-
};
|
|
419
|
-
type AnalyticsEventUpsert = {
|
|
420
|
-
announcement_url: string | null;
|
|
421
|
-
for_metric_kind: AnalyticsEventMetricKind[] | null;
|
|
422
|
-
title: string;
|
|
423
|
-
ends: string;
|
|
424
|
-
starts: string;
|
|
425
|
-
};
|
|
426
|
-
type FetchRequest = {
|
|
427
|
-
time_range: TimeRange;
|
|
428
|
-
return_metrics: ReturnMetrics;
|
|
429
|
-
project_ids?: string[];
|
|
430
|
-
};
|
|
431
|
-
type TimeRange = {
|
|
432
|
-
start: string;
|
|
433
|
-
end: string;
|
|
434
|
-
resolution: TimeRangeResolution;
|
|
435
|
-
};
|
|
436
|
-
type TimeRangeResolution = {
|
|
437
|
-
slices: number;
|
|
438
|
-
} | {
|
|
439
|
-
minutes: number;
|
|
440
|
-
};
|
|
441
|
-
type ReturnMetrics = {
|
|
442
|
-
project_views?: Metrics<ProjectViewsField, ProjectViewsFilters>;
|
|
443
|
-
project_downloads?: Metrics<ProjectDownloadsField, ProjectDownloadsFilters>;
|
|
444
|
-
project_playtime?: Metrics<ProjectPlaytimeField, ProjectPlaytimeFilters>;
|
|
445
|
-
project_revenue?: Metrics<ProjectRevenueField, ProjectRevenueFilters>;
|
|
446
|
-
affiliate_code_clicks?: Metrics<AffiliateCodeClicksField, AffiliateCodeClicksFilters>;
|
|
447
|
-
affiliate_code_conversions?: Metrics<AffiliateCodeConversionsField, AffiliateCodeConversionsFilters>;
|
|
448
|
-
affiliate_code_revenue?: Metrics<AffiliateCodeRevenueField, AffiliateCodeRevenueFilters>;
|
|
449
|
-
};
|
|
450
|
-
type Metrics<BucketBy, FilterBy> = {
|
|
451
|
-
bucket_by?: BucketBy[];
|
|
452
|
-
filter_by?: FilterBy;
|
|
453
|
-
};
|
|
454
|
-
type ProjectViewsField = 'project_id' | 'domain' | 'site_path' | 'monetized' | 'country';
|
|
455
|
-
type ProjectDownloadsField = 'project_id' | 'version_id' | 'dependent_project_id' | 'user_agent' | 'domain' | 'country' | 'monetized' | 'reason' | 'game_version' | 'loader';
|
|
456
|
-
type ProjectPlaytimeField = 'project_id' | 'version_id' | 'loader' | 'game_version' | 'country';
|
|
457
|
-
type ProjectRevenueField = 'project_id' | 'user_id';
|
|
458
|
-
type DownloadReason = 'standalone' | 'dependency' | 'modpack' | 'update';
|
|
459
|
-
type AffiliateCodeClicksField = 'affiliate_code_id';
|
|
460
|
-
type AffiliateCodeConversionsField = 'affiliate_code_id';
|
|
461
|
-
type AffiliateCodeRevenueField = 'affiliate_code_id';
|
|
462
|
-
type ProjectViewsFilters = {
|
|
463
|
-
domain?: string[];
|
|
464
|
-
site_path?: string[];
|
|
465
|
-
monetized?: boolean[];
|
|
466
|
-
country?: string[];
|
|
467
|
-
};
|
|
468
|
-
type ProjectDownloadsFilters = {
|
|
469
|
-
version_id?: string[];
|
|
470
|
-
dependent_project_id?: string[];
|
|
471
|
-
domain?: string[];
|
|
472
|
-
user_agent?: string[];
|
|
473
|
-
monetized?: boolean[];
|
|
474
|
-
country?: string[];
|
|
475
|
-
reason?: DownloadReason[];
|
|
476
|
-
game_version?: string[];
|
|
477
|
-
loader?: string[];
|
|
478
|
-
};
|
|
479
|
-
type ProjectPlaytimeFilters = {
|
|
480
|
-
version_id?: string[];
|
|
481
|
-
loader?: string[];
|
|
482
|
-
game_version?: string[];
|
|
483
|
-
country?: string[];
|
|
484
|
-
};
|
|
485
|
-
type ProjectRevenueFilters = {
|
|
486
|
-
user_id?: string[];
|
|
487
|
-
};
|
|
488
|
-
type AffiliateCodeClicksFilters = {
|
|
489
|
-
affiliate_code_id?: string[];
|
|
490
|
-
};
|
|
491
|
-
type AffiliateCodeConversionsFilters = {
|
|
492
|
-
affiliate_code_id?: string[];
|
|
493
|
-
};
|
|
494
|
-
type AffiliateCodeRevenueFilters = {
|
|
495
|
-
affiliate_code_id?: string[];
|
|
496
|
-
};
|
|
497
|
-
type FetchResponse = {
|
|
498
|
-
metrics: TimeSlice[];
|
|
499
|
-
projects: Record<string, Projects.v3.Project>;
|
|
500
|
-
users: Record<string, Users.v3.User>;
|
|
501
|
-
project_events: ProjectAnalyticsEvent[];
|
|
502
|
-
};
|
|
503
|
-
type FacetsResponse = {
|
|
504
|
-
facets: AnalyticsFacets;
|
|
505
|
-
};
|
|
506
|
-
type AnalyticsFacets = {
|
|
507
|
-
project_views?: Partial<ProjectViewsFacets>;
|
|
508
|
-
project_downloads?: Partial<ProjectDownloadsFacets>;
|
|
509
|
-
project_playtime?: Partial<ProjectPlaytimeFacets>;
|
|
510
|
-
};
|
|
511
|
-
type ProjectViewsFacets = {
|
|
512
|
-
domain: string[];
|
|
513
|
-
site_path: string[];
|
|
514
|
-
monetized: boolean[];
|
|
515
|
-
country: string[];
|
|
516
|
-
};
|
|
517
|
-
type ProjectDownloadsFacets = {
|
|
518
|
-
project_id: string[];
|
|
519
|
-
domain: string[];
|
|
520
|
-
user_agent: string[];
|
|
521
|
-
version_id: string[];
|
|
522
|
-
monetized: boolean[];
|
|
523
|
-
country: string[];
|
|
524
|
-
reason: DownloadReason[];
|
|
525
|
-
game_version: string[];
|
|
526
|
-
loader: string[];
|
|
527
|
-
};
|
|
528
|
-
type ProjectPlaytimeFacets = {
|
|
529
|
-
version_id: string[];
|
|
530
|
-
loader: string[];
|
|
531
|
-
game_version: string[];
|
|
532
|
-
country: string[];
|
|
533
|
-
};
|
|
534
|
-
type TimeSlice = AnalyticsData[];
|
|
535
|
-
type ProjectAnalyticsEvent = {
|
|
536
|
-
project_id: string;
|
|
537
|
-
timestamp: string;
|
|
538
|
-
} & ProjectAnalyticsEventKind;
|
|
539
|
-
type ProjectAnalyticsEventKind = {
|
|
540
|
-
kind: 'version_uploaded';
|
|
541
|
-
version_id: string;
|
|
542
|
-
version_name: string;
|
|
543
|
-
version_number: string;
|
|
544
|
-
} | {
|
|
545
|
-
kind: 'status_changed';
|
|
546
|
-
status_from: Projects.v2.ProjectStatus;
|
|
547
|
-
status_to: Projects.v2.ProjectStatus;
|
|
548
|
-
};
|
|
549
|
-
type AnalyticsData = ProjectAnalytics | AffiliateCodeAnalytics;
|
|
550
|
-
type ProjectAnalytics = {
|
|
551
|
-
source_project: string;
|
|
552
|
-
} & ProjectMetrics;
|
|
553
|
-
type ProjectMetrics = ({
|
|
554
|
-
metric_kind: 'views';
|
|
555
|
-
} & ProjectViews) | ({
|
|
556
|
-
metric_kind: 'downloads';
|
|
557
|
-
} & ProjectDownloads) | ({
|
|
558
|
-
metric_kind: 'playtime';
|
|
559
|
-
} & ProjectPlaytime) | ({
|
|
560
|
-
metric_kind: 'revenue';
|
|
561
|
-
} & ProjectRevenue);
|
|
562
|
-
type ProjectViews = {
|
|
563
|
-
domain?: string;
|
|
564
|
-
site_path?: string;
|
|
565
|
-
monetized?: boolean;
|
|
566
|
-
country?: string;
|
|
567
|
-
views: number;
|
|
568
|
-
};
|
|
569
|
-
type ProjectDownloads = {
|
|
570
|
-
user_agent?: string;
|
|
571
|
-
domain?: string;
|
|
572
|
-
version_id?: string;
|
|
573
|
-
dependent_project_id?: string;
|
|
574
|
-
country?: string;
|
|
575
|
-
monetized?: boolean;
|
|
576
|
-
reason?: DownloadReason;
|
|
577
|
-
game_version?: string;
|
|
578
|
-
loader?: string;
|
|
579
|
-
downloads: number;
|
|
580
|
-
};
|
|
581
|
-
type ProjectPlaytime = {
|
|
582
|
-
version_id?: string;
|
|
583
|
-
loader?: string;
|
|
584
|
-
game_version?: string;
|
|
585
|
-
country?: string;
|
|
586
|
-
seconds: number;
|
|
587
|
-
};
|
|
588
|
-
type ProjectRevenue = {
|
|
589
|
-
user_id?: string;
|
|
590
|
-
revenue: string;
|
|
591
|
-
};
|
|
592
|
-
type AffiliateCodeAnalytics = {
|
|
593
|
-
source_affiliate_code: string;
|
|
594
|
-
} & AffiliateCodeMetrics;
|
|
595
|
-
type AffiliateCodeMetrics = ({
|
|
596
|
-
metric_kind: 'clicks';
|
|
597
|
-
} & AffiliateCodeClicks) | ({
|
|
598
|
-
metric_kind: 'conversions';
|
|
599
|
-
} & AffiliateCodeConversions) | ({
|
|
600
|
-
metric_kind: 'revenue';
|
|
601
|
-
} & AffiliateCodeRevenue);
|
|
602
|
-
type AffiliateCodeClicks = {
|
|
603
|
-
clicks: number;
|
|
604
|
-
};
|
|
605
|
-
type AffiliateCodeConversions = {
|
|
606
|
-
conversions: number;
|
|
607
|
-
};
|
|
608
|
-
type AffiliateCodeRevenue = {
|
|
609
|
-
revenue: string;
|
|
610
|
-
};
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
namespace Auth {
|
|
614
|
-
namespace Internal {
|
|
615
|
-
type SubscriptionStatus = {
|
|
616
|
-
subscribed: boolean;
|
|
617
|
-
};
|
|
618
|
-
type DiscordCommunityLinkResponse = {
|
|
619
|
-
url: string;
|
|
620
|
-
};
|
|
621
|
-
}
|
|
622
|
-
namespace v2 {
|
|
623
|
-
type LoginRequest = {
|
|
624
|
-
username: string;
|
|
625
|
-
password: string;
|
|
626
|
-
challenge: string;
|
|
627
|
-
};
|
|
628
|
-
type LoginResponse = {
|
|
629
|
-
session?: string;
|
|
630
|
-
flow?: string;
|
|
631
|
-
};
|
|
632
|
-
type Login2FARequest = {
|
|
633
|
-
code: string;
|
|
634
|
-
flow: string;
|
|
635
|
-
};
|
|
636
|
-
type Login2FAResponse = {
|
|
637
|
-
session: string;
|
|
638
|
-
};
|
|
639
|
-
type CreateAccountRequest = {
|
|
640
|
-
username: string;
|
|
641
|
-
password: string;
|
|
642
|
-
email: string;
|
|
643
|
-
challenge: string;
|
|
644
|
-
sign_up_newsletter?: boolean;
|
|
645
|
-
};
|
|
646
|
-
type CreateAccountResponse = {
|
|
647
|
-
session: string;
|
|
648
|
-
};
|
|
649
|
-
type ValidateCreateAccountRequest = {
|
|
650
|
-
username: string;
|
|
651
|
-
password: string;
|
|
652
|
-
email: string;
|
|
653
|
-
};
|
|
654
|
-
type CreateOAuthAccountRequest = {
|
|
655
|
-
username: string;
|
|
656
|
-
state: string;
|
|
657
|
-
challenge: string;
|
|
658
|
-
sign_up_newsletter: boolean;
|
|
659
|
-
};
|
|
660
|
-
type CreateOAuthAccountResponse = {
|
|
661
|
-
session: string;
|
|
662
|
-
};
|
|
663
|
-
type ResetPasswordRequest = {
|
|
664
|
-
username: string;
|
|
665
|
-
challenge: string;
|
|
666
|
-
};
|
|
667
|
-
type ChangePasswordRequest = {
|
|
668
|
-
flow?: string;
|
|
669
|
-
old_password?: string;
|
|
670
|
-
new_password?: string;
|
|
671
|
-
};
|
|
672
|
-
type Passkey = {
|
|
673
|
-
id: string;
|
|
674
|
-
name: string;
|
|
675
|
-
created_at: string;
|
|
676
|
-
last_used: string | null;
|
|
677
|
-
};
|
|
678
|
-
type PasskeyRegisterStartResponse = {
|
|
679
|
-
options: Record<string, unknown>;
|
|
680
|
-
flow: string;
|
|
681
|
-
};
|
|
682
|
-
type PasskeyRegisterFinishRequest = {
|
|
683
|
-
flow: string;
|
|
684
|
-
name: string;
|
|
685
|
-
credential: unknown;
|
|
686
|
-
};
|
|
687
|
-
type PasskeyAuthenticateStartResponse = {
|
|
688
|
-
options: Record<string, unknown>;
|
|
689
|
-
flow: string;
|
|
690
|
-
};
|
|
691
|
-
type PasskeyAuthenticateFinishRequest = {
|
|
692
|
-
flow: string;
|
|
693
|
-
credential: unknown;
|
|
694
|
-
};
|
|
695
|
-
type PasskeyRenameRequest = {
|
|
696
|
-
name: string;
|
|
697
|
-
};
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
namespace Globals {
|
|
701
|
-
namespace Internal {
|
|
702
|
-
type Globals = {
|
|
703
|
-
tax_compliance_thresholds: Record<string, number>;
|
|
704
|
-
captcha_enabled: boolean;
|
|
705
|
-
};
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
namespace OAuth {
|
|
709
|
-
namespace Internal {
|
|
710
|
-
type OAuthClientAccessRequest = {
|
|
711
|
-
flow_id: string;
|
|
712
|
-
client_id: string;
|
|
713
|
-
client_name: string;
|
|
714
|
-
client_icon: string | null;
|
|
715
|
-
requested_scopes: number;
|
|
716
|
-
};
|
|
717
|
-
type AcceptRejectRequest = {
|
|
718
|
-
flow: string;
|
|
719
|
-
};
|
|
720
|
-
type OAuthRedirectUri = {
|
|
721
|
-
id: string;
|
|
722
|
-
client_id: string;
|
|
723
|
-
uri: string;
|
|
724
|
-
};
|
|
725
|
-
type OAuthClient = {
|
|
726
|
-
id: string;
|
|
727
|
-
name: string;
|
|
728
|
-
icon_url: string | null;
|
|
729
|
-
max_scopes: number;
|
|
730
|
-
redirect_uris: OAuthRedirectUri[];
|
|
731
|
-
created_by: string;
|
|
732
|
-
created: string;
|
|
733
|
-
url: string | null;
|
|
734
|
-
description: string | null;
|
|
735
|
-
};
|
|
736
|
-
type OAuthClientCreationResult = OAuthClient & {
|
|
737
|
-
client_secret: string;
|
|
738
|
-
};
|
|
739
|
-
type OAuthClientAuthorization = {
|
|
740
|
-
id: string;
|
|
741
|
-
app_id: string;
|
|
742
|
-
user_id: string;
|
|
743
|
-
scopes: number;
|
|
744
|
-
created: string;
|
|
745
|
-
};
|
|
746
|
-
type CreateOAuthAppRequest = {
|
|
747
|
-
name: string;
|
|
748
|
-
max_scopes: number;
|
|
749
|
-
redirect_uris: string[];
|
|
750
|
-
url?: string;
|
|
751
|
-
description?: string;
|
|
752
|
-
};
|
|
753
|
-
type EditOAuthAppRequest = {
|
|
754
|
-
name?: string;
|
|
755
|
-
max_scopes?: number;
|
|
756
|
-
redirect_uris?: string[];
|
|
757
|
-
url?: string | null;
|
|
758
|
-
description?: string | null;
|
|
759
|
-
icon_url?: string;
|
|
760
|
-
};
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
namespace Projects {
|
|
764
|
-
namespace v2 {
|
|
765
|
-
type Environment = 'required' | 'optional' | 'unsupported' | 'unknown';
|
|
766
|
-
type ProjectStatus = 'approved' | 'archived' | 'rejected' | 'draft' | 'unlisted' | 'processing' | 'withheld' | 'scheduled' | 'private' | 'unknown';
|
|
767
|
-
type MonetizationStatus = 'monetized' | 'demonetized' | 'force-demonetized';
|
|
768
|
-
type ProjectType = 'mod' | 'modpack' | 'resourcepack' | 'shader' | 'plugin' | 'datapack' | 'project';
|
|
769
|
-
type GalleryImage = {
|
|
770
|
-
url: string;
|
|
771
|
-
featured: boolean;
|
|
772
|
-
title?: string;
|
|
773
|
-
description?: string;
|
|
774
|
-
created: string;
|
|
775
|
-
ordering: number;
|
|
776
|
-
};
|
|
777
|
-
type DonationLink = {
|
|
778
|
-
id: string;
|
|
779
|
-
platform: string;
|
|
780
|
-
url: string;
|
|
781
|
-
};
|
|
782
|
-
interface CreateProjectBase {
|
|
783
|
-
title: string;
|
|
784
|
-
project_type: 'mod';
|
|
785
|
-
slug: string;
|
|
786
|
-
description: string;
|
|
787
|
-
body: string;
|
|
788
|
-
requested_status: v2.ProjectStatus;
|
|
789
|
-
initial_versions: unknown[];
|
|
790
|
-
team_members: unknown[];
|
|
791
|
-
categories: string[];
|
|
792
|
-
client_side: string;
|
|
793
|
-
server_side: string;
|
|
794
|
-
license_id: string;
|
|
795
|
-
is_draft: boolean;
|
|
796
|
-
organization_id?: string;
|
|
797
|
-
}
|
|
798
|
-
type Project = {
|
|
799
|
-
id: string;
|
|
800
|
-
slug: string;
|
|
801
|
-
project_type: ProjectType;
|
|
802
|
-
actualProjectType: ProjectType;
|
|
803
|
-
team: string;
|
|
804
|
-
organization: string | null;
|
|
805
|
-
title: string;
|
|
806
|
-
description: string;
|
|
807
|
-
body: string;
|
|
808
|
-
published: string;
|
|
809
|
-
updated: string;
|
|
810
|
-
approved?: string;
|
|
811
|
-
queued?: string;
|
|
812
|
-
status: ProjectStatus;
|
|
813
|
-
requested_status?: ProjectStatus;
|
|
814
|
-
moderator_message?: {
|
|
815
|
-
message: string;
|
|
816
|
-
body?: string;
|
|
817
|
-
};
|
|
818
|
-
license: {
|
|
819
|
-
id: string;
|
|
820
|
-
name: string;
|
|
821
|
-
url?: string;
|
|
822
|
-
};
|
|
823
|
-
client_side: Environment;
|
|
824
|
-
server_side: Environment;
|
|
825
|
-
downloads: number;
|
|
826
|
-
followers: number;
|
|
827
|
-
categories: string[];
|
|
828
|
-
additional_categories: string[];
|
|
829
|
-
game_versions: string[];
|
|
830
|
-
loaders: string[];
|
|
831
|
-
versions: string[];
|
|
832
|
-
icon_url?: string;
|
|
833
|
-
issues_url?: string;
|
|
834
|
-
source_url?: string;
|
|
835
|
-
wiki_url?: string;
|
|
836
|
-
discord_url?: string;
|
|
837
|
-
donation_urls?: DonationLink[];
|
|
838
|
-
gallery?: GalleryImage[];
|
|
839
|
-
color?: number;
|
|
840
|
-
thread_id: string;
|
|
841
|
-
monetization_status: MonetizationStatus;
|
|
842
|
-
};
|
|
843
|
-
type ProjectCheckResponse = {
|
|
844
|
-
id: string;
|
|
845
|
-
};
|
|
846
|
-
type SearchResultHit = {
|
|
847
|
-
project_id: string;
|
|
848
|
-
project_type: ProjectType;
|
|
849
|
-
slug: string;
|
|
850
|
-
author: string;
|
|
851
|
-
title: string;
|
|
852
|
-
description: string;
|
|
853
|
-
categories: string[];
|
|
854
|
-
display_categories: string[];
|
|
855
|
-
versions: string[];
|
|
856
|
-
downloads: number;
|
|
857
|
-
follows: number;
|
|
858
|
-
icon_url: string;
|
|
859
|
-
date_created: string;
|
|
860
|
-
date_modified: string;
|
|
861
|
-
latest_version?: string;
|
|
862
|
-
license: string;
|
|
863
|
-
client_side: Environment;
|
|
864
|
-
server_side: Environment;
|
|
865
|
-
gallery: string[];
|
|
866
|
-
color?: number;
|
|
867
|
-
};
|
|
868
|
-
type SearchResult = {
|
|
869
|
-
hits: SearchResultHit[];
|
|
870
|
-
offset: number;
|
|
871
|
-
limit: number;
|
|
872
|
-
total_hits: number;
|
|
873
|
-
};
|
|
874
|
-
type ProjectSearchParams = {
|
|
875
|
-
query?: string;
|
|
876
|
-
facets?: string[][];
|
|
877
|
-
new_filters?: string;
|
|
878
|
-
filters?: string;
|
|
879
|
-
index?: 'relevance' | 'downloads' | 'follows' | 'newest' | 'updated';
|
|
880
|
-
offset?: number;
|
|
881
|
-
limit?: number;
|
|
882
|
-
};
|
|
883
|
-
interface DependencyInfo {
|
|
884
|
-
projects: Project[];
|
|
885
|
-
versions: Labrinth.Versions.v2.Version[];
|
|
886
|
-
}
|
|
887
|
-
type BulkEditProjectRequest = {
|
|
888
|
-
categories?: string[];
|
|
889
|
-
add_categories?: string[];
|
|
890
|
-
remove_categories?: string[];
|
|
891
|
-
additional_categories?: string[];
|
|
892
|
-
add_additional_categories?: string[];
|
|
893
|
-
remove_additional_categories?: string[];
|
|
894
|
-
donation_urls?: DonationLink[];
|
|
895
|
-
add_donation_urls?: DonationLink[];
|
|
896
|
-
remove_donation_urls?: DonationLink[];
|
|
897
|
-
issues_url?: string | null;
|
|
898
|
-
source_url?: string | null;
|
|
899
|
-
wiki_url?: string | null;
|
|
900
|
-
discord_url?: string | null;
|
|
901
|
-
};
|
|
902
|
-
}
|
|
903
|
-
namespace v3 {
|
|
904
|
-
export type ProjectType = 'mod' | 'modpack' | 'resourcepack' | 'shader' | 'plugin' | 'datapack';
|
|
905
|
-
export type Environment = 'client_and_server' | 'client_only' | 'client_only_server_optional' | 'singleplayer_only' | 'server_only' | 'server_only_client_optional' | 'dedicated_server_only' | 'client_or_server' | 'client_or_server_prefers_both' | 'unknown';
|
|
906
|
-
export type GalleryItem = {
|
|
907
|
-
url: string;
|
|
908
|
-
raw_url: string;
|
|
909
|
-
featured: boolean;
|
|
910
|
-
name?: string;
|
|
911
|
-
description?: string;
|
|
912
|
-
created: string;
|
|
913
|
-
ordering: number;
|
|
914
|
-
};
|
|
915
|
-
export type Link = {
|
|
916
|
-
platform: string;
|
|
917
|
-
donation: boolean;
|
|
918
|
-
url: string;
|
|
919
|
-
};
|
|
920
|
-
export type Project = {
|
|
921
|
-
id: string;
|
|
922
|
-
slug?: string;
|
|
923
|
-
project_types: ProjectType[];
|
|
924
|
-
games: string[];
|
|
925
|
-
team_id: string;
|
|
926
|
-
organization?: string;
|
|
927
|
-
name: string;
|
|
928
|
-
summary: string;
|
|
929
|
-
description: string;
|
|
930
|
-
published: string;
|
|
931
|
-
updated: string;
|
|
932
|
-
approved?: string;
|
|
933
|
-
queued?: string;
|
|
934
|
-
status: v2.ProjectStatus;
|
|
935
|
-
requested_status?: v2.ProjectStatus;
|
|
936
|
-
license: {
|
|
937
|
-
id: string;
|
|
938
|
-
name: string;
|
|
939
|
-
url?: string;
|
|
940
|
-
};
|
|
941
|
-
downloads: number;
|
|
942
|
-
followers: number;
|
|
943
|
-
categories: string[];
|
|
944
|
-
additional_categories: string[];
|
|
945
|
-
loaders: string[];
|
|
946
|
-
mrpack_loaders: string[];
|
|
947
|
-
versions: string[];
|
|
948
|
-
icon_url?: string;
|
|
949
|
-
link_urls: Record<string, Link>;
|
|
950
|
-
gallery: GalleryItem[];
|
|
951
|
-
color?: number;
|
|
952
|
-
thread_id: string;
|
|
953
|
-
monetization_status: v2.MonetizationStatus;
|
|
954
|
-
side_types_migration_review_status: 'reviewed' | 'pending';
|
|
955
|
-
environment?: Environment[];
|
|
956
|
-
minecraft_server?: MinecraftServer;
|
|
957
|
-
minecraft_java_server?: MinecraftJavaServer;
|
|
958
|
-
minecraft_bedrock_server?: MinecraftBedrockServer;
|
|
959
|
-
/**
|
|
960
|
-
* @deprecated Not recommended to use.
|
|
961
|
-
**/
|
|
962
|
-
[key: string]: unknown;
|
|
963
|
-
};
|
|
964
|
-
interface CreateProjectBase {
|
|
965
|
-
name: string;
|
|
966
|
-
slug: string;
|
|
967
|
-
summary: string;
|
|
968
|
-
description: string;
|
|
969
|
-
requested_status: v2.ProjectStatus;
|
|
970
|
-
organization_id?: string;
|
|
971
|
-
}
|
|
972
|
-
export interface MinecraftJavaServerPing {
|
|
973
|
-
address: string;
|
|
974
|
-
data?: {
|
|
975
|
-
description: string;
|
|
976
|
-
latency: {
|
|
977
|
-
nanos: number;
|
|
978
|
-
secs: number;
|
|
979
|
-
};
|
|
980
|
-
players_max: number;
|
|
981
|
-
players_online: number;
|
|
982
|
-
version_name: string;
|
|
983
|
-
version_protocol: number;
|
|
984
|
-
};
|
|
985
|
-
port: number;
|
|
986
|
-
when: string;
|
|
987
|
-
}
|
|
988
|
-
export interface MinecraftServer {
|
|
989
|
-
max_players?: number;
|
|
990
|
-
region?: string;
|
|
991
|
-
active_version?: string | null;
|
|
992
|
-
languages?: string[];
|
|
993
|
-
/**
|
|
994
|
-
* deprecated, use region instead
|
|
995
|
-
*/
|
|
996
|
-
country?: string;
|
|
997
|
-
}
|
|
998
|
-
export interface ModpackContent {
|
|
999
|
-
kind: 'modpack';
|
|
1000
|
-
version_id: string;
|
|
1001
|
-
project_id?: string;
|
|
1002
|
-
project_name?: string;
|
|
1003
|
-
project_icon?: string;
|
|
1004
|
-
}
|
|
1005
|
-
export interface VanillaContent {
|
|
1006
|
-
kind: 'vanilla';
|
|
1007
|
-
supported_game_versions: string[];
|
|
1008
|
-
recommended_game_version?: string;
|
|
1009
|
-
}
|
|
1010
|
-
export interface MinecraftJavaServer {
|
|
1011
|
-
address?: string;
|
|
1012
|
-
content?: ModpackContent | VanillaContent;
|
|
1013
|
-
verified_plays_4w?: number | null;
|
|
1014
|
-
verified_plays_2w?: number | null;
|
|
1015
|
-
ping: Projects.v3.MinecraftJavaServerPing | null;
|
|
1016
|
-
}
|
|
1017
|
-
export interface MinecraftBedrockServer {
|
|
1018
|
-
address?: string;
|
|
1019
|
-
}
|
|
1020
|
-
export interface CreateServerProjectRequest {
|
|
1021
|
-
base: CreateProjectBase;
|
|
1022
|
-
minecraft_server?: MinecraftServer;
|
|
1023
|
-
minecraft_java_server?: Omit<MinecraftJavaServer, 'ping'>;
|
|
1024
|
-
minecraft_bedrock_server?: MinecraftBedrockServer;
|
|
1025
|
-
}
|
|
1026
|
-
export type EditProjectRequest = {
|
|
1027
|
-
name?: string;
|
|
1028
|
-
summary?: string;
|
|
1029
|
-
description?: string;
|
|
1030
|
-
categories?: string[];
|
|
1031
|
-
additional_categories?: string[];
|
|
1032
|
-
license_url?: string | null;
|
|
1033
|
-
link_urls?: Record<string, string | null>;
|
|
1034
|
-
license_id?: string;
|
|
1035
|
-
slug?: string;
|
|
1036
|
-
status?: v2.ProjectStatus;
|
|
1037
|
-
requested_status?: v2.ProjectStatus | null;
|
|
1038
|
-
moderation_message?: string | null;
|
|
1039
|
-
moderation_message_body?: string | null;
|
|
1040
|
-
monetization_status?: v2.MonetizationStatus;
|
|
1041
|
-
side_types_migration_review_status?: 'reviewed' | 'pending';
|
|
1042
|
-
environment?: Environment;
|
|
1043
|
-
minecraft_server?: MinecraftServer;
|
|
1044
|
-
minecraft_java_server?: MinecraftJavaServer;
|
|
1045
|
-
minecraft_bedrock_server?: MinecraftBedrockServer;
|
|
1046
|
-
[key: string]: unknown;
|
|
1047
|
-
};
|
|
1048
|
-
export type Organization = {
|
|
1049
|
-
id: string;
|
|
1050
|
-
slug: string;
|
|
1051
|
-
name: string;
|
|
1052
|
-
team_id: string;
|
|
1053
|
-
description: string;
|
|
1054
|
-
icon_url: string | null;
|
|
1055
|
-
color: number | null;
|
|
1056
|
-
members: TeamMember[];
|
|
1057
|
-
};
|
|
1058
|
-
export type OrganizationMember = {
|
|
1059
|
-
team_id: string;
|
|
1060
|
-
user: Users.v3.User;
|
|
1061
|
-
role: string;
|
|
1062
|
-
is_owner: boolean;
|
|
1063
|
-
permissions: number;
|
|
1064
|
-
organization_permissions: number;
|
|
1065
|
-
accepted: boolean;
|
|
1066
|
-
payouts_split: number;
|
|
1067
|
-
ordering: number;
|
|
1068
|
-
};
|
|
1069
|
-
export type TeamMember = {
|
|
1070
|
-
team_id: string;
|
|
1071
|
-
user: Users.v3.User;
|
|
1072
|
-
role: string;
|
|
1073
|
-
is_owner: boolean;
|
|
1074
|
-
permissions: number | null;
|
|
1075
|
-
organization_permissions: number | null;
|
|
1076
|
-
accepted: boolean;
|
|
1077
|
-
payouts_split: number | null;
|
|
1078
|
-
ordering: number;
|
|
1079
|
-
};
|
|
1080
|
-
export type Team = {
|
|
1081
|
-
id: string;
|
|
1082
|
-
members: TeamMember[];
|
|
1083
|
-
};
|
|
1084
|
-
export type ProjectDependencies = {
|
|
1085
|
-
projects: Project[];
|
|
1086
|
-
versions: Labrinth.Versions.v3.Version[];
|
|
1087
|
-
};
|
|
1088
|
-
export {};
|
|
1089
|
-
}
|
|
1090
|
-
}
|
|
1091
|
-
namespace Organizations {
|
|
1092
|
-
namespace v3 {
|
|
1093
|
-
type Organization = {
|
|
1094
|
-
id: string;
|
|
1095
|
-
slug: string;
|
|
1096
|
-
name: string;
|
|
1097
|
-
team_id: string;
|
|
1098
|
-
description: string;
|
|
1099
|
-
icon_url: string | null;
|
|
1100
|
-
color: number | null;
|
|
1101
|
-
members: Projects.v3.TeamMember[];
|
|
1102
|
-
moderation_notes?: Users.Common.ModerationNote | null;
|
|
1103
|
-
};
|
|
1104
|
-
type CreateOrganizationRequest = {
|
|
1105
|
-
slug: string;
|
|
1106
|
-
name: string;
|
|
1107
|
-
description: string;
|
|
1108
|
-
};
|
|
1109
|
-
type EditOrganizationRequest = {
|
|
1110
|
-
description?: string;
|
|
1111
|
-
slug?: string;
|
|
1112
|
-
name?: string;
|
|
1113
|
-
};
|
|
1114
|
-
type AddProjectRequest = {
|
|
1115
|
-
project_id: string;
|
|
1116
|
-
};
|
|
1117
|
-
type RemoveProjectRequest = {
|
|
1118
|
-
new_owner: string;
|
|
1119
|
-
};
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
namespace Versions {
|
|
1123
|
-
namespace v2 {
|
|
1124
|
-
type VersionType = 'release' | 'beta' | 'alpha';
|
|
1125
|
-
type VersionStatus = 'listed' | 'archived' | 'draft' | 'unlisted' | 'scheduled' | 'unknown';
|
|
1126
|
-
type DependencyType = 'required' | 'optional' | 'incompatible' | 'embedded';
|
|
1127
|
-
type FileType = 'required-resource-pack' | 'optional-resource-pack' | 'unknown';
|
|
1128
|
-
type VersionFileHash = {
|
|
1129
|
-
sha512: string;
|
|
1130
|
-
sha1: string;
|
|
1131
|
-
};
|
|
1132
|
-
type VersionFile = {
|
|
1133
|
-
id?: string;
|
|
1134
|
-
hashes: VersionFileHash;
|
|
1135
|
-
url: string;
|
|
1136
|
-
filename: string;
|
|
1137
|
-
primary: boolean;
|
|
1138
|
-
size: number;
|
|
1139
|
-
file_type?: FileType;
|
|
1140
|
-
};
|
|
1141
|
-
type Dependency = {
|
|
1142
|
-
file_name?: string;
|
|
1143
|
-
dependency_type: DependencyType;
|
|
1144
|
-
} & ({
|
|
1145
|
-
project_id: string;
|
|
1146
|
-
} | {
|
|
1147
|
-
version_id: string;
|
|
1148
|
-
project_id?: string;
|
|
1149
|
-
});
|
|
1150
|
-
type Version = {
|
|
1151
|
-
id: string;
|
|
1152
|
-
project_id: string;
|
|
1153
|
-
author_id: string;
|
|
1154
|
-
featured: boolean;
|
|
1155
|
-
name: string;
|
|
1156
|
-
version_number: string;
|
|
1157
|
-
changelog: string;
|
|
1158
|
-
changelog_url?: string | null;
|
|
1159
|
-
date_published: string;
|
|
1160
|
-
downloads: number;
|
|
1161
|
-
version_type: VersionType;
|
|
1162
|
-
status: VersionStatus;
|
|
1163
|
-
requested_status?: VersionStatus | null;
|
|
1164
|
-
files: VersionFile[];
|
|
1165
|
-
dependencies: Dependency[];
|
|
1166
|
-
game_versions: string[];
|
|
1167
|
-
loaders: string[];
|
|
1168
|
-
};
|
|
1169
|
-
interface GetProjectVersionsParams {
|
|
1170
|
-
game_versions?: string[];
|
|
1171
|
-
loaders?: string[];
|
|
1172
|
-
include_changelog?: boolean;
|
|
1173
|
-
limit?: number;
|
|
1174
|
-
offset?: number;
|
|
1175
|
-
}
|
|
1176
|
-
}
|
|
1177
|
-
namespace v3 {
|
|
1178
|
-
export type FlameProject = {
|
|
1179
|
-
id: number;
|
|
1180
|
-
title: string;
|
|
1181
|
-
url: string;
|
|
1182
|
-
icon_url: string;
|
|
1183
|
-
};
|
|
1184
|
-
export type DependencyAttribution = {
|
|
1185
|
-
flame_project?: FlameProject;
|
|
1186
|
-
resolution?: DependencyAttributionResolution;
|
|
1187
|
-
};
|
|
1188
|
-
export type DependencyAttributionResolution = {
|
|
1189
|
-
kind: 'license';
|
|
1190
|
-
license: Labrinth.Attribution.Internal.AttributionLicense;
|
|
1191
|
-
link_to_work: string;
|
|
1192
|
-
} | {
|
|
1193
|
-
kind: 'globally_allowed';
|
|
1194
|
-
link_to_work: string;
|
|
1195
|
-
} | {
|
|
1196
|
-
kind: 'my_project';
|
|
1197
|
-
license: Labrinth.Attribution.Internal.AttributionLicense;
|
|
1198
|
-
} | {
|
|
1199
|
-
kind: 'special_permissions';
|
|
1200
|
-
link_to_work: string;
|
|
1201
|
-
} | {
|
|
1202
|
-
kind: 'no_permission';
|
|
1203
|
-
link_to_work?: string;
|
|
1204
|
-
};
|
|
1205
|
-
export interface Dependency {
|
|
1206
|
-
dependency_type: Labrinth.Versions.v2.DependencyType;
|
|
1207
|
-
project_id?: string;
|
|
1208
|
-
file_name?: string;
|
|
1209
|
-
version_id?: string;
|
|
1210
|
-
attribution?: DependencyAttribution;
|
|
1211
|
-
}
|
|
1212
|
-
export interface GetProjectVersionsParams {
|
|
1213
|
-
game_versions?: string[];
|
|
1214
|
-
loaders?: string[];
|
|
1215
|
-
include_changelog?: boolean;
|
|
1216
|
-
limit?: number;
|
|
1217
|
-
offset?: number;
|
|
1218
|
-
apiVersion?: 2 | 3;
|
|
1219
|
-
}
|
|
1220
|
-
export type VersionChannel = 'release' | 'beta' | 'alpha';
|
|
1221
|
-
export type FileType = 'required-resource-pack' | 'optional-resource-pack' | 'sources-jar' | 'dev-jar' | 'javadoc-jar' | 'signature' | 'unknown';
|
|
1222
|
-
export type FileHashType = 'sha512' | 'sha1';
|
|
1223
|
-
export type VersionFileHash = {
|
|
1224
|
-
[key in FileHashType]: string;
|
|
1225
|
-
};
|
|
1226
|
-
export interface VersionFile {
|
|
1227
|
-
id?: string;
|
|
1228
|
-
hashes: VersionFileHash;
|
|
1229
|
-
url: string;
|
|
1230
|
-
filename: string;
|
|
1231
|
-
primary: boolean;
|
|
1232
|
-
size: number;
|
|
1233
|
-
file_type?: FileType;
|
|
1234
|
-
}
|
|
1235
|
-
interface JavaServerVersion {
|
|
1236
|
-
/**
|
|
1237
|
-
* The version id of the modpack
|
|
1238
|
-
*/
|
|
1239
|
-
modpack: string;
|
|
1240
|
-
}
|
|
1241
|
-
export interface Version {
|
|
1242
|
-
name: string;
|
|
1243
|
-
version_number: string;
|
|
1244
|
-
changelog?: string;
|
|
1245
|
-
dependencies: Dependency[];
|
|
1246
|
-
game_versions: string[];
|
|
1247
|
-
version_type: VersionChannel;
|
|
1248
|
-
loaders: string[];
|
|
1249
|
-
featured: boolean;
|
|
1250
|
-
status: Labrinth.Versions.v2.VersionStatus;
|
|
1251
|
-
id: string;
|
|
1252
|
-
project_id: string;
|
|
1253
|
-
author_id: string;
|
|
1254
|
-
date_published: string;
|
|
1255
|
-
downloads: number;
|
|
1256
|
-
files: VersionFile[];
|
|
1257
|
-
files_missing_attribution?: string[];
|
|
1258
|
-
environment?: Labrinth.Projects.v3.Environment;
|
|
1259
|
-
mrpack_loaders?: string[];
|
|
1260
|
-
minecraft_java_server?: JavaServerVersion;
|
|
1261
|
-
}
|
|
1262
|
-
export interface DraftVersionFile {
|
|
1263
|
-
fileType?: FileType;
|
|
1264
|
-
file: File;
|
|
1265
|
-
}
|
|
1266
|
-
export type DraftVersion = Omit<Labrinth.Versions.v3.CreateVersionRequest, 'file_parts' | 'primary_file' | 'file_types'> & {
|
|
1267
|
-
existing_files?: VersionFile[];
|
|
1268
|
-
version_id?: string;
|
|
1269
|
-
environment?: Labrinth.Projects.v3.Environment;
|
|
1270
|
-
};
|
|
1271
|
-
export interface CreateVersionRequest {
|
|
1272
|
-
name: string;
|
|
1273
|
-
version_number: string;
|
|
1274
|
-
changelog: string;
|
|
1275
|
-
dependencies?: Array<{
|
|
1276
|
-
version_id?: string;
|
|
1277
|
-
project_id?: string;
|
|
1278
|
-
file_name?: string;
|
|
1279
|
-
dependency_type: Labrinth.Versions.v2.DependencyType;
|
|
1280
|
-
}>;
|
|
1281
|
-
game_versions: string[];
|
|
1282
|
-
version_type: 'release' | 'beta' | 'alpha';
|
|
1283
|
-
loaders: string[];
|
|
1284
|
-
featured?: boolean;
|
|
1285
|
-
status?: 'listed' | 'archived' | 'draft' | 'unlisted' | 'scheduled' | 'unknown';
|
|
1286
|
-
requested_status?: 'listed' | 'archived' | 'draft' | 'unlisted' | null;
|
|
1287
|
-
project_id: string;
|
|
1288
|
-
file_parts: string[];
|
|
1289
|
-
primary_file?: string;
|
|
1290
|
-
file_types?: Record<string, Labrinth.Versions.v3.FileType | null>;
|
|
1291
|
-
environment?: Labrinth.Projects.v3.Environment;
|
|
1292
|
-
mrpack_loaders?: string[];
|
|
1293
|
-
}
|
|
1294
|
-
export type ModifyVersionRequest = Partial<Omit<CreateVersionRequest, 'project_id' | 'file_parts' | 'primary_file' | 'file_types'>> & {
|
|
1295
|
-
file_types?: {
|
|
1296
|
-
algorithm: string;
|
|
1297
|
-
hash: string;
|
|
1298
|
-
file_type: Labrinth.Versions.v3.FileType | null;
|
|
1299
|
-
}[];
|
|
1300
|
-
};
|
|
1301
|
-
export type AddFilesToVersionRequest = {
|
|
1302
|
-
file_parts: string[];
|
|
1303
|
-
file_types?: Record<string, Labrinth.Versions.v3.FileType | null>;
|
|
1304
|
-
};
|
|
1305
|
-
export {};
|
|
1306
|
-
}
|
|
1307
|
-
}
|
|
1308
|
-
namespace Users {
|
|
1309
|
-
namespace Common {
|
|
1310
|
-
type Role = 'developer' | 'moderator' | 'admin';
|
|
1311
|
-
type AuthProvider = 'github' | 'discord' | 'microsoft' | 'gitlab' | 'google' | 'steam' | 'paypal';
|
|
1312
|
-
type UserPayoutData = {
|
|
1313
|
-
paypal_address?: string;
|
|
1314
|
-
paypal_country?: string;
|
|
1315
|
-
venmo_handle?: string;
|
|
1316
|
-
balance: number;
|
|
1317
|
-
};
|
|
1318
|
-
type ModerationNote = {
|
|
1319
|
-
notes: string;
|
|
1320
|
-
last_modified: string;
|
|
1321
|
-
created_at: string;
|
|
1322
|
-
last_author: string;
|
|
1323
|
-
user_rating: number;
|
|
1324
|
-
version: number;
|
|
1325
|
-
};
|
|
1326
|
-
}
|
|
1327
|
-
namespace v2 {
|
|
1328
|
-
type Role = Common.Role;
|
|
1329
|
-
type AuthProvider = Common.AuthProvider;
|
|
1330
|
-
type UserPayoutData = Common.UserPayoutData;
|
|
1331
|
-
type User = {
|
|
1332
|
-
id: string;
|
|
1333
|
-
username: string;
|
|
1334
|
-
name?: string;
|
|
1335
|
-
avatar_url?: string;
|
|
1336
|
-
bio?: string;
|
|
1337
|
-
created: string;
|
|
1338
|
-
role: Role;
|
|
1339
|
-
badges: number;
|
|
1340
|
-
auth_providers?: AuthProvider[];
|
|
1341
|
-
email?: string;
|
|
1342
|
-
email_verified?: boolean;
|
|
1343
|
-
has_password?: boolean;
|
|
1344
|
-
has_totp?: boolean;
|
|
1345
|
-
payout_data?: UserPayoutData;
|
|
1346
|
-
github_id?: number;
|
|
1347
|
-
};
|
|
1348
|
-
}
|
|
1349
|
-
namespace v3 {
|
|
1350
|
-
type Role = Common.Role;
|
|
1351
|
-
type AuthProvider = Common.AuthProvider;
|
|
1352
|
-
type UserPayoutData = Common.UserPayoutData;
|
|
1353
|
-
type Pride26CampaignDonation = {
|
|
1354
|
-
last_donated_at: string;
|
|
1355
|
-
has_badge: boolean;
|
|
1356
|
-
has_midas: boolean;
|
|
1357
|
-
};
|
|
1358
|
-
type UserCampaigns = {
|
|
1359
|
-
pride_26: Pride26CampaignDonation | null;
|
|
1360
|
-
};
|
|
1361
|
-
type User = {
|
|
1362
|
-
id: string;
|
|
1363
|
-
username: string;
|
|
1364
|
-
avatar_url?: string;
|
|
1365
|
-
bio?: string;
|
|
1366
|
-
created: string;
|
|
1367
|
-
role: Role;
|
|
1368
|
-
badges: number;
|
|
1369
|
-
campaigns: UserCampaigns;
|
|
1370
|
-
auth_providers?: AuthProvider[];
|
|
1371
|
-
email?: string;
|
|
1372
|
-
email_verified?: boolean;
|
|
1373
|
-
has_password?: boolean;
|
|
1374
|
-
has_totp?: boolean;
|
|
1375
|
-
payout_data?: UserPayoutData;
|
|
1376
|
-
stripe_customer_id?: string;
|
|
1377
|
-
allow_friend_requests?: boolean;
|
|
1378
|
-
moderation_notes?: Common.ModerationNote | null;
|
|
1379
|
-
github_id?: number;
|
|
1380
|
-
};
|
|
1381
|
-
type SearchUser = {
|
|
1382
|
-
id: string;
|
|
1383
|
-
username: string;
|
|
1384
|
-
avatar_url: string | null;
|
|
1385
|
-
};
|
|
1386
|
-
type AllProjectsResponse = {
|
|
1387
|
-
projects: Projects.v3.Project[];
|
|
1388
|
-
organizations: Record<string, Organizations.v3.Organization>;
|
|
1389
|
-
};
|
|
1390
|
-
}
|
|
1391
|
-
}
|
|
1392
|
-
namespace Friends {
|
|
1393
|
-
namespace v3 {
|
|
1394
|
-
type UserFriend = {
|
|
1395
|
-
id: string;
|
|
1396
|
-
friend_id: string;
|
|
1397
|
-
accepted: boolean;
|
|
1398
|
-
created: string;
|
|
1399
|
-
};
|
|
1400
|
-
}
|
|
1401
|
-
}
|
|
1402
|
-
namespace ServerPing {
|
|
1403
|
-
namespace Internal {
|
|
1404
|
-
type MinecraftJavaPingRequest = {
|
|
1405
|
-
address: string;
|
|
1406
|
-
timeout_ms?: number;
|
|
1407
|
-
};
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
namespace Tags {
|
|
1411
|
-
namespace v2 {
|
|
1412
|
-
interface Category {
|
|
1413
|
-
icon: string;
|
|
1414
|
-
name: string;
|
|
1415
|
-
project_type: string;
|
|
1416
|
-
header: string;
|
|
1417
|
-
}
|
|
1418
|
-
interface Loader {
|
|
1419
|
-
icon: string;
|
|
1420
|
-
name: string;
|
|
1421
|
-
supported_project_types: string[];
|
|
1422
|
-
}
|
|
1423
|
-
interface GameVersion {
|
|
1424
|
-
version: string;
|
|
1425
|
-
version_type: string;
|
|
1426
|
-
date: string;
|
|
1427
|
-
major: boolean;
|
|
1428
|
-
}
|
|
1429
|
-
interface DonationPlatform {
|
|
1430
|
-
short: string;
|
|
1431
|
-
name: string;
|
|
1432
|
-
}
|
|
1433
|
-
type LicenseText = {
|
|
1434
|
-
title: string;
|
|
1435
|
-
body: string;
|
|
1436
|
-
};
|
|
1437
|
-
}
|
|
1438
|
-
}
|
|
1439
|
-
namespace Teams {
|
|
1440
|
-
namespace v2 {
|
|
1441
|
-
type AddTeamMemberRequest = {
|
|
1442
|
-
user_id: string;
|
|
1443
|
-
role?: string;
|
|
1444
|
-
permissions?: number;
|
|
1445
|
-
organization_permissions?: number | null;
|
|
1446
|
-
payouts_split?: number;
|
|
1447
|
-
ordering?: number;
|
|
1448
|
-
};
|
|
1449
|
-
type EditTeamMemberRequest = {
|
|
1450
|
-
permissions?: number;
|
|
1451
|
-
organization_permissions?: number | null;
|
|
1452
|
-
role?: string;
|
|
1453
|
-
payouts_split?: number;
|
|
1454
|
-
ordering?: number;
|
|
1455
|
-
};
|
|
1456
|
-
type TransferOwnershipRequest = {
|
|
1457
|
-
user_id: string;
|
|
1458
|
-
};
|
|
1459
|
-
}
|
|
1460
|
-
}
|
|
1461
|
-
namespace Search {
|
|
1462
|
-
namespace v2 {
|
|
1463
|
-
interface ResultSearchProject {
|
|
1464
|
-
project_id: string;
|
|
1465
|
-
project_type: string;
|
|
1466
|
-
all_project_types: string[];
|
|
1467
|
-
slug: string | null;
|
|
1468
|
-
author: string;
|
|
1469
|
-
author_id: string | null;
|
|
1470
|
-
organization: string | null;
|
|
1471
|
-
organization_id: string | null;
|
|
1472
|
-
title: string;
|
|
1473
|
-
description: string;
|
|
1474
|
-
categories: string[];
|
|
1475
|
-
display_categories: string[];
|
|
1476
|
-
versions: string[];
|
|
1477
|
-
downloads: number;
|
|
1478
|
-
follows: number;
|
|
1479
|
-
icon_url: string;
|
|
1480
|
-
date_created: string;
|
|
1481
|
-
date_modified: string;
|
|
1482
|
-
latest_version: string;
|
|
1483
|
-
license: string;
|
|
1484
|
-
client_side: string;
|
|
1485
|
-
server_side: string;
|
|
1486
|
-
gallery: string[];
|
|
1487
|
-
featured_gallery: string | null;
|
|
1488
|
-
color: number | null;
|
|
1489
|
-
}
|
|
1490
|
-
interface SearchResults {
|
|
1491
|
-
hits: ResultSearchProject[];
|
|
1492
|
-
offset: number;
|
|
1493
|
-
limit: number;
|
|
1494
|
-
total_hits: number;
|
|
1495
|
-
}
|
|
1496
|
-
}
|
|
1497
|
-
namespace v3 {
|
|
1498
|
-
interface ResultSearchProject {
|
|
1499
|
-
version_id: string;
|
|
1500
|
-
project_id: string;
|
|
1501
|
-
project_types: string[];
|
|
1502
|
-
all_project_types: string[];
|
|
1503
|
-
slug: string | null;
|
|
1504
|
-
author: string;
|
|
1505
|
-
author_id: string | null;
|
|
1506
|
-
organization: string | null;
|
|
1507
|
-
organization_id: string | null;
|
|
1508
|
-
name: string;
|
|
1509
|
-
summary: string;
|
|
1510
|
-
categories: string[];
|
|
1511
|
-
display_categories: string[];
|
|
1512
|
-
downloads: number;
|
|
1513
|
-
follows: number;
|
|
1514
|
-
icon_url: string | null;
|
|
1515
|
-
date_created: string;
|
|
1516
|
-
date_modified: string;
|
|
1517
|
-
license: string;
|
|
1518
|
-
gallery: string[];
|
|
1519
|
-
featured_gallery: string | null;
|
|
1520
|
-
color: number | null;
|
|
1521
|
-
loaders: string[];
|
|
1522
|
-
project_loader_fields?: Record<string, unknown[]>;
|
|
1523
|
-
minecraft_server?: Projects.v3.MinecraftServer | null;
|
|
1524
|
-
minecraft_java_server?: Projects.v3.MinecraftJavaServer | null;
|
|
1525
|
-
minecraft_bedrock_server?: Projects.v3.MinecraftBedrockServer | null;
|
|
1526
|
-
minecraft_mod?: unknown | null;
|
|
1527
|
-
}
|
|
1528
|
-
interface SearchResults {
|
|
1529
|
-
hits: ResultSearchProject[];
|
|
1530
|
-
page: number;
|
|
1531
|
-
hits_per_page: number;
|
|
1532
|
-
total_hits: number;
|
|
1533
|
-
}
|
|
1534
|
-
}
|
|
1535
|
-
}
|
|
1536
|
-
namespace Threads {
|
|
1537
|
-
namespace v3 {
|
|
1538
|
-
type ThreadType = 'report' | 'project' | 'direct_message';
|
|
1539
|
-
type MessageBody = {
|
|
1540
|
-
type: 'text';
|
|
1541
|
-
body: string;
|
|
1542
|
-
private?: boolean;
|
|
1543
|
-
replying_to?: string;
|
|
1544
|
-
associated_images?: string[];
|
|
1545
|
-
} | {
|
|
1546
|
-
type: 'status_change';
|
|
1547
|
-
new_status: Projects.v2.ProjectStatus;
|
|
1548
|
-
old_status: Projects.v2.ProjectStatus;
|
|
1549
|
-
} | {
|
|
1550
|
-
type: 'tech_review';
|
|
1551
|
-
verdict: 'safe' | 'unsafe';
|
|
1552
|
-
} | {
|
|
1553
|
-
type: 'tech_review_entered';
|
|
1554
|
-
} | {
|
|
1555
|
-
type: 'tech_review_exited';
|
|
1556
|
-
} | {
|
|
1557
|
-
type: 'tech_review_exit_file_deleted';
|
|
1558
|
-
} | {
|
|
1559
|
-
type: 'thread_closure';
|
|
1560
|
-
} | {
|
|
1561
|
-
type: 'thread_reopen';
|
|
1562
|
-
} | {
|
|
1563
|
-
type: 'deleted';
|
|
1564
|
-
private?: boolean;
|
|
1565
|
-
};
|
|
1566
|
-
type ThreadMessage = {
|
|
1567
|
-
id: string | null;
|
|
1568
|
-
author_id: string | null;
|
|
1569
|
-
body: MessageBody;
|
|
1570
|
-
created: string;
|
|
1571
|
-
hide_identity: boolean;
|
|
1572
|
-
};
|
|
1573
|
-
type ThreadMember = {
|
|
1574
|
-
id: string;
|
|
1575
|
-
username: string;
|
|
1576
|
-
avatar_url: string;
|
|
1577
|
-
role: string;
|
|
1578
|
-
badges: number;
|
|
1579
|
-
created: string;
|
|
1580
|
-
bio?: string;
|
|
1581
|
-
};
|
|
1582
|
-
type Thread = {
|
|
1583
|
-
id: string;
|
|
1584
|
-
type: ThreadType;
|
|
1585
|
-
project_id: string | null;
|
|
1586
|
-
report_id: string | null;
|
|
1587
|
-
messages: ThreadMessage[];
|
|
1588
|
-
members: ThreadMember[];
|
|
1589
|
-
};
|
|
1590
|
-
type SendMessageRequest = {
|
|
1591
|
-
body: MessageBody;
|
|
1592
|
-
};
|
|
1593
|
-
}
|
|
1594
|
-
}
|
|
1595
|
-
namespace Reports {
|
|
1596
|
-
namespace v3 {
|
|
1597
|
-
type ItemType = 'project' | 'version' | 'user' | 'unknown';
|
|
1598
|
-
type Report = {
|
|
1599
|
-
id: string;
|
|
1600
|
-
report_type: string;
|
|
1601
|
-
item_id: string;
|
|
1602
|
-
item_type: ItemType;
|
|
1603
|
-
reporter: string;
|
|
1604
|
-
body: string;
|
|
1605
|
-
created: string;
|
|
1606
|
-
closed: boolean;
|
|
1607
|
-
thread_id: string;
|
|
1608
|
-
};
|
|
1609
|
-
type CreateReportRequest = {
|
|
1610
|
-
report_type: string;
|
|
1611
|
-
item_id: string;
|
|
1612
|
-
item_type: ItemType;
|
|
1613
|
-
body: string;
|
|
1614
|
-
uploaded_images?: string[];
|
|
1615
|
-
};
|
|
1616
|
-
type EditReportRequest = {
|
|
1617
|
-
body?: string;
|
|
1618
|
-
closed?: boolean;
|
|
1619
|
-
};
|
|
1620
|
-
type ListReportsParams = {
|
|
1621
|
-
count?: number;
|
|
1622
|
-
offset?: number;
|
|
1623
|
-
all?: boolean;
|
|
1624
|
-
};
|
|
1625
|
-
}
|
|
1626
|
-
}
|
|
1627
|
-
namespace Moderation {
|
|
1628
|
-
namespace Internal {
|
|
1629
|
-
type Ownership = {
|
|
1630
|
-
kind: 'user';
|
|
1631
|
-
id: string;
|
|
1632
|
-
name: string;
|
|
1633
|
-
icon_url: string | null;
|
|
1634
|
-
} | {
|
|
1635
|
-
kind: 'organization';
|
|
1636
|
-
id: string;
|
|
1637
|
-
name: string;
|
|
1638
|
-
icon_url: string | null;
|
|
1639
|
-
};
|
|
1640
|
-
type ProjectsSort = 'oldest' | 'newest' | 'most_external_deps' | 'least_external_deps';
|
|
1641
|
-
type ProjectsRequest = {
|
|
1642
|
-
count?: number;
|
|
1643
|
-
offset?: number;
|
|
1644
|
-
has_external_dependencies?: boolean;
|
|
1645
|
-
exclude_technical_review?: boolean;
|
|
1646
|
-
query?: string;
|
|
1647
|
-
project_type?: string;
|
|
1648
|
-
sort?: ProjectsSort;
|
|
1649
|
-
};
|
|
1650
|
-
type QueueProject = {
|
|
1651
|
-
id: string;
|
|
1652
|
-
slug: string | null;
|
|
1653
|
-
name: string;
|
|
1654
|
-
summary: string;
|
|
1655
|
-
icon_url: string | null;
|
|
1656
|
-
status: Projects.v2.ProjectStatus;
|
|
1657
|
-
requested_status: Projects.v2.ProjectStatus | null;
|
|
1658
|
-
queued: string | null;
|
|
1659
|
-
published: string;
|
|
1660
|
-
updated: string;
|
|
1661
|
-
project_types: string[];
|
|
1662
|
-
ownership: Ownership;
|
|
1663
|
-
external_dependencies_count: number;
|
|
1664
|
-
};
|
|
1665
|
-
type ProjectsResponse = {
|
|
1666
|
-
total: number;
|
|
1667
|
-
projects: QueueProject[];
|
|
1668
|
-
};
|
|
1669
|
-
type ProjectIdsResponse = {
|
|
1670
|
-
ids: string[];
|
|
1671
|
-
};
|
|
1672
|
-
type LockedByUser = {
|
|
1673
|
-
id: string;
|
|
1674
|
-
username: string;
|
|
1675
|
-
avatar_url?: string;
|
|
1676
|
-
};
|
|
1677
|
-
type LockStatusResponse = {
|
|
1678
|
-
locked: boolean;
|
|
1679
|
-
is_own_lock: boolean;
|
|
1680
|
-
locked_by?: LockedByUser;
|
|
1681
|
-
locked_at?: string;
|
|
1682
|
-
expires_at?: string;
|
|
1683
|
-
expired?: boolean;
|
|
1684
|
-
};
|
|
1685
|
-
type LockAcquireResponse = {
|
|
1686
|
-
success: boolean;
|
|
1687
|
-
is_own_lock: boolean;
|
|
1688
|
-
locked_by?: LockedByUser;
|
|
1689
|
-
locked_at?: string;
|
|
1690
|
-
expires_at?: string;
|
|
1691
|
-
expired?: boolean;
|
|
1692
|
-
};
|
|
1693
|
-
type ReleaseLockResponse = {
|
|
1694
|
-
success: boolean;
|
|
1695
|
-
};
|
|
1696
|
-
type ProjectJudgementStatus = ExternalProjects.Internal.ExternalLicenseStatus;
|
|
1697
|
-
type FlameJudgement = {
|
|
1698
|
-
type: 'flame';
|
|
1699
|
-
id: number;
|
|
1700
|
-
status: ProjectJudgementStatus;
|
|
1701
|
-
link: string;
|
|
1702
|
-
title: string;
|
|
1703
|
-
};
|
|
1704
|
-
type UnknownJudgement = {
|
|
1705
|
-
type: 'unknown';
|
|
1706
|
-
status: ProjectJudgementStatus;
|
|
1707
|
-
proof?: string;
|
|
1708
|
-
link?: string;
|
|
1709
|
-
title?: string;
|
|
1710
|
-
};
|
|
1711
|
-
type ProjectJudgement = FlameJudgement | UnknownJudgement;
|
|
1712
|
-
type ProjectJudgements = Record<string, ProjectJudgement>;
|
|
1713
|
-
}
|
|
1714
|
-
}
|
|
1715
|
-
namespace Notifications {
|
|
1716
|
-
namespace v2 {
|
|
1717
|
-
type NotificationAction = {
|
|
1718
|
-
title: string;
|
|
1719
|
-
action_route: [string, string];
|
|
1720
|
-
};
|
|
1721
|
-
type NotificationBody = {
|
|
1722
|
-
type: string;
|
|
1723
|
-
project_id?: string;
|
|
1724
|
-
version_id?: string;
|
|
1725
|
-
report_id?: string;
|
|
1726
|
-
thread_id?: string;
|
|
1727
|
-
message_id?: string;
|
|
1728
|
-
invited_by?: string;
|
|
1729
|
-
organization_id?: string;
|
|
1730
|
-
server_id?: string;
|
|
1731
|
-
server_name?: string;
|
|
1732
|
-
team_id?: string;
|
|
1733
|
-
role?: string;
|
|
1734
|
-
old_status?: string;
|
|
1735
|
-
new_status?: string;
|
|
1736
|
-
[key: string]: unknown;
|
|
1737
|
-
};
|
|
1738
|
-
type Notification = {
|
|
1739
|
-
id: string;
|
|
1740
|
-
user_id: string;
|
|
1741
|
-
type: string | null;
|
|
1742
|
-
title: string;
|
|
1743
|
-
text: string;
|
|
1744
|
-
link: string;
|
|
1745
|
-
read: boolean;
|
|
1746
|
-
created: string;
|
|
1747
|
-
actions: NotificationAction[];
|
|
1748
|
-
body: NotificationBody;
|
|
1749
|
-
};
|
|
1750
|
-
}
|
|
1751
|
-
}
|
|
1752
|
-
namespace Payouts {
|
|
1753
|
-
namespace v3 {
|
|
1754
|
-
type RevenueData = {
|
|
1755
|
-
time: number;
|
|
1756
|
-
revenue: string;
|
|
1757
|
-
creator_revenue: string;
|
|
1758
|
-
};
|
|
1759
|
-
type RevenueResponse = {
|
|
1760
|
-
all_time: string;
|
|
1761
|
-
all_time_available: string;
|
|
1762
|
-
data: RevenueData[];
|
|
1763
|
-
};
|
|
1764
|
-
}
|
|
1765
|
-
}
|
|
1766
|
-
namespace Limits {
|
|
1767
|
-
namespace v3 {
|
|
1768
|
-
type UserLimits = {
|
|
1769
|
-
current: number;
|
|
1770
|
-
max: number;
|
|
1771
|
-
};
|
|
1772
|
-
}
|
|
1773
|
-
}
|
|
1774
|
-
namespace Collections {
|
|
1775
|
-
type CollectionStatus = 'listed' | 'unlisted' | 'private' | 'rejected' | 'unknown';
|
|
1776
|
-
type Collection = {
|
|
1777
|
-
id: string;
|
|
1778
|
-
user: string;
|
|
1779
|
-
name: string;
|
|
1780
|
-
description: string | null;
|
|
1781
|
-
icon_url: string | null;
|
|
1782
|
-
color: number | null;
|
|
1783
|
-
status: CollectionStatus;
|
|
1784
|
-
created: string;
|
|
1785
|
-
updated: string;
|
|
1786
|
-
projects: string[];
|
|
1787
|
-
};
|
|
1788
|
-
type EditCollectionRequest = {
|
|
1789
|
-
name?: string;
|
|
1790
|
-
description?: string | null;
|
|
1791
|
-
status?: CollectionStatus;
|
|
1792
|
-
new_projects?: string[];
|
|
1793
|
-
};
|
|
1794
|
-
}
|
|
1795
|
-
namespace State {
|
|
1796
|
-
interface PayoutMethodInfo {
|
|
1797
|
-
id: string;
|
|
1798
|
-
type: string;
|
|
1799
|
-
name: string;
|
|
1800
|
-
image_logo_url: string | null;
|
|
1801
|
-
}
|
|
1802
|
-
interface GeneratedState {
|
|
1803
|
-
categories: Tags.v2.Category[];
|
|
1804
|
-
loaders: Tags.v2.Loader[];
|
|
1805
|
-
gameVersions: Tags.v2.GameVersion[];
|
|
1806
|
-
donationPlatforms: Tags.v2.DonationPlatform[];
|
|
1807
|
-
reportTypes: string[];
|
|
1808
|
-
muralBankDetails?: Record<string, {
|
|
1809
|
-
bankNames: string[];
|
|
1810
|
-
}>;
|
|
1811
|
-
tremendousIdMap?: Record<string, {
|
|
1812
|
-
name: string;
|
|
1813
|
-
image_url: string | null;
|
|
1814
|
-
}>;
|
|
1815
|
-
homePageProjects?: Projects.v2.Project[];
|
|
1816
|
-
homePageSearch?: Search.v2.SearchResults;
|
|
1817
|
-
homePageNotifs?: Search.v2.SearchResults;
|
|
1818
|
-
products?: Billing.Internal.Product[];
|
|
1819
|
-
countries: ISO3166.Country[];
|
|
1820
|
-
subdivisions: Record<string, ISO3166.Subdivision[]>;
|
|
1821
|
-
taxComplianceThresholds?: Record<string, number>;
|
|
1822
|
-
errors: unknown[];
|
|
1823
|
-
}
|
|
1824
|
-
}
|
|
1825
|
-
namespace ExternalProjects {
|
|
1826
|
-
namespace Internal {
|
|
1827
|
-
type ExternalLicenseStatus = 'yes' | 'with-attribution-and-source' | 'with-attribution' | 'no' | 'permanent-no' | 'unidentified';
|
|
1828
|
-
type LinkedFile = {
|
|
1829
|
-
name: string | null;
|
|
1830
|
-
sha1: string;
|
|
1831
|
-
};
|
|
1832
|
-
type ExternalProject = {
|
|
1833
|
-
id: number;
|
|
1834
|
-
title: string | null;
|
|
1835
|
-
status: ExternalLicenseStatus;
|
|
1836
|
-
link: string | null;
|
|
1837
|
-
exceptions: string | null;
|
|
1838
|
-
proof: string | null;
|
|
1839
|
-
flame_project_id: number | null;
|
|
1840
|
-
inserted_at: string | null;
|
|
1841
|
-
inserted_by: number | null;
|
|
1842
|
-
updated_at: string | null;
|
|
1843
|
-
updated_by: number | null;
|
|
1844
|
-
linked_files?: LinkedFile[];
|
|
1845
|
-
};
|
|
1846
|
-
type SearchRequest = {
|
|
1847
|
-
title?: string;
|
|
1848
|
-
flame_id?: number;
|
|
1849
|
-
};
|
|
1850
|
-
type UpdateLicenseRequest = {
|
|
1851
|
-
title?: string;
|
|
1852
|
-
status: ExternalLicenseStatus;
|
|
1853
|
-
link?: string;
|
|
1854
|
-
exceptions?: string;
|
|
1855
|
-
proof?: string;
|
|
1856
|
-
flame_project_id?: number;
|
|
1857
|
-
};
|
|
1858
|
-
type AddFileRequest = {
|
|
1859
|
-
hashes: string[];
|
|
1860
|
-
license_id: number;
|
|
1861
|
-
};
|
|
1862
|
-
}
|
|
1863
|
-
}
|
|
1864
|
-
namespace TechReview {
|
|
1865
|
-
namespace Internal {
|
|
1866
|
-
type SearchProjectsRequest = {
|
|
1867
|
-
limit?: number;
|
|
1868
|
-
page?: number;
|
|
1869
|
-
filter?: SearchProjectsFilter;
|
|
1870
|
-
sort_by?: SearchProjectsSort;
|
|
1871
|
-
};
|
|
1872
|
-
type SearchProjectsFilter = {
|
|
1873
|
-
project_type?: string[];
|
|
1874
|
-
replied_to?: 'replied' | 'unreplied';
|
|
1875
|
-
project_status?: string[];
|
|
1876
|
-
issue_type?: string[];
|
|
1877
|
-
};
|
|
1878
|
-
type SearchProjectsSort = 'created_asc' | 'created_desc' | 'severity_asc' | 'severity_desc';
|
|
1879
|
-
type UpdateIssueRequest = {
|
|
1880
|
-
detail_id: string;
|
|
1881
|
-
verdict: DelphiReportIssueStatus;
|
|
1882
|
-
};
|
|
1883
|
-
type UpdateIssueDetailRequest = {
|
|
1884
|
-
verdict: DelphiReportIssueStatus;
|
|
1885
|
-
};
|
|
1886
|
-
type UpdateGlobalIssueRequest = {
|
|
1887
|
-
detail_key: string;
|
|
1888
|
-
verdict: DelphiReportIssueStatus;
|
|
1889
|
-
};
|
|
1890
|
-
type SearchGlobalIssueDetailsRequest = {
|
|
1891
|
-
limit?: number;
|
|
1892
|
-
page?: number;
|
|
1893
|
-
query?: string | null;
|
|
1894
|
-
};
|
|
1895
|
-
type SearchGlobalIssueDetailsResponse = {
|
|
1896
|
-
total: number;
|
|
1897
|
-
traces: GlobalIssueDetail[];
|
|
1898
|
-
};
|
|
1899
|
-
type GetGlobalIssueDetailRequest = {
|
|
1900
|
-
detail_key: string;
|
|
1901
|
-
limit?: number;
|
|
1902
|
-
after_detail_id?: string | null;
|
|
1903
|
-
};
|
|
1904
|
-
type GetGlobalIssueDetailResponse = {
|
|
1905
|
-
trace: GlobalIssueDetail;
|
|
1906
|
-
next_after_detail_id: string | null;
|
|
1907
|
-
};
|
|
1908
|
-
type GlobalIssueDetail = {
|
|
1909
|
-
detail_key: string;
|
|
1910
|
-
verdict: DelphiReportIssueStatus;
|
|
1911
|
-
local_trace_count: number;
|
|
1912
|
-
local_traces: GlobalIssueDetailTrace[];
|
|
1913
|
-
};
|
|
1914
|
-
type GlobalIssueDetailTrace = {
|
|
1915
|
-
detail_id: string;
|
|
1916
|
-
issue_id: string;
|
|
1917
|
-
issue_type: string;
|
|
1918
|
-
project_id: string;
|
|
1919
|
-
project_slug: string | null;
|
|
1920
|
-
project_name: string;
|
|
1921
|
-
version_id: string;
|
|
1922
|
-
version_number: string;
|
|
1923
|
-
file_id: string;
|
|
1924
|
-
file_name: string;
|
|
1925
|
-
jar: string | null;
|
|
1926
|
-
file_path: string;
|
|
1927
|
-
severity: DelphiSeverity;
|
|
1928
|
-
local_status: DelphiReportIssueStatus;
|
|
1929
|
-
effective_status: DelphiReportIssueStatus;
|
|
1930
|
-
};
|
|
1931
|
-
type SubmitProjectRequest = {
|
|
1932
|
-
verdict: 'safe' | 'unsafe';
|
|
1933
|
-
message?: string;
|
|
1934
|
-
};
|
|
1935
|
-
type SearchResponse = {
|
|
1936
|
-
project_reports: ProjectReport[];
|
|
1937
|
-
projects: Record<string, ProjectModerationInfo>;
|
|
1938
|
-
threads: Record<string, Thread>;
|
|
1939
|
-
ownership: Record<string, Ownership>;
|
|
1940
|
-
};
|
|
1941
|
-
type ProjectModerationInfo = {
|
|
1942
|
-
id: string;
|
|
1943
|
-
thread_id: string;
|
|
1944
|
-
name: string;
|
|
1945
|
-
project_types: string[];
|
|
1946
|
-
icon_url: string | null;
|
|
1947
|
-
} & Projects.v3.Project;
|
|
1948
|
-
type ProjectReport = {
|
|
1949
|
-
project_id: string;
|
|
1950
|
-
max_severity: DelphiSeverity | null;
|
|
1951
|
-
versions: VersionReport[];
|
|
1952
|
-
};
|
|
1953
|
-
type VersionReport = {
|
|
1954
|
-
version_id: string;
|
|
1955
|
-
files: FileReport[];
|
|
1956
|
-
};
|
|
1957
|
-
type FileReport = {
|
|
1958
|
-
report_id: string;
|
|
1959
|
-
file_id: string;
|
|
1960
|
-
created: string;
|
|
1961
|
-
flag_reason: FlagReason;
|
|
1962
|
-
severity: DelphiSeverity;
|
|
1963
|
-
file_name: string;
|
|
1964
|
-
file_size: number;
|
|
1965
|
-
download_url: string;
|
|
1966
|
-
issues: FileIssue[];
|
|
1967
|
-
};
|
|
1968
|
-
type FileIssue = {
|
|
1969
|
-
id: string;
|
|
1970
|
-
report_id: string;
|
|
1971
|
-
issue_type: string;
|
|
1972
|
-
details: ReportIssueDetail[];
|
|
1973
|
-
};
|
|
1974
|
-
type ReportIssueDetail = {
|
|
1975
|
-
id: string;
|
|
1976
|
-
issue_id: string;
|
|
1977
|
-
key: string;
|
|
1978
|
-
jar: string | null;
|
|
1979
|
-
file_path: string;
|
|
1980
|
-
decompiled_source: string | null;
|
|
1981
|
-
data: Record<string, unknown>;
|
|
1982
|
-
severity: DelphiSeverity;
|
|
1983
|
-
local_status: DelphiReportIssueStatus | null;
|
|
1984
|
-
global_status: DelphiReportIssueStatus | null;
|
|
1985
|
-
status: DelphiReportIssueStatus;
|
|
1986
|
-
};
|
|
1987
|
-
type Ownership = {
|
|
1988
|
-
kind: 'user';
|
|
1989
|
-
id: string;
|
|
1990
|
-
name: string;
|
|
1991
|
-
icon_url?: string;
|
|
1992
|
-
} | {
|
|
1993
|
-
kind: 'organization';
|
|
1994
|
-
id: string;
|
|
1995
|
-
name: string;
|
|
1996
|
-
icon_url?: string;
|
|
1997
|
-
};
|
|
1998
|
-
type DBThread = {
|
|
1999
|
-
id: string;
|
|
2000
|
-
project_id?: string;
|
|
2001
|
-
report_id?: string;
|
|
2002
|
-
type_: ThreadType;
|
|
2003
|
-
messages: DBThreadMessage[];
|
|
2004
|
-
members: string[];
|
|
2005
|
-
};
|
|
2006
|
-
type DBThreadMessage = {
|
|
2007
|
-
id: string;
|
|
2008
|
-
thread_id: string;
|
|
2009
|
-
author_id?: string;
|
|
2010
|
-
body: MessageBody;
|
|
2011
|
-
created: string;
|
|
2012
|
-
hide_identity: boolean;
|
|
2013
|
-
};
|
|
2014
|
-
type MessageBody = {
|
|
2015
|
-
type: 'text';
|
|
2016
|
-
body: string;
|
|
2017
|
-
private?: boolean;
|
|
2018
|
-
replying_to?: string;
|
|
2019
|
-
associated_images?: string[];
|
|
2020
|
-
} | {
|
|
2021
|
-
type: 'status_change';
|
|
2022
|
-
new_status: Projects.v2.ProjectStatus;
|
|
2023
|
-
old_status: Projects.v2.ProjectStatus;
|
|
2024
|
-
} | {
|
|
2025
|
-
type: 'tech_review';
|
|
2026
|
-
verdict: 'safe' | 'unsafe';
|
|
2027
|
-
} | {
|
|
2028
|
-
type: 'tech_review_entered';
|
|
2029
|
-
} | {
|
|
2030
|
-
type: 'tech_review_exited';
|
|
2031
|
-
} | {
|
|
2032
|
-
type: 'tech_review_exit_file_deleted';
|
|
2033
|
-
} | {
|
|
2034
|
-
type: 'thread_closure';
|
|
2035
|
-
} | {
|
|
2036
|
-
type: 'thread_reopen';
|
|
2037
|
-
} | {
|
|
2038
|
-
type: 'deleted';
|
|
2039
|
-
private?: boolean;
|
|
2040
|
-
};
|
|
2041
|
-
type ThreadType = 'report' | 'project' | 'direct_message';
|
|
2042
|
-
type User = {
|
|
2043
|
-
id: string;
|
|
2044
|
-
username: string;
|
|
2045
|
-
avatar_url: string;
|
|
2046
|
-
role: string;
|
|
2047
|
-
badges: number;
|
|
2048
|
-
created: string;
|
|
2049
|
-
bio?: string;
|
|
2050
|
-
};
|
|
2051
|
-
type ThreadMessage = {
|
|
2052
|
-
id: string | null;
|
|
2053
|
-
author_id: string | null;
|
|
2054
|
-
body: MessageBody;
|
|
2055
|
-
created: string;
|
|
2056
|
-
hide_identity: boolean;
|
|
2057
|
-
};
|
|
2058
|
-
type Thread = {
|
|
2059
|
-
id: string;
|
|
2060
|
-
type: ThreadType;
|
|
2061
|
-
project_id: string | null;
|
|
2062
|
-
report_id: string | null;
|
|
2063
|
-
messages: ThreadMessage[];
|
|
2064
|
-
members: User[];
|
|
2065
|
-
};
|
|
2066
|
-
type FlagReason = 'delphi';
|
|
2067
|
-
type DelphiSeverity = 'low' | 'medium' | 'high' | 'severe';
|
|
2068
|
-
type DelphiReportIssueStatus = 'pending' | 'safe' | 'unsafe';
|
|
2069
|
-
type ProjectReportResponse = {
|
|
2070
|
-
project_report: ProjectReport | null;
|
|
2071
|
-
thread: Thread;
|
|
2072
|
-
};
|
|
2073
|
-
}
|
|
2074
|
-
}
|
|
2075
|
-
namespace Pats {
|
|
2076
|
-
namespace v2 {
|
|
2077
|
-
type PersonalAccessToken = {
|
|
2078
|
-
id: string;
|
|
2079
|
-
name: string;
|
|
2080
|
-
access_token: string | null;
|
|
2081
|
-
scopes: number;
|
|
2082
|
-
user_id: string;
|
|
2083
|
-
created: string;
|
|
2084
|
-
expires: string;
|
|
2085
|
-
last_used: string | null;
|
|
2086
|
-
};
|
|
2087
|
-
type CreatePatRequest = {
|
|
2088
|
-
scopes: number;
|
|
2089
|
-
name: string;
|
|
2090
|
-
expires: string;
|
|
2091
|
-
};
|
|
2092
|
-
type ModifyPatRequest = {
|
|
2093
|
-
scopes?: number;
|
|
2094
|
-
name?: string;
|
|
2095
|
-
expires?: string;
|
|
2096
|
-
};
|
|
2097
|
-
}
|
|
2098
|
-
}
|
|
2099
|
-
namespace Sessions {
|
|
2100
|
-
namespace v2 {
|
|
2101
|
-
type Session = {
|
|
2102
|
-
id: string;
|
|
2103
|
-
session: string | null;
|
|
2104
|
-
user_id: string;
|
|
2105
|
-
created: string;
|
|
2106
|
-
last_login: string;
|
|
2107
|
-
expires: string;
|
|
2108
|
-
refresh_expires: string;
|
|
2109
|
-
os: string | null;
|
|
2110
|
-
platform: string | null;
|
|
2111
|
-
user_agent: string;
|
|
2112
|
-
city: string | null;
|
|
2113
|
-
country: string | null;
|
|
2114
|
-
ip: string;
|
|
2115
|
-
current: boolean;
|
|
2116
|
-
};
|
|
2117
|
-
}
|
|
2118
|
-
}
|
|
2119
|
-
}
|