@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.
- package/CHANGELOG.md +106 -2
- package/client.d.mts +4 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -4
- package/client.d.ts.map +1 -1
- package/client.js +2 -2
- package/client.js.map +1 -1
- package/client.mjs +2 -2
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +8 -8
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +8 -8
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js +8 -8
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +8 -8
- package/core/pagination.mjs.map +1 -1
- package/lib/workflow_converter.d.mts +6 -0
- package/lib/workflow_converter.d.mts.map +1 -1
- package/lib/workflow_converter.d.ts +6 -0
- package/lib/workflow_converter.d.ts.map +1 -1
- package/lib/workflow_converter.js +99 -12
- package/lib/workflow_converter.js.map +1 -1
- package/lib/workflow_converter.mjs +99 -12
- package/lib/workflow_converter.mjs.map +1 -1
- package/lib/workflow_validator.d.mts +3 -1
- package/lib/workflow_validator.d.mts.map +1 -1
- package/lib/workflow_validator.d.ts +3 -1
- package/lib/workflow_validator.d.ts.map +1 -1
- package/lib/workflow_validator.js +41 -1
- package/lib/workflow_validator.js.map +1 -1
- package/lib/workflow_validator.mjs +41 -1
- package/lib/workflow_validator.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/assets/assets.d.mts +198 -115
- package/resources/assets/assets.d.mts.map +1 -1
- package/resources/assets/assets.d.ts +198 -115
- package/resources/assets/assets.d.ts.map +1 -1
- package/resources/assets/assets.js.map +1 -1
- package/resources/assets/assets.mjs.map +1 -1
- package/resources/assets/download.d.mts +15 -0
- package/resources/assets/download.d.mts.map +1 -1
- package/resources/assets/download.d.ts +15 -0
- package/resources/assets/download.d.ts.map +1 -1
- package/resources/assets/download.js +2 -2
- package/resources/assets/download.js.map +1 -1
- package/resources/assets/download.mjs +2 -2
- package/resources/assets/download.mjs.map +1 -1
- package/resources/generate.d.mts +383 -225
- package/resources/generate.d.mts.map +1 -1
- package/resources/generate.d.ts +383 -225
- package/resources/generate.d.ts.map +1 -1
- package/resources/generate.js +2 -6
- package/resources/generate.js.map +1 -1
- package/resources/generate.mjs +2 -6
- package/resources/generate.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/jobs.d.mts +77 -46
- package/resources/jobs.d.mts.map +1 -1
- package/resources/jobs.d.ts +77 -46
- package/resources/jobs.d.ts.map +1 -1
- package/resources/jobs.js +2 -6
- package/resources/jobs.js.map +1 -1
- package/resources/jobs.mjs +2 -6
- package/resources/jobs.mjs.map +1 -1
- package/resources/models/description.d.mts +22 -4
- package/resources/models/description.d.mts.map +1 -1
- package/resources/models/description.d.ts +22 -4
- package/resources/models/description.d.ts.map +1 -1
- package/resources/models/examples.d.mts +84 -50
- package/resources/models/examples.d.mts.map +1 -1
- package/resources/models/examples.d.ts +84 -50
- package/resources/models/examples.d.ts.map +1 -1
- package/resources/models/models.d.mts +131 -35
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +131 -35
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js +6 -2
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs +6 -2
- package/resources/models/models.mjs.map +1 -1
- package/resources/models/train.d.mts +78 -38
- package/resources/models/train.d.mts.map +1 -1
- package/resources/models/train.d.ts +78 -38
- package/resources/models/train.d.ts.map +1 -1
- package/resources/models/train.js +2 -2
- package/resources/models/train.js.map +1 -1
- package/resources/models/train.mjs +2 -2
- package/resources/models/train.mjs.map +1 -1
- package/resources/search.d.mts +168 -5
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts +168 -5
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +15 -2
- package/resources/search.js.map +1 -1
- package/resources/search.mjs +15 -2
- package/resources/search.mjs.map +1 -1
- package/resources/uploads.d.mts +13 -3
- package/resources/uploads.d.mts.map +1 -1
- package/resources/uploads.d.ts +13 -3
- package/resources/uploads.d.ts.map +1 -1
- package/resources/uploads.js +2 -2
- package/resources/uploads.js.map +1 -1
- package/resources/uploads.mjs +2 -2
- package/resources/uploads.mjs.map +1 -1
- package/resources/usages.d.mts +36 -29
- package/resources/usages.d.mts.map +1 -1
- package/resources/usages.d.ts +36 -29
- package/resources/usages.d.ts.map +1 -1
- package/resources/workflows.d.mts +283 -130
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +283 -130
- package/resources/workflows.d.ts.map +1 -1
- package/src/client.ts +10 -4
- package/src/core/pagination.ts +20 -20
- package/src/lib/workflow_converter.ts +126 -12
- package/src/lib/workflow_validator.ts +68 -1
- package/src/resources/assets/assets.ts +590 -115
- package/src/resources/assets/download.ts +19 -2
- package/src/resources/generate.ts +499 -240
- package/src/resources/index.ts +3 -0
- package/src/resources/jobs.ts +79 -53
- package/src/resources/models/description.ts +120 -4
- package/src/resources/models/examples.ts +182 -50
- package/src/resources/models/models.ts +138 -37
- package/src/resources/models/train.ts +82 -42
- package/src/resources/search.ts +218 -7
- package/src/resources/uploads.ts +16 -5
- package/src/resources/usages.ts +42 -29
- package/src/resources/workflows.ts +283 -130
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/usages.ts
CHANGED
|
@@ -31,7 +31,7 @@ export interface UsageListResponse {
|
|
|
31
31
|
|
|
32
32
|
nsfwUsages?: Array<UsageListResponse.NsfwUsage>;
|
|
33
33
|
|
|
34
|
-
|
|
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: `{ "
|
|
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<
|
|
663
|
+
position: Array<number>;
|
|
664
664
|
|
|
665
665
|
/**
|
|
666
666
|
* Look-at point in the splat's world frame.
|
|
667
667
|
*/
|
|
668
|
-
target: Array<
|
|
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\`
|
|
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
|
|
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\`
|
|
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
|
|
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
|
|
1767
|
+
* A Quality Gate verdict series: one per bucket (total | pass | warn | fail).
|
|
1760
1768
|
*/
|
|
1761
|
-
export interface
|
|
1769
|
+
export interface QualityGateUsage {
|
|
1762
1770
|
/**
|
|
1763
1771
|
* The data points
|
|
1764
1772
|
*/
|
|
1765
|
-
points: Array<
|
|
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
|
|
1781
|
+
export namespace QualityGateUsage {
|
|
1774
1782
|
/**
|
|
1775
|
-
* One time-bucket point in a
|
|
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 `
|
|
1889
|
-
* (model, kind, label, usageName) is preserved with `points: []` so callers
|
|
1890
|
-
* see every row. Useful on wide windows × fine granularities × many models,
|
|
1891
|
-
* the zero-fill can push the response past the 6 MB API Gateway sync limit.
|
|
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
|
|
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,
|
|
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
|
-
|
|
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
|
/**
|