@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.
Files changed (218) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +44 -8
  3. package/client.d.mts +36 -16
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +36 -16
  6. package/client.d.ts.map +1 -1
  7. package/client.js +21 -11
  8. package/client.js.map +1 -1
  9. package/client.mjs +21 -11
  10. package/client.mjs.map +1 -1
  11. package/core/pagination.d.mts +153 -0
  12. package/core/pagination.d.mts.map +1 -0
  13. package/core/pagination.d.ts +153 -0
  14. package/core/pagination.d.ts.map +1 -0
  15. package/core/pagination.js +276 -0
  16. package/core/pagination.js.map +1 -0
  17. package/core/pagination.mjs +263 -0
  18. package/core/pagination.mjs.map +1 -0
  19. package/index.d.mts +3 -0
  20. package/index.d.mts.map +1 -1
  21. package/index.d.ts +3 -0
  22. package/index.d.ts.map +1 -1
  23. package/index.js +9 -1
  24. package/index.js.map +1 -1
  25. package/index.mjs +3 -0
  26. package/index.mjs.map +1 -1
  27. package/internal/request-options.d.mts +1 -1
  28. package/internal/request-options.d.mts.map +1 -1
  29. package/internal/request-options.d.ts +1 -1
  30. package/internal/request-options.d.ts.map +1 -1
  31. package/lib/models.d.mts +34 -2
  32. package/lib/models.d.mts.map +1 -1
  33. package/lib/models.d.ts +34 -2
  34. package/lib/models.d.ts.map +1 -1
  35. package/lib/models.js +39 -2
  36. package/lib/models.js.map +1 -1
  37. package/lib/models.mjs +37 -1
  38. package/lib/models.mjs.map +1 -1
  39. package/lib/scenario.d.mts +2 -0
  40. package/lib/scenario.d.mts.map +1 -1
  41. package/lib/scenario.d.ts +2 -0
  42. package/lib/scenario.d.ts.map +1 -1
  43. package/lib/scenario.js +2 -0
  44. package/lib/scenario.js.map +1 -1
  45. package/lib/scenario.mjs +2 -0
  46. package/lib/scenario.mjs.map +1 -1
  47. package/lib/upload.d.mts +89 -0
  48. package/lib/upload.d.mts.map +1 -0
  49. package/lib/upload.d.ts +89 -0
  50. package/lib/upload.d.ts.map +1 -0
  51. package/lib/upload.js +193 -0
  52. package/lib/upload.js.map +1 -0
  53. package/lib/upload.mjs +156 -0
  54. package/lib/upload.mjs.map +1 -0
  55. package/lib/workflow.d.mts +19 -3
  56. package/lib/workflow.d.mts.map +1 -1
  57. package/lib/workflow.d.ts +19 -3
  58. package/lib/workflow.d.ts.map +1 -1
  59. package/lib/workflow.js +26 -5
  60. package/lib/workflow.js.map +1 -1
  61. package/lib/workflow.mjs +26 -5
  62. package/lib/workflow.mjs.map +1 -1
  63. package/lib/workflow_import_validator.d.mts +40 -0
  64. package/lib/workflow_import_validator.d.mts.map +1 -0
  65. package/lib/workflow_import_validator.d.ts +40 -0
  66. package/lib/workflow_import_validator.d.ts.map +1 -0
  67. package/lib/workflow_import_validator.js +69 -0
  68. package/lib/workflow_import_validator.js.map +1 -0
  69. package/lib/workflow_import_validator.mjs +64 -0
  70. package/lib/workflow_import_validator.mjs.map +1 -0
  71. package/lib/workflow_validator.d.mts +22 -0
  72. package/lib/workflow_validator.d.mts.map +1 -0
  73. package/lib/workflow_validator.d.ts +22 -0
  74. package/lib/workflow_validator.d.ts.map +1 -0
  75. package/lib/workflow_validator.js +124 -0
  76. package/lib/workflow_validator.js.map +1 -0
  77. package/lib/workflow_validator.mjs +121 -0
  78. package/lib/workflow_validator.mjs.map +1 -0
  79. package/package.json +11 -1
  80. package/pagination.d.mts +2 -0
  81. package/pagination.d.mts.map +1 -0
  82. package/pagination.d.ts +2 -0
  83. package/pagination.d.ts.map +1 -0
  84. package/pagination.js +6 -0
  85. package/pagination.js.map +1 -0
  86. package/pagination.mjs +2 -0
  87. package/pagination.mjs.map +1 -0
  88. package/resources/assets/assets.d.mts +631 -648
  89. package/resources/assets/assets.d.mts.map +1 -1
  90. package/resources/assets/assets.d.ts +631 -648
  91. package/resources/assets/assets.d.ts.map +1 -1
  92. package/resources/assets/assets.js +5 -4
  93. package/resources/assets/assets.js.map +1 -1
  94. package/resources/assets/assets.mjs +5 -4
  95. package/resources/assets/assets.mjs.map +1 -1
  96. package/resources/assets/index.d.mts +1 -1
  97. package/resources/assets/index.d.mts.map +1 -1
  98. package/resources/assets/index.d.ts +1 -1
  99. package/resources/assets/index.d.ts.map +1 -1
  100. package/resources/assets/index.js.map +1 -1
  101. package/resources/assets/index.mjs.map +1 -1
  102. package/resources/collections/assets.d.mts +8 -2
  103. package/resources/collections/assets.d.mts.map +1 -1
  104. package/resources/collections/assets.d.ts +8 -2
  105. package/resources/collections/assets.d.ts.map +1 -1
  106. package/resources/collections/assets.js +2 -2
  107. package/resources/collections/assets.js.map +1 -1
  108. package/resources/collections/assets.mjs +2 -2
  109. package/resources/collections/assets.mjs.map +1 -1
  110. package/resources/collections/collections.d.mts +42 -53
  111. package/resources/collections/collections.d.mts.map +1 -1
  112. package/resources/collections/collections.d.ts +42 -53
  113. package/resources/collections/collections.d.ts.map +1 -1
  114. package/resources/collections/collections.js +5 -1
  115. package/resources/collections/collections.js.map +1 -1
  116. package/resources/collections/collections.mjs +5 -1
  117. package/resources/collections/collections.mjs.map +1 -1
  118. package/resources/collections/index.d.mts +3 -3
  119. package/resources/collections/index.d.mts.map +1 -1
  120. package/resources/collections/index.d.ts +3 -3
  121. package/resources/collections/index.d.ts.map +1 -1
  122. package/resources/collections/index.js.map +1 -1
  123. package/resources/collections/index.mjs +2 -2
  124. package/resources/collections/index.mjs.map +1 -1
  125. package/resources/collections/models.d.mts +8 -2
  126. package/resources/collections/models.d.mts.map +1 -1
  127. package/resources/collections/models.d.ts +8 -2
  128. package/resources/collections/models.d.ts.map +1 -1
  129. package/resources/collections/models.js +2 -2
  130. package/resources/collections/models.js.map +1 -1
  131. package/resources/collections/models.mjs +2 -2
  132. package/resources/collections/models.mjs.map +1 -1
  133. package/resources/index.d.mts +7 -7
  134. package/resources/index.d.mts.map +1 -1
  135. package/resources/index.d.ts +7 -7
  136. package/resources/index.d.ts.map +1 -1
  137. package/resources/index.js.map +1 -1
  138. package/resources/index.mjs.map +1 -1
  139. package/resources/jobs.d.mts +369 -380
  140. package/resources/jobs.d.mts.map +1 -1
  141. package/resources/jobs.d.ts +369 -380
  142. package/resources/jobs.d.ts.map +1 -1
  143. package/resources/jobs.js +2 -1
  144. package/resources/jobs.js.map +1 -1
  145. package/resources/jobs.mjs +2 -1
  146. package/resources/jobs.mjs.map +1 -1
  147. package/resources/models/index.d.mts +1 -1
  148. package/resources/models/index.d.mts.map +1 -1
  149. package/resources/models/index.d.ts +1 -1
  150. package/resources/models/index.d.ts.map +1 -1
  151. package/resources/models/index.js.map +1 -1
  152. package/resources/models/index.mjs.map +1 -1
  153. package/resources/models/models.d.mts +956 -967
  154. package/resources/models/models.d.mts.map +1 -1
  155. package/resources/models/models.d.ts +956 -967
  156. package/resources/models/models.d.ts.map +1 -1
  157. package/resources/models/models.js +2 -1
  158. package/resources/models/models.js.map +1 -1
  159. package/resources/models/models.mjs +2 -1
  160. package/resources/models/models.mjs.map +1 -1
  161. package/resources/models/train.d.mts +38 -38
  162. package/resources/models/train.d.mts.map +1 -1
  163. package/resources/models/train.d.ts +38 -38
  164. package/resources/models/train.d.ts.map +1 -1
  165. package/resources/search.d.mts +215 -295
  166. package/resources/search.d.mts.map +1 -1
  167. package/resources/search.d.ts +215 -295
  168. package/resources/search.d.ts.map +1 -1
  169. package/resources/search.js +9 -2
  170. package/resources/search.js.map +1 -1
  171. package/resources/search.mjs +9 -2
  172. package/resources/search.mjs.map +1 -1
  173. package/resources/tags.d.mts +23 -35
  174. package/resources/tags.d.mts.map +1 -1
  175. package/resources/tags.d.ts +23 -35
  176. package/resources/tags.d.ts.map +1 -1
  177. package/resources/tags.js +2 -1
  178. package/resources/tags.js.map +1 -1
  179. package/resources/tags.mjs +2 -1
  180. package/resources/tags.mjs.map +1 -1
  181. package/resources/workflows.d.mts +688 -704
  182. package/resources/workflows.d.mts.map +1 -1
  183. package/resources/workflows.d.ts +688 -704
  184. package/resources/workflows.d.ts.map +1 -1
  185. package/resources/workflows.js +5 -1
  186. package/resources/workflows.js.map +1 -1
  187. package/resources/workflows.mjs +5 -1
  188. package/resources/workflows.mjs.map +1 -1
  189. package/src/client.ts +118 -15
  190. package/src/core/pagination.ts +497 -0
  191. package/src/index.ts +9 -0
  192. package/src/internal/request-options.ts +1 -1
  193. package/src/lib/models.ts +62 -2
  194. package/src/lib/scenario.ts +2 -0
  195. package/src/lib/upload.ts +250 -0
  196. package/src/lib/workflow.ts +39 -5
  197. package/src/lib/workflow_import_validator.ts +104 -0
  198. package/src/lib/workflow_validator.ts +167 -0
  199. package/src/pagination.ts +2 -0
  200. package/src/resources/assets/assets.ts +971 -905
  201. package/src/resources/assets/index.ts +3 -0
  202. package/src/resources/collections/assets.ts +14 -2
  203. package/src/resources/collections/collections.ts +49 -56
  204. package/src/resources/collections/index.ts +15 -2
  205. package/src/resources/collections/models.ts +14 -2
  206. package/src/resources/index.ts +10 -1
  207. package/src/resources/jobs.ts +613 -622
  208. package/src/resources/models/index.ts +1 -0
  209. package/src/resources/models/models.ts +1118 -1130
  210. package/src/resources/models/train.ts +40 -40
  211. package/src/resources/search.ts +239 -327
  212. package/src/resources/tags.ts +32 -39
  213. package/src/resources/workflows.ts +850 -864
  214. package/src/version.ts +1 -1
  215. package/version.d.mts +1 -1
  216. package/version.d.ts +1 -1
  217. package/version.js +1 -1
  218. package/version.mjs +1 -1
