@scenario-labs/sdk 3.1.0 → 3.2.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 (129) hide show
  1. package/CHANGELOG.md +92 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/lib/workflow_converter.d.mts +6 -0
  9. package/lib/workflow_converter.d.mts.map +1 -1
  10. package/lib/workflow_converter.d.ts +6 -0
  11. package/lib/workflow_converter.d.ts.map +1 -1
  12. package/lib/workflow_converter.js +99 -12
  13. package/lib/workflow_converter.js.map +1 -1
  14. package/lib/workflow_converter.mjs +99 -12
  15. package/lib/workflow_converter.mjs.map +1 -1
  16. package/lib/workflow_validator.d.mts +3 -1
  17. package/lib/workflow_validator.d.mts.map +1 -1
  18. package/lib/workflow_validator.d.ts +3 -1
  19. package/lib/workflow_validator.d.ts.map +1 -1
  20. package/lib/workflow_validator.js +41 -1
  21. package/lib/workflow_validator.js.map +1 -1
  22. package/lib/workflow_validator.mjs +41 -1
  23. package/lib/workflow_validator.mjs.map +1 -1
  24. package/package.json +1 -1
  25. package/resources/assets/assets.d.mts +182 -99
  26. package/resources/assets/assets.d.mts.map +1 -1
  27. package/resources/assets/assets.d.ts +182 -99
  28. package/resources/assets/assets.d.ts.map +1 -1
  29. package/resources/assets/assets.js.map +1 -1
  30. package/resources/assets/assets.mjs.map +1 -1
  31. package/resources/assets/download.d.mts +15 -0
  32. package/resources/assets/download.d.mts.map +1 -1
  33. package/resources/assets/download.d.ts +15 -0
  34. package/resources/assets/download.d.ts.map +1 -1
  35. package/resources/assets/download.js +2 -2
  36. package/resources/assets/download.js.map +1 -1
  37. package/resources/assets/download.mjs +2 -2
  38. package/resources/assets/download.mjs.map +1 -1
  39. package/resources/generate.d.mts +379 -221
  40. package/resources/generate.d.mts.map +1 -1
  41. package/resources/generate.d.ts +379 -221
  42. package/resources/generate.d.ts.map +1 -1
  43. package/resources/generate.js +2 -6
  44. package/resources/generate.js.map +1 -1
  45. package/resources/generate.mjs +2 -6
  46. package/resources/generate.mjs.map +1 -1
  47. package/resources/index.d.mts +1 -1
  48. package/resources/index.d.mts.map +1 -1
  49. package/resources/index.d.ts +1 -1
  50. package/resources/index.d.ts.map +1 -1
  51. package/resources/index.js.map +1 -1
  52. package/resources/index.mjs.map +1 -1
  53. package/resources/jobs.d.mts +77 -46
  54. package/resources/jobs.d.mts.map +1 -1
  55. package/resources/jobs.d.ts +77 -46
  56. package/resources/jobs.d.ts.map +1 -1
  57. package/resources/jobs.js +2 -6
  58. package/resources/jobs.js.map +1 -1
  59. package/resources/jobs.mjs +2 -6
  60. package/resources/jobs.mjs.map +1 -1
  61. package/resources/models/description.d.mts +18 -0
  62. package/resources/models/description.d.mts.map +1 -1
  63. package/resources/models/description.d.ts +18 -0
  64. package/resources/models/description.d.ts.map +1 -1
  65. package/resources/models/examples.d.mts +80 -46
  66. package/resources/models/examples.d.mts.map +1 -1
  67. package/resources/models/examples.d.ts +80 -46
  68. package/resources/models/examples.d.ts.map +1 -1
  69. package/resources/models/models.d.mts +131 -35
  70. package/resources/models/models.d.mts.map +1 -1
  71. package/resources/models/models.d.ts +131 -35
  72. package/resources/models/models.d.ts.map +1 -1
  73. package/resources/models/models.js +6 -2
  74. package/resources/models/models.js.map +1 -1
  75. package/resources/models/models.mjs +6 -2
  76. package/resources/models/models.mjs.map +1 -1
  77. package/resources/models/train.d.mts +78 -38
  78. package/resources/models/train.d.mts.map +1 -1
  79. package/resources/models/train.d.ts +78 -38
  80. package/resources/models/train.d.ts.map +1 -1
  81. package/resources/models/train.js +2 -2
  82. package/resources/models/train.js.map +1 -1
  83. package/resources/models/train.mjs +2 -2
  84. package/resources/models/train.mjs.map +1 -1
  85. package/resources/search.d.mts +168 -5
  86. package/resources/search.d.mts.map +1 -1
  87. package/resources/search.d.ts +168 -5
  88. package/resources/search.d.ts.map +1 -1
  89. package/resources/search.js +15 -2
  90. package/resources/search.js.map +1 -1
  91. package/resources/search.mjs +15 -2
  92. package/resources/search.mjs.map +1 -1
  93. package/resources/uploads.d.mts +13 -3
  94. package/resources/uploads.d.mts.map +1 -1
  95. package/resources/uploads.d.ts +13 -3
  96. package/resources/uploads.d.ts.map +1 -1
  97. package/resources/uploads.js +2 -2
  98. package/resources/uploads.js.map +1 -1
  99. package/resources/uploads.mjs +2 -2
  100. package/resources/uploads.mjs.map +1 -1
  101. package/resources/usages.d.mts +34 -27
  102. package/resources/usages.d.mts.map +1 -1
  103. package/resources/usages.d.ts +34 -27
  104. package/resources/usages.d.ts.map +1 -1
  105. package/resources/workflows.d.mts +283 -130
  106. package/resources/workflows.d.mts.map +1 -1
  107. package/resources/workflows.d.ts +283 -130
  108. package/resources/workflows.d.ts.map +1 -1
  109. package/src/client.ts +6 -0
  110. package/src/lib/workflow_converter.ts +126 -12
  111. package/src/lib/workflow_validator.ts +68 -1
  112. package/src/resources/assets/assets.ts +574 -99
  113. package/src/resources/assets/download.ts +19 -2
  114. package/src/resources/generate.ts +495 -236
  115. package/src/resources/index.ts +3 -0
  116. package/src/resources/jobs.ts +79 -53
  117. package/src/resources/models/description.ts +116 -0
  118. package/src/resources/models/examples.ts +178 -46
  119. package/src/resources/models/models.ts +138 -37
  120. package/src/resources/models/train.ts +82 -42
  121. package/src/resources/search.ts +218 -7
  122. package/src/resources/uploads.ts +16 -5
  123. package/src/resources/usages.ts +40 -27
  124. package/src/resources/workflows.ts +283 -130
  125. package/src/version.ts +1 -1
  126. package/version.d.mts +1 -1
  127. package/version.d.ts +1 -1
  128. package/version.js +1 -1
  129. package/version.mjs +1 -1
