@scenario-labs/sdk 2.7.0 → 3.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 +16 -0
- package/client.d.mts +10 -10
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -10
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.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 +1091 -8
- package/resources/assets/assets.d.mts.map +1 -1
- package/resources/assets/assets.d.ts +1091 -8
- 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 +941 -0
- package/resources/generate.d.mts.map +1 -1
- package/resources/generate.d.ts +941 -0
- 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 +10 -0
- package/resources/models/description.d.mts.map +1 -1
- package/resources/models/description.d.ts +10 -0
- 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 +344 -0
- package/resources/models/examples.d.mts.map +1 -1
- package/resources/models/examples.d.ts +344 -0
- 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 +53 -10
- package/resources/usages.d.mts.map +1 -1
- package/resources/usages.d.ts +53 -10
- 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 +14 -0
- 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 +1310 -32
- 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 +1247 -30
- package/src/resources/index.ts +7 -0
- package/src/resources/jobs.ts +169 -4
- package/src/resources/models/description.ts +14 -2
- package/src/resources/models/examples.ts +394 -2
- 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 +63 -10
- 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
|
@@ -9,8 +9,12 @@ export class Download extends APIResource {
|
|
|
9
9
|
/**
|
|
10
10
|
* Retrieve the status and the url of a batch download assets request
|
|
11
11
|
*/
|
|
12
|
-
getStatus(
|
|
13
|
-
|
|
12
|
+
getStatus(
|
|
13
|
+
jobID: string,
|
|
14
|
+
query: DownloadGetStatusParams | null | undefined = {},
|
|
15
|
+
options?: RequestOptions,
|
|
16
|
+
): APIPromise<DownloadGetStatusResponse> {
|
|
17
|
+
return this._client.get(path`/assets/download/${jobID}`, { query, ...options });
|
|
14
18
|
}
|
|
15
19
|
|
|
16
20
|
/**
|
|
@@ -18,20 +22,22 @@ export class Download extends APIResource {
|
|
|
18
22
|
*/
|
|
19
23
|
request(
|
|
20
24
|
assetID: string,
|
|
21
|
-
|
|
25
|
+
params: DownloadRequestParams,
|
|
22
26
|
options?: RequestOptions,
|
|
23
27
|
): APIPromise<DownloadRequestResponse> {
|
|
24
|
-
|
|
28
|
+
const { projectId, ...body } = params;
|
|
29
|
+
return this._client.post(path`/assets/${assetID}/download`, { query: { projectId }, body, ...options });
|
|
25
30
|
}
|
|
26
31
|
|
|
27
32
|
/**
|
|
28
33
|
* Request a link to batch download assets (batch limited to 1000 assets)
|
|
29
34
|
*/
|
|
30
35
|
requestBatch(
|
|
31
|
-
|
|
36
|
+
params: DownloadRequestBatchParams,
|
|
32
37
|
options?: RequestOptions,
|
|
33
38
|
): APIPromise<DownloadRequestBatchResponse> {
|
|
34
|
-
|
|
39
|
+
const { projectId, ...body } = params;
|
|
40
|
+
return this._client.post('/assets/download', { query: { projectId }, body, ...options });
|
|
35
41
|
}
|
|
36
42
|
}
|
|
37
43
|
|
|
@@ -66,9 +72,23 @@ export interface DownloadRequestBatchResponse {
|
|
|
66
72
|
jobId: string;
|
|
67
73
|
}
|
|
68
74
|
|
|
75
|
+
export interface DownloadGetStatusParams {
|
|
76
|
+
/**
|
|
77
|
+
* The projectId used for ownership resource management. Either to assert ownership
|
|
78
|
+
* or to set the owner of the resource(s)
|
|
79
|
+
*/
|
|
80
|
+
projectId?: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
69
83
|
export interface DownloadRequestParams {
|
|
70
84
|
/**
|
|
71
|
-
* The
|
|
85
|
+
* Query param: The projectId used for ownership resource management. Either to
|
|
86
|
+
* assert ownership or to set the owner of the resource(s)
|
|
87
|
+
*/
|
|
88
|
+
projectId?: string;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Body param: The format to download the asset in
|
|
72
92
|
*/
|
|
73
93
|
targetFormat?:
|
|
74
94
|
| 'gif'
|
|
@@ -87,9 +107,21 @@ export interface DownloadRequestParams {
|
|
|
87
107
|
}
|
|
88
108
|
|
|
89
109
|
export interface DownloadRequestBatchParams {
|
|
110
|
+
/**
|
|
111
|
+
* Body param
|
|
112
|
+
*/
|
|
90
113
|
options: DownloadRequestBatchParams.Options;
|
|
91
114
|
|
|
115
|
+
/**
|
|
116
|
+
* Body param
|
|
117
|
+
*/
|
|
92
118
|
query: DownloadRequestBatchParams.Query;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Query param: The projectId used for ownership resource management. Either to
|
|
122
|
+
* assert ownership or to set the owner of the resource(s)
|
|
123
|
+
*/
|
|
124
|
+
projectId?: string;
|
|
93
125
|
}
|
|
94
126
|
|
|
95
127
|
export namespace DownloadRequestBatchParams {
|
|
@@ -132,6 +164,7 @@ export declare namespace Download {
|
|
|
132
164
|
type DownloadGetStatusResponse as DownloadGetStatusResponse,
|
|
133
165
|
type DownloadRequestResponse as DownloadRequestResponse,
|
|
134
166
|
type DownloadRequestBatchResponse as DownloadRequestBatchResponse,
|
|
167
|
+
type DownloadGetStatusParams as DownloadGetStatusParams,
|
|
135
168
|
type DownloadRequestParams as DownloadRequestParams,
|
|
136
169
|
type DownloadRequestBatchParams as DownloadRequestBatchParams,
|
|
137
170
|
};
|
|
@@ -9,8 +9,13 @@ export class Assets extends APIResource {
|
|
|
9
9
|
/**
|
|
10
10
|
* Add assets to a specific collection
|
|
11
11
|
*/
|
|
12
|
-
add(collectionID: string,
|
|
13
|
-
|
|
12
|
+
add(collectionID: string, params: AssetAddParams, options?: RequestOptions): APIPromise<AssetAddResponse> {
|
|
13
|
+
const { projectId, ...body } = params;
|
|
14
|
+
return this._client.put(path`/collections/${collectionID}/assets`, {
|
|
15
|
+
query: { projectId },
|
|
16
|
+
body,
|
|
17
|
+
...options,
|
|
18
|
+
});
|
|
14
19
|
}
|
|
15
20
|
|
|
16
21
|
/**
|
|
@@ -18,10 +23,15 @@ export class Assets extends APIResource {
|
|
|
18
23
|
*/
|
|
19
24
|
remove(
|
|
20
25
|
collectionID: string,
|
|
21
|
-
|
|
26
|
+
params: AssetRemoveParams,
|
|
22
27
|
options?: RequestOptions,
|
|
23
28
|
): APIPromise<AssetRemoveResponse> {
|
|
24
|
-
|
|
29
|
+
const { projectId, ...body } = params;
|
|
30
|
+
return this._client.delete(path`/collections/${collectionID}/assets`, {
|
|
31
|
+
query: { projectId },
|
|
32
|
+
body,
|
|
33
|
+
...options,
|
|
34
|
+
});
|
|
25
35
|
}
|
|
26
36
|
}
|
|
27
37
|
|
|
@@ -141,16 +151,29 @@ export namespace AssetRemoveResponse {
|
|
|
141
151
|
|
|
142
152
|
export interface AssetAddParams {
|
|
143
153
|
/**
|
|
144
|
-
* The ids of the assets to add to the collection. (Max 49 at once)
|
|
154
|
+
* Body param: The ids of the assets to add to the collection. (Max 49 at once)
|
|
145
155
|
*/
|
|
146
156
|
assetIds: Array<string>;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Query param: The projectId used for ownership resource management. Either to
|
|
160
|
+
* assert ownership or to set the owner of the resource(s)
|
|
161
|
+
*/
|
|
162
|
+
projectId?: string;
|
|
147
163
|
}
|
|
148
164
|
|
|
149
165
|
export interface AssetRemoveParams {
|
|
150
166
|
/**
|
|
151
|
-
* The ids of the assets to remove from the collection. (Max 49 at
|
|
167
|
+
* Body param: The ids of the assets to remove from the collection. (Max 49 at
|
|
168
|
+
* once)
|
|
152
169
|
*/
|
|
153
170
|
assetIds: Array<string>;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Query param: The projectId used for ownership resource management. Either to
|
|
174
|
+
* assert ownership or to set the owner of the resource(s)
|
|
175
|
+
*/
|
|
176
|
+
projectId?: string;
|
|
154
177
|
}
|
|
155
178
|
|
|
156
179
|
export declare namespace Assets {
|
|
@@ -17,15 +17,20 @@ export class Collections extends APIResource {
|
|
|
17
17
|
/**
|
|
18
18
|
* Create a new collection
|
|
19
19
|
*/
|
|
20
|
-
create(
|
|
21
|
-
|
|
20
|
+
create(params: CollectionCreateParams, options?: RequestOptions): APIPromise<CollectionCreateResponse> {
|
|
21
|
+
const { projectId, ...body } = params;
|
|
22
|
+
return this._client.post('/collections', { query: { projectId }, body, ...options });
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
/**
|
|
25
26
|
* Get the details of a collection
|
|
26
27
|
*/
|
|
27
|
-
retrieve(
|
|
28
|
-
|
|
28
|
+
retrieve(
|
|
29
|
+
collectionID: string,
|
|
30
|
+
query: CollectionRetrieveParams | null | undefined = {},
|
|
31
|
+
options?: RequestOptions,
|
|
32
|
+
): APIPromise<CollectionRetrieveResponse> {
|
|
33
|
+
return this._client.get(path`/collections/${collectionID}`, { query, ...options });
|
|
29
34
|
}
|
|
30
35
|
|
|
31
36
|
/**
|
|
@@ -33,10 +38,11 @@ export class Collections extends APIResource {
|
|
|
33
38
|
*/
|
|
34
39
|
update(
|
|
35
40
|
collectionID: string,
|
|
36
|
-
|
|
41
|
+
params: CollectionUpdateParams,
|
|
37
42
|
options?: RequestOptions,
|
|
38
43
|
): APIPromise<CollectionUpdateResponse> {
|
|
39
|
-
|
|
44
|
+
const { projectId, ...body } = params;
|
|
45
|
+
return this._client.put(path`/collections/${collectionID}`, { query: { projectId }, body, ...options });
|
|
40
46
|
}
|
|
41
47
|
|
|
42
48
|
/**
|
|
@@ -55,8 +61,13 @@ export class Collections extends APIResource {
|
|
|
55
61
|
/**
|
|
56
62
|
* Delete a collection
|
|
57
63
|
*/
|
|
58
|
-
delete(
|
|
59
|
-
|
|
64
|
+
delete(
|
|
65
|
+
collectionID: string,
|
|
66
|
+
params: CollectionDeleteParams | null | undefined = {},
|
|
67
|
+
options?: RequestOptions,
|
|
68
|
+
): APIPromise<unknown> {
|
|
69
|
+
const { projectId } = params ?? {};
|
|
70
|
+
return this._client.delete(path`/collections/${collectionID}`, { query: { projectId }, ...options });
|
|
60
71
|
}
|
|
61
72
|
}
|
|
62
73
|
|
|
@@ -288,20 +299,40 @@ export type CollectionDeleteResponse = unknown;
|
|
|
288
299
|
|
|
289
300
|
export interface CollectionCreateParams {
|
|
290
301
|
/**
|
|
291
|
-
* The name of the collection.
|
|
302
|
+
* Body param: The name of the collection.
|
|
292
303
|
*/
|
|
293
304
|
name: string;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Query param: The projectId used for ownership resource management. Either to
|
|
308
|
+
* assert ownership or to set the owner of the resource(s)
|
|
309
|
+
*/
|
|
310
|
+
projectId?: string;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export interface CollectionRetrieveParams {
|
|
314
|
+
/**
|
|
315
|
+
* The projectId used for ownership resource management. Either to assert ownership
|
|
316
|
+
* or to set the owner of the resource(s)
|
|
317
|
+
*/
|
|
318
|
+
projectId?: string;
|
|
294
319
|
}
|
|
295
320
|
|
|
296
321
|
export interface CollectionUpdateParams {
|
|
297
322
|
/**
|
|
298
|
-
* The
|
|
323
|
+
* Query param: The projectId used for ownership resource management. Either to
|
|
324
|
+
* assert ownership or to set the owner of the resource(s)
|
|
325
|
+
*/
|
|
326
|
+
projectId?: string;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Body param: The new name for the Collection
|
|
299
330
|
*/
|
|
300
331
|
name?: string;
|
|
301
332
|
|
|
302
333
|
/**
|
|
303
|
-
* The AssetId of the image you want to use as a thumbnail for the
|
|
304
|
-
* to null to unset the thumbnail.
|
|
334
|
+
* Body param: The AssetId of the image you want to use as a thumbnail for the
|
|
335
|
+
* collection. Set to null to unset the thumbnail.
|
|
305
336
|
*/
|
|
306
337
|
thumbnail?: string;
|
|
307
338
|
}
|
|
@@ -312,6 +343,20 @@ export interface CollectionListParams extends CollectionsCursorParams {
|
|
|
312
343
|
* value is 100, minimum value is 1
|
|
313
344
|
*/
|
|
314
345
|
pageSize?: number;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* The projectId used for ownership resource management. Either to assert ownership
|
|
349
|
+
* or to set the owner of the resource(s)
|
|
350
|
+
*/
|
|
351
|
+
projectId?: string;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export interface CollectionDeleteParams {
|
|
355
|
+
/**
|
|
356
|
+
* The projectId used for ownership resource management. Either to assert ownership
|
|
357
|
+
* or to set the owner of the resource(s)
|
|
358
|
+
*/
|
|
359
|
+
projectId?: string;
|
|
315
360
|
}
|
|
316
361
|
|
|
317
362
|
Collections.Assets = Assets;
|
|
@@ -326,8 +371,10 @@ export declare namespace Collections {
|
|
|
326
371
|
type CollectionDeleteResponse as CollectionDeleteResponse,
|
|
327
372
|
type CollectionListResponsesCollectionsCursor as CollectionListResponsesCollectionsCursor,
|
|
328
373
|
type CollectionCreateParams as CollectionCreateParams,
|
|
374
|
+
type CollectionRetrieveParams as CollectionRetrieveParams,
|
|
329
375
|
type CollectionUpdateParams as CollectionUpdateParams,
|
|
330
376
|
type CollectionListParams as CollectionListParams,
|
|
377
|
+
type CollectionDeleteParams as CollectionDeleteParams,
|
|
331
378
|
};
|
|
332
379
|
|
|
333
380
|
export {
|
|
@@ -15,8 +15,10 @@ export {
|
|
|
15
15
|
type CollectionListResponse,
|
|
16
16
|
type CollectionDeleteResponse,
|
|
17
17
|
type CollectionCreateParams,
|
|
18
|
+
type CollectionRetrieveParams,
|
|
18
19
|
type CollectionUpdateParams,
|
|
19
20
|
type CollectionListParams,
|
|
21
|
+
type CollectionDeleteParams,
|
|
20
22
|
type CollectionListResponsesCollectionsCursor,
|
|
21
23
|
} from './collections';
|
|
22
24
|
export {
|
|
@@ -9,8 +9,13 @@ export class Models extends APIResource {
|
|
|
9
9
|
/**
|
|
10
10
|
* Add models to a specific collection
|
|
11
11
|
*/
|
|
12
|
-
add(collectionID: string,
|
|
13
|
-
|
|
12
|
+
add(collectionID: string, params: ModelAddParams, options?: RequestOptions): APIPromise<ModelAddResponse> {
|
|
13
|
+
const { projectId, ...body } = params;
|
|
14
|
+
return this._client.put(path`/collections/${collectionID}/models`, {
|
|
15
|
+
query: { projectId },
|
|
16
|
+
body,
|
|
17
|
+
...options,
|
|
18
|
+
});
|
|
14
19
|
}
|
|
15
20
|
|
|
16
21
|
/**
|
|
@@ -18,10 +23,15 @@ export class Models extends APIResource {
|
|
|
18
23
|
*/
|
|
19
24
|
remove(
|
|
20
25
|
collectionID: string,
|
|
21
|
-
|
|
26
|
+
params: ModelRemoveParams,
|
|
22
27
|
options?: RequestOptions,
|
|
23
28
|
): APIPromise<ModelRemoveResponse> {
|
|
24
|
-
|
|
29
|
+
const { projectId, ...body } = params;
|
|
30
|
+
return this._client.delete(path`/collections/${collectionID}/models`, {
|
|
31
|
+
query: { projectId },
|
|
32
|
+
body,
|
|
33
|
+
...options,
|
|
34
|
+
});
|
|
25
35
|
}
|
|
26
36
|
}
|
|
27
37
|
|
|
@@ -141,16 +151,29 @@ export namespace ModelRemoveResponse {
|
|
|
141
151
|
|
|
142
152
|
export interface ModelAddParams {
|
|
143
153
|
/**
|
|
144
|
-
* The ids of the models to add to the collection. (Max 49 at once)
|
|
154
|
+
* Body param: The ids of the models to add to the collection. (Max 49 at once)
|
|
145
155
|
*/
|
|
146
156
|
modelIds: Array<string>;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Query param: The projectId used for ownership resource management. Either to
|
|
160
|
+
* assert ownership or to set the owner of the resource(s)
|
|
161
|
+
*/
|
|
162
|
+
projectId?: string;
|
|
147
163
|
}
|
|
148
164
|
|
|
149
165
|
export interface ModelRemoveParams {
|
|
150
166
|
/**
|
|
151
|
-
* The ids of the models to remove from the collection. (Max 49 at
|
|
167
|
+
* Body param: The ids of the models to remove from the collection. (Max 49 at
|
|
168
|
+
* once)
|
|
152
169
|
*/
|
|
153
170
|
modelIds: Array<string>;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Query param: The projectId used for ownership resource management. Either to
|
|
174
|
+
* assert ownership or to set the owner of the resource(s)
|
|
175
|
+
*/
|
|
176
|
+
projectId?: string;
|
|
154
177
|
}
|
|
155
178
|
|
|
156
179
|
export declare namespace Models {
|