@@ -1,7 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
- import { APIPromise } from '../core/api-promise';
4
+ import { PagePromise, SearchHitsOffset, type SearchHitsOffsetParams } from '../core/pagination';
5
5
  import { RequestOptions } from '../internal/request-options';
6
6
 
7
7
  export class Search extends APIResource {
@@ -14,9 +14,14 @@ export class Search extends APIResource {
14
14
  assetSearch(
15
15
  params: SearchAssetSearchParams,
16
16
  options?: RequestOptions,
17
- ): APIPromise<SearchAssetSearchResponse> {
17
+ ): PagePromise<SearchAssetSearchResponsesSearchHitsOffset, SearchAssetSearchResponse> {
18
18
  const { originalAssets, ...body } = params;
19
- return this._client.post('/search/assets', { query: { originalAssets }, body, ...options });
19
+ return this._client.getAPIList('/search/assets', SearchHitsOffset<SearchAssetSearchResponse>, {
20
+ query: { originalAssets },
21
+ body,
22
+ method: 'post',
23
+ ...options,
24
+ });
20
25
  }
21
26
 
22
27
  /**
@@ -28,463 +33,380 @@ export class Search extends APIResource {
28
33
  modelSearch(
29
34
  params: SearchModelSearchParams,
30
35
  options?: RequestOptions,
31
- ): APIPromise<SearchModelSearchResponse> {
36
+ ): PagePromise<SearchModelSearchResponsesSearchHitsOffset, SearchModelSearchResponse> {
32
37
  const { originalAssets, originalModels, ...body } = params;
33
- return this._client.post('/search/models', {
38
+ return this._client.getAPIList('/search/models', SearchHitsOffset<SearchModelSearchResponse>, {
34
39
  query: { originalAssets, originalModels },
35
40
  body,
41
+ method: 'post',
36
42
  ...options,
37
43
  });
38
44
  }
39
45
  }
40
46
 
41
- /**
42
- * Search result for asset search
43
- */
47
+ export type SearchAssetSearchResponsesSearchHitsOffset = SearchHitsOffset<SearchAssetSearchResponse>;
48
+
49
+ export type SearchModelSearchResponsesSearchHitsOffset = SearchHitsOffset<SearchModelSearchResponse>;
50
+
44
51
  export interface SearchAssetSearchResponse {
45
- hits: Array<SearchAssetSearchResponse.Hit>;
52
+ /**
53
+ * Unique identifier for the asset (e.g., "asset_GTrL3mq4SXWyMxkOHRxlpw")
54
+ */
55
+ id: string;
46
56
 
47
57
  /**
48
- * Maximum number of documents returned
58
+ * User ID of the asset creator/author
49
59
  */
50
- limit: number;
60
+ authorId: string;
51
61
 
52
62
  /**
53
- * Number of documents skipped
63
+ * Array of collection IDs this asset belongs to
54
64
  */
55
- offset: number;
65
+ collectionIds: Array<string>;
56
66
 
57
67
  /**
58
- * Estimated total number of hits
68
+ * Creation timestamp in ISO 8601 format (e.g., "2025-01-16T11:19:41.579Z")
59
69
  */
60
- estimatedTotalHits?: number;
70
+ createdAt: string;
61
71
 
62
72
  /**
63
- * Number of results on each page
73
+ * Metadata containing detailed information about the asset's properties and
74
+ * generation parameters
64
75
  */
65
- hitsPerPage?: number;
76
+ metadata: SearchAssetSearchResponse.Metadata;
66
77
 
67
78
  /**
68
- * Current search results page
79
+ * MIME type of the asset (e.g., "image/png", "image/jpeg")
69
80
  */
70
- page?: number;
81
+ mimeType: string;
82
+
83
+ /**
84
+ * Array of detected NSFW categories
85
+ */
86
+ nsfw: Array<string>;
87
+
88
+ /**
89
+ * Project ID of the asset owner
90
+ */
91
+ ownerId: string;
92
+
93
+ /**
94
+ * Privacy setting of the asset ("public", "private", or "unlisted")
95
+ */
96
+ privacy: string;
97
+
98
+ /**
99
+ * Array of user-assigned tags for categorization
100
+ */
101
+ tags: Array<string>;
102
+
103
+ /**
104
+ * Team ID of the asset owner
105
+ */
106
+ teamId: string;
107
+
108
+ /**
109
+ * Last modification timestamp in ISO 8601 format (e.g.,
110
+ * "2025-01-16T11:19:41.579Z")
111
+ */
112
+ updatedAt: string;
113
+
114
+ /**
115
+ * Signed URL of the asset
116
+ */
117
+ url: string;
118
+
119
+ /**
120
+ * Textual description of the asset. Can be either:
121
+ *
122
+ * - User-provided description for training images
123
+ * - Automatically generated caption for images and videos assets
124
+ * - Automatically generated description for audio assets
125
+ */
126
+ description?: string;
127
+
128
+ /**
129
+ * Score assigned to the asset based on usage and popularity
130
+ */
131
+ score?: number;
71
132
 
72
133
  /**
73
- * Exhaustive total number of matches
134
+ * Thumbnail preview of the asset 3D, video...
74
135
  */
75
- totalHits?: number;
136
+ thumbnail?: SearchAssetSearchResponse.Thumbnail;
76
137
 
77
138
  /**
78
- * Exhaustive total number of search result pages
139
+ * Transcription of the asset. Can be either:
140
+ *
141
+ * - Automatically generated transcription for audio assets with speech
79
142
  */
80
- totalPages?: number;
143
+ transcription?: string;
81
144
  }
82
145
 
83
146
  export namespace SearchAssetSearchResponse {
84
- export interface Hit {
147
+ /**
148
+ * Metadata containing detailed information about the asset's properties and
149
+ * generation parameters
150
+ */
151
+ export interface Metadata {
85
152
  /**
86
- * Unique identifier for the asset (e.g., "asset_GTrL3mq4SXWyMxkOHRxlpw")
153
+ * Aspect ratio of the asset (e.g., "1:1", "16:9")
87
154
  */
88
- id: string;
155
+ aspectRatio?: string;
89
156
 
90
157
  /**
91
- * User ID of the asset creator/author
158
+ * ID of the base model used for generation
92
159
  */
93
- authorId: string;
160
+ baseModelId?: string;
94
161
 
95
162
  /**
96
- * Array of collection IDs this asset belongs to
163
+ * Guidance scale used for diffusion models to control prompt adherence
97
164
  */
98
- collectionIds: Array<string>;
165
+ guidance?: number;
99
166
 
100
167
  /**
101
- * Creation timestamp in ISO 8601 format (e.g., "2025-01-16T11:19:41.579Z")
168
+ * Height of the asset in pixels
102
169
  */
103
- createdAt: string;
170
+ height?: number;
104
171
 
105
172
  /**
106
- * Metadata containing detailed information about the asset's properties and
107
- * generation parameters
173
+ * Classification of the asset (e.g., "image", "video")
108
174
  */
109
- metadata: Hit.Metadata;
175
+ kind?: string;
110
176
 
111
177
  /**
112
- * MIME type of the asset (e.g., "image/png", "image/jpeg")
178
+ * ID of the specific model used if asset is model-based
113
179
  */
114
- mimeType: string;
180
+ modelId?: string;
115
181
 
116
182
  /**
117
- * Array of detected NSFW categories
183
+ * Type of model used for generation (e.g., "sd-1_5", "flux.1")
118
184
  */
119
- nsfw: Array<string>;
185
+ modelType?: string;
120
186
 
121
187
  /**
122
- * Project ID of the asset owner
188
+ * Custom name given to the asset
123
189
  */
124
- ownerId: string;
190
+ name?: string;
125
191
 
126
192
  /**
127
- * Privacy setting of the asset ("public", "private", or "unlisted")
193
+ * Negative prompt used during generation to specify what to avoid
128
194
  */
129
- privacy: string;
195
+ negativePrompt?: string;
130
196
 
131
197
  /**
132
- * Array of user-assigned tags for categorization
198
+ * For Flux models: controls the influence of the negative prompt
133
199
  */
134
- tags: Array<string>;
200
+ negativePromptStrength?: number;
135
201
 
136
202
  /**
137
- * Team ID of the asset owner
203
+ * Number of inference steps used during generation
138
204
  */
139
- teamId: string;
205
+ numInferenceSteps?: number;
140
206
 
141
207
  /**
142
- * Last modification timestamp in ISO 8601 format (e.g.,
143
- * "2025-01-16T11:19:41.579Z")
208
+ * ID of the parent job that created this asset
144
209
  */
145
- updatedAt: string;
210
+ parentJobId?: string;
146
211
 
147
212
  /**
148
- * Signed URL of the asset
213
+ * Text prompt used to generate the asset
149
214
  */
150
- url: string;
215
+ prompt?: string;
151
216
 
152
217
  /**
153
- * Textual description of the asset. Can be either:
154
- *
155
- * - User-provided description for training images
156
- * - Automatically generated caption for images and videos assets
157
- * - Automatically generated description for audio assets
218
+ * Scheduler algorithm used during generation
158
219
  */
159
- description?: string;
220
+ scheduler?: string;
160
221
 
161
222
  /**
162
- * Score assigned to the asset based on usage and popularity
223
+ * Random seed used for generation, enables reproducibility
163
224
  */
164
- score?: number;
225
+ seed?: string;
165
226
 
166
227
  /**
167
- * Thumbnail preview of the asset 3D, video...
228
+ * File size of the asset in bytes
168
229
  */
169
- thumbnail?: Hit.Thumbnail;
230
+ size?: number;
170
231
 
171
232
  /**
172
- * Transcription of the asset. Can be either:
173
- *
174
- * - Automatically generated transcription for audio assets with speech
233
+ * Text used to generate the asset: mainly for speech to text
175
234
  */
176
- transcription?: string;
177
- }
235
+ text?: string;
178
236
 
179
- export namespace Hit {
180
237
  /**
181
- * Metadata containing detailed information about the asset's properties and
182
- * generation parameters
238
+ * Thumbnail image information for the asset. Ex. Canvas thumbnail
183
239
  */
184
- export interface Metadata {
185
- /**
186
- * Aspect ratio of the asset (e.g., "1:1", "16:9")
187
- */
188
- aspectRatio?: string;
189
-
190
- /**
191
- * ID of the base model used for generation
192
- */
193
- baseModelId?: string;
240
+ thumbnail?: Metadata.Thumbnail;
194
241
 
195
- /**
196
- * Guidance scale used for diffusion models to control prompt adherence
197
- */
198
- guidance?: number;
199
-
200
- /**
201
- * Height of the asset in pixels
202
- */
203
- height?: number;
204
-
205
- /**
206
- * Classification of the asset (e.g., "image", "video")
207
- */
208
- kind?: string;
209
-
210
- /**
211
- * ID of the specific model used if asset is model-based
212
- */
213
- modelId?: string;
214
-
215
- /**
216
- * Type of model used for generation (e.g., "sd-1_5", "flux.1")
217
- */
218
- modelType?: string;
219
-
220
- /**
221
- * Custom name given to the asset
222
- */
223
- name?: string;
224
-
225
- /**
226
- * Negative prompt used during generation to specify what to avoid
227
- */
228
- negativePrompt?: string;
229
-
230
- /**
231
- * For Flux models: controls the influence of the negative prompt
232
- */
233
- negativePromptStrength?: number;
234
-
235
- /**
236
- * Number of inference steps used during generation
237
- */
238
- numInferenceSteps?: number;
239
-
240
- /**
241
- * ID of the parent job that created this asset
242
- */
243
- parentJobId?: string;
244
-
245
- /**
246
- * Text prompt used to generate the asset
247
- */
248
- prompt?: string;
249
-
250
- /**
251
- * Scheduler algorithm used during generation
252
- */
253
- scheduler?: string;
254
-
255
- /**
256
- * Random seed used for generation, enables reproducibility
257
- */
258
- seed?: string;
259
-
260
- /**
261
- * File size of the asset in bytes
262
- */
263
- size?: number;
264
-
265
- /**
266
- * Text used to generate the asset: mainly for speech to text
267
- */
268
- text?: string;
269
-
270
- /**
271
- * Thumbnail image information for the asset. Ex. Canvas thumbnail
272
- */
273
- thumbnail?: Metadata.Thumbnail;
274
-
275
- /**
276
- * Specific type/category of the asset (e.g., "canvas", "inference-txt")
277
- */
278
- type?: string;
279
-
280
- /**
281
- * Width of the asset in pixels
282
- */
283
- width?: number;
284
- }
242
+ /**
243
+ * Specific type/category of the asset (e.g., "canvas", "inference-txt")
244
+ */
245
+ type?: string;
285
246
 
286
- export namespace Metadata {
287
- /**
288
- * Thumbnail image information for the asset. Ex. Canvas thumbnail
289
- */
290
- export interface Thumbnail {
291
- /**
292
- * ID of the asset used as thumbnail
293
- */
294
- assetId: string;
295
- }
296
- }
247
+ /**
248
+ * Width of the asset in pixels
249
+ */
250
+ width?: number;
251
+ }
297
252
 
253
+ export namespace Metadata {
298
254
  /**
299
- * Thumbnail preview of the asset 3D, video...
255
+ * Thumbnail image information for the asset. Ex. Canvas thumbnail
300
256
  */
301
257
  export interface Thumbnail {
302
258
  /**
303
259
  * ID of the asset used as thumbnail
304
260
  */
305
261
  assetId: string;
306
-
307
- /**
308
- * Signed URL of the thumbnail
309
- */
310
- url: string;
311
262
  }
312
263
  }
264
+
265
+ /**
266
+ * Thumbnail preview of the asset 3D, video...
267
+ */
268
+ export interface Thumbnail {
269
+ /**
270
+ * ID of the asset used as thumbnail
271
+ */
272
+ assetId: string;
273
+
274
+ /**
275
+ * Signed URL of the thumbnail
276
+ */
277
+ url: string;
278
+ }
313
279
  }
314
280
 
315
- /**
316
- * Search result for model search
317
- */
318
281
  export interface SearchModelSearchResponse {
319
- hits: Array<SearchModelSearchResponse.Hit>;
320
-
321
282
  /**
322
- * Maximum number of documents returned
283
+ * Unique identifier for the model (e.g., "model_GTrL3mq4SXWyMxkOHRxlpw")
323
284
  */
324
- limit: number;
285
+ id: string;
325
286
 
326
287
  /**
327
- * Number of documents skipped
288
+ * User ID of the model creator/author
328
289
  */
329
- offset: number;
290
+ authorId: string;
330
291
 
331
292
  /**
332
- * Estimated total number of hits
293
+ * Array of model capabilities
333
294
  */
334
- estimatedTotalHits?: number;
295
+ capabilities: Array<string>;
335
296
 
336
297
  /**
337
- * Number of results on each page
298
+ * Array of collection IDs this model belongs to
338
299
  */
339
- hitsPerPage?: number;
300
+ collectionIds: Array<string>;
340
301
 
341
302
  /**
342
- * Current search results page
303
+ * Array of concept models associated with this model Each concept contains a
304
+ * reference to its source model
343
305
  */
344
- page?: number;
306
+ concepts: Array<SearchModelSearchResponse.Concept>;
345
307
 
346
308
  /**
347
- * Exhaustive total number of matches
309
+ * Creation timestamp in ISO 8601 format (e.g., "2025-01-16T11:19:41.579Z")
348
310
  */
349
- totalHits?: number;
311
+ createdAt: string;
350
312
 
351
313
  /**
352
- * Exhaustive total number of search result pages
314
+ * Array of example asset IDs associated with this model
353
315
  */
354
- totalPages?: number;
355
- }
356
-
357
- export namespace SearchModelSearchResponse {
358
- export interface Hit {
359
- /**
360
- * Unique identifier for the model (e.g., "model_GTrL3mq4SXWyMxkOHRxlpw")
361
- */
362
- id: string;
363
-
364
- /**
365
- * User ID of the model creator/author
366
- */
367
- authorId: string;
368
-
369
- /**
370
- * Array of model capabilities
371
- */
372
- capabilities: Array<string>;
373
-
374
- /**
375
- * Array of collection IDs this model belongs to
376
- */
377
- collectionIds: Array<string>;
316
+ exampleAssetIds: Array<string>;
378
317
 
379
- /**
380
- * Array of concept models associated with this model Each concept contains a
381
- * reference to its source model
382
- */
383
- concepts: Array<Hit.Concept>;
384
-
385
- /**
386
- * Creation timestamp in ISO 8601 format (e.g., "2025-01-16T11:19:41.579Z")
387
- */
388
- createdAt: string;
318
+ /**
319
+ * Display name of the model
320
+ */
321
+ name: string;
389
322
 
390
- /**
391
- * Array of example asset IDs associated with this model
392
- */
393
- exampleAssetIds: Array<string>;
323
+ /**
324
+ * Project ID of the model owner
325
+ */
326
+ ownerId: string;
394
327
 
395
- /**
396
- * Display name of the model
397
- */
398
- name: string;
328
+ /**
329
+ * Privacy setting of the model ("public", "private", or "unlisted")
330
+ */
331
+ privacy: string;
399
332
 
400
- /**
401
- * Project ID of the model owner
402
- */
403
- ownerId: string;
333
+ /**
334
+ * Short description of the model
335
+ */
336
+ shortDescription: string;
404
337
 
405
- /**
406
- * Privacy setting of the model ("public", "private", or "unlisted")
407
- */
408
- privacy: string;
338
+ /**
339
+ * Source/origin of the model (e.g., "training", "import")
340
+ */
341
+ source: string;
409
342
 
410
- /**
411
- * Short description of the model
412
- */
413
- shortDescription: string;
343
+ /**
344
+ * Array of user-assigned tags for categorization
345
+ */
346
+ tags: Array<string>;
414
347
 
415
- /**
416
- * Source/origin of the model (e.g., "training", "import")
417
- */
418
- source: string;
348
+ /**
349
+ * Team ID of the model owner
350
+ */
351
+ teamId: string;
419
352
 
420
- /**
421
- * Array of user-assigned tags for categorization
422
- */
423
- tags: Array<string>;
353
+ /**
354
+ * Number of images used to train this model
355
+ */
356
+ trainingImagesNumber: number;
424
357
 
425
- /**
426
- * Team ID of the model owner
427
- */
428
- teamId: string;
358
+ /**
359
+ * Type of the model (e.g., "sd-1_5", "flux.1")
360
+ */
361
+ type: string;
429
362
 
430
- /**
431
- * Number of images used to train this model
432
- */
433
- trainingImagesNumber: number;
363
+ /**
364
+ * Last modification timestamp in ISO 8601 format (e.g.,
365
+ * "2025-01-16T11:19:41.579Z")
366
+ */
367
+ updatedAt: string;
434
368
 
435
- /**
436
- * Type of the model (e.g., "sd-1_5", "flux.1")
437
- */
438
- type: string;
369
+ /**
370
+ * ID of the parent model this model was derived from
371
+ */
372
+ parentModelId?: string;
439
373
 
440
- /**
441
- * Last modification timestamp in ISO 8601 format (e.g.,
442
- * "2025-01-16T11:19:41.579Z")
443
- */
444
- updatedAt: string;
374
+ /**
375
+ * Score assigned to the model based on usage and popularity
376
+ */
377
+ score?: number;
445
378
 
446
- /**
447
- * ID of the parent model this model was derived from
448
- */
449
- parentModelId?: string;
379
+ /**
380
+ * Thumbnail image information for the model
381
+ */
382
+ thumbnail?: SearchModelSearchResponse.Thumbnail;
383
+ }
450
384
 
385
+ export namespace SearchModelSearchResponse {
386
+ export interface Concept {
451
387
  /**
452
- * Score assigned to the model based on usage and popularity
388
+ * ID of the concept's source model
453
389
  */
454
- score?: number;
390
+ modelId: string;
391
+ }
455
392
 
393
+ /**
394
+ * Thumbnail image information for the model
395
+ */
396
+ export interface Thumbnail {
456
397
  /**
457
- * Thumbnail image information for the model
398
+ * ID of the asset used as thumbnail
458
399
  */
459
- thumbnail?: Hit.Thumbnail;
460
- }
461
-
462
- export namespace Hit {
463
- export interface Concept {
464
- /**
465
- * ID of the concept's source model
466
- */
467
- modelId: string;
468
- }
400
+ assetId: string;
469
401
 
470
402
  /**
471
- * Thumbnail image information for the model
403
+ * Signed URL of the thumbnail
472
404
  */
473
- export interface Thumbnail {
474
- /**
475
- * ID of the asset used as thumbnail
476
- */
477
- assetId: string;
478
-
479
- /**
480
- * Signed URL of the thumbnail
481
- */
482
- url: string;
483
- }
405
+ url: string;
484
406
  }
485
407
  }
486
408
 
487
- export interface SearchAssetSearchParams {
409
+ export interface SearchAssetSearchParams extends SearchHitsOffsetParams {
488
410
  /**
489
411
  * Query param: If set to true, returns the original asset without transformation
490
412
  */
@@ -527,12 +449,6 @@ export interface SearchAssetSearchParams {
527
449
  */
528
450
  limit?: number;
529
451
 
530
- /**
531
- * Body param: Number of documents to skip. Must be used with `limit`. Starts
532
- * from 0.
533
- */
534
- offset?: number;
535
-
536
452
  /**
537
453
  * Body param: Request a specific page of results. Must be used with `hitsPerPage`.
538
454
  */
@@ -587,7 +503,7 @@ export namespace SearchAssetSearchParams {
587
503
  }
588
504
  }
589
505
 
590
- export interface SearchModelSearchParams {
506
+ export interface SearchModelSearchParams extends SearchHitsOffsetParams {
591
507
  /**
592
508
  * Query param: If set to true, returns the original asset without transformation
593
509
  */
@@ -635,12 +551,6 @@ export interface SearchModelSearchParams {
635
551
  */
636
552
  limit?: number;
637
553
 
638
- /**
639
- * Body param: Number of documents to skip. Must be used with `limit`. Starts
640
- * from 0.
641
- */
642
- offset?: number;
643
-
644
554
  /**
645
555
  * Body param: Request a specific page of results. Must be used with `hitsPerPage`.
646
556
  */
@@ -699,6 +609,8 @@ export declare namespace Search {
699
609
  export {
700
610
  type SearchAssetSearchResponse as SearchAssetSearchResponse,
701
611
  type SearchModelSearchResponse as SearchModelSearchResponse,
612
+ type SearchAssetSearchResponsesSearchHitsOffset as SearchAssetSearchResponsesSearchHitsOffset,
613
+ type SearchModelSearchResponsesSearchHitsOffset as SearchModelSearchResponsesSearchHitsOffset,
702
614
  type SearchAssetSearchParams as SearchAssetSearchParams,
703
615
  type SearchModelSearchParams as SearchModelSearchParams,
704
616
  };