@stackshift-cloud/sdk 1.0.0 → 1.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/README.md +117 -0
- package/dist/asset-media-v2.d.ts +65 -0
- package/dist/asset-media-v2.js +1 -0
- package/dist/asset-workflows.d.ts +269 -0
- package/dist/asset-workflows.js +69 -0
- package/dist/assets-dam-types.d.ts +225 -0
- package/dist/assets-dam-types.js +1 -0
- package/dist/assets-dam.d.ts +96 -0
- package/dist/assets-dam.js +47 -0
- package/dist/assets-platform-types.d.ts +218 -0
- package/dist/assets-platform-types.js +1 -0
- package/dist/assets-platform.d.ts +55 -0
- package/dist/assets-platform.js +90 -0
- package/dist/assets-video-types.d.ts +116 -0
- package/dist/assets-video-types.js +1 -0
- package/dist/assets-video.d.ts +25 -0
- package/dist/assets-video.js +19 -0
- package/dist/assets.d.ts +21 -1
- package/dist/assets.js +85 -132
- package/dist/client.d.ts +10 -0
- package/dist/client.js +26 -6
- package/dist/generated/assets-contract.d.ts +512 -2
- package/dist/generated/assets-contract.js +102 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +11 -0
- package/dist/mail-advanced-types.d.ts +9 -0
- package/dist/mail-billing.d.ts +34 -0
- package/dist/mail-billing.js +7 -0
- package/dist/mail-brands.d.ts +35 -0
- package/dist/mail-brands.js +17 -0
- package/dist/mail-campaigns.d.ts +72 -10
- package/dist/mail-campaigns.js +25 -2
- package/dist/mail-marketing.d.ts +84 -0
- package/dist/mail-marketing.js +24 -0
- package/dist/mail-migration.d.ts +16 -0
- package/dist/mail-migration.js +10 -0
- package/dist/mail-otp-types.d.ts +4 -0
- package/dist/mail-simulation.d.ts +4 -0
- package/dist/mail-simulation.js +1 -0
- package/dist/mail-subscribers.d.ts +39 -0
- package/dist/mail-subscribers.js +1 -0
- package/dist/mail-template-types.d.ts +8 -0
- package/dist/mail-tracking.d.ts +59 -0
- package/dist/mail-tracking.js +14 -0
- package/dist/mail-webhook-types.d.ts +4 -1
- package/dist/mail.d.ts +12 -0
- package/dist/mail.js +19 -0
- package/dist/types.d.ts +19 -0
- package/dist/upload-controller.d.ts +70 -0
- package/dist/upload-controller.js +223 -0
- package/dist/workload-security.d.ts +172 -0
- package/dist/workload-security.js +50 -0
- package/package.json +2 -2
package/dist/client.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { AssetsClient } from './assets.js';
|
|
2
2
|
import { MailClient } from './mail.js';
|
|
3
3
|
import { ProjectsClient } from './projects.js';
|
|
4
|
+
import { WorkloadSecurityClient } from './workload-security.js';
|
|
4
5
|
const defaultBaseUrl = 'https://api.stackshift.cloud/api/v1';
|
|
5
6
|
const defaultMailBaseUrl = 'https://api.stackshift.cloud/v1';
|
|
6
7
|
const defaultCdnBaseUrl = 'https://cdn.stackshift.cloud';
|
|
7
8
|
export class StackShift {
|
|
9
|
+
assetSpaceId;
|
|
8
10
|
apiKey;
|
|
9
11
|
baseUrl;
|
|
10
12
|
mailBaseUrl;
|
|
@@ -12,12 +14,14 @@ export class StackShift {
|
|
|
12
14
|
projects;
|
|
13
15
|
assets;
|
|
14
16
|
mail;
|
|
17
|
+
workloadSecurity;
|
|
15
18
|
fetcher;
|
|
16
19
|
constructor(options = {}) {
|
|
17
20
|
const apiKey = options.apiKey ?? env('STACKSHIFT_API_KEY');
|
|
18
21
|
if (!apiKey) {
|
|
19
22
|
throw new Error('StackShift SDK requires an apiKey');
|
|
20
23
|
}
|
|
24
|
+
this.assetSpaceId = options.assetSpaceId;
|
|
21
25
|
this.apiKey = apiKey;
|
|
22
26
|
this.baseUrl = (options.baseUrl ?? defaultBaseUrl).replace(/\/$/, '');
|
|
23
27
|
this.mailBaseUrl = (options.mailBaseUrl ?? defaultMailBaseUrl).replace(/\/$/, '');
|
|
@@ -26,34 +30,50 @@ export class StackShift {
|
|
|
26
30
|
this.projects = new ProjectsClient(this);
|
|
27
31
|
this.assets = new AssetsClient(this);
|
|
28
32
|
this.mail = new MailClient(this);
|
|
33
|
+
this.workloadSecurity = new WorkloadSecurityClient(this);
|
|
29
34
|
}
|
|
30
35
|
async request(path, init = {}) {
|
|
31
36
|
return this.requestFrom(this.baseUrl, path, init);
|
|
32
37
|
}
|
|
38
|
+
requestRaw(path, init = {}) {
|
|
39
|
+
return this.fetchFrom(this.baseUrl, path, init);
|
|
40
|
+
}
|
|
33
41
|
async mailRequest(path, init = {}) {
|
|
34
42
|
return this.requestFrom(this.mailBaseUrl, path, init);
|
|
35
43
|
}
|
|
44
|
+
playbackRequest(path, credential, body) {
|
|
45
|
+
return this.requestFrom(new URL(this.baseUrl).origin, `/playback${path}`, {
|
|
46
|
+
method: 'POST', body, headers: { Authorization: `Bearer ${credential}` },
|
|
47
|
+
});
|
|
48
|
+
}
|
|
36
49
|
async requestFrom(baseUrl, path, init) {
|
|
50
|
+
const response = await this.fetchFrom(baseUrl, path, init);
|
|
51
|
+
const raw = await response.text();
|
|
52
|
+
const parsed = raw ? JSON.parse(raw) : null;
|
|
53
|
+
if (parsed && typeof parsed === 'object' && 'success' in parsed && 'data' in parsed) {
|
|
54
|
+
return parsed.data;
|
|
55
|
+
}
|
|
56
|
+
return parsed;
|
|
57
|
+
}
|
|
58
|
+
async fetchFrom(baseUrl, path, init) {
|
|
37
59
|
const isFormData = typeof FormData !== 'undefined' && init.body instanceof FormData;
|
|
38
60
|
const response = await this.fetcher(`${baseUrl}${path}`, {
|
|
39
61
|
method: init.method ?? 'GET',
|
|
40
62
|
headers: stripUndefined({
|
|
41
63
|
Authorization: `Bearer ${this.apiKey}`,
|
|
64
|
+
'X-Asset-Space-ID': path.startsWith('/assets') ? this.assetSpaceId : undefined,
|
|
42
65
|
'Content-Type': isFormData ? undefined : 'application/json',
|
|
43
66
|
...init.headers,
|
|
44
67
|
}),
|
|
45
68
|
body: (init.body === undefined ? undefined : isFormData ? init.body : JSON.stringify(stripUndefined(init.body))),
|
|
46
69
|
});
|
|
47
|
-
const raw = await response.text();
|
|
48
|
-
const parsed = raw ? JSON.parse(raw) : null;
|
|
49
70
|
if (!response.ok) {
|
|
71
|
+
const raw = await response.text();
|
|
72
|
+
const parsed = raw ? JSON.parse(raw) : null;
|
|
50
73
|
const apiError = parsed?.error && typeof parsed.error === 'object' ? parsed.error : undefined;
|
|
51
74
|
throw new StackShiftAPIError(apiError?.message ?? parsed?.message ?? parsed?.error ?? `StackShift API request failed with ${response.status}`, response.status, apiError?.code, apiError?.details);
|
|
52
75
|
}
|
|
53
|
-
|
|
54
|
-
return parsed.data;
|
|
55
|
-
}
|
|
56
|
-
return parsed;
|
|
76
|
+
return response;
|
|
57
77
|
}
|
|
58
78
|
}
|
|
59
79
|
export class StackShiftAPIError extends Error {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type AssetOperationId = 'uploadAsset' | 'createUploadSession' | 'getUploadSession' | 'completeUploadSession' | 'cancelUploadSession' | 'createSignedUploadUrl' | 'createBucket' | 'listBuckets' | 'updateBucket' | 'deleteBucket' | 'getContentPolicy' | 'updateContentPolicy' | 'upsertTransformation' | 'listTransformations' | 'deleteTransformation' | 'createLifecycleRule' | 'listLifecycleRules' | 'deleteLifecycleRule' | 'createDomain' | 'listDomains' | 'verifyDomain' | 'deleteDomain' | 'getAnalytics' | 'getUsageSummary' | 'listEvents' | 'createWebhook' | 'listWebhooks' | 'deleteWebhook' | 'listWebhookDeliveries' | 'retryWebhookDelivery' | 'bulkAssets' | 'listCollections' | 'createCollection' | 'updateCollection' | 'deleteCollection' | 'listSavedSearches' | 'createSavedSearch' | 'updateSavedSearch' | 'deleteSavedSearch' | 'getAIConfig' | 'updateAIConfig' | 'getJob' | 'cancelJob' | 'listAssets' | 'getAsset' | 'patchAsset' | 'getAssetAI' | 'analyzeAsset' | 'moderateAsset' | 'getTranscript' | 'transcribeAsset' | 'smartCropAsset' | 'removeAssetBackground' | 'listAssetVersions' | 'createAssetBranch' | 'restoreAssetVersion' | 'promoteAssetBranch' | 'deleteAsset' | 'replaceAsset' | 'createSignedAssetUrl' | 'createSignedTransformUrl' | 'setAssetTags' | 'patchAssetMetadata' | 'purgeAsset';
|
|
2
|
-
export type AssetAPIScope = 'assets:read' | 'assets:write' | 'assets:process' | 'assets:admin';
|
|
1
|
+
export type AssetOperationId = 'putAssetAICredential' | 'deleteAssetAICredential' | 'openAssetAIOutput' | 'getVideoWorkspace' | 'processVideoVersion' | 'createVideoPlaybackSession' | 'revokeVideoPlaybackSession' | 'reviewVideoVersion' | 'listVideoCaptions' | 'addVideoCaption' | 'removeVideoCaption' | 'getVideoAnalytics' | 'createPublicVideoPlaybackSession' | 'renewVideoPlaybackSession' | 'recordVideoPlaybackEvents' | 'uploadAsset' | 'createUploadSession' | 'getUploadSession' | 'completeUploadSession' | 'cancelUploadSession' | 'createSignedUploadUrl' | 'createBucket' | 'listBuckets' | 'updateBucket' | 'deleteBucket' | 'configureBucketStorage' | 'startBucketRelocation' | 'createAssetConnection' | 'listAssetConnections' | 'getAssetConnection' | 'updateAssetConnection' | 'verifyAssetConnection' | 'deleteAssetConnection' | 'listOwnedS2Buckets' | 'createOwnedS2Bucket' | 'startAssetMigration' | 'listAssetMigrations' | 'getAssetMigration' | 'cancelAssetMigration' | 'retryAssetMigrationItem' | 'downloadAssetMigrationReport' | 'createAssetUploadCapability' | 'getContentPolicy' | 'updateContentPolicy' | 'upsertTransformation' | 'listTransformations' | 'materializeAssetTransform' | 'listAssetDerivatives' | 'generateAsset' | 'getAssetAutomation' | 'assetMCP' | 'getAssetWorkflowCatalog' | 'listAssetWorkflows' | 'createAssetWorkflow' | 'getAssetWorkflow' | 'updateAssetWorkflowDraft' | 'validateAssetWorkflow' | 'publishAssetWorkflow' | 'activateAssetWorkflow' | 'startAssetWorkflowRun' | 'listAssetWorkflowVersions' | 'listAssetWorkflowRuns' | 'getAssetWorkflowRun' | 'cancelAssetWorkflowRun' | 'retryAssetWorkflowRun' | 'listAssetWorkflowApprovals' | 'approveAssetWorkflow' | 'rejectAssetWorkflow' | 'listAssetWorkflowConnections' | 'createAssetWorkflowConnection' | 'rotateAssetWorkflowConnectionCredential' | 'rotateAssetWorkflowInboundHook' | 'receiveAssetWorkflowInboundHook' | 'deleteTransformation' | 'createLifecycleRule' | 'listLifecycleRules' | 'deleteLifecycleRule' | 'createDomain' | 'listDomains' | 'verifyDomain' | 'deleteDomain' | 'getAnalytics' | 'getUsageSummary' | 'listEvents' | 'createWebhook' | 'listWebhooks' | 'deleteWebhook' | 'listWebhookDeliveries' | 'retryWebhookDelivery' | 'bulkAssets' | 'listCollections' | 'createCollection' | 'updateCollection' | 'deleteCollection' | 'listSavedSearches' | 'createSavedSearch' | 'updateSavedSearch' | 'deleteSavedSearch' | 'getAIConfig' | 'updateAIConfig' | 'getJob' | 'cancelJob' | 'listAssets' | 'getAsset' | 'startAssetTextExtraction' | 'getAssetTextExtraction' | 'retryAssetTextExtraction' | 'patchAsset' | 'getAssetAI' | 'analyzeAsset' | 'moderateAsset' | 'getTranscript' | 'transcribeAsset' | 'smartCropAsset' | 'removeAssetBackground' | 'listAssetVersions' | 'createAssetBranch' | 'restoreAssetVersion' | 'promoteAssetBranch' | 'deleteAsset' | 'replaceAsset' | 'createSignedAssetUrl' | 'createSignedTransformUrl' | 'setAssetTags' | 'patchAssetMetadata' | 'purgeAsset' | 'widgetCreateUploadSession' | 'widgetGetUploadSession' | 'widgetUploadPart' | 'widgetCompleteUploadSession' | 'widgetCancelUploadSession' | 'widgetIngestRemoteUrl' | 'listAssetSpaces' | 'listAssetCollaborators' | 'inviteAssetCollaborator' | 'updateAssetCollaborator' | 'revokeAssetCollaborator' | 'acceptAssetInvitation' | 'listAssetMetadataSchemas' | 'createAssetMetadataSchema' | 'updateAssetMetadataSchema' | 'publishAssetMetadataSchema' | 'getAssetBucketGovernance' | 'updateAssetBucketGovernance' | 'getAssetMetadataEditor' | 'listAssetPublications' | 'createAssetPublication' | 'updateAssetPublication' | 'transitionAssetPublication' | 'resolveAssetPublication' | 'listAssetPublicationRenditions' | 'previewAssetPublication' | 'migrateAssetBucketGovernance' | 'createAssetPickerCapability' | 'revokeAssetPickerCapability' | 'listAssetModels' | 'processAssetModel' | 'resolveAssetPublicationAR' | 'listAssetGalleries' | 'createAssetGallery' | 'updateAssetGallery' | 'transitionAssetGallery' | 'resolveAssetGallery' | 'resolveAssetGalleryAR' | 'searchAssetPicker' | 'selectAssetPicker';
|
|
2
|
+
export type AssetAPIScope = 'assets:read' | 'assets:write' | 'assets:process' | 'assets:generate' | 'assets:publish' | 'assets:admin' | 'assets:any';
|
|
3
3
|
export interface AssetContractOperation {
|
|
4
4
|
readonly id: AssetOperationId;
|
|
5
5
|
readonly method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
@@ -7,6 +7,81 @@ export interface AssetContractOperation {
|
|
|
7
7
|
readonly scope: AssetAPIScope;
|
|
8
8
|
}
|
|
9
9
|
export declare const assetContractOperations: readonly [{
|
|
10
|
+
readonly id: "putAssetAICredential";
|
|
11
|
+
readonly method: "PUT";
|
|
12
|
+
readonly path: "/api/v1/assets/ai/credential";
|
|
13
|
+
readonly scope: "assets:process";
|
|
14
|
+
}, {
|
|
15
|
+
readonly id: "deleteAssetAICredential";
|
|
16
|
+
readonly method: "DELETE";
|
|
17
|
+
readonly path: "/api/v1/assets/ai/credential";
|
|
18
|
+
readonly scope: "assets:process";
|
|
19
|
+
}, {
|
|
20
|
+
readonly id: "openAssetAIOutput";
|
|
21
|
+
readonly method: "GET";
|
|
22
|
+
readonly path: "/api/v1/assets/{assetID}/ai/outputs/{outputID}";
|
|
23
|
+
readonly scope: "assets:read";
|
|
24
|
+
}, {
|
|
25
|
+
readonly id: "getVideoWorkspace";
|
|
26
|
+
readonly method: "GET";
|
|
27
|
+
readonly path: "/api/v1/assets/{assetID}/video";
|
|
28
|
+
readonly scope: "assets:read";
|
|
29
|
+
}, {
|
|
30
|
+
readonly id: "processVideoVersion";
|
|
31
|
+
readonly method: "POST";
|
|
32
|
+
readonly path: "/api/v1/assets/{assetID}/versions/{versionID}/video";
|
|
33
|
+
readonly scope: "assets:process";
|
|
34
|
+
}, {
|
|
35
|
+
readonly id: "createVideoPlaybackSession";
|
|
36
|
+
readonly method: "POST";
|
|
37
|
+
readonly path: "/api/v1/assets/{assetID}/playback-sessions";
|
|
38
|
+
readonly scope: "assets:read";
|
|
39
|
+
}, {
|
|
40
|
+
readonly id: "revokeVideoPlaybackSession";
|
|
41
|
+
readonly method: "DELETE";
|
|
42
|
+
readonly path: "/api/v1/assets/{assetID}/playback-sessions/{sessionID}";
|
|
43
|
+
readonly scope: "assets:write";
|
|
44
|
+
}, {
|
|
45
|
+
readonly id: "reviewVideoVersion";
|
|
46
|
+
readonly method: "POST";
|
|
47
|
+
readonly path: "/api/v1/assets/{assetID}/versions/{versionID}/video/review";
|
|
48
|
+
readonly scope: "assets:admin";
|
|
49
|
+
}, {
|
|
50
|
+
readonly id: "listVideoCaptions";
|
|
51
|
+
readonly method: "GET";
|
|
52
|
+
readonly path: "/api/v1/assets/{assetID}/versions/{versionID}/video/captions";
|
|
53
|
+
readonly scope: "assets:read";
|
|
54
|
+
}, {
|
|
55
|
+
readonly id: "addVideoCaption";
|
|
56
|
+
readonly method: "POST";
|
|
57
|
+
readonly path: "/api/v1/assets/{assetID}/versions/{versionID}/video/captions";
|
|
58
|
+
readonly scope: "assets:write";
|
|
59
|
+
}, {
|
|
60
|
+
readonly id: "removeVideoCaption";
|
|
61
|
+
readonly method: "DELETE";
|
|
62
|
+
readonly path: "/api/v1/assets/{assetID}/versions/{versionID}/video/captions/{captionID}";
|
|
63
|
+
readonly scope: "assets:write";
|
|
64
|
+
}, {
|
|
65
|
+
readonly id: "getVideoAnalytics";
|
|
66
|
+
readonly method: "GET";
|
|
67
|
+
readonly path: "/api/v1/assets/{assetID}/video/analytics";
|
|
68
|
+
readonly scope: "assets:read";
|
|
69
|
+
}, {
|
|
70
|
+
readonly id: "createPublicVideoPlaybackSession";
|
|
71
|
+
readonly method: "POST";
|
|
72
|
+
readonly path: "/playback/assets/{assetID}/sessions";
|
|
73
|
+
readonly scope: "assets:read";
|
|
74
|
+
}, {
|
|
75
|
+
readonly id: "renewVideoPlaybackSession";
|
|
76
|
+
readonly method: "POST";
|
|
77
|
+
readonly path: "/playback/sessions/renew";
|
|
78
|
+
readonly scope: "assets:read";
|
|
79
|
+
}, {
|
|
80
|
+
readonly id: "recordVideoPlaybackEvents";
|
|
81
|
+
readonly method: "POST";
|
|
82
|
+
readonly path: "/playback/events";
|
|
83
|
+
readonly scope: "assets:read";
|
|
84
|
+
}, {
|
|
10
85
|
readonly id: "uploadAsset";
|
|
11
86
|
readonly method: "POST";
|
|
12
87
|
readonly path: "/api/v1/assets/upload";
|
|
@@ -56,6 +131,91 @@ export declare const assetContractOperations: readonly [{
|
|
|
56
131
|
readonly method: "DELETE";
|
|
57
132
|
readonly path: "/api/v1/assets/buckets/{bucketID}";
|
|
58
133
|
readonly scope: "assets:admin";
|
|
134
|
+
}, {
|
|
135
|
+
readonly id: "configureBucketStorage";
|
|
136
|
+
readonly method: "PUT";
|
|
137
|
+
readonly path: "/api/v1/assets/buckets/{bucketID}/storage";
|
|
138
|
+
readonly scope: "assets:write";
|
|
139
|
+
}, {
|
|
140
|
+
readonly id: "startBucketRelocation";
|
|
141
|
+
readonly method: "POST";
|
|
142
|
+
readonly path: "/api/v1/assets/buckets/{bucketID}/relocations";
|
|
143
|
+
readonly scope: "assets:process";
|
|
144
|
+
}, {
|
|
145
|
+
readonly id: "createAssetConnection";
|
|
146
|
+
readonly method: "POST";
|
|
147
|
+
readonly path: "/api/v1/assets/connections";
|
|
148
|
+
readonly scope: "assets:admin";
|
|
149
|
+
}, {
|
|
150
|
+
readonly id: "listAssetConnections";
|
|
151
|
+
readonly method: "GET";
|
|
152
|
+
readonly path: "/api/v1/assets/connections";
|
|
153
|
+
readonly scope: "assets:read";
|
|
154
|
+
}, {
|
|
155
|
+
readonly id: "getAssetConnection";
|
|
156
|
+
readonly method: "GET";
|
|
157
|
+
readonly path: "/api/v1/assets/connections/{connectionID}";
|
|
158
|
+
readonly scope: "assets:read";
|
|
159
|
+
}, {
|
|
160
|
+
readonly id: "updateAssetConnection";
|
|
161
|
+
readonly method: "PATCH";
|
|
162
|
+
readonly path: "/api/v1/assets/connections/{connectionID}";
|
|
163
|
+
readonly scope: "assets:admin";
|
|
164
|
+
}, {
|
|
165
|
+
readonly id: "verifyAssetConnection";
|
|
166
|
+
readonly method: "POST";
|
|
167
|
+
readonly path: "/api/v1/assets/connections/{connectionID}/verify";
|
|
168
|
+
readonly scope: "assets:admin";
|
|
169
|
+
}, {
|
|
170
|
+
readonly id: "deleteAssetConnection";
|
|
171
|
+
readonly method: "DELETE";
|
|
172
|
+
readonly path: "/api/v1/assets/connections/{connectionID}";
|
|
173
|
+
readonly scope: "assets:admin";
|
|
174
|
+
}, {
|
|
175
|
+
readonly id: "listOwnedS2Buckets";
|
|
176
|
+
readonly method: "GET";
|
|
177
|
+
readonly path: "/api/v1/assets/s2-buckets";
|
|
178
|
+
readonly scope: "assets:read";
|
|
179
|
+
}, {
|
|
180
|
+
readonly id: "createOwnedS2Bucket";
|
|
181
|
+
readonly method: "POST";
|
|
182
|
+
readonly path: "/api/v1/assets/s2-buckets";
|
|
183
|
+
readonly scope: "assets:admin";
|
|
184
|
+
}, {
|
|
185
|
+
readonly id: "startAssetMigration";
|
|
186
|
+
readonly method: "POST";
|
|
187
|
+
readonly path: "/api/v1/assets/migrations";
|
|
188
|
+
readonly scope: "assets:process";
|
|
189
|
+
}, {
|
|
190
|
+
readonly id: "listAssetMigrations";
|
|
191
|
+
readonly method: "GET";
|
|
192
|
+
readonly path: "/api/v1/assets/migrations";
|
|
193
|
+
readonly scope: "assets:read";
|
|
194
|
+
}, {
|
|
195
|
+
readonly id: "getAssetMigration";
|
|
196
|
+
readonly method: "GET";
|
|
197
|
+
readonly path: "/api/v1/assets/migrations/{migrationID}";
|
|
198
|
+
readonly scope: "assets:read";
|
|
199
|
+
}, {
|
|
200
|
+
readonly id: "cancelAssetMigration";
|
|
201
|
+
readonly method: "POST";
|
|
202
|
+
readonly path: "/api/v1/assets/migrations/{migrationID}/cancel";
|
|
203
|
+
readonly scope: "assets:process";
|
|
204
|
+
}, {
|
|
205
|
+
readonly id: "retryAssetMigrationItem";
|
|
206
|
+
readonly method: "POST";
|
|
207
|
+
readonly path: "/api/v1/assets/migrations/{migrationID}/items/{itemID}/retry";
|
|
208
|
+
readonly scope: "assets:process";
|
|
209
|
+
}, {
|
|
210
|
+
readonly id: "downloadAssetMigrationReport";
|
|
211
|
+
readonly method: "GET";
|
|
212
|
+
readonly path: "/api/v1/assets/migrations/{migrationID}/report";
|
|
213
|
+
readonly scope: "assets:read";
|
|
214
|
+
}, {
|
|
215
|
+
readonly id: "createAssetUploadCapability";
|
|
216
|
+
readonly method: "POST";
|
|
217
|
+
readonly path: "/api/v1/assets/upload-capabilities";
|
|
218
|
+
readonly scope: "assets:write";
|
|
59
219
|
}, {
|
|
60
220
|
readonly id: "getContentPolicy";
|
|
61
221
|
readonly method: "GET";
|
|
@@ -76,6 +236,141 @@ export declare const assetContractOperations: readonly [{
|
|
|
76
236
|
readonly method: "GET";
|
|
77
237
|
readonly path: "/api/v1/assets/transformations";
|
|
78
238
|
readonly scope: "assets:read";
|
|
239
|
+
}, {
|
|
240
|
+
readonly id: "materializeAssetTransform";
|
|
241
|
+
readonly method: "POST";
|
|
242
|
+
readonly path: "/api/v1/assets/{assetID}/transforms";
|
|
243
|
+
readonly scope: "assets:process";
|
|
244
|
+
}, {
|
|
245
|
+
readonly id: "listAssetDerivatives";
|
|
246
|
+
readonly method: "GET";
|
|
247
|
+
readonly path: "/api/v1/assets/{assetID}/derivatives";
|
|
248
|
+
readonly scope: "assets:read";
|
|
249
|
+
}, {
|
|
250
|
+
readonly id: "generateAsset";
|
|
251
|
+
readonly method: "POST";
|
|
252
|
+
readonly path: "/api/v1/assets/generations";
|
|
253
|
+
readonly scope: "assets:generate";
|
|
254
|
+
}, {
|
|
255
|
+
readonly id: "getAssetAutomation";
|
|
256
|
+
readonly method: "GET";
|
|
257
|
+
readonly path: "/api/v1/assets/automation";
|
|
258
|
+
readonly scope: "assets:read";
|
|
259
|
+
}, {
|
|
260
|
+
readonly id: "assetMCP";
|
|
261
|
+
readonly method: "POST";
|
|
262
|
+
readonly path: "/api/v1/assets/mcp";
|
|
263
|
+
readonly scope: "assets:any";
|
|
264
|
+
}, {
|
|
265
|
+
readonly id: "getAssetWorkflowCatalog";
|
|
266
|
+
readonly method: "GET";
|
|
267
|
+
readonly path: "/api/v1/assets/workflows/catalog";
|
|
268
|
+
readonly scope: "assets:read";
|
|
269
|
+
}, {
|
|
270
|
+
readonly id: "listAssetWorkflows";
|
|
271
|
+
readonly method: "GET";
|
|
272
|
+
readonly path: "/api/v1/assets/workflows";
|
|
273
|
+
readonly scope: "assets:read";
|
|
274
|
+
}, {
|
|
275
|
+
readonly id: "createAssetWorkflow";
|
|
276
|
+
readonly method: "POST";
|
|
277
|
+
readonly path: "/api/v1/assets/workflows";
|
|
278
|
+
readonly scope: "assets:write";
|
|
279
|
+
}, {
|
|
280
|
+
readonly id: "getAssetWorkflow";
|
|
281
|
+
readonly method: "GET";
|
|
282
|
+
readonly path: "/api/v1/assets/workflows/{workflowId}";
|
|
283
|
+
readonly scope: "assets:read";
|
|
284
|
+
}, {
|
|
285
|
+
readonly id: "updateAssetWorkflowDraft";
|
|
286
|
+
readonly method: "PUT";
|
|
287
|
+
readonly path: "/api/v1/assets/workflows/{workflowId}/draft";
|
|
288
|
+
readonly scope: "assets:write";
|
|
289
|
+
}, {
|
|
290
|
+
readonly id: "validateAssetWorkflow";
|
|
291
|
+
readonly method: "POST";
|
|
292
|
+
readonly path: "/api/v1/assets/workflows/{workflowId}/validate";
|
|
293
|
+
readonly scope: "assets:write";
|
|
294
|
+
}, {
|
|
295
|
+
readonly id: "publishAssetWorkflow";
|
|
296
|
+
readonly method: "POST";
|
|
297
|
+
readonly path: "/api/v1/assets/workflows/{workflowId}/publish";
|
|
298
|
+
readonly scope: "assets:publish";
|
|
299
|
+
}, {
|
|
300
|
+
readonly id: "activateAssetWorkflow";
|
|
301
|
+
readonly method: "POST";
|
|
302
|
+
readonly path: "/api/v1/assets/workflows/{workflowId}/activate";
|
|
303
|
+
readonly scope: "assets:publish";
|
|
304
|
+
}, {
|
|
305
|
+
readonly id: "startAssetWorkflowRun";
|
|
306
|
+
readonly method: "POST";
|
|
307
|
+
readonly path: "/api/v1/assets/workflows/{workflowId}/run";
|
|
308
|
+
readonly scope: "assets:write";
|
|
309
|
+
}, {
|
|
310
|
+
readonly id: "listAssetWorkflowVersions";
|
|
311
|
+
readonly method: "GET";
|
|
312
|
+
readonly path: "/api/v1/assets/workflows/{workflowId}/versions";
|
|
313
|
+
readonly scope: "assets:read";
|
|
314
|
+
}, {
|
|
315
|
+
readonly id: "listAssetWorkflowRuns";
|
|
316
|
+
readonly method: "GET";
|
|
317
|
+
readonly path: "/api/v1/assets/workflows/{workflowId}/runs";
|
|
318
|
+
readonly scope: "assets:read";
|
|
319
|
+
}, {
|
|
320
|
+
readonly id: "getAssetWorkflowRun";
|
|
321
|
+
readonly method: "GET";
|
|
322
|
+
readonly path: "/api/v1/assets/workflows/runs/{runId}";
|
|
323
|
+
readonly scope: "assets:read";
|
|
324
|
+
}, {
|
|
325
|
+
readonly id: "cancelAssetWorkflowRun";
|
|
326
|
+
readonly method: "POST";
|
|
327
|
+
readonly path: "/api/v1/assets/workflows/runs/{runId}/cancel";
|
|
328
|
+
readonly scope: "assets:write";
|
|
329
|
+
}, {
|
|
330
|
+
readonly id: "retryAssetWorkflowRun";
|
|
331
|
+
readonly method: "POST";
|
|
332
|
+
readonly path: "/api/v1/assets/workflows/runs/{runId}/retry";
|
|
333
|
+
readonly scope: "assets:write";
|
|
334
|
+
}, {
|
|
335
|
+
readonly id: "listAssetWorkflowApprovals";
|
|
336
|
+
readonly method: "GET";
|
|
337
|
+
readonly path: "/api/v1/assets/workflows/approvals";
|
|
338
|
+
readonly scope: "assets:read";
|
|
339
|
+
}, {
|
|
340
|
+
readonly id: "approveAssetWorkflow";
|
|
341
|
+
readonly method: "POST";
|
|
342
|
+
readonly path: "/api/v1/assets/workflows/approvals/{approvalId}/approve";
|
|
343
|
+
readonly scope: "assets:publish";
|
|
344
|
+
}, {
|
|
345
|
+
readonly id: "rejectAssetWorkflow";
|
|
346
|
+
readonly method: "POST";
|
|
347
|
+
readonly path: "/api/v1/assets/workflows/approvals/{approvalId}/reject";
|
|
348
|
+
readonly scope: "assets:publish";
|
|
349
|
+
}, {
|
|
350
|
+
readonly id: "listAssetWorkflowConnections";
|
|
351
|
+
readonly method: "GET";
|
|
352
|
+
readonly path: "/api/v1/assets/workflows/connections";
|
|
353
|
+
readonly scope: "assets:read";
|
|
354
|
+
}, {
|
|
355
|
+
readonly id: "createAssetWorkflowConnection";
|
|
356
|
+
readonly method: "POST";
|
|
357
|
+
readonly path: "/api/v1/assets/workflows/connections";
|
|
358
|
+
readonly scope: "assets:admin";
|
|
359
|
+
}, {
|
|
360
|
+
readonly id: "rotateAssetWorkflowConnectionCredential";
|
|
361
|
+
readonly method: "POST";
|
|
362
|
+
readonly path: "/api/v1/assets/workflows/connections/{connectionId}/credential/rotate";
|
|
363
|
+
readonly scope: "assets:admin";
|
|
364
|
+
}, {
|
|
365
|
+
readonly id: "rotateAssetWorkflowInboundHook";
|
|
366
|
+
readonly method: "POST";
|
|
367
|
+
readonly path: "/api/v1/assets/workflows/{workflowId}/inbound-hook/rotate";
|
|
368
|
+
readonly scope: "assets:write";
|
|
369
|
+
}, {
|
|
370
|
+
readonly id: "receiveAssetWorkflowInboundHook";
|
|
371
|
+
readonly method: "POST";
|
|
372
|
+
readonly path: "/api/v1/assets/workflow-hooks/{token}";
|
|
373
|
+
readonly scope: "assets:any";
|
|
79
374
|
}, {
|
|
80
375
|
readonly id: "deleteTransformation";
|
|
81
376
|
readonly method: "DELETE";
|
|
@@ -231,6 +526,21 @@ export declare const assetContractOperations: readonly [{
|
|
|
231
526
|
readonly method: "GET";
|
|
232
527
|
readonly path: "/api/v1/assets/{assetID}";
|
|
233
528
|
readonly scope: "assets:read";
|
|
529
|
+
}, {
|
|
530
|
+
readonly id: "startAssetTextExtraction";
|
|
531
|
+
readonly method: "POST";
|
|
532
|
+
readonly path: "/api/v1/assets/{assetID}/text-extraction";
|
|
533
|
+
readonly scope: "assets:process";
|
|
534
|
+
}, {
|
|
535
|
+
readonly id: "getAssetTextExtraction";
|
|
536
|
+
readonly method: "GET";
|
|
537
|
+
readonly path: "/api/v1/assets/{assetID}/text-extraction";
|
|
538
|
+
readonly scope: "assets:read";
|
|
539
|
+
}, {
|
|
540
|
+
readonly id: "retryAssetTextExtraction";
|
|
541
|
+
readonly method: "POST";
|
|
542
|
+
readonly path: "/api/v1/assets/text-extractions/{extractionID}/retry";
|
|
543
|
+
readonly scope: "assets:process";
|
|
234
544
|
}, {
|
|
235
545
|
readonly id: "patchAsset";
|
|
236
546
|
readonly method: "PATCH";
|
|
@@ -326,4 +636,204 @@ export declare const assetContractOperations: readonly [{
|
|
|
326
636
|
readonly method: "POST";
|
|
327
637
|
readonly path: "/api/v1/assets/{assetID}/purge";
|
|
328
638
|
readonly scope: "assets:admin";
|
|
639
|
+
}, {
|
|
640
|
+
readonly id: "widgetCreateUploadSession";
|
|
641
|
+
readonly method: "POST";
|
|
642
|
+
readonly path: "/assets/widget/sessions";
|
|
643
|
+
readonly scope: "assets:write";
|
|
644
|
+
}, {
|
|
645
|
+
readonly id: "widgetGetUploadSession";
|
|
646
|
+
readonly method: "GET";
|
|
647
|
+
readonly path: "/assets/widget/sessions/current";
|
|
648
|
+
readonly scope: "assets:write";
|
|
649
|
+
}, {
|
|
650
|
+
readonly id: "widgetUploadPart";
|
|
651
|
+
readonly method: "PUT";
|
|
652
|
+
readonly path: "/assets/widget/uploads/{sessionToken}/parts/{partNumber}";
|
|
653
|
+
readonly scope: "assets:write";
|
|
654
|
+
}, {
|
|
655
|
+
readonly id: "widgetCompleteUploadSession";
|
|
656
|
+
readonly method: "POST";
|
|
657
|
+
readonly path: "/assets/widget/sessions/current/complete";
|
|
658
|
+
readonly scope: "assets:write";
|
|
659
|
+
}, {
|
|
660
|
+
readonly id: "widgetCancelUploadSession";
|
|
661
|
+
readonly method: "DELETE";
|
|
662
|
+
readonly path: "/assets/widget/sessions/current";
|
|
663
|
+
readonly scope: "assets:write";
|
|
664
|
+
}, {
|
|
665
|
+
readonly id: "widgetIngestRemoteUrl";
|
|
666
|
+
readonly method: "POST";
|
|
667
|
+
readonly path: "/assets/widget/remote-url";
|
|
668
|
+
readonly scope: "assets:write";
|
|
669
|
+
}, {
|
|
670
|
+
readonly id: "listAssetSpaces";
|
|
671
|
+
readonly method: "GET";
|
|
672
|
+
readonly path: "/api/v1/assets/spaces";
|
|
673
|
+
readonly scope: "assets:read";
|
|
674
|
+
}, {
|
|
675
|
+
readonly id: "listAssetCollaborators";
|
|
676
|
+
readonly method: "GET";
|
|
677
|
+
readonly path: "/api/v1/assets/collaborators";
|
|
678
|
+
readonly scope: "assets:admin";
|
|
679
|
+
}, {
|
|
680
|
+
readonly id: "inviteAssetCollaborator";
|
|
681
|
+
readonly method: "POST";
|
|
682
|
+
readonly path: "/api/v1/assets/collaborators";
|
|
683
|
+
readonly scope: "assets:admin";
|
|
684
|
+
}, {
|
|
685
|
+
readonly id: "updateAssetCollaborator";
|
|
686
|
+
readonly method: "PUT";
|
|
687
|
+
readonly path: "/api/v1/assets/collaborators/{collaboratorID}";
|
|
688
|
+
readonly scope: "assets:admin";
|
|
689
|
+
}, {
|
|
690
|
+
readonly id: "revokeAssetCollaborator";
|
|
691
|
+
readonly method: "DELETE";
|
|
692
|
+
readonly path: "/api/v1/assets/collaborators/{collaboratorID}";
|
|
693
|
+
readonly scope: "assets:admin";
|
|
694
|
+
}, {
|
|
695
|
+
readonly id: "acceptAssetInvitation";
|
|
696
|
+
readonly method: "POST";
|
|
697
|
+
readonly path: "/api/v1/assets/invitations/{invitationID}/accept";
|
|
698
|
+
readonly scope: "assets:read";
|
|
699
|
+
}, {
|
|
700
|
+
readonly id: "listAssetMetadataSchemas";
|
|
701
|
+
readonly method: "GET";
|
|
702
|
+
readonly path: "/api/v1/assets/metadata-schemas";
|
|
703
|
+
readonly scope: "assets:read";
|
|
704
|
+
}, {
|
|
705
|
+
readonly id: "createAssetMetadataSchema";
|
|
706
|
+
readonly method: "POST";
|
|
707
|
+
readonly path: "/api/v1/assets/metadata-schemas";
|
|
708
|
+
readonly scope: "assets:admin";
|
|
709
|
+
}, {
|
|
710
|
+
readonly id: "updateAssetMetadataSchema";
|
|
711
|
+
readonly method: "PUT";
|
|
712
|
+
readonly path: "/api/v1/assets/metadata-schemas/{schemaID}";
|
|
713
|
+
readonly scope: "assets:admin";
|
|
714
|
+
}, {
|
|
715
|
+
readonly id: "publishAssetMetadataSchema";
|
|
716
|
+
readonly method: "POST";
|
|
717
|
+
readonly path: "/api/v1/assets/metadata-schemas/{schemaID}/publish";
|
|
718
|
+
readonly scope: "assets:admin";
|
|
719
|
+
}, {
|
|
720
|
+
readonly id: "getAssetBucketGovernance";
|
|
721
|
+
readonly method: "GET";
|
|
722
|
+
readonly path: "/api/v1/assets/buckets/{bucketID}/governance";
|
|
723
|
+
readonly scope: "assets:admin";
|
|
724
|
+
}, {
|
|
725
|
+
readonly id: "updateAssetBucketGovernance";
|
|
726
|
+
readonly method: "PUT";
|
|
727
|
+
readonly path: "/api/v1/assets/buckets/{bucketID}/governance";
|
|
728
|
+
readonly scope: "assets:admin";
|
|
729
|
+
}, {
|
|
730
|
+
readonly id: "getAssetMetadataEditor";
|
|
731
|
+
readonly method: "GET";
|
|
732
|
+
readonly path: "/api/v1/assets/{assetID}/metadata-editor";
|
|
733
|
+
readonly scope: "assets:read";
|
|
734
|
+
}, {
|
|
735
|
+
readonly id: "listAssetPublications";
|
|
736
|
+
readonly method: "GET";
|
|
737
|
+
readonly path: "/api/v1/assets/publications";
|
|
738
|
+
readonly scope: "assets:read";
|
|
739
|
+
}, {
|
|
740
|
+
readonly id: "createAssetPublication";
|
|
741
|
+
readonly method: "POST";
|
|
742
|
+
readonly path: "/api/v1/assets/publications";
|
|
743
|
+
readonly scope: "assets:write";
|
|
744
|
+
}, {
|
|
745
|
+
readonly id: "updateAssetPublication";
|
|
746
|
+
readonly method: "PUT";
|
|
747
|
+
readonly path: "/api/v1/assets/publications/{publicationID}";
|
|
748
|
+
readonly scope: "assets:write";
|
|
749
|
+
}, {
|
|
750
|
+
readonly id: "transitionAssetPublication";
|
|
751
|
+
readonly method: "POST";
|
|
752
|
+
readonly path: "/api/v1/assets/publications/{publicationID}/{action}";
|
|
753
|
+
readonly scope: "assets:publish";
|
|
754
|
+
}, {
|
|
755
|
+
readonly id: "resolveAssetPublication";
|
|
756
|
+
readonly method: "GET";
|
|
757
|
+
readonly path: "/api/v1/assets/publications/{publicationID}/resolve";
|
|
758
|
+
readonly scope: "assets:read";
|
|
759
|
+
}, {
|
|
760
|
+
readonly id: "listAssetPublicationRenditions";
|
|
761
|
+
readonly method: "GET";
|
|
762
|
+
readonly path: "/api/v1/assets/{assetID}/publication-renditions";
|
|
763
|
+
readonly scope: "assets:read";
|
|
764
|
+
}, {
|
|
765
|
+
readonly id: "previewAssetPublication";
|
|
766
|
+
readonly method: "GET";
|
|
767
|
+
readonly path: "/api/v1/assets/publications/{publicationID}/preview";
|
|
768
|
+
readonly scope: "assets:read";
|
|
769
|
+
}, {
|
|
770
|
+
readonly id: "migrateAssetBucketGovernance";
|
|
771
|
+
readonly method: "POST";
|
|
772
|
+
readonly path: "/api/v1/assets/buckets/{bucketID}/governance/migrate";
|
|
773
|
+
readonly scope: "assets:admin";
|
|
774
|
+
}, {
|
|
775
|
+
readonly id: "createAssetPickerCapability";
|
|
776
|
+
readonly method: "POST";
|
|
777
|
+
readonly path: "/api/v1/assets/picker-capabilities";
|
|
778
|
+
readonly scope: "assets:read";
|
|
779
|
+
}, {
|
|
780
|
+
readonly id: "revokeAssetPickerCapability";
|
|
781
|
+
readonly method: "DELETE";
|
|
782
|
+
readonly path: "/api/v1/assets/picker-capabilities/{capabilityID}";
|
|
783
|
+
readonly scope: "assets:read";
|
|
784
|
+
}, {
|
|
785
|
+
readonly id: "listAssetModels";
|
|
786
|
+
readonly method: "GET";
|
|
787
|
+
readonly path: "/api/v1/assets/{assetID}/models";
|
|
788
|
+
readonly scope: "assets:read";
|
|
789
|
+
}, {
|
|
790
|
+
readonly id: "processAssetModel";
|
|
791
|
+
readonly method: "POST";
|
|
792
|
+
readonly path: "/api/v1/assets/{assetID}/models";
|
|
793
|
+
readonly scope: "assets:process";
|
|
794
|
+
}, {
|
|
795
|
+
readonly id: "resolveAssetPublicationAR";
|
|
796
|
+
readonly method: "POST";
|
|
797
|
+
readonly path: "/api/v1/assets/publications/{publicationID}/ar";
|
|
798
|
+
readonly scope: "assets:read";
|
|
799
|
+
}, {
|
|
800
|
+
readonly id: "listAssetGalleries";
|
|
801
|
+
readonly method: "GET";
|
|
802
|
+
readonly path: "/api/v1/assets/galleries";
|
|
803
|
+
readonly scope: "assets:read";
|
|
804
|
+
}, {
|
|
805
|
+
readonly id: "createAssetGallery";
|
|
806
|
+
readonly method: "POST";
|
|
807
|
+
readonly path: "/api/v1/assets/galleries";
|
|
808
|
+
readonly scope: "assets:write";
|
|
809
|
+
}, {
|
|
810
|
+
readonly id: "updateAssetGallery";
|
|
811
|
+
readonly method: "PUT";
|
|
812
|
+
readonly path: "/api/v1/assets/galleries/{galleryID}";
|
|
813
|
+
readonly scope: "assets:write";
|
|
814
|
+
}, {
|
|
815
|
+
readonly id: "transitionAssetGallery";
|
|
816
|
+
readonly method: "POST";
|
|
817
|
+
readonly path: "/api/v1/assets/galleries/{galleryID}/{action}";
|
|
818
|
+
readonly scope: "assets:publish";
|
|
819
|
+
}, {
|
|
820
|
+
readonly id: "resolveAssetGallery";
|
|
821
|
+
readonly method: "GET";
|
|
822
|
+
readonly path: "/api/v1/assets/galleries/{galleryID}/resolve";
|
|
823
|
+
readonly scope: "assets:read";
|
|
824
|
+
}, {
|
|
825
|
+
readonly id: "resolveAssetGalleryAR";
|
|
826
|
+
readonly method: "POST";
|
|
827
|
+
readonly path: "/api/v1/assets/galleries/{galleryID}/ar";
|
|
828
|
+
readonly scope: "assets:read";
|
|
829
|
+
}, {
|
|
830
|
+
readonly id: "searchAssetPicker";
|
|
831
|
+
readonly method: "POST";
|
|
832
|
+
readonly path: "/assets/picker/search";
|
|
833
|
+
readonly scope: "assets:read";
|
|
834
|
+
}, {
|
|
835
|
+
readonly id: "selectAssetPicker";
|
|
836
|
+
readonly method: "POST";
|
|
837
|
+
readonly path: "/assets/picker/select";
|
|
838
|
+
readonly scope: "assets:read";
|
|
329
839
|
}];
|