@scenario-labs/sdk 2.7.0 → 3.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.
- package/CHANGELOG.md +30 -2
- package/client.d.mts +12 -12
- package/client.d.mts.map +1 -1
- package/client.d.ts +12 -12
- 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/job.d.mts +2 -2
- package/lib/job.d.mts.map +1 -1
- package/lib/job.d.ts +2 -2
- package/lib/job.d.ts.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/upload.d.mts +2 -2
- package/lib/upload.d.mts.map +1 -1
- package/lib/upload.d.ts +2 -2
- package/lib/upload.d.ts.map +1 -1
- package/lib/upload.js +4 -4
- package/lib/upload.js.map +1 -1
- package/lib/upload.mjs +4 -4
- 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/package.json +1 -1
- package/resources/assets/assets.d.mts +1107 -24
- package/resources/assets/assets.d.mts.map +1 -1
- package/resources/assets/assets.d.ts +1107 -24
- package/resources/assets/assets.d.ts.map +1 -1
- package/resources/assets/assets.js +34 -16
- package/resources/assets/assets.js.map +1 -1
- package/resources/assets/assets.mjs +34 -16
- package/resources/assets/assets.mjs.map +1 -1
- package/resources/assets/download.d.mts +28 -5
- package/resources/assets/download.d.mts.map +1 -1
- package/resources/assets/download.d.ts +28 -5
- package/resources/assets/download.d.ts.map +1 -1
- package/resources/assets/download.js +8 -6
- package/resources/assets/download.js.map +1 -1
- package/resources/assets/download.mjs +8 -6
- package/resources/assets/download.mjs.map +1 -1
- package/resources/assets/index.d.mts +1 -1
- package/resources/assets/index.d.mts.map +1 -1
- package/resources/assets/index.d.ts +1 -1
- package/resources/assets/index.d.ts.map +1 -1
- package/resources/assets/index.js.map +1 -1
- package/resources/assets/index.mjs.map +1 -1
- package/resources/collections/assets.d.mts +15 -4
- package/resources/collections/assets.d.mts.map +1 -1
- package/resources/collections/assets.d.ts +15 -4
- package/resources/collections/assets.d.ts.map +1 -1
- package/resources/collections/assets.js +14 -4
- package/resources/collections/assets.js.map +1 -1
- package/resources/collections/assets.mjs +14 -4
- package/resources/collections/assets.mjs.map +1 -1
- package/resources/collections/collections.d.mts +38 -9
- package/resources/collections/collections.d.mts.map +1 -1
- package/resources/collections/collections.d.ts +38 -9
- package/resources/collections/collections.d.ts.map +1 -1
- package/resources/collections/collections.js +11 -8
- package/resources/collections/collections.js.map +1 -1
- package/resources/collections/collections.mjs +11 -8
- package/resources/collections/collections.mjs.map +1 -1
- package/resources/collections/index.d.mts +1 -1
- package/resources/collections/index.d.mts.map +1 -1
- package/resources/collections/index.d.ts +1 -1
- package/resources/collections/index.d.ts.map +1 -1
- package/resources/collections/index.js.map +1 -1
- package/resources/collections/index.mjs.map +1 -1
- package/resources/collections/models.d.mts +15 -4
- package/resources/collections/models.d.mts.map +1 -1
- package/resources/collections/models.d.ts +15 -4
- package/resources/collections/models.d.ts.map +1 -1
- package/resources/collections/models.js +14 -4
- package/resources/collections/models.js.map +1 -1
- package/resources/collections/models.mjs +14 -4
- package/resources/collections/models.mjs.map +1 -1
- package/resources/generate.d.mts +945 -4
- package/resources/generate.d.mts.map +1 -1
- package/resources/generate.d.ts +945 -4
- package/resources/generate.d.ts.map +1 -1
- package/resources/generate.js +28 -16
- package/resources/generate.js.map +1 -1
- package/resources/generate.mjs +28 -16
- package/resources/generate.mjs.map +1 -1
- package/resources/index.d.mts +5 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -5
- 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 +146 -2
- package/resources/jobs.d.mts.map +1 -1
- package/resources/jobs.d.ts +146 -2
- package/resources/jobs.d.ts.map +1 -1
- package/resources/jobs.js +8 -4
- package/resources/jobs.js.map +1 -1
- package/resources/jobs.mjs +8 -4
- package/resources/jobs.mjs.map +1 -1
- package/resources/models/description.d.mts +14 -4
- package/resources/models/description.d.mts.map +1 -1
- package/resources/models/description.d.ts +14 -4
- package/resources/models/description.d.ts.map +1 -1
- package/resources/models/description.js +2 -2
- package/resources/models/description.js.map +1 -1
- package/resources/models/description.mjs +2 -2
- package/resources/models/description.mjs.map +1 -1
- package/resources/models/examples.d.mts +348 -4
- package/resources/models/examples.d.mts.map +1 -1
- package/resources/models/examples.d.ts +348 -4
- package/resources/models/examples.d.ts.map +1 -1
- package/resources/models/examples.js +2 -2
- package/resources/models/examples.js.map +1 -1
- package/resources/models/examples.mjs +2 -2
- package/resources/models/examples.mjs.map +1 -1
- package/resources/models/index.d.mts +1 -1
- package/resources/models/index.d.mts.map +1 -1
- package/resources/models/index.d.ts +1 -1
- package/resources/models/index.d.ts.map +1 -1
- package/resources/models/index.js.map +1 -1
- package/resources/models/index.mjs.map +1 -1
- package/resources/models/models.d.mts +71 -13
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +71 -13
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js +30 -18
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs +30 -18
- package/resources/models/models.mjs.map +1 -1
- package/resources/models/train.d.mts +93 -0
- package/resources/models/train.d.mts.map +1 -1
- package/resources/models/train.d.ts +93 -0
- package/resources/models/train.d.ts.map +1 -1
- package/resources/models/train.js +4 -4
- package/resources/models/train.js.map +1 -1
- package/resources/models/train.mjs +4 -4
- package/resources/models/train.mjs.map +1 -1
- package/resources/models/training-images.d.mts +22 -2
- package/resources/models/training-images.d.mts.map +1 -1
- package/resources/models/training-images.d.ts +22 -2
- package/resources/models/training-images.d.ts.map +1 -1
- package/resources/models/training-images.js +15 -8
- package/resources/models/training-images.js.map +1 -1
- package/resources/models/training-images.mjs +15 -8
- package/resources/models/training-images.mjs.map +1 -1
- package/resources/search.d.mts +10 -0
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts +10 -0
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +4 -4
- package/resources/search.js.map +1 -1
- package/resources/search.mjs +4 -4
- package/resources/search.mjs.map +1 -1
- package/resources/tags.d.mts +5 -0
- package/resources/tags.d.mts.map +1 -1
- package/resources/tags.d.ts +5 -0
- package/resources/tags.d.ts.map +1 -1
- package/resources/uploads.d.mts +35 -20
- package/resources/uploads.d.mts.map +1 -1
- package/resources/uploads.d.ts +35 -20
- package/resources/uploads.d.ts.map +1 -1
- package/resources/uploads.js +8 -6
- package/resources/uploads.js.map +1 -1
- package/resources/uploads.mjs +8 -6
- package/resources/uploads.mjs.map +1 -1
- package/resources/usages.d.mts +55 -12
- package/resources/usages.d.mts.map +1 -1
- package/resources/usages.d.ts +55 -12
- package/resources/usages.d.ts.map +1 -1
- package/resources/workflows.d.mts +446 -266
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +446 -266
- package/resources/workflows.d.ts.map +1 -1
- package/resources/workflows.js +20 -12
- package/resources/workflows.js.map +1 -1
- package/resources/workflows.mjs +20 -12
- package/resources/workflows.mjs.map +1 -1
- package/src/client.ts +18 -4
- package/src/core/pagination.ts +20 -20
- package/src/lib/job.ts +8 -3
- package/src/lib/upload.ts +5 -3
- package/src/lib/workflow.ts +3 -1
- package/src/resources/assets/assets.ts +1326 -48
- package/src/resources/assets/download.ts +40 -7
- package/src/resources/assets/index.ts +1 -0
- package/src/resources/collections/assets.ts +29 -6
- package/src/resources/collections/collections.ts +59 -12
- package/src/resources/collections/index.ts +2 -0
- package/src/resources/collections/models.ts +29 -6
- package/src/resources/generate.ts +1251 -34
- package/src/resources/index.ts +7 -0
- package/src/resources/jobs.ts +169 -4
- package/src/resources/models/description.ts +18 -6
- package/src/resources/models/examples.ts +398 -6
- package/src/resources/models/index.ts +1 -0
- package/src/resources/models/models.ts +112 -26
- package/src/resources/models/train.ts +126 -4
- package/src/resources/models/training-images.ts +41 -10
- package/src/resources/search.ts +16 -4
- package/src/resources/tags.ts +6 -0
- package/src/resources/uploads.ts +47 -22
- package/src/resources/usages.ts +65 -12
- package/src/resources/workflows.ts +783 -563
- 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/search.js
CHANGED
|
@@ -12,9 +12,9 @@ class Search extends resource_1.APIResource {
|
|
|
12
12
|
* `image`, `images` are mutually exclusive.
|
|
13
13
|
*/
|
|
14
14
|
assetSearch(params, options) {
|
|
15
|
-
const { originalAssets, ...body } = params;
|
|
15
|
+
const { originalAssets, projectId, ...body } = params;
|
|
16
16
|
return this._client.getAPIList('/search/assets', (pagination_1.SearchHitsOffset), {
|
|
17
|
-
query: { originalAssets },
|
|
17
|
+
query: { originalAssets, projectId },
|
|
18
18
|
body,
|
|
19
19
|
method: 'post',
|
|
20
20
|
...options,
|
|
@@ -27,9 +27,9 @@ class Search extends resource_1.APIResource {
|
|
|
27
27
|
* `image`, and `images` are mutually exclusive.
|
|
28
28
|
*/
|
|
29
29
|
modelSearch(params, options) {
|
|
30
|
-
const { originalAssets, originalModels, ...body } = params;
|
|
30
|
+
const { originalAssets, originalModels, projectId, ...body } = params;
|
|
31
31
|
return this._client.getAPIList('/search/models', (pagination_1.SearchHitsOffset), {
|
|
32
|
-
query: { originalAssets, originalModels },
|
|
32
|
+
query: { originalAssets, originalModels, projectId },
|
|
33
33
|
body,
|
|
34
34
|
method: 'post',
|
|
35
35
|
...options,
|
package/resources/search.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../src/resources/search.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAC/C,sDAAgG;AAGhG,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;OAKG;IACH,WAAW,CACT,MAA+B,EAC/B,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../src/resources/search.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAC/C,sDAAgG;AAGhG,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;OAKG;IACH,WAAW,CACT,MAA+B,EAC/B,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAA,6BAA2C,CAAA,EAAE;YAC5F,KAAK,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE;YACpC,IAAI;YACJ,MAAM,EAAE,MAAM;YACd,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,WAAW,CACT,MAA+B,EAC/B,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAA,6BAA2C,CAAA,EAAE;YAC5F,KAAK,EAAE,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE;YACpD,IAAI;YACJ,MAAM,EAAE,MAAM;YACd,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAtCD,wBAsCC"}
|
package/resources/search.mjs
CHANGED
|
@@ -9,9 +9,9 @@ export class Search extends APIResource {
|
|
|
9
9
|
* `image`, `images` are mutually exclusive.
|
|
10
10
|
*/
|
|
11
11
|
assetSearch(params, options) {
|
|
12
|
-
const { originalAssets, ...body } = params;
|
|
12
|
+
const { originalAssets, projectId, ...body } = params;
|
|
13
13
|
return this._client.getAPIList('/search/assets', (SearchHitsOffset), {
|
|
14
|
-
query: { originalAssets },
|
|
14
|
+
query: { originalAssets, projectId },
|
|
15
15
|
body,
|
|
16
16
|
method: 'post',
|
|
17
17
|
...options,
|
|
@@ -24,9 +24,9 @@ export class Search extends APIResource {
|
|
|
24
24
|
* `image`, and `images` are mutually exclusive.
|
|
25
25
|
*/
|
|
26
26
|
modelSearch(params, options) {
|
|
27
|
-
const { originalAssets, originalModels, ...body } = params;
|
|
27
|
+
const { originalAssets, originalModels, projectId, ...body } = params;
|
|
28
28
|
return this._client.getAPIList('/search/models', (SearchHitsOffset), {
|
|
29
|
-
query: { originalAssets, originalModels },
|
|
29
|
+
query: { originalAssets, originalModels, projectId },
|
|
30
30
|
body,
|
|
31
31
|
method: 'post',
|
|
32
32
|
...options,
|
package/resources/search.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.mjs","sourceRoot":"","sources":["../src/resources/search.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAe,gBAAgB,EAA+B,+BAA2B;AAGhG,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;OAKG;IACH,WAAW,CACT,MAA+B,EAC/B,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"search.mjs","sourceRoot":"","sources":["../src/resources/search.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAe,gBAAgB,EAA+B,+BAA2B;AAGhG,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;OAKG;IACH,WAAW,CACT,MAA+B,EAC/B,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAA,gBAA2C,CAAA,EAAE;YAC5F,KAAK,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE;YACpC,IAAI;YACJ,MAAM,EAAE,MAAM;YACd,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,WAAW,CACT,MAA+B,EAC/B,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAA,gBAA2C,CAAA,EAAE;YAC5F,KAAK,EAAE,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE;YACpD,IAAI;YACJ,MAAM,EAAE,MAAM;YACd,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/resources/tags.d.mts
CHANGED
|
@@ -36,6 +36,11 @@ export interface TagListParams extends TagsCursorParams {
|
|
|
36
36
|
* value is 100, minimum value is 1
|
|
37
37
|
*/
|
|
38
38
|
pageSize?: number;
|
|
39
|
+
/**
|
|
40
|
+
* The projectId used for ownership resource management. Either to assert ownership
|
|
41
|
+
* or to set the owner of the resource(s)
|
|
42
|
+
*/
|
|
43
|
+
projectId?: string;
|
|
39
44
|
}
|
|
40
45
|
export declare namespace Tags {
|
|
41
46
|
export { type TagListResponse as TagListResponse, type TagListResponsesTagsCursor as TagListResponsesTagsCursor, type TagListParams as TagListParams, };
|
package/resources/tags.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tags.d.mts","sourceRoot":"","sources":["../src/resources/tags.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,+BAA2B;AACpF,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D,qBAAa,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,aAAa,GAAG,IAAI,GAAG,SAAc,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,0BAA0B,EAAE,eAAe,CAAC;CAG5D;AAED,MAAM,MAAM,0BAA0B,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;AAErE,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"tags.d.mts","sourceRoot":"","sources":["../src/resources/tags.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,+BAA2B;AACpF,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D,qBAAa,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,aAAa,GAAG,IAAI,GAAG,SAAc,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,0BAA0B,EAAE,eAAe,CAAC;CAG5D;AAED,MAAM,MAAM,0BAA0B,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;AAErE,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,aAAa,IAAI,aAAa,GACpC,CAAC;CACH"}
|
package/resources/tags.d.ts
CHANGED
|
@@ -36,6 +36,11 @@ export interface TagListParams extends TagsCursorParams {
|
|
|
36
36
|
* value is 100, minimum value is 1
|
|
37
37
|
*/
|
|
38
38
|
pageSize?: number;
|
|
39
|
+
/**
|
|
40
|
+
* The projectId used for ownership resource management. Either to assert ownership
|
|
41
|
+
* or to set the owner of the resource(s)
|
|
42
|
+
*/
|
|
43
|
+
projectId?: string;
|
|
39
44
|
}
|
|
40
45
|
export declare namespace Tags {
|
|
41
46
|
export { type TagListResponse as TagListResponse, type TagListResponsesTagsCursor as TagListResponsesTagsCursor, type TagListParams as TagListParams, };
|
package/resources/tags.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../src/resources/tags.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BA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AAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,aAAa,IAAI,aAAa,GACpC,CAAC;CACH"}
|
package/resources/uploads.d.mts
CHANGED
|
@@ -6,15 +6,15 @@ export declare class Uploads extends APIResource {
|
|
|
6
6
|
* Create a temporary upload URL for a file. Support multipart uploads. Return a
|
|
7
7
|
* list of URLs for each part of the file.
|
|
8
8
|
*/
|
|
9
|
-
create(
|
|
9
|
+
create(params: UploadCreateParams, options?: RequestOptions): APIPromise<UploadCreateResponse>;
|
|
10
10
|
/**
|
|
11
11
|
* Get the details of an existing upload
|
|
12
12
|
*/
|
|
13
|
-
retrieve(uploadID: string, options?: RequestOptions): APIPromise<UploadRetrieveResponse>;
|
|
13
|
+
retrieve(uploadID: string, query?: UploadRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<UploadRetrieveResponse>;
|
|
14
14
|
/**
|
|
15
15
|
* Trigger an action on upload
|
|
16
16
|
*/
|
|
17
|
-
triggerAction(uploadID: string,
|
|
17
|
+
triggerAction(uploadID: string, params: UploadTriggerActionParams, options?: RequestOptions): APIPromise<UploadTriggerActionResponse>;
|
|
18
18
|
}
|
|
19
19
|
export interface UploadCreateResponse {
|
|
20
20
|
upload: UploadCreateResponse.Upload;
|
|
@@ -174,45 +174,53 @@ export declare namespace UploadTriggerActionResponse {
|
|
|
174
174
|
}
|
|
175
175
|
export interface UploadCreateParams {
|
|
176
176
|
/**
|
|
177
|
-
*
|
|
178
|
-
*
|
|
177
|
+
* Query param: The projectId used for ownership resource management. Either to
|
|
178
|
+
* assert ownership or to set the owner of the resource(s)
|
|
179
|
+
*/
|
|
180
|
+
projectId?: string;
|
|
181
|
+
/**
|
|
182
|
+
* Body param: Asset extra options. Only available for kinds which produce an
|
|
183
|
+
* asset. (Not available for model kind)
|
|
179
184
|
*/
|
|
180
185
|
assetOptions?: UploadCreateParams.AssetOptions;
|
|
181
186
|
/**
|
|
182
|
-
* The civitai.com url of the model (example:
|
|
187
|
+
* Body param: The civitai.com url of the model (example:
|
|
183
188
|
* "https://civitai.com/models/370194/translucent-subsurface-scattering-test?modelVersionId=413566").
|
|
184
189
|
*/
|
|
185
190
|
civitaiModelUrl?: string;
|
|
186
191
|
/**
|
|
187
|
-
* Required for multipart upload. The MIME type of the file (example:
|
|
192
|
+
* Body param: Required for multipart upload. The MIME type of the file (example:
|
|
193
|
+
* "image/jpeg")
|
|
188
194
|
*/
|
|
189
195
|
contentType?: string;
|
|
190
196
|
/**
|
|
191
|
-
* Required for multipart upload. The original file name of the image
|
|
192
|
-
* "low-res-image.jpg"). It will be ignored if assetId is provided.
|
|
197
|
+
* Body param: Required for multipart upload. The original file name of the image
|
|
198
|
+
* (example: "low-res-image.jpg"). It will be ignored if assetId is provided.
|
|
193
199
|
*/
|
|
194
200
|
fileName?: string;
|
|
195
201
|
/**
|
|
196
|
-
* Required for multipart upload. The size of the file in bytes
|
|
202
|
+
* Body param: Required for multipart upload. The size of the file in bytes
|
|
197
203
|
*/
|
|
198
204
|
fileSize?: number;
|
|
199
205
|
/**
|
|
200
|
-
* The huggingface.co modelName (example:
|
|
201
|
-
* to setup other fields if you setup
|
|
206
|
+
* Body param: The huggingface.co modelName (example:
|
|
207
|
+
* "black-forest-labs/FLUX.1-dev"). No need to setup other fields if you setup
|
|
208
|
+
* huggingFaceModelName
|
|
202
209
|
*/
|
|
203
210
|
huggingFaceModelName?: string;
|
|
204
211
|
/**
|
|
205
|
-
* Required for multipart upload and url. The purpose of the file once
|
|
206
|
-
* (example: "model")
|
|
212
|
+
* Body param: Required for multipart upload and url. The purpose of the file once
|
|
213
|
+
* validated (example: "model")
|
|
207
214
|
*/
|
|
208
215
|
kind?: '3d' | 'asset' | 'audio' | 'avatar' | 'image' | 'model' | 'text' | 'video';
|
|
209
216
|
/**
|
|
210
|
-
* Required for multipart upload. The number of parts the file will be
|
|
217
|
+
* Body param: Required for multipart upload. The number of parts the file will be
|
|
218
|
+
* uploaded in
|
|
211
219
|
*/
|
|
212
220
|
parts?: number;
|
|
213
221
|
/**
|
|
214
|
-
* The url where to download the file. If you setup url you MUST setup
|
|
215
|
-
* well.
|
|
222
|
+
* Body param: The url where to download the file. If you setup url you MUST setup
|
|
223
|
+
* kind as well.
|
|
216
224
|
*/
|
|
217
225
|
url?: string;
|
|
218
226
|
}
|
|
@@ -236,14 +244,21 @@ export declare namespace UploadCreateParams {
|
|
|
236
244
|
parentId?: string;
|
|
237
245
|
}
|
|
238
246
|
}
|
|
247
|
+
export interface UploadRetrieveParams {
|
|
248
|
+
projectId?: unknown;
|
|
249
|
+
}
|
|
239
250
|
export interface UploadTriggerActionParams {
|
|
240
251
|
/**
|
|
241
|
-
* The action to perform on an upload, currently only "upload-complete"
|
|
242
|
-
* supported
|
|
252
|
+
* Body param: The action to perform on an upload, currently only "upload-complete"
|
|
253
|
+
* is supported
|
|
243
254
|
*/
|
|
244
255
|
action: 'complete';
|
|
256
|
+
/**
|
|
257
|
+
* Query param
|
|
258
|
+
*/
|
|
259
|
+
projectId?: unknown;
|
|
245
260
|
}
|
|
246
261
|
export declare namespace Uploads {
|
|
247
|
-
export { type UploadCreateResponse as UploadCreateResponse, type UploadRetrieveResponse as UploadRetrieveResponse, type UploadTriggerActionResponse as UploadTriggerActionResponse, type UploadCreateParams as UploadCreateParams, type UploadTriggerActionParams as UploadTriggerActionParams, };
|
|
262
|
+
export { type UploadCreateResponse as UploadCreateResponse, type UploadRetrieveResponse as UploadRetrieveResponse, type UploadTriggerActionResponse as UploadTriggerActionResponse, type UploadCreateParams as UploadCreateParams, type UploadRetrieveParams as UploadRetrieveParams, type UploadTriggerActionParams as UploadTriggerActionParams, };
|
|
248
263
|
}
|
|
249
264
|
//# sourceMappingURL=uploads.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;OAGG;IACH,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;OAGG;IACH,MAAM,CAAC,MAAM,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAK9F;;OAEG;IACH,QAAQ,CACN,QAAQ,EAAE,MAAM,EAChB,KAAK,GAAE,oBAAoB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,sBAAsB,CAAC;IAIrC;;OAEG;IACH,aAAa,CACX,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,yBAAyB,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,2BAA2B,CAAC;CAI3C;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,oBA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,CAAC;IAEf;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,yBAAiB,kBAAkB,CAAC;IAClC;;;OAGG;IACH,UAAiB,YAAY;QAC3B;;WAEG;QACH,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAE9B;;WAEG;QACH,IAAI,CAAC,EAAE,OAAO,CAAC;QAEf;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB;CACF;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,MAAM,EAAE,UAAU,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
package/resources/uploads.d.ts
CHANGED
|
@@ -6,15 +6,15 @@ export declare class Uploads extends APIResource {
|
|
|
6
6
|
* Create a temporary upload URL for a file. Support multipart uploads. Return a
|
|
7
7
|
* list of URLs for each part of the file.
|
|
8
8
|
*/
|
|
9
|
-
create(
|
|
9
|
+
create(params: UploadCreateParams, options?: RequestOptions): APIPromise<UploadCreateResponse>;
|
|
10
10
|
/**
|
|
11
11
|
* Get the details of an existing upload
|
|
12
12
|
*/
|
|
13
|
-
retrieve(uploadID: string, options?: RequestOptions): APIPromise<UploadRetrieveResponse>;
|
|
13
|
+
retrieve(uploadID: string, query?: UploadRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<UploadRetrieveResponse>;
|
|
14
14
|
/**
|
|
15
15
|
* Trigger an action on upload
|
|
16
16
|
*/
|
|
17
|
-
triggerAction(uploadID: string,
|
|
17
|
+
triggerAction(uploadID: string, params: UploadTriggerActionParams, options?: RequestOptions): APIPromise<UploadTriggerActionResponse>;
|
|
18
18
|
}
|
|
19
19
|
export interface UploadCreateResponse {
|
|
20
20
|
upload: UploadCreateResponse.Upload;
|
|
@@ -174,45 +174,53 @@ export declare namespace UploadTriggerActionResponse {
|
|
|
174
174
|
}
|
|
175
175
|
export interface UploadCreateParams {
|
|
176
176
|
/**
|
|
177
|
-
*
|
|
178
|
-
*
|
|
177
|
+
* Query param: The projectId used for ownership resource management. Either to
|
|
178
|
+
* assert ownership or to set the owner of the resource(s)
|
|
179
|
+
*/
|
|
180
|
+
projectId?: string;
|
|
181
|
+
/**
|
|
182
|
+
* Body param: Asset extra options. Only available for kinds which produce an
|
|
183
|
+
* asset. (Not available for model kind)
|
|
179
184
|
*/
|
|
180
185
|
assetOptions?: UploadCreateParams.AssetOptions;
|
|
181
186
|
/**
|
|
182
|
-
* The civitai.com url of the model (example:
|
|
187
|
+
* Body param: The civitai.com url of the model (example:
|
|
183
188
|
* "https://civitai.com/models/370194/translucent-subsurface-scattering-test?modelVersionId=413566").
|
|
184
189
|
*/
|
|
185
190
|
civitaiModelUrl?: string;
|
|
186
191
|
/**
|
|
187
|
-
* Required for multipart upload. The MIME type of the file (example:
|
|
192
|
+
* Body param: Required for multipart upload. The MIME type of the file (example:
|
|
193
|
+
* "image/jpeg")
|
|
188
194
|
*/
|
|
189
195
|
contentType?: string;
|
|
190
196
|
/**
|
|
191
|
-
* Required for multipart upload. The original file name of the image
|
|
192
|
-
* "low-res-image.jpg"). It will be ignored if assetId is provided.
|
|
197
|
+
* Body param: Required for multipart upload. The original file name of the image
|
|
198
|
+
* (example: "low-res-image.jpg"). It will be ignored if assetId is provided.
|
|
193
199
|
*/
|
|
194
200
|
fileName?: string;
|
|
195
201
|
/**
|
|
196
|
-
* Required for multipart upload. The size of the file in bytes
|
|
202
|
+
* Body param: Required for multipart upload. The size of the file in bytes
|
|
197
203
|
*/
|
|
198
204
|
fileSize?: number;
|
|
199
205
|
/**
|
|
200
|
-
* The huggingface.co modelName (example:
|
|
201
|
-
* to setup other fields if you setup
|
|
206
|
+
* Body param: The huggingface.co modelName (example:
|
|
207
|
+
* "black-forest-labs/FLUX.1-dev"). No need to setup other fields if you setup
|
|
208
|
+
* huggingFaceModelName
|
|
202
209
|
*/
|
|
203
210
|
huggingFaceModelName?: string;
|
|
204
211
|
/**
|
|
205
|
-
* Required for multipart upload and url. The purpose of the file once
|
|
206
|
-
* (example: "model")
|
|
212
|
+
* Body param: Required for multipart upload and url. The purpose of the file once
|
|
213
|
+
* validated (example: "model")
|
|
207
214
|
*/
|
|
208
215
|
kind?: '3d' | 'asset' | 'audio' | 'avatar' | 'image' | 'model' | 'text' | 'video';
|
|
209
216
|
/**
|
|
210
|
-
* Required for multipart upload. The number of parts the file will be
|
|
217
|
+
* Body param: Required for multipart upload. The number of parts the file will be
|
|
218
|
+
* uploaded in
|
|
211
219
|
*/
|
|
212
220
|
parts?: number;
|
|
213
221
|
/**
|
|
214
|
-
* The url where to download the file. If you setup url you MUST setup
|
|
215
|
-
* well.
|
|
222
|
+
* Body param: The url where to download the file. If you setup url you MUST setup
|
|
223
|
+
* kind as well.
|
|
216
224
|
*/
|
|
217
225
|
url?: string;
|
|
218
226
|
}
|
|
@@ -236,14 +244,21 @@ export declare namespace UploadCreateParams {
|
|
|
236
244
|
parentId?: string;
|
|
237
245
|
}
|
|
238
246
|
}
|
|
247
|
+
export interface UploadRetrieveParams {
|
|
248
|
+
projectId?: unknown;
|
|
249
|
+
}
|
|
239
250
|
export interface UploadTriggerActionParams {
|
|
240
251
|
/**
|
|
241
|
-
* The action to perform on an upload, currently only "upload-complete"
|
|
242
|
-
* supported
|
|
252
|
+
* Body param: The action to perform on an upload, currently only "upload-complete"
|
|
253
|
+
* is supported
|
|
243
254
|
*/
|
|
244
255
|
action: 'complete';
|
|
256
|
+
/**
|
|
257
|
+
* Query param
|
|
258
|
+
*/
|
|
259
|
+
projectId?: unknown;
|
|
245
260
|
}
|
|
246
261
|
export declare namespace Uploads {
|
|
247
|
-
export { type UploadCreateResponse as UploadCreateResponse, type UploadRetrieveResponse as UploadRetrieveResponse, type UploadTriggerActionResponse as UploadTriggerActionResponse, type UploadCreateParams as UploadCreateParams, type UploadTriggerActionParams as UploadTriggerActionParams, };
|
|
262
|
+
export { type UploadCreateResponse as UploadCreateResponse, type UploadRetrieveResponse as UploadRetrieveResponse, type UploadTriggerActionResponse as UploadTriggerActionResponse, type UploadCreateParams as UploadCreateParams, type UploadRetrieveParams as UploadRetrieveParams, type UploadTriggerActionParams as UploadTriggerActionParams, };
|
|
248
263
|
}
|
|
249
264
|
//# sourceMappingURL=uploads.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;OAGG;IACH,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;OAGG;IACH,MAAM,CAAC,MAAM,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAK9F;;OAEG;IACH,QAAQ,CACN,QAAQ,EAAE,MAAM,EAChB,KAAK,GAAE,oBAAoB,GAAG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;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;IAElF;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,yBAAiB,kBAAkB,CAAC;IAClC;;;OAGG;IACH,UAAiB,YAAY;QAC3B;;WAEG;QACH,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAE9B;;WAEG;QACH,IAAI,CAAC,EAAE,OAAO,CAAC;QAEf;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB;CACF;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,MAAM,EAAE,UAAU,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
package/resources/uploads.js
CHANGED
|
@@ -9,20 +9,22 @@ class Uploads extends resource_1.APIResource {
|
|
|
9
9
|
* Create a temporary upload URL for a file. Support multipart uploads. Return a
|
|
10
10
|
* list of URLs for each part of the file.
|
|
11
11
|
*/
|
|
12
|
-
create(
|
|
13
|
-
|
|
12
|
+
create(params, options) {
|
|
13
|
+
const { projectId, ...body } = params;
|
|
14
|
+
return this._client.post('/uploads', { query: { projectId }, body, ...options });
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* Get the details of an existing upload
|
|
17
18
|
*/
|
|
18
|
-
retrieve(uploadID, options) {
|
|
19
|
-
return this._client.get((0, path_1.path) `/uploads/${uploadID}`, options);
|
|
19
|
+
retrieve(uploadID, query = {}, options) {
|
|
20
|
+
return this._client.get((0, path_1.path) `/uploads/${uploadID}`, { query, ...options });
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
22
23
|
* Trigger an action on upload
|
|
23
24
|
*/
|
|
24
|
-
triggerAction(uploadID,
|
|
25
|
-
|
|
25
|
+
triggerAction(uploadID, params, options) {
|
|
26
|
+
const { projectId, ...body } = params;
|
|
27
|
+
return this._client.post((0, path_1.path) `/uploads/${uploadID}/action`, { query: { projectId }, body, ...options });
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
exports.Uploads = Uploads;
|
package/resources/uploads.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads.js","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;OAGG;IACH,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"uploads.js","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;OAGG;IACH,MAAM,CAAC,MAA0B,EAAE,OAAwB;QACzD,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;OAEG;IACH,QAAQ,CACN,QAAgB,EAChB,QAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,YAAY,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,aAAa,CACX,QAAgB,EAChB,MAAiC,EACjC,OAAwB;QAExB,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,YAAY,QAAQ,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1G,CAAC;CACF;AAhCD,0BAgCC"}
|
package/resources/uploads.mjs
CHANGED
|
@@ -6,20 +6,22 @@ export class Uploads extends APIResource {
|
|
|
6
6
|
* Create a temporary upload URL for a file. Support multipart uploads. Return a
|
|
7
7
|
* list of URLs for each part of the file.
|
|
8
8
|
*/
|
|
9
|
-
create(
|
|
10
|
-
|
|
9
|
+
create(params, options) {
|
|
10
|
+
const { projectId, ...body } = params;
|
|
11
|
+
return this._client.post('/uploads', { query: { projectId }, body, ...options });
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
13
14
|
* Get the details of an existing upload
|
|
14
15
|
*/
|
|
15
|
-
retrieve(uploadID, options) {
|
|
16
|
-
return this._client.get(path `/uploads/${uploadID}`, options);
|
|
16
|
+
retrieve(uploadID, query = {}, options) {
|
|
17
|
+
return this._client.get(path `/uploads/${uploadID}`, { query, ...options });
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
* Trigger an action on upload
|
|
20
21
|
*/
|
|
21
|
-
triggerAction(uploadID,
|
|
22
|
-
|
|
22
|
+
triggerAction(uploadID, params, options) {
|
|
23
|
+
const { projectId, ...body } = params;
|
|
24
|
+
return this._client.post(path `/uploads/${uploadID}/action`, { query: { projectId }, body, ...options });
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
27
|
//# sourceMappingURL=uploads.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;OAGG;IACH,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;OAGG;IACH,MAAM,CAAC,MAA0B,EAAE,OAAwB;QACzD,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;OAEG;IACH,QAAQ,CACN,QAAgB,EAChB,QAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,YAAY,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,aAAa,CACX,QAAgB,EAChB,MAAiC,EACjC,OAAwB;QAExB,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,YAAY,QAAQ,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1G,CAAC;CACF"}
|
package/resources/usages.d.mts
CHANGED
|
@@ -16,6 +16,7 @@ export interface UsageListResponse {
|
|
|
16
16
|
entities?: UsageListResponse.Entities;
|
|
17
17
|
modelUsages?: Array<UsageListResponse.ModelUsage>;
|
|
18
18
|
nsfwUsages?: Array<UsageListResponse.NsfwUsage>;
|
|
19
|
+
slopUsages?: Array<UsageListResponse.SlopUsage>;
|
|
19
20
|
usages?: Array<UsageListResponse.Usage>;
|
|
20
21
|
}
|
|
21
22
|
export declare namespace UsageListResponse {
|
|
@@ -140,6 +141,11 @@ export declare namespace UsageListResponse {
|
|
|
140
141
|
* The Compute Units consumption for the user
|
|
141
142
|
*/
|
|
142
143
|
value: number;
|
|
144
|
+
/**
|
|
145
|
+
* Compute Units consumed per billing action, when a breakdown is available
|
|
146
|
+
* (example: `{ "slop-detection": 12 }`). Values are included in `value`.
|
|
147
|
+
*/
|
|
148
|
+
costDetails?: unknown;
|
|
143
149
|
}
|
|
144
150
|
interface Entities {
|
|
145
151
|
assets?: Array<Entities.Asset>;
|
|
@@ -314,11 +320,11 @@ export declare namespace UsageListResponse {
|
|
|
314
320
|
/**
|
|
315
321
|
* Camera eye position in the splat's world frame.
|
|
316
322
|
*/
|
|
317
|
-
position: Array<
|
|
323
|
+
position: Array<number>;
|
|
318
324
|
/**
|
|
319
325
|
* Look-at point in the splat's world frame.
|
|
320
326
|
*/
|
|
321
|
-
target: Array<
|
|
327
|
+
target: Array<number>;
|
|
322
328
|
/**
|
|
323
329
|
* Vertical field of view in degrees (defaults to 50 in the renderer).
|
|
324
330
|
*/
|
|
@@ -1131,6 +1137,38 @@ export declare namespace UsageListResponse {
|
|
|
1131
1137
|
time: string;
|
|
1132
1138
|
}
|
|
1133
1139
|
}
|
|
1140
|
+
/**
|
|
1141
|
+
* A SlopGuard verdict series: one per bucket (total | pass | warn | fail).
|
|
1142
|
+
*/
|
|
1143
|
+
interface SlopUsage {
|
|
1144
|
+
/**
|
|
1145
|
+
* The data points
|
|
1146
|
+
*/
|
|
1147
|
+
points: Array<SlopUsage.Point>;
|
|
1148
|
+
/**
|
|
1149
|
+
* The verdict bucket: "total", "pass", "warn", or "fail"
|
|
1150
|
+
*/
|
|
1151
|
+
verdict: string;
|
|
1152
|
+
}
|
|
1153
|
+
namespace SlopUsage {
|
|
1154
|
+
/**
|
|
1155
|
+
* One time-bucket point in a SlopGuard verdict series.
|
|
1156
|
+
*/
|
|
1157
|
+
interface Point {
|
|
1158
|
+
/**
|
|
1159
|
+
* Distinct scored assets in this bucket for this verdict
|
|
1160
|
+
*/
|
|
1161
|
+
count: number;
|
|
1162
|
+
/**
|
|
1163
|
+
* Of `count`, the number of assets generated via an API key.
|
|
1164
|
+
*/
|
|
1165
|
+
countApiKey: number;
|
|
1166
|
+
/**
|
|
1167
|
+
* The UTC ISO date of the point
|
|
1168
|
+
*/
|
|
1169
|
+
time: string;
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1134
1172
|
interface Usage {
|
|
1135
1173
|
/**
|
|
1136
1174
|
* Granularity for points (example: "1d", "1h", "1m", "15m")
|
|
@@ -1191,13 +1229,13 @@ export interface UsageListParams {
|
|
|
1191
1229
|
activityOffset?: number;
|
|
1192
1230
|
/**
|
|
1193
1231
|
* When set, points whose numeric fields are all zero are removed from `usages`,
|
|
1194
|
-
* `modelUsages`, `assetUsages` and `
|
|
1195
|
-
* label, usageName) is preserved with `points: []` so callers still
|
|
1196
|
-
* Useful on wide windows × fine granularities × many models, where
|
|
1197
|
-
* can push the response past the 6 MB API Gateway sync limit. The
|
|
1198
|
-
* `?dropZeroPoints` form, plus any value (`true`, `1`, `yes`, `on`, …)
|
|
1199
|
-
* absent or explicit falsy literals (`false`, `0`, `no`, `off`)
|
|
1200
|
-
* Default disabled for backwards compatibility.
|
|
1232
|
+
* `modelUsages`, `assetUsages`, `nsfwUsages` and `slopUsages`. The parent entry
|
|
1233
|
+
* (model, kind, label, usageName) is preserved with `points: []` so callers still
|
|
1234
|
+
* see every row. Useful on wide windows × fine granularities × many models, where
|
|
1235
|
+
* the zero-fill can push the response past the 6 MB API Gateway sync limit. The
|
|
1236
|
+
* bare `?dropZeroPoints` form, plus any value (`true`, `1`, `yes`, `on`, …)
|
|
1237
|
+
* enables it; absent or explicit falsy literals (`false`, `0`, `no`, `off`)
|
|
1238
|
+
* disable it. Default disabled for backwards compatibility.
|
|
1201
1239
|
*/
|
|
1202
1240
|
dropZeroPoints?: boolean;
|
|
1203
1241
|
/**
|
|
@@ -1215,6 +1253,11 @@ export interface UsageListParams {
|
|
|
1215
1253
|
* timeRange. If provided, endDate is required.
|
|
1216
1254
|
*/
|
|
1217
1255
|
startDate?: string;
|
|
1256
|
+
/**
|
|
1257
|
+
* The teamId used for ownership resource management. Either to assert ownership or
|
|
1258
|
+
* to set the owner of the resource(s)
|
|
1259
|
+
*/
|
|
1260
|
+
teamId?: string;
|
|
1218
1261
|
/**
|
|
1219
1262
|
* The time range of the usage. If not provided, use default timeRange. If
|
|
1220
1263
|
* startDate and endDate provided, timeRange is ignored.
|
|
@@ -1223,10 +1266,10 @@ export interface UsageListParams {
|
|
|
1223
1266
|
/**
|
|
1224
1267
|
* The type of the usage data. Can be one or more comma separated values. Can be
|
|
1225
1268
|
* any of the following values: usages, activity, consumption, model-usages,
|
|
1226
|
-
* asset-usages, nsfw-usages. Default is all types. If bad type or
|
|
1227
|
-
* will be returned.
|
|
1269
|
+
* asset-usages, nsfw-usages, slop-usages. Default is all types. If bad type or
|
|
1270
|
+
* empty, all types will be returned.
|
|
1228
1271
|
*/
|
|
1229
|
-
type?: Array<'usages' | 'activity' | 'consumption' | 'model-usages' | 'asset-usages' | 'nsfw-usages'>;
|
|
1272
|
+
type?: Array<'usages' | 'activity' | 'consumption' | 'model-usages' | 'asset-usages' | 'nsfw-usages' | 'slop-usages'>;
|
|
1230
1273
|
/**
|
|
1231
1274
|
* The unique identifier of the user for the usage. If not provided, returns all
|
|
1232
1275
|
* usages for the team.
|