@civitai/client 0.1.4-beta.0 → 0.1.5-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/CivitaiClient.d.ts +3 -11
- package/dist/client/CivitaiClient.js +24 -21
- package/dist/generated/core/request.js +73 -25
- package/dist/generated/index.d.ts +0 -6
- package/dist/generated/index.js +0 -13
- package/dist/generated/schemas.gen.d.ts +19 -40
- package/dist/generated/schemas.gen.js +19 -40
- package/dist/generated/services.gen.d.ts +193 -273
- package/dist/generated/services.gen.js +241 -520
- package/dist/generated/types.gen.d.ts +481 -269
- package/dist/generated/types.gen.js +122 -0
- package/dist/utils/CivitaiError.d.ts +5 -0
- package/dist/utils/CivitaiError.js +13 -0
- package/package.json +3 -2
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
import { BaseHttpRequest } from '../generated/core/BaseHttpRequest';
|
|
2
|
-
import { Interceptors, OpenAPIConfig } from '../generated/core/OpenAPI';
|
|
3
|
-
import { GeneratedClient } from '../generated/GeneratedClient';
|
|
4
1
|
type ClientConfig = {
|
|
5
2
|
env?: 'dev' | 'prod';
|
|
6
3
|
base?: string;
|
|
7
4
|
auth: string;
|
|
8
|
-
interceptors?: {
|
|
9
|
-
request?: Interceptors<RequestInit>;
|
|
10
|
-
response?: Interceptors<Response>;
|
|
11
|
-
};
|
|
12
5
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
6
|
+
export declare function createCivitaiClient(
|
|
7
|
+
config: ClientConfig
|
|
8
|
+
): import('@hey-api/client-fetch').Client;
|
|
17
9
|
export {};
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
3
|
+
exports.createCivitaiClient = createCivitaiClient;
|
|
4
|
+
const client_fetch_1 = require("@hey-api/client-fetch");
|
|
5
|
+
function createCivitaiClient(config) {
|
|
6
|
+
const client = (0, client_fetch_1.createClient)({
|
|
7
|
+
baseUrl: config.env === 'dev'
|
|
8
|
+
? 'https://orchestration-dev.civitai.com'
|
|
9
|
+
: 'https://orchestration.civitai.com',
|
|
10
|
+
global: false,
|
|
11
|
+
headers: {
|
|
12
|
+
Authorization: `Bearer ${config.auth}`,
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
client.interceptors.response.use(async (response) => {
|
|
16
|
+
if (!response.ok && response.status === 500) {
|
|
17
|
+
const error = { status: response.status, detail: response.statusText };
|
|
18
|
+
const newResponse = new Response(JSON.stringify(error), {
|
|
19
|
+
status: response.status,
|
|
20
|
+
statusText: response.statusText,
|
|
21
|
+
});
|
|
22
|
+
return newResponse;
|
|
23
|
+
}
|
|
24
|
+
return response;
|
|
25
|
+
});
|
|
26
|
+
return client;
|
|
20
27
|
}
|
|
21
|
-
exports.CivitaiClient = CivitaiClient;
|
|
22
|
-
// const test = new CivitaiClient({ auth: '' });
|
|
23
|
-
// test.requests.submitRequest([{ $type: 'textToImage' }]);
|
|
24
|
-
// test.workflows.submitRequest({requestBody: {} as TextToImageStep})
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.request = exports.catchErrorCodes = exports.getResponseBody = exports.getResponseHeader = exports.sendRequest = exports.getRequestBody = exports.getHeaders = exports.resolve = exports.getFormData = exports.getQueryString = exports.base64 = exports.isFormData = exports.isBlob = exports.isStringWithValue = exports.isString = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const ApiError_1 = require("./ApiError");
|
|
6
5
|
const CancelablePromise_1 = require("./CancelablePromise");
|
|
7
6
|
const isString = (value) => {
|
|
@@ -96,23 +95,30 @@ const getFormData = (options) => {
|
|
|
96
95
|
return undefined;
|
|
97
96
|
};
|
|
98
97
|
exports.getFormData = getFormData;
|
|
99
|
-
const resolve = (options, resolver) =>
|
|
98
|
+
const resolve = async (options, resolver) => {
|
|
100
99
|
if (typeof resolver === 'function') {
|
|
101
100
|
return resolver(options);
|
|
102
101
|
}
|
|
103
102
|
return resolver;
|
|
104
|
-
}
|
|
103
|
+
};
|
|
105
104
|
exports.resolve = resolve;
|
|
106
|
-
const getHeaders = (config, options) =>
|
|
107
|
-
const [token, username, password, additionalHeaders] =
|
|
105
|
+
const getHeaders = async (config, options) => {
|
|
106
|
+
const [token, username, password, additionalHeaders] = await Promise.all([
|
|
108
107
|
(0, exports.resolve)(options, config.TOKEN),
|
|
109
108
|
(0, exports.resolve)(options, config.USERNAME),
|
|
110
109
|
(0, exports.resolve)(options, config.PASSWORD),
|
|
111
110
|
(0, exports.resolve)(options, config.HEADERS),
|
|
112
111
|
]);
|
|
113
|
-
const headers = Object.entries(
|
|
112
|
+
const headers = Object.entries({
|
|
113
|
+
Accept: 'application/json',
|
|
114
|
+
...additionalHeaders,
|
|
115
|
+
...options.headers,
|
|
116
|
+
})
|
|
114
117
|
.filter(([, value]) => value !== undefined && value !== null)
|
|
115
|
-
.reduce((headers, [key, value]) => (
|
|
118
|
+
.reduce((headers, [key, value]) => ({
|
|
119
|
+
...headers,
|
|
120
|
+
[key]: String(value),
|
|
121
|
+
}), {});
|
|
116
122
|
if ((0, exports.isStringWithValue)(token)) {
|
|
117
123
|
headers['Authorization'] = `Bearer ${token}`;
|
|
118
124
|
}
|
|
@@ -135,7 +141,7 @@ const getHeaders = (config, options) => tslib_1.__awaiter(void 0, void 0, void 0
|
|
|
135
141
|
}
|
|
136
142
|
}
|
|
137
143
|
return new Headers(headers);
|
|
138
|
-
}
|
|
144
|
+
};
|
|
139
145
|
exports.getHeaders = getHeaders;
|
|
140
146
|
const getRequestBody = (options) => {
|
|
141
147
|
var _a, _b;
|
|
@@ -153,7 +159,7 @@ const getRequestBody = (options) => {
|
|
|
153
159
|
return undefined;
|
|
154
160
|
};
|
|
155
161
|
exports.getRequestBody = getRequestBody;
|
|
156
|
-
const sendRequest = (config, options, url, body, formData, headers, onCancel) =>
|
|
162
|
+
const sendRequest = async (config, options, url, body, formData, headers, onCancel) => {
|
|
157
163
|
const controller = new AbortController();
|
|
158
164
|
let request = {
|
|
159
165
|
headers,
|
|
@@ -165,11 +171,11 @@ const sendRequest = (config, options, url, body, formData, headers, onCancel) =>
|
|
|
165
171
|
request.credentials = config.CREDENTIALS;
|
|
166
172
|
}
|
|
167
173
|
for (const fn of config.interceptors.request._fns) {
|
|
168
|
-
request =
|
|
174
|
+
request = await fn(request);
|
|
169
175
|
}
|
|
170
176
|
onCancel(() => controller.abort());
|
|
171
|
-
return
|
|
172
|
-
}
|
|
177
|
+
return await fetch(url, request);
|
|
178
|
+
};
|
|
173
179
|
exports.sendRequest = sendRequest;
|
|
174
180
|
const getResponseHeader = (response, responseHeader) => {
|
|
175
181
|
if (responseHeader) {
|
|
@@ -181,7 +187,7 @@ const getResponseHeader = (response, responseHeader) => {
|
|
|
181
187
|
return undefined;
|
|
182
188
|
};
|
|
183
189
|
exports.getResponseHeader = getResponseHeader;
|
|
184
|
-
const getResponseBody = (response) =>
|
|
190
|
+
const getResponseBody = async (response) => {
|
|
185
191
|
if (response.status !== 204) {
|
|
186
192
|
try {
|
|
187
193
|
const contentType = response.headers.get('Content-Type');
|
|
@@ -195,16 +201,16 @@ const getResponseBody = (response) => tslib_1.__awaiter(void 0, void 0, void 0,
|
|
|
195
201
|
'video/',
|
|
196
202
|
];
|
|
197
203
|
if (contentType.includes('application/json') || contentType.includes('+json')) {
|
|
198
|
-
return
|
|
204
|
+
return await response.json();
|
|
199
205
|
}
|
|
200
206
|
else if (binaryTypes.some((type) => contentType.includes(type))) {
|
|
201
|
-
return
|
|
207
|
+
return await response.blob();
|
|
202
208
|
}
|
|
203
209
|
else if (contentType.includes('multipart/form-data')) {
|
|
204
|
-
return
|
|
210
|
+
return await response.formData();
|
|
205
211
|
}
|
|
206
212
|
else if (contentType.includes('text/')) {
|
|
207
|
-
return
|
|
213
|
+
return await response.text();
|
|
208
214
|
}
|
|
209
215
|
}
|
|
210
216
|
}
|
|
@@ -213,11 +219,53 @@ const getResponseBody = (response) => tslib_1.__awaiter(void 0, void 0, void 0,
|
|
|
213
219
|
}
|
|
214
220
|
}
|
|
215
221
|
return undefined;
|
|
216
|
-
}
|
|
222
|
+
};
|
|
217
223
|
exports.getResponseBody = getResponseBody;
|
|
218
224
|
const catchErrorCodes = (options, result) => {
|
|
219
225
|
var _a, _b;
|
|
220
|
-
const errors =
|
|
226
|
+
const errors = {
|
|
227
|
+
400: 'Bad Request',
|
|
228
|
+
401: 'Unauthorized',
|
|
229
|
+
402: 'Payment Required',
|
|
230
|
+
403: 'Forbidden',
|
|
231
|
+
404: 'Not Found',
|
|
232
|
+
405: 'Method Not Allowed',
|
|
233
|
+
406: 'Not Acceptable',
|
|
234
|
+
407: 'Proxy Authentication Required',
|
|
235
|
+
408: 'Request Timeout',
|
|
236
|
+
409: 'Conflict',
|
|
237
|
+
410: 'Gone',
|
|
238
|
+
411: 'Length Required',
|
|
239
|
+
412: 'Precondition Failed',
|
|
240
|
+
413: 'Payload Too Large',
|
|
241
|
+
414: 'URI Too Long',
|
|
242
|
+
415: 'Unsupported Media Type',
|
|
243
|
+
416: 'Range Not Satisfiable',
|
|
244
|
+
417: 'Expectation Failed',
|
|
245
|
+
418: 'Im a teapot',
|
|
246
|
+
421: 'Misdirected Request',
|
|
247
|
+
422: 'Unprocessable Content',
|
|
248
|
+
423: 'Locked',
|
|
249
|
+
424: 'Failed Dependency',
|
|
250
|
+
425: 'Too Early',
|
|
251
|
+
426: 'Upgrade Required',
|
|
252
|
+
428: 'Precondition Required',
|
|
253
|
+
429: 'Too Many Requests',
|
|
254
|
+
431: 'Request Header Fields Too Large',
|
|
255
|
+
451: 'Unavailable For Legal Reasons',
|
|
256
|
+
500: 'Internal Server Error',
|
|
257
|
+
501: 'Not Implemented',
|
|
258
|
+
502: 'Bad Gateway',
|
|
259
|
+
503: 'Service Unavailable',
|
|
260
|
+
504: 'Gateway Timeout',
|
|
261
|
+
505: 'HTTP Version Not Supported',
|
|
262
|
+
506: 'Variant Also Negotiates',
|
|
263
|
+
507: 'Insufficient Storage',
|
|
264
|
+
508: 'Loop Detected',
|
|
265
|
+
510: 'Not Extended',
|
|
266
|
+
511: 'Network Authentication Required',
|
|
267
|
+
...options.errors,
|
|
268
|
+
};
|
|
221
269
|
const error = errors[result.status];
|
|
222
270
|
if (error) {
|
|
223
271
|
throw new ApiError_1.ApiError(options, result, error);
|
|
@@ -245,18 +293,18 @@ exports.catchErrorCodes = catchErrorCodes;
|
|
|
245
293
|
* @throws ApiError
|
|
246
294
|
*/
|
|
247
295
|
const request = (config, options) => {
|
|
248
|
-
return new CancelablePromise_1.CancelablePromise((resolve, reject, onCancel) =>
|
|
296
|
+
return new CancelablePromise_1.CancelablePromise(async (resolve, reject, onCancel) => {
|
|
249
297
|
try {
|
|
250
298
|
const url = getUrl(config, options);
|
|
251
299
|
const formData = (0, exports.getFormData)(options);
|
|
252
300
|
const body = (0, exports.getRequestBody)(options);
|
|
253
|
-
const headers =
|
|
301
|
+
const headers = await (0, exports.getHeaders)(config, options);
|
|
254
302
|
if (!onCancel.isCancelled) {
|
|
255
|
-
let response =
|
|
303
|
+
let response = await (0, exports.sendRequest)(config, options, url, body, formData, headers, onCancel);
|
|
256
304
|
for (const fn of config.interceptors.response._fns) {
|
|
257
|
-
response =
|
|
305
|
+
response = await fn(response);
|
|
258
306
|
}
|
|
259
|
-
const responseBody =
|
|
307
|
+
const responseBody = await (0, exports.getResponseBody)(response);
|
|
260
308
|
const responseHeader = (0, exports.getResponseHeader)(response, options.responseHeader);
|
|
261
309
|
const result = {
|
|
262
310
|
url,
|
|
@@ -272,6 +320,6 @@ const request = (config, options) => {
|
|
|
272
320
|
catch (error) {
|
|
273
321
|
reject(error);
|
|
274
322
|
}
|
|
275
|
-
})
|
|
323
|
+
});
|
|
276
324
|
};
|
|
277
325
|
exports.request = request;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
export { GeneratedClient } from './GeneratedClient';
|
|
2
|
-
export { ApiError } from './core/ApiError';
|
|
3
|
-
export { BaseHttpRequest } from './core/BaseHttpRequest';
|
|
4
|
-
export { CancelablePromise, CancelError } from './core/CancelablePromise';
|
|
5
|
-
export { OpenAPI, type OpenAPIConfig } from './core/OpenAPI';
|
|
6
|
-
export * from './enums.gen';
|
|
7
1
|
export * from './schemas.gen';
|
|
8
2
|
export * from './services.gen';
|
|
9
3
|
export * from './types.gen';
|
package/dist/generated/index.js
CHANGED
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OpenAPI = exports.CancelError = exports.CancelablePromise = exports.BaseHttpRequest = exports.ApiError = exports.GeneratedClient = void 0;
|
|
4
3
|
const tslib_1 = require("tslib");
|
|
5
4
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
6
|
-
var GeneratedClient_1 = require("./GeneratedClient");
|
|
7
|
-
Object.defineProperty(exports, "GeneratedClient", { enumerable: true, get: function () { return GeneratedClient_1.GeneratedClient; } });
|
|
8
|
-
var ApiError_1 = require("./core/ApiError");
|
|
9
|
-
Object.defineProperty(exports, "ApiError", { enumerable: true, get: function () { return ApiError_1.ApiError; } });
|
|
10
|
-
var BaseHttpRequest_1 = require("./core/BaseHttpRequest");
|
|
11
|
-
Object.defineProperty(exports, "BaseHttpRequest", { enumerable: true, get: function () { return BaseHttpRequest_1.BaseHttpRequest; } });
|
|
12
|
-
var CancelablePromise_1 = require("./core/CancelablePromise");
|
|
13
|
-
Object.defineProperty(exports, "CancelablePromise", { enumerable: true, get: function () { return CancelablePromise_1.CancelablePromise; } });
|
|
14
|
-
Object.defineProperty(exports, "CancelError", { enumerable: true, get: function () { return CancelablePromise_1.CancelError; } });
|
|
15
|
-
var OpenAPI_1 = require("./core/OpenAPI");
|
|
16
|
-
Object.defineProperty(exports, "OpenAPI", { enumerable: true, get: function () { return OpenAPI_1.OpenAPI; } });
|
|
17
|
-
tslib_1.__exportStar(require("./enums.gen"), exports);
|
|
18
5
|
tslib_1.__exportStar(require("./schemas.gen"), exports);
|
|
19
6
|
tslib_1.__exportStar(require("./services.gen"), exports);
|
|
20
7
|
tslib_1.__exportStar(require("./types.gen"), exports);
|
|
@@ -128,7 +128,7 @@ export declare const $EchoOutput: {
|
|
|
128
128
|
};
|
|
129
129
|
export declare const $EchoStep: {
|
|
130
130
|
readonly title: 'A workflow step that takes a message string and retuns it.';
|
|
131
|
-
readonly required: readonly ['$type', 'input'];
|
|
131
|
+
readonly required: readonly ['$type', 'input', 'name'];
|
|
132
132
|
readonly type: 'object';
|
|
133
133
|
readonly allOf: readonly [
|
|
134
134
|
{
|
|
@@ -137,9 +137,9 @@ export declare const $EchoStep: {
|
|
|
137
137
|
];
|
|
138
138
|
readonly properties: {
|
|
139
139
|
readonly name: {
|
|
140
|
+
readonly minLength: 1;
|
|
140
141
|
readonly type: 'string';
|
|
141
142
|
readonly description: 'The name of the workflow step. Used to allow steps to refer to one another.';
|
|
142
|
-
readonly nullable: true;
|
|
143
143
|
};
|
|
144
144
|
readonly priority: {
|
|
145
145
|
readonly $ref: '#/components/schemas/Priority';
|
|
@@ -406,7 +406,7 @@ export declare const $ImageResourceTrainingInput: {
|
|
|
406
406
|
readonly type: 'object';
|
|
407
407
|
readonly properties: {
|
|
408
408
|
readonly model: {
|
|
409
|
-
readonly pattern: '^(?:urn:)?(?:air:)?(?:(?<ecosystem>[a-zA-Z0-9_
|
|
409
|
+
readonly pattern: '^(?: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_\\-\\.]+))?(?:\\.(?<format>[a-zA-Z0-9_\\-]+))?$';
|
|
410
410
|
readonly type: 'string';
|
|
411
411
|
readonly description: 'The primary model to train upon.';
|
|
412
412
|
};
|
|
@@ -543,7 +543,7 @@ export declare const $ImageResourceTrainingJob: {
|
|
|
543
543
|
];
|
|
544
544
|
readonly properties: {
|
|
545
545
|
readonly model: {
|
|
546
|
-
readonly pattern: '^(?:urn:)?(?:air:)?(?:(?<ecosystem>[a-zA-Z0-9_
|
|
546
|
+
readonly pattern: '^(?: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_\\-\\.]+))?(?:\\.(?<format>[a-zA-Z0-9_\\-]+))?$';
|
|
547
547
|
readonly type: 'string';
|
|
548
548
|
readonly description: 'An AIR representing the model to use.';
|
|
549
549
|
};
|
|
@@ -572,19 +572,15 @@ export declare const $ImageResourceTrainingJob: {
|
|
|
572
572
|
readonly description: 'An application provided output of the current status of this job';
|
|
573
573
|
readonly nullable: true;
|
|
574
574
|
};
|
|
575
|
-
readonly type: {
|
|
575
|
+
readonly $type: {
|
|
576
|
+
readonly enum: readonly ['ImageResourceTrainingJob'];
|
|
576
577
|
readonly type: 'string';
|
|
577
|
-
readonly description: 'The job type.';
|
|
578
578
|
};
|
|
579
579
|
readonly claimDuration: {
|
|
580
580
|
readonly type: 'string';
|
|
581
581
|
readonly description: "Rick: yeah i think for LoRA we need it to be 5-10 minutes.\nlora training has this lame effect where it can't send updates while it is uploading... so we need to give it extra buffer";
|
|
582
582
|
readonly example: '00:00:00';
|
|
583
583
|
};
|
|
584
|
-
readonly $type: {
|
|
585
|
-
readonly enum: readonly ['ImageResourceTrainingJob'];
|
|
586
|
-
readonly type: 'string';
|
|
587
|
-
};
|
|
588
584
|
};
|
|
589
585
|
readonly additionalProperties: false;
|
|
590
586
|
};
|
|
@@ -608,7 +604,7 @@ export declare const $ImageResourceTrainingOutput: {
|
|
|
608
604
|
readonly additionalProperties: false;
|
|
609
605
|
};
|
|
610
606
|
export declare const $ImageResourceTrainingStep: {
|
|
611
|
-
readonly required: readonly ['$type', 'input'];
|
|
607
|
+
readonly required: readonly ['$type', 'input', 'name'];
|
|
612
608
|
readonly type: 'object';
|
|
613
609
|
readonly allOf: readonly [
|
|
614
610
|
{
|
|
@@ -617,9 +613,9 @@ export declare const $ImageResourceTrainingStep: {
|
|
|
617
613
|
];
|
|
618
614
|
readonly properties: {
|
|
619
615
|
readonly name: {
|
|
616
|
+
readonly minLength: 1;
|
|
620
617
|
readonly type: 'string';
|
|
621
618
|
readonly description: 'The name of the workflow step. Used to allow steps to refer to one another.';
|
|
622
|
-
readonly nullable: true;
|
|
623
619
|
};
|
|
624
620
|
readonly priority: {
|
|
625
621
|
readonly $ref: '#/components/schemas/Priority';
|
|
@@ -834,10 +830,6 @@ export declare const $LLMPromptAugmentationJob: {
|
|
|
834
830
|
readonly description: 'The temp.';
|
|
835
831
|
readonly format: 'double';
|
|
836
832
|
};
|
|
837
|
-
readonly type: {
|
|
838
|
-
readonly type: 'string';
|
|
839
|
-
readonly description: 'The type.';
|
|
840
|
-
};
|
|
841
833
|
readonly $type: {
|
|
842
834
|
readonly enum: readonly ['LLMPromptAugmentationJob'];
|
|
843
835
|
readonly type: 'string';
|
|
@@ -959,7 +951,7 @@ export declare const $ResourceInfo: {
|
|
|
959
951
|
readonly type: 'object';
|
|
960
952
|
readonly properties: {
|
|
961
953
|
readonly air: {
|
|
962
|
-
readonly pattern: '^(?:urn:)?(?:air:)?(?:(?<ecosystem>[a-zA-Z0-9_
|
|
954
|
+
readonly pattern: '^(?: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_\\-\\.]+))?(?:\\.(?<format>[a-zA-Z0-9_\\-]+))?$';
|
|
963
955
|
readonly type: 'string';
|
|
964
956
|
readonly description: 'An AIR ID for the resource.';
|
|
965
957
|
};
|
|
@@ -1043,7 +1035,7 @@ export declare const $SimilaritySearchJob: {
|
|
|
1043
1035
|
];
|
|
1044
1036
|
readonly properties: {
|
|
1045
1037
|
readonly model: {
|
|
1046
|
-
readonly pattern: '^(?:urn:)?(?:air:)?(?:(?<ecosystem>[a-zA-Z0-9_
|
|
1038
|
+
readonly pattern: '^(?: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_\\-\\.]+))?(?:\\.(?<format>[a-zA-Z0-9_\\-]+))?$';
|
|
1047
1039
|
readonly type: 'string';
|
|
1048
1040
|
readonly description: 'An AIR ID representing the primary model.';
|
|
1049
1041
|
};
|
|
@@ -1067,10 +1059,6 @@ export declare const $SimilaritySearchJob: {
|
|
|
1067
1059
|
readonly description: 'A value representing the cost of the job.';
|
|
1068
1060
|
readonly format: 'double';
|
|
1069
1061
|
};
|
|
1070
|
-
readonly type: {
|
|
1071
|
-
readonly type: 'string';
|
|
1072
|
-
readonly description: 'The job type.';
|
|
1073
|
-
};
|
|
1074
1062
|
readonly $type: {
|
|
1075
1063
|
readonly enum: readonly ['SimilaritySearchJob'];
|
|
1076
1064
|
readonly type: 'string';
|
|
@@ -1113,7 +1101,7 @@ export declare const $TextToImageInput: {
|
|
|
1113
1101
|
readonly default: 1;
|
|
1114
1102
|
};
|
|
1115
1103
|
readonly model: {
|
|
1116
|
-
readonly pattern: '^(?:urn:)?(?:air:)?(?:(?<ecosystem>[a-zA-Z0-9_
|
|
1104
|
+
readonly pattern: '^(?: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_\\-\\.]+))?(?:\\.(?<format>[a-zA-Z0-9_\\-]+))?$';
|
|
1117
1105
|
readonly type: 'string';
|
|
1118
1106
|
readonly description: 'The AIR of the checkpoint model to use for generation.';
|
|
1119
1107
|
};
|
|
@@ -1203,7 +1191,7 @@ export declare const $TextToImageJob: {
|
|
|
1203
1191
|
];
|
|
1204
1192
|
readonly properties: {
|
|
1205
1193
|
readonly model: {
|
|
1206
|
-
readonly pattern: '^(?:urn:)?(?:air:)?(?:(?<ecosystem>[a-zA-Z0-9_
|
|
1194
|
+
readonly pattern: '^(?: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_\\-\\.]+))?(?:\\.(?<format>[a-zA-Z0-9_\\-]+))?$';
|
|
1207
1195
|
readonly type: 'string';
|
|
1208
1196
|
readonly description: 'An AIR representing the model to use.';
|
|
1209
1197
|
};
|
|
@@ -1249,10 +1237,6 @@ export declare const $TextToImageJob: {
|
|
|
1249
1237
|
readonly description: 'The duration for which this job can be claimed for.';
|
|
1250
1238
|
readonly example: '00:00:00';
|
|
1251
1239
|
};
|
|
1252
|
-
readonly type: {
|
|
1253
|
-
readonly type: 'string';
|
|
1254
|
-
readonly description: 'The job type.';
|
|
1255
|
-
};
|
|
1256
1240
|
readonly $type: {
|
|
1257
1241
|
readonly enum: readonly ['TextToImageJob'];
|
|
1258
1242
|
readonly type: 'string';
|
|
@@ -1295,7 +1279,7 @@ export declare const $TextToImageOutput: {
|
|
|
1295
1279
|
readonly description: 'Represents the output of a TextToImage workflow step.';
|
|
1296
1280
|
};
|
|
1297
1281
|
export declare const $TextToImageStep: {
|
|
1298
|
-
readonly required: readonly ['$type', 'input'];
|
|
1282
|
+
readonly required: readonly ['$type', 'input', 'name'];
|
|
1299
1283
|
readonly type: 'object';
|
|
1300
1284
|
readonly allOf: readonly [
|
|
1301
1285
|
{
|
|
@@ -1304,9 +1288,9 @@ export declare const $TextToImageStep: {
|
|
|
1304
1288
|
];
|
|
1305
1289
|
readonly properties: {
|
|
1306
1290
|
readonly name: {
|
|
1291
|
+
readonly minLength: 1;
|
|
1307
1292
|
readonly type: 'string';
|
|
1308
1293
|
readonly description: 'The name of the workflow step. Used to allow steps to refer to one another.';
|
|
1309
|
-
readonly nullable: true;
|
|
1310
1294
|
};
|
|
1311
1295
|
readonly priority: {
|
|
1312
1296
|
readonly $ref: '#/components/schemas/Priority';
|
|
@@ -1394,7 +1378,7 @@ export declare const $TextToImageV2Job: {
|
|
|
1394
1378
|
];
|
|
1395
1379
|
readonly properties: {
|
|
1396
1380
|
readonly model: {
|
|
1397
|
-
readonly pattern: '^(?:urn:)?(?:air:)?(?:(?<ecosystem>[a-zA-Z0-9_
|
|
1381
|
+
readonly pattern: '^(?: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_\\-\\.]+))?(?:\\.(?<format>[a-zA-Z0-9_\\-]+))?$';
|
|
1398
1382
|
readonly type: 'string';
|
|
1399
1383
|
readonly description: 'An AIR representing the model to use.';
|
|
1400
1384
|
};
|
|
@@ -1432,10 +1416,6 @@ export declare const $TextToImageV2Job: {
|
|
|
1432
1416
|
readonly description: 'The duration for which this job can be claimed for.';
|
|
1433
1417
|
readonly example: '00:00:00';
|
|
1434
1418
|
};
|
|
1435
|
-
readonly type: {
|
|
1436
|
-
readonly type: 'string';
|
|
1437
|
-
readonly description: 'The job type.';
|
|
1438
|
-
};
|
|
1439
1419
|
readonly $type: {
|
|
1440
1420
|
readonly enum: readonly ['TextToImageV2Job'];
|
|
1441
1421
|
readonly type: 'string';
|
|
@@ -1519,7 +1499,7 @@ export declare const $TranscodeOutput: {
|
|
|
1519
1499
|
readonly additionalProperties: false;
|
|
1520
1500
|
};
|
|
1521
1501
|
export declare const $TranscodeStep: {
|
|
1522
|
-
readonly required: readonly ['$type', 'input'];
|
|
1502
|
+
readonly required: readonly ['$type', 'input', 'name'];
|
|
1523
1503
|
readonly type: 'object';
|
|
1524
1504
|
readonly allOf: readonly [
|
|
1525
1505
|
{
|
|
@@ -1528,9 +1508,9 @@ export declare const $TranscodeStep: {
|
|
|
1528
1508
|
];
|
|
1529
1509
|
readonly properties: {
|
|
1530
1510
|
readonly name: {
|
|
1511
|
+
readonly minLength: 1;
|
|
1531
1512
|
readonly type: 'string';
|
|
1532
1513
|
readonly description: 'The name of the workflow step. Used to allow steps to refer to one another.';
|
|
1533
|
-
readonly nullable: true;
|
|
1534
1514
|
};
|
|
1535
1515
|
readonly priority: {
|
|
1536
1516
|
readonly $ref: '#/components/schemas/Priority';
|
|
@@ -2095,7 +2075,6 @@ export declare const $Workflow: {
|
|
|
2095
2075
|
readonly description: 'An array of callback details for the workflow.';
|
|
2096
2076
|
};
|
|
2097
2077
|
readonly tags: {
|
|
2098
|
-
readonly uniqueItems: true;
|
|
2099
2078
|
readonly type: 'array';
|
|
2100
2079
|
readonly items: {
|
|
2101
2080
|
readonly type: 'string';
|
|
@@ -2185,16 +2164,16 @@ export declare const $WorkflowStatus: {
|
|
|
2185
2164
|
readonly description: 'Values available to represent workflow status.';
|
|
2186
2165
|
};
|
|
2187
2166
|
export declare const $WorkflowStep: {
|
|
2188
|
-
readonly required: readonly ['$type'];
|
|
2167
|
+
readonly required: readonly ['$type', 'name'];
|
|
2189
2168
|
readonly type: 'object';
|
|
2190
2169
|
readonly properties: {
|
|
2191
2170
|
readonly $type: {
|
|
2192
2171
|
readonly type: 'string';
|
|
2193
2172
|
};
|
|
2194
2173
|
readonly name: {
|
|
2174
|
+
readonly minLength: 1;
|
|
2195
2175
|
readonly type: 'string';
|
|
2196
2176
|
readonly description: 'The name of the workflow step. Used to allow steps to refer to one another.';
|
|
2197
|
-
readonly nullable: true;
|
|
2198
2177
|
};
|
|
2199
2178
|
readonly priority: {
|
|
2200
2179
|
readonly $ref: '#/components/schemas/Priority';
|