@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.
Files changed (232) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +40 -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 +10 -0
  8. package/client.js.map +1 -1
  9. package/client.mjs +10 -0
  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 +5 -1
  20. package/index.d.mts.map +1 -1
  21. package/index.d.ts +5 -1
  22. package/index.d.ts.map +1 -1
  23. package/index.js +14 -1
  24. package/index.js.map +1 -1
  25. package/index.mjs +5 -1
  26. package/index.mjs.map +1 -1
  27. package/lib/asset.d.mts +55 -0
  28. package/lib/asset.d.mts.map +1 -0
  29. package/lib/asset.d.ts +55 -0
  30. package/lib/asset.d.ts.map +1 -0
  31. package/lib/asset.js +60 -0
  32. package/lib/asset.js.map +1 -0
  33. package/lib/asset.mjs +54 -0
  34. package/lib/asset.mjs.map +1 -0
  35. package/lib/job.d.mts +13 -1
  36. package/lib/job.d.mts.map +1 -1
  37. package/lib/job.d.ts +13 -1
  38. package/lib/job.d.ts.map +1 -1
  39. package/lib/job.js +18 -1
  40. package/lib/job.js.map +1 -1
  41. package/lib/job.mjs +16 -0
  42. package/lib/job.mjs.map +1 -1
  43. package/lib/models.d.mts +34 -2
  44. package/lib/models.d.mts.map +1 -1
  45. package/lib/models.d.ts +34 -2
  46. package/lib/models.d.ts.map +1 -1
  47. package/lib/models.js +39 -2
  48. package/lib/models.js.map +1 -1
  49. package/lib/models.mjs +37 -1
  50. package/lib/models.mjs.map +1 -1
  51. package/lib/scenario.d.mts +14 -0
  52. package/lib/scenario.d.mts.map +1 -1
  53. package/lib/scenario.d.ts +14 -0
  54. package/lib/scenario.d.ts.map +1 -1
  55. package/lib/scenario.js +14 -0
  56. package/lib/scenario.js.map +1 -1
  57. package/lib/scenario.mjs +14 -0
  58. package/lib/scenario.mjs.map +1 -1
  59. package/lib/upload.d.mts +143 -0
  60. package/lib/upload.d.mts.map +1 -0
  61. package/lib/upload.d.ts +143 -0
  62. package/lib/upload.d.ts.map +1 -0
  63. package/lib/upload.js +242 -0
  64. package/lib/upload.js.map +1 -0
  65. package/lib/upload.mjs +203 -0
  66. package/lib/upload.mjs.map +1 -0
  67. package/lib/workflow.d.mts +13 -2
  68. package/lib/workflow.d.mts.map +1 -1
  69. package/lib/workflow.d.ts +13 -2
  70. package/lib/workflow.d.ts.map +1 -1
  71. package/lib/workflow.js +17 -4
  72. package/lib/workflow.js.map +1 -1
  73. package/lib/workflow.mjs +17 -4
  74. package/lib/workflow.mjs.map +1 -1
  75. package/lib/workflow_import_validator.d.mts +40 -0
  76. package/lib/workflow_import_validator.d.mts.map +1 -0
  77. package/lib/workflow_import_validator.d.ts +40 -0
  78. package/lib/workflow_import_validator.d.ts.map +1 -0
  79. package/lib/workflow_import_validator.js +69 -0
  80. package/lib/workflow_import_validator.js.map +1 -0
  81. package/lib/workflow_import_validator.mjs +64 -0
  82. package/lib/workflow_import_validator.mjs.map +1 -0
  83. package/package.json +11 -1
  84. package/pagination.d.mts +2 -0
  85. package/pagination.d.mts.map +1 -0
  86. package/pagination.d.ts +2 -0
  87. package/pagination.d.ts.map +1 -0
  88. package/pagination.js +6 -0
  89. package/pagination.js.map +1 -0
  90. package/pagination.mjs +2 -0
  91. package/pagination.mjs.map +1 -0
  92. package/resources/assets/assets.d.mts +646 -669
  93. package/resources/assets/assets.d.mts.map +1 -1
  94. package/resources/assets/assets.d.ts +646 -669
  95. package/resources/assets/assets.d.ts.map +1 -1
  96. package/resources/assets/assets.js +3 -2
  97. package/resources/assets/assets.js.map +1 -1
  98. package/resources/assets/assets.mjs +3 -2
  99. package/resources/assets/assets.mjs.map +1 -1
  100. package/resources/assets/index.d.mts +1 -1
  101. package/resources/assets/index.d.mts.map +1 -1
  102. package/resources/assets/index.d.ts +1 -1
  103. package/resources/assets/index.d.ts.map +1 -1
  104. package/resources/assets/index.js.map +1 -1
  105. package/resources/assets/index.mjs.map +1 -1
  106. package/resources/assets/public.d.mts +12 -12
  107. package/resources/assets/public.d.mts.map +1 -1
  108. package/resources/assets/public.d.ts +12 -12
  109. package/resources/assets/public.d.ts.map +1 -1
  110. package/resources/collections/collections.d.mts +38 -49
  111. package/resources/collections/collections.d.mts.map +1 -1
  112. package/resources/collections/collections.d.ts +38 -49
  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 +1 -1
  119. package/resources/collections/index.d.mts.map +1 -1
  120. package/resources/collections/index.d.ts +1 -1
  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.map +1 -1
  124. package/resources/generate.d.mts +1027 -242
  125. package/resources/generate.d.mts.map +1 -1
  126. package/resources/generate.d.ts +1027 -242
  127. package/resources/generate.d.ts.map +1 -1
  128. package/resources/generate.js +7 -0
  129. package/resources/generate.js.map +1 -1
  130. package/resources/generate.mjs +7 -0
  131. package/resources/generate.mjs.map +1 -1
  132. package/resources/index.d.mts +8 -8
  133. package/resources/index.d.mts.map +1 -1
  134. package/resources/index.d.ts +8 -8
  135. package/resources/index.d.ts.map +1 -1
  136. package/resources/index.js.map +1 -1
  137. package/resources/index.mjs.map +1 -1
  138. package/resources/jobs.d.mts +369 -380
  139. package/resources/jobs.d.mts.map +1 -1
  140. package/resources/jobs.d.ts +369 -380
  141. package/resources/jobs.d.ts.map +1 -1
  142. package/resources/jobs.js +2 -1
  143. package/resources/jobs.js.map +1 -1
  144. package/resources/jobs.mjs +2 -1
  145. package/resources/jobs.mjs.map +1 -1
  146. package/resources/models/description.d.mts +2 -2
  147. package/resources/models/description.d.mts.map +1 -1
  148. package/resources/models/description.d.ts +2 -2
  149. package/resources/models/description.d.ts.map +1 -1
  150. package/resources/models/examples.d.mts +4 -4
  151. package/resources/models/examples.d.mts.map +1 -1
  152. package/resources/models/examples.d.ts +4 -4
  153. package/resources/models/examples.d.ts.map +1 -1
  154. package/resources/models/index.d.mts +1 -1
  155. package/resources/models/index.d.mts.map +1 -1
  156. package/resources/models/index.d.ts +1 -1
  157. package/resources/models/index.d.ts.map +1 -1
  158. package/resources/models/index.js.map +1 -1
  159. package/resources/models/index.mjs.map +1 -1
  160. package/resources/models/models.d.mts +845 -856
  161. package/resources/models/models.d.mts.map +1 -1
  162. package/resources/models/models.d.ts +845 -856
  163. package/resources/models/models.d.ts.map +1 -1
  164. package/resources/models/models.js +2 -1
  165. package/resources/models/models.js.map +1 -1
  166. package/resources/models/models.mjs +2 -1
  167. package/resources/models/models.mjs.map +1 -1
  168. package/resources/models/train.d.mts +2 -2
  169. package/resources/models/train.d.mts.map +1 -1
  170. package/resources/models/train.d.ts +2 -2
  171. package/resources/models/train.d.ts.map +1 -1
  172. package/resources/search.d.mts +215 -295
  173. package/resources/search.d.mts.map +1 -1
  174. package/resources/search.d.ts +215 -295
  175. package/resources/search.d.ts.map +1 -1
  176. package/resources/search.js +9 -2
  177. package/resources/search.js.map +1 -1
  178. package/resources/search.mjs +9 -2
  179. package/resources/search.mjs.map +1 -1
  180. package/resources/tags.d.mts +23 -35
  181. package/resources/tags.d.mts.map +1 -1
  182. package/resources/tags.d.ts +23 -35
  183. package/resources/tags.d.ts.map +1 -1
  184. package/resources/tags.js +2 -1
  185. package/resources/tags.js.map +1 -1
  186. package/resources/tags.mjs +2 -1
  187. package/resources/tags.mjs.map +1 -1
  188. package/resources/usages.d.mts +3 -3
  189. package/resources/usages.d.mts.map +1 -1
  190. package/resources/usages.d.ts +3 -3
  191. package/resources/usages.d.ts.map +1 -1
  192. package/resources/workflows.d.mts +688 -704
  193. package/resources/workflows.d.mts.map +1 -1
  194. package/resources/workflows.d.ts +688 -704
  195. package/resources/workflows.d.ts.map +1 -1
  196. package/resources/workflows.js +5 -1
  197. package/resources/workflows.js.map +1 -1
  198. package/resources/workflows.mjs +5 -1
  199. package/resources/workflows.mjs.map +1 -1
  200. package/src/client.ts +107 -2
  201. package/src/core/pagination.ts +497 -0
  202. package/src/index.ts +11 -1
  203. package/src/lib/asset.ts +85 -0
  204. package/src/lib/job.ts +28 -1
  205. package/src/lib/models.ts +62 -2
  206. package/src/lib/scenario.ts +14 -0
  207. package/src/lib/upload.ts +344 -0
  208. package/src/lib/workflow.ts +29 -4
  209. package/src/lib/workflow_import_validator.ts +104 -0
  210. package/src/pagination.ts +2 -0
  211. package/src/resources/assets/assets.ts +930 -909
  212. package/src/resources/assets/index.ts +2 -0
  213. package/src/resources/assets/public.ts +17 -7
  214. package/src/resources/collections/collections.ts +45 -54
  215. package/src/resources/collections/index.ts +1 -0
  216. package/src/resources/generate.ts +1227 -136
  217. package/src/resources/index.ts +11 -1
  218. package/src/resources/jobs.ts +613 -622
  219. package/src/resources/models/description.ts +4 -0
  220. package/src/resources/models/examples.ts +8 -0
  221. package/src/resources/models/index.ts +1 -0
  222. package/src/resources/models/models.ts +1066 -1064
  223. package/src/resources/models/train.ts +4 -0
  224. package/src/resources/search.ts +239 -327
  225. package/src/resources/tags.ts +32 -39
  226. package/src/resources/usages.ts +5 -0
  227. package/src/resources/workflows.ts +850 -864
  228. package/src/version.ts +1 -1
  229. package/version.d.mts +1 -1
  230. package/version.d.ts +1 -1
  231. package/version.js +1 -1
  232. package/version.mjs +1 -1
