@civitai/client 0.2.0-beta.40 → 0.2.0-beta.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/generated/client/client.gen.d.ts +2 -0
  2. package/dist/generated/client/client.gen.js +237 -0
  3. package/dist/generated/client/index.d.ts +9 -8
  4. package/dist/generated/client/index.js +6 -4
  5. package/dist/generated/client/types.gen.d.ts +194 -0
  6. package/dist/generated/client/types.gen.js +2 -0
  7. package/dist/generated/client/utils.gen.d.ts +58 -0
  8. package/dist/generated/client/utils.gen.js +234 -0
  9. package/dist/generated/client.gen.d.ts +5 -5
  10. package/dist/generated/client.gen.js +1 -1
  11. package/dist/generated/core/auth.gen.d.ts +21 -0
  12. package/dist/generated/core/auth.gen.js +14 -0
  13. package/dist/generated/core/bodySerializer.gen.d.ts +25 -0
  14. package/dist/generated/core/bodySerializer.gen.js +57 -0
  15. package/dist/generated/core/params.gen.d.ts +49 -0
  16. package/dist/generated/core/params.gen.js +100 -0
  17. package/dist/generated/core/pathSerializer.gen.d.ts +49 -0
  18. package/dist/generated/core/pathSerializer.gen.js +106 -0
  19. package/dist/generated/core/queryKeySerializer.gen.d.ts +24 -0
  20. package/dist/generated/core/queryKeySerializer.gen.js +92 -0
  21. package/dist/generated/core/serverSentEvents.gen.d.ts +88 -0
  22. package/dist/generated/core/serverSentEvents.gen.js +134 -0
  23. package/dist/generated/core/types.gen.d.ts +106 -0
  24. package/dist/generated/core/types.gen.js +2 -0
  25. package/dist/generated/core/utils.gen.d.ts +25 -0
  26. package/dist/generated/core/utils.gen.js +87 -0
  27. package/dist/generated/index.d.ts +1228 -2
  28. package/dist/generated/index.js +2 -2
  29. package/dist/generated/sdk.gen.d.ts +505 -75
  30. package/dist/generated/sdk.gen.js +371 -331
  31. package/dist/generated/types.gen.d.ts +9742 -2074
  32. package/dist/generated/types.gen.js +81 -82
  33. package/package.json +3 -3
@@ -1,17 +1,22 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
- import { client as _heyApiClient } from './client.gen';
2
+ import { client } from './client.gen';
3
+ export const uploadBlob = (options) => {
4
+ var _a;
5
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).put({
6
+ url: '/v2/providers/blobs/{blobKey}',
7
+ ...options,
8
+ });
9
+ };
10
+ export const uploadMultipleBlobs = (options) => {
11
+ var _a;
12
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({ url: '/v2/providers/blobs', ...options });
13
+ };
3
14
  /**
4
15
  * Get blob by ID. This will redirect to a cacheable content URL.
5
16
  */
