@flurin17/rapidata-typescript-sdk 0.1.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.
@@ -0,0 +1,4420 @@
1
+ // src/generated/core/ApiError.ts
2
+ var ApiError = class extends Error {
3
+ url;
4
+ status;
5
+ statusText;
6
+ body;
7
+ request;
8
+ constructor(request2, response, message) {
9
+ super(message);
10
+ this.name = "ApiError";
11
+ this.url = response.url;
12
+ this.status = response.status;
13
+ this.statusText = response.statusText;
14
+ this.body = response.body;
15
+ this.request = request2;
16
+ }
17
+ };
18
+
19
+ // src/generated/core/CancelablePromise.ts
20
+ var CancelError = class extends Error {
21
+ constructor(message) {
22
+ super(message);
23
+ this.name = "CancelError";
24
+ }
25
+ get isCancelled() {
26
+ return true;
27
+ }
28
+ };
29
+ var CancelablePromise = class {
30
+ #isResolved;
31
+ #isRejected;
32
+ #isCancelled;
33
+ #cancelHandlers;
34
+ #promise;
35
+ #resolve;
36
+ #reject;
37
+ constructor(executor) {
38
+ this.#isResolved = false;
39
+ this.#isRejected = false;
40
+ this.#isCancelled = false;
41
+ this.#cancelHandlers = [];
42
+ this.#promise = new Promise((resolve2, reject) => {
43
+ this.#resolve = resolve2;
44
+ this.#reject = reject;
45
+ const onResolve = (value) => {
46
+ if (this.#isResolved || this.#isRejected || this.#isCancelled) {
47
+ return;
48
+ }
49
+ this.#isResolved = true;
50
+ if (this.#resolve) this.#resolve(value);
51
+ };
52
+ const onReject = (reason) => {
53
+ if (this.#isResolved || this.#isRejected || this.#isCancelled) {
54
+ return;
55
+ }
56
+ this.#isRejected = true;
57
+ if (this.#reject) this.#reject(reason);
58
+ };
59
+ const onCancel = (cancelHandler) => {
60
+ if (this.#isResolved || this.#isRejected || this.#isCancelled) {
61
+ return;
62
+ }
63
+ this.#cancelHandlers.push(cancelHandler);
64
+ };
65
+ Object.defineProperty(onCancel, "isResolved", {
66
+ get: () => this.#isResolved
67
+ });
68
+ Object.defineProperty(onCancel, "isRejected", {
69
+ get: () => this.#isRejected
70
+ });
71
+ Object.defineProperty(onCancel, "isCancelled", {
72
+ get: () => this.#isCancelled
73
+ });
74
+ return executor(onResolve, onReject, onCancel);
75
+ });
76
+ }
77
+ get [Symbol.toStringTag]() {
78
+ return "Cancellable Promise";
79
+ }
80
+ then(onFulfilled, onRejected) {
81
+ return this.#promise.then(onFulfilled, onRejected);
82
+ }
83
+ catch(onRejected) {
84
+ return this.#promise.catch(onRejected);
85
+ }
86
+ finally(onFinally) {
87
+ return this.#promise.finally(onFinally);
88
+ }
89
+ cancel() {
90
+ if (this.#isResolved || this.#isRejected || this.#isCancelled) {
91
+ return;
92
+ }
93
+ this.#isCancelled = true;
94
+ if (this.#cancelHandlers.length) {
95
+ try {
96
+ for (const cancelHandler of this.#cancelHandlers) {
97
+ cancelHandler();
98
+ }
99
+ } catch (error) {
100
+ console.warn("Cancellation threw an error", error);
101
+ return;
102
+ }
103
+ }
104
+ this.#cancelHandlers.length = 0;
105
+ if (this.#reject) this.#reject(new CancelError("Request aborted"));
106
+ }
107
+ get isCancelled() {
108
+ return this.#isCancelled;
109
+ }
110
+ };
111
+
112
+ // src/generated/core/OpenAPI.ts
113
+ var OpenAPI = {
114
+ BASE: "https://api.rabbitdata.ch",
115
+ VERSION: "1",
116
+ WITH_CREDENTIALS: false,
117
+ CREDENTIALS: "include",
118
+ TOKEN: void 0,
119
+ USERNAME: void 0,
120
+ PASSWORD: void 0,
121
+ HEADERS: void 0,
122
+ ENCODE_PATH: void 0
123
+ };
124
+
125
+ // src/generated/core/request.ts
126
+ var isDefined = (value) => {
127
+ return value !== void 0 && value !== null;
128
+ };
129
+ var isString = (value) => {
130
+ return typeof value === "string";
131
+ };
132
+ var isStringWithValue = (value) => {
133
+ return isString(value) && value !== "";
134
+ };
135
+ var isBlob = (value) => {
136
+ return typeof value === "object" && typeof value.type === "string" && typeof value.stream === "function" && typeof value.arrayBuffer === "function" && typeof value.constructor === "function" && typeof value.constructor.name === "string" && /^(Blob|File)$/.test(value.constructor.name) && /^(Blob|File)$/.test(value[Symbol.toStringTag]);
137
+ };
138
+ var isFormData = (value) => {
139
+ return value instanceof FormData;
140
+ };
141
+ var base64 = (str) => {
142
+ try {
143
+ return btoa(str);
144
+ } catch (err) {
145
+ return Buffer.from(str).toString("base64");
146
+ }
147
+ };
148
+ var getQueryString = (params) => {
149
+ const qs = [];
150
+ const append = (key, value) => {
151
+ qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
152
+ };
153
+ const process = (key, value) => {
154
+ if (isDefined(value)) {
155
+ if (Array.isArray(value)) {
156
+ value.forEach((v) => {
157
+ process(key, v);
158
+ });
159
+ } else if (typeof value === "object") {
160
+ Object.entries(value).forEach(([k, v]) => {
161
+ process(`${key}[${k}]`, v);
162
+ });
163
+ } else {
164
+ append(key, value);
165
+ }
166
+ }
167
+ };
168
+ Object.entries(params).forEach(([key, value]) => {
169
+ process(key, value);
170
+ });
171
+ if (qs.length > 0) {
172
+ return `?${qs.join("&")}`;
173
+ }
174
+ return "";
175
+ };
176
+ var getUrl = (config, options) => {
177
+ const encoder = config.ENCODE_PATH || encodeURI;
178
+ const path = options.url.replace("{api-version}", config.VERSION).replace(/{(.*?)}/g, (substring, group) => {
179
+ if (options.path?.hasOwnProperty(group)) {
180
+ return encoder(String(options.path[group]));
181
+ }
182
+ return substring;
183
+ });
184
+ const url = `${config.BASE}${path}`;
185
+ if (options.query) {
186
+ return `${url}${getQueryString(options.query)}`;
187
+ }
188
+ return url;
189
+ };
190
+ var getFormData = (options) => {
191
+ if (options.formData) {
192
+ const formData = new FormData();
193
+ const process = (key, value) => {
194
+ if (isString(value) || isBlob(value)) {
195
+ formData.append(key, value);
196
+ } else {
197
+ formData.append(key, JSON.stringify(value));
198
+ }
199
+ };
200
+ Object.entries(options.formData).filter(([_, value]) => isDefined(value)).forEach(([key, value]) => {
201
+ if (Array.isArray(value)) {
202
+ value.forEach((v) => process(key, v));
203
+ } else {
204
+ process(key, value);
205
+ }
206
+ });
207
+ return formData;
208
+ }
209
+ return void 0;
210
+ };
211
+ var resolve = async (options, resolver) => {
212
+ if (typeof resolver === "function") {
213
+ return resolver(options);
214
+ }
215
+ return resolver;
216
+ };
217
+ var getHeaders = async (config, options) => {
218
+ const [token, username, password, additionalHeaders] = await Promise.all([
219
+ resolve(options, config.TOKEN),
220
+ resolve(options, config.USERNAME),
221
+ resolve(options, config.PASSWORD),
222
+ resolve(options, config.HEADERS)
223
+ ]);
224
+ const headers = Object.entries({
225
+ Accept: "application/json",
226
+ ...additionalHeaders,
227
+ ...options.headers
228
+ }).filter(([_, value]) => isDefined(value)).reduce((headers2, [key, value]) => ({
229
+ ...headers2,
230
+ [key]: String(value)
231
+ }), {});
232
+ if (isStringWithValue(token)) {
233
+ headers["Authorization"] = `Bearer ${token}`;
234
+ }
235
+ if (isStringWithValue(username) && isStringWithValue(password)) {
236
+ const credentials = base64(`${username}:${password}`);
237
+ headers["Authorization"] = `Basic ${credentials}`;
238
+ }
239
+ if (options.body !== void 0) {
240
+ if (options.mediaType) {
241
+ headers["Content-Type"] = options.mediaType;
242
+ } else if (isBlob(options.body)) {
243
+ headers["Content-Type"] = options.body.type || "application/octet-stream";
244
+ } else if (isString(options.body)) {
245
+ headers["Content-Type"] = "text/plain";
246
+ } else if (!isFormData(options.body)) {
247
+ headers["Content-Type"] = "application/json";
248
+ }
249
+ }
250
+ return new Headers(headers);
251
+ };
252
+ var getRequestBody = (options) => {
253
+ if (options.body !== void 0) {
254
+ if (options.mediaType?.includes("/json")) {
255
+ return JSON.stringify(options.body);
256
+ } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {
257
+ return options.body;
258
+ } else {
259
+ return JSON.stringify(options.body);
260
+ }
261
+ }
262
+ return void 0;
263
+ };
264
+ var sendRequest = async (config, options, url, body, formData, headers, onCancel) => {
265
+ const controller = new AbortController();
266
+ const request2 = {
267
+ headers,
268
+ body: body ?? formData,
269
+ method: options.method,
270
+ signal: controller.signal
271
+ };
272
+ if (config.WITH_CREDENTIALS) {
273
+ request2.credentials = config.CREDENTIALS;
274
+ }
275
+ onCancel(() => controller.abort());
276
+ return await fetch(url, request2);
277
+ };
278
+ var getResponseHeader = (response, responseHeader) => {
279
+ if (responseHeader) {
280
+ const content = response.headers.get(responseHeader);
281
+ if (isString(content)) {
282
+ return content;
283
+ }
284
+ }
285
+ return void 0;
286
+ };
287
+ var getResponseBody = async (response) => {
288
+ if (response.status !== 204) {
289
+ try {
290
+ const contentType = response.headers.get("Content-Type");
291
+ if (contentType) {
292
+ const jsonTypes = ["application/json", "application/problem+json"];
293
+ const isJSON = jsonTypes.some((type) => contentType.toLowerCase().startsWith(type));
294
+ if (isJSON) {
295
+ return await response.json();
296
+ } else {
297
+ return await response.text();
298
+ }
299
+ }
300
+ } catch (error) {
301
+ console.error(error);
302
+ }
303
+ }
304
+ return void 0;
305
+ };
306
+ var catchErrorCodes = (options, result) => {
307
+ const errors = {
308
+ 400: "Bad Request",
309
+ 401: "Unauthorized",
310
+ 403: "Forbidden",
311
+ 404: "Not Found",
312
+ 500: "Internal Server Error",
313
+ 502: "Bad Gateway",
314
+ 503: "Service Unavailable",
315
+ ...options.errors
316
+ };
317
+ const error = errors[result.status];
318
+ if (error) {
319
+ throw new ApiError(options, result, error);
320
+ }
321
+ if (!result.ok) {
322
+ const errorStatus = result.status ?? "unknown";
323
+ const errorStatusText = result.statusText ?? "unknown";
324
+ const errorBody = (() => {
325
+ try {
326
+ return JSON.stringify(result.body, null, 2);
327
+ } catch (e) {
328
+ return void 0;
329
+ }
330
+ })();
331
+ throw new ApiError(
332
+ options,
333
+ result,
334
+ `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`
335
+ );
336
+ }
337
+ };
338
+ var request = (config, options) => {
339
+ return new CancelablePromise(async (resolve2, reject, onCancel) => {
340
+ try {
341
+ const url = getUrl(config, options);
342
+ const formData = getFormData(options);
343
+ const body = getRequestBody(options);
344
+ const headers = await getHeaders(config, options);
345
+ if (!onCancel.isCancelled) {
346
+ const response = await sendRequest(config, options, url, body, formData, headers, onCancel);
347
+ const responseBody = await getResponseBody(response);
348
+ const responseHeader = getResponseHeader(response, options.responseHeader);
349
+ const result = {
350
+ url,
351
+ ok: response.ok,
352
+ status: response.status,
353
+ statusText: response.statusText,
354
+ body: responseHeader ?? responseBody
355
+ };
356
+ catchErrorCodes(options, result);
357
+ resolve2(result.body);
358
+ }
359
+ } catch (error) {
360
+ reject(error);
361
+ }
362
+ });
363
+ };
364
+
365
+ // src/generated/services/AssetService.ts
366
+ var AssetService = class {
367
+ /**
368
+ * Compresses an uploaded image and returns the WebP result.
369
+ * Compression metrics are returned in response headers: X-Original-Size, X-Compressed-Size,
370
+ * X-Processing-Time-Ms, X-Original-Dimensions, X-Output-Dimensions.
371
+ * @returns binary OK
372
+ * @throws ApiError
373
+ */
374
+ static postAssetCompress({
375
+ formData,
376
+ library,
377
+ quality = 85,
378
+ maxdim = 800
379
+ }) {
380
+ return request(OpenAPI, {
381
+ method: "POST",
382
+ url: "/asset/compress",
383
+ query: {
384
+ "library": library,
385
+ "quality": quality,
386
+ "maxdim": maxdim
387
+ },
388
+ formData,
389
+ mediaType: "multipart/form-data",
390
+ errors: {
391
+ 400: `Bad Request`,
392
+ 401: `Unauthenticated`,
393
+ 403: `Forbidden`
394
+ }
395
+ });
396
+ }
397
+ /**
398
+ * Uploads a single asset to S3 and returns the asset details.
399
+ * This endpoint allows uploading a single file to S3 storage with the asset creator.
400
+ * The uploaded asset will be stored using the configured S3 settings and a unique filename will be generated.
401
+ * @returns UploadFileResult OK
402
+ * @throws ApiError
403
+ */
404
+ static postAssetFile({
405
+ formData
406
+ }) {
407
+ return request(OpenAPI, {
408
+ method: "POST",
409
+ url: "/asset/file",
410
+ formData,
411
+ mediaType: "multipart/form-data"
412
+ });
413
+ }
414
+ /**
415
+ * Uploads a single asset to S3 and returns the asset details.
416
+ * This endpoint allows uploading a single file to S3 storage with the asset creator.
417
+ * The uploaded asset will be stored using the configured S3 settings and a unique filename will be generated.
418
+ * @returns UploadFileResult OK
419
+ * @throws ApiError
420
+ */
421
+ static postAssetUrl({
422
+ url
423
+ }) {
424
+ return request(OpenAPI, {
425
+ method: "POST",
426
+ url: "/asset/url",
427
+ query: {
428
+ "url": url
429
+ }
430
+ });
431
+ }
432
+ /**
433
+ * Gets the metadata for an asset by file name.
434
+ * This endpoint retrieves metadata information for an asset stored in S3.
435
+ * The metadata includes details such as content type, size, creation date, and custom metadata fields.
436
+ * @returns GetFileMetadataResult OK
437
+ * @throws ApiError
438
+ */
439
+ static getAssetMetadata({
440
+ fileName
441
+ }) {
442
+ return request(OpenAPI, {
443
+ method: "GET",
444
+ url: "/asset/{fileName}/metadata",
445
+ path: {
446
+ "fileName": fileName
447
+ },
448
+ errors: {
449
+ 404: `Not Found`
450
+ }
451
+ });
452
+ }
453
+ };
454
+
455
+ // src/generated/services/AudienceService.ts
456
+ var AudienceService = class {
457
+ /**
458
+ * Deletes the specified audience.
459
+ * @returns void
460
+ * @throws ApiError
461
+ */
462
+ static deleteAudience({
463
+ audienceId
464
+ }) {
465
+ return request(OpenAPI, {
466
+ method: "DELETE",
467
+ url: "/audience/{audienceId}",
468
+ path: {
469
+ "audienceId": audienceId
470
+ },
471
+ errors: {
472
+ 400: `Bad Request`,
473
+ 401: `Unauthenticated`,
474
+ 403: `Forbidden`
475
+ }
476
+ });
477
+ }
478
+ /**
479
+ * Gets an audience by its Id.
480
+ * @returns GetAudienceByIdResult OK
481
+ * @throws ApiError
482
+ */
483
+ static getAudience({
484
+ audienceId
485
+ }) {
486
+ return request(OpenAPI, {
487
+ method: "GET",
488
+ url: "/audience/{audienceId}",
489
+ path: {
490
+ "audienceId": audienceId
491
+ }
492
+ });
493
+ }
494
+ /**
495
+ * Patches an existing audience.
496
+ * @returns void
497
+ * @throws ApiError
498
+ */
499
+ static patchAudience({
500
+ audienceId,
501
+ requestBody
502
+ }) {
503
+ return request(OpenAPI, {
504
+ method: "PATCH",
505
+ url: "/audience/{audienceId}",
506
+ path: {
507
+ "audienceId": audienceId
508
+ },
509
+ body: requestBody,
510
+ mediaType: "application/json"
511
+ });
512
+ }
513
+ /**
514
+ * Gets the count of users in each state for the specified audience.
515
+ * @returns GetAudienceUserStateMetricsResult OK
516
+ * @throws ApiError
517
+ */
518
+ static getAudienceUserMetrics({
519
+ audienceId
520
+ }) {
521
+ return request(OpenAPI, {
522
+ method: "GET",
523
+ url: "/audience/{audienceId}/user-metrics",
524
+ path: {
525
+ "audienceId": audienceId
526
+ },
527
+ errors: {
528
+ 400: `Bad Request`,
529
+ 401: `Unauthenticated`,
530
+ 403: `Forbidden`
531
+ }
532
+ });
533
+ }
534
+ /**
535
+ * Pauses the distillation campaign for the specified audience.
536
+ * @returns void
537
+ * @throws ApiError
538
+ */
539
+ static postAudiencePauseDistillation({
540
+ audienceId
541
+ }) {
542
+ return request(OpenAPI, {
543
+ method: "POST",
544
+ url: "/audience/{audienceId}/pause-distillation",
545
+ path: {
546
+ "audienceId": audienceId
547
+ },
548
+ errors: {
549
+ 400: `Bad Request`,
550
+ 401: `Unauthenticated`,
551
+ 403: `Forbidden`
552
+ }
553
+ });
554
+ }
555
+ /**
556
+ * Queries jobs for the specified audience.
557
+ * @returns PagedResultOfQueryJobsResult OK
558
+ * @throws ApiError
559
+ */
560
+ static getAudienceJobs({
561
+ audienceId
562
+ }) {
563
+ return request(OpenAPI, {
564
+ method: "GET",
565
+ url: "/audience/{audienceId}/jobs",
566
+ path: {
567
+ "audienceId": audienceId
568
+ },
569
+ errors: {
570
+ 400: `Bad Request`,
571
+ 401: `Unauthenticated`,
572
+ 403: `Forbidden`
573
+ }
574
+ });
575
+ }
576
+ /**
577
+ * Rebuilds the distilling campaign for the specified audience.
578
+ * Recalculates campaign filters and selections based on the audience's current settings
579
+ * (demographic filters, exit conditions, etc.).
580
+ * @returns void
581
+ * @throws ApiError
582
+ */
583
+ static postAudienceRebuildDistillingCampaign({
584
+ audienceId
585
+ }) {
586
+ return request(OpenAPI, {
587
+ method: "POST",
588
+ url: "/audience/{audienceId}/rebuild-distilling-campaign",
589
+ path: {
590
+ "audienceId": audienceId
591
+ },
592
+ errors: {
593
+ 400: `Bad Request`,
594
+ 401: `Unauthenticated`,
595
+ 403: `Forbidden`
596
+ }
597
+ });
598
+ }
599
+ /**
600
+ * Recreates external audiences for the specified audience.
601
+ * @returns void
602
+ * @throws ApiError
603
+ */
604
+ static postAudienceRecreateExternalAudiences({
605
+ audienceId,
606
+ requestBody
607
+ }) {
608
+ return request(OpenAPI, {
609
+ method: "POST",
610
+ url: "/audience/{audienceId}/recreate-external-audiences",
611
+ path: {
612
+ "audienceId": audienceId
613
+ },
614
+ body: requestBody,
615
+ mediaType: "application/json",
616
+ errors: {
617
+ 400: `Bad Request`,
618
+ 401: `Unauthenticated`,
619
+ 403: `Forbidden`
620
+ }
621
+ });
622
+ }
623
+ /**
624
+ * Resumes the distillation campaign for the specified audience.
625
+ * @returns void
626
+ * @throws ApiError
627
+ */
628
+ static postAudienceResumeDistillation({
629
+ audienceId
630
+ }) {
631
+ return request(OpenAPI, {
632
+ method: "POST",
633
+ url: "/audience/{audienceId}/resume-distillation",
634
+ path: {
635
+ "audienceId": audienceId
636
+ },
637
+ errors: {
638
+ 400: `Bad Request`,
639
+ 401: `Unauthenticated`,
640
+ 403: `Forbidden`
641
+ }
642
+ });
643
+ }
644
+ /**
645
+ * Starts recruiting users for the specified audience.
646
+ * @returns void
647
+ * @throws ApiError
648
+ */
649
+ static postAudienceRecruit({
650
+ audienceId
651
+ }) {
652
+ return request(OpenAPI, {
653
+ method: "POST",
654
+ url: "/audience/{audienceId}/recruit",
655
+ path: {
656
+ "audienceId": audienceId
657
+ },
658
+ errors: {
659
+ 400: `Bad Request`,
660
+ 401: `Unauthenticated`,
661
+ 403: `Forbidden`
662
+ }
663
+ });
664
+ }
665
+ /**
666
+ * Updates the boost configuration for the specified audience.
667
+ * @returns void
668
+ * @throws ApiError
669
+ */
670
+ static patchAudienceBoostConfig({
671
+ audienceId,
672
+ requestBody
673
+ }) {
674
+ return request(OpenAPI, {
675
+ method: "PATCH",
676
+ url: "/audience/{audienceId}/boost-config",
677
+ path: {
678
+ "audienceId": audienceId
679
+ },
680
+ body: requestBody,
681
+ mediaType: "application/json",
682
+ errors: {
683
+ 400: `Bad Request`,
684
+ 401: `Unauthenticated`,
685
+ 403: `Forbidden`
686
+ }
687
+ });
688
+ }
689
+ /**
690
+ * Queries all available audiences.
691
+ * @returns PagedResultOfQueryAudiencesResult OK
692
+ * @throws ApiError
693
+ */
694
+ static getAudiences({
695
+ request: request2
696
+ }) {
697
+ return request(OpenAPI, {
698
+ method: "GET",
699
+ url: "/audiences",
700
+ query: {
701
+ "request": request2
702
+ }
703
+ });
704
+ }
705
+ /**
706
+ * Creates a new empty audience.
707
+ * An audience is a group of users that are trained to solve particular tasks.
708
+ * @returns CreateAudienceResult OK
709
+ * @throws ApiError
710
+ */
711
+ static postAudience({
712
+ requestBody
713
+ }) {
714
+ return request(OpenAPI, {
715
+ method: "POST",
716
+ url: "/audience",
717
+ body: requestBody,
718
+ mediaType: "application/json"
719
+ });
720
+ }
721
+ };
722
+
723
+ // src/generated/services/BatchUploadService.ts
724
+ var BatchUploadService = class {
725
+ /**
726
+ * Aborts the specified batch upload.
727
+ * URLs already processed will not be reverted. Only remaining URLs are prevented from processing.
728
+ * @returns void
729
+ * @throws ApiError
730
+ */
731
+ static postAssetBatchUploadAbort({
732
+ batchUploadId
733
+ }) {
734
+ return request(OpenAPI, {
735
+ method: "POST",
736
+ url: "/asset/batch-upload/{batchUploadId}/abort",
737
+ path: {
738
+ "batchUploadId": batchUploadId
739
+ },
740
+ errors: {
741
+ 400: `Bad Request`,
742
+ 401: `Unauthenticated`,
743
+ 403: `Forbidden`
744
+ }
745
+ });
746
+ }
747
+ /**
748
+ * Creates a batch upload and queues processing for each URL.
749
+ * Each URL is processed asynchronously. Use the batch upload status or result endpoints to track progress.
750
+ * @returns CreateBatchUploadEndpoint_Output OK
751
+ * @throws ApiError
752
+ */
753
+ static postAssetBatchUpload({
754
+ requestBody
755
+ }) {
756
+ return request(OpenAPI, {
757
+ method: "POST",
758
+ url: "/asset/batch-upload",
759
+ body: requestBody,
760
+ mediaType: "application/json",
761
+ errors: {
762
+ 400: `Bad Request`,
763
+ 401: `Unauthenticated`,
764
+ 403: `Forbidden`
765
+ }
766
+ });
767
+ }
768
+ /**
769
+ * Gets the full result of a batch upload including all items.
770
+ * @returns GetBatchUploadResultEndpoint_Output OK
771
+ * @throws ApiError
772
+ */
773
+ static getAssetBatchUpload({
774
+ batchUploadId
775
+ }) {
776
+ return request(OpenAPI, {
777
+ method: "GET",
778
+ url: "/asset/batch-upload/{batchUploadId}",
779
+ path: {
780
+ "batchUploadId": batchUploadId
781
+ },
782
+ errors: {
783
+ 400: `Bad Request`,
784
+ 401: `Unauthenticated`,
785
+ 403: `Forbidden`
786
+ }
787
+ });
788
+ }
789
+ /**
790
+ * Gets aggregated status for batch uploads identified by IDs or a correlation ID.
791
+ * @returns GetBatchUploadStatusEndpoint_Output OK
792
+ * @throws ApiError
793
+ */
794
+ static getAssetBatchUploadStatus({
795
+ batchUploadIds,
796
+ correlationId
797
+ }) {
798
+ return request(OpenAPI, {
799
+ method: "GET",
800
+ url: "/asset/batch-upload/status",
801
+ query: {
802
+ "batchUploadIds": batchUploadIds,
803
+ "correlationId": correlationId
804
+ },
805
+ errors: {
806
+ 400: `Bad Request`,
807
+ 401: `Unauthenticated`,
808
+ 403: `Forbidden`
809
+ }
810
+ });
811
+ }
812
+ };
813
+
814
+ // src/generated/services/BenchmarkService.ts
815
+ var BenchmarkService = class {
816
+ /**
817
+ * Returns the pairwise vote matrix for a benchmark.
818
+ * The matrix is returned in pandas split format.
819
+ * @returns VoteMatrixResult OK
820
+ * @throws ApiError
821
+ */
822
+ static getBenchmarkMatrix({
823
+ benchmarkId,
824
+ tags,
825
+ participantIds,
826
+ leaderboardIds,
827
+ useWeightedScoring = false
828
+ }) {
829
+ return request(OpenAPI, {
830
+ method: "GET",
831
+ url: "/benchmark/{benchmarkId}/matrix",
832
+ path: {
833
+ "benchmarkId": benchmarkId
834
+ },
835
+ query: {
836
+ "tags": tags,
837
+ "participantIds": participantIds,
838
+ "leaderboardIds": leaderboardIds,
839
+ "useWeightedScoring": useWeightedScoring
840
+ },
841
+ errors: {
842
+ 400: `Bad Request`,
843
+ 401: `Unauthenticated`,
844
+ 403: `Forbidden`
845
+ }
846
+ });
847
+ }
848
+ /**
849
+ * Returns the combined pairwise vote matrix for multiple benchmarks.
850
+ * @returns GetCombinedBenchmarkMatrixEndpoint_Output OK
851
+ * @throws ApiError
852
+ */
853
+ static getBenchmarkCombinedMatrix({
854
+ benchmarkIds,
855
+ useWeightedScoring = false
856
+ }) {
857
+ return request(OpenAPI, {
858
+ method: "GET",
859
+ url: "/benchmark/combined-matrix",
860
+ query: {
861
+ "benchmarkIds": benchmarkIds,
862
+ "useWeightedScoring": useWeightedScoring
863
+ },
864
+ errors: {
865
+ 400: `Bad Request`,
866
+ 401: `Unauthenticated`,
867
+ 403: `Forbidden`
868
+ }
869
+ });
870
+ }
871
+ /**
872
+ * Returns the combined standings for multiple benchmarks.
873
+ * @returns GetCombinedBenchmarkStandingsEndpoint_Output OK
874
+ * @throws ApiError
875
+ */
876
+ static getBenchmarkCombinedStandings({
877
+ benchmarkIds,
878
+ useWeightedScoring = false,
879
+ includeConfidenceIntervals = false
880
+ }) {
881
+ return request(OpenAPI, {
882
+ method: "GET",
883
+ url: "/benchmark/combined-standings",
884
+ query: {
885
+ "benchmarkIds": benchmarkIds,
886
+ "useWeightedScoring": useWeightedScoring,
887
+ "includeConfidenceIntervals": includeConfidenceIntervals
888
+ },
889
+ errors: {
890
+ 400: `Bad Request`,
891
+ 401: `Unauthenticated`,
892
+ 403: `Forbidden`
893
+ }
894
+ });
895
+ }
896
+ /**
897
+ * Queries all benchmarks of the user.
898
+ * @returns PagedResultOfBenchmarkQueryResult OK
899
+ * @throws ApiError
900
+ */
901
+ static getBenchmarks({
902
+ request: request2
903
+ }) {
904
+ return request(OpenAPI, {
905
+ method: "GET",
906
+ url: "/benchmarks",
907
+ query: {
908
+ "request": request2
909
+ }
910
+ });
911
+ }
912
+ /**
913
+ * Queries all leaderboards for the current user's benchmarks.
914
+ * @returns PagedResultOfLeaderboardsQueryResult OK
915
+ * @throws ApiError
916
+ */
917
+ static getBenchmarkLeaderboards({
918
+ benchmarkId,
919
+ request: request2
920
+ }) {
921
+ return request(OpenAPI, {
922
+ method: "GET",
923
+ url: "/benchmark/{benchmarkId}/leaderboards",
924
+ path: {
925
+ "benchmarkId": benchmarkId
926
+ },
927
+ query: {
928
+ "request": request2
929
+ }
930
+ });
931
+ }
932
+ /**
933
+ * Creates a benchmark
934
+ * @returns CreateBenchmarkResult OK
935
+ * @throws ApiError
936
+ */
937
+ static postBenchmark({
938
+ requestBody
939
+ }) {
940
+ return request(OpenAPI, {
941
+ method: "POST",
942
+ url: "/benchmark",
943
+ body: requestBody,
944
+ mediaType: "application/json"
945
+ });
946
+ }
947
+ /**
948
+ * Returns a single benchmark by its ID.
949
+ * @returns GetBenchmarkByIdResult OK
950
+ * @throws ApiError
951
+ */
952
+ static getBenchmark({
953
+ benchmarkId
954
+ }) {
955
+ return request(OpenAPI, {
956
+ method: "GET",
957
+ url: "/benchmark/{benchmarkId}",
958
+ path: {
959
+ "benchmarkId": benchmarkId
960
+ }
961
+ });
962
+ }
963
+ /**
964
+ * Deletes a single benchmark.
965
+ * @returns void
966
+ * @throws ApiError
967
+ */
968
+ static deleteBenchmark({
969
+ benchmarkId
970
+ }) {
971
+ return request(OpenAPI, {
972
+ method: "DELETE",
973
+ url: "/benchmark/{benchmarkId}",
974
+ path: {
975
+ "benchmarkId": benchmarkId
976
+ }
977
+ });
978
+ }
979
+ /**
980
+ * Updates a benchmark using patch semantics.
981
+ * @returns void
982
+ * @throws ApiError
983
+ */
984
+ static patchBenchmark({
985
+ benchmarkId,
986
+ requestBody
987
+ }) {
988
+ return request(OpenAPI, {
989
+ method: "PATCH",
990
+ url: "/benchmark/{benchmarkId}",
991
+ path: {
992
+ "benchmarkId": benchmarkId
993
+ },
994
+ body: requestBody,
995
+ mediaType: "application/json"
996
+ });
997
+ }
998
+ /**
999
+ * Query all participants within a benchmark
1000
+ * @returns PagedResultOfParticipantByBenchmark OK
1001
+ * @throws ApiError
1002
+ */
1003
+ static getBenchmarkParticipants({
1004
+ benchmarkId,
1005
+ request: request2
1006
+ }) {
1007
+ return request(OpenAPI, {
1008
+ method: "GET",
1009
+ url: "/benchmark/{benchmarkId}/participants",
1010
+ path: {
1011
+ "benchmarkId": benchmarkId
1012
+ },
1013
+ query: {
1014
+ "request": request2
1015
+ }
1016
+ });
1017
+ }
1018
+ /**
1019
+ * Creates a participant in a benchmark.
1020
+ * @returns CreateBenchmarkParticipantResult OK
1021
+ * @throws ApiError
1022
+ */
1023
+ static postBenchmarkParticipants({
1024
+ benchmarkId,
1025
+ requestBody
1026
+ }) {
1027
+ return request(OpenAPI, {
1028
+ method: "POST",
1029
+ url: "/benchmark/{benchmarkId}/participants",
1030
+ path: {
1031
+ "benchmarkId": benchmarkId
1032
+ },
1033
+ body: requestBody,
1034
+ mediaType: "application/json"
1035
+ });
1036
+ }
1037
+ /**
1038
+ * Queries all the standings for a benchmark by its ID.
1039
+ * @returns StandingsByBenchmarkResult OK
1040
+ * @throws ApiError
1041
+ */
1042
+ static getBenchmarkStandings({
1043
+ benchmarkId,
1044
+ tags,
1045
+ participantIds,
1046
+ leaderboardIds,
1047
+ useWeightedScoring = false,
1048
+ includeConfidenceIntervals = false
1049
+ }) {
1050
+ return request(OpenAPI, {
1051
+ method: "GET",
1052
+ url: "/benchmark/{benchmarkId}/standings",
1053
+ path: {
1054
+ "benchmarkId": benchmarkId
1055
+ },
1056
+ query: {
1057
+ "tags": tags,
1058
+ "participantIds": participantIds,
1059
+ "leaderboardIds": leaderboardIds,
1060
+ "useWeightedScoring": useWeightedScoring,
1061
+ "includeConfidenceIntervals": includeConfidenceIntervals
1062
+ }
1063
+ });
1064
+ }
1065
+ /**
1066
+ * Creates a copy of a public benchmark and all of its related entities
1067
+ * @returns ForkBenchmarkResult OK
1068
+ * @throws ApiError
1069
+ */
1070
+ static postBenchmarkFork({
1071
+ benchmarkId
1072
+ }) {
1073
+ return request(OpenAPI, {
1074
+ method: "POST",
1075
+ url: "/benchmark/{benchmarkId}/fork",
1076
+ path: {
1077
+ "benchmarkId": benchmarkId
1078
+ }
1079
+ });
1080
+ }
1081
+ /**
1082
+ * Returns the paged prompts of a benchmark by its ID.
1083
+ * @returns PagedResultOfPromptByBenchmarkResult OK
1084
+ * @throws ApiError
1085
+ */
1086
+ static getBenchmarkPrompts({
1087
+ benchmarkId,
1088
+ request: request2
1089
+ }) {
1090
+ return request(OpenAPI, {
1091
+ method: "GET",
1092
+ url: "/benchmark/{benchmarkId}/prompts",
1093
+ path: {
1094
+ "benchmarkId": benchmarkId
1095
+ },
1096
+ query: {
1097
+ "request": request2
1098
+ }
1099
+ });
1100
+ }
1101
+ /**
1102
+ * Returns the paged prompts of a benchmark by its ID.
1103
+ * @returns PagedResultOfSampleByIdentifier OK
1104
+ * @throws ApiError
1105
+ */
1106
+ static getBenchmarkSamples({
1107
+ benchmarkId,
1108
+ identifier,
1109
+ request: request2
1110
+ }) {
1111
+ return request(OpenAPI, {
1112
+ method: "GET",
1113
+ url: "/benchmark/{benchmarkId}/samples/{identifier}",
1114
+ path: {
1115
+ "benchmarkId": benchmarkId,
1116
+ "identifier": identifier
1117
+ },
1118
+ query: {
1119
+ "request": request2
1120
+ }
1121
+ });
1122
+ }
1123
+ /**
1124
+ * Adds a new prompt to a benchmark.
1125
+ * @returns CreateBenchmarkPromptResult OK
1126
+ * @throws ApiError
1127
+ */
1128
+ static postBenchmarkPrompt({
1129
+ benchmarkId,
1130
+ requestBody
1131
+ }) {
1132
+ return request(OpenAPI, {
1133
+ method: "POST",
1134
+ url: "/benchmark/{benchmarkId}/prompt",
1135
+ path: {
1136
+ "benchmarkId": benchmarkId
1137
+ },
1138
+ body: requestBody,
1139
+ mediaType: "application/json"
1140
+ });
1141
+ }
1142
+ /**
1143
+ * Query all tags within a benchmark
1144
+ * @returns TagsByBenchmarkResult OK
1145
+ * @throws ApiError
1146
+ */
1147
+ static getBenchmarkTags({
1148
+ benchmarkId
1149
+ }) {
1150
+ return request(OpenAPI, {
1151
+ method: "GET",
1152
+ url: "/benchmark/{benchmarkId}/tags",
1153
+ path: {
1154
+ "benchmarkId": benchmarkId
1155
+ }
1156
+ });
1157
+ }
1158
+ };
1159
+
1160
+ // src/generated/services/CacheService.ts
1161
+ var CacheService = class {
1162
+ /**
1163
+ * Returns the current state of the in-memory campaign cache.
1164
+ * @returns GetCampaignCacheEndpoint_Output OK
1165
+ * @throws ApiError
1166
+ */
1167
+ static getCampaignCacheCampaigns() {
1168
+ return request(OpenAPI, {
1169
+ method: "GET",
1170
+ url: "/campaign/cache/campaigns",
1171
+ errors: {
1172
+ 400: `Bad Request`,
1173
+ 401: `Unauthenticated`,
1174
+ 403: `Forbidden`
1175
+ }
1176
+ });
1177
+ }
1178
+ /**
1179
+ * Returns the current state of the in-memory default user score cache.
1180
+ * @returns GetUserScoreCacheEndpoint_Output OK
1181
+ * @throws ApiError
1182
+ */
1183
+ static getCampaignCacheUserScores() {
1184
+ return request(OpenAPI, {
1185
+ method: "GET",
1186
+ url: "/campaign/cache/user-scores",
1187
+ errors: {
1188
+ 400: `Bad Request`,
1189
+ 401: `Unauthenticated`,
1190
+ 403: `Forbidden`
1191
+ }
1192
+ });
1193
+ }
1194
+ };
1195
+
1196
+ // src/generated/services/CampaignService.ts
1197
+ var CampaignService = class {
1198
+ /**
1199
+ * Changes the boost configuration.
1200
+ * @returns void
1201
+ * @throws ApiError
1202
+ */
1203
+ static putCampaignBoost({
1204
+ requestBody
1205
+ }) {
1206
+ return request(OpenAPI, {
1207
+ method: "PUT",
1208
+ url: "/campaign/boost",
1209
+ body: requestBody,
1210
+ mediaType: "application/json",
1211
+ errors: {
1212
+ 400: `Bad Request`,
1213
+ 401: `Unauthenticated`,
1214
+ 403: `Forbidden`
1215
+ }
1216
+ });
1217
+ }
1218
+ /**
1219
+ * Returns the current boost status including active and inactive campaigns.
1220
+ * @returns GetBoostStatusEndpoint_Output OK
1221
+ * @throws ApiError
1222
+ */
1223
+ static getCampaignBoostStatus() {
1224
+ return request(OpenAPI, {
1225
+ method: "GET",
1226
+ url: "/campaign/boost/status",
1227
+ errors: {
1228
+ 400: `Bad Request`,
1229
+ 401: `Unauthenticated`,
1230
+ 403: `Forbidden`
1231
+ }
1232
+ });
1233
+ }
1234
+ /**
1235
+ * @returns any OK
1236
+ * @throws ApiError
1237
+ */
1238
+ static getCampaignMonitor() {
1239
+ return request(OpenAPI, {
1240
+ method: "GET",
1241
+ url: "/campaign/monitor",
1242
+ errors: {
1243
+ 400: `Bad Request`
1244
+ }
1245
+ });
1246
+ }
1247
+ /**
1248
+ * Pauses the specified campaign.
1249
+ * @returns void
1250
+ * @throws ApiError
1251
+ */
1252
+ static postCampaignPause({
1253
+ campaignId
1254
+ }) {
1255
+ return request(OpenAPI, {
1256
+ method: "POST",
1257
+ url: "/campaign/{campaignId}/pause",
1258
+ path: {
1259
+ "campaignId": campaignId
1260
+ },
1261
+ errors: {
1262
+ 400: `Bad Request`,
1263
+ 401: `Unauthenticated`,
1264
+ 403: `Forbidden`
1265
+ }
1266
+ });
1267
+ }
1268
+ /**
1269
+ * Queries campaigns with optional filtering, sorting, and pagination.
1270
+ * @returns QueryCampaignsEndpoint_PagedResultOfOutput OK
1271
+ * @throws ApiError
1272
+ */
1273
+ static getCampaigns({
1274
+ page,
1275
+ pageSize,
1276
+ sort,
1277
+ id,
1278
+ name,
1279
+ status,
1280
+ priority,
1281
+ ownerMail,
1282
+ createdAt
1283
+ }) {
1284
+ return request(OpenAPI, {
1285
+ method: "GET",
1286
+ url: "/campaigns",
1287
+ query: {
1288
+ "page": page,
1289
+ "page_size": pageSize,
1290
+ "sort": sort,
1291
+ "id": id,
1292
+ "name": name,
1293
+ "status": status,
1294
+ "priority": priority,
1295
+ "owner_mail": ownerMail,
1296
+ "created_at": createdAt
1297
+ },
1298
+ errors: {
1299
+ 400: `Bad Request`,
1300
+ 401: `Unauthenticated`,
1301
+ 403: `Forbidden`
1302
+ }
1303
+ });
1304
+ }
1305
+ /**
1306
+ * Resumes the specified campaign.
1307
+ * @returns void
1308
+ * @throws ApiError
1309
+ */
1310
+ static postCampaignResume({
1311
+ campaignId
1312
+ }) {
1313
+ return request(OpenAPI, {
1314
+ method: "POST",
1315
+ url: "/campaign/{campaignId}/resume",
1316
+ path: {
1317
+ "campaignId": campaignId
1318
+ },
1319
+ errors: {
1320
+ 400: `Bad Request`,
1321
+ 401: `Unauthenticated`,
1322
+ 403: `Forbidden`
1323
+ }
1324
+ });
1325
+ }
1326
+ /**
1327
+ * Updates the specified campaign's properties.
1328
+ * @returns void
1329
+ * @throws ApiError
1330
+ */
1331
+ static patchCampaign({
1332
+ campaignId,
1333
+ requestBody
1334
+ }) {
1335
+ return request(OpenAPI, {
1336
+ method: "PATCH",
1337
+ url: "/campaign/{campaignId}",
1338
+ path: {
1339
+ "campaignId": campaignId
1340
+ },
1341
+ body: requestBody,
1342
+ mediaType: "application/json",
1343
+ errors: {
1344
+ 400: `Bad Request`,
1345
+ 401: `Unauthenticated`,
1346
+ 403: `Forbidden`
1347
+ }
1348
+ });
1349
+ }
1350
+ };
1351
+
1352
+ // src/generated/services/ClientService.ts
1353
+ var ClientService = class {
1354
+ /**
1355
+ * Queries the clients for the current customer.
1356
+ * A client allows a customer to authenticate with the APIs without using their own credentials.
1357
+ * This is useful for creating service accounts or other automated processes,
1358
+ * as when using the Rapidata Python SDK.
1359
+ * @returns PagedResultOfClientsQueryResult OK
1360
+ * @throws ApiError
1361
+ */
1362
+ static getClients({
1363
+ request: request2
1364
+ }) {
1365
+ return request(OpenAPI, {
1366
+ method: "GET",
1367
+ url: "/clients",
1368
+ query: {
1369
+ "request": request2
1370
+ }
1371
+ });
1372
+ }
1373
+ /**
1374
+ * Gets a specific client by its ID.
1375
+ * @returns ClientModel OK
1376
+ * @throws ApiError
1377
+ */
1378
+ static getClient({
1379
+ clientId
1380
+ }) {
1381
+ return request(OpenAPI, {
1382
+ method: "GET",
1383
+ url: "/client/{clientId}",
1384
+ path: {
1385
+ "clientId": clientId
1386
+ }
1387
+ });
1388
+ }
1389
+ /**
1390
+ * Deletes a customers' client.
1391
+ * @returns void
1392
+ * @throws ApiError
1393
+ */
1394
+ static deleteClient({
1395
+ clientId
1396
+ }) {
1397
+ return request(OpenAPI, {
1398
+ method: "DELETE",
1399
+ url: "/client/{clientId}",
1400
+ path: {
1401
+ "clientId": clientId
1402
+ }
1403
+ });
1404
+ }
1405
+ /**
1406
+ * Creates a new client for the current customer.
1407
+ * @returns CreateCustomerClientResult OK
1408
+ * @throws ApiError
1409
+ */
1410
+ static postClient({
1411
+ requestBody
1412
+ }) {
1413
+ return request(OpenAPI, {
1414
+ method: "POST",
1415
+ url: "/client",
1416
+ body: requestBody,
1417
+ mediaType: "application/json"
1418
+ });
1419
+ }
1420
+ /**
1421
+ * Registers a new client dynamically.
1422
+ * The implementation of this method follows the OpenID Connect Dynamic Client Registration.
1423
+ * @returns ClientModel Created
1424
+ * @throws ApiError
1425
+ */
1426
+ static postClientRegister({
1427
+ requestBody
1428
+ }) {
1429
+ return request(OpenAPI, {
1430
+ method: "POST",
1431
+ url: "/client/register",
1432
+ body: requestBody,
1433
+ mediaType: "application/json"
1434
+ });
1435
+ }
1436
+ };
1437
+
1438
+ // src/generated/services/CustomerService.ts
1439
+ var CustomerService = class {
1440
+ /**
1441
+ * Queries customers with filtering and pagination.
1442
+ * Results are scoped to customers that belong to the caller's organization.
1443
+ * @returns QueryCustomersEndpoint_PagedResultOfOutput OK
1444
+ * @throws ApiError
1445
+ */
1446
+ static getCustomers({
1447
+ page,
1448
+ pageSize,
1449
+ sort,
1450
+ id,
1451
+ email,
1452
+ organizationName,
1453
+ organizationId
1454
+ }) {
1455
+ return request(OpenAPI, {
1456
+ method: "GET",
1457
+ url: "/customers",
1458
+ query: {
1459
+ "page": page,
1460
+ "page_size": pageSize,
1461
+ "sort": sort,
1462
+ "id": id,
1463
+ "email": email,
1464
+ "organization_name": organizationName,
1465
+ "organization_id": organizationId
1466
+ },
1467
+ errors: {
1468
+ 400: `Bad Request`,
1469
+ 401: `Unauthenticated`,
1470
+ 403: `Forbidden`
1471
+ }
1472
+ });
1473
+ }
1474
+ };
1475
+
1476
+ // src/generated/services/CustomerRapidService.ts
1477
+ var CustomerRapidService = class {
1478
+ /**
1479
+ * Allows querying all rapids that have been flagged.
1480
+ * @returns PagedResultOfRapidModel OK
1481
+ * @throws ApiError
1482
+ */
1483
+ static getRapidsFlagged({
1484
+ request: request2
1485
+ }) {
1486
+ return request(OpenAPI, {
1487
+ method: "GET",
1488
+ url: "/rapids/flagged",
1489
+ query: {
1490
+ "request": request2
1491
+ }
1492
+ });
1493
+ }
1494
+ /**
1495
+ * Gets all responses for a given rapid.
1496
+ * @returns GetResponsesForRapidResult OK
1497
+ * @throws ApiError
1498
+ */
1499
+ static getRapidResponses({
1500
+ rapidId
1501
+ }) {
1502
+ return request(OpenAPI, {
1503
+ method: "GET",
1504
+ url: "/rapid/{rapidId}/responses",
1505
+ path: {
1506
+ "rapidId": rapidId
1507
+ }
1508
+ });
1509
+ }
1510
+ /**
1511
+ * A public endpoint to query the most recent responses globally
1512
+ * @returns GetPublicResponsesResult OK
1513
+ * @throws ApiError
1514
+ */
1515
+ static getRapidGlobalResponses() {
1516
+ return request(OpenAPI, {
1517
+ method: "GET",
1518
+ url: "/rapid/global-responses"
1519
+ });
1520
+ }
1521
+ /**
1522
+ * Creates a new Demographic Rapid with JSON body.
1523
+ * @returns CreateRapidResult OK
1524
+ * @throws ApiError
1525
+ */
1526
+ static postRapidDemographic({
1527
+ requestBody
1528
+ }) {
1529
+ return request(OpenAPI, {
1530
+ method: "POST",
1531
+ url: "/rapid/demographic",
1532
+ body: requestBody,
1533
+ mediaType: "application/json"
1534
+ });
1535
+ }
1536
+ /**
1537
+ * Updates the validation information of a Rapid.
1538
+ * @returns void
1539
+ * @throws ApiError
1540
+ */
1541
+ static patchRapidValidation({
1542
+ rapidId,
1543
+ requestBody
1544
+ }) {
1545
+ return request(OpenAPI, {
1546
+ method: "PATCH",
1547
+ url: "/rapid/validation/{rapidId}",
1548
+ path: {
1549
+ "rapidId": rapidId
1550
+ },
1551
+ body: requestBody,
1552
+ mediaType: "application/json"
1553
+ });
1554
+ }
1555
+ /**
1556
+ * Unflags a flagged rapid.
1557
+ * This will add the rapid back to the active labeling pool and prevent it from being flagged again.
1558
+ * @returns void
1559
+ * @throws ApiError
1560
+ */
1561
+ static postRapidUnflag({
1562
+ rapidId
1563
+ }) {
1564
+ return request(OpenAPI, {
1565
+ method: "POST",
1566
+ url: "/rapid/{rapidId}/unflag",
1567
+ path: {
1568
+ "rapidId": rapidId
1569
+ }
1570
+ });
1571
+ }
1572
+ /**
1573
+ * Deletes a rapid.
1574
+ * @returns void
1575
+ * @throws ApiError
1576
+ */
1577
+ static deleteRapid({
1578
+ rapidId
1579
+ }) {
1580
+ return request(OpenAPI, {
1581
+ method: "DELETE",
1582
+ url: "/rapid/{rapidId}",
1583
+ path: {
1584
+ "rapidId": rapidId
1585
+ }
1586
+ });
1587
+ }
1588
+ /**
1589
+ * Queries rapids that are potentially eligible for validation set creation.
1590
+ * @returns PagedResultOfQueryValidationRapidEligibilityResult OK
1591
+ * @throws ApiError
1592
+ */
1593
+ static getRapidValidationPotential({
1594
+ correlationId,
1595
+ minResponses,
1596
+ minConfidence,
1597
+ targetGroupId,
1598
+ request: request2
1599
+ }) {
1600
+ return request(OpenAPI, {
1601
+ method: "GET",
1602
+ url: "/rapid/{correlationId}/validation-potential",
1603
+ path: {
1604
+ "correlationId": correlationId
1605
+ },
1606
+ query: {
1607
+ "MinResponses": minResponses,
1608
+ "MinConfidence": minConfidence,
1609
+ "TargetGroupId": targetGroupId,
1610
+ "request": request2
1611
+ }
1612
+ });
1613
+ }
1614
+ };
1615
+
1616
+ // src/generated/services/DatapointService.ts
1617
+ var DatapointService = class {
1618
+ /**
1619
+ * Gets a datapoint by its id.
1620
+ * @returns GetDatapointByIdResult OK
1621
+ * @throws ApiError
1622
+ */
1623
+ static getDatapoint({
1624
+ datapointId
1625
+ }) {
1626
+ return request(OpenAPI, {
1627
+ method: "GET",
1628
+ url: "/datapoint/{datapointId}",
1629
+ path: {
1630
+ "datapointId": datapointId
1631
+ }
1632
+ });
1633
+ }
1634
+ /**
1635
+ * Deletes a datapoint by its id.
1636
+ * @returns void
1637
+ * @throws ApiError
1638
+ */
1639
+ static deleteDatapoint({
1640
+ datapointId
1641
+ }) {
1642
+ return request(OpenAPI, {
1643
+ method: "DELETE",
1644
+ url: "/datapoint/{datapointId}",
1645
+ path: {
1646
+ "datapointId": datapointId
1647
+ }
1648
+ });
1649
+ }
1650
+ };
1651
+
1652
+ // src/generated/services/DatasetService.ts
1653
+ var DatasetService = class {
1654
+ /**
1655
+ * Creates a new empty dataset.
1656
+ * @returns CreateDatasetEndpoint_Output OK
1657
+ * @throws ApiError
1658
+ */
1659
+ static postDataset({
1660
+ requestBody
1661
+ }) {
1662
+ return request(OpenAPI, {
1663
+ method: "POST",
1664
+ url: "/dataset",
1665
+ body: requestBody,
1666
+ mediaType: "application/json",
1667
+ errors: {
1668
+ 400: `Bad Request`,
1669
+ 401: `Unauthenticated`,
1670
+ 403: `Forbidden`
1671
+ }
1672
+ });
1673
+ }
1674
+ /**
1675
+ * Gets a dataset by its id.
1676
+ * @returns GetDatasetByIdResult OK
1677
+ * @throws ApiError
1678
+ */
1679
+ static getDataset({
1680
+ datasetId
1681
+ }) {
1682
+ return request(OpenAPI, {
1683
+ method: "GET",
1684
+ url: "/dataset/{datasetId}",
1685
+ path: {
1686
+ "datasetId": datasetId
1687
+ }
1688
+ });
1689
+ }
1690
+ /**
1691
+ * Gets all datapoints of a dataset.
1692
+ * @returns PagedResultOfQueryDatapointsByDatasetIdResult OK
1693
+ * @throws ApiError
1694
+ */
1695
+ static getDatasetDatapoints({
1696
+ datasetId,
1697
+ request: request2
1698
+ }) {
1699
+ return request(OpenAPI, {
1700
+ method: "GET",
1701
+ url: "/dataset/{datasetId}/datapoints",
1702
+ path: {
1703
+ "datasetId": datasetId
1704
+ },
1705
+ query: {
1706
+ "request": request2
1707
+ }
1708
+ });
1709
+ }
1710
+ /**
1711
+ * Gets the upload progress of a dataset.
1712
+ * @returns GetDatasetProgressResult OK
1713
+ * @throws ApiError
1714
+ */
1715
+ static getDatasetProgress({
1716
+ datasetId
1717
+ }) {
1718
+ return request(OpenAPI, {
1719
+ method: "GET",
1720
+ url: "/dataset/{datasetId}/progress",
1721
+ path: {
1722
+ "datasetId": datasetId
1723
+ }
1724
+ });
1725
+ }
1726
+ /**
1727
+ * Gets a list of all datapoints that failed to upload.
1728
+ * A datapoint usually fails to upload when using a deferred upload mechanism such as when providing a URL
1729
+ * and the URL is not accessible.
1730
+ * @returns GetFailedDatapointsResult OK
1731
+ * @throws ApiError
1732
+ */
1733
+ static getDatasetDatapointsFailed({
1734
+ datasetId
1735
+ }) {
1736
+ return request(OpenAPI, {
1737
+ method: "GET",
1738
+ url: "/dataset/{datasetId}/datapoints/failed",
1739
+ path: {
1740
+ "datasetId": datasetId
1741
+ }
1742
+ });
1743
+ }
1744
+ /**
1745
+ * Creates a datapoint with JSON body.
1746
+ * @returns CreateDatapointResult OK
1747
+ * @throws ApiError
1748
+ */
1749
+ static postDatasetDatapoint({
1750
+ datasetId,
1751
+ requestBody
1752
+ }) {
1753
+ return request(OpenAPI, {
1754
+ method: "POST",
1755
+ url: "/dataset/{datasetId}/datapoint",
1756
+ path: {
1757
+ "datasetId": datasetId
1758
+ },
1759
+ body: requestBody,
1760
+ mediaType: "application/json"
1761
+ });
1762
+ }
1763
+ /**
1764
+ * Updates the name of a dataset.
1765
+ * @returns void
1766
+ * @throws ApiError
1767
+ */
1768
+ static patchDatasetName({
1769
+ datasetId,
1770
+ requestBody
1771
+ }) {
1772
+ return request(OpenAPI, {
1773
+ method: "PATCH",
1774
+ url: "/dataset/{datasetId}/name",
1775
+ path: {
1776
+ "datasetId": datasetId
1777
+ },
1778
+ body: requestBody,
1779
+ mediaType: "application/json"
1780
+ });
1781
+ }
1782
+ };
1783
+
1784
+ // src/generated/services/DatasetGroupService.ts
1785
+ var DatasetGroupService = class {
1786
+ /**
1787
+ * Creates a new dataset group.
1788
+ * @returns void
1789
+ * @throws ApiError
1790
+ */
1791
+ static postDatasetGroup({
1792
+ datasetId,
1793
+ requestBody
1794
+ }) {
1795
+ return request(OpenAPI, {
1796
+ method: "POST",
1797
+ url: "/dataset/{datasetId}/group",
1798
+ path: {
1799
+ "datasetId": datasetId
1800
+ },
1801
+ body: requestBody,
1802
+ mediaType: "application/json",
1803
+ errors: {
1804
+ 400: `Bad Request`,
1805
+ 401: `Unauthenticated`,
1806
+ 403: `Forbidden`
1807
+ }
1808
+ });
1809
+ }
1810
+ };
1811
+
1812
+ // src/generated/services/EvaluationWorkflowService.ts
1813
+ var EvaluationWorkflowService = class {
1814
+ /**
1815
+ * Get the results for an evaluation workflow.
1816
+ * @returns PagedResultOfGetWorkflowResultsResult OK
1817
+ * @throws ApiError
1818
+ */
1819
+ static getWorkflowEvaluationResults({
1820
+ workflowId,
1821
+ model
1822
+ }) {
1823
+ return request(OpenAPI, {
1824
+ method: "GET",
1825
+ url: "/workflow/evaluation/{workflowId}/results",
1826
+ path: {
1827
+ "workflowId": workflowId
1828
+ },
1829
+ query: {
1830
+ "model": model
1831
+ }
1832
+ });
1833
+ }
1834
+ };
1835
+
1836
+ // src/generated/services/ExamplesService.ts
1837
+ var ExamplesService = class {
1838
+ /**
1839
+ * Adds a new example to an audience.
1840
+ * @returns void
1841
+ * @throws ApiError
1842
+ */
1843
+ static postAudienceExample({
1844
+ audienceId,
1845
+ requestBody
1846
+ }) {
1847
+ return request(OpenAPI, {
1848
+ method: "POST",
1849
+ url: "/audience/{audienceId}/example",
1850
+ path: {
1851
+ "audienceId": audienceId
1852
+ },
1853
+ body: requestBody,
1854
+ mediaType: "application/json",
1855
+ errors: {
1856
+ 400: `Bad Request`,
1857
+ 401: `Unauthenticated`,
1858
+ 403: `Forbidden`
1859
+ }
1860
+ });
1861
+ }
1862
+ /**
1863
+ * Deletes the specified audience example.
1864
+ * @returns void
1865
+ * @throws ApiError
1866
+ */
1867
+ static deleteAudienceExample({
1868
+ exampleId
1869
+ }) {
1870
+ return request(OpenAPI, {
1871
+ method: "DELETE",
1872
+ url: "/audience/example/{exampleId}",
1873
+ path: {
1874
+ "exampleId": exampleId
1875
+ },
1876
+ errors: {
1877
+ 400: `Bad Request`,
1878
+ 401: `Unauthenticated`,
1879
+ 403: `Forbidden`
1880
+ }
1881
+ });
1882
+ }
1883
+ /**
1884
+ * Queries all examples for the specified audience.
1885
+ * @returns QueryExamplesForAudienceEndpoint_PagedResultOfOutput OK
1886
+ * @throws ApiError
1887
+ */
1888
+ static getAudienceExamples({
1889
+ audienceId,
1890
+ page,
1891
+ pageSize
1892
+ }) {
1893
+ return request(OpenAPI, {
1894
+ method: "GET",
1895
+ url: "/audience/{audienceId}/examples",
1896
+ path: {
1897
+ "audienceId": audienceId
1898
+ },
1899
+ query: {
1900
+ "page": page,
1901
+ "page_size": pageSize
1902
+ },
1903
+ errors: {
1904
+ 400: `Bad Request`,
1905
+ 401: `Unauthenticated`,
1906
+ 403: `Forbidden`
1907
+ }
1908
+ });
1909
+ }
1910
+ /**
1911
+ * Updates an example's properties within an audience.
1912
+ * @returns void
1913
+ * @throws ApiError
1914
+ */
1915
+ static patchAudienceExample({
1916
+ audienceId,
1917
+ exampleId,
1918
+ requestBody
1919
+ }) {
1920
+ return request(OpenAPI, {
1921
+ method: "PATCH",
1922
+ url: "/audience/{audienceId}/example/{exampleId}",
1923
+ path: {
1924
+ "audienceId": audienceId,
1925
+ "exampleId": exampleId
1926
+ },
1927
+ body: requestBody,
1928
+ mediaType: "application/json",
1929
+ errors: {
1930
+ 400: `Bad Request`,
1931
+ 401: `Unauthenticated`,
1932
+ 403: `Forbidden`
1933
+ }
1934
+ });
1935
+ }
1936
+ };
1937
+
1938
+ // src/generated/services/FeedbackService.ts
1939
+ var FeedbackService = class {
1940
+ /**
1941
+ * Submits feedback about our services.
1942
+ * @returns void
1943
+ * @throws ApiError
1944
+ */
1945
+ static postFeedback({
1946
+ requestBody
1947
+ }) {
1948
+ return request(OpenAPI, {
1949
+ method: "POST",
1950
+ url: "/feedback",
1951
+ body: requestBody,
1952
+ mediaType: "application/json"
1953
+ });
1954
+ }
1955
+ };
1956
+
1957
+ // src/generated/services/FlowService.ts
1958
+ var FlowService = class {
1959
+ /**
1960
+ * Deletes a flow.
1961
+ * @returns void
1962
+ * @throws ApiError
1963
+ */
1964
+ static deleteFlow({
1965
+ flowId
1966
+ }) {
1967
+ return request(OpenAPI, {
1968
+ method: "DELETE",
1969
+ url: "/flow/{flowId}",
1970
+ path: {
1971
+ "flowId": flowId
1972
+ },
1973
+ errors: {
1974
+ 400: `Bad Request`,
1975
+ 401: `Unauthenticated`,
1976
+ 403: `Forbidden`
1977
+ }
1978
+ });
1979
+ }
1980
+ /**
1981
+ * Retrieves a flow by its ID.
1982
+ * @returns GetFlowByIdEndpoint_Output OK
1983
+ * @throws ApiError
1984
+ */
1985
+ static getFlow({
1986
+ flowId
1987
+ }) {
1988
+ return request(OpenAPI, {
1989
+ method: "GET",
1990
+ url: "/flow/{flowId}",
1991
+ path: {
1992
+ "flowId": flowId
1993
+ },
1994
+ errors: {
1995
+ 400: `Bad Request`,
1996
+ 401: `Unauthenticated`,
1997
+ 403: `Forbidden`
1998
+ }
1999
+ });
2000
+ }
2001
+ /**
2002
+ * Returns the distribution of completion durations (in seconds) per completed flow item.
2003
+ * @returns GetCompletionTimeHistogramEndpoint_Output OK
2004
+ * @throws ApiError
2005
+ */
2006
+ static getFlowRankingCompletionTimeHistogram({
2007
+ flowId,
2008
+ from,
2009
+ to,
2010
+ bucketCount
2011
+ }) {
2012
+ return request(OpenAPI, {
2013
+ method: "GET",
2014
+ url: "/flow/ranking/{flowId}/completion-time-histogram",
2015
+ path: {
2016
+ "flowId": flowId
2017
+ },
2018
+ query: {
2019
+ "from": from,
2020
+ "to": to,
2021
+ "bucketCount": bucketCount
2022
+ },
2023
+ errors: {
2024
+ 400: `Bad Request`,
2025
+ 401: `Unauthenticated`,
2026
+ 403: `Forbidden`
2027
+ }
2028
+ });
2029
+ }
2030
+ /**
2031
+ * Returns flow item creation counts bucketed over time.
2032
+ * @returns GetFlowItemCreationTimeseriesEndpoint_Output OK
2033
+ * @throws ApiError
2034
+ */
2035
+ static getFlowRankingFlowItemCreationTimeseries({
2036
+ flowId,
2037
+ from,
2038
+ to,
2039
+ datapoints
2040
+ }) {
2041
+ return request(OpenAPI, {
2042
+ method: "GET",
2043
+ url: "/flow/ranking/{flowId}/flow-item-creation-timeseries",
2044
+ path: {
2045
+ "flowId": flowId
2046
+ },
2047
+ query: {
2048
+ "from": from,
2049
+ "to": to,
2050
+ "datapoints": datapoints
2051
+ },
2052
+ errors: {
2053
+ 400: `Bad Request`,
2054
+ 401: `Unauthenticated`,
2055
+ 403: `Forbidden`
2056
+ }
2057
+ });
2058
+ }
2059
+ /**
2060
+ * Returns the distribution of total votes per completed flow item.
2061
+ * @returns GetResponseCountHistogramEndpoint_Output OK
2062
+ * @throws ApiError
2063
+ */
2064
+ static getFlowRankingResponseCountHistogram({
2065
+ flowId,
2066
+ from,
2067
+ to,
2068
+ bucketCount
2069
+ }) {
2070
+ return request(OpenAPI, {
2071
+ method: "GET",
2072
+ url: "/flow/ranking/{flowId}/response-count-histogram",
2073
+ path: {
2074
+ "flowId": flowId
2075
+ },
2076
+ query: {
2077
+ "from": from,
2078
+ "to": to,
2079
+ "bucketCount": bucketCount
2080
+ },
2081
+ errors: {
2082
+ 400: `Bad Request`,
2083
+ 401: `Unauthenticated`,
2084
+ 403: `Forbidden`
2085
+ }
2086
+ });
2087
+ }
2088
+ /**
2089
+ * Returns average response counts bucketed over time for completed flow items.
2090
+ * @returns GetResponseCountTimeseriesEndpoint_Output OK
2091
+ * @throws ApiError
2092
+ */
2093
+ static getFlowRankingResponseCountTimeseries({
2094
+ flowId,
2095
+ from,
2096
+ to,
2097
+ datapoints
2098
+ }) {
2099
+ return request(OpenAPI, {
2100
+ method: "GET",
2101
+ url: "/flow/ranking/{flowId}/response-count-timeseries",
2102
+ path: {
2103
+ "flowId": flowId
2104
+ },
2105
+ query: {
2106
+ "from": from,
2107
+ "to": to,
2108
+ "datapoints": datapoints
2109
+ },
2110
+ errors: {
2111
+ 400: `Bad Request`,
2112
+ 401: `Unauthenticated`,
2113
+ 403: `Forbidden`
2114
+ }
2115
+ });
2116
+ }
2117
+ /**
2118
+ * Queries flows with filtering and pagination.
2119
+ * @returns QueryFlowsEndpoint_PagedResultOfOutput OK
2120
+ * @throws ApiError
2121
+ */
2122
+ static getFlow1({
2123
+ page,
2124
+ pageSize,
2125
+ sort,
2126
+ name,
2127
+ createdAt
2128
+ }) {
2129
+ return request(OpenAPI, {
2130
+ method: "GET",
2131
+ url: "/flow",
2132
+ query: {
2133
+ "page": page,
2134
+ "page_size": pageSize,
2135
+ "sort": sort,
2136
+ "name": name,
2137
+ "created_at": createdAt
2138
+ },
2139
+ errors: {
2140
+ 400: `Bad Request`,
2141
+ 401: `Unauthenticated`,
2142
+ 403: `Forbidden`
2143
+ }
2144
+ });
2145
+ }
2146
+ };
2147
+
2148
+ // src/generated/services/FlowItemService.ts
2149
+ var FlowItemService = class {
2150
+ /**
2151
+ * Stops the specified flow item and triggers partial result processing.
2152
+ * @returns void
2153
+ * @throws ApiError
2154
+ */
2155
+ static postFlowItemStop({
2156
+ flowItemId
2157
+ }) {
2158
+ return request(OpenAPI, {
2159
+ method: "POST",
2160
+ url: "/flow/item/{flowItemId}/stop",
2161
+ path: {
2162
+ "flowItemId": flowItemId
2163
+ },
2164
+ errors: {
2165
+ 400: `Bad Request`,
2166
+ 401: `Unauthenticated`,
2167
+ 403: `Forbidden`
2168
+ }
2169
+ });
2170
+ }
2171
+ };
2172
+
2173
+ // src/generated/services/GroupedRankingWorkflowService.ts
2174
+ var GroupedRankingWorkflowService = class {
2175
+ /**
2176
+ * Get the result overview for a multi ranking workflow.
2177
+ * @returns PagedResultOfGetGroupedRankingWorkflowResultsResult OK
2178
+ * @throws ApiError
2179
+ */
2180
+ static getWorkflowGroupedRankingResults({
2181
+ workflowId,
2182
+ model
2183
+ }) {
2184
+ return request(OpenAPI, {
2185
+ method: "GET",
2186
+ url: "/workflow/grouped-ranking/{workflowId}/results",
2187
+ path: {
2188
+ "workflowId": workflowId
2189
+ },
2190
+ query: {
2191
+ "model": model
2192
+ }
2193
+ });
2194
+ }
2195
+ };
2196
+
2197
+ // src/generated/services/IdentityService.ts
2198
+ var IdentityService = class {
2199
+ /**
2200
+ * Creates a pair of read and write keys for a client.
2201
+ * The write key is used to store the authentication result.
2202
+ * The read key is used to retrieve the authentication result.
2203
+ * @returns CreateBridgeTokenResult OK
2204
+ * @throws ApiError
2205
+ */
2206
+ static postIdentityBridgeToken({
2207
+ clientId
2208
+ }) {
2209
+ return request(OpenAPI, {
2210
+ method: "POST",
2211
+ url: "/identity/bridge-token",
2212
+ query: {
2213
+ "clientId": clientId
2214
+ }
2215
+ });
2216
+ }
2217
+ /**
2218
+ * Tries to read the bridge token keys for a given read key.
2219
+ * The read key is used to retrieve the authentication result written by the write key.
2220
+ * @returns ReadBridgeTokenKeysResult OK
2221
+ * @returns NotAvailableYetResult Accepted
2222
+ * @throws ApiError
2223
+ */
2224
+ static getIdentityBridgeToken({
2225
+ readKey
2226
+ }) {
2227
+ return request(OpenAPI, {
2228
+ method: "GET",
2229
+ url: "/identity/bridge-token",
2230
+ query: {
2231
+ "readKey": readKey
2232
+ }
2233
+ });
2234
+ }
2235
+ /**
2236
+ * Sets the referrer for the current customer.
2237
+ * @returns void
2238
+ * @throws ApiError
2239
+ */
2240
+ static postIdentityReferrer({
2241
+ referrer
2242
+ }) {
2243
+ return request(OpenAPI, {
2244
+ method: "POST",
2245
+ url: "/identity/referrer",
2246
+ query: {
2247
+ "referrer": referrer
2248
+ }
2249
+ });
2250
+ }
2251
+ /**
2252
+ * Signs in a user using a token received from Google One Tap.
2253
+ * @returns void
2254
+ * @throws ApiError
2255
+ */
2256
+ static postIdentityGoogleOneTap({
2257
+ requestBody
2258
+ }) {
2259
+ return request(OpenAPI, {
2260
+ method: "POST",
2261
+ url: "/identity/google-one-tap",
2262
+ body: requestBody,
2263
+ mediaType: "application/json"
2264
+ });
2265
+ }
2266
+ };
2267
+
2268
+ // src/generated/services/JobService.ts
2269
+ var JobService = class {
2270
+ /**
2271
+ * Creates a new job definition.
2272
+ * A preview pipeline is automatically created and returned in the response.
2273
+ * @returns CreateJobDefinitionEndpoint_Output OK
2274
+ * @throws ApiError
2275
+ */
2276
+ static postJobDefinition({
2277
+ requestBody
2278
+ }) {
2279
+ return request(OpenAPI, {
2280
+ method: "POST",
2281
+ url: "/job/definition",
2282
+ body: requestBody,
2283
+ mediaType: "application/json",
2284
+ errors: {
2285
+ 400: `Bad Request`,
2286
+ 401: `Unauthenticated`,
2287
+ 403: `Forbidden`
2288
+ }
2289
+ });
2290
+ }
2291
+ /**
2292
+ * Creates a new job from a job definition and audience.
2293
+ * If the audience is not already recruiting, recruiting is started automatically.
2294
+ * The RecruitingStarted field indicates whether this happened.
2295
+ * @returns CreateJobEndpoint_Output OK
2296
+ * @throws ApiError
2297
+ */
2298
+ static postJob({
2299
+ requestBody
2300
+ }) {
2301
+ return request(OpenAPI, {
2302
+ method: "POST",
2303
+ url: "/job",
2304
+ body: requestBody,
2305
+ mediaType: "application/json",
2306
+ errors: {
2307
+ 400: `Bad Request`,
2308
+ 401: `Unauthenticated`,
2309
+ 403: `Forbidden`
2310
+ }
2311
+ });
2312
+ }
2313
+ /**
2314
+ * Creates a new revision for an existing job definition.
2315
+ * Unspecified fields are inherited from the previous revision. Workflow and Referee must be
2316
+ * provided together if either is specified.
2317
+ * @returns CreateJobRevisionEndpoint_Output OK
2318
+ * @throws ApiError
2319
+ */
2320
+ static postJobDefinitionRevision({
2321
+ definitionId,
2322
+ requestBody
2323
+ }) {
2324
+ return request(OpenAPI, {
2325
+ method: "POST",
2326
+ url: "/job/definition/{definitionId}/revision",
2327
+ path: {
2328
+ "definitionId": definitionId
2329
+ },
2330
+ body: requestBody,
2331
+ mediaType: "application/json",
2332
+ errors: {
2333
+ 400: `Bad Request`,
2334
+ 401: `Unauthenticated`,
2335
+ 403: `Forbidden`
2336
+ }
2337
+ });
2338
+ }
2339
+ /**
2340
+ * Gets the latest revision for a job definition.
2341
+ * @returns GetJobRevisionEndpoint_Output OK
2342
+ * @throws ApiError
2343
+ */
2344
+ static getJobDefinitionRevision({
2345
+ definitionId
2346
+ }) {
2347
+ return request(OpenAPI, {
2348
+ method: "GET",
2349
+ url: "/job/definition/{definitionId}/revision",
2350
+ path: {
2351
+ "definitionId": definitionId
2352
+ },
2353
+ errors: {
2354
+ 400: `Bad Request`,
2355
+ 401: `Unauthenticated`,
2356
+ 403: `Forbidden`
2357
+ }
2358
+ });
2359
+ }
2360
+ /**
2361
+ * Deletes a job definition and all its revisions.
2362
+ * @returns void
2363
+ * @throws ApiError
2364
+ */
2365
+ static deleteJobDefinition({
2366
+ definitionId
2367
+ }) {
2368
+ return request(OpenAPI, {
2369
+ method: "DELETE",
2370
+ url: "/job/definition/{definitionId}",
2371
+ path: {
2372
+ "definitionId": definitionId
2373
+ },
2374
+ errors: {
2375
+ 400: `Bad Request`,
2376
+ 401: `Unauthenticated`,
2377
+ 403: `Forbidden`
2378
+ }
2379
+ });
2380
+ }
2381
+ /**
2382
+ * Gets a job definition by its id.
2383
+ * @returns GetJobDefinitionByIdEndpoint_Output OK
2384
+ * @throws ApiError
2385
+ */
2386
+ static getJobDefinition({
2387
+ definitionId
2388
+ }) {
2389
+ return request(OpenAPI, {
2390
+ method: "GET",
2391
+ url: "/job/definition/{definitionId}",
2392
+ path: {
2393
+ "definitionId": definitionId
2394
+ },
2395
+ errors: {
2396
+ 400: `Bad Request`,
2397
+ 401: `Unauthenticated`,
2398
+ 403: `Forbidden`
2399
+ }
2400
+ });
2401
+ }
2402
+ /**
2403
+ * Updates a job definition.
2404
+ * @returns void
2405
+ * @throws ApiError
2406
+ */
2407
+ static patchJobDefinition({
2408
+ definitionId,
2409
+ requestBody
2410
+ }) {
2411
+ return request(OpenAPI, {
2412
+ method: "PATCH",
2413
+ url: "/job/definition/{definitionId}",
2414
+ path: {
2415
+ "definitionId": definitionId
2416
+ },
2417
+ body: requestBody,
2418
+ mediaType: "application/json",
2419
+ errors: {
2420
+ 400: `Bad Request`,
2421
+ 401: `Unauthenticated`,
2422
+ 403: `Forbidden`
2423
+ }
2424
+ });
2425
+ }
2426
+ /**
2427
+ * Deletes a job.
2428
+ * @returns void
2429
+ * @throws ApiError
2430
+ */
2431
+ static deleteJob({
2432
+ jobId
2433
+ }) {
2434
+ return request(OpenAPI, {
2435
+ method: "DELETE",
2436
+ url: "/job/{jobId}",
2437
+ path: {
2438
+ "jobId": jobId
2439
+ },
2440
+ errors: {
2441
+ 400: `Bad Request`,
2442
+ 401: `Unauthenticated`,
2443
+ 403: `Forbidden`
2444
+ }
2445
+ });
2446
+ }
2447
+ /**
2448
+ * Gets a job by its id.
2449
+ * @returns GetJobByIdEndpoint_Output OK
2450
+ * @throws ApiError
2451
+ */
2452
+ static getJob({
2453
+ jobId
2454
+ }) {
2455
+ return request(OpenAPI, {
2456
+ method: "GET",
2457
+ url: "/job/{jobId}",
2458
+ path: {
2459
+ "jobId": jobId
2460
+ },
2461
+ errors: {
2462
+ 400: `Bad Request`,
2463
+ 401: `Unauthenticated`,
2464
+ 403: `Forbidden`
2465
+ }
2466
+ });
2467
+ }
2468
+ /**
2469
+ * Updates a job.
2470
+ * @returns void
2471
+ * @throws ApiError
2472
+ */
2473
+ static patchJob({
2474
+ jobId,
2475
+ requestBody
2476
+ }) {
2477
+ return request(OpenAPI, {
2478
+ method: "PATCH",
2479
+ url: "/job/{jobId}",
2480
+ path: {
2481
+ "jobId": jobId
2482
+ },
2483
+ body: requestBody,
2484
+ mediaType: "application/json",
2485
+ errors: {
2486
+ 400: `Bad Request`,
2487
+ 401: `Unauthenticated`,
2488
+ 403: `Forbidden`
2489
+ }
2490
+ });
2491
+ }
2492
+ /**
2493
+ * Downloads the results of a job as a file attachment.
2494
+ * @returns binary OK
2495
+ * @throws ApiError
2496
+ */
2497
+ static getJobDownloadResults({
2498
+ jobId
2499
+ }) {
2500
+ return request(OpenAPI, {
2501
+ method: "GET",
2502
+ url: "/job/{jobId}/download-results",
2503
+ path: {
2504
+ "jobId": jobId
2505
+ },
2506
+ errors: {
2507
+ 401: `Unauthenticated`,
2508
+ 403: `Forbidden`
2509
+ }
2510
+ });
2511
+ }
2512
+ /**
2513
+ * Gets the results of a job as a JSON string.
2514
+ * For file download, use the download-results endpoint instead.
2515
+ * @returns string OK
2516
+ * @throws ApiError
2517
+ */
2518
+ static getJobResults({
2519
+ jobId
2520
+ }) {
2521
+ return request(OpenAPI, {
2522
+ method: "GET",
2523
+ url: "/job/{jobId}/results",
2524
+ path: {
2525
+ "jobId": jobId
2526
+ },
2527
+ errors: {
2528
+ 401: `Unauthenticated`,
2529
+ 403: `Forbidden`
2530
+ }
2531
+ });
2532
+ }
2533
+ /**
2534
+ * Gets a specific revision for a job definition.
2535
+ * @returns GetJobRevisionEndpoint_Output OK
2536
+ * @throws ApiError
2537
+ */
2538
+ static getJobDefinitionRevision1({
2539
+ definitionId,
2540
+ revisionNumber
2541
+ }) {
2542
+ return request(OpenAPI, {
2543
+ method: "GET",
2544
+ url: "/job/definition/{definitionId}/revision/{revisionNumber}",
2545
+ path: {
2546
+ "definitionId": definitionId,
2547
+ "revisionNumber": revisionNumber
2548
+ },
2549
+ errors: {
2550
+ 400: `Bad Request`,
2551
+ 401: `Unauthenticated`,
2552
+ 403: `Forbidden`
2553
+ }
2554
+ });
2555
+ }
2556
+ /**
2557
+ * Queries job definitions based on filter, page, and sort criteria.
2558
+ * @returns PagedResultOfQueryJobDefinitionsResult OK
2559
+ * @throws ApiError
2560
+ */
2561
+ static getJobDefinitions({
2562
+ request: request2
2563
+ }) {
2564
+ return request(OpenAPI, {
2565
+ method: "GET",
2566
+ url: "/job/definitions",
2567
+ query: {
2568
+ "request": request2
2569
+ }
2570
+ });
2571
+ }
2572
+ /**
2573
+ * Queries job revisions for a specific definition based on filter, page, and sort criteria.
2574
+ * @returns PagedResultOfQueryJobRevisionsResult OK
2575
+ * @throws ApiError
2576
+ */
2577
+ static getJobDefinitionRevisions({
2578
+ definitionId,
2579
+ request: request2
2580
+ }) {
2581
+ return request(OpenAPI, {
2582
+ method: "GET",
2583
+ url: "/job/definition/{definitionId}/revisions",
2584
+ path: {
2585
+ "definitionId": definitionId
2586
+ },
2587
+ query: {
2588
+ "request": request2
2589
+ }
2590
+ });
2591
+ }
2592
+ /**
2593
+ * Queries jobs based on filter, page, and sort criteria.
2594
+ * @returns PagedResultOfQueryJobsResult OK
2595
+ * @throws ApiError
2596
+ */
2597
+ static getJobs({
2598
+ request: request2
2599
+ }) {
2600
+ return request(OpenAPI, {
2601
+ method: "GET",
2602
+ url: "/jobs",
2603
+ query: {
2604
+ "request": request2
2605
+ }
2606
+ });
2607
+ }
2608
+ };
2609
+
2610
+ // src/generated/services/LeaderboardService.ts
2611
+ var LeaderboardService = class {
2612
+ /**
2613
+ * Returns the combined pairwise vote matrix for multiple leaderboards.
2614
+ * @returns GetCombinedLeaderboardMatrixEndpoint_Output OK
2615
+ * @throws ApiError
2616
+ */
2617
+ static getLeaderboardCombinedMatrix({
2618
+ leaderboardIds,
2619
+ useWeightedScoring = false
2620
+ }) {
2621
+ return request(OpenAPI, {
2622
+ method: "GET",
2623
+ url: "/leaderboard/combined-matrix",
2624
+ query: {
2625
+ "leaderboardIds": leaderboardIds,
2626
+ "useWeightedScoring": useWeightedScoring
2627
+ },
2628
+ errors: {
2629
+ 400: `Bad Request`,
2630
+ 401: `Unauthenticated`,
2631
+ 403: `Forbidden`
2632
+ }
2633
+ });
2634
+ }
2635
+ /**
2636
+ * Returns the combined standings for multiple leaderboards.
2637
+ * @returns GetCombinedLeaderboardStandingsEndpoint_Output OK
2638
+ * @throws ApiError
2639
+ */
2640
+ static getLeaderboardCombinedStandings({
2641
+ leaderboardIds,
2642
+ useWeightedScoring = false,
2643
+ includeConfidenceIntervals = false
2644
+ }) {
2645
+ return request(OpenAPI, {
2646
+ method: "GET",
2647
+ url: "/leaderboard/combined-standings",
2648
+ query: {
2649
+ "leaderboardIds": leaderboardIds,
2650
+ "useWeightedScoring": useWeightedScoring,
2651
+ "includeConfidenceIntervals": includeConfidenceIntervals
2652
+ },
2653
+ errors: {
2654
+ 400: `Bad Request`,
2655
+ 401: `Unauthenticated`,
2656
+ 403: `Forbidden`
2657
+ }
2658
+ });
2659
+ }
2660
+ /**
2661
+ * Returns the pairwise vote matrix for a leaderboard.
2662
+ * The matrix is returned in pandas split format.
2663
+ * @returns VoteMatrixResult OK
2664
+ * @throws ApiError
2665
+ */
2666
+ static getLeaderboardMatrix({
2667
+ leaderboardId,
2668
+ tags,
2669
+ useWeightedScoring = false
2670
+ }) {
2671
+ return request(OpenAPI, {
2672
+ method: "GET",
2673
+ url: "/leaderboard/{leaderboardId}/matrix",
2674
+ path: {
2675
+ "leaderboardId": leaderboardId
2676
+ },
2677
+ query: {
2678
+ "tags": tags,
2679
+ "useWeightedScoring": useWeightedScoring
2680
+ },
2681
+ errors: {
2682
+ 400: `Bad Request`,
2683
+ 401: `Unauthenticated`,
2684
+ 403: `Forbidden`
2685
+ }
2686
+ });
2687
+ }
2688
+ /**
2689
+ * Queries all leaderboards for a specific benchmark.
2690
+ * @returns PagedResultOfLeaderboardsQueryResult OK
2691
+ * @throws ApiError
2692
+ */
2693
+ static getLeaderboards({
2694
+ request: request2
2695
+ }) {
2696
+ return request(OpenAPI, {
2697
+ method: "GET",
2698
+ url: "/leaderboards",
2699
+ query: {
2700
+ "request": request2
2701
+ }
2702
+ });
2703
+ }
2704
+ /**
2705
+ * Gets a leaderboard by its ID.
2706
+ * @returns GetLeaderboardByIdResult OK
2707
+ * @throws ApiError
2708
+ */
2709
+ static getLeaderboard({
2710
+ leaderboardId
2711
+ }) {
2712
+ return request(OpenAPI, {
2713
+ method: "GET",
2714
+ url: "/leaderboard/{leaderboardId}",
2715
+ path: {
2716
+ "leaderboardId": leaderboardId
2717
+ }
2718
+ });
2719
+ }
2720
+ /**
2721
+ * Updates the response config of a leaderboard.
2722
+ * @returns void
2723
+ * @throws ApiError
2724
+ */
2725
+ static patchLeaderboard({
2726
+ leaderboardId,
2727
+ requestBody
2728
+ }) {
2729
+ return request(OpenAPI, {
2730
+ method: "PATCH",
2731
+ url: "/leaderboard/{leaderboardId}",
2732
+ path: {
2733
+ "leaderboardId": leaderboardId
2734
+ },
2735
+ body: requestBody,
2736
+ mediaType: "application/json"
2737
+ });
2738
+ }
2739
+ /**
2740
+ * Deletes a leaderboard by its ID.
2741
+ * @returns void
2742
+ * @throws ApiError
2743
+ */
2744
+ static deleteLeaderboard({
2745
+ leaderboardId
2746
+ }) {
2747
+ return request(OpenAPI, {
2748
+ method: "DELETE",
2749
+ url: "/leaderboard/{leaderboardId}",
2750
+ path: {
2751
+ "leaderboardId": leaderboardId
2752
+ }
2753
+ });
2754
+ }
2755
+ /**
2756
+ * Creates a new leaderboard with the specified name and criteria.
2757
+ * @returns CreateLeaderboardResult OK
2758
+ * @throws ApiError
2759
+ */
2760
+ static postLeaderboard({
2761
+ requestBody
2762
+ }) {
2763
+ return request(OpenAPI, {
2764
+ method: "POST",
2765
+ url: "/leaderboard",
2766
+ body: requestBody,
2767
+ mediaType: "application/json"
2768
+ });
2769
+ }
2770
+ /**
2771
+ * queries all the participants connected to leaderboard by its ID.
2772
+ * @returns StandingsByLeaderboardResult OK
2773
+ * @throws ApiError
2774
+ */
2775
+ static getLeaderboardStandings({
2776
+ leaderboardId,
2777
+ tags,
2778
+ useWeightedScoring = false,
2779
+ includeConfidenceIntervals = false
2780
+ }) {
2781
+ return request(OpenAPI, {
2782
+ method: "GET",
2783
+ url: "/leaderboard/{leaderboardId}/standings",
2784
+ path: {
2785
+ "leaderboardId": leaderboardId
2786
+ },
2787
+ query: {
2788
+ "tags": tags,
2789
+ "useWeightedScoring": useWeightedScoring,
2790
+ "includeConfidenceIntervals": includeConfidenceIntervals
2791
+ }
2792
+ });
2793
+ }
2794
+ /**
2795
+ * Gets the runs related to a leaderboard
2796
+ * @returns PagedResultOfRunsByLeaderboardResult OK
2797
+ * @throws ApiError
2798
+ */
2799
+ static getLeaderboardRuns({
2800
+ leaderboardId,
2801
+ request: request2
2802
+ }) {
2803
+ return request(OpenAPI, {
2804
+ method: "GET",
2805
+ url: "/leaderboard/{leaderboardId}/runs",
2806
+ path: {
2807
+ "leaderboardId": leaderboardId
2808
+ },
2809
+ query: {
2810
+ "request": request2
2811
+ }
2812
+ });
2813
+ }
2814
+ /**
2815
+ * Gets a standing by leaderboardId and participantId.
2816
+ * @returns GetStandingByIdResult OK
2817
+ * @throws ApiError
2818
+ */
2819
+ static getBenchmarkStanding({
2820
+ leaderboardId,
2821
+ participantId
2822
+ }) {
2823
+ return request(OpenAPI, {
2824
+ method: "GET",
2825
+ url: "/benchmark/standing/{leaderboardId}/{participantId}",
2826
+ path: {
2827
+ "leaderboardId": leaderboardId,
2828
+ "participantId": participantId
2829
+ }
2830
+ });
2831
+ }
2832
+ /**
2833
+ * Boosts a subset of participants within a leaderboard.
2834
+ * @returns SubmitParticipantResult OK
2835
+ * @throws ApiError
2836
+ */
2837
+ static postLeaderboardBoost({
2838
+ leaderboardId,
2839
+ requestBody
2840
+ }) {
2841
+ return request(OpenAPI, {
2842
+ method: "POST",
2843
+ url: "/leaderboard/{leaderboardId}/boost",
2844
+ path: {
2845
+ "leaderboardId": leaderboardId
2846
+ },
2847
+ body: requestBody,
2848
+ mediaType: "application/json"
2849
+ });
2850
+ }
2851
+ };
2852
+
2853
+ // src/generated/services/NewsletterService.ts
2854
+ var NewsletterService = class {
2855
+ /**
2856
+ * Signs a user up to the newsletter.
2857
+ * @returns void
2858
+ * @throws ApiError
2859
+ */
2860
+ static postNewsletterSubscribe({
2861
+ requestBody
2862
+ }) {
2863
+ return request(OpenAPI, {
2864
+ method: "POST",
2865
+ url: "/newsletter/subscribe",
2866
+ body: requestBody,
2867
+ mediaType: "application/json"
2868
+ });
2869
+ }
2870
+ /**
2871
+ * Unsubscribes a user from the newsletter.
2872
+ * @returns void
2873
+ * @throws ApiError
2874
+ */
2875
+ static postNewsletterUnsubscribe({
2876
+ requestBody
2877
+ }) {
2878
+ return request(OpenAPI, {
2879
+ method: "POST",
2880
+ url: "/newsletter/unsubscribe",
2881
+ body: requestBody,
2882
+ mediaType: "application/json"
2883
+ });
2884
+ }
2885
+ };
2886
+
2887
+ // src/generated/services/OrderService.ts
2888
+ var OrderService = class {
2889
+ /**
2890
+ * Approves a submitted order so the pipeline can start processing it.
2891
+ * @returns void
2892
+ * @throws ApiError
2893
+ */
2894
+ static postOrderApprove({
2895
+ orderId
2896
+ }) {
2897
+ return request(OpenAPI, {
2898
+ method: "POST",
2899
+ url: "/order/{orderId}/approve",
2900
+ path: {
2901
+ "orderId": orderId
2902
+ },
2903
+ errors: {
2904
+ 400: `Bad Request`,
2905
+ 401: `Unauthenticated`,
2906
+ 403: `Forbidden`
2907
+ }
2908
+ });
2909
+ }
2910
+ /**
2911
+ * Clones an existing public order.
2912
+ * The order to clone must be marked as public.
2913
+ * @returns CloneOrderEndpoint_Output OK
2914
+ * @throws ApiError
2915
+ */
2916
+ static postOrderClone({
2917
+ orderId,
2918
+ requestBody
2919
+ }) {
2920
+ return request(OpenAPI, {
2921
+ method: "POST",
2922
+ url: "/order/{orderId}/clone",
2923
+ path: {
2924
+ "orderId": orderId
2925
+ },
2926
+ body: requestBody,
2927
+ mediaType: "application/json",
2928
+ errors: {
2929
+ 400: `Bad Request`,
2930
+ 401: `Unauthenticated`,
2931
+ 403: `Forbidden`
2932
+ }
2933
+ });
2934
+ }
2935
+ /**
2936
+ * Creates a new order with a custom pipeline configuration.
2937
+ * @returns CreateComplexOrderEndpoint_Output OK
2938
+ * @throws ApiError
2939
+ */
2940
+ static postOrderComplex({
2941
+ requestBody
2942
+ }) {
2943
+ return request(OpenAPI, {
2944
+ method: "POST",
2945
+ url: "/order/complex",
2946
+ body: requestBody,
2947
+ mediaType: "application/json",
2948
+ errors: {
2949
+ 400: `Bad Request`,
2950
+ 401: `Unauthenticated`,
2951
+ 403: `Forbidden`
2952
+ }
2953
+ });
2954
+ }
2955
+ /**
2956
+ * Creates a new order with the given configuration.
2957
+ * Once created, use the returned dataset ID to fill the dataset with datapoints,
2958
+ * then submit the order for processing.
2959
+ * @returns CreateOrderEndpoint_Output OK
2960
+ * @throws ApiError
2961
+ */
2962
+ static postOrder({
2963
+ requestBody
2964
+ }) {
2965
+ return request(OpenAPI, {
2966
+ method: "POST",
2967
+ url: "/order",
2968
+ body: requestBody,
2969
+ mediaType: "application/json",
2970
+ errors: {
2971
+ 400: `Bad Request`,
2972
+ 401: `Unauthenticated`,
2973
+ 403: `Forbidden`
2974
+ }
2975
+ });
2976
+ }
2977
+ /**
2978
+ * Creates a notification for an unsupported order type.
2979
+ * @returns void
2980
+ * @throws ApiError
2981
+ */
2982
+ static postOrderUnsupported({
2983
+ requestBody
2984
+ }) {
2985
+ return request(OpenAPI, {
2986
+ method: "POST",
2987
+ url: "/order/unsupported",
2988
+ body: requestBody,
2989
+ mediaType: "application/json",
2990
+ errors: {
2991
+ 400: `Bad Request`,
2992
+ 401: `Unauthenticated`,
2993
+ 403: `Forbidden`
2994
+ }
2995
+ });
2996
+ }
2997
+ /**
2998
+ * Deletes an order and its associated resources.
2999
+ * @returns void
3000
+ * @throws ApiError
3001
+ */
3002
+ static deleteOrder({
3003
+ orderId
3004
+ }) {
3005
+ return request(OpenAPI, {
3006
+ method: "DELETE",
3007
+ url: "/order/{orderId}",
3008
+ path: {
3009
+ "orderId": orderId
3010
+ },
3011
+ errors: {
3012
+ 400: `Bad Request`,
3013
+ 401: `Unauthenticated`,
3014
+ 403: `Forbidden`
3015
+ }
3016
+ });
3017
+ }
3018
+ /**
3019
+ * Retrieves the details of a specific order.
3020
+ * @returns GetOrderByIdEndpoint_Output OK
3021
+ * @throws ApiError
3022
+ */
3023
+ static getOrder({
3024
+ orderId
3025
+ }) {
3026
+ return request(OpenAPI, {
3027
+ method: "GET",
3028
+ url: "/order/{orderId}",
3029
+ path: {
3030
+ "orderId": orderId
3031
+ },
3032
+ errors: {
3033
+ 400: `Bad Request`,
3034
+ 401: `Unauthenticated`,
3035
+ 403: `Forbidden`
3036
+ }
3037
+ });
3038
+ }
3039
+ /**
3040
+ * Updates the name or preceding order of an order.
3041
+ * @returns void
3042
+ * @throws ApiError
3043
+ */
3044
+ static patchOrder({
3045
+ orderId,
3046
+ requestBody
3047
+ }) {
3048
+ return request(OpenAPI, {
3049
+ method: "PATCH",
3050
+ url: "/order/{orderId}",
3051
+ path: {
3052
+ "orderId": orderId
3053
+ },
3054
+ body: requestBody,
3055
+ mediaType: "application/json",
3056
+ errors: {
3057
+ 400: `Bad Request`,
3058
+ 401: `Unauthenticated`,
3059
+ 403: `Forbidden`
3060
+ }
3061
+ });
3062
+ }
3063
+ /**
3064
+ * Aggregates the results of an order and returns them as a file attachment.
3065
+ * @returns binary OK
3066
+ * @throws ApiError
3067
+ */
3068
+ static getOrderDownloadResults({
3069
+ orderId
3070
+ }) {
3071
+ return request(OpenAPI, {
3072
+ method: "GET",
3073
+ url: "/order/{orderId}/download-results",
3074
+ path: {
3075
+ "orderId": orderId
3076
+ },
3077
+ errors: {
3078
+ 401: `Unauthenticated`,
3079
+ 403: `Forbidden`
3080
+ }
3081
+ });
3082
+ }
3083
+ /**
3084
+ * Aggregates the results of an order and returns them as a JSON string.
3085
+ * For file download, use the download-results endpoint instead.
3086
+ * @returns string OK
3087
+ * @throws ApiError
3088
+ */
3089
+ static getOrderResults({
3090
+ orderId
3091
+ }) {
3092
+ return request(OpenAPI, {
3093
+ method: "GET",
3094
+ url: "/order/{orderId}/results",
3095
+ path: {
3096
+ "orderId": orderId
3097
+ },
3098
+ errors: {
3099
+ 401: `Unauthenticated`,
3100
+ 403: `Forbidden`
3101
+ }
3102
+ });
3103
+ }
3104
+ /**
3105
+ * Retrieves all publicly available orders.
3106
+ * @returns GetPublicOrdersEndpoint_Output OK
3107
+ * @throws ApiError
3108
+ */
3109
+ static getOrdersPublic() {
3110
+ return request(OpenAPI, {
3111
+ method: "GET",
3112
+ url: "/orders/public",
3113
+ errors: {
3114
+ 400: `Bad Request`,
3115
+ 401: `Unauthenticated`,
3116
+ 403: `Forbidden`
3117
+ }
3118
+ });
3119
+ }
3120
+ /**
3121
+ * Marks or unmarks an order as a demo.
3122
+ * @returns void
3123
+ * @throws ApiError
3124
+ */
3125
+ static patchOrderDemo({
3126
+ orderId,
3127
+ isDemo = true
3128
+ }) {
3129
+ return request(OpenAPI, {
3130
+ method: "PATCH",
3131
+ url: "/order/{orderId}/demo",
3132
+ path: {
3133
+ "orderId": orderId
3134
+ },
3135
+ query: {
3136
+ "isDemo": isDemo
3137
+ },
3138
+ errors: {
3139
+ 400: `Bad Request`,
3140
+ 401: `Unauthenticated`,
3141
+ 403: `Forbidden`
3142
+ }
3143
+ });
3144
+ }
3145
+ /**
3146
+ * Pauses an order, stopping all campaigns from processing.
3147
+ * @returns void
3148
+ * @throws ApiError
3149
+ */
3150
+ static postOrderPause({
3151
+ orderId
3152
+ }) {
3153
+ return request(OpenAPI, {
3154
+ method: "POST",
3155
+ url: "/order/{orderId}/pause",
3156
+ path: {
3157
+ "orderId": orderId
3158
+ },
3159
+ errors: {
3160
+ 400: `Bad Request`,
3161
+ 401: `Unauthenticated`,
3162
+ 403: `Forbidden`
3163
+ }
3164
+ });
3165
+ }
3166
+ /**
3167
+ * Starts preview mode for an order so labelers' experience can be inspected.
3168
+ * @returns void
3169
+ * @throws ApiError
3170
+ */
3171
+ static postOrderPreview({
3172
+ orderId,
3173
+ requestBody
3174
+ }) {
3175
+ return request(OpenAPI, {
3176
+ method: "POST",
3177
+ url: "/order/{orderId}/preview",
3178
+ path: {
3179
+ "orderId": orderId
3180
+ },
3181
+ body: requestBody,
3182
+ mediaType: "application/json",
3183
+ errors: {
3184
+ 400: `Bad Request`,
3185
+ 401: `Unauthenticated`,
3186
+ 403: `Forbidden`
3187
+ }
3188
+ });
3189
+ }
3190
+ /**
3191
+ * Retrieves orders aggregated by customer with total amounts and most recent order information.
3192
+ * @returns QueryAggregatedOrdersEndpoint_PagedResultOfOutput OK
3193
+ * @throws ApiError
3194
+ */
3195
+ static getOrdersAggregatedOverview({
3196
+ page,
3197
+ pageSize,
3198
+ sort,
3199
+ customerMail,
3200
+ lastOrderDate,
3201
+ lastOrderName
3202
+ }) {
3203
+ return request(OpenAPI, {
3204
+ method: "GET",
3205
+ url: "/orders/aggregated-overview",
3206
+ query: {
3207
+ "page": page,
3208
+ "page_size": pageSize,
3209
+ "sort": sort,
3210
+ "customer_mail": customerMail,
3211
+ "last_order_date": lastOrderDate,
3212
+ "last_order_name": lastOrderName
3213
+ },
3214
+ errors: {
3215
+ 400: `Bad Request`,
3216
+ 401: `Unauthenticated`,
3217
+ 403: `Forbidden`
3218
+ }
3219
+ });
3220
+ }
3221
+ /**
3222
+ * @returns QueryOrdersEndpoint_PagedResultOfOutput OK
3223
+ * @throws ApiError
3224
+ */
3225
+ static getOrders({
3226
+ page,
3227
+ pageSize,
3228
+ sort,
3229
+ orderName,
3230
+ state,
3231
+ orderDate,
3232
+ customerMail,
3233
+ isPublic
3234
+ }) {
3235
+ return request(OpenAPI, {
3236
+ method: "GET",
3237
+ url: "/orders",
3238
+ query: {
3239
+ "page": page,
3240
+ "page_size": pageSize,
3241
+ "sort": sort,
3242
+ "order_name": orderName,
3243
+ "state": state,
3244
+ "order_date": orderDate,
3245
+ "customer_mail": customerMail,
3246
+ "is_public": isPublic
3247
+ },
3248
+ errors: {
3249
+ 400: `Bad Request`,
3250
+ 401: `Unauthenticated`,
3251
+ 403: `Forbidden`
3252
+ }
3253
+ });
3254
+ }
3255
+ /**
3256
+ * Resumes a paused order, restarting all campaigns.
3257
+ * @returns void
3258
+ * @throws ApiError
3259
+ */
3260
+ static postOrderResume({
3261
+ orderId
3262
+ }) {
3263
+ return request(OpenAPI, {
3264
+ method: "POST",
3265
+ url: "/order/{orderId}/resume",
3266
+ path: {
3267
+ "orderId": orderId
3268
+ },
3269
+ errors: {
3270
+ 400: `Bad Request`,
3271
+ 401: `Unauthenticated`,
3272
+ 403: `Forbidden`
3273
+ }
3274
+ });
3275
+ }
3276
+ /**
3277
+ * Retries processing of a failed order.
3278
+ * @returns void
3279
+ * @throws ApiError
3280
+ */
3281
+ static postOrderRetry({
3282
+ orderId
3283
+ }) {
3284
+ return request(OpenAPI, {
3285
+ method: "POST",
3286
+ url: "/order/{orderId}/retry",
3287
+ path: {
3288
+ "orderId": orderId
3289
+ },
3290
+ errors: {
3291
+ 400: `Bad Request`,
3292
+ 401: `Unauthenticated`,
3293
+ 403: `Forbidden`
3294
+ }
3295
+ });
3296
+ }
3297
+ /**
3298
+ * Marks or unmarks an order as public.
3299
+ * @returns void
3300
+ * @throws ApiError
3301
+ */
3302
+ static patchOrderShare({
3303
+ orderId,
3304
+ isPublic = true
3305
+ }) {
3306
+ return request(OpenAPI, {
3307
+ method: "PATCH",
3308
+ url: "/order/{orderId}/share",
3309
+ path: {
3310
+ "orderId": orderId
3311
+ },
3312
+ query: {
3313
+ "isPublic": isPublic
3314
+ },
3315
+ errors: {
3316
+ 400: `Bad Request`,
3317
+ 401: `Unauthenticated`,
3318
+ 403: `Forbidden`
3319
+ }
3320
+ });
3321
+ }
3322
+ /**
3323
+ * Submits an order for processing.
3324
+ * Once submitted, the order will be locked and no further changes can be made.
3325
+ * @returns void
3326
+ * @throws ApiError
3327
+ */
3328
+ static postOrderSubmit({
3329
+ orderId,
3330
+ requestBody
3331
+ }) {
3332
+ return request(OpenAPI, {
3333
+ method: "POST",
3334
+ url: "/order/{orderId}/submit",
3335
+ path: {
3336
+ "orderId": orderId
3337
+ },
3338
+ body: requestBody,
3339
+ mediaType: "application/json",
3340
+ errors: {
3341
+ 400: `Bad Request`,
3342
+ 401: `Unauthenticated`,
3343
+ 403: `Forbidden`
3344
+ }
3345
+ });
3346
+ }
3347
+ /**
3348
+ * Unlocks a cloned order so it can be modified.
3349
+ * Unlocking clones the entire dataset and its datapoints.
3350
+ * @returns UnlockOrderEndpoint_Output OK
3351
+ * @throws ApiError
3352
+ */
3353
+ static postOrderUnlock({
3354
+ orderId
3355
+ }) {
3356
+ return request(OpenAPI, {
3357
+ method: "POST",
3358
+ url: "/order/{orderId}/unlock",
3359
+ path: {
3360
+ "orderId": orderId
3361
+ },
3362
+ errors: {
3363
+ 400: `Bad Request`,
3364
+ 401: `Unauthenticated`,
3365
+ 403: `Forbidden`
3366
+ }
3367
+ });
3368
+ }
3369
+ };
3370
+
3371
+ // src/generated/services/OrganizationService.ts
3372
+ var OrganizationService = class {
3373
+ /**
3374
+ * Returns a paged list of organizations.
3375
+ * @returns QueryOrganizationsEndpoint_PagedResultOfOutput OK
3376
+ * @throws ApiError
3377
+ */
3378
+ static getOrganizations({
3379
+ page,
3380
+ pageSize,
3381
+ sort,
3382
+ name,
3383
+ domain,
3384
+ owner
3385
+ }) {
3386
+ return request(OpenAPI, {
3387
+ method: "GET",
3388
+ url: "/organizations",
3389
+ query: {
3390
+ "page": page,
3391
+ "page_size": pageSize,
3392
+ "sort": sort,
3393
+ "name": name,
3394
+ "domain": domain,
3395
+ "owner": owner
3396
+ },
3397
+ errors: {
3398
+ 400: `Bad Request`,
3399
+ 401: `Unauthenticated`,
3400
+ 403: `Forbidden`
3401
+ }
3402
+ });
3403
+ }
3404
+ };
3405
+
3406
+ // src/generated/services/ParticipantService.ts
3407
+ var ParticipantService = class {
3408
+ /**
3409
+ * Adds a sample to a participant.
3410
+ * @returns any OK
3411
+ * @throws ApiError
3412
+ */
3413
+ static postParticipantSample({
3414
+ participantId,
3415
+ requestBody
3416
+ }) {
3417
+ return request(OpenAPI, {
3418
+ method: "POST",
3419
+ url: "/participant/{participantId}/sample",
3420
+ path: {
3421
+ "participantId": participantId
3422
+ },
3423
+ body: requestBody,
3424
+ mediaType: "application/json"
3425
+ });
3426
+ }
3427
+ /**
3428
+ * Deletes a participant on a benchmark.
3429
+ * @returns void
3430
+ * @throws ApiError
3431
+ */
3432
+ static deleteParticipant({
3433
+ participantId
3434
+ }) {
3435
+ return request(OpenAPI, {
3436
+ method: "DELETE",
3437
+ url: "/participant/{participantId}",
3438
+ path: {
3439
+ "participantId": participantId
3440
+ }
3441
+ });
3442
+ }
3443
+ /**
3444
+ * Gets a participant by it's Id.
3445
+ * @returns GetParticipantByIdResult OK
3446
+ * @throws ApiError
3447
+ */
3448
+ static getParticipant({
3449
+ participantId
3450
+ }) {
3451
+ return request(OpenAPI, {
3452
+ method: "GET",
3453
+ url: "/participant/{participantId}",
3454
+ path: {
3455
+ "participantId": participantId
3456
+ }
3457
+ });
3458
+ }
3459
+ /**
3460
+ * Updates a participant using patch semantics.
3461
+ * @returns void
3462
+ * @throws ApiError
3463
+ */
3464
+ static patchParticipant({
3465
+ participantId,
3466
+ requestBody
3467
+ }) {
3468
+ return request(OpenAPI, {
3469
+ method: "PATCH",
3470
+ url: "/participant/{participantId}",
3471
+ path: {
3472
+ "participantId": participantId
3473
+ },
3474
+ body: requestBody,
3475
+ mediaType: "application/json"
3476
+ });
3477
+ }
3478
+ /**
3479
+ * Submits a participant to a benchmark.
3480
+ * @returns SubmitParticipantResult OK
3481
+ * @throws ApiError
3482
+ */
3483
+ static postParticipantsSubmit({
3484
+ participantId
3485
+ }) {
3486
+ return request(OpenAPI, {
3487
+ method: "POST",
3488
+ url: "/participants/{participantId}/submit",
3489
+ path: {
3490
+ "participantId": participantId
3491
+ }
3492
+ });
3493
+ }
3494
+ /**
3495
+ * Deletes a sample.
3496
+ * @returns GetParticipantByIdResult OK
3497
+ * @throws ApiError
3498
+ */
3499
+ static deleteParticipantSample({
3500
+ sampleId
3501
+ }) {
3502
+ return request(OpenAPI, {
3503
+ method: "DELETE",
3504
+ url: "/participant-sample/{sampleId}",
3505
+ path: {
3506
+ "sampleId": sampleId
3507
+ }
3508
+ });
3509
+ }
3510
+ /**
3511
+ * Queries all samples of a participant.
3512
+ * @returns PagedResultOfISampleByParticipant OK
3513
+ * @throws ApiError
3514
+ */
3515
+ static getParticipantSamples({
3516
+ participantId,
3517
+ request: request2,
3518
+ fillMissing = false
3519
+ }) {
3520
+ return request(OpenAPI, {
3521
+ method: "GET",
3522
+ url: "/participant/{participantId}/samples",
3523
+ path: {
3524
+ "participantId": participantId
3525
+ },
3526
+ query: {
3527
+ "request": request2,
3528
+ "fillMissing": fillMissing
3529
+ }
3530
+ });
3531
+ }
3532
+ /**
3533
+ * This endpoint disables a participant in a benchmark. this means that the participant will no longer actively be matched up against other participants and not collect further results. It will still be visible in the leaderboard.
3534
+ * @returns any OK
3535
+ * @throws ApiError
3536
+ */
3537
+ static postParticipantDisable({
3538
+ participantId
3539
+ }) {
3540
+ return request(OpenAPI, {
3541
+ method: "POST",
3542
+ url: "/participant/{participantId}/disable",
3543
+ path: {
3544
+ "participantId": participantId
3545
+ }
3546
+ });
3547
+ }
3548
+ };
3549
+
3550
+ // src/generated/services/PipelineService.ts
3551
+ var PipelineService = class {
3552
+ /**
3553
+ * Gets a pipeline by its id.
3554
+ * @returns GetPipelineByIdResult OK
3555
+ * @throws ApiError
3556
+ */
3557
+ static getPipeline({
3558
+ pipelineId
3559
+ }) {
3560
+ return request(OpenAPI, {
3561
+ method: "GET",
3562
+ url: "/pipeline/{pipelineId}",
3563
+ path: {
3564
+ "pipelineId": pipelineId
3565
+ }
3566
+ });
3567
+ }
3568
+ /**
3569
+ * Initiates a preliminary download of the pipeline.
3570
+ * @returns StartPreliminaryDownloadResult OK
3571
+ * @throws ApiError
3572
+ */
3573
+ static postPipelinePreliminaryDownload({
3574
+ pipelineId,
3575
+ requestBody
3576
+ }) {
3577
+ return request(OpenAPI, {
3578
+ method: "POST",
3579
+ url: "/pipeline/{pipelineId}/preliminary-download",
3580
+ path: {
3581
+ "pipelineId": pipelineId
3582
+ },
3583
+ body: requestBody,
3584
+ mediaType: "application/json"
3585
+ });
3586
+ }
3587
+ /**
3588
+ * Gets the preliminary download.
3589
+ * If it's still processing the request will return 202 Accepted.
3590
+ * @returns FileStreamResult OK
3591
+ * @returns any Accepted
3592
+ * @throws ApiError
3593
+ */
3594
+ static getPipelinePreliminaryDownload({
3595
+ preliminaryDownloadId
3596
+ }) {
3597
+ return request(OpenAPI, {
3598
+ method: "GET",
3599
+ url: "/pipeline/preliminary-download/{preliminaryDownloadId}",
3600
+ path: {
3601
+ "preliminaryDownloadId": preliminaryDownloadId
3602
+ }
3603
+ });
3604
+ }
3605
+ };
3606
+
3607
+ // src/generated/services/PromptService.ts
3608
+ var PromptService = class {
3609
+ /**
3610
+ * Updates the tags associated with a prompt.
3611
+ * @returns void
3612
+ * @throws ApiError
3613
+ */
3614
+ static putBenchmarkPromptTags({
3615
+ promptId,
3616
+ requestBody
3617
+ }) {
3618
+ return request(OpenAPI, {
3619
+ method: "PUT",
3620
+ url: "/benchmark-prompt/{promptId}/tags",
3621
+ path: {
3622
+ "promptId": promptId
3623
+ },
3624
+ body: requestBody,
3625
+ mediaType: "application/json"
3626
+ });
3627
+ }
3628
+ };
3629
+
3630
+ // src/generated/services/RankingFlowService.ts
3631
+ var RankingFlowService = class {
3632
+ /**
3633
+ * Creates a new ranking flow.
3634
+ * @returns CreateFlowEndpoint_Output OK
3635
+ * @throws ApiError
3636
+ */
3637
+ static postFlowRanking({
3638
+ requestBody
3639
+ }) {
3640
+ return request(OpenAPI, {
3641
+ method: "POST",
3642
+ url: "/flow/ranking",
3643
+ body: requestBody,
3644
+ mediaType: "application/json",
3645
+ errors: {
3646
+ 400: `Bad Request`,
3647
+ 401: `Unauthenticated`,
3648
+ 403: `Forbidden`
3649
+ }
3650
+ });
3651
+ }
3652
+ /**
3653
+ * Updates the configuration of a ranking flow.
3654
+ * @returns void
3655
+ * @throws ApiError
3656
+ */
3657
+ static patchFlowRankingConfig({
3658
+ flowId,
3659
+ requestBody
3660
+ }) {
3661
+ return request(OpenAPI, {
3662
+ method: "PATCH",
3663
+ url: "/flow/ranking/{flowId}/config",
3664
+ path: {
3665
+ "flowId": flowId
3666
+ },
3667
+ body: requestBody,
3668
+ mediaType: "application/json",
3669
+ errors: {
3670
+ 400: `Bad Request`,
3671
+ 401: `Unauthenticated`,
3672
+ 403: `Forbidden`
3673
+ }
3674
+ });
3675
+ }
3676
+ };
3677
+
3678
+ // src/generated/services/RankingFlowItemService.ts
3679
+ var RankingFlowItemService = class {
3680
+ /**
3681
+ * Creates a new flow item for the specified flow.
3682
+ * @returns CreateFlowItemEndpoint_Output OK
3683
+ * @throws ApiError
3684
+ */
3685
+ static postFlowRankingItem({
3686
+ flowId,
3687
+ requestBody
3688
+ }) {
3689
+ return request(OpenAPI, {
3690
+ method: "POST",
3691
+ url: "/flow/ranking/{flowId}/item",
3692
+ path: {
3693
+ "flowId": flowId
3694
+ },
3695
+ body: requestBody,
3696
+ mediaType: "application/json",
3697
+ errors: {
3698
+ 400: `Bad Request`,
3699
+ 401: `Unauthenticated`,
3700
+ 403: `Forbidden`
3701
+ }
3702
+ });
3703
+ }
3704
+ /**
3705
+ * Queries flow items for a flow.
3706
+ * @returns QueryFlowItemsEndpoint_PagedResultOfOutput OK
3707
+ * @throws ApiError
3708
+ */
3709
+ static getFlowRankingItem({
3710
+ flowId,
3711
+ page,
3712
+ pageSize,
3713
+ sort,
3714
+ state,
3715
+ createdAt
3716
+ }) {
3717
+ return request(OpenAPI, {
3718
+ method: "GET",
3719
+ url: "/flow/ranking/{flowId}/item",
3720
+ path: {
3721
+ "flowId": flowId
3722
+ },
3723
+ query: {
3724
+ "page": page,
3725
+ "page_size": pageSize,
3726
+ "sort": sort,
3727
+ "state": state,
3728
+ "created_at": createdAt
3729
+ },
3730
+ errors: {
3731
+ 400: `Bad Request`,
3732
+ 401: `Unauthenticated`,
3733
+ 403: `Forbidden`
3734
+ }
3735
+ });
3736
+ }
3737
+ /**
3738
+ * Retrieves a flow item by its ID.
3739
+ * @returns GetFlowItemByIdEndpoint_Output OK
3740
+ * @throws ApiError
3741
+ */
3742
+ static getFlowRankingItem1({
3743
+ flowItemId
3744
+ }) {
3745
+ return request(OpenAPI, {
3746
+ method: "GET",
3747
+ url: "/flow/ranking/item/{flowItemId}",
3748
+ path: {
3749
+ "flowItemId": flowItemId
3750
+ },
3751
+ errors: {
3752
+ 400: `Bad Request`,
3753
+ 401: `Unauthenticated`,
3754
+ 403: `Forbidden`
3755
+ }
3756
+ });
3757
+ }
3758
+ /**
3759
+ * Returns ranking results with Elo scores for a completed flow item.
3760
+ * Returns 409 Conflict if the flow item is not yet completed or has no associated workflow.
3761
+ * @returns GetRankingFlowItemResultsEndpoint_Output OK
3762
+ * @throws ApiError
3763
+ */
3764
+ static getFlowRankingItemResults({
3765
+ flowItemId
3766
+ }) {
3767
+ return request(OpenAPI, {
3768
+ method: "GET",
3769
+ url: "/flow/ranking/item/{flowItemId}/results",
3770
+ path: {
3771
+ "flowItemId": flowItemId
3772
+ },
3773
+ errors: {
3774
+ 400: `Bad Request`,
3775
+ 401: `Unauthenticated`,
3776
+ 403: `Forbidden`,
3777
+ 409: `Conflict`
3778
+ }
3779
+ });
3780
+ }
3781
+ /**
3782
+ * Retrieves the pairwise vote matrix for a completed flow item.
3783
+ * Returns 409 Conflict if the flow item is not completed or has no associated workflow.
3784
+ * @returns GetRankingFlowItemVoteMatrixEndpoint_Output OK
3785
+ * @throws ApiError
3786
+ */
3787
+ static getFlowRankingItemVoteMatrix({
3788
+ flowItemId
3789
+ }) {
3790
+ return request(OpenAPI, {
3791
+ method: "GET",
3792
+ url: "/flow/ranking/item/{flowItemId}/vote-matrix",
3793
+ path: {
3794
+ "flowItemId": flowItemId
3795
+ },
3796
+ errors: {
3797
+ 400: `Bad Request`,
3798
+ 401: `Unauthenticated`,
3799
+ 403: `Forbidden`,
3800
+ 409: `Conflict`
3801
+ }
3802
+ });
3803
+ }
3804
+ };
3805
+
3806
+ // src/generated/services/RankingWorkflowService.ts
3807
+ var RankingWorkflowService = class {
3808
+ /**
3809
+ * Get the result overview for a ranking workflow.
3810
+ * @returns GetRankingWorkflowResultsResult OK
3811
+ * @throws ApiError
3812
+ */
3813
+ static getWorkflowCompareResults({
3814
+ workflowId,
3815
+ model
3816
+ }) {
3817
+ return request(OpenAPI, {
3818
+ method: "GET",
3819
+ url: "/workflow/compare/{workflowId}/results",
3820
+ path: {
3821
+ "workflowId": workflowId
3822
+ },
3823
+ query: {
3824
+ "model": model
3825
+ }
3826
+ });
3827
+ }
3828
+ };
3829
+
3830
+ // src/generated/services/RapidService.ts
3831
+ var RapidService = class {
3832
+ /**
3833
+ * Rejects a completed rapid, marking its results as invalid.
3834
+ * The rapid must be in the Done state. Rejection propagates staleness to dependent entities.
3835
+ * @returns void
3836
+ * @throws ApiError
3837
+ */
3838
+ static postRapidReject({
3839
+ rapidId
3840
+ }) {
3841
+ return request(OpenAPI, {
3842
+ method: "POST",
3843
+ url: "/rapid/{rapidId}/reject",
3844
+ path: {
3845
+ "rapidId": rapidId
3846
+ },
3847
+ errors: {
3848
+ 400: `Bad Request`,
3849
+ 401: `Unauthenticated`,
3850
+ 403: `Forbidden`
3851
+ }
3852
+ });
3853
+ }
3854
+ };
3855
+
3856
+ // src/generated/services/RapidataIdentityApiService.ts
3857
+ var RapidataIdentityApiService = class {
3858
+ /**
3859
+ * @returns any OK
3860
+ * @throws ApiError
3861
+ */
3862
+ static get() {
3863
+ return request(OpenAPI, {
3864
+ method: "GET",
3865
+ url: "/"
3866
+ });
3867
+ }
3868
+ };
3869
+
3870
+ // src/generated/services/RapidsService.ts
3871
+ var RapidsService = class {
3872
+ /**
3873
+ * Updates a rapid's validation properties within an audience.
3874
+ * @returns void
3875
+ * @throws ApiError
3876
+ */
3877
+ static patchAudienceRapid({
3878
+ audienceId,
3879
+ rapidId,
3880
+ requestBody
3881
+ }) {
3882
+ return request(OpenAPI, {
3883
+ method: "PATCH",
3884
+ url: "/audience/{audienceId}/rapid/{rapidId}",
3885
+ path: {
3886
+ "audienceId": audienceId,
3887
+ "rapidId": rapidId
3888
+ },
3889
+ body: requestBody,
3890
+ mediaType: "application/json",
3891
+ errors: {
3892
+ 400: `Bad Request`,
3893
+ 401: `Unauthenticated`,
3894
+ 403: `Forbidden`
3895
+ }
3896
+ });
3897
+ }
3898
+ };
3899
+
3900
+ // src/generated/services/SampleService.ts
3901
+ var SampleService = class {
3902
+ /**
3903
+ * Gets a sample by its Id.
3904
+ * @returns GetSampleByIdResult OK
3905
+ * @throws ApiError
3906
+ */
3907
+ static getBenchmarkSample({
3908
+ sampleId
3909
+ }) {
3910
+ return request(OpenAPI, {
3911
+ method: "GET",
3912
+ url: "/benchmark-sample/{sampleId}",
3913
+ path: {
3914
+ "sampleId": sampleId
3915
+ }
3916
+ });
3917
+ }
3918
+ };
3919
+
3920
+ // src/generated/services/SimpleWorkflowService.ts
3921
+ var SimpleWorkflowService = class {
3922
+ /**
3923
+ * Get the result overview for a simple workflow.
3924
+ * @returns PagedResultOfGetWorkflowResultsResult OK
3925
+ * @throws ApiError
3926
+ */
3927
+ static getWorkflowSimpleResults({
3928
+ workflowId,
3929
+ model
3930
+ }) {
3931
+ return request(OpenAPI, {
3932
+ method: "GET",
3933
+ url: "/workflow/simple/{workflowId}/results",
3934
+ path: {
3935
+ "workflowId": workflowId
3936
+ },
3937
+ query: {
3938
+ "model": model
3939
+ }
3940
+ });
3941
+ }
3942
+ };
3943
+
3944
+ // src/generated/services/SurveyService.ts
3945
+ var SurveyService = class {
3946
+ /**
3947
+ * Sends a survey.
3948
+ * @returns any OK
3949
+ * @throws ApiError
3950
+ */
3951
+ static postIdentitySurvey({
3952
+ requestBody
3953
+ }) {
3954
+ return request(OpenAPI, {
3955
+ method: "POST",
3956
+ url: "/identity/survey",
3957
+ body: requestBody,
3958
+ mediaType: "application/json"
3959
+ });
3960
+ }
3961
+ };
3962
+
3963
+ // src/generated/services/UserRapidService.ts
3964
+ var UserRapidService = class {
3965
+ /**
3966
+ * Validates that the rapids associated with the current user are active.
3967
+ * @returns AreRapidsActiveResult OK
3968
+ * @throws ApiError
3969
+ */
3970
+ static getRapidRapidBagIsValid() {
3971
+ return request(OpenAPI, {
3972
+ method: "GET",
3973
+ url: "/rapid/rapid-bag/is-valid"
3974
+ });
3975
+ }
3976
+ /**
3977
+ * Submits a response for a Rapid.
3978
+ * @returns AddUserResponseResult OK
3979
+ * @throws ApiError
3980
+ */
3981
+ static postRapidResponse({
3982
+ requestBody
3983
+ }) {
3984
+ return request(OpenAPI, {
3985
+ method: "POST",
3986
+ url: "/rapid/response",
3987
+ body: requestBody,
3988
+ mediaType: "application/json"
3989
+ });
3990
+ }
3991
+ /**
3992
+ * Skips a Rapid for the user.
3993
+ * @returns AddUserResponseResult OK
3994
+ * @throws ApiError
3995
+ */
3996
+ static postRapidSkip({
3997
+ requestBody
3998
+ }) {
3999
+ return request(OpenAPI, {
4000
+ method: "POST",
4001
+ url: "/rapid/skip",
4002
+ body: requestBody,
4003
+ mediaType: "application/json"
4004
+ });
4005
+ }
4006
+ /**
4007
+ * Used to report an issue with a rapid.
4008
+ * @returns void
4009
+ * @throws ApiError
4010
+ */
4011
+ static postRapidReport({
4012
+ rapidId,
4013
+ requestBody
4014
+ }) {
4015
+ return request(OpenAPI, {
4016
+ method: "POST",
4017
+ url: "/rapid/{rapidId}/report",
4018
+ path: {
4019
+ "rapidId": rapidId
4020
+ },
4021
+ body: requestBody,
4022
+ mediaType: "application/json"
4023
+ });
4024
+ }
4025
+ /**
4026
+ * Inspects a report's dump. Can be used to restore zustand state or anything alike.
4027
+ * @returns InspectReportResult OK
4028
+ * @throws ApiError
4029
+ */
4030
+ static getRapidReport({
4031
+ reportId
4032
+ }) {
4033
+ return request(OpenAPI, {
4034
+ method: "GET",
4035
+ url: "/rapid/report/{reportId}",
4036
+ path: {
4037
+ "reportId": reportId
4038
+ }
4039
+ });
4040
+ }
4041
+ };
4042
+
4043
+ // src/generated/services/ValidationFeedbackService.ts
4044
+ var ValidationFeedbackService = class {
4045
+ /**
4046
+ * Submits feedback for a validation rapid outcome.
4047
+ * @returns void
4048
+ * @throws ApiError
4049
+ */
4050
+ static postRapidValidationFeedback({
4051
+ rapidId,
4052
+ requestBody
4053
+ }) {
4054
+ return request(OpenAPI, {
4055
+ method: "POST",
4056
+ url: "/rapid/{rapidId}/validation-feedback",
4057
+ path: {
4058
+ "rapidId": rapidId
4059
+ },
4060
+ body: requestBody,
4061
+ mediaType: "application/json",
4062
+ errors: {
4063
+ 400: `Bad Request`,
4064
+ 401: `Unauthenticated`,
4065
+ 403: `Forbidden`
4066
+ }
4067
+ });
4068
+ }
4069
+ /**
4070
+ * Queries validation feedbacks for a rapid.
4071
+ * @returns QueryValidationFeedbacksEndpoint_PagedResultOfOutput OK
4072
+ * @throws ApiError
4073
+ */
4074
+ static getRapidValidationFeedback({
4075
+ rapidId,
4076
+ page,
4077
+ pageSize,
4078
+ sort,
4079
+ userId,
4080
+ feedback,
4081
+ createdAt
4082
+ }) {
4083
+ return request(OpenAPI, {
4084
+ method: "GET",
4085
+ url: "/rapid/{rapidId}/validation-feedback",
4086
+ path: {
4087
+ "rapidId": rapidId
4088
+ },
4089
+ query: {
4090
+ "page": page,
4091
+ "page_size": pageSize,
4092
+ "sort": sort,
4093
+ "user_id": userId,
4094
+ "feedback": feedback,
4095
+ "created_at": createdAt
4096
+ },
4097
+ errors: {
4098
+ 400: `Bad Request`,
4099
+ 401: `Unauthenticated`,
4100
+ 403: `Forbidden`
4101
+ }
4102
+ });
4103
+ }
4104
+ };
4105
+
4106
+ // src/generated/services/ValidationSetService.ts
4107
+ var ValidationSetService = class {
4108
+ /**
4109
+ * Queries available validation sets based on the provided filter, paging and sorting criteria.
4110
+ * @returns PagedResultOfValidationSetModel OK
4111
+ * @throws ApiError
4112
+ */
4113
+ static getValidationSets({
4114
+ model
4115
+ }) {
4116
+ return request(OpenAPI, {
4117
+ method: "GET",
4118
+ url: "/validation-sets",
4119
+ query: {
4120
+ "model": model
4121
+ }
4122
+ });
4123
+ }
4124
+ /**
4125
+ * Gets a validation set that is available to the user and best matches the provided parameters.
4126
+ * This is not a hard filter, instead it is used to find validation sets that have similar characteristics to the provided instruction.
4127
+ * @returns GetRecommendedValidationSetResult OK
4128
+ * @throws ApiError
4129
+ */
4130
+ static getValidationSetRecommended({
4131
+ assetType,
4132
+ modality,
4133
+ promptType,
4134
+ instruction
4135
+ }) {
4136
+ return request(OpenAPI, {
4137
+ method: "GET",
4138
+ url: "/validation-set/recommended",
4139
+ query: {
4140
+ "assetType": assetType,
4141
+ "modality": modality,
4142
+ "promptType": promptType,
4143
+ "instruction": instruction
4144
+ },
4145
+ errors: {
4146
+ 404: `Not Found`
4147
+ }
4148
+ });
4149
+ }
4150
+ /**
4151
+ * Gets a validation set by the id.
4152
+ * @returns void
4153
+ * @throws ApiError
4154
+ */
4155
+ static deleteValidationSet({
4156
+ validationSetId
4157
+ }) {
4158
+ return request(OpenAPI, {
4159
+ method: "DELETE",
4160
+ url: "/validation-set/{validationSetId}",
4161
+ path: {
4162
+ "validationSetId": validationSetId
4163
+ }
4164
+ });
4165
+ }
4166
+ /**
4167
+ * Gets a validation set by the id.
4168
+ * @returns GetValidationSetByIdResult OK
4169
+ * @throws ApiError
4170
+ */
4171
+ static getValidationSet({
4172
+ validationSetId
4173
+ }) {
4174
+ return request(OpenAPI, {
4175
+ method: "GET",
4176
+ url: "/validation-set/{validationSetId}",
4177
+ path: {
4178
+ "validationSetId": validationSetId
4179
+ }
4180
+ });
4181
+ }
4182
+ /**
4183
+ * Updates different characteristics of a validation set.
4184
+ * @returns void
4185
+ * @throws ApiError
4186
+ */
4187
+ static patchValidationSet({
4188
+ validationSetId,
4189
+ requestBody
4190
+ }) {
4191
+ return request(OpenAPI, {
4192
+ method: "PATCH",
4193
+ url: "/validation-set/{validationSetId}",
4194
+ path: {
4195
+ "validationSetId": validationSetId
4196
+ },
4197
+ body: requestBody,
4198
+ mediaType: "application/json"
4199
+ });
4200
+ }
4201
+ /**
4202
+ * Gets the available validation sets for the current user.
4203
+ * @returns GetAvailableValidationSetsResult OK
4204
+ * @throws ApiError
4205
+ */
4206
+ static getValidationSetsAvailable() {
4207
+ return request(OpenAPI, {
4208
+ method: "GET",
4209
+ url: "/validation-sets/available"
4210
+ });
4211
+ }
4212
+ /**
4213
+ * Creates a new empty validation set.
4214
+ * @returns CreateEmptyValidationSetResult OK
4215
+ * @throws ApiError
4216
+ */
4217
+ static postValidationSet({
4218
+ requestBody
4219
+ }) {
4220
+ return request(OpenAPI, {
4221
+ method: "POST",
4222
+ url: "/validation-set",
4223
+ body: requestBody,
4224
+ mediaType: "application/json"
4225
+ });
4226
+ }
4227
+ /**
4228
+ * Queries the validation rapids for a specific validation set.
4229
+ * @returns PagedResultOfGetValidationRapidsResult OK
4230
+ * @throws ApiError
4231
+ */
4232
+ static getValidationSetRapids({
4233
+ validationSetId,
4234
+ model
4235
+ }) {
4236
+ return request(OpenAPI, {
4237
+ method: "GET",
4238
+ url: "/validation-set/{validationSetId}/rapids",
4239
+ path: {
4240
+ "validationSetId": validationSetId
4241
+ },
4242
+ query: {
4243
+ "model": model
4244
+ }
4245
+ });
4246
+ }
4247
+ /**
4248
+ * Adds a new validation rapid to the validation set using JSON body.
4249
+ * @returns void
4250
+ * @throws ApiError
4251
+ */
4252
+ static postValidationSetRapid({
4253
+ validationSetId,
4254
+ requestBody
4255
+ }) {
4256
+ return request(OpenAPI, {
4257
+ method: "POST",
4258
+ url: "/validation-set/{validationSetId}/rapid",
4259
+ path: {
4260
+ "validationSetId": validationSetId
4261
+ },
4262
+ body: requestBody,
4263
+ mediaType: "application/json"
4264
+ });
4265
+ }
4266
+ /**
4267
+ * Updates the visibility of a validation set.
4268
+ * Public validation sets are used to automatically add a validation set to an order if no validation set is specified.
4269
+ * @returns void
4270
+ * @throws ApiError
4271
+ */
4272
+ static patchValidationSetVisibility({
4273
+ validationSetId,
4274
+ isPublic
4275
+ }) {
4276
+ return request(OpenAPI, {
4277
+ method: "PATCH",
4278
+ url: "/validation-set/{validationSetId}/visibility",
4279
+ path: {
4280
+ "validationSetId": validationSetId
4281
+ },
4282
+ query: {
4283
+ "isPublic": isPublic
4284
+ }
4285
+ });
4286
+ }
4287
+ /**
4288
+ * Exports all rapids of a validation-set to a file.
4289
+ * @returns FileStreamResult OK
4290
+ * @throws ApiError
4291
+ */
4292
+ static getValidationSetExport({
4293
+ validationSetId
4294
+ }) {
4295
+ return request(OpenAPI, {
4296
+ method: "GET",
4297
+ url: "/validation-set/{validationSetId}/export",
4298
+ path: {
4299
+ "validationSetId": validationSetId
4300
+ }
4301
+ });
4302
+ }
4303
+ };
4304
+
4305
+ // src/generated/services/WorkflowService.ts
4306
+ var WorkflowService = class {
4307
+ /**
4308
+ * Queries workflows based on the provided filter, page, and sort criteria.
4309
+ * @returns PagedResultOfIWorkflowModel OK
4310
+ * @throws ApiError
4311
+ */
4312
+ static getWorkflows({
4313
+ request: request2
4314
+ }) {
4315
+ return request(OpenAPI, {
4316
+ method: "GET",
4317
+ url: "/workflows",
4318
+ query: {
4319
+ "request": request2
4320
+ }
4321
+ });
4322
+ }
4323
+ /**
4324
+ * Get a workflow by its ID.
4325
+ * @returns GetWorkflowByIdResult OK
4326
+ * @throws ApiError
4327
+ */
4328
+ static getWorkflow({
4329
+ workflowId
4330
+ }) {
4331
+ return request(OpenAPI, {
4332
+ method: "GET",
4333
+ url: "/workflow/{workflowId}",
4334
+ path: {
4335
+ "workflowId": workflowId
4336
+ }
4337
+ });
4338
+ }
4339
+ /**
4340
+ * Get the progress of a workflow.
4341
+ * @returns GetWorkflowProgressResult OK
4342
+ * @throws ApiError
4343
+ */
4344
+ static getWorkflowProgress({
4345
+ workflowId
4346
+ }) {
4347
+ return request(OpenAPI, {
4348
+ method: "GET",
4349
+ url: "/workflow/{workflowId}/progress",
4350
+ path: {
4351
+ "workflowId": workflowId
4352
+ }
4353
+ });
4354
+ }
4355
+ /**
4356
+ * Calculates a summary of the results for a simple ranking workflow.
4357
+ * The summary includes the number of times an asset at each index was the winner.
4358
+ * @returns GetCompareAbSummaryResult OK
4359
+ * @throws ApiError
4360
+ */
4361
+ static getWorkflowCompareAbSummary({
4362
+ workflowId,
4363
+ useUserScore = false
4364
+ }) {
4365
+ return request(OpenAPI, {
4366
+ method: "GET",
4367
+ url: "/workflow/{workflowId}/compare-ab-summary",
4368
+ path: {
4369
+ "workflowId": workflowId
4370
+ },
4371
+ query: {
4372
+ "useUserScore": useUserScore
4373
+ }
4374
+ });
4375
+ }
4376
+ /**
4377
+ * Gets the limit most recent or oldest responses for a workflow.
4378
+ * The responses are not guaranteed to be of any specific rapid.
4379
+ * Instead, this endpoint returns all responses to any rapid in the workflow.
4380
+ * @returns GetResponsesResult OK
4381
+ * @throws ApiError
4382
+ */
4383
+ static getWorkflowResponses({
4384
+ workflowId,
4385
+ limit = 100,
4386
+ sort
4387
+ }) {
4388
+ return request(OpenAPI, {
4389
+ method: "GET",
4390
+ url: "/workflow/{workflowId}/responses",
4391
+ path: {
4392
+ "workflowId": workflowId
4393
+ },
4394
+ query: {
4395
+ "limit": limit,
4396
+ "sort": sort
4397
+ }
4398
+ });
4399
+ }
4400
+ /**
4401
+ * Deletes a workflow.
4402
+ * @returns any OK
4403
+ * @throws ApiError
4404
+ */
4405
+ static deleteWorkflowDelete({
4406
+ id
4407
+ }) {
4408
+ return request(OpenAPI, {
4409
+ method: "DELETE",
4410
+ url: "/workflow/delete",
4411
+ query: {
4412
+ "id": id
4413
+ }
4414
+ });
4415
+ }
4416
+ };
4417
+
4418
+ export { ApiError, AssetService, AudienceService, BatchUploadService, BenchmarkService, CacheService, CampaignService, CancelError, CancelablePromise, ClientService, CustomerRapidService, CustomerService, DatapointService, DatasetGroupService, DatasetService, EvaluationWorkflowService, ExamplesService, FeedbackService, FlowItemService, FlowService, GroupedRankingWorkflowService, IdentityService, JobService, LeaderboardService, NewsletterService, OpenAPI, OrderService, OrganizationService, ParticipantService, PipelineService, PromptService, RankingFlowItemService, RankingFlowService, RankingWorkflowService, RapidService, RapidataIdentityApiService, RapidsService, SampleService, SimpleWorkflowService, SurveyService, UserRapidService, ValidationFeedbackService, ValidationSetService, WorkflowService };
4419
+ //# sourceMappingURL=index.js.map
4420
+ //# sourceMappingURL=index.js.map