@@ -14,9 +14,9 @@ export class Train extends APIResource {
14
14
  params: TrainActionParams,
15
15
  options?: RequestOptions,
16
16
  ): APIPromise<TrainActionResponse> {
17
- const { originalAssets, projectId, ...body } = params;
17
+ const { projectId, ...body } = params;
18
18
  return this._client.post(path`/models/${modelID}/train/action`, {
19
- query: { originalAssets, projectId },
19
+ query: { projectId },
20
20
  body,
21
21
  ...options,
22
22
  });
@@ -493,7 +493,9 @@ export namespace TrainActionResponse {
493
493
  * The asset kind of the input. Only taken into account for \`file\` and
494
494
  * \`file_array\` input types. If model provides multiple kinds, the input will be
495
495
  * not able to create the asset on the flight on API side with dataurl without
496
- * data:kind, prefix
496
+ * data:kind, prefix \`file\` and \`file_array\` inputs always expose a kind: when
497
+ * a model does not declare one, \`image\` is returned, which is the kind used at
498
+ * generation time.
497
499
  */
498
500
  kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
499
501
 
@@ -521,8 +523,9 @@ export namespace TrainActionResponse {
521
523
  maxDuration?: number;
522
524
 
523
525
  /**
524
- * The maximum allowed length for \`string\` inputs. Also applies to each item in
525
- * \`string_array\`.
526
+ * The maximum allowed length for \`string\` and \`model\` inputs, in characters.
527
+ * For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
528
+ * ITEMS instead — the length of each item is not constrained.
526
529
  */
527
530
  maxLength?: number;
528
531
 
@@ -539,8 +542,9 @@ export namespace TrainActionResponse {
539
542
  min?: number;
540
543
 
541
544
  /**
542
- * The minimum allowed length for string inputs. Also applies to each item in
543
- * \`string_array\`.
545
+ * The minimum allowed length for \`string\` and \`model\` inputs, in characters.
546
+ * For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
547
+ * ITEMS instead — the length of each item is not constrained.
544
548
  */
545
549
  minLength?: number;
546
550
 
@@ -1236,6 +1240,11 @@ export namespace TrainActionResponse {
1236
1240
  */
1237
1241
  lorasComponent?: UiConfig.LorasComponent;
1238
1242
 
1243
+ /**
1244
+ * Configuration for the provider outputs exposed by `exposeOutput`
1245
+ */
1246
+ outputProperties?: { [key: string]: UiConfig.OutputProperties };
1247
+
1239
1248
  /**
1240
1249
  * Configuration for the presets
1241
1250
  */
@@ -1290,6 +1299,10 @@ export namespace TrainActionResponse {
1290
1299
  modelIdInput?: string;
1291
1300
  }
1292
1301
 
1302
+ export interface OutputProperties {
1303
+ label: string;
1304
+ }
1305
+
1293
1306
  export interface Preset {
1294
1307
  fields: Array<string>;
1295
1308
 
@@ -1362,8 +1375,8 @@ export interface TrainTriggerResponse {
1362
1375
  /**
1363
1376
  * Compute Units cost per billing action for this request, after discount. Values
1364
1377
  * sum to `creativeUnitsCost`. Only Compute-Units-consuming actions with a non-zero
1365
- * charge appear. Lets clients split the total (e.g. generation vs
1366
- * `slop-detection`) — including on dryRun estimates.
1378
+ * charge appear. Lets clients split the total (e.g. generation vs `quality-gate`)
1379
+ * — including on dryRun estimates.
1367
1380
  */
1368
1381
  costDetails?: TrainTriggerResponse.CostDetails;
1369
1382
 
@@ -1754,7 +1767,9 @@ export namespace TrainTriggerResponse {
1754
1767
  * The asset kind of the input. Only taken into account for \`file\` and
1755
1768
  * \`file_array\` input types. If model provides multiple kinds, the input will be
1756
1769
  * not able to create the asset on the flight on API side with dataurl without
1757
- * data:kind, prefix
1770
+ * data:kind, prefix \`file\` and \`file_array\` inputs always expose a kind: when
1771
+ * a model does not declare one, \`image\` is returned, which is the kind used at
1772
+ * generation time.
1758
1773
  */
1759
1774
  kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
1760
1775
 
@@ -1782,8 +1797,9 @@ export namespace TrainTriggerResponse {
1782
1797
  maxDuration?: number;
1783
1798
 
1784
1799
  /**
1785
- * The maximum allowed length for \`string\` inputs. Also applies to each item in
1786
- * \`string_array\`.
1800
+ * The maximum allowed length for \`string\` and \`model\` inputs, in characters.
1801
+ * For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
1802
+ * ITEMS instead — the length of each item is not constrained.
1787
1803
  */
1788
1804
  maxLength?: number;
1789
1805
 
@@ -1800,8 +1816,9 @@ export namespace TrainTriggerResponse {
1800
1816
  min?: number;
1801
1817
 
1802
1818
  /**
1803
- * The minimum allowed length for string inputs. Also applies to each item in
1804
- * \`string_array\`.
1819
+ * The minimum allowed length for \`string\` and \`model\` inputs, in characters.
1820
+ * For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
1821
+ * ITEMS instead — the length of each item is not constrained.
1805
1822
  */
1806
1823
  minLength?: number;
1807
1824
 
@@ -1981,7 +1998,9 @@ export namespace TrainTriggerResponse {
1981
1998
  * The asset kind of the input. Only taken into account for \`file\` and
1982
1999
  * \`file_array\` input types. If model provides multiple kinds, the input will be
1983
2000
  * not able to create the asset on the flight on API side with dataurl without
1984
- * data:kind, prefix
2001
+ * data:kind, prefix \`file\` and \`file_array\` inputs always expose a kind: when
2002
+ * a model does not declare one, \`image\` is returned, which is the kind used at
2003
+ * generation time.
1985
2004
  */
1986
2005
  kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
1987
2006
 
@@ -2009,8 +2028,9 @@ export namespace TrainTriggerResponse {
2009
2028
  maxDuration?: number;
2010
2029
 
2011
2030
  /**
2012
- * The maximum allowed length for \`string\` inputs. Also applies to each item in
2013
- * \`string_array\`.
2031
+ * The maximum allowed length for \`string\` and \`model\` inputs, in characters.
2032
+ * For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
2033
+ * ITEMS instead — the length of each item is not constrained.
2014
2034
  */
2015
2035
  maxLength?: number;
2016
2036
 
@@ -2027,8 +2047,9 @@ export namespace TrainTriggerResponse {
2027
2047
  min?: number;
2028
2048
 
2029
2049
  /**
2030
- * The minimum allowed length for string inputs. Also applies to each item in
2031
- * \`string_array\`.
2050
+ * The minimum allowed length for \`string\` and \`model\` inputs, in characters.
2051
+ * For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
2052
+ * ITEMS instead — the length of each item is not constrained.
2032
2053
  */
2033
2054
  minLength?: number;
2034
2055
 
@@ -2333,7 +2354,7 @@ export namespace TrainTriggerResponse {
2333
2354
 
2334
2355
  /**
2335
2356
  * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
2336
- * top of the generation itself, such as `slop-detection`.
2357
+ * top of the generation itself, such as `quality-gate`.
2337
2358
  *
2338
2359
  * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
2339
2360
  * values here.
@@ -2363,7 +2384,7 @@ export namespace TrainTriggerResponse {
2363
2384
  export namespace Billing {
2364
2385
  /**
2365
2386
  * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
2366
- * top of the generation itself, such as `slop-detection`.
2387
+ * top of the generation itself, such as `quality-gate`.
2367
2388
  *
2368
2389
  * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
2369
2390
  * values here.
@@ -2383,7 +2404,7 @@ export namespace TrainTriggerResponse {
2383
2404
  export interface CuCostDetails {
2384
2405
  'ip-detection'?: number;
2385
2406
 
2386
- 'slop-detection'?: number;
2407
+ 'quality-gate'?: number;
2387
2408
  }
2388
2409
  }
2389
2410
  }
@@ -2837,7 +2858,9 @@ export namespace TrainTriggerResponse {
2837
2858
  * The asset kind of the input. Only taken into account for \`file\` and
2838
2859
  * \`file_array\` input types. If model provides multiple kinds, the input will be
2839
2860
  * not able to create the asset on the flight on API side with dataurl without
2840
- * data:kind, prefix
2861
+ * data:kind, prefix \`file\` and \`file_array\` inputs always expose a kind: when
2862
+ * a model does not declare one, \`image\` is returned, which is the kind used at
2863
+ * generation time.
2841
2864
  */
2842
2865
  kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
2843
2866
 
@@ -2865,8 +2888,9 @@ export namespace TrainTriggerResponse {
2865
2888
  maxDuration?: number;
2866
2889
 
2867
2890
  /**
2868
- * The maximum allowed length for \`string\` inputs. Also applies to each item in
2869
- * \`string_array\`.
2891
+ * The maximum allowed length for \`string\` and \`model\` inputs, in characters.
2892
+ * For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
2893
+ * ITEMS instead — the length of each item is not constrained.
2870
2894
  */
2871
2895
  maxLength?: number;
2872
2896
 
@@ -2883,8 +2907,9 @@ export namespace TrainTriggerResponse {
2883
2907
  min?: number;
2884
2908
 
2885
2909
  /**
2886
- * The minimum allowed length for string inputs. Also applies to each item in
2887
- * \`string_array\`.
2910
+ * The minimum allowed length for \`string\` and \`model\` inputs, in characters.
2911
+ * For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
2912
+ * ITEMS instead — the length of each item is not constrained.
2888
2913
  */
2889
2914
  minLength?: number;
2890
2915
 
@@ -3580,6 +3605,11 @@ export namespace TrainTriggerResponse {
3580
3605
  */
3581
3606
  lorasComponent?: UiConfig.LorasComponent;
3582
3607
 
3608
+ /**
3609
+ * Configuration for the provider outputs exposed by `exposeOutput`
3610
+ */
3611
+ outputProperties?: { [key: string]: UiConfig.OutputProperties };
3612
+
3583
3613
  /**
3584
3614
  * Configuration for the presets
3585
3615
  */
@@ -3634,6 +3664,10 @@ export namespace TrainTriggerResponse {
3634
3664
  modelIdInput?: string;
3635
3665
  }
3636
3666
 
3667
+ export interface OutputProperties {
3668
+ label: string;
3669
+ }
3670
+
3637
3671
  export interface Preset {
3638
3672
  fields: Array<string>;
3639
3673
 
@@ -3700,8 +3734,8 @@ export namespace TrainTriggerResponse {
3700
3734
  /**
3701
3735
  * Compute Units cost per billing action for this request, after discount. Values
3702
3736
  * sum to `creativeUnitsCost`. Only Compute-Units-consuming actions with a non-zero
3703
- * charge appear. Lets clients split the total (e.g. generation vs
3704
- * `slop-detection`) — including on dryRun estimates.
3737
+ * charge appear. Lets clients split the total (e.g. generation vs `quality-gate`)
3738
+ * — including on dryRun estimates.
3705
3739
  */
3706
3740
  export interface CostDetails {
3707
3741
  'assistant-message'?: number;
@@ -3726,6 +3760,8 @@ export namespace TrainTriggerResponse {
3726
3760
 
3727
3761
  prompt?: number;
3728
3762
 
3763
+ 'quality-gate'?: number;
3764
+
3729
3765
  'remove-background'?: number;
3730
3766
 
3731
3767
  repaint?: number;
@@ -3738,8 +3774,6 @@ export namespace TrainTriggerResponse {
3738
3774
 
3739
3775
  'skybox-upscale-360'?: number;
3740
3776
 
3741
- 'slop-detection'?: number;
3742
-
3743
3777
  texture?: number;
3744
3778
 
3745
3779
  'train-model'?: number;
@@ -3761,8 +3795,16 @@ export namespace TrainTriggerResponse {
3761
3795
  action: 'allowed' | 'blocked' | 'flagged';
3762
3796
 
3763
3797
  /**
3764
- * IP-detection CU fee, separate from creativeUnitsCost: a fixed base fee plus a
3765
- * per-image fee for each analyzed input image.
3798
+ * Number of images the detectors actually analyzed — a video counts as each of its
3799
+ * extracted frames, and an image that could not be read is excluded (and not
3800
+ * billed). Each of them is priced once per enabled filter.
3801
+ */
3802
+ analyzedImagesCount: number;
3803
+
3804
+ /**
3805
+ * IP-detection CU fee, separate from creativeUnitsCost: it follows the provider
3806
+ * tokens the run sends — the prompt plus every analyzed image, once per enabled
3807
+ * filter — with a 1 CU minimum per run.
3766
3808
  */
3767
3809
  creativeUnitsCharged: number;
3768
3810
 
@@ -3777,7 +3819,8 @@ export namespace TrainTriggerResponse {
3777
3819
  findings: Array<IPDetection.Finding>;
3778
3820
 
3779
3821
  /**
3780
- * Convenience flag; always true when action is not 'allowed'.
3822
+ * Whether a filter considered the inputs an IP risk. Independent of `action`: a
3823
+ * request blocked because a detector errored is `blocked` and NOT flagged.
3781
3824
  */
3782
3825
  flagged: boolean;
3783
3826
 
@@ -3836,11 +3879,6 @@ export interface TrainActionParams {
3836
3879
  */
3837
3880
  action: 'cancel';
3838
3881
 
3839
- /**
3840
- * Query param: If set to true, returns the original asset without transformation
3841
- */
3842
- originalAssets?: boolean;
3843
-
3844
3882
  /**
3845
3883
  * Query param: The projectId used for ownership resource management. Either to
3846
3884
  * assert ownership or to set the owner of the resource(s)
@@ -3850,9 +3888,10 @@ export interface TrainActionParams {
3850
3888
 
3851
3889
  export interface TrainTriggerParams {
3852
3890
  /**
3853
- * Query param
3891
+ * Query param: Estimate the operation instead of running it: the call returns a
3892
+ * 269 response carrying the creative units cost. `api` estimates at the API tier.
3854
3893
  */
3855
- dryRun?: unknown;
3894
+ dryRun?: 'true' | 'api';
3856
3895
 
3857
3896
  /**
3858
3897
  * Query param: If set to true, returns the original asset without transformation
@@ -3866,7 +3905,8 @@ export interface TrainTriggerParams {
3866
3905
  projectId?: string;
3867
3906
 
3868
3907
  /**
3869
- * Query param: Simulate the number of training images, used for dryRun purpose
3908
+ * Query param: Simulate the number of training images, used for dryRun purpose.
3909
+ * Ignored if the model already has training images.
3870
3910
  */
3871
3911
  trainingImagesCount?: number;
3872
3912
 
@@ -34,9 +34,26 @@ export class Search extends APIResource {
34
34
  params: SearchModelSearchParams,
35
35
  options?: RequestOptions,
36
36
  ): PagePromise<SearchModelSearchResponsesSearchHitsOffset, SearchModelSearchResponse> {
37
- const { originalAssets, originalModels, projectId, ...body } = params;
37
+ const { originalAssets, projectId, ...body } = params;
38
38
  return this._client.getAPIList('/search/models', SearchHitsOffset<SearchModelSearchResponse>, {
39
- query: { originalAssets, originalModels, projectId },
39
+ query: { originalAssets, projectId },
40
+ body,
41
+ method: 'post',
42
+ ...options,
43
+ });
44
+ }
45
+
46
+ /**
47
+ * Search for workflows. At least one of the following fields must have a value:
48
+ * `query` or `filter`.
49
+ */
50
+ workflowSearch(
51
+ params: SearchWorkflowSearchParams,
52
+ options?: RequestOptions,
53
+ ): PagePromise<SearchWorkflowSearchResponsesSearchHitsOffset, SearchWorkflowSearchResponse> {
54
+ const { originalAssets, projectId, ...body } = params;
55
+ return this._client.getAPIList('/search/workflows', SearchHitsOffset<SearchWorkflowSearchResponse>, {
56
+ query: { originalAssets, projectId },
40
57
  body,
41
58
  method: 'post',
42
59
  ...options,
@@ -48,6 +65,8 @@ export type SearchAssetSearchResponsesSearchHitsOffset = SearchHitsOffset<Search
48
65
 
49
66
  export type SearchModelSearchResponsesSearchHitsOffset = SearchHitsOffset<SearchModelSearchResponse>;
50
67
 
68
+ export type SearchWorkflowSearchResponsesSearchHitsOffset = SearchHitsOffset<SearchWorkflowSearchResponse>;
69
+
51
70
  export interface SearchAssetSearchResponse {
52
71
  /**
53
72
  * Unique identifier for the asset (e.g., "asset_GTrL3mq4SXWyMxkOHRxlpw")
@@ -413,6 +432,141 @@ export namespace SearchModelSearchResponse {
413
432
  }
414
433
  }
415
434
 
435
+ export interface SearchWorkflowSearchResponse {
436
+ /**
437
+ * Unique identifier for the workflow (e.g., "workflow_abc123")
438
+ */
439
+ id: string;
440
+
441
+ /**
442
+ * User ID of the workflow creator/author
443
+ */
444
+ authorId: string;
445
+
446
+ /**
447
+ * Array of collection IDs this workflow belongs to
448
+ */
449
+ collectionIds: Array<string>;
450
+
451
+ /**
452
+ * Creation timestamp in ISO 8601 format (e.g., "2025-01-16T11:19:41.579Z")
453
+ */
454
+ createdAt: string;
455
+
456
+ /**
457
+ * Full description of the workflow
458
+ */
459
+ description: string;
460
+
461
+ /**
462
+ * Display name of the workflow
463
+ */
464
+ name: string;
465
+
466
+ /**
467
+ * Project ID of the workflow owner
468
+ */
469
+ ownerId: string;
470
+
471
+ /**
472
+ * Privacy setting of the workflow ("public", "private", or "unlisted")
473
+ */
474
+ privacy: string;
475
+
476
+ /**
477
+ * Status of the workflow (e.g., "ready", "draft", "deleted")
478
+ */
479
+ status: string;
480
+
481
+ /**
482
+ * Array of user-assigned tags for categorization
483
+ */
484
+ tags: Array<string>;
485
+
486
+ /**
487
+ * Team ID of the workflow owner
488
+ */
489
+ teamId: string;
490
+
491
+ /**
492
+ * Last modification timestamp in ISO 8601 format (e.g.,
493
+ * "2025-01-16T11:19:41.579Z")
494
+ */
495
+ updatedAt: string;
496
+
497
+ /**
498
+ * After image information for the workflow
499
+ */
500
+ after?: SearchWorkflowSearchResponse.After;
501
+
502
+ /**
503
+ * Before image information for the workflow
504
+ */
505
+ before?: SearchWorkflowSearchResponse.Before;
506
+
507
+ /**
508
+ * Score assigned to the workflow based on usage and popularity
509
+ */
510
+ score?: number;
511
+
512
+ /**
513
+ * Short description of the workflow
514
+ */
515
+ shortDescription?: string;
516
+
517
+ /**
518
+ * Thumbnail image information for the workflow
519
+ */
520
+ thumbnail?: SearchWorkflowSearchResponse.Thumbnail;
521
+ }
522
+
523
+ export namespace SearchWorkflowSearchResponse {
524
+ /**
525
+ * After image information for the workflow
526
+ */
527
+ export interface After {
528
+ /**
529
+ * ID of the asset used as after image
530
+ */
531
+ assetId: string;
532
+
533
+ /**
534
+ * Signed URL of the after image
535
+ */
536
+ url: string;
537
+ }
538
+
539
+ /**
540
+ * Before image information for the workflow
541
+ */
542
+ export interface Before {
543
+ /**
544
+ * ID of the asset used as before image
545
+ */
546
+ assetId: string;
547
+
548
+ /**
549
+ * Signed URL of the before image
550
+ */
551
+ url: string;
552
+ }
553
+
554
+ /**
555
+ * Thumbnail image information for the workflow
556
+ */
557
+ export interface Thumbnail {
558
+ /**
559
+ * ID of the asset used as thumbnail
560
+ */
561
+ assetId: string;
562
+
563
+ /**
564
+ * Signed URL of the thumbnail
565
+ */
566
+ url: string;
567
+ }
568
+ }
569
+
416
570
  export interface SearchAssetSearchParams extends SearchHitsOffsetParams {
417
571
  /**
418
572
  * Query param: If set to true, returns the original asset without transformation
@@ -522,11 +676,6 @@ export interface SearchModelSearchParams extends SearchHitsOffsetParams {
522
676
  */
523
677
  originalAssets?: boolean;
524
678
 
525
- /**
526
- * Query param
527
- */
528
- originalModels?: unknown;
529
-
530
679
  /**
531
680
  * Query param: The projectId used for ownership resource management. Either to
532
681
  * assert ownership or to set the owner of the resource(s)
@@ -624,13 +773,75 @@ export namespace SearchModelSearchParams {
624
773
  }
625
774
  }
626
775
 
776
+ export interface SearchWorkflowSearchParams extends SearchHitsOffsetParams {
777
+ /**
778
+ * Query param: If set to true, returns the original asset without transformation
779
+ */
780
+ originalAssets?: boolean;
781
+
782
+ /**
783
+ * Query param: The projectId used for ownership resource management. Either to
784
+ * assert ownership or to set the owner of the resource(s)
785
+ */
786
+ projectId?: string;
787
+
788
+ /**
789
+ * Body param: Filter queries by an attribute's value
790
+ */
791
+ filter?: string;
792
+
793
+ /**
794
+ * Body param: Maximum number of documents returned for a page. Must be used with
795
+ * `page`.
796
+ */
797
+ hitsPerPage?: number;
798
+
799
+ /**
800
+ * Body param: Maximum number of documents returned. Must be used with `offset`.
801
+ */
802
+ limit?: number;
803
+
804
+ /**
805
+ * Body param: Request a specific page of results. Must be used with `hitsPerPage`.
806
+ */
807
+ page?: number;
808
+
809
+ /**
810
+ * Body param: Search for public workflows not necessarily belonging to the current
811
+ * `ownerId`
812
+ */
813
+ public?: boolean;
814
+
815
+ /**
816
+ * Body param: A string used for querying search results.
817
+ */
818
+ query?: string;
819
+
820
+ /**
821
+ * Body param: Query embedding for hybrid search, if possible
822
+ */
823
+ querySemanticRatio?: number;
824
+
825
+ /**
826
+ * Body param: Sort the search results by the given attributes. Each attribute in
827
+ * the list must be followed by a colon (`:`) and the preferred sorting order:
828
+ * either ascending (`asc`) or descending (`desc`).
829
+ *
830
+ * Example: `['createdAt:desc']`
831
+ */
832
+ sortBy?: Array<string>;
833
+ }
834
+
627
835
  export declare namespace Search {
628
836
  export {
629
837
  type SearchAssetSearchResponse as SearchAssetSearchResponse,
630
838
  type SearchModelSearchResponse as SearchModelSearchResponse,
839
+ type SearchWorkflowSearchResponse as SearchWorkflowSearchResponse,
631
840
  type SearchAssetSearchResponsesSearchHitsOffset as SearchAssetSearchResponsesSearchHitsOffset,
632
841
  type SearchModelSearchResponsesSearchHitsOffset as SearchModelSearchResponsesSearchHitsOffset,
842
+ type SearchWorkflowSearchResponsesSearchHitsOffset as SearchWorkflowSearchResponsesSearchHitsOffset,
633
843
  type SearchAssetSearchParams as SearchAssetSearchParams,
634
844
  type SearchModelSearchParams as SearchModelSearchParams,
845
+ type SearchWorkflowSearchParams as SearchWorkflowSearchParams,
635
846
  };
636
847
  }
@@ -11,8 +11,8 @@ export class Uploads extends APIResource {
11
11
  * list of URLs for each part of the file.
12
12
  */
13
13
  create(params: UploadCreateParams, options?: RequestOptions): APIPromise<UploadCreateResponse> {
14
- const { projectId, ...body } = params;
15
- return this._client.post('/uploads', { query: { projectId }, body, ...options });
14
+ const { dryRun, projectId, ...body } = params;
15
+ return this._client.post('/uploads', { query: { dryRun, projectId }, body, ...options });
16
16
  }
17
17
 
18
18
  /**
@@ -280,6 +280,12 @@ export namespace UploadTriggerActionResponse {
280
280
  }
281
281
 
282
282
  export interface UploadCreateParams {
283
+ /**
284
+ * Query param: Estimate the operation instead of running it: the call returns a
285
+ * 269 response carrying the creative units cost. `api` estimates at the API tier.
286
+ */
287
+ dryRun?: 'true' | 'api';
288
+
283
289
  /**
284
290
  * Query param: The projectId used for ownership resource management. Either to
285
291
  * assert ownership or to set the owner of the resource(s)
@@ -365,7 +371,11 @@ export namespace UploadCreateParams {
365
371
  }
366
372
 
367
373
  export interface UploadRetrieveParams {
368
- projectId?: unknown;
374
+ /**
375
+ * The projectId used for ownership resource management. Either to assert ownership
376
+ * or to set the owner of the resource(s)
377
+ */
378
+ projectId?: string;
369
379
  }
370
380
 
371
381
  export interface UploadTriggerActionParams {
@@ -376,9 +386,10 @@ export interface UploadTriggerActionParams {
376
386
  action: 'complete';
377
387
 
378
388
  /**
379
- * Query param
389
+ * Query param: The projectId used for ownership resource management. Either to
390
+ * assert ownership or to set the owner of the resource(s)
380
391
  */
381
- projectId?: unknown;
392
+ projectId?: string;
382
393
  }
383
394
 
384
395
  export declare namespace Uploads {