@scenario-labs/sdk 3.0.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 (140) hide show
  1. package/CHANGELOG.md +106 -2
  2. package/client.d.mts +4 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +4 -4
  5. package/client.d.ts.map +1 -1
  6. package/client.js +2 -2
  7. package/client.js.map +1 -1
  8. package/client.mjs +2 -2
  9. package/client.mjs.map +1 -1
  10. package/core/pagination.d.mts +8 -8
  11. package/core/pagination.d.mts.map +1 -1
  12. package/core/pagination.d.ts +8 -8
  13. package/core/pagination.d.ts.map +1 -1
  14. package/core/pagination.js +8 -8
  15. package/core/pagination.js.map +1 -1
  16. package/core/pagination.mjs +8 -8
  17. package/core/pagination.mjs.map +1 -1
  18. package/lib/workflow_converter.d.mts +6 -0
  19. package/lib/workflow_converter.d.mts.map +1 -1
  20. package/lib/workflow_converter.d.ts +6 -0
  21. package/lib/workflow_converter.d.ts.map +1 -1
  22. package/lib/workflow_converter.js +99 -12
  23. package/lib/workflow_converter.js.map +1 -1
  24. package/lib/workflow_converter.mjs +99 -12
  25. package/lib/workflow_converter.mjs.map +1 -1
  26. package/lib/workflow_validator.d.mts +3 -1
  27. package/lib/workflow_validator.d.mts.map +1 -1
  28. package/lib/workflow_validator.d.ts +3 -1
  29. package/lib/workflow_validator.d.ts.map +1 -1
  30. package/lib/workflow_validator.js +41 -1
  31. package/lib/workflow_validator.js.map +1 -1
  32. package/lib/workflow_validator.mjs +41 -1
  33. package/lib/workflow_validator.mjs.map +1 -1
  34. package/package.json +1 -1
  35. package/resources/assets/assets.d.mts +198 -115
  36. package/resources/assets/assets.d.mts.map +1 -1
  37. package/resources/assets/assets.d.ts +198 -115
  38. package/resources/assets/assets.d.ts.map +1 -1
  39. package/resources/assets/assets.js.map +1 -1
  40. package/resources/assets/assets.mjs.map +1 -1
  41. package/resources/assets/download.d.mts +15 -0
  42. package/resources/assets/download.d.mts.map +1 -1
  43. package/resources/assets/download.d.ts +15 -0
  44. package/resources/assets/download.d.ts.map +1 -1
  45. package/resources/assets/download.js +2 -2
  46. package/resources/assets/download.js.map +1 -1
  47. package/resources/assets/download.mjs +2 -2
  48. package/resources/assets/download.mjs.map +1 -1
  49. package/resources/generate.d.mts +383 -225
  50. package/resources/generate.d.mts.map +1 -1
  51. package/resources/generate.d.ts +383 -225
  52. package/resources/generate.d.ts.map +1 -1
  53. package/resources/generate.js +2 -6
  54. package/resources/generate.js.map +1 -1
  55. package/resources/generate.mjs +2 -6
  56. package/resources/generate.mjs.map +1 -1
  57. package/resources/index.d.mts +1 -1
  58. package/resources/index.d.mts.map +1 -1
  59. package/resources/index.d.ts +1 -1
  60. package/resources/index.d.ts.map +1 -1
  61. package/resources/index.js.map +1 -1
  62. package/resources/index.mjs.map +1 -1
  63. package/resources/jobs.d.mts +77 -46
  64. package/resources/jobs.d.mts.map +1 -1
  65. package/resources/jobs.d.ts +77 -46
  66. package/resources/jobs.d.ts.map +1 -1
  67. package/resources/jobs.js +2 -6
  68. package/resources/jobs.js.map +1 -1
  69. package/resources/jobs.mjs +2 -6
  70. package/resources/jobs.mjs.map +1 -1
  71. package/resources/models/description.d.mts +22 -4
  72. package/resources/models/description.d.mts.map +1 -1
  73. package/resources/models/description.d.ts +22 -4
  74. package/resources/models/description.d.ts.map +1 -1
  75. package/resources/models/examples.d.mts +84 -50
  76. package/resources/models/examples.d.mts.map +1 -1
  77. package/resources/models/examples.d.ts +84 -50
  78. package/resources/models/examples.d.ts.map +1 -1
  79. package/resources/models/models.d.mts +131 -35
  80. package/resources/models/models.d.mts.map +1 -1
  81. package/resources/models/models.d.ts +131 -35
  82. package/resources/models/models.d.ts.map +1 -1
  83. package/resources/models/models.js +6 -2
  84. package/resources/models/models.js.map +1 -1
  85. package/resources/models/models.mjs +6 -2
  86. package/resources/models/models.mjs.map +1 -1
  87. package/resources/models/train.d.mts +78 -38
  88. package/resources/models/train.d.mts.map +1 -1
  89. package/resources/models/train.d.ts +78 -38
  90. package/resources/models/train.d.ts.map +1 -1
  91. package/resources/models/train.js +2 -2
  92. package/resources/models/train.js.map +1 -1
  93. package/resources/models/train.mjs +2 -2
  94. package/resources/models/train.mjs.map +1 -1
  95. package/resources/search.d.mts +168 -5
  96. package/resources/search.d.mts.map +1 -1
  97. package/resources/search.d.ts +168 -5
  98. package/resources/search.d.ts.map +1 -1
  99. package/resources/search.js +15 -2
  100. package/resources/search.js.map +1 -1
  101. package/resources/search.mjs +15 -2
  102. package/resources/search.mjs.map +1 -1
  103. package/resources/uploads.d.mts +13 -3
  104. package/resources/uploads.d.mts.map +1 -1
  105. package/resources/uploads.d.ts +13 -3
  106. package/resources/uploads.d.ts.map +1 -1
  107. package/resources/uploads.js +2 -2
  108. package/resources/uploads.js.map +1 -1
  109. package/resources/uploads.mjs +2 -2
  110. package/resources/uploads.mjs.map +1 -1
  111. package/resources/usages.d.mts +36 -29
  112. package/resources/usages.d.mts.map +1 -1
  113. package/resources/usages.d.ts +36 -29
  114. package/resources/usages.d.ts.map +1 -1
  115. package/resources/workflows.d.mts +283 -130
  116. package/resources/workflows.d.mts.map +1 -1
  117. package/resources/workflows.d.ts +283 -130
  118. package/resources/workflows.d.ts.map +1 -1
  119. package/src/client.ts +10 -4
  120. package/src/core/pagination.ts +20 -20
  121. package/src/lib/workflow_converter.ts +126 -12
  122. package/src/lib/workflow_validator.ts +68 -1
  123. package/src/resources/assets/assets.ts +590 -115
  124. package/src/resources/assets/download.ts +19 -2
  125. package/src/resources/generate.ts +499 -240
  126. package/src/resources/index.ts +3 -0
  127. package/src/resources/jobs.ts +79 -53
  128. package/src/resources/models/description.ts +120 -4
  129. package/src/resources/models/examples.ts +182 -50
  130. package/src/resources/models/models.ts +138 -37
  131. package/src/resources/models/train.ts +82 -42
  132. package/src/resources/search.ts +218 -7
  133. package/src/resources/uploads.ts +16 -5
  134. package/src/resources/usages.ts +42 -29
  135. package/src/resources/workflows.ts +283 -130
  136. package/src/version.ts +1 -1
  137. package/version.d.mts +1 -1
  138. package/version.d.ts +1 -1
  139. package/version.js +1 -1
  140. package/version.mjs +1 -1
