@modrinth/api-client 0.30.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.
Files changed (105) hide show
  1. package/dist/index.d.ts +7103 -28
  2. package/dist/index.js +1 -0
  3. package/dist/index.js.map +7 -0
  4. package/package.json +4 -2
  5. package/dist/core/abstract-client.d.ts +0 -163
  6. package/dist/core/abstract-feature.d.ts +0 -72
  7. package/dist/core/abstract-module.d.ts +0 -10
  8. package/dist/core/abstract-sync.d.ts +0 -61
  9. package/dist/core/abstract-upload-client.d.ts +0 -20
  10. package/dist/core/abstract-websocket.d.ts +0 -52
  11. package/dist/core/errors.d.ts +0 -48
  12. package/dist/features/auth.d.ts +0 -47
  13. package/dist/features/circuit-breaker.d.ts +0 -139
  14. package/dist/features/node-auth.d.ts +0 -58
  15. package/dist/features/panel-version.d.ts +0 -7
  16. package/dist/features/retry.d.ts +0 -87
  17. package/dist/features/verbose-logging.d.ts +0 -6
  18. package/dist/modules/archon/actions/v1.d.ts +0 -10
  19. package/dist/modules/archon/backups/v1.d.ts +0 -44
  20. package/dist/modules/archon/backups-queue/v1.d.ts +0 -25
  21. package/dist/modules/archon/content/v1.d.ts +0 -48
  22. package/dist/modules/archon/index.d.ts +0 -8
  23. package/dist/modules/archon/nodes/internal.d.ts +0 -10
  24. package/dist/modules/archon/notices/v0.d.ts +0 -38
  25. package/dist/modules/archon/options/v1.d.ts +0 -9
  26. package/dist/modules/archon/properties/v1.d.ts +0 -9
  27. package/dist/modules/archon/server-users/v1.d.ts +0 -30
  28. package/dist/modules/archon/servers/v0.d.ts +0 -122
  29. package/dist/modules/archon/servers/v1.d.ts +0 -30
  30. package/dist/modules/archon/transfers/internal.d.ts +0 -25
  31. package/dist/modules/archon/types.d.ts +0 -941
  32. package/dist/modules/index.d.ts +0 -181
  33. package/dist/modules/iso3166/index.d.ts +0 -24
  34. package/dist/modules/iso3166/types.d.ts +0 -21
  35. package/dist/modules/kyros/content/v1.d.ts +0 -23
  36. package/dist/modules/kyros/files/v0.d.ts +0 -123
  37. package/dist/modules/kyros/logs/v1.d.ts +0 -6
  38. package/dist/modules/kyros/types.d.ts +0 -44
  39. package/dist/modules/kyros/upload-sessions/v1.d.ts +0 -18
  40. package/dist/modules/labrinth/affiliate/internal.d.ts +0 -30
  41. package/dist/modules/labrinth/analytics/v3.d.ts +0 -56
  42. package/dist/modules/labrinth/attribution/internal.d.ts +0 -47
  43. package/dist/modules/labrinth/auth/internal.d.ts +0 -19
  44. package/dist/modules/labrinth/auth/v2.d.ts +0 -98
  45. package/dist/modules/labrinth/billing/internal.d.ts +0 -65
  46. package/dist/modules/labrinth/campaign/internal.d.ts +0 -10
  47. package/dist/modules/labrinth/collections.d.ts +0 -80
  48. package/dist/modules/labrinth/content/v3.d.ts +0 -6
  49. package/dist/modules/labrinth/external-projects/internal.d.ts +0 -9
  50. package/dist/modules/labrinth/friends/v3.d.ts +0 -23
  51. package/dist/modules/labrinth/globals/internal.d.ts +0 -11
  52. package/dist/modules/labrinth/images/v3.d.ts +0 -7
  53. package/dist/modules/labrinth/index.d.ts +0 -31
  54. package/dist/modules/labrinth/limits/v3.d.ts +0 -17
  55. package/dist/modules/labrinth/moderation/internal.d.ts +0 -12
  56. package/dist/modules/labrinth/notifications/v2.d.ts +0 -73
  57. package/dist/modules/labrinth/oauth/internal.d.ts +0 -97
  58. package/dist/modules/labrinth/organizations/v3.d.ts +0 -66
  59. package/dist/modules/labrinth/pats/v2.d.ts +0 -31
  60. package/dist/modules/labrinth/payout/v3.d.ts +0 -30
  61. package/dist/modules/labrinth/payouts/v3.d.ts +0 -15
  62. package/dist/modules/labrinth/projects/v2.d.ts +0 -169
  63. package/dist/modules/labrinth/projects/v3.d.ts +0 -110
  64. package/dist/modules/labrinth/reports/v3.d.ts +0 -81
  65. package/dist/modules/labrinth/server-ping/internal.d.ts +0 -10
  66. package/dist/modules/labrinth/sessions/v2.d.ts +0 -17
  67. package/dist/modules/labrinth/state/index.d.ts +0 -17
  68. package/dist/modules/labrinth/tags/v2.d.ts +0 -19
  69. package/dist/modules/labrinth/teams/v2.d.ts +0 -57
  70. package/dist/modules/labrinth/teams/v3.d.ts +0 -18
  71. package/dist/modules/labrinth/tech-review/internal.d.ts +0 -77
  72. package/dist/modules/labrinth/threads/v3.d.ts +0 -57
  73. package/dist/modules/labrinth/types.d.ts +0 -2118
  74. package/dist/modules/labrinth/users/v2.d.ts +0 -101
  75. package/dist/modules/labrinth/users/v3.d.ts +0 -37
  76. package/dist/modules/labrinth/versions/v2.d.ts +0 -75
  77. package/dist/modules/labrinth/versions/v3.d.ts +0 -123
  78. package/dist/modules/launcher-meta/types.d.ts +0 -25
  79. package/dist/modules/launcher-meta/v0.d.ts +0 -17
  80. package/dist/modules/mclogs/insights/v1.d.ts +0 -6
  81. package/dist/modules/mclogs/logs/v1.d.ts +0 -6
  82. package/dist/modules/mclogs/types.d.ts +0 -60
  83. package/dist/modules/paper/types.d.ts +0 -22
  84. package/dist/modules/paper/v3.d.ts +0 -19
  85. package/dist/modules/purpur/types.d.ts +0 -15
  86. package/dist/modules/purpur/v2.d.ts +0 -16
  87. package/dist/modules/types.d.ts +0 -8
  88. package/dist/platform/generic.d.ts +0 -28
  89. package/dist/platform/nuxt.d.ts +0 -88
  90. package/dist/platform/sync-generic.d.ts +0 -16
  91. package/dist/platform/tauri.d.ts +0 -35
  92. package/dist/platform/websocket-generic.d.ts +0 -16
  93. package/dist/platform/xhr-upload-client.d.ts +0 -15
  94. package/dist/state/node-auth.d.ts +0 -36
  95. package/dist/types/client.d.ts +0 -70
  96. package/dist/types/errors.d.ts +0 -43
  97. package/dist/types/index.d.ts +0 -10
  98. package/dist/types/request.d.ts +0 -124
  99. package/dist/types/upload.d.ts +0 -92
  100. package/dist/utils/fetch.d.ts +0 -4
  101. package/dist/utils/jwt-retry.d.ts +0 -5
  102. package/dist/utils/node-url.d.ts +0 -2
  103. package/dist/utils/pingtest.d.ts +0 -8
  104. package/dist/utils/sse.d.ts +0 -24
  105. package/dist/utils/types.d.ts +0 -2
