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