@@ -31,7 +31,7 @@ export interface UsageListResponse {
31
31
 
32
32
  nsfwUsages?: Array<UsageListResponse.NsfwUsage>;
33
33
 
34
- slopUsages?: Array<UsageListResponse.SlopUsage>;
34
+ qualityGateUsages?: Array<UsageListResponse.QualityGateUsage>;
35
35
 
36
36
  usages?: Array<UsageListResponse.Usage>;
37
37
  }
@@ -282,7 +282,7 @@ export namespace UsageListResponse {
282
282
 
283
283
  /**
284
284
  * Compute Units consumed per billing action, when a breakdown is available
285
- * (example: `{ "slop-detection": 12 }`). Values are included in `value`.
285
+ * (example: `{ "quality-gate": 12 }`). Values are included in `value`.
286
286
  */
287
287
  costDetails?: unknown;
288
288
  }
@@ -660,12 +660,12 @@ export namespace UsageListResponse {
660
660
  /**
661
661
  * Camera eye position in the splat's world frame.
662
662
  */
663
- position: Array<unknown>;
663
+ position: Array<number>;
664
664
 
665
665
  /**
666
666
  * Look-at point in the splat's world frame.
667
667
  */
668
- target: Array<unknown>;
668
+ target: Array<number>;
669
669
 
670
670
  /**
671
671
  * Vertical field of view in degrees (defaults to 50 in the renderer).
@@ -1028,7 +1028,9 @@ export namespace UsageListResponse {
1028
1028
  * The asset kind of the input. Only taken into account for \`file\` and
1029
1029
  * \`file_array\` input types. If model provides multiple kinds, the input will be
1030
1030
  * not able to create the asset on the flight on API side with dataurl without
1031
- * data:kind, prefix
1031
+ * data:kind, prefix \`file\` and \`file_array\` inputs always expose a kind: when
1032
+ * a model does not declare one, \`image\` is returned, which is the kind used at
1033
+ * generation time.
1032
1034
  */
1033
1035
  kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
1034
1036
 
@@ -1056,8 +1058,9 @@ export namespace UsageListResponse {
1056
1058
  maxDuration?: number;
1057
1059
 
1058
1060
  /**
1059
- * The maximum allowed length for \`string\` inputs. Also applies to each item in
1060
- * \`string_array\`.
1061
+ * The maximum allowed length for \`string\` and \`model\` inputs, in characters.
1062
+ * For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
1063
+ * ITEMS instead — the length of each item is not constrained.
1061
1064
  */
1062
1065
  maxLength?: number;
1063
1066
 
@@ -1074,8 +1077,9 @@ export namespace UsageListResponse {
1074
1077
  min?: number;
1075
1078
 
1076
1079
  /**
1077
- * The minimum allowed length for string inputs. Also applies to each item in
1078
- * \`string_array\`.
1080
+ * The minimum allowed length for \`string\` and \`model\` inputs, in characters.
1081
+ * For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
1082
+ * ITEMS instead — the length of each item is not constrained.
1079
1083
  */
1080
1084
  minLength?: number;
1081
1085
 
@@ -1255,7 +1259,9 @@ export namespace UsageListResponse {
1255
1259
  * The asset kind of the input. Only taken into account for \`file\` and
1256
1260
  * \`file_array\` input types. If model provides multiple kinds, the input will be
1257
1261
  * not able to create the asset on the flight on API side with dataurl without
1258
- * data:kind, prefix
1262
+ * data:kind, prefix \`file\` and \`file_array\` inputs always expose a kind: when
1263
+ * a model does not declare one, \`image\` is returned, which is the kind used at
1264
+ * generation time.
1259
1265
  */
1260
1266
  kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
1261
1267
 
@@ -1283,8 +1289,9 @@ export namespace UsageListResponse {
1283
1289
  maxDuration?: number;
1284
1290
 
1285
1291
  /**
1286
- * The maximum allowed length for \`string\` inputs. Also applies to each item in
1287
- * \`string_array\`.
1292
+ * The maximum allowed length for \`string\` and \`model\` inputs, in characters.
1293
+ * For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
1294
+ * ITEMS instead — the length of each item is not constrained.
1288
1295
  */
1289
1296
  maxLength?: number;
1290
1297
 
@@ -1301,8 +1308,9 @@ export namespace UsageListResponse {
1301
1308
  min?: number;
1302
1309
 
1303
1310
  /**
1304
- * The minimum allowed length for string inputs. Also applies to each item in
1305
- * \`string_array\`.
1311
+ * The minimum allowed length for \`string\` and \`model\` inputs, in characters.
1312
+ * For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
1313
+ * ITEMS instead — the length of each item is not constrained.
1306
1314
  */
1307
1315
  minLength?: number;
1308
1316
 
@@ -1756,13 +1764,13 @@ export namespace UsageListResponse {
1756
1764
  }
1757
1765
 
1758
1766
  /**
1759
- * A SlopGuard verdict series: one per bucket (total | pass | warn | fail).
1767
+ * A Quality Gate verdict series: one per bucket (total | pass | warn | fail).
1760
1768
  */
1761
- export interface SlopUsage {
1769
+ export interface QualityGateUsage {
1762
1770
  /**
1763
1771
  * The data points
1764
1772
  */
1765
- points: Array<SlopUsage.Point>;
1773
+ points: Array<QualityGateUsage.Point>;
1766
1774
 
1767
1775
  /**
1768
1776
  * The verdict bucket: "total", "pass", "warn", or "fail"
@@ -1770,9 +1778,9 @@ export namespace UsageListResponse {
1770
1778
  verdict: string;
1771
1779
  }
1772
1780
 
1773
- export namespace SlopUsage {
1781
+ export namespace QualityGateUsage {
1774
1782
  /**
1775
- * One time-bucket point in a SlopGuard verdict series.
1783
+ * One time-bucket point in a Quality Gate verdict series.
1776
1784
  */
1777
1785
  export interface Point {
1778
1786
  /**
@@ -1885,11 +1893,11 @@ export interface UsageListParams {
1885
1893
 
1886
1894
  /**
1887
1895
  * When set, points whose numeric fields are all zero are removed from `usages`,
1888
- * `modelUsages`, `assetUsages`, `nsfwUsages` and `slopUsages`. The parent entry
1889
- * (model, kind, label, usageName) is preserved with `points: []` so callers still
1890
- * see every row. Useful on wide windows × fine granularities × many models, where
1891
- * the zero-fill can push the response past the 6 MB API Gateway sync limit. The
1892
- * bare `?dropZeroPoints` form, plus any value (`true`, `1`, `yes`, `on`, …)
1896
+ * `modelUsages`, `assetUsages`, `nsfwUsages` and `qualityGateUsages`. The parent
1897
+ * entry (model, kind, label, usageName) is preserved with `points: []` so callers
1898
+ * still see every row. Useful on wide windows × fine granularities × many models,
1899
+ * where the zero-fill can push the response past the 6 MB API Gateway sync limit.
1900
+ * The bare `?dropZeroPoints` form, plus any value (`true`, `1`, `yes`, `on`, …)
1893
1901
  * enables it; absent or explicit falsy literals (`false`, `0`, `no`, `off`)
1894
1902
  * disable it. Default disabled for backwards compatibility.
1895
1903
  */
@@ -1914,8 +1922,7 @@ export interface UsageListParams {
1914
1922
  startDate?: string;
1915
1923
 
1916
1924
  /**
1917
- * The teamId used for ownership resource management. Either to assert ownership or
1918
- * to set the owner of the resource(s)
1925
+ * The team identifier for usage data. If omitted, the default team will be used.
1919
1926
  */
1920
1927
  teamId?: string;
1921
1928
 
@@ -1928,11 +1935,17 @@ export interface UsageListParams {
1928
1935
  /**
1929
1936
  * The type of the usage data. Can be one or more comma separated values. Can be
1930
1937
  * any of the following values: usages, activity, consumption, model-usages,
1931
- * asset-usages, nsfw-usages, slop-usages. Default is all types. If bad type or
1932
- * empty, all types will be returned.
1938
+ * asset-usages, nsfw-usages, quality-gate-usages. Default is all types. If bad
1939
+ * type or empty, all types will be returned.
1933
1940
  */
1934
1941
  type?: Array<
1935
- 'usages' | 'activity' | 'consumption' | 'model-usages' | 'asset-usages' | 'nsfw-usages' | 'slop-usages'
1942
+ | 'usages'
1943
+ | 'activity'
1944
+ | 'consumption'
1945
+ | 'model-usages'
1946
+ | 'asset-usages'
1947
+ | 'nsfw-usages'
1948
+ | 'quality-gate-usages'
1936
1949
  >;
1937
1950
 
1938
1951
  /**