kleisterjs 1.0.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 (121) hide show
  1. package/.codacy.yml +6 -0
  2. package/.editorconfig +24 -0
  3. package/.github/issue_template.md +9 -0
  4. package/.github/pull_request_template.md +8 -0
  5. package/.github/renovate.json +6 -0
  6. package/.github/semantic.yml +23 -0
  7. package/.github/settings.yml +44 -0
  8. package/.github/workflows/automerge.yml +49 -0
  9. package/.github/workflows/flake.yml +56 -0
  10. package/.github/workflows/general.yml +39 -0
  11. package/.github/workflows/openapi.yml +74 -0
  12. package/.github/workflows/release.yml +56 -0
  13. package/.openapi-generator/FILES +94 -0
  14. package/.openapi-generator/VERSION +1 -0
  15. package/.openapi-generator-ignore +3 -0
  16. package/.releaserc +195 -0
  17. package/CHANGELOG.md +17 -0
  18. package/CONTRIBUTING.md +121 -0
  19. package/DCO +34 -0
  20. package/LICENSE +202 -0
  21. package/README.md +88 -0
  22. package/api/auth-api.ts +743 -0
  23. package/api/fabric-api.ts +943 -0
  24. package/api/forge-api.ts +942 -0
  25. package/api/minecraft-api.ts +949 -0
  26. package/api/mod-api.ts +4028 -0
  27. package/api/neoforge-api.ts +945 -0
  28. package/api/pack-api.ts +4007 -0
  29. package/api/profile-api.ts +431 -0
  30. package/api/quilt-api.ts +942 -0
  31. package/api/team-api.ts +3216 -0
  32. package/api/user-api.ts +3210 -0
  33. package/api.ts +25 -0
  34. package/base.ts +91 -0
  35. package/common.ts +203 -0
  36. package/configuration.ts +132 -0
  37. package/flake.lock +472 -0
  38. package/flake.nix +59 -0
  39. package/hack/generate-client.sh +36 -0
  40. package/hack/openapi/templates/README.mustache +93 -0
  41. package/hack/openapi/templates/gitignore +6 -0
  42. package/index.ts +17 -0
  43. package/model/auth-login.ts +33 -0
  44. package/model/auth-token.ts +33 -0
  45. package/model/auth-verify.ts +33 -0
  46. package/model/build-version-params.ts +33 -0
  47. package/model/build-version.ts +64 -0
  48. package/model/build-versions.ts +55 -0
  49. package/model/build.ts +169 -0
  50. package/model/builds.ts +46 -0
  51. package/model/fabric-build-params.ts +33 -0
  52. package/model/fabric-builds.ts +46 -0
  53. package/model/fabric.ts +45 -0
  54. package/model/fabrics.ts +37 -0
  55. package/model/forge-build-params.ts +33 -0
  56. package/model/forge-builds.ts +46 -0
  57. package/model/forge.ts +51 -0
  58. package/model/forges.ts +37 -0
  59. package/model/index.ts +73 -0
  60. package/model/minecraft-build-params.ts +33 -0
  61. package/model/minecraft-builds.ts +46 -0
  62. package/model/minecraft.ts +51 -0
  63. package/model/minecrafts.ts +37 -0
  64. package/model/mod-team-params.ts +42 -0
  65. package/model/mod-teams.ts +46 -0
  66. package/model/mod-user-params.ts +42 -0
  67. package/model/mod-users.ts +46 -0
  68. package/model/mod.ts +123 -0
  69. package/model/mods.ts +37 -0
  70. package/model/neoforge-build-params.ts +33 -0
  71. package/model/neoforge-builds.ts +46 -0
  72. package/model/neoforge.ts +51 -0
  73. package/model/neoforges.ts +37 -0
  74. package/model/notification.ts +43 -0
  75. package/model/pack-back.ts +91 -0
  76. package/model/pack-icon.ts +91 -0
  77. package/model/pack-logo.ts +91 -0
  78. package/model/pack-team-params.ts +42 -0
  79. package/model/pack-teams.ts +46 -0
  80. package/model/pack-user-params.ts +42 -0
  81. package/model/pack-users.ts +46 -0
  82. package/model/pack.ts +142 -0
  83. package/model/packs.ts +37 -0
  84. package/model/profile.ts +118 -0
  85. package/model/quilt-build-params.ts +33 -0
  86. package/model/quilt-builds.ts +46 -0
  87. package/model/quilt.ts +45 -0
  88. package/model/quilts.ts +37 -0
  89. package/model/team-mod-params.ts +42 -0
  90. package/model/team-mod.ts +79 -0
  91. package/model/team-mods.ts +46 -0
  92. package/model/team-pack-params.ts +42 -0
  93. package/model/team-pack.ts +79 -0
  94. package/model/team-packs.ts +46 -0
  95. package/model/team-user-params.ts +42 -0
  96. package/model/team-users.ts +46 -0
  97. package/model/team.ts +79 -0
  98. package/model/teams.ts +37 -0
  99. package/model/user-auth.ts +45 -0
  100. package/model/user-mod-params.ts +42 -0
  101. package/model/user-mod.ts +79 -0
  102. package/model/user-mods.ts +46 -0
  103. package/model/user-pack-params.ts +42 -0
  104. package/model/user-pack.ts +79 -0
  105. package/model/user-packs.ts +46 -0
  106. package/model/user-team-params.ts +42 -0
  107. package/model/user-team.ts +79 -0
  108. package/model/user-teams.ts +46 -0
  109. package/model/user.ts +118 -0
  110. package/model/users.ts +37 -0
  111. package/model/validation.ts +33 -0
  112. package/model/version-build-params.ts +33 -0
  113. package/model/version-builds.ts +55 -0
  114. package/model/version-file.ts +91 -0
  115. package/model/version.ts +91 -0
  116. package/model/versions.ts +46 -0
  117. package/openapi.yml +12 -0
  118. package/openapitools.json +7 -0
  119. package/package.json +41 -0
  120. package/tsconfig.esm.json +7 -0
  121. package/tsconfig.json +18 -0