@@ -1,5 +1,5 @@
1
1
  import { APIResource } from "../core/resource.mjs";
2
- import { APIPromise } from "../core/api-promise.mjs";
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): APIPromise<SearchAssetSearchResponse>;
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): APIPromise<SearchModelSearchResponse>;
18
+ modelSearch(params: SearchModelSearchParams, options?: RequestOptions): PagePromise<SearchModelSearchResponsesSearchHitsOffset, SearchModelSearchResponse>;
19
19
  }
20
- /**
21
- * Search result for asset search
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
- * Maximum number of documents returned
24
+ * Unique identifier for the asset (e.g., "asset_GTrL3mq4SXWyMxkOHRxlpw")
27
25
  */
28
- limit: number;
26
+ id: string;
29
27
  /**
30
- * Number of documents skipped
28
+ * User ID of the asset creator/author
31
29
  */
32
- offset: number;
30
+ authorId: string;
33
31
  /**
34
- * Estimated total number of hits
32
+ * Array of collection IDs this asset belongs to
35
33
  */
36
- estimatedTotalHits?: number;
34
+ collectionIds: Array<string>;
37
35
  /**
38
- * Number of results on each page
36
+ * Creation timestamp in ISO 8601 format (e.g., "2025-01-16T11:19:41.579Z")
39
37
  */