@@ -1,30 +0,0 @@
1
- import { AbstractModule } from '../../../core/abstract-module';
2
- import type { Labrinth } from '../types';
3
- export declare class LabrinthPayoutV3Module extends AbstractModule {
4
- getModuleID(): string;
5
- /**
6
- * Get the authenticated user's payout balance
7
- *
8
- * @returns Promise resolving to the user's payout balance
9
- */
10
- getBalance(): Promise<Labrinth.Payout.v3.PayoutBalance>;
11
- /**
12
- * Get the authenticated user's transaction history (withdrawals and payouts)
13
- *
14
- * @returns Promise resolving to an array of transaction items
15
- */
16
- getHistory(): Promise<Labrinth.Payout.v3.TransactionItem[]>;
17
- /**
18
- * Get available payout methods, optionally filtered by country
19
- *
20
- * @param country - Optional ISO country code to filter methods by supported countries
21
- * @returns Promise resolving to an array of payout methods
22
- */
23
- getMethods(country?: string): Promise<Labrinth.Payout.v3.PayoutMethod[]>;
24
- /**
25
- * Cancel a pending payout
26
- *
27
- * @param id - The payout ID to cancel
28
- */
29
- cancel(id: string): Promise<void>;
30
- }
@@ -1,15 +0,0 @@
1
- import { AbstractModule } from '../../../core/abstract-module.js';
2
- import type { Labrinth } from '../types';
3
- export declare class LabrinthPayoutsV3Module extends AbstractModule {
4
- getModuleID(): string;
5
- /**
6
- * Get platform revenue data.
7
- *
8
- * @param params - Optional start/end date filters
9
- * @returns Promise resolving to platform revenue data
10
- */
11
- getPlatformRevenue(params?: {
12
- start?: string;
13
- end?: string;
14
- }): Promise<Labrinth.Payouts.v3.RevenueResponse>;
15
- }
@@ -1,169 +0,0 @@
1
- import { AbstractModule } from '../../../core/abstract-module';
2
- import type { Labrinth } from '../types';
3
- export declare class LabrinthProjectsV2Module extends AbstractModule {
4
- getModuleID(): string;
5
- /**
6
- * Get a project by ID or slug
7
- *
8
- * @param id - Project ID or slug (e.g., 'sodium' or 'AANobbMI')
9
- * @returns Promise resolving to the project data
10
- *
11
- * @example
12
- * ```typescript
13
- * const project = await client.labrinth.projects_v2.get('sodium')
14
- * console.log(project.title) // "Sodium"
15
- * ```
16
- */
17
- get(id: string): Promise<Labrinth.Projects.v2.Project>;
18
- /**
19
- * Check that a project slug or ID exists and return its canonical project ID.
20
- *
21
- * @param idOrSlug - Project ID or slug (e.g. `sodium` or `AANobbMI`)
22
- */
23
- check(idOrSlug: string): Promise<Labrinth.Projects.v2.ProjectCheckResponse>;
24
- /**
25
- * Get multiple projects by IDs
26
- *
27
- * @param ids - Array of project IDs or slugs
28
- * @returns Promise resolving to array of projects
29
- *
30
- * @example
31
- * ```typescript
32
- * const projects = await client.labrinth.projects_v2.getMultiple(['sodium', 'lithium', 'phosphor'])
33
- * ```
34
- */
35
- getMultiple(ids: string[]): Promise<Labrinth.Projects.v2.Project[]>;
36
- /**
37
- * Search projects
38
- *
39
- * @param params - Search parameters (query, facets, filters, etc.)
40
- * @returns Promise resolving to search results
41
- *
42
- * @example
43
- * ```typescript
44
- * const results = await client.labrinth.projects_v2.search({
45
- * query: 'optimization',
46
- * facets: [['categories:optimization'], ['project_type:mod']],
47
- * limit: 20
48
- * })
49
- * ```
50
- */
51
- search(params: Labrinth.Projects.v2.ProjectSearchParams): Promise<Labrinth.Projects.v2.SearchResult>;
52
- /**
53
- * Edit a project
54
- *
55
- * @param id - Project ID or slug
56
- * @param data - Project update data
57
- *
58
- * @example
59
- * ```typescript
60
- * await client.labrinth.projects_v2.edit('sodium', {
61
- * description: 'Updated description'
62
- * })
63
- * ```
64
- */
65
- edit(id: string, data: Partial<Labrinth.Projects.v2.Project>): Promise<void>;
66
- /**
67
- * Delete a project
68
- *
69
- * @param id - Project ID or slug
70
- *
71
- * @example
72
- * ```typescript
73
- * await client.labrinth.projects_v2.delete('my-project')
74
- * ```
75
- */
76
- delete(id: string): Promise<void>;
77
- /**
78
- * Get dependencies for a project
79
- *
80
- * @param id - Project ID or slug
81
- * @returns Promise resolving to dependency info (projects and versions)
82
- *
83
- * @example
84
- * ```typescript
85
- * const deps = await client.labrinth.projects_v2.getDependencies('sodium')
86
- * console.log(deps.projects) // dependent projects
87
- * console.log(deps.versions) // dependent versions
88
- * ```
89
- */
90
- getDependencies(id: string): Promise<Labrinth.Projects.v2.DependencyInfo>;
91
- /**
92
- * Create a gallery image for a project
93
- *
94
- * @param id - Project ID or slug
95
- * @param file - Image file to upload
96
- * @param options - Gallery image options
97
- *
98
- * @example
99
- * ```typescript
100
- * await client.labrinth.projects_v2.createGalleryImage('sodium', imageFile, {
101
- * featured: true,
102
- * title: 'Screenshot 1',
103
- * description: 'Main menu with Sodium enabled'
104
- * })
105
- * ```
106
- */
107
- createGalleryImage(id: string, file: Blob, options: {
108
- ext: string;
109
- featured: boolean;
110
- title?: string;
111
- description?: string;
112
- ordering?: number;
113
- }): Promise<void>;
114
- /**
115
- * Edit a gallery image for a project
116
- *
117
- * @param id - Project ID or slug
118
- * @param url - URL of the existing gallery image to edit
119
- * @param options - Gallery image options to update
120
- *
121
- * @example
122
- * ```typescript
123
- * await client.labrinth.projects_v2.editGalleryImage('sodium', 'https://cdn.modrinth.com/...', {
124
- * featured: false,
125
- * title: 'Updated title'
126
- * })
127
- * ```
128
- */
129
- editGalleryImage(id: string, url: string, options: {
130
- featured: boolean;
131
- title?: string;
132
- description?: string;
133
- ordering?: number;
134
- }): Promise<void>;
135
- /**
136
- * Delete a gallery image from a project
137
- *
138
- * @param id - Project ID or slug
139
- * @param url - URL of the gallery image to delete
140
- *
141
- * @example
142
- * ```typescript
143
- * await client.labrinth.projects_v2.deleteGalleryImage('sodium', 'https://cdn.modrinth.com/...')
144
- * ```
145
- */
146
- deleteGalleryImage(id: string, url: string): Promise<void>;
147
- /**
148
- * Get random projects
149
- *
150
- * @param count - Number of random projects to return
151
- * @returns Promise resolving to an array of random projects
152
- */
153
- getRandom(count: number): Promise<Labrinth.Projects.v2.Project[]>;
154
- /**
155
- * Bulk edit multiple projects at once
156
- *
157
- * @param ids - Array of project IDs to edit
158
- * @param data - Fields to update across all specified projects
159
- *
160
- * @example
161
- * ```typescript
162
- * await client.labrinth.projects_v2.bulkEdit(['id1', 'id2'], {
163
- * issues_url: 'https://github.com/issues',
164
- * source_url: null,
165
- * })
166
- * ```
167
- */
168
- bulkEdit(ids: string[], data: Labrinth.Projects.v2.BulkEditProjectRequest): Promise<void>;
169
- }
@@ -1,110 +0,0 @@
1
- import { AbstractModule } from '../../../core/abstract-module';
2
- import type { Labrinth } from '../types';
3
- export declare class LabrinthProjectsV3Module extends AbstractModule {
4
- getModuleID(): string;
5
- /**
6
- * Get a project by ID or slug (v3)
7
- *
8
- * @param id - Project ID or slug (e.g., 'sodium' or 'AANobbMI')
9
- * @returns Promise resolving to the v3 project data
10
- *
11
- * @example
12
- * ```typescript
13
- * const project = await client.labrinth.projects_v3.get('sodium')
14
- * console.log(project.project_types) // v3 field
15
- * ```
16
- */
17
- get(id: string): Promise<Labrinth.Projects.v3.Project>;
18
- /**
19
- * Get a project's dependencies (v3)
20
- *
21
- * Returns all projects and versions that are dependencies of this project's versions.
22
- *
23
- * @param id - Project ID or slug
24
- * @returns Promise resolving to dependency data with projects and versions
25
- *
26
- * @example
27
- * ```typescript
28
- * const deps = await client.labrinth.projects_v3.getDependencies('sodium')
29
- * console.log(deps.projects) // Array of project objects
30
- * console.log(deps.versions) // Array of version objects
31
- * ```
32
- */
33
- getDependencies(id: string): Promise<Labrinth.Projects.v3.ProjectDependencies>;
34
- /**
35
- * Get multiple projects by IDs (v3)
36
- *
37
- * @param ids - Array of project IDs or slugs
38
- * @returns Promise resolving to array of v3 projects
39
- *
40
- * @example
41
- * ```typescript
42
- * const projects = await client.labrinth.projects_v3.getMultiple(['sodium', 'lithium'])
43
- * ```
44
- */
45
- getMultiple(ids: string[]): Promise<Labrinth.Projects.v3.Project[]>;
46
- /**
47
- * Edit a project (v3)
48
- *
49
- * @param id - Project ID or slug
50
- * @param data - Project update data (v3 fields)
51
- *
52
- * @example
53
- * ```typescript
54
- * await client.labrinth.projects_v3.edit('sodium', {
55
- * environment: 'client_and_server'
56
- * })
57
- * ```
58
- */
59
- edit(id: string, data: Labrinth.Projects.v3.EditProjectRequest): Promise<void>;
60
- /**
61
- * Get the organization that owns a project
62
- *
63
- * @param id - Project ID or slug
64
- * @returns Promise resolving to the organization data, or null if the project is not owned by an organization
65
- */
66
- getOrganization(id: string): Promise<Labrinth.Projects.v3.Organization | null>;
67
- /**
68
- * Get the team members of a project
69
- *
70
- * @param id - Project ID or slug
71
- * @returns Promise resolving to an array of team members
72
- */
73
- getMembers(id: string): Promise<Labrinth.Projects.v3.TeamMember[]>;
74
- createServerProject(data: Labrinth.Projects.v3.CreateServerProjectRequest): Promise<Labrinth.Projects.v3.Project>;
75
- /**
76
- * Delete a project
77
- *
78
- * @param id - Project ID or slug
79
- *
80
- * @example
81
- * ```typescript
82
- * await client.labrinth.projects_v3.deleteProject('my-project')
83
- * ```
84
- */
85
- deleteProject(id: string): Promise<void>;
86
- /**
87
- * Change the icon of a project
88
- *
89
- * @param id - Project ID or slug
90
- * @param file - Image file to upload
91
- * @param ext - File extension (e.g., 'png', 'jpeg', 'gif', 'webp')
92
- *
93
- * @example
94
- * ```typescript
95
- * await client.labrinth.projects_v3.changeIcon('sodium', imageFile, 'png')
96
- * ```
97
- */
98
- changeIcon(id: string, file: Blob, ext: string): Promise<void>;
99
- /**
100
- * Delete the icon of a project
101
- *
102
- * @param id - Project ID or slug
103
- *
104
- * @example
105
- * ```typescript
106
- * await client.labrinth.projects_v3.deleteIcon('sodium')
107
- * ```
108
- */
109
- deleteIcon(id: string): Promise<void>;
110
- }
@@ -1,81 +0,0 @@
1
- import { AbstractModule } from '../../../core/abstract-module';
2
- import type { Labrinth } from '../types';
3
- export declare class LabrinthReportsV3Module extends AbstractModule {
4
- getModuleID(): string;
5
- /**
6
- * Get a report by ID
7
- *
8
- * @param id - Report ID
9
- * @returns Promise resolving to the report data
10
- *
11
- * @example
12
- * ```typescript
13
- * const report = await client.labrinth.reports_v3.get('abc123')
14
- * ```
15
- */
16
- get(id: string): Promise<Labrinth.Reports.v3.Report>;
17
- /**
18
- * List reports for the current user (or all reports if moderator)
19
- *
20
- * @param params - Optional query parameters for count, offset, and whether to show all reports
21
- * @returns Promise resolving to an array of reports
22
- *
23
- * @example
24
- * ```typescript
25
- * const reports = await client.labrinth.reports_v3.list({ count: 100 })
26
- * ```
27
- */
28
- list(params?: Labrinth.Reports.v3.ListReportsParams): Promise<Labrinth.Reports.v3.Report[]>;
29
- /**
30
- * Get multiple reports by IDs
31
- *
32
- * @param ids - Array of report IDs
33
- * @returns Promise resolving to an array of reports
34
- *
35
- * @example
36
- * ```typescript
37
- * const reports = await client.labrinth.reports_v3.getMultiple(['id1', 'id2'])
38
- * ```
39
- */
40
- getMultiple(ids: string[]): Promise<Labrinth.Reports.v3.Report[]>;
41
- /**
42
- * Create a new report
43
- *
44
- * @param data - Report creation data
45
- * @returns Promise resolving to the created report
46
- *
47
- * @example
48
- * ```typescript
49
- * const report = await client.labrinth.reports_v3.create({
50
- * report_type: 'spam',
51
- * item_id: 'project123',
52
- * item_type: 'project',
53
- * body: 'This project is spam',
54
- * })
55
- * ```
56
- */
57
- create(data: Labrinth.Reports.v3.CreateReportRequest): Promise<Labrinth.Reports.v3.Report>;
58
- /**
59
- * Edit a report
60
- *
61
- * @param id - Report ID
62
- * @param data - Report edit data
63
- *
64
- * @example
65
- * ```typescript
66
- * await client.labrinth.reports_v3.edit('abc123', { closed: true })
67
- * ```
68
- */
69
- edit(id: string, data: Labrinth.Reports.v3.EditReportRequest): Promise<void>;
70
- /**
71
- * Delete a report (moderator only)
72
- *
73
- * @param id - Report ID
74
- *
75
- * @example
76
- * ```typescript
77
- * await client.labrinth.reports_v3.delete('abc123')
78
- * ```
79
- */
80
- delete(id: string): Promise<void>;
81
- }
@@ -1,10 +0,0 @@
1
- import { AbstractModule } from '../../../core/abstract-module';
2
- import type { Labrinth } from '../types';
3
- export declare class LabrinthServerPingInternalModule extends AbstractModule {
4
- getModuleID(): string;
5
- /**
6
- * Ping a Minecraft Java server
7
- * POST /_internal/server-ping/minecraft-java
8
- */
9
- pingMinecraftJava(request: Labrinth.ServerPing.Internal.MinecraftJavaPingRequest): Promise<void>;
10
- }
@@ -1,17 +0,0 @@
1
- import { AbstractModule } from '../../../core/abstract-module';
2
- import type { Labrinth } from '../types';
3
- export declare class LabrinthSessionsV2Module extends AbstractModule {
4
- getModuleID(): string;
5
- /**
6
- * List all sessions for the authenticated user
7
- *
8
- * @returns Promise resolving to an array of sessions
9
- */
10
- list(): Promise<Labrinth.Sessions.v2.Session[]>;
11
- /**
12
- * Delete (revoke) a session
13
- *
14
- * @param id - The session ID
15
- */
16
- delete(id: string): Promise<void>;
17
- }
@@ -1,17 +0,0 @@
1
- import { AbstractModule } from '../../../core/abstract-module';
2
- import type { Labrinth } from '../types';
3
- export declare class LabrinthStateModule extends AbstractModule {
4
- getModuleID(): string;
5
- /**
6
- * Build the complete generated state by fetching from multiple endpoints
7
- *
8
- * @returns Promise resolving to the generated state containing categories, loaders, products, etc.
9
- *
10
- * @example
11
- * ```typescript
12
- * const state = await client.labrinth.state.build()
13
- * console.log(state.products) // Available billing products
14
- * ```
15
- */
16
- build(): Promise<Labrinth.State.GeneratedState>;
17
- }
@@ -1,19 +0,0 @@
1
- import { AbstractModule } from '../../../core/abstract-module';
2
- import type { Labrinth } from '../types';
3
- export declare class LabrinthTagsV2Module extends AbstractModule {
4
- getModuleID(): string;
5
- /**
6
- * Get license text by SPDX identifier
7
- *
8
- * @param licenseId - SPDX license identifier (e.g., 'MIT', 'Apache-2.0')
9
- * @returns Promise resolving to the license title and body text
10
- *
11
- * @example
12
- * ```typescript
13
- * const license = await client.labrinth.tags_v2.getLicenseText('MIT')
14
- * console.log(license.title) // "MIT License"
15
- * console.log(license.body) // full license text
16
- * ```
17
- */
18
- getLicenseText(licenseId: string): Promise<Labrinth.Tags.v2.LicenseText>;
19
- }
@@ -1,57 +0,0 @@
1
- import { AbstractModule } from '../../../core/abstract-module';
2
- import type { Labrinth } from '../types';
3
- export declare class LabrinthTeamsV2Module extends AbstractModule {
4
- getModuleID(): string;
5
- /**
6
- * Add a member to a team
7
- *
8
- * @param teamId - Team ID
9
- * @param data - New member data including user_id
10
- *
11
- * @example
12
- * ```typescript
13
- * await client.labrinth.teams_v2.addMember('team123', { user_id: 'user456' })
14
- * ```
15
- */
16
- addMember(teamId: string, data: Labrinth.Teams.v2.AddTeamMemberRequest): Promise<void>;
17
- /**
18
- * Edit a team member
19
- *
20
- * @param teamId - Team ID
21
- * @param userId - User ID of the member to edit
22
- * @param data - Member update data
23
- *
24
- * @example
25
- * ```typescript
26
- * await client.labrinth.teams_v2.editMember('team123', 'user456', {
27
- * role: 'Developer',
28
- * permissions: 0b111,
29
- * })
30
- * ```
31
- */
32
- editMember(teamId: string, userId: string, data: Labrinth.Teams.v2.EditTeamMemberRequest): Promise<void>;
33
- /**
34
- * Remove a member from a team
35
- *
36
- * @param teamId - Team ID
37
- * @param userId - User ID of the member to remove
38
- *
39
- * @example
40
- * ```typescript
41
- * await client.labrinth.teams_v2.removeMember('team123', 'user456')
42
- * ```
43
- */
44
- removeMember(teamId: string, userId: string): Promise<void>;
45
- /**
46
- * Transfer team ownership to another member
47
- *
48
- * @param teamId - Team ID
49
- * @param data - Transfer data including the new owner's user_id
50
- *
51
- * @example
52
- * ```typescript
53
- * await client.labrinth.teams_v2.transferOwnership('team123', { user_id: 'user456' })
54
- * ```
55
- */
56
- transferOwnership(teamId: string, data: Labrinth.Teams.v2.TransferOwnershipRequest): Promise<void>;
57
- }
@@ -1,18 +0,0 @@
1
- import { AbstractModule } from '../../../core/abstract-module';
2
- import type { Labrinth } from '../types';
3
- export declare class LabrinthTeamsV3Module extends AbstractModule {
4
- getModuleID(): string;
5
- /**
6
- * Get multiple teams by their IDs
7
- *
8
- * @param ids - Array of team IDs
9
- * @returns Promise resolving to an array of team member arrays (one per team)
10
- *
11
- * @example
12
- * ```typescript
13
- * const teams = await client.labrinth.teams_v3.getMultiple(['team1', 'team2'])
14
- * // teams[0] = members of team1, teams[1] = members of team2
15
- * ```
16
- */
17
- getMultiple(ids: string[]): Promise<Labrinth.Projects.v3.TeamMember[][]>;
18
- }
@@ -1,77 +0,0 @@
1
- import { AbstractModule } from '../../../core/abstract-module';
2
- import type { Labrinth } from '../types';
3
- export declare class LabrinthTechReviewInternalModule extends AbstractModule {
4
- getModuleID(): string;
5
- /**
6
- * Search for projects awaiting technical review.
7
- *
8
- * Returns a flat list of file reports with associated project data, ownership
9
- * information, and moderation threads provided as lookup maps.
10
- *
11
- * @param params - Search parameters including pagination, filters, and sorting
12
- * @returns Response object containing reports array and lookup maps for projects, threads, and ownership
13
- *
14
- * @example
15
- * ```typescript
16
- * const response = await client.labrinth.tech_review_internal.searchProjects({
17
- * limit: 20,
18
- * page: 0,
19
- * sort_by: 'created_asc',
20
- * filter: {
21
- * project_type: ['mod', 'modpack']
22
- * }
23
- * })
24
- * // Access reports: response.reports
25
- * // Access project by ID: response.projects[projectId]
26
- * ```
27
- */
28
- searchProjects(params: Labrinth.TechReview.Internal.SearchProjectsRequest): Promise<Labrinth.TechReview.Internal.SearchResponse>;
29
- /**
30
- * Get detailed information about a specific file report.
31
- *
32
- * @param reportId - The Delphi report ID
33
- * @returns Full report with all issues and details
34
- *
35
- * @example
36
- * ```typescript
37
- * const report = await client.labrinth.tech_review_internal.getReport('report-123')
38
- * console.log(report.file_name, report.issues.length)
39
- * ```
40
- */
41
- getReport(reportId: string): Promise<Labrinth.TechReview.Internal.FileReport>;
42
- /**
43
- * Get detailed information about a specific issue.
44
- *
45
- * @param issueId - The issue ID
46
- * @returns Issue with all its details
47
- *
48
- * @example
49
- * ```typescript
50
- * const issue = await client.labrinth.tech_review_internal.getIssue('issue-123')
51
- * console.log(issue.issue_type, issue.status)
52
- * ```
53
- */
54
- getIssue(issueId: string): Promise<Labrinth.TechReview.Internal.FileIssue>;
55
- /**
56
- * Update the status of a technical review issue detail.
57
- *
58
- * Allows moderators to mark an individual issue detail as safe (false positive) or unsafe (malicious).
59
- *
60
- * @param detailId - The ID of the issue detail to update
61
- * @param data - The verdict for the detail
62
- * @returns Promise that resolves when the update is complete
63
- */
64
- updateIssueDetail(detailId: string, data: Labrinth.TechReview.Internal.UpdateIssueDetailRequest): Promise<void>;
65
- updateIssueDetails(data: Labrinth.TechReview.Internal.UpdateIssueRequest[]): Promise<void>;
66
- updateGlobalIssueDetails(data: Labrinth.TechReview.Internal.UpdateGlobalIssueRequest[]): Promise<void>;
67
- searchGlobalIssueDetails(params: Labrinth.TechReview.Internal.SearchGlobalIssueDetailsRequest): Promise<Labrinth.TechReview.Internal.SearchGlobalIssueDetailsResponse>;
68
- getGlobalIssueDetail(params: Labrinth.TechReview.Internal.GetGlobalIssueDetailRequest): Promise<Labrinth.TechReview.Internal.GetGlobalIssueDetailResponse>;
69
- submitProject(projectId: string, data: Labrinth.TechReview.Internal.SubmitProjectRequest): Promise<void>;
70
- /**
71
- * Get the project report and thread for a specific project.
72
- *
73
- * @param projectId - The project ID
74
- * @returns The project report (may be null if no reports exist) and the moderation thread
75
- */
76
- getProjectReport(projectId: string): Promise<Labrinth.TechReview.Internal.ProjectReportResponse>;
77
- }
@@ -1,57 +0,0 @@
1
- import { AbstractModule } from '../../../core/abstract-module';
2
- import type { Labrinth } from '../types';
3
- export declare class LabrinthThreadsV3Module extends AbstractModule {
4
- getModuleID(): string;
5
- /**
6
- * Get a thread by ID (v3)
7
- *
8
- * @param id - Thread ID
9
- * @returns Promise resolving to the thread data
10
- *
11
- * @example
12
- * ```typescript
13
- * const thread = await client.labrinth.threads_v3.getThread('abc123')
14
- * console.log(thread.messages)
15
- * ```
16
- */
17
- getThread(id: string): Promise<Labrinth.Threads.v3.Thread>;
18
- /**
19
- * Get multiple threads by IDs (v3)
20
- *
21
- * @param ids - Array of thread IDs
22
- * @returns Promise resolving to an array of threads
23
- *
24
- * @example
25
- * ```typescript
26
- * const threads = await client.labrinth.threads_v3.getMultiple(['id1', 'id2'])
27
- * ```
28
- */
29
- getMultiple(ids: string[]): Promise<Labrinth.Threads.v3.Thread[]>;
30
- /**
31
- * Send a message to a thread (v3)
32
- *
33
- * @param id - Thread ID
34
- * @param message - Message body to send
35
- * @returns Promise resolving when message is sent
36
- *
37
- * @example
38
- * ```typescript
39
- * await client.labrinth.threads_v3.sendMessage('abc123', {
40
- * body: { type: 'text', body: 'Hello!' }
41
- * })
42
- * ```
43
- */
44
- sendMessage(id: string, message: Labrinth.Threads.v3.SendMessageRequest): Promise<void>;
45
- /**
46
- * Delete a message from a thread (v3)
47
- *
48
- * @param messageId - Message ID
49
- * @returns Promise resolving when message is deleted
50
- *
51
- * @example
52
- * ```typescript
53
- * await client.labrinth.threads_v3.deleteMessage('msg123')
54
- * ```
55
- */
56
- deleteMessage(messageId: string): Promise<void>;
57
- }