6
17
  export const getBlob = (options) => {
7
18
  var _a;
8
- return ((_a = options.client) !== null && _a !== void 0 ? _a : _heyApiClient).get({
9
- security: [
10
- {
11
- scheme: 'bearer',
12
- type: 'http',
13
- },
14
- ],
19
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
15
20
  url: '/v2/consumer/blobs/{blobId}',
16
21
  ...options,
17
22
  });
@@ -21,13 +26,7 @@ export const getBlob = (options) => {
21
26
  */
22
27
  export const headBlob = (options) => {
23
28
  var _a;
24
- return ((_a = options.client) !== null && _a !== void 0 ? _a : _heyApiClient).head({
25
- security: [
26
- {
27
- scheme: 'bearer',
28
- type: 'http',
29
- },
30
- ],
29
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).head({
31
30
  url: '/v2/consumer/blobs/{blobId}',
32
31
  ...options,
33
32
  });
@@ -38,16 +37,7 @@ export const headBlob = (options) => {
38
37
  */
39
38
  export const getConsumerBlobUploadUrl = (options) => {
40
39
  var _a;
41
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).get({
42
- security: [
43
- {
44
- scheme: 'bearer',
45
- type: 'http',
46
- },
47
- ],
48
- url: '/v2/consumer/blobs/upload',
49
- ...options,
50
- });
40
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get({ url: '/v2/consumer/blobs/upload', ...options });
51
41
  };
52
42
  /**
53
43
  * Upload a blob directly with on-the-fly moderation.
@@ -55,29 +45,14 @@ export const getConsumerBlobUploadUrl = (options) => {
55
45
  */
56
46
  export const uploadConsumerBlob = (options) => {
57
47
  var _a;
58
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
59
- security: [
60
- {
61
- scheme: 'bearer',
62
- type: 'http',
63
- },
64
- ],
65
- url: '/v2/consumer/blobs',
66
- ...options,
67
- });
48
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({ url: '/v2/consumer/blobs', ...options });
68
49
  };
69
50
  /**
70
51
  * Serves cacheable blob content using a deterministic encrypted token
71
52
  */
72
53
  export const getBlobContent = (options) => {
73
54
  var _a;
74
- return ((_a = options.client) !== null && _a !== void 0 ? _a : _heyApiClient).get({
75
- security: [
76
- {
77
- scheme: 'bearer',
78
- type: 'http',
79
- },
80
- ],
55
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
81
56
  url: '/v2/consumer/blobs/content/{encryptedToken}',
82
57
  ...options,
83
58
  });
@@ -87,30 +62,78 @@ export const getBlobContent = (options) => {
87
62
  */
88
63
  export const getBlockedContent = (options) => {
89
64
  var _a;
90
- return ((_a = options.client) !== null && _a !== void 0 ? _a : _heyApiClient).get({
91
- security: [
92
- {
93
- scheme: 'bearer',
94
- type: 'http',
95
- },
96
- ],
65
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
97
66
  url: '/v2/consumer/blobs/blocked/{encryptedToken}',
98
67
  ...options,
99
68
  });
100
69
  };
70
+ export const invalidateUserCache = (options) => {
71
+ var _a;
72
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({ url: '/v2/consumer/civitai/{userId}', ...options });
73
+ };
74
+ export const claimJobs = (options) => {
75
+ var _a;
76
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
77
+ url: '/v2/providers/workers/{workerId}/claims',
78
+ ...options,
79
+ });
80
+ };
81
+ export const updateClaimStatus = (options) => {
82
+ var _a;
83
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).put({
84
+ url: '/v2/providers/workers/{workerId}/claims/{claimId}/status',
85
+ ...options,
86
+ headers: {
87
+ 'Content-Type': 'application/json',
88
+ ...options.headers,
89
+ },
90
+ });
91
+ };
92
+ /**
93
+ * Query for existing configurations.
94
+ */
95
+ export const queryConfigurations = (options) => {
96
+ var _a;
97
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get({ url: '/v2/providers/configurations', ...options });
98
+ };
99
+ /**
100
+ * Create a new configuration.
101
+ */
102
+ export const createConfiguration = (options) => {
103
+ var _a;
104
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
105
+ url: '/v2/providers/configurations',
106
+ ...options,
107
+ headers: {
108
+ 'Content-Type': 'application/json',
109
+ ...options === null || options === void 0 ? void 0 : options.headers,
110
+ },
111
+ });
112
+ };
113
+ /**
114
+ * Get options for a configuration.
115
+ */
116
+ export const getConfiguration = (options) => {
117
+ var _a;
118
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
119
+ url: '/v2/providers/configurations/{configurationId}/options',
120
+ ...options,
121
+ });
122
+ };
123
+ /**
124
+ * Delete a configuration.
125
+ */
126
+ export const deleteConfiguration = (options) => {
127
+ var _a;
128
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({ url: '/v2/providers/configurations/{configurationId}', ...options });
129
+ };
101
130
  /**
102
131
  * Workflow step for generating music using ACE Step 1.5.
103
132
  * /// Produces full songs from text descriptions and structured lyrics.
104
133
  */
105
134
  export const invokeAceStepAudioStepTemplate = (options) => {
106
135
  var _a;
107
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
108
- security: [
109
- {
110
- scheme: 'bearer',
111
- type: 'http',
112
- },
113
- ],
136
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
114
137
  url: '/v2/consumer/recipes/aceStepAudio',
115
138
  ...options,
116
139
  headers: {
@@ -121,17 +144,12 @@ export const invokeAceStepAudioStepTemplate = (options) => {
121
144
  };
122
145
  /**
123
146
  * Age classification
147
+ *
124
148
  * Detects minors in media content. Returns a boolean value indicating whether the content contains minors as well as details on where minors are detected.
125
149
  */
126
150
  export const invokeAgeClassificationStepTemplate = (options) => {
127
151
  var _a;
128
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
129
- security: [
130
- {
131
- scheme: 'bearer',
132
- type: 'http',
133
- },
134
- ],
152
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
135
153
  url: '/v2/consumer/recipes/ageClassification',
136
154
  ...options,
137
155
  headers: {
@@ -140,20 +158,26 @@ export const invokeAgeClassificationStepTemplate = (options) => {
140
158
  },
141
159
  });
142
160
  };
161
+ export const invokeBatchOcrSafetyClassificationStepTemplate = (options) => {
162
+ var _a;
163
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
164
+ url: '/v2/consumer/recipes/batchOCRSafetyClassification',
165
+ ...options,
166
+ headers: {
167
+ 'Content-Type': 'application/json',
168
+ ...options === null || options === void 0 ? void 0 : options.headers,
169
+ },
170
+ });
171
+ };
143
172
  /**
144
173
  * ChatCompletion
174
+ *
145
175
  * Generate chat completions using language models with support for text and image inputs.
146
176
  * /// Compatible with OpenAI Chat Completions API format.
147
177
  */
