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

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.
@@ -1,16 +1,5 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
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
- };
14
3
  /**
15
4
  * Get blob by ID. This will redirect to a cacheable content URL.
16
5
  */
@@ -67,65 +56,20 @@ export const getBlockedContent = (options) => {
67
56
  ...options,
68
57
  });
69
58
  };
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
59
  /**
93
- * Query for existing configurations.
60
+ * Refresh a blob's URL and debounce its lifetime.
61
+ * Returns a fresh presigned URL and resets the 30-day TTL.
94
62
  */
95
- export const queryConfigurations = (options) => {
63
+ export const refreshBlob = (options) => {
96
64
  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',
65
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).post({
66
+ url: '/v2/consumer/blobs/{blobId}/refresh',
120
67
  ...options,
121
68
  });
122
69
  };
123
- /**
124
- * Delete a configuration.
125
- */
126
- export const deleteConfiguration = (options) => {
70
+ export const invalidateUserCache = (options) => {
127
71
  var _a;
128
- return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({ url: '/v2/providers/configurations/{configurationId}', ...options });
72
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({ url: '/v2/consumer/civitai/{userId}', ...options });
129
73
  };
130
74
  /**
131
75
  * Workflow step for generating music using ACE Step 1.5.
@@ -303,6 +247,22 @@ export const invokeImageUpscalerStepTemplate = (options) => {
303
247
  },
304
248
  });
305
249
  };
250
+ /**
251
+ * Media Captioning
252
+ *
253
+ * Generates a descriptive caption for a single media item using the JoyCaption model.
254
+ */
255
+ export const invokeMediaCaptioningStepTemplate = (options) => {
256
+ var _a;
257
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
258
+ url: '/v2/consumer/recipes/mediaCaptioning',
259
+ ...options,
260
+ headers: {
261
+ 'Content-Type': 'application/json',
262
+ ...options === null || options === void 0 ? void 0 : options.headers,
263
+ },
264
+ });
265
+ };
306
266
  /**
307
267
  * MediaHash
308
268
  *
@@ -574,99 +534,15 @@ export const invokeWdTaggingStepTemplate = (options) => {
574
534
  });
575
535
  };
576
536
  /**
577
- * Invalidates the cache of a specific resource.
578
- */
579
- export const invalidateResource = (options) => {
580
- var _a;
581
- return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({ url: '/v2/resources/{air}', ...options });
582
- };
583
- /**
584
- * Get an existing resource.
585
- */
586
- export const getResource = (options) => {
587
- var _a;
588
- return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
589
- url: '/v2/resources/{air}',
590
- ...options,
591
- });
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
- };
604
- export const getStreamingBlob = (options) => {
605
- var _a;
606
- return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
607
- url: '/v2/consumer/streaming-blobs/{blobKey}',
608
- ...options,
609
- });
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.
537
+ * XGuardModeration
538
+ *
539
+ * Evaluate text or generation prompts against XGuard content moderation policies.
540
+ * /// Generates one ChatCompletion job per label and aggregates results with logprob-based scoring.
665
541
  */
666
- export const createWorker = (options) => {
542
+ export const invokeXGuardModerationStepTemplate = (options) => {
667
543
  var _a;
668
544
  return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
669
- url: '/v2/providers/workers',
545
+ url: '/v2/consumer/recipes/xGuardModeration',
670
546
  ...options,
671
547
  headers: {
672
548
  'Content-Type': 'application/json',
@@ -675,82 +551,27 @@ export const createWorker = (options) => {
675
551
  });
676
552
  };
677
553
  /**
678
- * Delete a worker.
554
+ * Invalidates the cache of a specific resource.
679
555
  */
680
- export const deleteWorker = (options) => {
556
+ export const invalidateResource = (options) => {
681
557
  var _a;
682
- return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({
683
- url: '/v2/providers/workers/{workerId}',
684
- ...options,
685
- });
558
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({ url: '/v2/resources/{air}', ...options });
686
559
  };
687
560
  /**
688
- * Gets the worker for the provided ID.
561
+ * Get an existing resource.
689
562
  */
690
- export const getWorker = (options) => {
563
+ export const getResource = (options) => {
691
564
  var _a;
692
565
  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}',
566
+ url: '/v2/resources/{air}',
704
567
  ...options,
705
- headers: {
706
- 'Content-Type': 'application/json',
707
- ...options.headers,
708
- },
709
568
  });
710
569
  };
711
- /**
712
- * Gets the registration details for the specified worker.
713
- */
714
- export const getRegistration = (options) => {
570
+ export const getStreamingBlob = (options) => {
715
571
  var _a;
716
572
  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',
573
+ url: '/v2/consumer/streaming-blobs/{blobKey}',
749
574
  ...options,
750
- headers: {
751
- 'Content-Type': 'application/json',
752
- ...options.headers,
753
- },
754
575
  });
755
576
  };
756
577
  /**