@@ -0,0 +1,945 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Kleister OpenAPI
5
+ * API definition for Kleister, manage mod packs for Minecraft
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0-alpha1
8
+ * Contact: kleister@webhippie.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import type { Configuration } from "../configuration";
16
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios";
17
+ import globalAxios from "axios";
18
+ // URLSearchParams not necessarily used
19
+ // @ts-ignore
20
+ import { URL, URLSearchParams } from "url";
21
+ // Some imports not used depending on template conditions
22
+ // @ts-ignore
23
+ import {
24
+ DUMMY_BASE_URL,
25
+ assertParamExists,
26
+ setApiKeyToObject,
27
+ setBasicAuthToObject,
28
+ setBearerAuthToObject,
29
+ setOAuthToObject,
30
+ setSearchParams,
31
+ serializeDataIfNeeded,
32
+ toPathString,
33
+ createRequestFunction,
34
+ } from "../common";
35
+ // @ts-ignore
36
+ import {
37
+ BASE_PATH,
38
+ COLLECTION_FORMATS,
39
+ type RequestArgs,
40
+ BaseAPI,
41
+ RequiredError,
42
+ operationServerMap,
43
+ } from "../base";
44
+ // @ts-ignore
45
+ import type { NeoforgeBuildParams } from "../model";
46
+ // @ts-ignore
47
+ import type { NeoforgeBuilds } from "../model";
48
+ // @ts-ignore
49
+ import type { Neoforges } from "../model";
50
+ // @ts-ignore
51
+ import type { Notification } from "../model";
52
+ /**
53
+ * NeoforgeApi - axios parameter creator
54
+ * @export
55
+ */
56
+ export const NeoforgeApiAxiosParamCreator = function (
57
+ configuration?: Configuration,
58
+ ) {
59
+ return {
60
+ /**
61
+ *
62
+ * @summary Attach a build to a Neoforge version
63
+ * @param {string} neoforgeId A neoforge identifier or slug
64
+ * @param {NeoforgeBuildParams} neoforgeBuildParams The build data to attach
65
+ * @param {*} [options] Override http request option.
66
+ * @throws {RequiredError}
67
+ */
68
+ attachNeoforgeToBuild: async (
69
+ neoforgeId: string,
70
+ neoforgeBuildParams: NeoforgeBuildParams,
71
+ options: RawAxiosRequestConfig = {},
72
+ ): Promise<RequestArgs> => {
73
+ // verify required parameter 'neoforgeId' is not null or undefined
74
+ assertParamExists("attachNeoforgeToBuild", "neoforgeId", neoforgeId);
75
+ // verify required parameter 'neoforgeBuildParams' is not null or undefined
76
+ assertParamExists(
77
+ "attachNeoforgeToBuild",
78
+ "neoforgeBuildParams",
79
+ neoforgeBuildParams,
80
+ );
81
+ const localVarPath = `/neoforge/{neoforge_id}/builds`.replace(
82
+ `{${"neoforge_id"}}`,
83
+ encodeURIComponent(String(neoforgeId)),
84
+ );
85
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
86
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
87
+ let baseOptions;
88
+ if (configuration) {
89
+ baseOptions = configuration.baseOptions;
90
+ }
91
+
92
+ const localVarRequestOptions = {
93
+ method: "POST",
94
+ ...baseOptions,
95
+ ...options,
96
+ };
97
+ const localVarHeaderParameter = {} as any;
98
+ const localVarQueryParameter = {} as any;
99
+
100
+ // authentication Cookie required
101
+ await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration);
102
+
103
+ // authentication Basic required
104
+ // http basic authentication required
105
+ setBasicAuthToObject(localVarRequestOptions, configuration);
106
+
107
+ // authentication Header required
108
+ await setApiKeyToObject(
109
+ localVarHeaderParameter,
110
+ "X-API-Key",
111
+ configuration,
112
+ );
113
+
114
+ // authentication Bearer required
115
+ // http bearer authentication required
116
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
117
+
118
+ localVarHeaderParameter["Content-Type"] = "application/json";
119
+
120
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
121
+ let headersFromBaseOptions =
122
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
123
+ localVarRequestOptions.headers = {
124
+ ...localVarHeaderParameter,
125
+ ...headersFromBaseOptions,
126
+ ...options.headers,
127
+ };
128
+ localVarRequestOptions.data = serializeDataIfNeeded(
129
+ neoforgeBuildParams,
130
+ localVarRequestOptions,
131
+ configuration,
132
+ );
133
+
134
+ return {
135
+ url: toPathString(localVarUrlObj),
136
+ options: localVarRequestOptions,
137
+ };
138
+ },
139
+ /**
140
+ *
141
+ * @summary Unlink a build from a Neoforge version
142
+ * @param {string} neoforgeId A neoforge identifier or slug
143
+ * @param {NeoforgeBuildParams} neoforgeBuildParams The build data to unlink
144
+ * @param {*} [options] Override http request option.
145
+ * @throws {RequiredError}
146
+ */
147
+ deleteNeoforgeFromBuild: async (
148
+ neoforgeId: string,
149
+ neoforgeBuildParams: NeoforgeBuildParams,
150
+ options: RawAxiosRequestConfig = {},
151
+ ): Promise<RequestArgs> => {
152
+ // verify required parameter 'neoforgeId' is not null or undefined
153
+ assertParamExists("deleteNeoforgeFromBuild", "neoforgeId", neoforgeId);
154
+ // verify required parameter 'neoforgeBuildParams' is not null or undefined
155
+ assertParamExists(
156
+ "deleteNeoforgeFromBuild",
157
+ "neoforgeBuildParams",
158
+ neoforgeBuildParams,
159
+ );
160
+ const localVarPath = `/neoforge/{neoforge_id}/builds`.replace(
161
+ `{${"neoforge_id"}}`,
162
+ encodeURIComponent(String(neoforgeId)),
163
+ );
164
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
165
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
166
+ let baseOptions;
167
+ if (configuration) {
168
+ baseOptions = configuration.baseOptions;
169
+ }
170
+
171
+ const localVarRequestOptions = {
172
+ method: "DELETE",
173
+ ...baseOptions,
174
+ ...options,
175
+ };
176
+ const localVarHeaderParameter = {} as any;
177
+ const localVarQueryParameter = {} as any;
178
+
179
+ // authentication Cookie required
180
+ await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration);
181
+
182
+ // authentication Basic required
183
+ // http basic authentication required
184
+ setBasicAuthToObject(localVarRequestOptions, configuration);
185
+
186
+ // authentication Header required
187
+ await setApiKeyToObject(
188
+ localVarHeaderParameter,
189
+ "X-API-Key",
190
+ configuration,
191
+ );
192
+
193
+ // authentication Bearer required
194
+ // http bearer authentication required
195
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
196
+
197
+ localVarHeaderParameter["Content-Type"] = "application/json";
198
+
199
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
200
+ let headersFromBaseOptions =
201
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
202
+ localVarRequestOptions.headers = {
203
+ ...localVarHeaderParameter,
204
+ ...headersFromBaseOptions,
205
+ ...options.headers,
206
+ };
207
+ localVarRequestOptions.data = serializeDataIfNeeded(
208
+ neoforgeBuildParams,
209
+ localVarRequestOptions,
210
+ configuration,
211
+ );
212
+
213
+ return {
214
+ url: toPathString(localVarUrlObj),
215
+ options: localVarRequestOptions,
216
+ };
217
+ },
218
+ /**
219
+ *
220
+ * @summary Fetch the builds attached to a Neoforge version
221
+ * @param {string} neoforgeId A neoforge identifier or slug
222
+ * @param {string} [search] Search query
223
+ * @param {ListNeoforgeBuildsSortEnum} [sort] Sorting column
224
+ * @param {ListNeoforgeBuildsOrderEnum} [order] Sorting order
225
+ * @param {number} [limit] Paging limit
226
+ * @param {number} [offset] Paging offset
227
+ * @param {*} [options] Override http request option.
228
+ * @throws {RequiredError}
229
+ */
230
+ listNeoforgeBuilds: async (
231
+ neoforgeId: string,
232
+ search?: string,
233
+ sort?: ListNeoforgeBuildsSortEnum,
234
+ order?: ListNeoforgeBuildsOrderEnum,
235
+ limit?: number,
236
+ offset?: number,
237
+ options: RawAxiosRequestConfig = {},
238
+ ): Promise<RequestArgs> => {
239
+ // verify required parameter 'neoforgeId' is not null or undefined
240
+ assertParamExists("listNeoforgeBuilds", "neoforgeId", neoforgeId);
241
+ const localVarPath = `/neoforge/{neoforge_id}/builds`.replace(
242
+ `{${"neoforge_id"}}`,
243
+ encodeURIComponent(String(neoforgeId)),
244
+ );
245
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
246
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
247
+ let baseOptions;
248
+ if (configuration) {
249
+ baseOptions = configuration.baseOptions;
250
+ }
251
+
252
+ const localVarRequestOptions = {
253
+ method: "GET",
254
+ ...baseOptions,
255
+ ...options,
256
+ };
257
+ const localVarHeaderParameter = {} as any;
258
+ const localVarQueryParameter = {} as any;
259
+
260
+ // authentication Cookie required
261
+ await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration);
262
+
263
+ // authentication Basic required
264
+ // http basic authentication required
265
+ setBasicAuthToObject(localVarRequestOptions, configuration);
266
+
267
+ // authentication Header required
268
+ await setApiKeyToObject(
269
+ localVarHeaderParameter,
270
+ "X-API-Key",
271
+ configuration,
272
+ );
273
+
274
+ // authentication Bearer required
275
+ // http bearer authentication required
276
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
277
+
278
+ if (search !== undefined) {
279
+ localVarQueryParameter["search"] = search;
280
+ }
281
+
282
+ if (sort !== undefined) {
283
+ localVarQueryParameter["sort"] = sort;
284
+ }
285
+
286
+ if (order !== undefined) {
287
+ localVarQueryParameter["order"] = order;
288
+ }
289
+
290
+ if (limit !== undefined) {
291
+ localVarQueryParameter["limit"] = limit;
292
+ }
293
+
294
+ if (offset !== undefined) {
295
+ localVarQueryParameter["offset"] = offset;
296
+ }
297
+
298
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
299
+ let headersFromBaseOptions =
300
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
301
+ localVarRequestOptions.headers = {
302
+ ...localVarHeaderParameter,
303
+ ...headersFromBaseOptions,
304
+ ...options.headers,
305
+ };
306
+
307
+ return {
308
+ url: toPathString(localVarUrlObj),
309
+ options: localVarRequestOptions,
310
+ };
311
+ },
312
+ /**
313
+ *
314
+ * @summary Fetch the available Neoforge versions
315
+ * @param {string} [search] Search query
316
+ * @param {*} [options] Override http request option.
317
+ * @throws {RequiredError}
318
+ */
319
+ listNeoforges: async (
320
+ search?: string,
321
+ options: RawAxiosRequestConfig = {},
322
+ ): Promise<RequestArgs> => {
323
+ const localVarPath = `/neoforge`;
324
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
325
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
326
+ let baseOptions;
327
+ if (configuration) {
328
+ baseOptions = configuration.baseOptions;
329
+ }
330
+
331
+ const localVarRequestOptions = {
332
+ method: "GET",
333
+ ...baseOptions,
334
+ ...options,
335
+ };
336
+ const localVarHeaderParameter = {} as any;
337
+ const localVarQueryParameter = {} as any;
338
+
339
+ // authentication Cookie required
340
+ await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration);
341
+
342
+ // authentication Basic required
343
+ // http basic authentication required
344
+ setBasicAuthToObject(localVarRequestOptions, configuration);
345
+
346
+ // authentication Header required
347
+ await setApiKeyToObject(
348
+ localVarHeaderParameter,
349
+ "X-API-Key",
350
+ configuration,
351
+ );
352
+
353
+ // authentication Bearer required
354
+ // http bearer authentication required
355
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
356
+
357
+ if (search !== undefined) {
358
+ localVarQueryParameter["search"] = search;
359
+ }
360
+
361
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
362
+ let headersFromBaseOptions =
363
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
364
+ localVarRequestOptions.headers = {
365
+ ...localVarHeaderParameter,
366
+ ...headersFromBaseOptions,
367
+ ...options.headers,
368
+ };
369
+
370
+ return {
371
+ url: toPathString(localVarUrlObj),
372
+ options: localVarRequestOptions,
373
+ };
374
+ },
375
+ /**
376
+ *
377
+ * @summary Update the available Neoforge versions
378
+ * @param {*} [options] Override http request option.
379
+ * @throws {RequiredError}
380
+ */
381
+ updateNeoforge: async (
382
+ options: RawAxiosRequestConfig = {},
383
+ ): Promise<RequestArgs> => {
384
+ const localVarPath = `/neoforge`;
385
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
386
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
387
+ let baseOptions;
388
+ if (configuration) {
389
+ baseOptions = configuration.baseOptions;
390
+ }
391
+
392
+ const localVarRequestOptions = {
393
+ method: "PUT",
394
+ ...baseOptions,
395
+ ...options,
396
+ };
397
+ const localVarHeaderParameter = {} as any;
398
+ const localVarQueryParameter = {} as any;
399
+
400
+ // authentication Cookie required
401
+ await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration);
402
+
403
+ // authentication Basic required
404
+ // http basic authentication required
405
+ setBasicAuthToObject(localVarRequestOptions, configuration);
406
+
407
+ // authentication Header required
408
+ await setApiKeyToObject(
409
+ localVarHeaderParameter,
410
+ "X-API-Key",
411
+ configuration,
412
+ );
413
+
414
+ // authentication Bearer required
415
+ // http bearer authentication required
416
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
417
+
418
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
419
+ let headersFromBaseOptions =
420
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
421
+ localVarRequestOptions.headers = {
422
+ ...localVarHeaderParameter,
423
+ ...headersFromBaseOptions,
424
+ ...options.headers,
425
+ };
426
+
427
+ return {
428
+ url: toPathString(localVarUrlObj),
429
+ options: localVarRequestOptions,
430
+ };
431
+ },
432
+ };
433
+ };
434
+
435
+ /**
436
+ * NeoforgeApi - functional programming interface
437
+ * @export
438
+ */
439
+ export const NeoforgeApiFp = function (configuration?: Configuration) {
440
+ const localVarAxiosParamCreator = NeoforgeApiAxiosParamCreator(configuration);
441
+ return {
442
+ /**
443
+ *
444
+ * @summary Attach a build to a Neoforge version
445
+ * @param {string} neoforgeId A neoforge identifier or slug
446
+ * @param {NeoforgeBuildParams} neoforgeBuildParams The build data to attach
447
+ * @param {*} [options] Override http request option.
448
+ * @throws {RequiredError}
449
+ */
450
+ async attachNeoforgeToBuild(
451
+ neoforgeId: string,
452
+ neoforgeBuildParams: NeoforgeBuildParams,
453
+ options?: RawAxiosRequestConfig,
454
+ ): Promise<
455
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>
456
+ > {
457
+ const localVarAxiosArgs =
458
+ await localVarAxiosParamCreator.attachNeoforgeToBuild(
459
+ neoforgeId,
460
+ neoforgeBuildParams,
461
+ options,
462
+ );
463
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
464
+ const localVarOperationServerBasePath =
465
+ operationServerMap["NeoforgeApi.attachNeoforgeToBuild"]?.[
466
+ localVarOperationServerIndex
467
+ ]?.url;
468
+ return (axios, basePath) =>
469
+ createRequestFunction(
470
+ localVarAxiosArgs,
471
+ globalAxios,
472
+ BASE_PATH,
473
+ configuration,
474
+ )(axios, localVarOperationServerBasePath || basePath);
475
+ },
476
+ /**
477
+ *
478
+ * @summary Unlink a build from a Neoforge version
479
+ * @param {string} neoforgeId A neoforge identifier or slug
480
+ * @param {NeoforgeBuildParams} neoforgeBuildParams The build data to unlink
481
+ * @param {*} [options] Override http request option.
482
+ * @throws {RequiredError}
483
+ */
484
+ async deleteNeoforgeFromBuild(
485
+ neoforgeId: string,
486
+ neoforgeBuildParams: NeoforgeBuildParams,
487
+ options?: RawAxiosRequestConfig,
488
+ ): Promise<
489
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>
490
+ > {
491
+ const localVarAxiosArgs =
492
+ await localVarAxiosParamCreator.deleteNeoforgeFromBuild(
493
+ neoforgeId,
494
+ neoforgeBuildParams,
495
+ options,
496
+ );
497
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
498
+ const localVarOperationServerBasePath =
499
+ operationServerMap["NeoforgeApi.deleteNeoforgeFromBuild"]?.[
500
+ localVarOperationServerIndex
501
+ ]?.url;
502
+ return (axios, basePath) =>
503
+ createRequestFunction(
504
+ localVarAxiosArgs,
505
+ globalAxios,
506
+ BASE_PATH,
507
+ configuration,
508
+ )(axios, localVarOperationServerBasePath || basePath);
509
+ },
510
+ /**
511
+ *
512
+ * @summary Fetch the builds attached to a Neoforge version
513
+ * @param {string} neoforgeId A neoforge identifier or slug
514
+ * @param {string} [search] Search query
515
+ * @param {ListNeoforgeBuildsSortEnum} [sort] Sorting column
516
+ * @param {ListNeoforgeBuildsOrderEnum} [order] Sorting order
517
+ * @param {number} [limit] Paging limit
518
+ * @param {number} [offset] Paging offset
519
+ * @param {*} [options] Override http request option.
520
+ * @throws {RequiredError}
521
+ */
522
+ async listNeoforgeBuilds(
523
+ neoforgeId: string,
524
+ search?: string,
525
+ sort?: ListNeoforgeBuildsSortEnum,
526
+ order?: ListNeoforgeBuildsOrderEnum,
527
+ limit?: number,
528
+ offset?: number,
529
+ options?: RawAxiosRequestConfig,
530
+ ): Promise<
531
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<NeoforgeBuilds>
532
+ > {
533
+ const localVarAxiosArgs =
534
+ await localVarAxiosParamCreator.listNeoforgeBuilds(
535
+ neoforgeId,
536
+ search,
537
+ sort,
538
+ order,
539
+ limit,
540
+ offset,
541
+ options,
542
+ );
543
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
544
+ const localVarOperationServerBasePath =
545
+ operationServerMap["NeoforgeApi.listNeoforgeBuilds"]?.[
546
+ localVarOperationServerIndex
547
+ ]?.url;
548
+ return (axios, basePath) =>
549
+ createRequestFunction(
550
+ localVarAxiosArgs,
551
+ globalAxios,
552
+ BASE_PATH,
553
+ configuration,
554
+ )(axios, localVarOperationServerBasePath || basePath);
555
+ },
556
+ /**
557
+ *
558
+ * @summary Fetch the available Neoforge versions
559
+ * @param {string} [search] Search query
560
+ * @param {*} [options] Override http request option.
561
+ * @throws {RequiredError}
562
+ */
563
+ async listNeoforges(
564
+ search?: string,
565
+ options?: RawAxiosRequestConfig,
566
+ ): Promise<
567
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Neoforges>
568
+ > {
569
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listNeoforges(
570
+ search,
571
+ options,
572
+ );
573
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
574
+ const localVarOperationServerBasePath =
575
+ operationServerMap["NeoforgeApi.listNeoforges"]?.[
576
+ localVarOperationServerIndex
577
+ ]?.url;
578
+ return (axios, basePath) =>
579
+ createRequestFunction(
580
+ localVarAxiosArgs,
581
+ globalAxios,
582
+ BASE_PATH,
583
+ configuration,
584
+ )(axios, localVarOperationServerBasePath || basePath);
585
+ },
586
+ /**
587
+ *
588
+ * @summary Update the available Neoforge versions
589
+ * @param {*} [options] Override http request option.
590
+ * @throws {RequiredError}
591
+ */
592
+ async updateNeoforge(
593
+ options?: RawAxiosRequestConfig,
594
+ ): Promise<
595
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>
596
+ > {
597
+ const localVarAxiosArgs =
598
+ await localVarAxiosParamCreator.updateNeoforge(options);
599
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
600
+ const localVarOperationServerBasePath =
601
+ operationServerMap["NeoforgeApi.updateNeoforge"]?.[
602
+ localVarOperationServerIndex
603
+ ]?.url;
604
+ return (axios, basePath) =>
605
+ createRequestFunction(
606
+ localVarAxiosArgs,
607
+ globalAxios,
608
+ BASE_PATH,
609
+ configuration,
610
+ )(axios, localVarOperationServerBasePath || basePath);
611
+ },
612
+ };
613
+ };
614
+
615
+ /**
616
+ * NeoforgeApi - factory interface
617
+ * @export
618
+ */
619
+ export const NeoforgeApiFactory = function (
620
+ configuration?: Configuration,
621
+ basePath?: string,
622
+ axios?: AxiosInstance,
623
+ ) {
624
+ const localVarFp = NeoforgeApiFp(configuration);
625
+ return {
626
+ /**
627
+ *
628
+ * @summary Attach a build to a Neoforge version
629
+ * @param {NeoforgeApiAttachNeoforgeToBuildRequest} requestParameters Request parameters.
630
+ * @param {*} [options] Override http request option.
631
+ * @throws {RequiredError}
632
+ */
633
+ attachNeoforgeToBuild(
634
+ requestParameters: NeoforgeApiAttachNeoforgeToBuildRequest,
635
+ options?: RawAxiosRequestConfig,
636
+ ): AxiosPromise<Notification> {
637
+ return localVarFp
638
+ .attachNeoforgeToBuild(
639
+ requestParameters.neoforgeId,
640
+ requestParameters.neoforgeBuildParams,
641
+ options,
642
+ )
643
+ .then((request) => request(axios, basePath));
644
+ },
645
+ /**
646
+ *
647
+ * @summary Unlink a build from a Neoforge version
648
+ * @param {NeoforgeApiDeleteNeoforgeFromBuildRequest} requestParameters Request parameters.
649
+ * @param {*} [options] Override http request option.
650
+ * @throws {RequiredError}
651
+ */
652
+ deleteNeoforgeFromBuild(
653
+ requestParameters: NeoforgeApiDeleteNeoforgeFromBuildRequest,
654
+ options?: RawAxiosRequestConfig,
655
+ ): AxiosPromise<Notification> {
656
+ return localVarFp
657
+ .deleteNeoforgeFromBuild(
658
+ requestParameters.neoforgeId,
659
+ requestParameters.neoforgeBuildParams,
660
+ options,
661
+ )
662
+ .then((request) => request(axios, basePath));
663
+ },
664
+ /**
665
+ *
666
+ * @summary Fetch the builds attached to a Neoforge version
667
+ * @param {NeoforgeApiListNeoforgeBuildsRequest} requestParameters Request parameters.
668
+ * @param {*} [options] Override http request option.
669
+ * @throws {RequiredError}
670
+ */
671
+ listNeoforgeBuilds(
672
+ requestParameters: NeoforgeApiListNeoforgeBuildsRequest,
673
+ options?: RawAxiosRequestConfig,
674
+ ): AxiosPromise<NeoforgeBuilds> {
675
+ return localVarFp
676
+ .listNeoforgeBuilds(
677
+ requestParameters.neoforgeId,
678
+ requestParameters.search,
679
+ requestParameters.sort,
680
+ requestParameters.order,
681
+ requestParameters.limit,
682
+ requestParameters.offset,
683
+ options,
684
+ )
685
+ .then((request) => request(axios, basePath));
686
+ },
687
+ /**
688
+ *
689
+ * @summary Fetch the available Neoforge versions
690
+ * @param {NeoforgeApiListNeoforgesRequest} requestParameters Request parameters.
691
+ * @param {*} [options] Override http request option.
692
+ * @throws {RequiredError}
693
+ */
694
+ listNeoforges(
695
+ requestParameters: NeoforgeApiListNeoforgesRequest = {},
696
+ options?: RawAxiosRequestConfig,
697
+ ): AxiosPromise<Neoforges> {
698
+ return localVarFp
699
+ .listNeoforges(requestParameters.search, options)
700
+ .then((request) => request(axios, basePath));
701
+ },
702
+ /**
703
+ *
704
+ * @summary Update the available Neoforge versions
705
+ * @param {*} [options] Override http request option.
706
+ * @throws {RequiredError}
707
+ */
708
+ updateNeoforge(
709
+ options?: RawAxiosRequestConfig,
710
+ ): AxiosPromise<Notification> {
711
+ return localVarFp
712
+ .updateNeoforge(options)
713
+ .then((request) => request(axios, basePath));
714
+ },
715
+ };
716
+ };
717
+
718
+ /**
719
+ * Request parameters for attachNeoforgeToBuild operation in NeoforgeApi.
720
+ * @export
721
+ * @interface NeoforgeApiAttachNeoforgeToBuildRequest
722
+ */
723
+ export interface NeoforgeApiAttachNeoforgeToBuildRequest {
724
+ /**
725
+ * A neoforge identifier or slug
726
+ * @type {string}
727
+ * @memberof NeoforgeApiAttachNeoforgeToBuild
728
+ */
729
+ readonly neoforgeId: string;
730
+
731
+ /**
732
+ * The build data to attach
733
+ * @type {NeoforgeBuildParams}
734
+ * @memberof NeoforgeApiAttachNeoforgeToBuild
735
+ */
736
+ readonly neoforgeBuildParams: NeoforgeBuildParams;
737
+ }
738
+
739
+ /**
740
+ * Request parameters for deleteNeoforgeFromBuild operation in NeoforgeApi.
741
+ * @export
742
+ * @interface NeoforgeApiDeleteNeoforgeFromBuildRequest
743
+ */
744
+ export interface NeoforgeApiDeleteNeoforgeFromBuildRequest {
745
+ /**
746
+ * A neoforge identifier or slug
747
+ * @type {string}
748
+ * @memberof NeoforgeApiDeleteNeoforgeFromBuild
749
+ */
750
+ readonly neoforgeId: string;
751
+
752
+ /**
753
+ * The build data to unlink
754
+ * @type {NeoforgeBuildParams}
755
+ * @memberof NeoforgeApiDeleteNeoforgeFromBuild
756
+ */
757
+ readonly neoforgeBuildParams: NeoforgeBuildParams;
758
+ }
759
+
760
+ /**
761
+ * Request parameters for listNeoforgeBuilds operation in NeoforgeApi.
762
+ * @export
763
+ * @interface NeoforgeApiListNeoforgeBuildsRequest
764
+ */
765
+ export interface NeoforgeApiListNeoforgeBuildsRequest {
766
+ /**
767
+ * A neoforge identifier or slug
768
+ * @type {string}
769
+ * @memberof NeoforgeApiListNeoforgeBuilds
770
+ */
771
+ readonly neoforgeId: string;
772
+
773
+ /**
774
+ * Search query
775
+ * @type {string}
776
+ * @memberof NeoforgeApiListNeoforgeBuilds
777
+ */
778
+ readonly search?: string;
779
+
780
+ /**
781
+ * Sorting column
782
+ * @type {'name' | 'public'}
783
+ * @memberof NeoforgeApiListNeoforgeBuilds
784
+ */
785
+ readonly sort?: ListNeoforgeBuildsSortEnum;
786
+
787
+ /**
788
+ * Sorting order
789
+ * @type {'asc' | 'desc'}
790
+ * @memberof NeoforgeApiListNeoforgeBuilds
791
+ */
792
+ readonly order?: ListNeoforgeBuildsOrderEnum;
793
+
794
+ /**
795
+ * Paging limit
796
+ * @type {number}
797
+ * @memberof NeoforgeApiListNeoforgeBuilds
798
+ */
799
+ readonly limit?: number;
800
+
801
+ /**
802
+ * Paging offset
803
+ * @type {number}
804
+ * @memberof NeoforgeApiListNeoforgeBuilds
805
+ */
806
+ readonly offset?: number;
807
+ }
808
+
809
+ /**
810
+ * Request parameters for listNeoforges operation in NeoforgeApi.
811
+ * @export
812
+ * @interface NeoforgeApiListNeoforgesRequest
813
+ */
814
+ export interface NeoforgeApiListNeoforgesRequest {
815
+ /**
816
+ * Search query
817
+ * @type {string}
818
+ * @memberof NeoforgeApiListNeoforges
819
+ */
820
+ readonly search?: string;
821
+ }
822
+
823
+ /**
824
+ * NeoforgeApi - object-oriented interface
825
+ * @export
826
+ * @class NeoforgeApi
827
+ * @extends {BaseAPI}
828
+ */
829
+ export class NeoforgeApi extends BaseAPI {
830
+ /**
831
+ *
832
+ * @summary Attach a build to a Neoforge version
833
+ * @param {NeoforgeApiAttachNeoforgeToBuildRequest} requestParameters Request parameters.
834
+ * @param {*} [options] Override http request option.
835
+ * @throws {RequiredError}
836
+ * @memberof NeoforgeApi
837
+ */
838
+ public attachNeoforgeToBuild(
839
+ requestParameters: NeoforgeApiAttachNeoforgeToBuildRequest,
840
+ options?: RawAxiosRequestConfig,
841
+ ) {
842
+ return NeoforgeApiFp(this.configuration)
843
+ .attachNeoforgeToBuild(
844
+ requestParameters.neoforgeId,
845
+ requestParameters.neoforgeBuildParams,
846
+ options,
847
+ )
848
+ .then((request) => request(this.axios, this.basePath));
849
+ }
850
+
851
+ /**
852
+ *
853
+ * @summary Unlink a build from a Neoforge version
854
+ * @param {NeoforgeApiDeleteNeoforgeFromBuildRequest} requestParameters Request parameters.
855
+ * @param {*} [options] Override http request option.
856
+ * @throws {RequiredError}
857
+ * @memberof NeoforgeApi
858
+ */
859
+ public deleteNeoforgeFromBuild(
860
+ requestParameters: NeoforgeApiDeleteNeoforgeFromBuildRequest,
861
+ options?: RawAxiosRequestConfig,
862
+ ) {
863
+ return NeoforgeApiFp(this.configuration)
864
+ .deleteNeoforgeFromBuild(
865
+ requestParameters.neoforgeId,
866
+ requestParameters.neoforgeBuildParams,
867
+ options,
868
+ )
869
+ .then((request) => request(this.axios, this.basePath));
870
+ }
871
+
872
+ /**
873
+ *
874
+ * @summary Fetch the builds attached to a Neoforge version
875
+ * @param {NeoforgeApiListNeoforgeBuildsRequest} requestParameters Request parameters.
876
+ * @param {*} [options] Override http request option.
877
+ * @throws {RequiredError}
878
+ * @memberof NeoforgeApi
879
+ */
880
+ public listNeoforgeBuilds(
881
+ requestParameters: NeoforgeApiListNeoforgeBuildsRequest,
882
+ options?: RawAxiosRequestConfig,
883
+ ) {
884
+ return NeoforgeApiFp(this.configuration)
885
+ .listNeoforgeBuilds(
886
+ requestParameters.neoforgeId,
887
+ requestParameters.search,
888
+ requestParameters.sort,
889
+ requestParameters.order,
890
+ requestParameters.limit,
891
+ requestParameters.offset,
892
+ options,
893
+ )
894
+ .then((request) => request(this.axios, this.basePath));
895
+ }
896
+
897
+ /**
898
+ *
899
+ * @summary Fetch the available Neoforge versions
900
+ * @param {NeoforgeApiListNeoforgesRequest} requestParameters Request parameters.
901
+ * @param {*} [options] Override http request option.
902
+ * @throws {RequiredError}
903
+ * @memberof NeoforgeApi
904
+ */
905
+ public listNeoforges(
906
+ requestParameters: NeoforgeApiListNeoforgesRequest = {},
907
+ options?: RawAxiosRequestConfig,
908
+ ) {
909
+ return NeoforgeApiFp(this.configuration)
910
+ .listNeoforges(requestParameters.search, options)
911
+ .then((request) => request(this.axios, this.basePath));
912
+ }
913
+
914
+ /**
915
+ *
916
+ * @summary Update the available Neoforge versions
917
+ * @param {*} [options] Override http request option.
918
+ * @throws {RequiredError}
919
+ * @memberof NeoforgeApi
920
+ */
921
+ public updateNeoforge(options?: RawAxiosRequestConfig) {
922
+ return NeoforgeApiFp(this.configuration)
923
+ .updateNeoforge(options)
924
+ .then((request) => request(this.axios, this.basePath));
925
+ }
926
+ }
927
+
928
+ /**
929
+ * @export
930
+ */
931
+ export const ListNeoforgeBuildsSortEnum = {
932
+ Name: "name",
933
+ Public: "public",
934
+ } as const;
935
+ export type ListNeoforgeBuildsSortEnum =
936
+ (typeof ListNeoforgeBuildsSortEnum)[keyof typeof ListNeoforgeBuildsSortEnum];
937
+ /**
938
+ * @export
939
+ */
940
+ export const ListNeoforgeBuildsOrderEnum = {
941
+ Asc: "asc",
942
+ Desc: "desc",
943
+ } as const;
944
+ export type ListNeoforgeBuildsOrderEnum =
945
+ (typeof ListNeoforgeBuildsOrderEnum)[keyof typeof ListNeoforgeBuildsOrderEnum];