@civitai/orchestration-client 0.2.0-beta.101

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 (48) hide show
  1. package/README.md +47 -0
  2. package/dist/client/CivitaiClient.d.ts +8 -0
  3. package/dist/client/CivitaiClient.js +29 -0
  4. package/dist/generated/client/client.gen.d.ts +2 -0
  5. package/dist/generated/client/client.gen.js +237 -0
  6. package/dist/generated/client/index.d.ts +8 -0
  7. package/dist/generated/client/index.js +6 -0
  8. package/dist/generated/client/types.gen.d.ts +117 -0
  9. package/dist/generated/client/types.gen.js +2 -0
  10. package/dist/generated/client/utils.gen.d.ts +33 -0
  11. package/dist/generated/client/utils.gen.js +234 -0
  12. package/dist/generated/client.gen.d.ts +12 -0
  13. package/dist/generated/client.gen.js +3 -0
  14. package/dist/generated/core/auth.gen.d.ts +18 -0
  15. package/dist/generated/core/auth.gen.js +14 -0
  16. package/dist/generated/core/bodySerializer.gen.d.ts +25 -0
  17. package/dist/generated/core/bodySerializer.gen.js +57 -0
  18. package/dist/generated/core/params.gen.d.ts +43 -0
  19. package/dist/generated/core/params.gen.js +100 -0
  20. package/dist/generated/core/pathSerializer.gen.d.ts +33 -0
  21. package/dist/generated/core/pathSerializer.gen.js +106 -0
  22. package/dist/generated/core/queryKeySerializer.gen.d.ts +18 -0
  23. package/dist/generated/core/queryKeySerializer.gen.js +92 -0
  24. package/dist/generated/core/serverSentEvents.gen.d.ts +71 -0
  25. package/dist/generated/core/serverSentEvents.gen.js +134 -0
  26. package/dist/generated/core/types.gen.d.ts +78 -0
  27. package/dist/generated/core/types.gen.js +2 -0
  28. package/dist/generated/core/utils.gen.d.ts +19 -0
  29. package/dist/generated/core/utils.gen.js +87 -0
  30. package/dist/generated/index.d.ts +2 -0
  31. package/dist/generated/index.js +3 -0
  32. package/dist/generated/sdk.gen.d.ts +397 -0
  33. package/dist/generated/sdk.gen.js +1082 -0
  34. package/dist/generated/types.gen.d.ts +13600 -0
  35. package/dist/generated/types.gen.js +483 -0
  36. package/dist/index.d.ts +3 -0
  37. package/dist/index.js +3 -0
  38. package/dist/utils/Air.d.ts +23 -0
  39. package/dist/utils/Air.js +21 -0
  40. package/dist/utils/TimeSpan.d.ts +38 -0
  41. package/dist/utils/TimeSpan.js +108 -0
  42. package/dist/utils/handleError.d.ts +2 -0
  43. package/dist/utils/handleError.js +9 -0
  44. package/dist/utils/index.d.ts +4 -0
  45. package/dist/utils/index.js +4 -0
  46. package/dist/utils/patch-json.d.ts +40 -0
  47. package/dist/utils/patch-json.js +175 -0
  48. package/package.json +56 -0
