@civitai/client 0.2.0-beta.2 → 0.2.0-beta.21

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,262 +1,309 @@
1
+ "use strict";
1
2
  // This file is auto-generated by @hey-api/openapi-ts
2
- import { client } from '@hey-api/client-fetch';
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.patchWorkflowStep = exports.updateWorkflowStep = exports.getWorkflowStep = exports.removeWorkflowTag = exports.removeAllWorkflowTags = exports.addWorkflowTag = exports.deleteWorkflow = exports.patchWorkflow = exports.updateWorkflow = exports.getWorkflow = exports.queryWorkflows = exports.submitWorkflow = exports.patchWorkerResources = exports.updateWorkerRegistration = exports.getRegistration = exports.deleteWorker = exports.getWorker = exports.queryWorkers = exports.createWorker = exports.downloadResource = exports.getJobs = exports.invalidateResource = exports.getResource = exports.deleteConfiguration = exports.getConfiguration = exports.queryConfigurations = exports.createConfiguration = exports.getBlob = exports.putV2ProvidersBlobsByBlobKey = void 0;
5
+ const client_fetch_1 = require("@hey-api/client-fetch");
6
+ const putV2ProvidersBlobsByBlobKey = (options) => {
7
+ var _a;
8
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).put({
9
+ ...options,
10
+ url: '/v2/providers/blobs/{blobKey}',
11
+ });
12
+ };
13
+ exports.putV2ProvidersBlobsByBlobKey = putV2ProvidersBlobsByBlobKey;
3
14
  /**
4
- * Get blob by ID. This will return the blob as a binary stream.
15
+ * Get blob by ID.
5
16
  */
