@scenario-labs/sdk 1.1.0 → 2.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.
- package/CHANGELOG.md +51 -0
- package/client.d.mts +6 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -6
- package/client.d.ts.map +1 -1
- package/client.js +67 -43
- package/client.js.map +1 -1
- package/client.mjs +67 -44
- package/client.mjs.map +1 -1
- package/core/api-promise.js +7 -7
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs +7 -7
- package/core/api-promise.mjs.map +1 -1
- package/core/error.js +6 -0
- package/core/error.js.map +1 -1
- package/core/error.mjs +6 -0
- package/core/error.mjs.map +1 -1
- package/core/pagination.js +24 -6
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +24 -6
- package/core/pagination.mjs.map +1 -1
- package/core/resource.js +1 -0
- package/core/resource.js.map +1 -1
- package/core/resource.mjs +1 -0
- package/core/resource.mjs.map +1 -1
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/internal/detect-platform.js +1 -1
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/qs/stringify.js +1 -1
- package/internal/qs/stringify.js.map +1 -1
- package/internal/qs/stringify.mjs +1 -1
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/request-options.d.mts +0 -4
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +0 -4
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/internal/to-file.js +2 -2
- package/internal/to-file.js.map +1 -1
- package/internal/to-file.mjs +2 -2
- package/internal/to-file.mjs.map +1 -1
- package/internal/tslib.js +0 -18
- package/internal/tslib.mjs +1 -17
- package/internal/types.d.mts +6 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +6 -6
- package/internal/types.d.ts.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -0
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +2 -0
- package/internal/utils/log.mjs.map +1 -1
- package/lib/job.js +3 -3
- package/lib/job.js.map +1 -1
- package/lib/job.mjs +3 -3
- package/lib/job.mjs.map +1 -1
- package/lib/models.js +1 -4
- package/lib/models.js.map +1 -1
- package/lib/models.mjs +1 -4
- package/lib/models.mjs.map +1 -1
- package/lib/scenario.js +6 -9
- package/lib/scenario.js.map +1 -1
- package/lib/scenario.mjs +6 -9
- package/lib/scenario.mjs.map +1 -1
- package/lib/upload.js +6 -6
- package/lib/upload.js.map +1 -1
- package/lib/upload.mjs +6 -6
- package/lib/upload.mjs.map +1 -1
- package/lib/workflow.d.mts +2 -2
- package/lib/workflow.d.mts.map +1 -1
- package/lib/workflow.d.ts +2 -2
- package/lib/workflow.d.ts.map +1 -1
- package/lib/workflow.js +2 -2
- package/lib/workflow.js.map +1 -1
- package/lib/workflow.mjs +2 -2
- package/lib/workflow.mjs.map +1 -1
- package/lib/workflow_converter.d.mts +174 -0
- package/lib/workflow_converter.d.mts.map +1 -0
- package/lib/workflow_converter.d.ts +174 -0
- package/lib/workflow_converter.d.ts.map +1 -0
- package/lib/workflow_converter.js +995 -0
- package/lib/workflow_converter.js.map +1 -0
- package/lib/workflow_converter.mjs +992 -0
- package/lib/workflow_converter.mjs.map +1 -0
- package/package.json +1 -1
- package/resources/assets/assets.d.mts +13 -5
- package/resources/assets/assets.d.mts.map +1 -1
- package/resources/assets/assets.d.ts +13 -5
- package/resources/assets/assets.d.ts.map +1 -1
- package/resources/assets/assets.js +1 -8
- package/resources/assets/assets.js.map +1 -1
- package/resources/assets/assets.mjs +1 -8
- package/resources/assets/assets.mjs.map +1 -1
- package/resources/assets/index.d.mts +0 -1
- package/resources/assets/index.d.mts.map +1 -1
- package/resources/assets/index.d.ts +0 -1
- package/resources/assets/index.d.ts.map +1 -1
- package/resources/assets/index.js +1 -3
- package/resources/assets/index.js.map +1 -1
- package/resources/assets/index.mjs +0 -1
- package/resources/assets/index.mjs.map +1 -1
- package/resources/collections/collections.js +2 -5
- package/resources/collections/collections.js.map +1 -1
- package/resources/collections/collections.mjs +2 -5
- package/resources/collections/collections.mjs.map +1 -1
- package/resources/generate.d.mts +96 -0
- package/resources/generate.d.mts.map +1 -1
- package/resources/generate.d.ts +96 -0
- package/resources/generate.d.ts.map +1 -1
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/jobs.d.mts +46 -3
- package/resources/jobs.d.mts.map +1 -1
- package/resources/jobs.d.ts +46 -3
- package/resources/jobs.d.ts.map +1 -1
- package/resources/models/examples.d.mts +24 -0
- package/resources/models/examples.d.mts.map +1 -1
- package/resources/models/examples.d.ts +24 -0
- package/resources/models/examples.d.ts.map +1 -1
- package/resources/models/models.d.mts +55 -11
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +55 -11
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js +4 -7
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs +4 -7
- package/resources/models/models.mjs.map +1 -1
- package/resources/models/train.d.mts +24 -0
- package/resources/models/train.d.mts.map +1 -1
- package/resources/models/train.d.ts +24 -0
- package/resources/models/train.d.ts.map +1 -1
- package/resources/oscu.d.mts +5 -0
- package/resources/oscu.d.mts.map +1 -1
- package/resources/oscu.d.ts +5 -0
- package/resources/oscu.d.ts.map +1 -1
- package/resources/oscu.js +5 -0
- package/resources/oscu.js.map +1 -1
- package/resources/oscu.mjs +5 -0
- package/resources/oscu.mjs.map +1 -1
- package/resources/pricing/index.d.mts +3 -0
- package/resources/pricing/index.d.mts.map +1 -0
- package/resources/pricing/index.d.ts +3 -0
- package/resources/pricing/index.d.ts.map +1 -0
- package/resources/pricing/index.js +9 -0
- package/resources/pricing/index.js.map +1 -0
- package/resources/pricing/index.mjs +4 -0
- package/resources/pricing/index.mjs.map +1 -0
- package/resources/pricing/oscu.d.mts +25 -0
- package/resources/pricing/oscu.d.mts.map +1 -0
- package/resources/pricing/oscu.d.ts +25 -0
- package/resources/pricing/oscu.d.ts.map +1 -0
- package/resources/pricing/oscu.js +16 -0
- package/resources/pricing/oscu.js.map +1 -0
- package/resources/pricing/oscu.mjs +12 -0
- package/resources/pricing/oscu.mjs.map +1 -0
- package/resources/pricing/pricing.d.mts +10 -0
- package/resources/pricing/pricing.d.mts.map +1 -0
- package/resources/pricing/pricing.d.ts +10 -0
- package/resources/pricing/pricing.d.ts.map +1 -0
- package/resources/pricing/pricing.js +14 -0
- package/resources/pricing/pricing.js.map +1 -0
- package/resources/pricing/pricing.mjs +9 -0
- package/resources/pricing/pricing.mjs.map +1 -0
- package/resources/pricing.d.mts +2 -0
- package/resources/pricing.d.mts.map +1 -0
- package/resources/pricing.d.ts +2 -0
- package/resources/pricing.d.ts.map +1 -0
- package/resources/pricing.js +6 -0
- package/resources/pricing.js.map +1 -0
- package/resources/pricing.mjs +3 -0
- package/resources/pricing.mjs.map +1 -0
- package/resources/usages.d.mts +29 -4
- package/resources/usages.d.mts.map +1 -1
- package/resources/usages.d.ts +29 -4
- package/resources/usages.d.ts.map +1 -1
- package/resources/workflows.d.mts +1298 -1152
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +1298 -1152
- package/resources/workflows.d.ts.map +1 -1
- package/resources/workflows.js +8 -4
- package/resources/workflows.js.map +1 -1
- package/resources/workflows.mjs +8 -4
- package/resources/workflows.mjs.map +1 -1
- package/src/client.ts +24 -11
- package/src/index.ts +14 -0
- package/src/internal/request-options.ts +0 -2
- package/src/internal/types.ts +6 -8
- package/src/internal/utils/log.ts +2 -0
- package/src/lib/workflow.ts +4 -4
- package/src/lib/workflow_converter.ts +1250 -0
- package/src/resources/assets/assets.ts +17 -13
- package/src/resources/assets/index.ts +0 -6
- package/src/resources/generate.ts +112 -0
- package/src/resources/index.ts +3 -1
- package/src/resources/jobs.ts +54 -4
- package/src/resources/models/examples.ts +28 -0
- package/src/resources/models/models.ts +100 -11
- package/src/resources/models/train.ts +28 -0
- package/src/resources/oscu.ts +5 -0
- package/src/resources/pricing/index.ts +4 -0
- package/src/resources/pricing/oscu.ts +35 -0
- package/src/resources/pricing/pricing.ts +15 -0
- package/src/resources/pricing.ts +3 -0
- package/src/resources/usages.ts +33 -3
- package/src/resources/workflows.ts +1691 -1519
- 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/resources/assets/public.d.mts +0 -1538
- package/resources/assets/public.d.mts.map +0 -1
- package/resources/assets/public.d.ts +0 -1538
- package/resources/assets/public.d.ts.map +0 -1
- package/resources/assets/public.js +0 -28
- package/resources/assets/public.js.map +0 -1
- package/resources/assets/public.mjs +0 -24
- package/resources/assets/public.mjs.map +0 -1
- package/src/resources/assets/public.ts +0 -2461
|
@@ -511,6 +511,13 @@ export namespace TrainActionResponse {
|
|
|
511
511
|
*/
|
|
512
512
|
max?: number;
|
|
513
513
|
|
|
514
|
+
/**
|
|
515
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
516
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
517
|
+
* \`asset.properties.duration\` at job creation time.
|
|
518
|
+
*/
|
|
519
|
+
maxDuration?: number;
|
|
520
|
+
|
|
514
521
|
/**
|
|
515
522
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
516
523
|
* \`string_array\`.
|
|
@@ -1743,6 +1750,13 @@ export namespace TrainTriggerResponse {
|
|
|
1743
1750
|
*/
|
|
1744
1751
|
max?: number;
|
|
1745
1752
|
|
|
1753
|
+
/**
|
|
1754
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
1755
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
1756
|
+
* \`asset.properties.duration\` at job creation time.
|
|
1757
|
+
*/
|
|
1758
|
+
maxDuration?: number;
|
|
1759
|
+
|
|
1746
1760
|
/**
|
|
1747
1761
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
1748
1762
|
* \`string_array\`.
|
|
@@ -1969,6 +1983,13 @@ export namespace TrainTriggerResponse {
|
|
|
1969
1983
|
*/
|
|
1970
1984
|
max?: number;
|
|
1971
1985
|
|
|
1986
|
+
/**
|
|
1987
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
1988
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
1989
|
+
* \`asset.properties.duration\` at job creation time.
|
|
1990
|
+
*/
|
|
1991
|
+
maxDuration?: number;
|
|
1992
|
+
|
|
1972
1993
|
/**
|
|
1973
1994
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
1974
1995
|
* \`string_array\`.
|
|
@@ -2767,6 +2788,13 @@ export namespace TrainTriggerResponse {
|
|
|
2767
2788
|
*/
|
|
2768
2789
|
max?: number;
|
|
2769
2790
|
|
|
2791
|
+
/**
|
|
2792
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
2793
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
2794
|
+
* \`asset.properties.duration\` at job creation time.
|
|
2795
|
+
*/
|
|
2796
|
+
maxDuration?: number;
|
|
2797
|
+
|
|
2770
2798
|
/**
|
|
2771
2799
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
2772
2800
|
* \`string_array\`.
|
package/src/resources/oscu.ts
CHANGED
|
@@ -4,10 +4,15 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
import { APIPromise } from '../core/api-promise';
|
|
5
5
|
import { RequestOptions } from '../internal/request-options';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Use `pricing` instead.
|
|
9
|
+
*/
|
|
7
10
|
export class Oscu extends APIResource {
|
|
8
11
|
/**
|
|
9
12
|
* Get the public Prepaid Compute Units (or OSCU for One Shot Compute Units) price
|
|
10
13
|
* details
|
|
14
|
+
*
|
|
15
|
+
* @deprecated Use `pricing` instead.
|
|
11
16
|
*/
|
|
12
17
|
retrievePrices(options?: RequestOptions): APIPromise<OscuRetrievePricesResponse> {
|
|
13
18
|
return this._client.get('/oscu/prices', options);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
|
|
7
|
+
export class Oscu extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get the public Prepaid Compute Units (or OSCU for One Shot Compute Units) price
|
|
10
|
+
* details
|
|
11
|
+
*/
|
|
12
|
+
retrievePrices(options?: RequestOptions): APIPromise<OscuRetrievePricesResponse> {
|
|
13
|
+
return this._client.get('/oscu/prices', options);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface OscuRetrievePricesResponse {
|
|
18
|
+
prices: Array<OscuRetrievePricesResponse.Price>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export namespace OscuRetrievePricesResponse {
|
|
22
|
+
export interface Price {
|
|
23
|
+
creativeUnits?: number;
|
|
24
|
+
|
|
25
|
+
currency?: string;
|
|
26
|
+
|
|
27
|
+
expires?: number;
|
|
28
|
+
|
|
29
|
+
unitAmount?: number;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export declare namespace Oscu {
|
|
34
|
+
export { type OscuRetrievePricesResponse as OscuRetrievePricesResponse };
|
|
35
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as OscuAPI from './oscu';
|
|
5
|
+
import { Oscu, OscuRetrievePricesResponse } from './oscu';
|
|
6
|
+
|
|
7
|
+
export class Pricing extends APIResource {
|
|
8
|
+
oscu: OscuAPI.Oscu = new OscuAPI.Oscu(this._client);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
Pricing.Oscu = Oscu;
|
|
12
|
+
|
|
13
|
+
export declare namespace Pricing {
|
|
14
|
+
export { Oscu as Oscu, type OscuRetrievePricesResponse as OscuRetrievePricesResponse };
|
|
15
|
+
}
|
package/src/resources/usages.ts
CHANGED
|
@@ -138,8 +138,10 @@ export namespace UsageListResponse {
|
|
|
138
138
|
| 'update-model-prompt-guide'
|
|
139
139
|
| 'update-oscu-auto-refill'
|
|
140
140
|
| 'update-project'
|
|
141
|
+
| 'update-project-instructions'
|
|
141
142
|
| 'update-subscription'
|
|
142
143
|
| 'update-team'
|
|
144
|
+
| 'update-team-instructions'
|
|
143
145
|
| 'update-team-member'
|
|
144
146
|
| 'upscale'
|
|
145
147
|
| 'vectorization';
|
|
@@ -962,6 +964,13 @@ export namespace UsageListResponse {
|
|
|
962
964
|
*/
|
|
963
965
|
max?: number;
|
|
964
966
|
|
|
967
|
+
/**
|
|
968
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
969
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
970
|
+
* \`asset.properties.duration\` at job creation time.
|
|
971
|
+
*/
|
|
972
|
+
maxDuration?: number;
|
|
973
|
+
|
|
965
974
|
/**
|
|
966
975
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
967
976
|
* \`string_array\`.
|
|
@@ -1188,6 +1197,13 @@ export namespace UsageListResponse {
|
|
|
1188
1197
|
*/
|
|
1189
1198
|
max?: number;
|
|
1190
1199
|
|
|
1200
|
+
/**
|
|
1201
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
1202
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
1203
|
+
* \`asset.properties.duration\` at job creation time.
|
|
1204
|
+
*/
|
|
1205
|
+
maxDuration?: number;
|
|
1206
|
+
|
|
1191
1207
|
/**
|
|
1192
1208
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
1193
1209
|
* \`string_array\`.
|
|
@@ -1732,6 +1748,18 @@ export interface UsageListParams {
|
|
|
1732
1748
|
*/
|
|
1733
1749
|
activityOffset?: number;
|
|
1734
1750
|
|
|
1751
|
+
/**
|
|
1752
|
+
* When set, points whose numeric fields are all zero are removed from `usages`,
|
|
1753
|
+
* `modelUsages`, `assetUsages` and `nsfwUsages`. The parent entry (model, kind,
|
|
1754
|
+
* label, usageName) is preserved with `points: []` so callers still see every row.
|
|
1755
|
+
* Useful on wide windows × fine granularities × many models, where the zero-fill
|
|
1756
|
+
* can push the response past the 6 MB API Gateway sync limit. The bare
|
|
1757
|
+
* `?dropZeroPoints` form, plus any value (`true`, `1`, `yes`, `on`, …) enables it;
|
|
1758
|
+
* absent or explicit falsy literals (`false`, `0`, `no`, `off`) disable it.
|
|
1759
|
+
* Default disabled for backwards compatibility.
|
|
1760
|
+
*/
|
|
1761
|
+
dropZeroPoints?: boolean;
|
|
1762
|
+
|
|
1735
1763
|
/**
|
|
1736
1764
|
* The end date of the usage in ISO 8601 format. If not provided, use default
|
|
1737
1765
|
* timeRange. If provided, startDate is required.
|
|
@@ -1757,10 +1785,12 @@ export interface UsageListParams {
|
|
|
1757
1785
|
timeRange?: 'last-hour' | 'last-day' | 'last-three-days' | 'last-seven-days' | 'last-thirty-one-days';
|
|
1758
1786
|
|
|
1759
1787
|
/**
|
|
1760
|
-
* The type of the usage data. Can be one or more comma separated values.
|
|
1761
|
-
*
|
|
1788
|
+
* The type of the usage data. Can be one or more comma separated values. Can be
|
|
1789
|
+
* any of the following values: usages, activity, consumption, model-usages,
|
|
1790
|
+
* asset-usages, nsfw-usages. Default is all types. If bad type or empty, all types
|
|
1791
|
+
* will be returned.
|
|
1762
1792
|
*/
|
|
1763
|
-
type?: 'usages' | 'activity' | 'consumption' | 'model-usages' | 'asset-usages' | 'nsfw-usages'
|
|
1793
|
+
type?: Array<'usages' | 'activity' | 'consumption' | 'model-usages' | 'asset-usages' | 'nsfw-usages'>;
|
|
1764
1794
|
|
|
1765
1795
|
/**
|
|
1766
1796
|
* The unique identifier of the user for the usage. If not provided, returns all
|