@scenario-labs/sdk 0.3.0 → 1.1.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/CHANGELOG.md +30 -0
- package/README.md +40 -8
- package/client.d.mts +36 -16
- package/client.d.mts.map +1 -1
- package/client.d.ts +36 -16
- package/client.d.ts.map +1 -1
- package/client.js +10 -0
- package/client.js.map +1 -1
- package/client.mjs +10 -0
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +153 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +153 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +276 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +263 -0
- package/core/pagination.mjs.map +1 -0
- package/index.d.mts +5 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts +5 -1
- package/index.d.ts.map +1 -1
- package/index.js +14 -1
- package/index.js.map +1 -1
- package/index.mjs +5 -1
- package/index.mjs.map +1 -1
- package/lib/asset.d.mts +55 -0
- package/lib/asset.d.mts.map +1 -0
- package/lib/asset.d.ts +55 -0
- package/lib/asset.d.ts.map +1 -0
- package/lib/asset.js +60 -0
- package/lib/asset.js.map +1 -0
- package/lib/asset.mjs +54 -0
- package/lib/asset.mjs.map +1 -0
- package/lib/job.d.mts +13 -1
- package/lib/job.d.mts.map +1 -1
- package/lib/job.d.ts +13 -1
- package/lib/job.d.ts.map +1 -1
- package/lib/job.js +18 -1
- package/lib/job.js.map +1 -1
- package/lib/job.mjs +16 -0
- package/lib/job.mjs.map +1 -1
- package/lib/models.d.mts +34 -2
- package/lib/models.d.mts.map +1 -1
- package/lib/models.d.ts +34 -2
- package/lib/models.d.ts.map +1 -1
- package/lib/models.js +39 -2
- package/lib/models.js.map +1 -1
- package/lib/models.mjs +37 -1
- package/lib/models.mjs.map +1 -1
- package/lib/scenario.d.mts +14 -0
- package/lib/scenario.d.mts.map +1 -1
- package/lib/scenario.d.ts +14 -0
- package/lib/scenario.d.ts.map +1 -1
- package/lib/scenario.js +14 -0
- package/lib/scenario.js.map +1 -1
- package/lib/scenario.mjs +14 -0
- package/lib/scenario.mjs.map +1 -1
- package/lib/upload.d.mts +143 -0
- package/lib/upload.d.mts.map +1 -0
- package/lib/upload.d.ts +143 -0
- package/lib/upload.d.ts.map +1 -0
- package/lib/upload.js +242 -0
- package/lib/upload.js.map +1 -0
- package/lib/upload.mjs +203 -0
- package/lib/upload.mjs.map +1 -0
- package/lib/workflow.d.mts +13 -2
- package/lib/workflow.d.mts.map +1 -1
- package/lib/workflow.d.ts +13 -2
- package/lib/workflow.d.ts.map +1 -1
- package/lib/workflow.js +17 -4
- package/lib/workflow.js.map +1 -1
- package/lib/workflow.mjs +17 -4
- package/lib/workflow.mjs.map +1 -1
- package/lib/workflow_import_validator.d.mts +40 -0
- package/lib/workflow_import_validator.d.mts.map +1 -0
- package/lib/workflow_import_validator.d.ts +40 -0
- package/lib/workflow_import_validator.d.ts.map +1 -0
- package/lib/workflow_import_validator.js +69 -0
- package/lib/workflow_import_validator.js.map +1 -0
- package/lib/workflow_import_validator.mjs +64 -0
- package/lib/workflow_import_validator.mjs.map +1 -0
- package/package.json +11 -1
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resources/assets/assets.d.mts +646 -669
- package/resources/assets/assets.d.mts.map +1 -1
- package/resources/assets/assets.d.ts +646 -669
- package/resources/assets/assets.d.ts.map +1 -1
- package/resources/assets/assets.js +3 -2
- package/resources/assets/assets.js.map +1 -1
- package/resources/assets/assets.mjs +3 -2
- package/resources/assets/assets.mjs.map +1 -1
- package/resources/assets/index.d.mts +1 -1
- package/resources/assets/index.d.mts.map +1 -1
- package/resources/assets/index.d.ts +1 -1
- package/resources/assets/index.d.ts.map +1 -1
- package/resources/assets/index.js.map +1 -1
- package/resources/assets/index.mjs.map +1 -1
- package/resources/assets/public.d.mts +12 -12
- package/resources/assets/public.d.mts.map +1 -1
- package/resources/assets/public.d.ts +12 -12
- package/resources/assets/public.d.ts.map +1 -1
- package/resources/collections/collections.d.mts +38 -49
- package/resources/collections/collections.d.mts.map +1 -1
- package/resources/collections/collections.d.ts +38 -49
- package/resources/collections/collections.d.ts.map +1 -1
- package/resources/collections/collections.js +5 -1
- package/resources/collections/collections.js.map +1 -1
- package/resources/collections/collections.mjs +5 -1
- package/resources/collections/collections.mjs.map +1 -1
- package/resources/collections/index.d.mts +1 -1
- package/resources/collections/index.d.mts.map +1 -1
- package/resources/collections/index.d.ts +1 -1
- package/resources/collections/index.d.ts.map +1 -1
- package/resources/collections/index.js.map +1 -1
- package/resources/collections/index.mjs.map +1 -1
- package/resources/generate.d.mts +1027 -242
- package/resources/generate.d.mts.map +1 -1
- package/resources/generate.d.ts +1027 -242
- package/resources/generate.d.ts.map +1 -1
- package/resources/generate.js +7 -0
- package/resources/generate.js.map +1 -1
- package/resources/generate.mjs +7 -0
- package/resources/generate.mjs.map +1 -1
- package/resources/index.d.mts +8 -8
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +8 -8
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/jobs.d.mts +369 -380
- package/resources/jobs.d.mts.map +1 -1
- package/resources/jobs.d.ts +369 -380
- package/resources/jobs.d.ts.map +1 -1
- package/resources/jobs.js +2 -1
- package/resources/jobs.js.map +1 -1
- package/resources/jobs.mjs +2 -1
- package/resources/jobs.mjs.map +1 -1
- package/resources/models/description.d.mts +2 -2
- package/resources/models/description.d.mts.map +1 -1
- package/resources/models/description.d.ts +2 -2
- package/resources/models/description.d.ts.map +1 -1
- package/resources/models/examples.d.mts +4 -4
- package/resources/models/examples.d.mts.map +1 -1
- package/resources/models/examples.d.ts +4 -4
- package/resources/models/examples.d.ts.map +1 -1
- package/resources/models/index.d.mts +1 -1
- package/resources/models/index.d.mts.map +1 -1
- package/resources/models/index.d.ts +1 -1
- package/resources/models/index.d.ts.map +1 -1
- package/resources/models/index.js.map +1 -1
- package/resources/models/index.mjs.map +1 -1
- package/resources/models/models.d.mts +845 -856
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +845 -856
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js +2 -1
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs +2 -1
- package/resources/models/models.mjs.map +1 -1
- package/resources/models/train.d.mts +2 -2
- package/resources/models/train.d.mts.map +1 -1
- package/resources/models/train.d.ts +2 -2
- package/resources/models/train.d.ts.map +1 -1
- package/resources/search.d.mts +215 -295
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts +215 -295
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +9 -2
- package/resources/search.js.map +1 -1
- package/resources/search.mjs +9 -2
- package/resources/search.mjs.map +1 -1
- package/resources/tags.d.mts +23 -35
- package/resources/tags.d.mts.map +1 -1
- package/resources/tags.d.ts +23 -35
- package/resources/tags.d.ts.map +1 -1
- package/resources/tags.js +2 -1
- package/resources/tags.js.map +1 -1
- package/resources/tags.mjs +2 -1
- package/resources/tags.mjs.map +1 -1
- package/resources/usages.d.mts +3 -3
- package/resources/usages.d.mts.map +1 -1
- package/resources/usages.d.ts +3 -3
- package/resources/usages.d.ts.map +1 -1
- package/resources/workflows.d.mts +688 -704
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +688 -704
- package/resources/workflows.d.ts.map +1 -1
- package/resources/workflows.js +5 -1
- package/resources/workflows.js.map +1 -1
- package/resources/workflows.mjs +5 -1
- package/resources/workflows.mjs.map +1 -1
- package/src/client.ts +107 -2
- package/src/core/pagination.ts +497 -0
- package/src/index.ts +11 -1
- package/src/lib/asset.ts +85 -0
- package/src/lib/job.ts +28 -1
- package/src/lib/models.ts +62 -2
- package/src/lib/scenario.ts +14 -0
- package/src/lib/upload.ts +344 -0
- package/src/lib/workflow.ts +29 -4
- package/src/lib/workflow_import_validator.ts +104 -0
- package/src/pagination.ts +2 -0
- package/src/resources/assets/assets.ts +930 -909
- package/src/resources/assets/index.ts +2 -0
- package/src/resources/assets/public.ts +17 -7
- package/src/resources/collections/collections.ts +45 -54
- package/src/resources/collections/index.ts +1 -0
- package/src/resources/generate.ts +1227 -136
- package/src/resources/index.ts +11 -1
- package/src/resources/jobs.ts +613 -622
- package/src/resources/models/description.ts +4 -0
- package/src/resources/models/examples.ts +8 -0
- package/src/resources/models/index.ts +1 -0
- package/src/resources/models/models.ts +1066 -1064
- package/src/resources/models/train.ts +4 -0
- package/src/resources/search.ts +239 -327
- package/src/resources/tags.ts +32 -39
- package/src/resources/usages.ts +5 -0
- package/src/resources/workflows.ts +850 -864
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -117,6 +117,7 @@ export namespace PublicRetrieveResponse {
|
|
|
117
117
|
| '3d:texture:normal'
|
|
118
118
|
| '3d:texture:roughness'
|
|
119
119
|
| 'audio2audio'
|
|
120
|
+
| 'audio2video'
|
|
120
121
|
| 'background-removal'
|
|
121
122
|
| 'canvas'
|
|
122
123
|
| 'canvas-drawing'
|
|
@@ -178,6 +179,7 @@ export namespace PublicRetrieveResponse {
|
|
|
178
179
|
| 'upscale-video'
|
|
179
180
|
| 'vectorization'
|
|
180
181
|
| 'video23d'
|
|
182
|
+
| 'video2audio'
|
|
181
183
|
| 'video2img'
|
|
182
184
|
| 'video2video'
|
|
183
185
|
| 'voice-clone';
|
|
@@ -300,6 +302,7 @@ export namespace PublicRetrieveResponse {
|
|
|
300
302
|
| '3d23d'
|
|
301
303
|
| '3d23d-texture'
|
|
302
304
|
| 'audio2audio'
|
|
305
|
+
| 'audio2video'
|
|
303
306
|
| 'background-removal'
|
|
304
307
|
| 'canvas'
|
|
305
308
|
| 'canvas-drawing'
|
|
@@ -361,6 +364,7 @@ export namespace PublicRetrieveResponse {
|
|
|
361
364
|
| 'upscale-video'
|
|
362
365
|
| 'vectorization'
|
|
363
366
|
| 'video23d'
|
|
367
|
+
| 'video2audio'
|
|
364
368
|
| 'video2img'
|
|
365
369
|
| 'video2video'
|
|
366
370
|
| 'voice-clone';
|
|
@@ -1234,6 +1238,7 @@ export namespace PublicListResponse {
|
|
|
1234
1238
|
| '3d:texture:normal'
|
|
1235
1239
|
| '3d:texture:roughness'
|
|
1236
1240
|
| 'audio2audio'
|
|
1241
|
+
| 'audio2video'
|
|
1237
1242
|
| 'background-removal'
|
|
1238
1243
|
| 'canvas'
|
|
1239
1244
|
| 'canvas-drawing'
|
|
@@ -1295,6 +1300,7 @@ export namespace PublicListResponse {
|
|
|
1295
1300
|
| 'upscale-video'
|
|
1296
1301
|
| 'vectorization'
|
|
1297
1302
|
| 'video23d'
|
|
1303
|
+
| 'video2audio'
|
|
1298
1304
|
| 'video2img'
|
|
1299
1305
|
| 'video2video'
|
|
1300
1306
|
| 'voice-clone';
|
|
@@ -1417,6 +1423,7 @@ export namespace PublicListResponse {
|
|
|
1417
1423
|
| '3d23d'
|
|
1418
1424
|
| '3d23d-texture'
|
|
1419
1425
|
| 'audio2audio'
|
|
1426
|
+
| 'audio2video'
|
|
1420
1427
|
| 'background-removal'
|
|
1421
1428
|
| 'canvas'
|
|
1422
1429
|
| 'canvas-drawing'
|
|
@@ -1478,6 +1485,7 @@ export namespace PublicListResponse {
|
|
|
1478
1485
|
| 'upscale-video'
|
|
1479
1486
|
| 'vectorization'
|
|
1480
1487
|
| 'video23d'
|
|
1488
|
+
| 'video2audio'
|
|
1481
1489
|
| 'video2img'
|
|
1482
1490
|
| 'video2video'
|
|
1483
1491
|
| 'voice-clone';
|
|
@@ -2326,10 +2334,10 @@ export interface PublicListParams {
|
|
|
2326
2334
|
* texture-edge, texture-ao, texture-albedo, image-prompt-editing, unknown, img23d,
|
|
2327
2335
|
* txt23d, video23d, 3d23d, 3d23d-texture, 3d-texture, 3d-texture-mtl,
|
|
2328
2336
|
* 3d-texture-albedo, 3d-texture-normal, 3d-texture-roughness, 3d-texture-metallic,
|
|
2329
|
-
* img2video, txt2audio, audio2audio,
|
|
2330
|
-
*
|
|
2331
|
-
* uploaded-avatar, upscale-video, assets with a type
|
|
2332
|
-
* will be returned
|
|
2337
|
+
* img2video, txt2audio, audio2audio, audio2video, video2audio, voice-clone,
|
|
2338
|
+
* video2video, video2img, txt2img, img2img, txt2video, uploaded, uploaded-video,
|
|
2339
|
+
* uploaded-audio, uploaded-3d, uploaded-avatar, upscale-video, assets with a type
|
|
2340
|
+
* starting with "inference-" will be returned
|
|
2333
2341
|
*/
|
|
2334
2342
|
type?:
|
|
2335
2343
|
| 'inference-txt2img'
|
|
@@ -2393,6 +2401,8 @@ export interface PublicListParams {
|
|
|
2393
2401
|
| 'img2video'
|
|
2394
2402
|
| 'txt2audio'
|
|
2395
2403
|
| 'audio2audio'
|
|
2404
|
+
| 'audio2video'
|
|
2405
|
+
| 'video2audio'
|
|
2396
2406
|
| 'voice-clone'
|
|
2397
2407
|
| 'video2video'
|
|
2398
2408
|
| 'video2img'
|
|
@@ -2423,9 +2433,9 @@ export interface PublicListParams {
|
|
|
2423
2433
|
* texture-edge, texture-ao, texture-albedo, image-prompt-editing, unknown, img23d,
|
|
2424
2434
|
* txt23d, video23d, 3d23d, 3d23d-texture, 3d-texture, 3d-texture-mtl,
|
|
2425
2435
|
* 3d-texture-albedo, 3d-texture-normal, 3d-texture-roughness, 3d-texture-metallic,
|
|
2426
|
-
* img2video, txt2audio, audio2audio,
|
|
2427
|
-
*
|
|
2428
|
-
* uploaded-avatar, upscale-video
|
|
2436
|
+
* img2video, txt2audio, audio2audio, audio2video, video2audio, voice-clone,
|
|
2437
|
+
* video2video, video2img, txt2img, img2img, txt2video, uploaded, uploaded-video,
|
|
2438
|
+
* uploaded-audio, uploaded-3d, uploaded-avatar, upscale-video
|
|
2429
2439
|
*/
|
|
2430
2440
|
types?: string;
|
|
2431
2441
|
|
|
@@ -6,6 +6,7 @@ import { AssetAddParams, AssetAddResponse, AssetRemoveParams, AssetRemoveRespons
|
|
|
6
6
|
import * as ModelsAPI from './models';
|
|
7
7
|
import { ModelAddParams, ModelAddResponse, ModelRemoveParams, ModelRemoveResponse, Models } from './models';
|
|
8
8
|
import { APIPromise } from '../../core/api-promise';
|
|
9
|
+
import { CollectionsCursor, type CollectionsCursorParams, PagePromise } from '../../core/pagination';
|
|
9
10
|
import { RequestOptions } from '../../internal/request-options';
|
|
10
11
|
import { path } from '../../internal/utils/path';
|
|
11
12
|
|
|
@@ -44,8 +45,11 @@ export class Collections extends APIResource {
|
|
|
44
45
|
list(
|
|
45
46
|
query: CollectionListParams | null | undefined = {},
|
|
46
47
|
options?: RequestOptions,
|
|
47
|
-
):
|
|
48
|
-
return this._client.
|
|
48
|
+
): PagePromise<CollectionListResponsesCollectionsCursor, CollectionListResponse> {
|
|
49
|
+
return this._client.getAPIList('/collections', CollectionsCursor<CollectionListResponse>, {
|
|
50
|
+
query,
|
|
51
|
+
...options,
|
|
52
|
+
});
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
/**
|
|
@@ -56,6 +60,8 @@ export class Collections extends APIResource {
|
|
|
56
60
|
}
|
|
57
61
|
}
|
|
58
62
|
|
|
63
|
+
export type CollectionListResponsesCollectionsCursor = CollectionsCursor<CollectionListResponse>;
|
|
64
|
+
|
|
59
65
|
export interface CollectionCreateResponse {
|
|
60
66
|
collection: CollectionCreateResponse.Collection;
|
|
61
67
|
}
|
|
@@ -228,64 +234,53 @@ export namespace CollectionUpdateResponse {
|
|
|
228
234
|
}
|
|
229
235
|
|
|
230
236
|
export interface CollectionListResponse {
|
|
231
|
-
collections: Array<CollectionListResponse.Collection>;
|
|
232
|
-
|
|
233
237
|
/**
|
|
234
|
-
*
|
|
238
|
+
* The collection ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
235
239
|
*/
|
|
236
|
-
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
export namespace CollectionListResponse {
|
|
240
|
-
export interface Collection {
|
|
241
|
-
/**
|
|
242
|
-
* The collection ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
243
|
-
*/
|
|
244
|
-
id: string;
|
|
240
|
+
id: string;
|
|
245
241
|
|
|
246
|
-
|
|
242
|
+
assetCount: number;
|
|
247
243
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
244
|
+
/**
|
|
245
|
+
* The collection creation date as an ISO string (example:
|
|
246
|
+
* "2023-02-03T11:19:41.579Z")
|
|
247
|
+
*/
|
|
248
|
+
createdAt: string;
|
|
253
249
|
|
|
254
|
-
|
|
250
|
+
itemCount: number;
|
|
255
251
|
|
|
256
|
-
|
|
252
|
+
modelCount: number;
|
|
257
253
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
254
|
+
/**
|
|
255
|
+
* The collection name
|
|
256
|
+
*/
|
|
257
|
+
name: string;
|
|
262
258
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
259
|
+
/**
|
|
260
|
+
* The owner ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
|
|
261
|
+
*/
|
|
262
|
+
ownerId: string;
|
|
267
263
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
264
|
+
/**
|
|
265
|
+
* The collection last update date as an ISO string (example:
|
|
266
|
+
* "2023-02-03T11:19:41.579Z")
|
|
267
|
+
*/
|
|
268
|
+
updatedAt: string;
|
|
273
269
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
270
|
+
/**
|
|
271
|
+
* The thumbnail for the collection (if any)
|
|
272
|
+
*/
|
|
273
|
+
thumbnail?: CollectionListResponse.Thumbnail;
|
|
274
|
+
}
|
|
279
275
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
276
|
+
export namespace CollectionListResponse {
|
|
277
|
+
/**
|
|
278
|
+
* The thumbnail for the collection (if any)
|
|
279
|
+
*/
|
|
280
|
+
export interface Thumbnail {
|
|
281
|
+
assetId: string;
|
|
286
282
|
|
|
287
|
-
|
|
288
|
-
}
|
|
283
|
+
url: string;
|
|
289
284
|
}
|
|
290
285
|
}
|
|
291
286
|
|
|
@@ -311,17 +306,12 @@ export interface CollectionUpdateParams {
|
|
|
311
306
|
thumbnail?: string;
|
|
312
307
|
}
|
|
313
308
|
|
|
314
|
-
export interface CollectionListParams {
|
|
309
|
+
export interface CollectionListParams extends CollectionsCursorParams {
|
|
315
310
|
/**
|
|
316
311
|
* The number of items to return in the response. The default value is 10, maximum
|
|
317
312
|
* value is 100, minimum value is 1
|
|
318
313
|
*/
|
|
319
314
|
pageSize?: number;
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* A token you received in a previous request to query the next page of items
|
|
323
|
-
*/
|
|
324
|
-
paginationToken?: string;
|
|
325
315
|
}
|
|
326
316
|
|
|
327
317
|
Collections.Assets = Assets;
|
|
@@ -334,6 +324,7 @@ export declare namespace Collections {
|
|
|
334
324
|
type CollectionUpdateResponse as CollectionUpdateResponse,
|
|
335
325
|
type CollectionListResponse as CollectionListResponse,
|
|
336
326
|
type CollectionDeleteResponse as CollectionDeleteResponse,
|
|
327
|
+
type CollectionListResponsesCollectionsCursor as CollectionListResponsesCollectionsCursor,
|
|
337
328
|
type CollectionCreateParams as CollectionCreateParams,
|
|
338
329
|
type CollectionUpdateParams as CollectionUpdateParams,
|
|
339
330
|
type CollectionListParams as CollectionListParams,
|