@scenario-labs/sdk 0.2.0 → 1.0.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 +48 -0
- package/README.md +44 -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 +21 -11
- package/client.js.map +1 -1
- package/client.mjs +21 -11
- 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 +3 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +3 -0
- package/index.d.ts.map +1 -1
- package/index.js +9 -1
- package/index.js.map +1 -1
- package/index.mjs +3 -0
- package/index.mjs.map +1 -1
- package/internal/request-options.d.mts +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +1 -1
- package/internal/request-options.d.ts.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 +2 -0
- package/lib/scenario.d.mts.map +1 -1
- package/lib/scenario.d.ts +2 -0
- package/lib/scenario.d.ts.map +1 -1
- package/lib/scenario.js +2 -0
- package/lib/scenario.js.map +1 -1
- package/lib/scenario.mjs +2 -0
- package/lib/scenario.mjs.map +1 -1
- package/lib/upload.d.mts +89 -0
- package/lib/upload.d.mts.map +1 -0
- package/lib/upload.d.ts +89 -0
- package/lib/upload.d.ts.map +1 -0
- package/lib/upload.js +193 -0
- package/lib/upload.js.map +1 -0
- package/lib/upload.mjs +156 -0
- package/lib/upload.mjs.map +1 -0
- package/lib/workflow.d.mts +19 -3
- package/lib/workflow.d.mts.map +1 -1
- package/lib/workflow.d.ts +19 -3
- package/lib/workflow.d.ts.map +1 -1
- package/lib/workflow.js +26 -5
- package/lib/workflow.js.map +1 -1
- package/lib/workflow.mjs +26 -5
- 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/lib/workflow_validator.d.mts +22 -0
- package/lib/workflow_validator.d.mts.map +1 -0
- package/lib/workflow_validator.d.ts +22 -0
- package/lib/workflow_validator.d.ts.map +1 -0
- package/lib/workflow_validator.js +124 -0
- package/lib/workflow_validator.js.map +1 -0
- package/lib/workflow_validator.mjs +121 -0
- package/lib/workflow_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 +631 -648
- package/resources/assets/assets.d.mts.map +1 -1
- package/resources/assets/assets.d.ts +631 -648
- package/resources/assets/assets.d.ts.map +1 -1
- package/resources/assets/assets.js +5 -4
- package/resources/assets/assets.js.map +1 -1
- package/resources/assets/assets.mjs +5 -4
- 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/collections/assets.d.mts +8 -2
- package/resources/collections/assets.d.mts.map +1 -1
- package/resources/collections/assets.d.ts +8 -2
- package/resources/collections/assets.d.ts.map +1 -1
- package/resources/collections/assets.js +2 -2
- package/resources/collections/assets.js.map +1 -1
- package/resources/collections/assets.mjs +2 -2
- package/resources/collections/assets.mjs.map +1 -1
- package/resources/collections/collections.d.mts +42 -53
- package/resources/collections/collections.d.mts.map +1 -1
- package/resources/collections/collections.d.ts +42 -53
- 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 +3 -3
- package/resources/collections/index.d.mts.map +1 -1
- package/resources/collections/index.d.ts +3 -3
- package/resources/collections/index.d.ts.map +1 -1
- package/resources/collections/index.js.map +1 -1
- package/resources/collections/index.mjs +2 -2
- package/resources/collections/index.mjs.map +1 -1
- package/resources/collections/models.d.mts +8 -2
- package/resources/collections/models.d.mts.map +1 -1
- package/resources/collections/models.d.ts +8 -2
- package/resources/collections/models.d.ts.map +1 -1
- package/resources/collections/models.js +2 -2
- package/resources/collections/models.js.map +1 -1
- package/resources/collections/models.mjs +2 -2
- package/resources/collections/models.mjs.map +1 -1
- package/resources/index.d.mts +7 -7
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +7 -7
- 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/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 +956 -967
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +956 -967
- 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 +38 -38
- package/resources/models/train.d.mts.map +1 -1
- package/resources/models/train.d.ts +38 -38
- 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/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 +118 -15
- package/src/core/pagination.ts +497 -0
- package/src/index.ts +9 -0
- package/src/internal/request-options.ts +1 -1
- package/src/lib/models.ts +62 -2
- package/src/lib/scenario.ts +2 -0
- package/src/lib/upload.ts +250 -0
- package/src/lib/workflow.ts +39 -5
- package/src/lib/workflow_import_validator.ts +104 -0
- package/src/lib/workflow_validator.ts +167 -0
- package/src/pagination.ts +2 -0
- package/src/resources/assets/assets.ts +971 -905
- package/src/resources/assets/index.ts +3 -0
- package/src/resources/collections/assets.ts +14 -2
- package/src/resources/collections/collections.ts +49 -56
- package/src/resources/collections/index.ts +15 -2
- package/src/resources/collections/models.ts +14 -2
- package/src/resources/index.ts +10 -1
- package/src/resources/jobs.ts +613 -622
- package/src/resources/models/index.ts +1 -0
- package/src/resources/models/models.ts +1118 -1130
- package/src/resources/models/train.ts +40 -40
- package/src/resources/search.ts +239 -327
- package/src/resources/tags.ts +32 -39
- 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
package/resources/search.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { PagePromise, SearchHitsOffset, type SearchHitsOffsetParams } from "../core/pagination.mjs";
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
4
|
export declare class Search extends APIResource {
|
|
5
5
|
/**
|
|
@@ -8,383 +8,313 @@ export declare class Search extends APIResource {
|
|
|
8
8
|
*
|
|
9
9
|
* `image`, `images` are mutually exclusive.
|
|
10
10
|
*/
|
|
11
|
-
assetSearch(params: SearchAssetSearchParams, options?: RequestOptions):
|
|
11
|
+
assetSearch(params: SearchAssetSearchParams, options?: RequestOptions): PagePromise<SearchAssetSearchResponsesSearchHitsOffset, SearchAssetSearchResponse>;
|
|
12
12
|
/**
|
|
13
13
|
* Search for models. At least one of the following fields must have a value:
|
|
14
14
|
* `query`, `filter`, `image`, or `images`.
|
|
15
15
|
*
|
|
16
16
|
* `image`, and `images` are mutually exclusive.
|
|
17
17
|
*/
|
|
18
|
-
modelSearch(params: SearchModelSearchParams, options?: RequestOptions):
|
|
18
|
+
modelSearch(params: SearchModelSearchParams, options?: RequestOptions): PagePromise<SearchModelSearchResponsesSearchHitsOffset, SearchModelSearchResponse>;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
20
|
+
export type SearchAssetSearchResponsesSearchHitsOffset = SearchHitsOffset<SearchAssetSearchResponse>;
|
|
21
|
+
export type SearchModelSearchResponsesSearchHitsOffset = SearchHitsOffset<SearchModelSearchResponse>;
|
|
23
22
|
export interface SearchAssetSearchResponse {
|
|
24
|
-
hits: Array<SearchAssetSearchResponse.Hit>;
|
|
25
23
|
/**
|
|
26
|
-
*
|
|
24
|
+
* Unique identifier for the asset (e.g., "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
27
25
|
*/
|
|
28
|
-
|
|
26
|
+
id: string;
|
|
29
27
|
/**
|
|
30
|
-
*
|
|
28
|
+
* User ID of the asset creator/author
|
|
31
29
|
*/
|
|
32
|
-
|
|
30
|
+
authorId: string;
|
|
33
31
|
/**
|
|
34
|
-
*
|
|
32
|
+
* Array of collection IDs this asset belongs to
|
|
35
33
|
*/
|
|
36
|
-
|
|
34
|
+
collectionIds: Array<string>;
|
|
37
35
|
/**
|
|
38
|
-
*
|
|
36
|
+
* Creation timestamp in ISO 8601 format (e.g., "2025-01-16T11:19:41.579Z")
|
|
39
37
|
*/
|
|
40
|
-
|
|
38
|
+
createdAt: string;
|
|
41
39
|
/**
|
|
42
|
-
*
|
|
40
|
+
* Metadata containing detailed information about the asset's properties and
|
|
41
|
+
* generation parameters
|
|
43
42
|
*/
|
|
44
|
-
|
|
43
|
+
metadata: SearchAssetSearchResponse.Metadata;
|
|
44
|
+
/**
|
|
45
|
+
* MIME type of the asset (e.g., "image/png", "image/jpeg")
|
|
46
|
+
*/
|
|
47
|
+
mimeType: string;
|
|
48
|
+
/**
|
|
49
|
+
* Array of detected NSFW categories
|
|
50
|
+
*/
|
|
51
|
+
nsfw: Array<string>;
|
|
52
|
+
/**
|
|
53
|
+
* Project ID of the asset owner
|
|
54
|
+
*/
|
|
55
|
+
ownerId: string;
|
|
56
|
+
/**
|
|
57
|
+
* Privacy setting of the asset ("public", "private", or "unlisted")
|
|
58
|
+
*/
|
|
59
|
+
privacy: string;
|
|
60
|
+
/**
|
|
61
|
+
* Array of user-assigned tags for categorization
|
|
62
|
+
*/
|
|
63
|
+
tags: Array<string>;
|
|
64
|
+
/**
|
|
65
|
+
* Team ID of the asset owner
|
|
66
|
+
*/
|
|
67
|
+
teamId: string;
|
|
68
|
+
/**
|
|
69
|
+
* Last modification timestamp in ISO 8601 format (e.g.,
|
|
70
|
+
* "2025-01-16T11:19:41.579Z")
|
|
71
|
+
*/
|
|
72
|
+
updatedAt: string;
|
|
73
|
+
/**
|
|
74
|
+
* Signed URL of the asset
|
|
75
|
+
*/
|
|
76
|
+
url: string;
|
|
77
|
+
/**
|
|
78
|
+
* Textual description of the asset. Can be either:
|
|
79
|
+
*
|
|
80
|
+
* - User-provided description for training images
|
|
81
|
+
* - Automatically generated caption for images and videos assets
|
|
82
|
+
* - Automatically generated description for audio assets
|
|
83
|
+
*/
|
|
84
|
+
description?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Score assigned to the asset based on usage and popularity
|
|
87
|
+
*/
|
|
88
|
+
score?: number;
|
|
45
89
|
/**
|
|
46
|
-
*
|
|
90
|
+
* Thumbnail preview of the asset 3D, video...
|
|
47
91
|
*/
|
|
48
|
-
|
|
92
|
+
thumbnail?: SearchAssetSearchResponse.Thumbnail;
|
|
49
93
|
/**
|
|
50
|
-
*
|
|
94
|
+
* Transcription of the asset. Can be either:
|
|
95
|
+
*
|
|
96
|
+
* - Automatically generated transcription for audio assets with speech
|
|
51
97
|
*/
|
|
52
|
-
|
|
98
|
+
transcription?: string;
|
|
53
99
|
}
|
|
54
100
|
export declare namespace SearchAssetSearchResponse {
|
|
55
|
-
|
|
101
|
+
/**
|
|
102
|
+
* Metadata containing detailed information about the asset's properties and
|
|
103
|
+
* generation parameters
|
|
104
|
+
*/
|
|
105
|
+
interface Metadata {
|
|
56
106
|
/**
|
|
57
|
-
*
|
|
107
|
+
* Aspect ratio of the asset (e.g., "1:1", "16:9")
|
|
58
108
|
*/
|
|
59
|
-
|
|
109
|
+
aspectRatio?: string;
|
|
60
110
|
/**
|
|
61
|
-
*
|
|
111
|
+
* ID of the base model used for generation
|
|
62
112
|
*/
|
|
63
|
-
|
|
113
|
+
baseModelId?: string;
|
|
64
114
|
/**
|
|
65
|
-
*
|
|
115
|
+
* Guidance scale used for diffusion models to control prompt adherence
|
|
66
116
|
*/
|
|
67
|
-
|
|
117
|
+
guidance?: number;
|
|
68
118
|
/**
|
|
69
|
-
*
|
|
119
|
+
* Height of the asset in pixels
|
|
70
120
|
*/
|
|
71
|
-
|
|
121
|
+
height?: number;
|
|
72
122
|
/**
|
|
73
|
-
*
|
|
74
|
-
* generation parameters
|
|
123
|
+
* Classification of the asset (e.g., "image", "video")
|
|
75
124
|
*/
|
|
76
|
-
|
|
125
|
+
kind?: string;
|
|
77
126
|
/**
|
|
78
|
-
*
|
|
127
|
+
* ID of the specific model used if asset is model-based
|
|
79
128
|
*/
|
|
80
|
-
|
|
129
|
+
modelId?: string;
|
|
81
130
|
/**
|
|
82
|
-
*
|
|
131
|
+
* Type of model used for generation (e.g., "sd-1_5", "flux.1")
|
|
83
132
|
*/
|
|
84
|
-
|
|
133
|
+
modelType?: string;
|
|
85
134
|
/**
|
|
86
|
-
*
|
|
135
|
+
* Custom name given to the asset
|
|
87
136
|
*/
|
|
88
|
-
|
|
137
|
+
name?: string;
|
|
89
138
|
/**
|
|
90
|
-
*
|
|
139
|
+
* Negative prompt used during generation to specify what to avoid
|
|
91
140
|
*/
|
|
92
|
-
|
|
141
|
+
negativePrompt?: string;
|
|
93
142
|
/**
|
|
94
|
-
*
|
|
143
|
+
* For Flux models: controls the influence of the negative prompt
|
|
95
144
|
*/
|
|
96
|
-
|
|
145
|
+
negativePromptStrength?: number;
|
|
97
146
|
/**
|
|
98
|
-
*
|
|
147
|
+
* Number of inference steps used during generation
|
|
99
148
|
*/
|
|
100
|
-
|
|
149
|
+
numInferenceSteps?: number;
|
|
101
150
|
/**
|
|
102
|
-
*
|
|
103
|
-
* "2025-01-16T11:19:41.579Z")
|
|
151
|
+
* ID of the parent job that created this asset
|
|
104
152
|
*/
|
|
105
|
-
|
|
153
|
+
parentJobId?: string;
|
|
106
154
|
/**
|
|
107
|
-
*
|
|
155
|
+
* Text prompt used to generate the asset
|
|
108
156
|
*/
|
|
109
|
-
|
|
157
|
+
prompt?: string;
|
|
110
158
|
/**
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
* - User-provided description for training images
|
|
114
|
-
* - Automatically generated caption for images and videos assets
|
|
115
|
-
* - Automatically generated description for audio assets
|
|
159
|
+
* Scheduler algorithm used during generation
|
|
116
160
|
*/
|
|
117
|
-
|
|
161
|
+
scheduler?: string;
|
|
118
162
|
/**
|
|
119
|
-
*
|
|
163
|
+
* Random seed used for generation, enables reproducibility
|
|
120
164
|
*/
|
|
121
|
-
|
|
165
|
+
seed?: string;
|
|
122
166
|
/**
|
|
123
|
-
*
|
|
167
|
+
* File size of the asset in bytes
|
|
124
168
|
*/
|
|
125
|
-
|
|
169
|
+
size?: number;
|
|
126
170
|
/**
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
* - Automatically generated transcription for audio assets with speech
|
|
171
|
+
* Text used to generate the asset: mainly for speech to text
|
|
130
172
|
*/
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
namespace Hit {
|
|
173
|
+
text?: string;
|
|
134
174
|
/**
|
|
135
|
-
*
|
|
136
|
-
* generation parameters
|
|
175
|
+
* Thumbnail image information for the asset. Ex. Canvas thumbnail
|
|
137
176
|
*/
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Aspect ratio of the asset (e.g., "1:1", "16:9")
|
|
141
|
-
*/
|
|
142
|
-
aspectRatio?: string;
|
|
143
|
-
/**
|
|
144
|
-
* ID of the base model used for generation
|
|
145
|
-
*/
|
|
146
|
-
baseModelId?: string;
|
|
147
|
-
/**
|
|
148
|
-
* Guidance scale used for diffusion models to control prompt adherence
|
|
149
|
-
*/
|
|
150
|
-
guidance?: number;
|
|
151
|
-
/**
|
|
152
|
-
* Height of the asset in pixels
|
|
153
|
-
*/
|
|
154
|
-
height?: number;
|
|
155
|
-
/**
|
|
156
|
-
* Classification of the asset (e.g., "image", "video")
|
|
157
|
-
*/
|
|
158
|
-
kind?: string;
|
|
159
|
-
/**
|
|
160
|
-
* ID of the specific model used if asset is model-based
|
|
161
|
-
*/
|
|
162
|
-
modelId?: string;
|
|
163
|
-
/**
|
|
164
|
-
* Type of model used for generation (e.g., "sd-1_5", "flux.1")
|
|
165
|
-
*/
|
|
166
|
-
modelType?: string;
|
|
167
|
-
/**
|
|
168
|
-
* Custom name given to the asset
|
|
169
|
-
*/
|
|
170
|
-
name?: string;
|
|
171
|
-
/**
|
|
172
|
-
* Negative prompt used during generation to specify what to avoid
|
|
173
|
-
*/
|
|
174
|
-
negativePrompt?: string;
|
|
175
|
-
/**
|
|
176
|
-
* For Flux models: controls the influence of the negative prompt
|
|
177
|
-
*/
|
|
178
|
-
negativePromptStrength?: number;
|
|
179
|
-
/**
|
|
180
|
-
* Number of inference steps used during generation
|
|
181
|
-
*/
|
|
182
|
-
numInferenceSteps?: number;
|
|
183
|
-
/**
|
|
184
|
-
* ID of the parent job that created this asset
|
|
185
|
-
*/
|
|
186
|
-
parentJobId?: string;
|
|
187
|
-
/**
|
|
188
|
-
* Text prompt used to generate the asset
|
|
189
|
-
*/
|
|
190
|
-
prompt?: string;
|
|
191
|
-
/**
|
|
192
|
-
* Scheduler algorithm used during generation
|
|
193
|
-
*/
|
|
194
|
-
scheduler?: string;
|
|
195
|
-
/**
|
|
196
|
-
* Random seed used for generation, enables reproducibility
|
|
197
|
-
*/
|
|
198
|
-
seed?: string;
|
|
199
|
-
/**
|
|
200
|
-
* File size of the asset in bytes
|
|
201
|
-
*/
|
|
202
|
-
size?: number;
|
|
203
|
-
/**
|
|
204
|
-
* Text used to generate the asset: mainly for speech to text
|
|
205
|
-
*/
|
|
206
|
-
text?: string;
|
|
207
|
-
/**
|
|
208
|
-
* Thumbnail image information for the asset. Ex. Canvas thumbnail
|
|
209
|
-
*/
|
|
210
|
-
thumbnail?: Metadata.Thumbnail;
|
|
211
|
-
/**
|
|
212
|
-
* Specific type/category of the asset (e.g., "canvas", "inference-txt")
|
|
213
|
-
*/
|
|
214
|
-
type?: string;
|
|
215
|
-
/**
|
|
216
|
-
* Width of the asset in pixels
|
|
217
|
-
*/
|
|
218
|
-
width?: number;
|
|
219
|
-
}
|
|
220
|
-
namespace Metadata {
|
|
221
|
-
/**
|
|
222
|
-
* Thumbnail image information for the asset. Ex. Canvas thumbnail
|
|
223
|
-
*/
|
|
224
|
-
interface Thumbnail {
|
|
225
|
-
/**
|
|
226
|
-
* ID of the asset used as thumbnail
|
|
227
|
-
*/
|
|
228
|
-
assetId: string;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
177
|
+
thumbnail?: Metadata.Thumbnail;
|
|
231
178
|
/**
|
|
232
|
-
*
|
|
179
|
+
* Specific type/category of the asset (e.g., "canvas", "inference-txt")
|
|
180
|
+
*/
|
|
181
|
+
type?: string;
|
|
182
|
+
/**
|
|
183
|
+
* Width of the asset in pixels
|
|
184
|
+
*/
|
|
185
|
+
width?: number;
|
|
186
|
+
}
|
|
187
|
+
namespace Metadata {
|
|
188
|
+
/**
|
|
189
|
+
* Thumbnail image information for the asset. Ex. Canvas thumbnail
|
|
233
190
|
*/
|
|
234
191
|
interface Thumbnail {
|
|
235
192
|
/**
|
|
236
193
|
* ID of the asset used as thumbnail
|
|
237
194
|
*/
|
|
238
195
|
assetId: string;
|
|
239
|
-
/**
|
|
240
|
-
* Signed URL of the thumbnail
|
|
241
|
-
*/
|
|
242
|
-
url: string;
|
|
243
196
|
}
|
|
244
197
|
}
|
|
198
|
+
/**
|
|
199
|
+
* Thumbnail preview of the asset 3D, video...
|
|
200
|
+
*/
|
|
201
|
+
interface Thumbnail {
|
|
202
|
+
/**
|
|
203
|
+
* ID of the asset used as thumbnail
|
|
204
|
+
*/
|
|
205
|
+
assetId: string;
|
|
206
|
+
/**
|
|
207
|
+
* Signed URL of the thumbnail
|
|
208
|
+
*/
|
|
209
|
+
url: string;
|
|
210
|
+
}
|
|
245
211
|
}
|
|
246
|
-
/**
|
|
247
|
-
* Search result for model search
|
|
248
|
-
*/
|
|
249
212
|
export interface SearchModelSearchResponse {
|
|
250
|
-
hits: Array<SearchModelSearchResponse.Hit>;
|
|
251
213
|
/**
|
|
252
|
-
*
|
|
214
|
+
* Unique identifier for the model (e.g., "model_GTrL3mq4SXWyMxkOHRxlpw")
|
|
253
215
|
*/
|
|
254
|
-
|
|
216
|
+
id: string;
|
|
255
217
|
/**
|
|
256
|
-
*
|
|
218
|
+
* User ID of the model creator/author
|
|
257
219
|
*/
|
|
258
|
-
|
|
220
|
+
authorId: string;
|
|
259
221
|
/**
|
|
260
|
-
*
|
|
222
|
+
* Array of model capabilities
|
|
261
223
|
*/
|
|
262
|
-
|
|
224
|
+
capabilities: Array<string>;
|
|
263
225
|
/**
|
|
264
|
-
*
|
|
226
|
+
* Array of collection IDs this model belongs to
|
|
265
227
|
*/
|
|
266
|
-
|
|
228
|
+
collectionIds: Array<string>;
|
|
267
229
|
/**
|
|
268
|
-
*
|
|
230
|
+
* Array of concept models associated with this model Each concept contains a
|
|
231
|
+
* reference to its source model
|
|
269
232
|
*/
|
|
270
|
-
|
|
233
|
+
concepts: Array<SearchModelSearchResponse.Concept>;
|
|
234
|
+
/**
|
|
235
|
+
* Creation timestamp in ISO 8601 format (e.g., "2025-01-16T11:19:41.579Z")
|
|
236
|
+
*/
|
|
237
|
+
createdAt: string;
|
|
238
|
+
/**
|
|
239
|
+
* Array of example asset IDs associated with this model
|
|
240
|
+
*/
|
|
241
|
+
exampleAssetIds: Array<string>;
|
|
242
|
+
/**
|
|
243
|
+
* Display name of the model
|
|
244
|
+
*/
|
|
245
|
+
name: string;
|
|
246
|
+
/**
|
|
247
|
+
* Project ID of the model owner
|
|
248
|
+
*/
|
|
249
|
+
ownerId: string;
|
|
250
|
+
/**
|
|
251
|
+
* Privacy setting of the model ("public", "private", or "unlisted")
|
|
252
|
+
*/
|
|
253
|
+
privacy: string;
|
|
254
|
+
/**
|
|
255
|
+
* Short description of the model
|
|
256
|
+
*/
|
|
257
|
+
shortDescription: string;
|
|
258
|
+
/**
|
|
259
|
+
* Source/origin of the model (e.g., "training", "import")
|
|
260
|
+
*/
|
|
261
|
+
source: string;
|
|
262
|
+
/**
|
|
263
|
+
* Array of user-assigned tags for categorization
|
|
264
|
+
*/
|
|
265
|
+
tags: Array<string>;
|
|
266
|
+
/**
|
|
267
|
+
* Team ID of the model owner
|
|
268
|
+
*/
|
|
269
|
+
teamId: string;
|
|
271
270
|
/**
|
|
272
|
-
*
|
|
271
|
+
* Number of images used to train this model
|
|
273
272
|
*/
|
|
274
|
-
|
|
273
|
+
trainingImagesNumber: number;
|
|
275
274
|
/**
|
|
276
|
-
*
|
|
275
|
+
* Type of the model (e.g., "sd-1_5", "flux.1")
|
|
277
276
|
*/
|
|
278
|
-
|
|
277
|
+
type: string;
|
|
278
|
+
/**
|
|
279
|
+
* Last modification timestamp in ISO 8601 format (e.g.,
|
|
280
|
+
* "2025-01-16T11:19:41.579Z")
|
|
281
|
+
*/
|
|
282
|
+
updatedAt: string;
|
|
283
|
+
/**
|
|
284
|
+
* ID of the parent model this model was derived from
|
|
285
|
+
*/
|
|
286
|
+
parentModelId?: string;
|
|
287
|
+
/**
|
|
288
|
+
* Score assigned to the model based on usage and popularity
|
|
289
|
+
*/
|
|
290
|
+
score?: number;
|
|
291
|
+
/**
|
|
292
|
+
* Thumbnail image information for the model
|
|
293
|
+
*/
|
|
294
|
+
thumbnail?: SearchModelSearchResponse.Thumbnail;
|
|
279
295
|
}
|
|
280
296
|
export declare namespace SearchModelSearchResponse {
|
|
281
|
-
interface
|
|
282
|
-
/**
|
|
283
|
-
* Unique identifier for the model (e.g., "model_GTrL3mq4SXWyMxkOHRxlpw")
|
|
284
|
-
*/
|
|
285
|
-
id: string;
|
|
286
|
-
/**
|
|
287
|
-
* User ID of the model creator/author
|
|
288
|
-
*/
|
|
289
|
-
authorId: string;
|
|
290
|
-
/**
|
|
291
|
-
* Array of model capabilities
|
|
292
|
-
*/
|
|
293
|
-
capabilities: Array<string>;
|
|
294
|
-
/**
|
|
295
|
-
* Array of collection IDs this model belongs to
|
|
296
|
-
*/
|
|
297
|
-
collectionIds: Array<string>;
|
|
298
|
-
/**
|
|
299
|
-
* Array of concept models associated with this model Each concept contains a
|
|
300
|
-
* reference to its source model
|
|
301
|
-
*/
|
|
302
|
-
concepts: Array<Hit.Concept>;
|
|
303
|
-
/**
|
|
304
|
-
* Creation timestamp in ISO 8601 format (e.g., "2025-01-16T11:19:41.579Z")
|
|
305
|
-
*/
|
|
306
|
-
createdAt: string;
|
|
307
|
-
/**
|
|
308
|
-
* Array of example asset IDs associated with this model
|
|
309
|
-
*/
|
|
310
|
-
exampleAssetIds: Array<string>;
|
|
311
|
-
/**
|
|
312
|
-
* Display name of the model
|
|
313
|
-
*/
|
|
314
|
-
name: string;
|
|
315
|
-
/**
|
|
316
|
-
* Project ID of the model owner
|
|
317
|
-
*/
|
|
318
|
-
ownerId: string;
|
|
319
|
-
/**
|
|
320
|
-
* Privacy setting of the model ("public", "private", or "unlisted")
|
|
321
|
-
*/
|
|
322
|
-
privacy: string;
|
|
323
|
-
/**
|
|
324
|
-
* Short description of the model
|
|
325
|
-
*/
|
|
326
|
-
shortDescription: string;
|
|
327
|
-
/**
|
|
328
|
-
* Source/origin of the model (e.g., "training", "import")
|
|
329
|
-
*/
|
|
330
|
-
source: string;
|
|
297
|
+
interface Concept {
|
|
331
298
|
/**
|
|
332
|
-
*
|
|
299
|
+
* ID of the concept's source model
|
|
333
300
|
*/
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
* Number of images used to train this model
|
|
341
|
-
*/
|
|
342
|
-
trainingImagesNumber: number;
|
|
343
|
-
/**
|
|
344
|
-
* Type of the model (e.g., "sd-1_5", "flux.1")
|
|
345
|
-
*/
|
|
346
|
-
type: string;
|
|
347
|
-
/**
|
|
348
|
-
* Last modification timestamp in ISO 8601 format (e.g.,
|
|
349
|
-
* "2025-01-16T11:19:41.579Z")
|
|
350
|
-
*/
|
|
351
|
-
updatedAt: string;
|
|
352
|
-
/**
|
|
353
|
-
* ID of the parent model this model was derived from
|
|
354
|
-
*/
|
|
355
|
-
parentModelId?: string;
|
|
356
|
-
/**
|
|
357
|
-
* Score assigned to the model based on usage and popularity
|
|
358
|
-
*/
|
|
359
|
-
score?: number;
|
|
301
|
+
modelId: string;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Thumbnail image information for the model
|
|
305
|
+
*/
|
|
306
|
+
interface Thumbnail {
|
|
360
307
|
/**
|
|
361
|
-
*
|
|
308
|
+
* ID of the asset used as thumbnail
|
|
362
309
|
*/
|
|
363
|
-
|
|
364
|
-
}
|
|
365
|
-
namespace Hit {
|
|
366
|
-
interface Concept {
|
|
367
|
-
/**
|
|
368
|
-
* ID of the concept's source model
|
|
369
|
-
*/
|
|
370
|
-
modelId: string;
|
|
371
|
-
}
|
|
310
|
+
assetId: string;
|
|
372
311
|
/**
|
|
373
|
-
*
|
|
312
|
+
* Signed URL of the thumbnail
|
|
374
313
|
*/
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* ID of the asset used as thumbnail
|
|
378
|
-
*/
|
|
379
|
-
assetId: string;
|
|
380
|
-
/**
|
|
381
|
-
* Signed URL of the thumbnail
|
|
382
|
-
*/
|
|
383
|
-
url: string;
|
|
384
|
-
}
|
|
314
|
+
url: string;
|
|
385
315
|
}
|
|
386
316
|
}
|
|
387
|
-
export interface SearchAssetSearchParams {
|
|
317
|
+
export interface SearchAssetSearchParams extends SearchHitsOffsetParams {
|
|
388
318
|
/**
|
|
389
319
|
* Query param: If set to true, returns the original asset without transformation
|
|
390
320
|
*/
|
|
@@ -420,11 +350,6 @@ export interface SearchAssetSearchParams {
|
|
|
420
350
|
* Body param: Maximum number of documents returned. Must be used with `offset`.
|
|
421
351
|
*/
|
|
422
352
|
limit?: number;
|
|
423
|
-
/**
|
|
424
|
-
* Body param: Number of documents to skip. Must be used with `limit`. Starts
|
|
425
|
-
* from 0.
|
|
426
|
-
*/
|
|
427
|
-
offset?: number;
|
|
428
353
|
/**
|
|
429
354
|
* Body param: Request a specific page of results. Must be used with `hitsPerPage`.
|
|
430
355
|
*/
|
|
@@ -472,7 +397,7 @@ export declare namespace SearchAssetSearchParams {
|
|
|
472
397
|
unlike?: Array<string>;
|
|
473
398
|
}
|
|
474
399
|
}
|
|
475
|
-
export interface SearchModelSearchParams {
|
|
400
|
+
export interface SearchModelSearchParams extends SearchHitsOffsetParams {
|
|
476
401
|
/**
|
|
477
402
|
* Query param: If set to true, returns the original asset without transformation
|
|
478
403
|
*/
|
|
@@ -512,11 +437,6 @@ export interface SearchModelSearchParams {
|
|
|
512
437
|
* Body param: Maximum number of documents returned. Must be used with `offset`.
|
|
513
438
|
*/
|
|
514
439
|
limit?: number;
|
|
515
|
-
/**
|
|
516
|
-
* Body param: Number of documents to skip. Must be used with `limit`. Starts
|
|
517
|
-
* from 0.
|
|
518
|
-
*/
|
|
519
|
-
offset?: number;
|
|
520
440
|
/**
|
|
521
441
|
* Body param: Request a specific page of results. Must be used with `hitsPerPage`.
|
|
522
442
|
*/
|
|
@@ -565,6 +485,6 @@ export declare namespace SearchModelSearchParams {
|
|
|
565
485
|
}
|
|
566
486
|
}
|
|
567
487
|
export declare namespace Search {
|
|
568
|
-
export { type SearchAssetSearchResponse as SearchAssetSearchResponse, type SearchModelSearchResponse as SearchModelSearchResponse, type SearchAssetSearchParams as SearchAssetSearchParams, type SearchModelSearchParams as SearchModelSearchParams, };
|
|
488
|
+
export { type SearchAssetSearchResponse as SearchAssetSearchResponse, type SearchModelSearchResponse as SearchModelSearchResponse, type SearchAssetSearchResponsesSearchHitsOffset as SearchAssetSearchResponsesSearchHitsOffset, type SearchModelSearchResponsesSearchHitsOffset as SearchModelSearchResponsesSearchHitsOffset, type SearchAssetSearchParams as SearchAssetSearchParams, type SearchModelSearchParams as SearchModelSearchParams, };
|
|
569
489
|
}
|
|
570
490
|
//# sourceMappingURL=search.d.mts.map
|