40
- hitsPerPage?: number;
38
+ createdAt: string;
41
39
  /**
42
- * Current search results page
40
+ * Metadata containing detailed information about the asset's properties and
41
+ * generation parameters
43
42
  */
44
- page?: number;
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
- * Exhaustive total number of matches
90
+ * Thumbnail preview of the asset 3D, video...
47
91
  */
48
- totalHits?: number;
92
+ thumbnail?: SearchAssetSearchResponse.Thumbnail;
49
93
  /**
50
- * Exhaustive total number of search result pages
94
+ * Transcription of the asset. Can be either:
95
+ *
96
+ * - Automatically generated transcription for audio assets with speech
51
97
  */
52
- totalPages?: number;
98
+ transcription?: string;
53
99
  }
54
100
  export declare namespace SearchAssetSearchResponse {
55
- interface Hit {
101
+ /**
102
+ * Metadata containing detailed information about the asset's properties and
103
+ * generation parameters
104
+ */
105
+ interface Metadata {
56
106
  /**
57
- * Unique identifier for the asset (e.g., "asset_GTrL3mq4SXWyMxkOHRxlpw")
107
+ * Aspect ratio of the asset (e.g., "1:1", "16:9")
58
108
  */
59
- id: string;
109
+ aspectRatio?: string;
60
110
  /**
61
- * User ID of the asset creator/author
111
+ * ID of the base model used for generation
62
112
  */
63
- authorId: string;
113
+ baseModelId?: string;
64
114
  /**
65
- * Array of collection IDs this asset belongs to
115
+ * Guidance scale used for diffusion models to control prompt adherence
66
116
  */
67
- collectionIds: Array<string>;
117
+ guidance?: number;
68
118
  /**
69
- * Creation timestamp in ISO 8601 format (e.g., "2025-01-16T11:19:41.579Z")
119
+ * Height of the asset in pixels
70
120
  */
71
- createdAt: string;
121
+ height?: number;
72
122
  /**
73
- * Metadata containing detailed information about the asset's properties and
74
- * generation parameters
123
+ * Classification of the asset (e.g., "image", "video")
75
124
  */
76
- metadata: Hit.Metadata;
125
+ kind?: string;
77
126
  /**
78
- * MIME type of the asset (e.g., "image/png", "image/jpeg")
127
+ * ID of the specific model used if asset is model-based
79
128
  */
80
- mimeType: string;
129
+ modelId?: string;
81
130
  /**
82
- * Array of detected NSFW categories
131
+ * Type of model used for generation (e.g., "sd-1_5", "flux.1")
83
132
  */
84
- nsfw: Array<string>;
133
+ modelType?: string;
85
134
  /**
86
- * Project ID of the asset owner
135
+ * Custom name given to the asset
87
136
  */
88
- ownerId: string;
137
+ name?: string;
89
138
  /**
90
- * Privacy setting of the asset ("public", "private", or "unlisted")
139
+ * Negative prompt used during generation to specify what to avoid
91
140
  */
92
- privacy: string;
141
+ negativePrompt?: string;
93
142
  /**
94
- * Array of user-assigned tags for categorization
143
+ * For Flux models: controls the influence of the negative prompt
95
144
  */
96
- tags: Array<string>;
145
+ negativePromptStrength?: number;
97
146
  /**
98
- * Team ID of the asset owner
147
+ * Number of inference steps used during generation
99
148
  */
100
- teamId: string;
149
+ numInferenceSteps?: number;
101
150
  /**
102
- * Last modification timestamp in ISO 8601 format (e.g.,
103
- * "2025-01-16T11:19:41.579Z")
151
+ * ID of the parent job that created this asset
104
152
  */
105
- updatedAt: string;
153
+ parentJobId?: string;
106
154
  /**
107
- * Signed URL of the asset
155
+ * Text prompt used to generate the asset
108
156
  */
109
- url: string;
157
+ prompt?: string;
110
158
  /**
111
- * Textual description of the asset. Can be either:
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
- description?: string;
161
+ scheduler?: string;
118
162
  /**
119
- * Score assigned to the asset based on usage and popularity
163
+ * Random seed used for generation, enables reproducibility
120
164
  */
121
- score?: number;
165
+ seed?: string;
122
166
  /**
123
- * Thumbnail preview of the asset 3D, video...
167
+ * File size of the asset in bytes
124
168
  */
125
- thumbnail?: Hit.Thumbnail;
169
+ size?: number;
126
170
  /**
127
- * Transcription of the asset. Can be either:
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
- transcription?: string;
132
- }
133
- namespace Hit {
173
+ text?: string;
134
174
  /**
135
- * Metadata containing detailed information about the asset's properties and
136
- * generation parameters
175
+ * Thumbnail image information for the asset. Ex. Canvas thumbnail
137
176
  */
138
- interface Metadata {
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
- * Thumbnail preview of the asset 3D, video...
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
- * Maximum number of documents returned
214
+ * Unique identifier for the model (e.g., "model_GTrL3mq4SXWyMxkOHRxlpw")
253
215
  */
254
- limit: number;
216
+ id: string;
255
217
  /**
256
- * Number of documents skipped
218
+ * User ID of the model creator/author
257
219
  */
258
- offset: number;
220
+ authorId: string;
259
221
  /**
260
- * Estimated total number of hits
222
+ * Array of model capabilities
261
223
  */
262
- estimatedTotalHits?: number;
224
+ capabilities: Array<string>;
263
225
  /**
264
- * Number of results on each page
226
+ * Array of collection IDs this model belongs to
265
227
  */
266
- hitsPerPage?: number;
228
+ collectionIds: Array<string>;
267
229
  /**
268
- * Current search results page
230
+ * Array of concept models associated with this model Each concept contains a
231
+ * reference to its source model
269
232
  */
270
- page?: number;
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
- * Exhaustive total number of matches
271
+ * Number of images used to train this model
273
272
  */
274
- totalHits?: number;
273
+ trainingImagesNumber: number;
275
274
  /**
276
- * Exhaustive total number of search result pages
275
+ * Type of the model (e.g., "sd-1_5", "flux.1")
277
276
  */
278
- totalPages?: number;
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 Hit {
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
- * Array of user-assigned tags for categorization
299
+ * ID of the concept's source model
333
300
  */
334
- tags: Array<string>;
335
- /**
336
- * Team ID of the model owner
337
- */
338
- teamId: string;
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
- * Thumbnail image information for the model
308
+ * ID of the asset used as thumbnail
362
309
  */
363
- thumbnail?: Hit.Thumbnail;
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
- * Thumbnail image information for the model
312
+ * Signed URL of the thumbnail
374
313
  */
375
- interface Thumbnail {
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