148
178
  export const invokeChatCompletionStepTemplate = (options) => {
149
179
  var _a;
150
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
151
- security: [
152
- {
153
- scheme: 'bearer',
154
- type: 'http',
155
- },
156
- ],
180
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
157
181
  url: '/v2/consumer/recipes/chatCompletion',
158
182
  ...options,
159
183
  headers: {
@@ -164,17 +188,12 @@ export const invokeChatCompletionStepTemplate = (options) => {
164
188
  };
165
189
  /**
166
190
  * Comfy workflows
191
+ *
167
192
  * Runs a comfy workflow. Currently there are limited nodes available. Contact support for more information.
168
193
  */
169
194
  export const invokeComfyStepTemplate = (options) => {
170
195
  var _a;
171
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
172
- security: [
173
- {
174
- scheme: 'bearer',
175
- type: 'http',
176
- },
177
- ],
196
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
178
197
  url: '/v2/consumer/recipes/comfy',
179
198
  ...options,
180
199
  headers: {
@@ -188,13 +207,7 @@ export const invokeComfyStepTemplate = (options) => {
188
207
  */
189
208
  export const invokeConvertImageStepTemplate = (options) => {
190
209
  var _a;
191
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
192
- security: [
193
- {
194
- scheme: 'bearer',
195
- type: 'http',
196
- },
197
- ],
210
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
198
211
  url: '/v2/consumer/recipes/convertImage',
199
212
  ...options,
200
213
  headers: {
@@ -205,18 +218,13 @@ export const invokeConvertImageStepTemplate = (options) => {
205
218
  };
206
219
  /**
207
220
  * Echo
221
+ *
208
222
  * A workflow step that takes a message string and retuns it.
209
223
  * /// This step is intended for testing purposes.
210
224
  */
211
225
  export const invokeEchoStepTemplate = (options) => {
212
226
  var _a;
213
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
214
- security: [
215
- {
216
- scheme: 'bearer',
217
- type: 'http',
218
- },
219
- ],
227
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
220
228
  url: '/v2/consumer/recipes/echo',
221
229
  ...options,
222
230
  headers: {
@@ -225,19 +233,25 @@ export const invokeEchoStepTemplate = (options) => {
225
233
  },
226
234
  });
227
235
  };
236
+ export const invokeHumanoidImageMaskStepTemplate = (options) => {
237
+ var _a;
238
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
239
+ url: '/v2/consumer/recipes/humanoidImageMask',
240
+ ...options,
241
+ headers: {
242
+ 'Content-Type': 'application/json',
243
+ ...options === null || options === void 0 ? void 0 : options.headers,
244
+ },
245
+ });
246
+ };
228
247
  /**
229
248
  * Image Generation
249
+ *
230
250
  * Generate images through text/image inputs using any of our supported engines
231
251
  */
232
252
  export const invokeImageGenStepTemplate = (options) => {
233
253
  var _a;
234
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
235
- security: [
236
- {
237
- scheme: 'bearer',
238
- type: 'http',
239
- },
240
- ],
254
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
241
255
  url: '/v2/consumer/recipes/imageGen',
242
256
  ...options,
243
257
  headers: {
@@ -248,17 +262,12 @@ export const invokeImageGenStepTemplate = (options) => {
248
262
  };
249
263
  /**
250
264
  * LORA Training
265
+ *
251
266
  * Train LORA's
252
267
  */
253
268
  export const invokeImageResourceTrainingStepTemplate = (options) => {
254
269
  var _a;
255
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
256
- security: [
257
- {
258
- scheme: 'bearer',
259
- type: 'http',
260
- },
261
- ],
270
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
262
271
  url: '/v2/consumer/recipes/imageResourceTraining',
263
272
  ...options,
264
273
  headers: {
@@ -269,17 +278,12 @@ export const invokeImageResourceTrainingStepTemplate = (options) => {
269
278
  };
270
279
  /**
271
280
  * Image upload
281
+ *
272
282
  * Uploads an image to be used in a workflow
273
283
  */
274
284
  export const invokeImageUploadStepTemplate = (options) => {
275
285
  var _a;
276
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
277
- security: [
278
- {
279
- scheme: 'bearer',
280
- type: 'http',
281
- },
282
- ],
286
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
283
287
  url: '/v2/consumer/recipes/imageUpload',
284
288
  ...options,
285
289
  headers: {
@@ -290,13 +294,7 @@ export const invokeImageUploadStepTemplate = (options) => {
290
294
  };
291
295
  export const invokeImageUpscalerStepTemplate = (options) => {
292
296
  var _a;
293
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
294
- security: [
295
- {
296
- scheme: 'bearer',
297
- type: 'http',
298
- },
299
- ],
297
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
300
298
  url: '/v2/consumer/recipes/imageUpscaler',
301
299
  ...options,
302
300
  headers: {
@@ -307,17 +305,12 @@ export const invokeImageUpscalerStepTemplate = (options) => {
307
305
  };
308
306
  /**
309
307
  * MediaHash
308
+ *
310
309
  * Generates perceptual hashes for media content to enable similarity detection and duplicate identification.
311
310
  */
312
311
  export const invokeMediaHashStepTemplate = (options) => {
313
312
  var _a;
314
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
315
- security: [
316
- {
317
- scheme: 'bearer',
318
- type: 'http',
319
- },
320
- ],
313
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
321
314
  url: '/v2/consumer/recipes/mediaHash',
322
315
  ...options,
323
316
  headers: {
@@ -328,17 +321,12 @@ export const invokeMediaHashStepTemplate = (options) => {
328
321
  };
329
322
  /**
330
323
  * MediaRating
324
+ *
331
325
  * Performs NSFW level detection and content safety classification on media content.
332
326
  */
333
327
  export const invokeMediaRatingStepTemplate = (options) => {
334
328
  var _a;
335
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
336
- security: [
337
- {
338
- scheme: 'bearer',
339
- type: 'http',
340
- },
341
- ],
329
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
342
330
  url: '/v2/consumer/recipes/mediaRating',
343
331
  ...options,
344
332
  headers: {
@@ -349,13 +337,7 @@ export const invokeMediaRatingStepTemplate = (options) => {
349
337
  };
350
338
  export const invokePreprocessImageStepTemplate = (options) => {
351
339
  var _a;
352
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
353
- security: [
354
- {
355
- scheme: 'bearer',
356
- type: 'http',
357
- },
358
- ],
340
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
359
341
  url: '/v2/consumer/recipes/preprocessImage',
360
342
  ...options,
361
343
  headers: {
@@ -364,19 +346,45 @@ export const invokePreprocessImageStepTemplate = (options) => {
364
346
  },
365
347
  });
366
348
  };
349
+ /**
350
+ * PromptEnhancement
351
+ *
352
+ * Analyzes and enhances user prompts for a specific AI ecosystem.
353
+ * /// Returns detected issues, recommendations, and improved prompt variants.
354
+ */
355
+ export const invokePromptEnhancementStepTemplate = (options) => {
356
+ var _a;
357
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
358
+ url: '/v2/consumer/recipes/promptEnhancement',
359
+ ...options,
360
+ headers: {
361
+ 'Content-Type': 'application/json',
362
+ ...options === null || options === void 0 ? void 0 : options.headers,
363
+ },
364
+ });
365
+ };
366
+ /**
367
+ * Repeat workflow step.
368
+ */
369
+ export const invokeRepeatStepTemplate = (options) => {
370
+ var _a;
371
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
372
+ url: '/v2/consumer/recipes/repeat',
373
+ ...options,
374
+ headers: {
375
+ 'Content-Type': 'application/json',
376
+ ...options === null || options === void 0 ? void 0 : options.headers,
377
+ },
378
+ });
379
+ };
367
380
  /**
368
381
  * TextToImage
382
+ *
369
383
  * Generate images using text as input
370
384
  */
371
385
  export const invokeTextToImageStepTemplate = (options) => {
372
386
  var _a;
373
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
374
- security: [
375
- {
376
- scheme: 'bearer',
377
- type: 'http',
378
- },
379
- ],
387
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
380
388
  url: '/v2/consumer/recipes/textToImage',
381
389
  ...options,
382
390
  headers: {
@@ -387,17 +395,12 @@ export const invokeTextToImageStepTemplate = (options) => {
387
395
  };
388
396
  /**
389
397
  * Text-to-Speech
398
+ *
390
399
  * Synthesizes speech from text, supporting both voice cloning (Base mode with reference audio) and built-in speakers (CustomVoice mode).
391
400
  */
392
401
  export const invokeTextToSpeechStepTemplate = (options) => {
393
402
  var _a;
394
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
395
- security: [
396
- {
397
- scheme: 'bearer',
398
- type: 'http',
399
- },
400
- ],
403
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
401
404
  url: '/v2/consumer/recipes/textToSpeech',
402
405
  ...options,
403
406
  headers: {
@@ -408,19 +411,14 @@ export const invokeTextToSpeechStepTemplate = (options) => {
408
411
  };
409
412
  /**
410
413
  * Training
414
+ *
411
415
  * A workflow step for training machine learning models (LoRAs, checkpoints, etc.)
412
416
  * /// on various types of data (images, videos, audio). This replaces ImageResourceTraining
413
417
  * /// with a cleaner architecture that creates one job per epoch instead of a single monolithic job.
414
418
  */
415
419
  export const invokeTrainingStepTemplate = (options) => {
416
420
  var _a;
417
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
418
- security: [
419
- {
420
- scheme: 'bearer',
421
- type: 'http',
422
- },
423
- ],
421
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
424
422
  url: '/v2/consumer/recipes/training',
425
423
  ...options,
426
424
  headers: {
@@ -429,19 +427,28 @@ export const invokeTrainingStepTemplate = (options) => {
429
427
  },
430
428
  });
431
429
  };
430
+ /**
431
+ * Transcoding
432
+ */
433
+ export const invokeTranscodeStepTemplate = (options) => {
434
+ var _a;
435
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
436
+ url: '/v2/consumer/recipes/transcode',
437
+ ...options,
438
+ headers: {
439
+ 'Content-Type': 'application/json',
440
+ ...options === null || options === void 0 ? void 0 : options.headers,
441
+ },
442
+ });
443
+ };
432
444
  /**
433
445
  * Transcription
446
+ *
434
447
  * Performs automatic speech recognition (ASR) on audio media, returning transcribed text with optional timestamps.
435
448
  */
436
449
  export const invokeTranscriptionStepTemplate = (options) => {
437
450
  var _a;
438
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
439
- security: [
440
- {
441
- scheme: 'bearer',
442
- type: 'http',
443
- },
444
- ],
451
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
445
452
  url: '/v2/consumer/recipes/transcription',
446
453
  ...options,
447
454
  headers: {
@@ -450,18 +457,23 @@ export const invokeTranscriptionStepTemplate = (options) => {
450
457
  },
451
458
  });
452
459
  };
460
+ export const invokeTryOnUStepTemplate = (options) => {
461
+ var _a;
462
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
463
+ url: '/v2/consumer/recipes/tryOnU',
464
+ ...options,
465
+ headers: {
466
+ 'Content-Type': 'application/json',
467
+ ...options === null || options === void 0 ? void 0 : options.headers,
468
+ },
469
+ });
470
+ };
453
471
  /**
454
472
  * Upscale videos and/or interpolate frames
455
473
  */
456
474
  export const invokeVideoEnhancementStepTemplate = (options) => {
457
475
  var _a;
458
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
459
- security: [
460
- {
461
- scheme: 'bearer',
462
- type: 'http',
463
- },
464
- ],
476
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
465
477
  url: '/v2/consumer/recipes/videoEnhancement',
466
478
  ...options,
467
479
  headers: {
@@ -472,18 +484,13 @@ export const invokeVideoEnhancementStepTemplate = (options) => {
472
484
  };
473
485
  /**
474
486
  * Video Frame Extraction
487
+ *
475
488
  * Extracts unique frames from a video at a specified rate using perceptual hashing to filter out duplicate/similar frames.
476
489
  * /// Useful for generating video previews, storyboards, or analyzing video content.
477
490
  */
478
491
  export const invokeVideoFrameExtractionStepTemplate = (options) => {
479
492
  var _a;
480
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
481
- security: [
482
- {
483
- scheme: 'bearer',
484
- type: 'http',
485
- },
486
- ],
493
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
487
494
  url: '/v2/consumer/recipes/videoFrameExtraction',
488
495
  ...options,
489
496
  headers: {
@@ -494,17 +501,12 @@ export const invokeVideoFrameExtractionStepTemplate = (options) => {
494
501
  };
495
502
  /**
496
503
  * Video generation
504
+ *
497
505
  * Generate videos through text/image inputs using any of our supported engines
498
506
  */
499
507
  export const invokeVideoGenStepTemplate = (options) => {
500
508
  var _a;
501
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
502
- security: [
503
- {
504
- scheme: 'bearer',
505
- type: 'http',
506
- },
507
- ],
509
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
508
510
  url: '/v2/consumer/recipes/videoGen',
509
511
  ...options,
510
512
  headers: {
@@ -518,13 +520,7 @@ export const invokeVideoGenStepTemplate = (options) => {
518
520
  */
519
521
  export const invokeVideoInterpolationStepTemplate = (options) => {
520
522
  var _a;
521
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
522
- security: [
523
- {
524
- scheme: 'bearer',
525
- type: 'http',
526
- },
527
- ],
523
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
528
524
  url: '/v2/consumer/recipes/videoInterpolation',
529
525
  ...options,
530
526
  headers: {
@@ -538,13 +534,7 @@ export const invokeVideoInterpolationStepTemplate = (options) => {
538
534
  */
539
535
  export const invokeVideoMetadataStepTemplate = (options) => {
540
536
  var _a;
541
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
542
- security: [
543
- {
544
- scheme: 'bearer',
545
- type: 'http',
546
- },
547
- ],
537
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
548
538
  url: '/v2/consumer/recipes/videoMetadata',
549
539
  ...options,
550
540
  headers: {
@@ -558,13 +548,7 @@ export const invokeVideoMetadataStepTemplate = (options) => {
558
548
  */
559
549
  export const invokeVideoUpscalerStepTemplate = (options) => {
560
550
  var _a;
561
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
562
- security: [
563
- {
564
- scheme: 'bearer',
565
- type: 'http',
566
- },
567
- ],
551
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
568
552
  url: '/v2/consumer/recipes/videoUpscaler',
569
553
  ...options,
570
554
  headers: {
@@ -575,17 +559,12 @@ export const invokeVideoUpscalerStepTemplate = (options) => {
575
559
  };
576
560
  /**
577
561
  * WDTagging
562
+ *
578
563
  * Performs Waifu Diffusion tagging on media content to identify characteristics, objects, and themes.
579
564
  */
580
565
  export const invokeWdTaggingStepTemplate = (options) => {
581
566
  var _a;
582
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
583
- security: [
584
- {
585
- scheme: 'bearer',
586
- type: 'http',
587
- },
588
- ],
567
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
589
568
  url: '/v2/consumer/recipes/wdTagging',
590
569
  ...options,
591
570
  headers: {
@@ -599,58 +578,187 @@ export const invokeWdTaggingStepTemplate = (options) => {
599
578
  */
600
579
  export const invalidateResource = (options) => {
601
580
  var _a;
602
- return ((_a = options.client) !== null && _a !== void 0 ? _a : _heyApiClient).delete({
603
- security: [
604
- {
605
- scheme: 'bearer',
606
- type: 'http',
607
- },
608
- ],
609
- url: '/v2/resources/{air}',
610
- ...options,
611
- });
581
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({ url: '/v2/resources/{air}', ...options });
612
582
  };
613
583
  /**
614
584
  * Get an existing resource.
615
585
  */
616
586
  export const getResource = (options) => {
617
587
  var _a;
618
- return ((_a = options.client) !== null && _a !== void 0 ? _a : _heyApiClient).get({
619
- security: [
620
- {
621
- scheme: 'bearer',
622
- type: 'http',
623
- },
624
- ],
588
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
625
589
  url: '/v2/resources/{air}',
626
590
  ...options,
627
591
  });
628
592
  };
593
+ /**
594
+ * Download a HuggingFace repository as a TAR archive.
595
+ */
596
+ export const getHuggingFaceRepositorySnapshot = (options) => {
597
+ var _a;
598
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({ url: '/v2/resources/huggingface/repositories/snapshot/{repositoryId}', ...options });
599
+ };
600
+ export const uploadStreamingBlob = (options) => {
601
+ var _a;
602
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).put({ url: '/v2/providers/streaming-blobs/{blobKey}', ...options });
603
+ };
629
604
  export const getStreamingBlob = (options) => {
630
605
  var _a;
631
- return ((_a = options.client) !== null && _a !== void 0 ? _a : _heyApiClient).get({
632
- security: [
633
- {
634
- scheme: 'bearer',
635
- type: 'http',
636
- },
637
- ],
606
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
638
607
  url: '/v2/consumer/streaming-blobs/{blobKey}',
639
608
  ...options,
640
609
  });
641
610
  };
611
+ /**
612
+ * Diagnoses resource availability for a specific job on a specific worker.
613
+ * Compares the WorkerGrain's view (source of truth) with the queue's view to identify sync issues.
614
+ */
615
+ export const diagnoseJobResources = (options) => {
616
+ var _a;
617
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({ url: '/v2/providers/workers/{workerId}/diagnostics/jobs/{jobId}/resources', ...options });
618
+ };
619
+ /**
620
+ * Triggers a full registration resync for a worker.
621
+ * This will force the queue to fetch the latest worker registration from the WorkerGrain.
622
+ */
623
+ export const triggerWorkerDiagnostics = (options) => {
624
+ var _a;
625
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).post({
626
+ url: '/v2/providers/workers/{workerId}/diagnostics',
627
+ ...options,
628
+ headers: {
629
+ 'Content-Type': 'application/json',
630
+ ...options.headers,
631
+ },
632
+ });
633
+ };
634
+ export const deleteV2ProvidersWorkersByWorkerIdPeersByPeerNodeIdentifier = (options) => {
635
+ var _a;
636
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({ url: '/v2/providers/workers/{workerId}/peers/{peerNodeIdentifier}', ...options });
637
+ };
638
+ export const postV2ProvidersWorkersByWorkerIdPeersByPeerNodeIdentifier = (options) => {
639
+ var _a;
640
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).post({ url: '/v2/providers/workers/{workerId}/peers/{peerNodeIdentifier}', ...options });
641
+ };
642
+ export const getRecommendedResources = (options) => {
643
+ var _a;
644
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({ url: '/v2/providers/workers/{workerId}/resources', ...options });
645
+ };
646
+ export const downloadResource = (options) => {
647
+ var _a;
648
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
649
+ url: '/v2/providers/workers/{workerId}/resources/{air}',
650
+ ...options,
651
+ });
652
+ };
653
+ /**
654
+ * Query existing workers.
655
+ */
656
+ export const queryWorkers = (options) => {
657
+ var _a;
658
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get({
659
+ url: '/v2/providers/workers',
660
+ ...options,
661
+ });
662
+ };
663
+ /**
664
+ * Create a worker with a given registration.
665
+ */
666
+ export const createWorker = (options) => {
667
+ var _a;
668
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
669
+ url: '/v2/providers/workers',
670
+ ...options,
671
+ headers: {
672
+ 'Content-Type': 'application/json',
673
+ ...options === null || options === void 0 ? void 0 : options.headers,
674
+ },
675
+ });
676
+ };
677
+ /**
678
+ * Delete a worker.
679
+ */
680
+ export const deleteWorker = (options) => {
681
+ var _a;
682
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({
683
+ url: '/v2/providers/workers/{workerId}',
684
+ ...options,
685
+ });
686
+ };
687
+ /**
688
+ * Gets the worker for the provided ID.
689
+ */
690
+ export const getWorker = (options) => {
691
+ var _a;
692
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
693
+ url: '/v2/providers/workers/{workerId}',
694
+ ...options,
695
+ });
696
+ };
697
+ /**
698
+ * Update mutable worker properties such as paused state.
699
+ */
700
+ export const updateWorker = (options) => {
701
+ var _a;
702
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).put({
703
+ url: '/v2/providers/workers/{workerId}',
704
+ ...options,
705
+ headers: {
706
+ 'Content-Type': 'application/json',
707
+ ...options.headers,
708
+ },
709
+ });
710
+ };
711
+ /**
712
+ * Gets the registration details for the specified worker.
713
+ */
714
+ export const getRegistration = (options) => {
715
+ var _a;
716
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
717
+ url: '/v2/providers/workers/{workerId}/registration',
718
+ ...options,
719
+ });
720
+ };
721
+ /**
722
+ * Update the registration details of the specified worker.
723
+ */
724
+ export const updateWorkerRegistration = (options) => {
725
+ var _a;
726
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).put({
727
+ url: '/v2/providers/workers/{workerId}/registration',
728
+ ...options,
729
+ headers: {
730
+ 'Content-Type': 'application/json',
731
+ ...options.headers,
732
+ },
733
+ });
734
+ };
735
+ /**
736
+ * Get the status of a particular workers resource
737
+ */
738
+ export const getWorkerResourceStatus = (options) => {
739
+ var _a;
740
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({ url: '/v2/providers/workers/{workerId}/registration/resources/{air}', ...options });
741
+ };
742
+ /**
743
+ * Patch a worker's registration resources
744
+ */
745
+ export const patchWorkerResources = (options) => {
746
+ var _a;
747
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).patch({
748
+ url: '/v2/providers/workers/{workerId}/registration/resources',
749
+ ...options,
750
+ headers: {
751
+ 'Content-Type': 'application/json',
752
+ ...options.headers,
753
+ },
754
+ });
755
+ };
642
756
  /**
643
757
  * Query workflows
644
758
  */
645
759
  export const queryWorkflows = (options) => {
646
760
  var _a;
647
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).get({
648
- security: [
649
- {
650
- scheme: 'bearer',
651
- type: 'http',
652
- },
653
- ],
761
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get({
654
762
  url: '/v2/consumer/workflows',
655
763
  ...options,
656
764
  });
@@ -660,13 +768,7 @@ export const queryWorkflows = (options) => {
660
768
  */
661
769
  export const submitWorkflow = (options) => {
662
770
  var _a;
663
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
664
- security: [
665
- {
666
- scheme: 'bearer',
667
- type: 'http',
668
- },
669
- ],
771
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
670
772
  url: '/v2/consumer/workflows',
671
773
  ...options,
672
774
  headers: {
@@ -677,17 +779,12 @@ export const submitWorkflow = (options) => {
677
779
  };
678
780
  /**
679
781
  * Delete workflow
782
+ *
680
783
  * This will delete a workflow. This may trigger a refund if the work requested with this workflow has not yet started
681
784
  */
682
785
  export const deleteWorkflow = (options) => {
683
786
  var _a;
684
- return ((_a = options.client) !== null && _a !== void 0 ? _a : _heyApiClient).delete({
685
- security: [
686
- {
687
- scheme: 'bearer',
688
- type: 'http',
689
- },
690
- ],
787
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({
691
788
  url: '/v2/consumer/workflows/{workflowId}',
692
789
  ...options,
693
790
  });
@@ -697,30 +794,19 @@ export const deleteWorkflow = (options) => {
697
794
  */
698
795
  export const getWorkflow = (options) => {
699
796
  var _a;
700
- return ((_a = options.client) !== null && _a !== void 0 ? _a : _heyApiClient).get({
701
- security: [
702
- {
703
- scheme: 'bearer',
704
- type: 'http',
705
- },
706
- ],
797
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
707
798
  url: '/v2/consumer/workflows/{workflowId}',
708
799
  ...options,
709
800
  });
710
801
  };
711
802
  /**
712
803
  * Patch workflow
804
+ *
713
805
  * Patches a worfklow using JSON Patch. This can currently be used to cancel a worfklow, update metadata and add additional tags
714
806
  */
715
807
  export const patchWorkflow = (options) => {
716
808
  var _a;
717
- return ((_a = options.client) !== null && _a !== void 0 ? _a : _heyApiClient).patch({
718
- security: [
719
- {
720
- scheme: 'bearer',
721
- type: 'http',
722
- },
723
- ],
809
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).patch({
724
810
  url: '/v2/consumer/workflows/{workflowId}',
725
811
  ...options,
726
812
  headers: {
@@ -731,17 +817,12 @@ export const patchWorkflow = (options) => {
731
817
  };
732
818
  /**
733
819
  * Update workflow
820
+ *
734
821
  * Updates a worfklow. This can currently be used to cancel a worfklow or override metadata and/or tags
735
822
  */
736
823
  export const updateWorkflow = (options) => {
737
824
  var _a;
738
- return ((_a = options.client) !== null && _a !== void 0 ? _a : _heyApiClient).put({
739
- security: [
740
- {
741
- scheme: 'bearer',
742
- type: 'http',
743
- },
744
- ],
825
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).put({
745
826
  url: '/v2/consumer/workflows/{workflowId}',
746
827
  ...options,
747
828
  headers: {
@@ -755,30 +836,16 @@ export const updateWorkflow = (options) => {
755
836
  */
756
837
  export const removeAllWorkflowTags = (options) => {
757
838
  var _a;
758
- return ((_a = options.client) !== null && _a !== void 0 ? _a : _heyApiClient).delete({
759
- security: [
760
- {
761
- scheme: 'bearer',
762
- type: 'http',
763
- },
764
- ],
765
- url: '/v2/consumer/workflows/{workflowId}/tags',
766
- ...options,
767
- });
839
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({ url: '/v2/consumer/workflows/{workflowId}/tags', ...options });
768
840
  };
769
841
  /**
770
842
  * Add workflow tag
843
+ *
771
844
  * Adds a tag to a workflow
772
845
  */
773
846
  export const addWorkflowTag = (options) => {
774
847
  var _a;
775
- return ((_a = options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
776
- security: [
777
- {
778
- scheme: 'bearer',
779
- type: 'http',
780
- },
781
- ],
848
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).post({
782
849
  url: '/v2/consumer/workflows/{workflowId}/tags',
783
850
  ...options,
784
851
  headers: {
@@ -792,42 +859,21 @@ export const addWorkflowTag = (options) => {
792
859
  */
793
860
  export const removeWorkflowTag = (options) => {
794
861
  var _a;
795
- return ((_a = options.client) !== null && _a !== void 0 ? _a : _heyApiClient).delete({
796
- security: [
797
- {
798
- scheme: 'bearer',
799
- type: 'http',
800
- },
801
- ],
802
- url: '/v2/consumer/workflows/{workflowId}/tags/{tag}',
803
- ...options,
804
- });
862
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({ url: '/v2/consumer/workflows/{workflowId}/tags/{tag}', ...options });
805
863
  };
806
864
  /**
807
865
  * Get the status of a workflow step
808
866
  */
809
867
  export const getWorkflowStep = (options) => {
810
868
  var _a;
811
- return ((_a = options.client) !== null && _a !== void 0 ? _a : _heyApiClient).get({
812
- security: [
813
- {
814
- scheme: 'bearer',
815
- type: 'http',
816
- },
817
- ],
869
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
818
870
  url: '/v2/consumer/workflows/{workflowId}/steps/{stepName}',
819
871
  ...options,
820
872
  });
821
873
  };
822
874
  export const patchWorkflowStep = (options) => {
823
875
  var _a;
824
- return ((_a = options.client) !== null && _a !== void 0 ? _a : _heyApiClient).patch({
825
- security: [
826
- {
827
- scheme: 'bearer',
828
- type: 'http',
829
- },
830
- ],
876
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).patch({
831
877
  url: '/v2/consumer/workflows/{workflowId}/steps/{stepName}',
832
878
  ...options,
833
879
  headers: {
@@ -841,13 +887,7 @@ export const patchWorkflowStep = (options) => {
841
887
  */
842
888
  export const updateWorkflowStep = (options) => {
843
889
  var _a;
844
- return ((_a = options.client) !== null && _a !== void 0 ? _a : _heyApiClient).put({
845
- security: [
846
- {
847
- scheme: 'bearer',
848
- type: 'http',
849
- },
850
- ],
890
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).put({
851
891
  url: '/v2/consumer/workflows/{workflowId}/steps/{stepName}',
852
892
  ...options,
853
893
  headers: {