@@ -0,0 +1,483 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ export const AnimalPoseBboxDetector = {
3
+ YOLOX_L_TORCHSCRIPT_PT: 'yolox_l.torchscript.pt',
4
+ YOLOX_L_ONNX: 'yolox_l.onnx',
5
+ YOLO_NAS_L_FP16_ONNX: 'yolo_nas_l_fp16.onnx',
6
+ YOLO_NAS_M_FP16_ONNX: 'yolo_nas_m_fp16.onnx',
7
+ YOLO_NAS_S_FP16_ONNX: 'yolo_nas_s_fp16.onnx',
8
+ };
9
+ export const AnimalPoseEstimator = {
10
+ RTMPOSE_M_AP10K_256_BS5_TORCHSCRIPT_PT: 'rtmpose-m_ap10k_256_bs5.torchscript.pt',
11
+ RTMPOSE_M_AP10K_256_ONNX: 'rtmpose-m_ap10k_256.onnx',
12
+ };
13
+ export const AnylineMergeWith = {
14
+ LINEART_STANDARD: 'lineart_standard',
15
+ LINEART_REALISTIC: 'lineart_realistic',
16
+ LINEART_ANIME: 'lineart_anime',
17
+ MANGA_LINE: 'manga_line',
18
+ };
19
+ /**
20
+ * Container format for a Civitai.Orchestration.Grains.Workflows.Steps.BlobArchive.BlobArchiveStep output.
21
+ */
22
+ export const ArchiveFormat = { ZIP: 'zip', TAR: 'tar' };
23
+ /**
24
+ * Determines how regions are applied to the blur operation.
25
+ */
26
+ export const BlurRegionMode = { INCLUDE: 'include', EXCLUDE: 'exclude' };
27
+ export const BuzzClientAccount = {
28
+ YELLOW: 'yellow',
29
+ BLUE: 'blue',
30
+ GREEN: 'green',
31
+ FAKE_RED: 'fakeRed',
32
+ };
33
+ export const CoarseMode = { DISABLE: 'disable', ENABLE: 'enable' };
34
+ export const ComfySampler = {
35
+ EULER: 'euler',
36
+ EULER_ANCESTRAL: 'euler_ancestral',
37
+ EULER_CFG_PP: 'euler_cfg_pp',
38
+ EULER_ANCESTRAL_CFG_PP: 'euler_ancestral_cfg_pp',
39
+ HEUN: 'heun',
40
+ HEUNPP2: 'heunpp2',
41
+ DPM_2: 'dpm_2',
42
+ DPM_2_ANCESTRAL: 'dpm_2_ancestral',
43
+ LMS: 'lms',
44
+ DPM_FAST: 'dpm_fast',
45
+ DPM_ADAPTIVE: 'dpm_adaptive',
46
+ DPMPP_2S_ANCESTRAL: 'dpmpp_2s_ancestral',
47
+ DPMPP_2S_ANCESTRAL_CFG_PP: 'dpmpp_2s_ancestral_cfg_pp',
48
+ DPMPP_SDE: 'dpmpp_sde',
49
+ DPMPP_SDE_GPU: 'dpmpp_sde_gpu',
50
+ DPMPP_2M: 'dpmpp_2m',
51
+ DPMPP_2M_CFG_PP: 'dpmpp_2m_cfg_pp',
52
+ DPMPP_2M_SDE: 'dpmpp_2m_sde',
53
+ DPMPP_2M_SDE_GPU: 'dpmpp_2m_sde_gpu',
54
+ DPMPP_3M_SDE: 'dpmpp_3m_sde',
55
+ DPMPP_3M_SDE_GPU: 'dpmpp_3m_sde_gpu',
56
+ DDPM: 'ddpm',
57
+ LCM: 'lcm',
58
+ IPNDM: 'ipndm',
59
+ IPNDM_V: 'ipndm_v',
60
+ DEIS: 'deis',
61
+ DDIM: 'ddim',
62
+ UNI_PC: 'uni_pc',
63
+ UNI_PC_BH2: 'uni_pc_bh2',
64
+ RES_MULTISTEP: 'res_multistep',
65
+ ER_SDE: 'er_sde',
66
+ };
67
+ export const ComfyScheduler = {
68
+ NORMAL: 'normal',
69
+ KARRAS: 'karras',
70
+ EXPONENTIAL: 'exponential',
71
+ SGM_UNIFORM: 'sgm_uniform',
72
+ SIMPLE: 'simple',
73
+ DDIM_UNIFORM: 'ddim_uniform',
74
+ BETA: 'beta',
75
+ };
76
+ export const ContainerFormat = { MP4: 'mp4', WEB_M: 'webM' };
77
+ export const DensePoseColormap = {
78
+ VIRIDIS_MAGIC_ANIMATE: 'Viridis (MagicAnimate)',
79
+ PARULA_CIVIT_AI: 'Parula (CivitAI)',
80
+ };
81
+ export const DensePoseModel = {
82
+ DENSEPOSE_R50_FPN_DL_TORCHSCRIPT: 'densepose_r50_fpn_dl.torchscript',
83
+ DENSEPOSE_R101_FPN_DL_TORCHSCRIPT: 'densepose_r101_fpn_dl.torchscript',
84
+ };
85
+ export const DepthAnythingCheckpoint = {
86
+ DEPTH_ANYTHING_VITL14_PTH: 'depth_anything_vitl14.pth',
87
+ DEPTH_ANYTHING_VITB14_PTH: 'depth_anything_vitb14.pth',
88
+ DEPTH_ANYTHING_VITS14_PTH: 'depth_anything_vits14.pth',
89
+ };
90
+ export const DepthAnythingV2Checkpoint = {
91
+ DEPTH_ANYTHING_V2_VITG_PTH: 'depth_anything_v2_vitg.pth',
92
+ DEPTH_ANYTHING_V2_VITL_PTH: 'depth_anything_v2_vitl.pth',
93
+ DEPTH_ANYTHING_V2_VITB_PTH: 'depth_anything_v2_vitb.pth',
94
+ DEPTH_ANYTHING_V2_VITS_PTH: 'depth_anything_v2_vits.pth',
95
+ };
96
+ export const DwPoseBboxDetector = {
97
+ YOLOX_L_ONNX: 'yolox_l.onnx',
98
+ YOLOX_L_TORCHSCRIPT_PT: 'yolox_l.torchscript.pt',
99
+ YOLO_NAS_L_FP16_ONNX: 'yolo_nas_l_fp16.onnx',
100
+ YOLO_NAS_M_FP16_ONNX: 'yolo_nas_m_fp16.onnx',
101
+ YOLO_NAS_S_FP16_ONNX: 'yolo_nas_s_fp16.onnx',
102
+ };
103
+ export const DwPoseEstimator = {
104
+ DW_LL_UCOCO_384_BS5_TORCHSCRIPT_PT: 'dw-ll_ucoco_384_bs5.torchscript.pt',
105
+ DW_LL_UCOCO_384_ONNX: 'dw-ll_ucoco_384.onnx',
106
+ DW_LL_UCOCO_ONNX: 'dw-ll_ucoco.onnx',
107
+ };
108
+ export const FileFormat = {
109
+ UNKNOWN: 'unknown',
110
+ SAFE_TENSOR: 'safeTensor',
111
+ PICKLE_TENSOR: 'pickleTensor',
112
+ DIFFUSERS: 'diffusers',
113
+ CORE_ML: 'coreML',
114
+ ONNX: 'onnx',
115
+ TAR: 'tar',
116
+ };
117
+ export const GeminiOmniModel = { '1_1_FLASH': '1.1-flash' };
118
+ export const GeminiOmniResolution = {
119
+ '360P': '360p',
120
+ '720P': '720p',
121
+ '1080P': '1080p',
122
+ '4K': '4k',
123
+ };
124
+ export const HaiperVideoGenAspectRatio = {
125
+ '16_9': '16:9',
126
+ '4_3': '4:3',
127
+ '1_1': '1:1',
128
+ '9_16': '9:16',
129
+ '3_4': '3:4',
130
+ };
131
+ export const HaiperVideoGenCameraMovement = {
132
+ NONE: 'none',
133
+ PAN_RIGHT: 'panRight',
134
+ PAN_LEFT: 'panLeft',
135
+ TILT_UP: 'tiltUp',
136
+ TILT_DOWN: 'tiltDown',
137
+ ZOOM_IN: 'zoomIn',
138
+ ZOOM_OUT: 'zoomOut',
139
+ };
140
+ export const HaiperVideoGenModel = { V1_5: 'v1_5', V2: 'v2' };
141
+ export const HumanoidImageMaskCategory = {
142
+ DRESSES: 'dresses',
143
+ UPPER_BODY: 'upperBody',
144
+ LOWER_BODY: 'lowerBody',
145
+ };
146
+ export const ImageBackgroundRemovalFormat = { PNG: 'png', WEBP: 'webp' };
147
+ export const ImageGenOutputFormat = {
148
+ JPEG: 'jpeg',
149
+ PNG: 'png',
150
+ WEB_P: 'webP',
151
+ };
152
+ export const ImageResouceTrainingModerationStatus = {
153
+ EVALUATING: 'evaluating',
154
+ UNDER_REVIEW: 'underReview',
155
+ APPROVED: 'approved',
156
+ REJECTED: 'rejected',
157
+ };
158
+ /**
159
+ * Available image transformers.
160
+ */
161
+ export const ImageTransformer = {
162
+ CANNY: 'canny',
163
+ MLSD: 'mlsd',
164
+ DEPTH_ZOE: 'depthZoe',
165
+ DEPTH_ANYTHING: 'depthAnything',
166
+ DEPTH_ANYTHING_V2: 'depthAnythingV2',
167
+ ZOE_DEPTH_ANYTHING: 'zoeDepthAnything',
168
+ ZOE_DEPTH: 'zoeDepth',
169
+ MIDAS_DEPTH: 'midasDepth',
170
+ LERES_DEPTH: 'leresDepth',
171
+ METRIC3D_DEPTH: 'metric3dDepth',
172
+ SOFTEDGE_PIDINET: 'softedgePidinet',
173
+ HED: 'hed',
174
+ TEED: 'teed',
175
+ MIDAS_NORMAL: 'midasNormal',
176
+ BAE_NORMAL: 'baeNormal',
177
+ DSINE_NORMAL: 'dsineNormal',
178
+ METRIC3D_NORMAL: 'metric3dNormal',
179
+ LINEART_REALISTIC: 'lineartRealistic',
180
+ LINEART_STANDARD: 'lineartStandard',
181
+ LINEART_ANIME: 'lineartAnime',
182
+ LINEART_MANGA: 'lineartManga',
183
+ ANYLINE: 'anyline',
184
+ SCRIBBLE: 'scribble',
185
+ SCRIBBLE_XDOG: 'scribbleXdog',
186
+ SCRIBBLE_PIDINET: 'scribblePidinet',
187
+ FAKE_SCRIBBLE: 'fakeScribble',
188
+ OPENPOSE: 'openpose',
189
+ DWPOSE: 'dwpose',
190
+ ONEFORMER_COCO: 'oneformerCoco',
191
+ ONEFORMER_ADE20K: 'oneformerAde20k',
192
+ UNIFORMER: 'uniformer',
193
+ SHUFFLE: 'shuffle',
194
+ TILE: 'tile',
195
+ GRAY: 'gray',
196
+ REMBG: 'rembg',
197
+ INPAINT: 'inpaint',
198
+ };
199
+ /**
200
+ * Available levels of job support.
201
+ */
202
+ export const JobSupport = {
203
+ UNSUPPORTED: 'unsupported',
204
+ UNAVAILABLE: 'unavailable',
205
+ AVAILABLE: 'available',
206
+ };
207
+ export const KlingMode = { STANDARD: 'standard', PROFESSIONAL: 'professional' };
208
+ export const KlingModel = {
209
+ V1: 'v1',
210
+ V1_5: 'v1.5',
211
+ V1_6: 'v1.6',
212
+ V2: 'v2',
213
+ V2_5_TURBO: 'v2.5-turbo',
214
+ };
215
+ export const KlingV3Operation = {
216
+ TEXT_TO_VIDEO: 'text-to-video',
217
+ IMAGE_TO_VIDEO: 'image-to-video',
218
+ REFERENCE_TO_VIDEO: 'reference-to-video',
219
+ VIDEO_TO_VIDEO_EDIT: 'video-to-video-edit',
220
+ VIDEO_TO_VIDEO_REFERENCE: 'video-to-video-reference',
221
+ };
222
+ export const KlingVideoGenAspectRatio = {
223
+ '16_9': '16:9',
224
+ '9_16': '9:16',
225
+ '1_1': '1:1',
226
+ };
227
+ export const KlingVideoGenDuration = { 5: '5', 10: '10' };
228
+ export const LeresBoost = { DISABLE: 'disable', ENABLE: 'enable' };
229
+ export const LightricksAspectRatio = {
230
+ '1_1': '1:1',
231
+ '16_9': '16:9',
232
+ '9_16': '9:16',
233
+ '3_2': '3:2',
234
+ '2_3': '2:3',
235
+ };
236
+ /**
237
+ * Output container for a composition.
238
+ */
239
+ export const MediaContainer = {
240
+ AUTO: 'auto',
241
+ MP4: 'mp4',
242
+ WEBM: 'webm',
243
+ OGG: 'ogg',
244
+ MP3: 'mp3',
245
+ WEBP: 'webp',
246
+ };
247
+ /**
248
+ * How a video element is fitted into the output canvas when its aspect ratio differs.
249
+ */
250
+ export const MediaFit = {
251
+ CONTAIN: 'contain',
252
+ COVER: 'cover',
253
+ STRETCH: 'stretch',
254
+ };
255
+ /**
256
+ * Represents the type of hash algorithm to use for media content.
257
+ */
258
+ export const MediaHashType = {
259
+ PERCEPTUAL: 'perceptual',
260
+ PERCEPTUAL_DCT: 'perceptualDct',
261
+ PERCEPTUAL_DCT256: 'perceptualDct256',
262
+ };
263
+ /**
264
+ * The kind of output a composition produces. When left unspecified on the input, it is derived
265
+ * from the elements: video if any element is video (or a canvas is supplied), otherwise audio.
266
+ */
267
+ export const MediaOutputType = { AUDIO: 'audio', VIDEO: 'video' };
268
+ export const Metric3dBackbone = {
269
+ VIT_SMALL: 'vit-small',
270
+ VIT_LARGE: 'vit-large',
271
+ VIT_GIANT2: 'vit-giant2',
272
+ };
273
+ export const MiniMaxVideoGenModel = { HAILOU: 'hailou' };
274
+ export const ModelClamScanStatus = {
275
+ CLEAN: 'clean',
276
+ INFECTED: 'infected',
277
+ TIMEOUT: 'timeout',
278
+ ERROR: 'error',
279
+ };
280
+ export const ModelPickleScanStatus = {
281
+ CLEAN: 'clean',
282
+ DANGEROUS_IMPORTS_FOUND: 'dangerousImportsFound',
283
+ SKIPPED_SAFETENSORS: 'skippedSafetensors',
284
+ SKIPPED_GGUF: 'skippedGguf',
285
+ SKIPPED: 'skipped',
286
+ PARSE_ERROR: 'parseError',
287
+ ERROR: 'error',
288
+ };
289
+ export const NsfwLevel = {
290
+ PG: 'pg',
291
+ PG13: 'pg13',
292
+ R: 'r',
293
+ X: 'x',
294
+ XXX: 'xxx',
295
+ NA: 'na',
296
+ };
297
+ export const OutputFormat = {
298
+ PNG: 'png',
299
+ JPEG: 'jpeg',
300
+ WEB_P: 'webP',
301
+ };
302
+ /**
303
+ * Available options for priority.
304
+ */
305
+ export const Priority = {
306
+ HIGH: 'high',
307
+ NORMAL: 'normal',
308
+ LOW: 'low',
309
+ };
310
+ export const ResourceFeeType = { PER_IMAGE_BUZZ: 'perImageBuzz' };
311
+ /**
312
+ * A projection of the resource collection. There is no view that lists every known resource — resources
313
+ * are addressed by AIR and only materialise once something asks for them.
314
+ */
315
+ export const ResourceView = { QUEUE: 'queue' };
316
+ export const SafeMode = { ENABLE: 'enable', DISABLE: 'disable' };
317
+ /**
318
+ * The available options for schedulers used in image generation.
319
+ */
320
+ export const Scheduler = {
321
+ EULER_A: 'eulerA',
322
+ EULER: 'euler',
323
+ LMS: 'lms',
324
+ HEUN: 'heun',
325
+ DP_M2: 'dpM2',
326
+ DP_M2A: 'dpM2A',
327
+ DP_M2SA: 'dpM2SA',
328
+ DP_M2M: 'dpM2M',
329
+ DPMSDE: 'dpmsde',
330
+ DPM_FAST: 'dpmFast',
331
+ DPM_ADAPTIVE: 'dpmAdaptive',
332
+ LMS_KARRAS: 'lmsKarras',
333
+ DP_M2_KARRAS: 'dpM2Karras',
334
+ DP_M2A_KARRAS: 'dpM2AKarras',
335
+ DP_M2SA_KARRAS: 'dpM2SAKarras',
336
+ DP_M2M_KARRAS: 'dpM2MKarras',
337
+ DPMSDE_KARRAS: 'dpmsdeKarras',
338
+ DDIM: 'ddim',
339
+ PLMS: 'plms',
340
+ UNI_PC: 'uniPC',
341
+ UNDEFINED: 'undefined',
342
+ LCM: 'lcm',
343
+ DDPM: 'ddpm',
344
+ DEIS: 'deis',
345
+ DP_M3MSDE: 'dpM3MSDE',
346
+ };
347
+ export const SdCppSampleMethod = {
348
+ EULER: 'euler',
349
+ HEUN: 'heun',
350
+ DPM2: 'dpm2',
351
+ DPM_2S_A: 'dpm++2s_a',
352
+ DPM_2M: 'dpm++2m',
353
+ DPM_2MV2: 'dpm++2mv2',
354
+ IPNDM: 'ipndm',
355
+ IPNDM_V: 'ipndm_v',
356
+ DDIM_TRAILING: 'ddim_trailing',
357
+ EULER_A: 'euler_a',
358
+ LCM: 'lcm',
359
+ RES_MULTISTEP: 'res_multistep',
360
+ RES_2S: 'res_2s',
361
+ TCD: 'tcd',
362
+ ER_SDE: 'er_sde',
363
+ };
364
+ export const SdCppSchedule = {
365
+ SIMPLE: 'simple',
366
+ DISCRETE: 'discrete',
367
+ KARRAS: 'karras',
368
+ EXPONENTIAL: 'exponential',
369
+ AYS: 'ays',
370
+ BONG_TANGENT: 'bong_tangent',
371
+ GITS: 'gits',
372
+ SGM_UNIFORM: 'sgm_uniform',
373
+ SMOOTHSTEP: 'smoothstep',
374
+ KL_OPTIMAL: 'kl_optimal',
375
+ LCM: 'lcm',
376
+ };
377
+ export const SdCppUCacheMode = { OFF: 'off', NORMAL: 'normal' };
378
+ export const SeedanceModel = {
379
+ V2: 'v2',
380
+ V2_FAST: 'v2-fast',
381
+ V2_MINI: 'v2-mini',
382
+ V2_5: 'v2.5',
383
+ };
384
+ export const SeedreamVersion = {
385
+ V3: 'v3',
386
+ V4: 'v4',
387
+ V4_5: 'v4.5',
388
+ V5_0_LITE: 'v5.0-lite',
389
+ V5_0_PRO: 'v5.0-pro',
390
+ };
391
+ export const ServiceStatus = {
392
+ UNKNOWN: 'unknown',
393
+ AVAILABLE: 'available',
394
+ DEGRADED: 'degraded',
395
+ UNAVAILABLE: 'unavailable',
396
+ };
397
+ export const SettlementCurrency = { BUZZ: 'buzz', CASH: 'cash' };
398
+ /**
399
+ * How aggressively background removal also strips soft drop shadows the strict color match misses.
400
+ */
401
+ export const ShadowRemoval = {
402
+ OFF: 'off',
403
+ GENTLE: 'gentle',
404
+ AGGRESSIVE: 'aggressive',
405
+ };
406
+ /**
407
+ * How much of a custom-comfy job's ComfyUI `/ws` activity to record to a
408
+ * streaming blob the consumer can tail live.
409
+ */
410
+ export const TraceMode = {
411
+ NONE: 'none',
412
+ LOGS: 'logs',
413
+ BINARY: 'binary',
414
+ };
415
+ /**
416
+ * The moderation status of the training data
417
+ */
418
+ export const TrainingModerationStatus = {
419
+ EVALUATING: 'evaluating',
420
+ UNDER_REVIEW: 'underReview',
421
+ APPROVED: 'approved',
422
+ REJECTED: 'rejected',
423
+ };
424
+ /**
425
+ * What an epoch job records to its live trace stream (`output.epochs[].traceUrl`), which the consumer can tail
426
+ * while the job runs.
427
+ */
428
+ export const TrainingTraceMode = {
429
+ NONE: 'none',
430
+ LOGS: 'logs',
431
+ EVENTS: 'events',
432
+ };
433
+ export const TransactionType = { DEBIT: 'debit', CREDIT: 'credit' };
434
+ /**
435
+ * Available statuses for updating workflows.
436
+ */
437
+ export const UpdateWorkflowStatus = { CANCELED: 'canceled' };
438
+ export const Veo3AspectRatio = {
439
+ '16_9': '16:9',
440
+ '9_16': '9:16',
441
+ '1_1': '1:1',
442
+ };
443
+ export const Veo3GenerationMode = {
444
+ STANDARD: 'standard',
445
+ FAST: 'fast',
446
+ LITE: 'lite',
447
+ };
448
+ /**
449
+ * Google retired the Veo 3.0 endpoints on 2026-08-28; requests with `3.0` are rejected with 400. Use `3.1`.
450
+ */
451
+ export const Veo3Version = { '3_0': '3.0', '3_1': '3.1' };
452
+ export const ViduVideoGenModel = {
453
+ DEFAULT: 'default',
454
+ Q1: 'q1',
455
+ Q3: 'q3',
456
+ };
457
+ export const ViduVideoGenStyle = { GENERAL: 'general', ANIME: 'anime' };
458
+ /**
459
+ * Values available to represent workflow status.
460
+ */
461
+ export const WorkflowStatus = {
462
+ UNASSIGNED: 'unassigned',
463
+ PREPARING: 'preparing',
464
+ SCHEDULED: 'scheduled',
465
+ PROCESSING: 'processing',
466
+ SUCCEEDED: 'succeeded',
467
+ FAILED: 'failed',
468
+ EXPIRED: 'expired',
469
+ CANCELED: 'canceled',
470
+ };
471
+ /**
472
+ * Specifies how a workflow should be upgraded when mature content is detected and green or blue buzz was used for payment.
473
+ */
474
+ export const WorkflowUpgradeMode = { MANUAL: 'manual', AUTOMATIC: 'automatic' };
475
+ /**
476
+ * Which generation-prompt field(s) the model is asked to evaluate in Prompt mode.
477
+ */
478
+ export const XGuardPromptScope = {
479
+ COMBINED: 'combined',
480
+ POSITIVE: 'positive',
481
+ NEGATIVE: 'negative',
482
+ };
483
+ export const ZoeDepthEnvironment = { INDOOR: 'indoor', OUTDOOR: 'outdoor' };
@@ -0,0 +1,3 @@
1
+ export * from './generated';
2
+ export * from './utils';
3
+ export * from './client/CivitaiClient';
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export * from './generated';
2
+ export * from './utils';
3
+ export * from './client/CivitaiClient';
@@ -0,0 +1,23 @@
1
+ type AirProps = {
2
+ /** Type of the ecosystem (sd1, sd2, sdxl) */
3
+ ecosystem: string;
4
+ /** Type of the resource (model, lora, embedding, hypernet, controlnet, upscaler) */
5
+ type: string;
6
+ /** Supported network source */
7
+ source: string;
8
+ /** Id of the resource from the source */
9
+ id: string;
10
+ version?: string;
11
+ /** Id of a specific model file within the version */
12
+ modelFileId?: string;
13
+ /** The format of the model (safetensor, ckpt, diffuser, tensor rt) optional */
14
+ format?: string;
15
+ };
16
+ /** https://github.com/civitai/civitai/wiki/AIR-%E2%80%90-Uniform-Resource-Names-for-AI */
17
+ export declare abstract class Air {
18
+ static parse(identifier: string): AirProps;
19
+ static parseSafe(identifier: string): AirProps | undefined;
20
+ static isAir(identifier: string): boolean;
21
+ static stringify({ ecosystem, type, source, id, version, modelFileId, format }: AirProps): string;
22
+ }
23
+ export {};
@@ -0,0 +1,21 @@
1
+ const regex = /^(?:urn:)?(?:air:)?(?:(?<ecosystem>[a-zA-Z0-9_\-\/]+):)?(?:(?<type>[a-zA-Z0-9_\-\/]+):)?(?<source>[a-zA-Z0-9_\-\/]+):(?<id>[a-zA-Z0-9_\-\/\.]+)(?:@(?<version>[a-zA-Z0-9_\-\/.]+))?(?:\+(?<modelFileId>\d+))?(?:\.(?<format>[a-zA-Z0-9_\-]+))?$/i;
2
+ /** https://github.com/civitai/civitai/wiki/AIR-%E2%80%90-Uniform-Resource-Names-for-AI */
3
+ export class Air {
4
+ static parse(identifier) {
5
+ const match = regex.exec(identifier);
6
+ if (!match) {
7
+ throw new Error(`Invalid identifier: ${identifier}`);
8
+ }
9
+ return match.groups;
10
+ }
11
+ static parseSafe(identifier) {
12
+ const match = identifier.match(regex);
13
+ return match === null || match === void 0 ? void 0 : match.groups;
14
+ }
15
+ static isAir(identifier) {
16
+ return regex.test(identifier);
17
+ }
18
+ static stringify({ ecosystem, type, source, id, version, modelFileId, format }) {
19
+ return `urn:air:${ecosystem}:${type}:${source}:${id}${version ? `@${version}` : ''}${modelFileId ? `+${modelFileId}` : ''}${format ? `.${format}` : ''}`;
20
+ }
21
+ }
@@ -0,0 +1,38 @@
1
+ export declare class TimeSpan {
2
+ #private;
3
+ /**
4
+ *
5
+ * @param timeSpanString format "days:hours:minutes:seconds.ticks" ("00:00:00:00.000000")
6
+ */
7
+ constructor(timeSpanString: string);
8
+ constructor(ticks: number);
9
+ constructor(hours: number, minutes: number, seconds: number);
10
+ constructor(days: number, hours: number, minutes: number, seconds: number);
11
+ constructor(days: number, hours: number, minutes: number, seconds: number, milliseconds: number);
12
+ constructor(days: number, hours: number, minutes: number, seconds: number, milliseconds: number, ticks: number);
13
+ addTicks: (value: number) => number;
14
+ subtractTicks: (value: number) => number;
15
+ addMilliseconds: (value: number) => number;
16
+ subtracktMilliseconds: (value: number) => number;
17
+ addSeconds: (value: number) => number;
18
+ subtractSeconds: (value: number) => number;
19
+ addMinutes: (value: number) => number;
20
+ subtractMinutes: (value: number) => number;
21
+ addHours: (value: number) => number;
22
+ subtractHours: (value: number) => number;
23
+ addDays: (value: number) => number;
24
+ subtractDays: (value: number) => number;
25
+ get days(): number;
26
+ get hours(): number;
27
+ get minutes(): number;
28
+ get seconds(): number;
29
+ get milliseconds(): number;
30
+ get ticks(): number;
31
+ get totalMilliseconds(): number;
32
+ get totalSeconds(): number;
33
+ get totalMinutes(): number;
34
+ get totalHours(): number;
35
+ get totalDays(): number;
36
+ get totalTicks(): number;
37
+ toString: (include?: ("days" | "hours" | "minutes" | "seconds" | "ticks")[]) => string;
38
+ }
@@ -0,0 +1,108 @@
1
+ var _TimeSpan_ticks, _TimeSpan_add, _TimeSpan_subtract;
2
+ import { __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
3
+ const ticksPerMillisecond = 10000, ticksPerSecond = 1000 * ticksPerMillisecond, ticksPerMinute = 60000 * ticksPerMillisecond, ticksPerHour = 3600000 * ticksPerMillisecond, ticksPerDay = 86400000 * ticksPerMillisecond;
4
+ const timeSpanWithDays = /^(\d+):(\d+):(\d+):(\d+).(\d+)?/, timeSpanNoDays = /^(\d+):(\d+):(\d+).(\d+)?/;
5
+ function toDoubleDigitString(n) {
6
+ return `${n < 10 ? '0' + n : n}`;
7
+ }
8
+ export class TimeSpan {
9
+ constructor() {
10
+ _TimeSpan_ticks.set(this, 0);
11
+ _TimeSpan_add.set(this, (value, multiplier) => (__classPrivateFieldSet(this, _TimeSpan_ticks, __classPrivateFieldGet(this, _TimeSpan_ticks, "f") + (multiplier ? value * multiplier : value), "f")));
12
+ _TimeSpan_subtract.set(this, (value, multiplier) => (__classPrivateFieldSet(this, _TimeSpan_ticks, __classPrivateFieldGet(this, _TimeSpan_ticks, "f") - (multiplier ? value * multiplier : value), "f")));
13
+ this.addTicks = (value) => __classPrivateFieldGet(this, _TimeSpan_add, "f").call(this, value);
14
+ this.subtractTicks = (value) => __classPrivateFieldGet(this, _TimeSpan_subtract, "f").call(this, value);
15
+ this.addMilliseconds = (value) => __classPrivateFieldGet(this, _TimeSpan_add, "f").call(this, value, ticksPerMillisecond);
16
+ this.subtracktMilliseconds = (value) => __classPrivateFieldGet(this, _TimeSpan_subtract, "f").call(this, value, ticksPerMillisecond);
17
+ this.addSeconds = (value) => __classPrivateFieldGet(this, _TimeSpan_add, "f").call(this, value, ticksPerSecond);
18
+ this.subtractSeconds = (value) => __classPrivateFieldGet(this, _TimeSpan_subtract, "f").call(this, value, ticksPerSecond);
19
+ this.addMinutes = (value) => __classPrivateFieldGet(this, _TimeSpan_add, "f").call(this, value, ticksPerMinute);
20
+ this.subtractMinutes = (value) => __classPrivateFieldGet(this, _TimeSpan_subtract, "f").call(this, value, ticksPerMinute);
21
+ this.addHours = (value) => __classPrivateFieldGet(this, _TimeSpan_add, "f").call(this, value, ticksPerHour);
22
+ this.subtractHours = (value) => __classPrivateFieldGet(this, _TimeSpan_subtract, "f").call(this, value, ticksPerHour);
23
+ this.addDays = (value) => __classPrivateFieldGet(this, _TimeSpan_add, "f").call(this, value, ticksPerDay);
24
+ this.subtractDays = (value) => __classPrivateFieldGet(this, _TimeSpan_subtract, "f").call(this, value, ticksPerDay);
25
+ this.toString = (include) => {
26
+ const toInclude = include ? [...new Set([...include])] : undefined;
27
+ const parts1 = (toInclude !== null && toInclude !== void 0 ? toInclude : ['days', 'hours', 'minutes', 'seconds'])
28
+ .filter((x) => x !== 'ticks')
29
+ .map((part) => toDoubleDigitString(this[part]))
30
+ .join(':');
31
+ const parts2 = (toInclude !== null && toInclude !== void 0 ? toInclude : ['ticks'])
32
+ .filter((x) => x === 'ticks')
33
+ .map((part) => toDoubleDigitString(this[part]))[0];
34
+ return parts2 ? `${parts1}.${parts2}` : parts1;
35
+ // return (
36
+ // [this.days, this.hours, this.minutes, this.seconds].map(toDoubleDigitString).join(':') +
37
+ // '.' +
38
+ // toDoubleDigitString(this.ticks)
39
+ // );
40
+ };
41
+ let days = 0, hours = 0, minutes = 0, seconds = 0, milliseconds = 0, ticks = 0;
42
+ if (typeof arguments[0] === 'string') {
43
+ const str = arguments[0];
44
+ let match;
45
+ if ((match = str.match(timeSpanWithDays))) {
46
+ [days, hours, minutes, seconds, ticks] = match.splice(1, 6).map((x) => (x ? Number(x) : 0));
47
+ }
48
+ else if ((match = str.match(timeSpanNoDays))) {
49
+ [hours, minutes, seconds, ticks] = match.splice(1, 4).map((x) => (x ? Number(x) : 0));
50
+ }
51
+ }
52
+ else if (arguments.length === 1)
53
+ [ticks] = arguments;
54
+ else if (arguments.length === 3)
55
+ [hours, minutes, seconds] = arguments;
56
+ else if (arguments.length === 4)
57
+ [days, hours, minutes, seconds] = arguments;
58
+ else if (arguments.length === 5)
59
+ [days, hours, minutes, seconds, milliseconds] = arguments;
60
+ this.addDays(days);
61
+ this.addHours(hours);
62
+ this.addMinutes(minutes);
63
+ this.addSeconds(seconds);
64
+ this.addMilliseconds(milliseconds);
65
+ this.addTicks(ticks);
66
+ }
67
+ get days() {
68
+ return Math.floor(__classPrivateFieldGet(this, _TimeSpan_ticks, "f") / ticksPerDay);
69
+ }
70
+ get hours() {
71
+ return Math.floor(__classPrivateFieldGet(this, _TimeSpan_ticks, "f") / ticksPerHour) % 24;
72
+ }
73
+ get minutes() {
74
+ return Math.floor(__classPrivateFieldGet(this, _TimeSpan_ticks, "f") / ticksPerMinute) % 60;
75
+ }
76
+ get seconds() {
77
+ return Math.floor(__classPrivateFieldGet(this, _TimeSpan_ticks, "f") / ticksPerSecond) % 60;
78
+ }
79
+ get milliseconds() {
80
+ return Math.floor(__classPrivateFieldGet(this, _TimeSpan_ticks, "f") / ticksPerMillisecond) % 1000;
81
+ }
82
+ get ticks() {
83
+ const dayTicks = this.days * ticksPerDay;
84
+ const hourTicks = this.hours * ticksPerHour;
85
+ const minuteTicks = this.minutes * ticksPerMinute;
86
+ const secondTicks = this.seconds * ticksPerSecond;
87
+ return __classPrivateFieldGet(this, _TimeSpan_ticks, "f") - dayTicks - hourTicks - minuteTicks - secondTicks;
88
+ }
89
+ get totalMilliseconds() {
90
+ return Math.floor(__classPrivateFieldGet(this, _TimeSpan_ticks, "f") / ticksPerMillisecond);
91
+ }
92
+ get totalSeconds() {
93
+ return Math.floor(__classPrivateFieldGet(this, _TimeSpan_ticks, "f") / ticksPerSecond);
94
+ }
95
+ get totalMinutes() {
96
+ return Math.floor(__classPrivateFieldGet(this, _TimeSpan_ticks, "f") / ticksPerMinute);
97
+ }
98
+ get totalHours() {
99
+ return Math.floor(__classPrivateFieldGet(this, _TimeSpan_ticks, "f") / ticksPerHour);
100
+ }
101
+ get totalDays() {
102
+ return Math.floor(__classPrivateFieldGet(this, _TimeSpan_ticks, "f") / ticksPerDay);
103
+ }
104
+ get totalTicks() {
105
+ return __classPrivateFieldGet(this, _TimeSpan_ticks, "f");
106
+ }
107
+ }
108
+ _TimeSpan_ticks = new WeakMap(), _TimeSpan_add = new WeakMap(), _TimeSpan_subtract = new WeakMap();
@@ -0,0 +1,2 @@
1
+ import { ProblemDetails } from 'src/generated';
2
+ export declare function handleError(error: string | ProblemDetails): string | undefined;