6
- export const getBlob = (options) => {
17
+ const getBlob = (options) => {
7
18
  var _a;
8
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get({
19
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).get({
9
20
  ...options,
10
21
  url: '/v2/consumer/blobs/{blobId}',
11
22
  });
12
23
  };
24
+ exports.getBlob = getBlob;
13
25
  /**
14
- * Handles HTTP HEAD requests for a specific blob, checking its existence and NSFW level.
26
+ * Create a new configuration.
15
27
  */
16
- export const headBlob = (options) => {
28
+ const createConfiguration = (options) => {
17
29
  var _a;
18
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).head({
30
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).post({
19
31
  ...options,
20
- url: '/v2/consumer/blobs/{blobId}',
32
+ url: '/v2/providers/configurations',
21
33
  });
22
34
  };
35
+ exports.createConfiguration = createConfiguration;
23
36
  /**
24
- * Age classification
25
- * Detects minors in media content. Returns a boolean value indicating whether the content contains minors as well as details on where minors are detected.
37
+ * Query for existing configurations.
26
38
  */
27
- export const invokeAgeClassificationStepTemplate = (options) => {
39
+ const queryConfigurations = (options) => {
28
40
  var _a;
29
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
41
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).get({
30
42
  ...options,
31
- url: '/v2/consumer/recipes/ageClassification',
43
+ url: '/v2/providers/configurations',
32
44
  });
33
45
  };
46
+ exports.queryConfigurations = queryConfigurations;
34
47
  /**
35
- * Comfy workflows
36
- * Runs a comfy workflow. Currently there are limited nodes available. Contact support for more information.
48
+ * Get options for a configuration.
37
49
  */
38
- export const invokeComfyStepTemplate = (options) => {
50
+ const getConfiguration = (options) => {
39
51
  var _a;
40
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
52
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).get({
41
53
  ...options,
42
- url: '/v2/consumer/recipes/comfy',
54
+ url: '/v2/providers/configurations/{configurationId}/options',
43
55
  });
44
56
  };
57
+ exports.getConfiguration = getConfiguration;
45
58
  /**
46
- * Echo
47
- * A workflow step that takes a message string and retuns it.
48
- * /// This step is intended for testing purposes.
59
+ * Delete a configuration.
49
60
  */
50
- export const invokeEchoStepTemplate = (options) => {
61
+ const deleteConfiguration = (options) => {
51
62
  var _a;
52
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
63
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).delete({
53
64
  ...options,
54
- url: '/v2/consumer/recipes/echo',
65
+ url: '/v2/providers/configurations/{configurationId}',
55
66
  });
56
67
  };
68
+ exports.deleteConfiguration = deleteConfiguration;
57
69
  /**
58
- * Image Generation
59
- * Generate images through text/image inputs using any of our supported engines
70
+ * Get an existing resource.
60
71
  */
61
- export const invokeImageGenStepTemplate = (options) => {
72
+ const getResource = (options) => {
62
73
  var _a;
63
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
74
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).get({
64
75
  ...options,
65
- url: '/v2/consumer/recipes/imageGen',
76
+ url: '/v2/resources/{air}',
66
77
  });
67
78
  };
79
+ exports.getResource = getResource;
68
80
  /**
69
- * LORA Training
70
- * Train LORA's
81
+ * Invalidates the cache of a specific resource.
71
82
  */
72
- export const invokeImageResourceTrainingStepTemplate = (options) => {
83
+ const invalidateResource = (options) => {
73
84
  var _a;
74
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
85
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).delete({
75
86
  ...options,
76
- url: '/v2/consumer/recipes/imageResourceTraining',
87
+ url: '/v2/resources/{air}',
77
88
  });
78
89
  };
90
+ exports.invalidateResource = invalidateResource;
91
+ const getJobs = (options) => {
92
+ var _a;
93
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).get({
94
+ ...options,
95
+ url: '/v2/providers/workers/{workerId}/jobs',
96
+ });
97
+ };
98
+ exports.getJobs = getJobs;
99
+ const downloadResource = (options) => {
100
+ var _a;
101
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).get({
102
+ ...options,
103
+ url: '/v2/providers/workers/{workerId}/resources/{air}',
104
+ });
105
+ };
106
+ exports.downloadResource = downloadResource;
79
107
  /**
80
- * Image upload
81
- * Uploads an image to be used in a workflow
108
+ * Create a worker with a given registration.
82
109
  */
83
- export const invokeImageUploadStepTemplate = (options) => {
110
+ const createWorker = (options) => {
84
111
  var _a;
85
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
112
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).post({
86
113
  ...options,
87
- url: '/v2/consumer/recipes/imageUpload',
114
+ url: '/v2/providers/workers',
88
115
  });
89
116
  };
117
+ exports.createWorker = createWorker;
90
118
  /**
91
- * TextToImage
92
- * Generate images using text as input
119
+ * Query existing workers.
93
120
  */
94
- export const invokeTextToImageStepTemplate = (options) => {
121
+ const queryWorkers = (options) => {
95
122
  var _a;
96
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
123
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).get({
97
124
  ...options,
98
- url: '/v2/consumer/recipes/textToImage',
125
+ url: '/v2/providers/workers',
99
126
  });
100
127
  };
128
+ exports.queryWorkers = queryWorkers;
101
129
  /**
102
- * Upscale videos and/or interpolate frames
130
+ * Gets the worker for the provided ID.
103
131
  */
104
- export const invokeVideoEnhancementStepTemplate = (options) => {
132
+ const getWorker = (options) => {
105
133
  var _a;
106
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
134
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).get({
107
135
  ...options,
108
- url: '/v2/consumer/recipes/videoEnhancement',
136
+ url: '/v2/providers/workers/{workerId}',
109
137
  });
110
138
  };
139
+ exports.getWorker = getWorker;
111
140
  /**
112
- * Video generation
113
- * Generate videos through text/image inputs using any of our supported engines
141
+ * Delete a worker.
114
142
  */
115
- export const invokeVideoGenStepTemplate = (options) => {
143
+ const deleteWorker = (options) => {
116
144
  var _a;
117
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
145
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).delete({
118
146
  ...options,
119
- url: '/v2/consumer/recipes/videoGen',
147
+ url: '/v2/providers/workers/{workerId}',
120
148
  });
121
149
  };
150
+ exports.deleteWorker = deleteWorker;
122
151
  /**
123
- * Get an existing resource.
152
+ * Gets the registration details for the specified worker.
124
153
  */
125
- export const getResource = (options) => {
154
+ const getRegistration = (options) => {
126
155
  var _a;
127
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get({
156
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).get({
128
157
  ...options,
129
- url: '/v2/resources/{air}',
158
+ url: '/v2/providers/workers/{workerId}/registration',
130
159
  });
131
160
  };
161
+ exports.getRegistration = getRegistration;
132
162
  /**
133
- * Invalidates the cache of a specific resource.
163
+ * Update the registration details of the specified worker.
134
164
  */
135
- export const invalidateResource = (options) => {
165
+ const updateWorkerRegistration = (options) => {
136
166
  var _a;
137
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).delete({
167
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).put({
138
168
  ...options,
139
- url: '/v2/resources/{air}',
169
+ url: '/v2/providers/workers/{workerId}/registration',
140
170
  });
141
171
  };
172
+ exports.updateWorkerRegistration = updateWorkerRegistration;
142
173
  /**
143
- * Submit workflow
174
+ * Patch a worker's registration resources
144
175
  */
145
- export const submitWorkflow = (options) => {
176
+ const patchWorkerResources = (options) => {
146
177
  var _a;
147
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
178
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).patch({
148
179
  ...options,
149
- url: '/v2/consumer/workflows',
180
+ url: '/v2/providers/workers/{workerId}/registration/resources',
150
181
  });
151
182
  };
183
+ exports.patchWorkerResources = patchWorkerResources;
152
184
  /**
153
- * Query workflows
185
+ * Submit a workflow for processing
154
186
  */
155
- export const queryWorkflows = (options) => {
187
+ const submitWorkflow = (options) => {
156
188
  var _a;
157
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get({
189
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).post({
158
190
  ...options,
159
191
  url: '/v2/consumer/workflows',
160
192
  });
161
193
  };
194
+ exports.submitWorkflow = submitWorkflow;
162
195
  /**
163
- * Get workflow
196
+ * Query for workflows made by the user.
164
197
  */
165
- export const getWorkflow = (options) => {
198
+ const queryWorkflows = (options) => {
166
199
  var _a;
167
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get({
200
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).get({
168
201
  ...options,
169
- url: '/v2/consumer/workflows/{workflowId}',
202
+ url: '/v2/consumer/workflows',
170
203
  });
171
204
  };
205
+ exports.queryWorkflows = queryWorkflows;
172
206
  /**
173
- * Update workflow
174
- * Updates a worfklow. This can currently be used to cancel a worfklow or override metadata and/or tags
207
+ * Get the status of a workflow
175
208
  */
176
- export const updateWorkflow = (options) => {
209
+ const getWorkflow = (options) => {
177
210
  var _a;
178
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).put({
211
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).get({
179
212
  ...options,
180
213
  url: '/v2/consumer/workflows/{workflowId}',
181
214
  });
182
215
  };
216
+ exports.getWorkflow = getWorkflow;
183
217
  /**
184
- * Patch workflow
185
- * Patches a worfklow using JSON Patch. This can currently be used to cancel a worfklow, update metadata and add additional tags
218
+ * Updates a worfklow. This can currently be used to cancel a worfklow.
186
219
  */
187
- export const patchWorkflow = (options) => {
220
+ const updateWorkflow = (options) => {
221
+ var _a;
222
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).put({
223
+ ...options,
224
+ url: '/v2/consumer/workflows/{workflowId}',
225
+ });
226
+ };
227
+ exports.updateWorkflow = updateWorkflow;
228
+ const patchWorkflow = (options) => {
188
229
  var _a;
189
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).patch({
230
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).patch({
190
231
  ...options,
191
232
  url: '/v2/consumer/workflows/{workflowId}',
192
233
  });
193
234
  };
235
+ exports.patchWorkflow = patchWorkflow;
194
236
  /**
195
- * Delete workflow
196
- * This will delete a workflow. This may trigger a refund if the work requested with this workflow has not yet started
237
+ * Deletes a workflow and all its jobs.
197
238
  */
198
- export const deleteWorkflow = (options) => {
239
+ const deleteWorkflow = (options) => {
199
240
  var _a;
200
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).delete({
241
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).delete({
201
242
  ...options,
202
243
  url: '/v2/consumer/workflows/{workflowId}',
203
244
  });
204
245
  };
246
+ exports.deleteWorkflow = deleteWorkflow;
205
247
  /**
206
- * Add workflow tag
207
- * Adds a tag to a workflow
248
+ * Submit a tag to be added to a workflow.
208
249
  */
209
- export const addWorkflowTag = (options) => {
250
+ const addWorkflowTag = (options) => {
210
251
  var _a;
211
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
252
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).post({
212
253
  ...options,
213
254
  url: '/v2/consumer/workflows/{workflowId}/tags',
214
255
  });
215
256
  };
257
+ exports.addWorkflowTag = addWorkflowTag;
216
258
  /**
217
- * Delete all workflow tags
259
+ * Delete all tags for a workflow.
218
260
  */
219
- export const removeAllWorkflowTags = (options) => {
261
+ const removeAllWorkflowTags = (options) => {
220
262
  var _a;
221
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).delete({
263
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).delete({
222
264
  ...options,
223
265
  url: '/v2/consumer/workflows/{workflowId}/tags',
224
266
  });
225
267
  };
268
+ exports.removeAllWorkflowTags = removeAllWorkflowTags;
226
269
  /**
227
- * Delete workflow tag
270
+ * Submit a tag to be removed from a workflow.
228
271
  */
229
- export const removeWorkflowTag = (options) => {
272
+ const removeWorkflowTag = (options) => {
230
273
  var _a;
231
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).delete({
274
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).delete({
232
275
  ...options,
233
276
  url: '/v2/consumer/workflows/{workflowId}/tags/{tag}',
234
277
  });
235
278
  };
279
+ exports.removeWorkflowTag = removeWorkflowTag;
236
280
  /**
237
281
  * Get the status of a workflow step
238
282
  */
239
- export const getWorkflowStep = (options) => {
283
+ const getWorkflowStep = (options) => {
240
284
  var _a;
241
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get({
285
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).get({
242
286
  ...options,
243
287
  url: '/v2/consumer/workflows/{workflowId}/steps/{stepName}',
244
288
  });
245
289
  };
290
+ exports.getWorkflowStep = getWorkflowStep;
246
291
  /**
247
292
  * Updates a step within a particular workflow.
248
293
  */
249
- export const updateWorkflowStep = (options) => {
294
+ const updateWorkflowStep = (options) => {
250
295
  var _a;
251
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).put({
296
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).put({
252
297
  ...options,
253
298
  url: '/v2/consumer/workflows/{workflowId}/steps/{stepName}',
254
299
  });
255
300
  };
256
- export const patchWorkflowStep = (options) => {
301
+ exports.updateWorkflowStep = updateWorkflowStep;
302
+ const patchWorkflowStep = (options) => {
257
303
  var _a;
258
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).patch({
304
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_fetch_1.client).patch({
259
305
  ...options,
260
306
  url: '/v2/consumer/workflows/{workflowId}/steps/{stepName}',
261
307
  });
262
308
  };
309
+ exports.patchWorkflowStep = patchWorkflowStep;