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,943 @@
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 { FabricBuildParams } from "../model";
46
+ // @ts-ignore
47
+ import type { FabricBuilds } from "../model";
48
+ // @ts-ignore
49
+ import type { Fabrics } from "../model";
50
+ // @ts-ignore
51
+ import type { Notification } from "../model";
52
+ /**
53
+ * FabricApi - axios parameter creator
54
+ * @export
55
+ */
56
+ export const FabricApiAxiosParamCreator = function (
57
+ configuration?: Configuration,
58
+ ) {
59
+ return {
60
+ /**
61
+ *
62
+ * @summary Attach a build to a Fabric version
63
+ * @param {string} fabricId A fabric identifier or slug
64
+ * @param {FabricBuildParams} fabricBuildParams The build data to attach
65
+ * @param {*} [options] Override http request option.
66
+ * @throws {RequiredError}
67
+ */
68
+ attachFabricToBuild: async (
69
+ fabricId: string,
70
+ fabricBuildParams: FabricBuildParams,
71
+ options: RawAxiosRequestConfig = {},
72
+ ): Promise<RequestArgs> => {
73
+ // verify required parameter 'fabricId' is not null or undefined
74
+ assertParamExists("attachFabricToBuild", "fabricId", fabricId);
75
+ // verify required parameter 'fabricBuildParams' is not null or undefined
76
+ assertParamExists(
77
+ "attachFabricToBuild",
78
+ "fabricBuildParams",
79
+ fabricBuildParams,
80
+ );
81
+ const localVarPath = `/fabric/{fabric_id}/builds`.replace(
82
+ `{${"fabric_id"}}`,
83
+ encodeURIComponent(String(fabricId)),
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
+ fabricBuildParams,
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 Fabric version
142
+ * @param {string} fabricId A fabric identifier or slug
143
+ * @param {FabricBuildParams} fabricBuildParams The build data to unlink
144
+ * @param {*} [options] Override http request option.
145
+ * @throws {RequiredError}
146
+ */
147
+ deleteFabricFromBuild: async (
148
+ fabricId: string,
149
+ fabricBuildParams: FabricBuildParams,
150
+ options: RawAxiosRequestConfig = {},
151
+ ): Promise<RequestArgs> => {
152
+ // verify required parameter 'fabricId' is not null or undefined
153
+ assertParamExists("deleteFabricFromBuild", "fabricId", fabricId);
154
+ // verify required parameter 'fabricBuildParams' is not null or undefined
155
+ assertParamExists(
156
+ "deleteFabricFromBuild",
157
+ "fabricBuildParams",
158
+ fabricBuildParams,
159
+ );
160
+ const localVarPath = `/fabric/{fabric_id}/builds`.replace(
161
+ `{${"fabric_id"}}`,
162
+ encodeURIComponent(String(fabricId)),
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
+ fabricBuildParams,
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 Fabric version
221
+ * @param {string} fabricId A fabric identifier or slug
222
+ * @param {string} [search] Search query
223
+ * @param {ListFabricBuildsSortEnum} [sort] Sorting column
224
+ * @param {ListFabricBuildsOrderEnum} [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
+ listFabricBuilds: async (
231
+ fabricId: string,
232
+ search?: string,
233
+ sort?: ListFabricBuildsSortEnum,
234
+ order?: ListFabricBuildsOrderEnum,
235
+ limit?: number,
236
+ offset?: number,
237
+ options: RawAxiosRequestConfig = {},
238
+ ): Promise<RequestArgs> => {
239
+ // verify required parameter 'fabricId' is not null or undefined
240
+ assertParamExists("listFabricBuilds", "fabricId", fabricId);
241
+ const localVarPath = `/fabric/{fabric_id}/builds`.replace(
242
+ `{${"fabric_id"}}`,
243
+ encodeURIComponent(String(fabricId)),
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 Fabric versions
315
+ * @param {string} [search] Search query
316
+ * @param {*} [options] Override http request option.
317
+ * @throws {RequiredError}
318
+ */
319
+ listFabrics: async (
320
+ search?: string,
321
+ options: RawAxiosRequestConfig = {},
322
+ ): Promise<RequestArgs> => {
323
+ const localVarPath = `/fabric`;
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 Fabric versions
378
+ * @param {*} [options] Override http request option.
379
+ * @throws {RequiredError}
380
+ */
381
+ updateFabric: async (
382
+ options: RawAxiosRequestConfig = {},
383
+ ): Promise<RequestArgs> => {
384
+ const localVarPath = `/fabric`;
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
+ * FabricApi - functional programming interface
437
+ * @export
438
+ */
439
+ export const FabricApiFp = function (configuration?: Configuration) {
440
+ const localVarAxiosParamCreator = FabricApiAxiosParamCreator(configuration);
441
+ return {
442
+ /**
443
+ *
444
+ * @summary Attach a build to a Fabric version
445
+ * @param {string} fabricId A fabric identifier or slug
446
+ * @param {FabricBuildParams} fabricBuildParams The build data to attach
447
+ * @param {*} [options] Override http request option.
448
+ * @throws {RequiredError}
449
+ */
450
+ async attachFabricToBuild(
451
+ fabricId: string,
452
+ fabricBuildParams: FabricBuildParams,
453
+ options?: RawAxiosRequestConfig,
454
+ ): Promise<
455
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>
456
+ > {
457
+ const localVarAxiosArgs =
458
+ await localVarAxiosParamCreator.attachFabricToBuild(
459
+ fabricId,
460
+ fabricBuildParams,
461
+ options,
462
+ );
463
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
464
+ const localVarOperationServerBasePath =
465
+ operationServerMap["FabricApi.attachFabricToBuild"]?.[
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 Fabric version
479
+ * @param {string} fabricId A fabric identifier or slug
480
+ * @param {FabricBuildParams} fabricBuildParams The build data to unlink
481
+ * @param {*} [options] Override http request option.
482
+ * @throws {RequiredError}
483
+ */
484
+ async deleteFabricFromBuild(
485
+ fabricId: string,
486
+ fabricBuildParams: FabricBuildParams,
487
+ options?: RawAxiosRequestConfig,
488
+ ): Promise<
489
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>
490
+ > {
491
+ const localVarAxiosArgs =
492
+ await localVarAxiosParamCreator.deleteFabricFromBuild(
493
+ fabricId,
494
+ fabricBuildParams,
495
+ options,
496
+ );
497
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
498
+ const localVarOperationServerBasePath =
499
+ operationServerMap["FabricApi.deleteFabricFromBuild"]?.[
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 Fabric version
513
+ * @param {string} fabricId A fabric identifier or slug
514
+ * @param {string} [search] Search query
515
+ * @param {ListFabricBuildsSortEnum} [sort] Sorting column
516
+ * @param {ListFabricBuildsOrderEnum} [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 listFabricBuilds(
523
+ fabricId: string,
524
+ search?: string,
525
+ sort?: ListFabricBuildsSortEnum,
526
+ order?: ListFabricBuildsOrderEnum,
527
+ limit?: number,
528
+ offset?: number,
529
+ options?: RawAxiosRequestConfig,
530
+ ): Promise<
531
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<FabricBuilds>
532
+ > {
533
+ const localVarAxiosArgs =
534
+ await localVarAxiosParamCreator.listFabricBuilds(
535
+ fabricId,
536
+ search,
537
+ sort,
538
+ order,
539
+ limit,
540
+ offset,
541
+ options,
542
+ );
543
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
544
+ const localVarOperationServerBasePath =
545
+ operationServerMap["FabricApi.listFabricBuilds"]?.[
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 Fabric versions
559
+ * @param {string} [search] Search query
560
+ * @param {*} [options] Override http request option.
561
+ * @throws {RequiredError}
562
+ */
563
+ async listFabrics(
564
+ search?: string,
565
+ options?: RawAxiosRequestConfig,
566
+ ): Promise<
567
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Fabrics>
568
+ > {
569
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listFabrics(
570
+ search,
571
+ options,
572
+ );
573
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
574
+ const localVarOperationServerBasePath =
575
+ operationServerMap["FabricApi.listFabrics"]?.[
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 Fabric versions
589
+ * @param {*} [options] Override http request option.
590
+ * @throws {RequiredError}
591
+ */
592
+ async updateFabric(
593
+ options?: RawAxiosRequestConfig,
594
+ ): Promise<
595
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>
596
+ > {
597
+ const localVarAxiosArgs =
598
+ await localVarAxiosParamCreator.updateFabric(options);
599
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
600
+ const localVarOperationServerBasePath =
601
+ operationServerMap["FabricApi.updateFabric"]?.[
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
+ * FabricApi - factory interface
617
+ * @export
618
+ */
619
+ export const FabricApiFactory = function (
620
+ configuration?: Configuration,
621
+ basePath?: string,
622
+ axios?: AxiosInstance,
623
+ ) {
624
+ const localVarFp = FabricApiFp(configuration);
625
+ return {
626
+ /**
627
+ *
628
+ * @summary Attach a build to a Fabric version
629
+ * @param {FabricApiAttachFabricToBuildRequest} requestParameters Request parameters.
630
+ * @param {*} [options] Override http request option.
631
+ * @throws {RequiredError}
632
+ */
633
+ attachFabricToBuild(
634
+ requestParameters: FabricApiAttachFabricToBuildRequest,
635
+ options?: RawAxiosRequestConfig,
636
+ ): AxiosPromise<Notification> {
637
+ return localVarFp
638
+ .attachFabricToBuild(
639
+ requestParameters.fabricId,
640
+ requestParameters.fabricBuildParams,
641
+ options,
642
+ )
643
+ .then((request) => request(axios, basePath));
644
+ },
645
+ /**
646
+ *
647
+ * @summary Unlink a build from a Fabric version
648
+ * @param {FabricApiDeleteFabricFromBuildRequest} requestParameters Request parameters.
649
+ * @param {*} [options] Override http request option.
650
+ * @throws {RequiredError}
651
+ */
652
+ deleteFabricFromBuild(
653
+ requestParameters: FabricApiDeleteFabricFromBuildRequest,
654
+ options?: RawAxiosRequestConfig,
655
+ ): AxiosPromise<Notification> {
656
+ return localVarFp
657
+ .deleteFabricFromBuild(
658
+ requestParameters.fabricId,
659
+ requestParameters.fabricBuildParams,
660
+ options,
661
+ )
662
+ .then((request) => request(axios, basePath));
663
+ },
664
+ /**
665
+ *
666
+ * @summary Fetch the builds attached to a Fabric version
667
+ * @param {FabricApiListFabricBuildsRequest} requestParameters Request parameters.
668
+ * @param {*} [options] Override http request option.
669
+ * @throws {RequiredError}
670
+ */
671
+ listFabricBuilds(
672
+ requestParameters: FabricApiListFabricBuildsRequest,
673
+ options?: RawAxiosRequestConfig,
674
+ ): AxiosPromise<FabricBuilds> {
675
+ return localVarFp
676
+ .listFabricBuilds(
677
+ requestParameters.fabricId,
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 Fabric versions
690
+ * @param {FabricApiListFabricsRequest} requestParameters Request parameters.
691
+ * @param {*} [options] Override http request option.
692
+ * @throws {RequiredError}
693
+ */
694
+ listFabrics(
695
+ requestParameters: FabricApiListFabricsRequest = {},
696
+ options?: RawAxiosRequestConfig,
697
+ ): AxiosPromise<Fabrics> {
698
+ return localVarFp
699
+ .listFabrics(requestParameters.search, options)
700
+ .then((request) => request(axios, basePath));
701
+ },
702
+ /**
703
+ *
704
+ * @summary Update the available Fabric versions
705
+ * @param {*} [options] Override http request option.
706
+ * @throws {RequiredError}
707
+ */
708
+ updateFabric(options?: RawAxiosRequestConfig): AxiosPromise<Notification> {
709
+ return localVarFp
710
+ .updateFabric(options)
711
+ .then((request) => request(axios, basePath));
712
+ },
713
+ };
714
+ };
715
+
716
+ /**
717
+ * Request parameters for attachFabricToBuild operation in FabricApi.
718
+ * @export
719
+ * @interface FabricApiAttachFabricToBuildRequest
720
+ */
721
+ export interface FabricApiAttachFabricToBuildRequest {
722
+ /**
723
+ * A fabric identifier or slug
724
+ * @type {string}
725
+ * @memberof FabricApiAttachFabricToBuild
726
+ */
727
+ readonly fabricId: string;
728
+
729
+ /**
730
+ * The build data to attach
731
+ * @type {FabricBuildParams}
732
+ * @memberof FabricApiAttachFabricToBuild
733
+ */
734
+ readonly fabricBuildParams: FabricBuildParams;
735
+ }
736
+
737
+ /**
738
+ * Request parameters for deleteFabricFromBuild operation in FabricApi.
739
+ * @export
740
+ * @interface FabricApiDeleteFabricFromBuildRequest
741
+ */
742
+ export interface FabricApiDeleteFabricFromBuildRequest {
743
+ /**
744
+ * A fabric identifier or slug
745
+ * @type {string}
746
+ * @memberof FabricApiDeleteFabricFromBuild
747
+ */
748
+ readonly fabricId: string;
749
+
750
+ /**
751
+ * The build data to unlink
752
+ * @type {FabricBuildParams}
753
+ * @memberof FabricApiDeleteFabricFromBuild
754
+ */
755
+ readonly fabricBuildParams: FabricBuildParams;
756
+ }
757
+
758
+ /**
759
+ * Request parameters for listFabricBuilds operation in FabricApi.
760
+ * @export
761
+ * @interface FabricApiListFabricBuildsRequest
762
+ */
763
+ export interface FabricApiListFabricBuildsRequest {
764
+ /**
765
+ * A fabric identifier or slug
766
+ * @type {string}
767
+ * @memberof FabricApiListFabricBuilds
768
+ */
769
+ readonly fabricId: string;
770
+
771
+ /**
772
+ * Search query
773
+ * @type {string}
774
+ * @memberof FabricApiListFabricBuilds
775
+ */
776
+ readonly search?: string;
777
+
778
+ /**
779
+ * Sorting column
780
+ * @type {'name' | 'public'}
781
+ * @memberof FabricApiListFabricBuilds
782
+ */
783
+ readonly sort?: ListFabricBuildsSortEnum;
784
+
785
+ /**
786
+ * Sorting order
787
+ * @type {'asc' | 'desc'}
788
+ * @memberof FabricApiListFabricBuilds
789
+ */
790
+ readonly order?: ListFabricBuildsOrderEnum;
791
+
792
+ /**
793
+ * Paging limit
794
+ * @type {number}
795
+ * @memberof FabricApiListFabricBuilds
796
+ */
797
+ readonly limit?: number;
798
+
799
+ /**
800
+ * Paging offset
801
+ * @type {number}
802
+ * @memberof FabricApiListFabricBuilds
803
+ */
804
+ readonly offset?: number;
805
+ }
806
+
807
+ /**
808
+ * Request parameters for listFabrics operation in FabricApi.
809
+ * @export
810
+ * @interface FabricApiListFabricsRequest
811
+ */
812
+ export interface FabricApiListFabricsRequest {
813
+ /**
814
+ * Search query
815
+ * @type {string}
816
+ * @memberof FabricApiListFabrics
817
+ */
818
+ readonly search?: string;
819
+ }
820
+
821
+ /**
822
+ * FabricApi - object-oriented interface
823
+ * @export
824
+ * @class FabricApi
825
+ * @extends {BaseAPI}
826
+ */
827
+ export class FabricApi extends BaseAPI {
828
+ /**
829
+ *
830
+ * @summary Attach a build to a Fabric version
831
+ * @param {FabricApiAttachFabricToBuildRequest} requestParameters Request parameters.
832
+ * @param {*} [options] Override http request option.
833
+ * @throws {RequiredError}
834
+ * @memberof FabricApi
835
+ */
836
+ public attachFabricToBuild(
837
+ requestParameters: FabricApiAttachFabricToBuildRequest,
838
+ options?: RawAxiosRequestConfig,
839
+ ) {
840
+ return FabricApiFp(this.configuration)
841
+ .attachFabricToBuild(
842
+ requestParameters.fabricId,
843
+ requestParameters.fabricBuildParams,
844
+ options,
845
+ )
846
+ .then((request) => request(this.axios, this.basePath));
847
+ }
848
+
849
+ /**
850
+ *
851
+ * @summary Unlink a build from a Fabric version
852
+ * @param {FabricApiDeleteFabricFromBuildRequest} requestParameters Request parameters.
853
+ * @param {*} [options] Override http request option.
854
+ * @throws {RequiredError}
855
+ * @memberof FabricApi
856
+ */
857
+ public deleteFabricFromBuild(
858
+ requestParameters: FabricApiDeleteFabricFromBuildRequest,
859
+ options?: RawAxiosRequestConfig,
860
+ ) {
861
+ return FabricApiFp(this.configuration)
862
+ .deleteFabricFromBuild(
863
+ requestParameters.fabricId,
864
+ requestParameters.fabricBuildParams,
865
+ options,
866
+ )
867
+ .then((request) => request(this.axios, this.basePath));
868
+ }
869
+
870
+ /**
871
+ *
872
+ * @summary Fetch the builds attached to a Fabric version
873
+ * @param {FabricApiListFabricBuildsRequest} requestParameters Request parameters.
874
+ * @param {*} [options] Override http request option.
875
+ * @throws {RequiredError}
876
+ * @memberof FabricApi
877
+ */
878
+ public listFabricBuilds(
879
+ requestParameters: FabricApiListFabricBuildsRequest,
880
+ options?: RawAxiosRequestConfig,
881
+ ) {
882
+ return FabricApiFp(this.configuration)
883
+ .listFabricBuilds(
884
+ requestParameters.fabricId,
885
+ requestParameters.search,
886
+ requestParameters.sort,
887
+ requestParameters.order,
888
+ requestParameters.limit,
889
+ requestParameters.offset,
890
+ options,
891
+ )
892
+ .then((request) => request(this.axios, this.basePath));
893
+ }
894
+
895
+ /**
896
+ *
897
+ * @summary Fetch the available Fabric versions
898
+ * @param {FabricApiListFabricsRequest} requestParameters Request parameters.
899
+ * @param {*} [options] Override http request option.
900
+ * @throws {RequiredError}
901
+ * @memberof FabricApi
902
+ */
903
+ public listFabrics(
904
+ requestParameters: FabricApiListFabricsRequest = {},
905
+ options?: RawAxiosRequestConfig,
906
+ ) {
907
+ return FabricApiFp(this.configuration)
908
+ .listFabrics(requestParameters.search, options)
909
+ .then((request) => request(this.axios, this.basePath));
910
+ }
911
+
912
+ /**
913
+ *
914
+ * @summary Update the available Fabric versions
915
+ * @param {*} [options] Override http request option.
916
+ * @throws {RequiredError}
917
+ * @memberof FabricApi
918
+ */
919
+ public updateFabric(options?: RawAxiosRequestConfig) {
920
+ return FabricApiFp(this.configuration)
921
+ .updateFabric(options)
922
+ .then((request) => request(this.axios, this.basePath));
923
+ }
924
+ }
925
+
926
+ /**
927
+ * @export
928
+ */
929
+ export const ListFabricBuildsSortEnum = {
930
+ Name: "name",
931
+ Public: "public",
932
+ } as const;
933
+ export type ListFabricBuildsSortEnum =
934
+ (typeof ListFabricBuildsSortEnum)[keyof typeof ListFabricBuildsSortEnum];
935
+ /**
936
+ * @export
937
+ */
938
+ export const ListFabricBuildsOrderEnum = {
939
+ Asc: "asc",
940
+ Desc: "desc",
941
+ } as const;
942
+ export type ListFabricBuildsOrderEnum =
943
+ (typeof ListFabricBuildsOrderEnum)[keyof typeof ListFabricBuildsOrderEnum];