@stackshift-cloud/sdk 1.2.0 → 1.3.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 +21 -0
- package/dist/ai-credits.d.ts +78 -0
- package/dist/ai-credits.js +15 -0
- package/dist/assets-dam-types.d.ts +35 -1
- package/dist/assets-dam.d.ts +11 -1
- package/dist/assets-dam.js +5 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +3 -0
- package/dist/generated/assets-contract.d.ts +286 -1
- package/dist/generated/assets-contract.js +57 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -34,6 +34,27 @@ Set your API key:
|
|
|
34
34
|
STACKSHIFT_API_KEY=sk_live_xxx
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
+
## AI credits
|
|
38
|
+
|
|
39
|
+
AI credits are account-scoped. Inspect the balance and usage, create a top-up checkout, or choose managed billing versus your own provider key:
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
import { StackShift } from '@stackshift-cloud/sdk'
|
|
43
|
+
|
|
44
|
+
const stackshift = new StackShift()
|
|
45
|
+
const balance = await stackshift.aiCredits.balance()
|
|
46
|
+
const usage = await stackshift.aiCredits.usage({ product: 'assets', limit: 25 })
|
|
47
|
+
const quote = await stackshift.aiCredits.quote(1_000, 'USD')
|
|
48
|
+
const checkout = await stackshift.aiCredits.checkout({
|
|
49
|
+
quote_id: quote.id,
|
|
50
|
+
idempotency_key: crypto.randomUUID(),
|
|
51
|
+
provider: 'paystack',
|
|
52
|
+
})
|
|
53
|
+
await stackshift.aiCredits.setFunding('assets', 'managed')
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Keep account API keys and checkout creation on your server. An Assets space ID does not change which billing account these methods use.
|
|
57
|
+
|
|
37
58
|
## Send email
|
|
38
59
|
|
|
39
60
|
```ts
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { StackShift } from './client.js';
|
|
2
|
+
export interface AICreditGrant {
|
|
3
|
+
id: string;
|
|
4
|
+
kind: string;
|
|
5
|
+
source: string;
|
|
6
|
+
policy_revision: number;
|
|
7
|
+
amount_microcredits: number;
|
|
8
|
+
remaining_microcredits: number;
|
|
9
|
+
available_at: string;
|
|
10
|
+
expires_at: string | null;
|
|
11
|
+
}
|
|
12
|
+
export interface AICreditBalance {
|
|
13
|
+
available_microcredits: number;
|
|
14
|
+
monthly_microcredits: number;
|
|
15
|
+
purchased_microcredits: number;
|
|
16
|
+
reserved_microcredits: number;
|
|
17
|
+
shortfall_microcredits: number;
|
|
18
|
+
next_reset: string;
|
|
19
|
+
grants: AICreditGrant[];
|
|
20
|
+
}
|
|
21
|
+
export interface AICreditUsage {
|
|
22
|
+
id: string;
|
|
23
|
+
operation_key: string;
|
|
24
|
+
product: string;
|
|
25
|
+
feature: string;
|
|
26
|
+
user_id: string;
|
|
27
|
+
project_id?: string;
|
|
28
|
+
space_id?: string;
|
|
29
|
+
parent_task_id?: string;
|
|
30
|
+
funding_mode: string;
|
|
31
|
+
state: string;
|
|
32
|
+
created_at: string;
|
|
33
|
+
reserved_microcredits: number;
|
|
34
|
+
used_microcredits: number;
|
|
35
|
+
returned_microcredits: number;
|
|
36
|
+
}
|
|
37
|
+
export interface AICreditUsagePage {
|
|
38
|
+
items: AICreditUsage[];
|
|
39
|
+
totals_microcredits: Record<string, number>;
|
|
40
|
+
}
|
|
41
|
+
export interface AICreditQuote {
|
|
42
|
+
id: string;
|
|
43
|
+
catalog_revision: number;
|
|
44
|
+
credit_microcredits: number;
|
|
45
|
+
amount_minor: number;
|
|
46
|
+
currency: string;
|
|
47
|
+
expires_at: string;
|
|
48
|
+
}
|
|
49
|
+
export interface AICreditCheckout {
|
|
50
|
+
reference: string;
|
|
51
|
+
status: string;
|
|
52
|
+
authorization_url?: string;
|
|
53
|
+
}
|
|
54
|
+
export type AIFundingPreferences = Record<'assets' | 'agents' | 'workflows', 'managed' | 'byok'>;
|
|
55
|
+
export declare class AICreditsClient {
|
|
56
|
+
private readonly client;
|
|
57
|
+
constructor(client: StackShift);
|
|
58
|
+
balance(): Promise<AICreditBalance>;
|
|
59
|
+
usage(filters?: {
|
|
60
|
+
product?: string;
|
|
61
|
+
user?: string;
|
|
62
|
+
project?: string;
|
|
63
|
+
space?: string;
|
|
64
|
+
from?: string;
|
|
65
|
+
until?: string;
|
|
66
|
+
before_time?: string;
|
|
67
|
+
before_id?: string;
|
|
68
|
+
limit?: number;
|
|
69
|
+
}): Promise<AICreditUsagePage>;
|
|
70
|
+
quote(credits: number, currency: 'USD' | 'NGN'): Promise<AICreditQuote>;
|
|
71
|
+
checkout(input: {
|
|
72
|
+
quote_id: string;
|
|
73
|
+
idempotency_key: string;
|
|
74
|
+
provider: string;
|
|
75
|
+
}): Promise<AICreditCheckout>;
|
|
76
|
+
funding(): Promise<AIFundingPreferences>;
|
|
77
|
+
setFunding(product: 'assets' | 'agents' | 'workflows', mode: 'managed' | 'byok'): Promise<AIFundingPreferences>;
|
|
78
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export class AICreditsClient {
|
|
2
|
+
client;
|
|
3
|
+
constructor(client) {
|
|
4
|
+
this.client = client;
|
|
5
|
+
}
|
|
6
|
+
balance() { return this.client.request('/billing/ai-credits', { method: 'GET' }); }
|
|
7
|
+
usage(filters = {}) {
|
|
8
|
+
const query = new URLSearchParams(Object.entries(filters).filter(([, v]) => v !== undefined).map(([k, v]) => [k, String(v)]));
|
|
9
|
+
return this.client.request(`/billing/ai-credits/usage?${query}`, { method: 'GET' });
|
|
10
|
+
}
|
|
11
|
+
quote(credits, currency) { return this.client.request('/billing/ai-credits/top-ups/quote', { method: 'POST', body: { credits, currency } }); }
|
|
12
|
+
checkout(input) { return this.client.request('/billing/ai-credits/top-ups/checkout', { method: 'POST', body: input }); }
|
|
13
|
+
funding() { return this.client.request('/billing/ai-credits/funding', { method: 'GET' }); }
|
|
14
|
+
setFunding(product, mode) { return this.client.request('/billing/ai-credits/funding', { method: 'PUT', body: { product, mode } }); }
|
|
15
|
+
}
|
|
@@ -129,6 +129,36 @@ export interface AssetModelPackage {
|
|
|
129
129
|
report: Record<string, unknown>;
|
|
130
130
|
updated_at: string;
|
|
131
131
|
}
|
|
132
|
+
export interface AssetModelTextureOverride {
|
|
133
|
+
texture_index: number;
|
|
134
|
+
asset_id: string;
|
|
135
|
+
version_id: string;
|
|
136
|
+
checksum_sha256: string;
|
|
137
|
+
}
|
|
138
|
+
export interface AssetModelVariant {
|
|
139
|
+
id: string;
|
|
140
|
+
asset_id: string;
|
|
141
|
+
source_version_id: string;
|
|
142
|
+
source_checksum_sha256: string;
|
|
143
|
+
name: string;
|
|
144
|
+
swatch: {
|
|
145
|
+
label: string;
|
|
146
|
+
color: string;
|
|
147
|
+
};
|
|
148
|
+
texture_overrides: AssetModelTextureOverride[];
|
|
149
|
+
revision: number;
|
|
150
|
+
}
|
|
151
|
+
export interface AssetModelVariantInput {
|
|
152
|
+
name: string;
|
|
153
|
+
source_version_id: string;
|
|
154
|
+
source_checksum_sha256: string;
|
|
155
|
+
swatch: {
|
|
156
|
+
label: string;
|
|
157
|
+
color: string;
|
|
158
|
+
};
|
|
159
|
+
texture_overrides: AssetModelTextureOverride[];
|
|
160
|
+
expected_revision?: number;
|
|
161
|
+
}
|
|
132
162
|
export interface AssetGalleryEntryInput {
|
|
133
163
|
publication_id: string;
|
|
134
164
|
fallback_publication_id?: string;
|
|
@@ -170,12 +200,14 @@ export interface AssetRenderRecipe {
|
|
|
170
200
|
background: string;
|
|
171
201
|
size: 512 | 1024;
|
|
172
202
|
}
|
|
173
|
-
export type AssetRenderOutput = 'proof' | 'poster' | 'spin' | 'turntable';
|
|
203
|
+
export type AssetRenderOutput = 'proof' | 'poster' | 'spin' | 'turntable' | 'model' | 'usdz';
|
|
174
204
|
export interface AssetRenderInput {
|
|
175
205
|
version_id: string;
|
|
176
206
|
source_checksum: string;
|
|
177
207
|
recipe: AssetRenderRecipe;
|
|
178
208
|
outputs: AssetRenderOutput[];
|
|
209
|
+
variant_id?: string;
|
|
210
|
+
variant_revision?: number;
|
|
179
211
|
}
|
|
180
212
|
export interface AssetRenderEstimate {
|
|
181
213
|
units: number;
|
|
@@ -197,6 +229,8 @@ export interface AssetRenderSet {
|
|
|
197
229
|
source_checksum: string;
|
|
198
230
|
recipe: AssetRenderRecipe;
|
|
199
231
|
requested: AssetRenderOutput[];
|
|
232
|
+
variant_id?: string;
|
|
233
|
+
variant_revision?: number;
|
|
200
234
|
status: 'queued' | 'processing' | 'ready' | 'failed';
|
|
201
235
|
can_retry: boolean;
|
|
202
236
|
units: number;
|
package/dist/assets-dam.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { StackShift } from './client.js';
|
|
2
2
|
import type { AssetJobSubmission } from './types.js';
|
|
3
3
|
import type { AssetRenderInput, AssetRenderEstimate, AssetRenderSubmission, AssetRenderingInfo } from './assets-dam-types.js';
|
|
4
|
-
import type { AssetAction, AssetSpaceAccess, AssetCollaborator, AssetMetadataSchema, AssetMetadataField, AssetBucketGovernance, AssetPublication, AssetPublicationInput, AssetPublicationStatus, AssetPublicationDelivery, AssetMediaReference, AssetPickerCapability, AssetPickerCapabilityInput, AssetModelPackage, AssetGallery, AssetGalleryEntryInput, AssetGalleryDelivery } from './assets-dam-types.js';
|
|
4
|
+
import type { AssetAction, AssetSpaceAccess, AssetCollaborator, AssetMetadataSchema, AssetMetadataField, AssetBucketGovernance, AssetPublication, AssetPublicationInput, AssetPublicationStatus, AssetPublicationDelivery, AssetMediaReference, AssetPickerCapability, AssetPickerCapabilityInput, AssetModelPackage, AssetModelVariant, AssetModelVariantInput, AssetGallery, AssetGalleryEntryInput, AssetGalleryDelivery } from './assets-dam-types.js';
|
|
5
5
|
export declare class AssetDAMClient {
|
|
6
6
|
private readonly client;
|
|
7
7
|
constructor(client: StackShift);
|
|
@@ -62,6 +62,10 @@ export declare class AssetDAMClient {
|
|
|
62
62
|
transitionPublication(id: string, revision: number, action: 'submit' | 'approve' | 'request-changes' | 'publish' | 'withdraw', note?: string): Promise<AssetPublication>;
|
|
63
63
|
resolvePublication(id: string, preview?: boolean): Promise<AssetPublicationDelivery>;
|
|
64
64
|
resolvePublicationAR(id: string): Promise<AssetPublicationDelivery>;
|
|
65
|
+
createPublicationARHandoff(id: string): Promise<{
|
|
66
|
+
handoff_url: string;
|
|
67
|
+
expires_at: string;
|
|
68
|
+
}>;
|
|
65
69
|
createPickerCapability(input: AssetPickerCapabilityInput): Promise<{
|
|
66
70
|
token: string;
|
|
67
71
|
capability: AssetPickerCapability;
|
|
@@ -78,6 +82,12 @@ export declare class AssetDAMClient {
|
|
|
78
82
|
estimateRender(assetId: string, revision: number, input: AssetRenderInput): Promise<AssetRenderEstimate>;
|
|
79
83
|
renderProduct(assetId: string, revision: number, idempotencyKey: string, input: AssetRenderInput, maximumUnits: number): Promise<AssetRenderSubmission>;
|
|
80
84
|
processModel(assetId: string, revision: number, idempotencyKey: string): Promise<AssetJobSubmission>;
|
|
85
|
+
modelVariants(assetId: string): Promise<AssetModelVariant[]>;
|
|
86
|
+
createModelVariant(assetId: string, revision: number, input: AssetModelVariantInput): Promise<AssetModelVariant>;
|
|
87
|
+
updateModelVariant(assetId: string, variantId: string, revision: number, input: AssetModelVariantInput): Promise<AssetModelVariant>;
|
|
88
|
+
deleteModelVariant(assetId: string, variantId: string, assetRevision: number, variantRevision: number): Promise<{
|
|
89
|
+
deleted: boolean;
|
|
90
|
+
}>;
|
|
81
91
|
galleries(cursor?: string): Promise<{
|
|
82
92
|
galleries: AssetGallery[];
|
|
83
93
|
next_cursor: string;
|
package/dist/assets-dam.js
CHANGED
|
@@ -32,12 +32,17 @@ export class AssetDAMClient {
|
|
|
32
32
|
transitionPublication(id, revision, action, note = '') { return this.client.request(`${path('publications', id)}/${action}`, { method: 'POST', headers: revisionHeaders(revision), body: { note } }); }
|
|
33
33
|
resolvePublication(id, preview = false) { return this.client.request(`${path('publications', id)}/${preview ? 'preview' : 'resolve'}`); }
|
|
34
34
|
resolvePublicationAR(id) { return this.client.request(`${path('publications', id)}/ar`, { method: 'POST' }); }
|
|
35
|
+
createPublicationARHandoff(id) { return this.client.request(`${path('publications', id)}/ar-handoff`, { method: 'POST' }); }
|
|
35
36
|
createPickerCapability(input) { return this.client.request('/assets/picker-capabilities', { method: 'POST', body: input }); }
|
|
36
37
|
revokePickerCapability(id) { return this.client.request(path('picker-capabilities', id), { method: 'DELETE' }); }
|
|
37
38
|
models(assetId) { return this.client.request(`/assets/${encodeURIComponent(assetId)}/models`); }
|
|
38
39
|
estimateRender(assetId, revision, input) { return this.client.request(`/assets/${encodeURIComponent(assetId)}/models`, { method: 'POST', headers: revisionHeaders(revision), body: { ...input, operation: 'estimate' } }); }
|
|
39
40
|
renderProduct(assetId, revision, idempotencyKey, input, maximumUnits) { return this.client.request(`/assets/${encodeURIComponent(assetId)}/models`, { method: 'POST', headers: { ...revisionHeaders(revision), 'Idempotency-Key': idempotencyKey }, body: { ...input, operation: 'render', maximum_units: maximumUnits } }); }
|
|
40
41
|
processModel(assetId, revision, idempotencyKey) { return this.client.request(`/assets/${encodeURIComponent(assetId)}/models`, { method: 'POST', headers: { ...revisionHeaders(revision), 'Idempotency-Key': idempotencyKey } }); }
|
|
42
|
+
modelVariants(assetId) { return this.client.request(`/assets/${encodeURIComponent(assetId)}/model-variants`); }
|
|
43
|
+
createModelVariant(assetId, revision, input) { return this.client.request(`/assets/${encodeURIComponent(assetId)}/model-variants`, { method: 'POST', headers: revisionHeaders(revision), body: input }); }
|
|
44
|
+
updateModelVariant(assetId, variantId, revision, input) { return this.client.request(`/assets/${encodeURIComponent(assetId)}/model-variants/${encodeURIComponent(variantId)}`, { method: 'PUT', headers: revisionHeaders(revision), body: input }); }
|
|
45
|
+
deleteModelVariant(assetId, variantId, assetRevision, variantRevision) { return this.client.request(`/assets/${encodeURIComponent(assetId)}/model-variants/${encodeURIComponent(variantId)}?revision=${variantRevision}`, { method: 'DELETE', headers: revisionHeaders(assetRevision) }); }
|
|
41
46
|
galleries(cursor) { return this.client.request(`/assets/galleries${cursor ? '?cursor=' + encodeURIComponent(cursor) : ''}`); }
|
|
42
47
|
createGallery(input) { return this.client.request('/assets/galleries', { method: 'POST', body: input }); }
|
|
43
48
|
updateGallery(id, revision, input) { return this.client.request(path('galleries', id), { method: 'PUT', headers: revisionHeaders(revision), body: input }); }
|
package/dist/client.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { AICreditsClient } from './ai-credits.js';
|
|
1
2
|
import { AssetsClient } from './assets.js';
|
|
2
3
|
import { MailClient } from './mail.js';
|
|
3
4
|
import { ProjectsClient } from './projects.js';
|
|
4
5
|
import { WorkloadSecurityClient } from './workload-security.js';
|
|
5
6
|
import type { StackShiftOptions } from './types.js';
|
|
6
7
|
export declare class StackShift {
|
|
8
|
+
readonly aiCredits: AICreditsClient;
|
|
7
9
|
readonly assetSpaceId?: string;
|
|
8
10
|
readonly apiKey: string;
|
|
9
11
|
readonly baseUrl: string;
|
package/dist/client.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AICreditsClient } from './ai-credits.js';
|
|
1
2
|
import { AssetsClient } from './assets.js';
|
|
2
3
|
import { MailClient } from './mail.js';
|
|
3
4
|
import { ProjectsClient } from './projects.js';
|
|
@@ -6,6 +7,7 @@ const defaultBaseUrl = 'https://api.stackshift.cloud/api/v1';
|
|
|
6
7
|
const defaultMailBaseUrl = 'https://api.stackshift.cloud/v1';
|
|
7
8
|
const defaultCdnBaseUrl = 'https://cdn.stackshift.cloud';
|
|
8
9
|
export class StackShift {
|
|
10
|
+
aiCredits;
|
|
9
11
|
assetSpaceId;
|
|
10
12
|
apiKey;
|
|
11
13
|
baseUrl;
|
|
@@ -27,6 +29,7 @@ export class StackShift {
|
|
|
27
29
|
this.mailBaseUrl = (options.mailBaseUrl ?? defaultMailBaseUrl).replace(/\/$/, '');
|
|
28
30
|
this.cdnBaseUrl = (options.cdnBaseUrl ?? defaultCdnBaseUrl).replace(/\/$/, '');
|
|
29
31
|
this.fetcher = options.fetch ?? fetch;
|
|
32
|
+
this.aiCredits = new AICreditsClient(this);
|
|
30
33
|
this.projects = new ProjectsClient(this);
|
|
31
34
|
this.assets = new AssetsClient(this);
|
|
32
35
|
this.mail = new MailClient(this);
|
|
@@ -1,4 +1,4 @@
|
|
|
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';
|
|
1
|
+
export type AssetOperationId = 'putAssetAICredential' | 'deleteAssetAICredential' | 'openAssetAIOutput' | 'getVideoWorkspace' | 'processVideoVersion' | 'createVideoPlaybackSession' | 'revokeVideoPlaybackSession' | 'reviewVideoVersion' | 'listVideoCaptions' | 'addVideoCaption' | 'removeVideoCaption' | 'getVideoAnalytics' | 'createPublicVideoPlaybackSession' | 'openPublicPlayerMedia' | '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' | 'listAssetModelVariants' | 'createAssetModelVariant' | 'updateAssetModelVariant' | 'deleteAssetModelVariant' | 'resolveAssetPublicationAR' | 'createAssetPublicationARHandoff' | 'resolveAssetPublicationARHandoff' | 'listAssetGalleries' | 'createAssetGallery' | 'updateAssetGallery' | 'transitionAssetGallery' | 'resolveAssetGallery' | 'resolveAssetGalleryAR' | 'searchAssetPicker' | 'selectAssetPicker' | 'listAssetPortals' | 'createAssetPortal' | 'updateAssetPortal' | 'actOnAssetPortal' | 'listAssetProofs' | 'createAssetProof' | 'getAssetProof' | 'updateAssetProof' | 'decideAssetProof' | 'commentOnAssetProof' | 'inviteAssetProofGuest' | 'listAssetGuestGrants' | 'revokeAssetGuestGrant' | 'getAssetInsights' | 'setAssetInsightsTimezone' | 'listAssetPlayerProfiles' | 'createAssetPlayerProfile' | 'getAssetPlayerProfile' | 'updateAssetPlayerProfile' | 'archiveAssetPlayerProfile' | 'getAssetPlayerAssociation' | 'setAssetPlayerAssociation' | 'moveAssetFolder' | 'listAssetFolders' | 'createAssetFolder' | 'deleteAssetFolder' | 'listAssetSamples' | 'previewAssetSample' | 'copyAssetSample' | 'getAssetCapabilities' | 'listAssetModerationReviews' | 'submitAssetModerationReviews' | 'getAssetModerationReviews' | 'listAssetIntegrations' | 'createAssetIntegration' | 'deleteAssetIntegration' | 'getCurrentAssetIntegration' | 'connectCurrentAssetIntegration' | 'disconnectCurrentAssetIntegration' | 'testAssetWebhook' | 'estimateAssetGeneration' | 'listAssetGenerations' | 'retryAssetGeneration' | 'cancelAssetGeneration' | 'previewAsset' | 'previewAssetStudio' | 'saveAssetStudioOutput' | 'signAssetStudioOutput' | 'getAssetStudioOutput' | 'publishAssetTransformation';
|
|
2
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;
|
|
@@ -71,6 +71,11 @@ export declare const assetContractOperations: readonly [{
|
|
|
71
71
|
readonly method: "POST";
|
|
72
72
|
readonly path: "/playback/assets/{assetID}/sessions";
|
|
73
73
|
readonly scope: "assets:read";
|
|
74
|
+
}, {
|
|
75
|
+
readonly id: "openPublicPlayerMedia";
|
|
76
|
+
readonly method: "GET";
|
|
77
|
+
readonly path: "/playback/media/{kind}";
|
|
78
|
+
readonly scope: "assets:read";
|
|
74
79
|
}, {
|
|
75
80
|
readonly id: "renewVideoPlaybackSession";
|
|
76
81
|
readonly method: "POST";
|
|
@@ -791,11 +796,41 @@ export declare const assetContractOperations: readonly [{
|
|
|
791
796
|
readonly method: "POST";
|
|
792
797
|
readonly path: "/api/v1/assets/{assetID}/models";
|
|
793
798
|
readonly scope: "assets:process";
|
|
799
|
+
}, {
|
|
800
|
+
readonly id: "listAssetModelVariants";
|
|
801
|
+
readonly method: "GET";
|
|
802
|
+
readonly path: "/api/v1/assets/{assetID}/model-variants";
|
|
803
|
+
readonly scope: "assets:read";
|
|
804
|
+
}, {
|
|
805
|
+
readonly id: "createAssetModelVariant";
|
|
806
|
+
readonly method: "POST";
|
|
807
|
+
readonly path: "/api/v1/assets/{assetID}/model-variants";
|
|
808
|
+
readonly scope: "assets:process";
|
|
809
|
+
}, {
|
|
810
|
+
readonly id: "updateAssetModelVariant";
|
|
811
|
+
readonly method: "PUT";
|
|
812
|
+
readonly path: "/api/v1/assets/{assetID}/model-variants/{variantID}";
|
|
813
|
+
readonly scope: "assets:process";
|
|
814
|
+
}, {
|
|
815
|
+
readonly id: "deleteAssetModelVariant";
|
|
816
|
+
readonly method: "DELETE";
|
|
817
|
+
readonly path: "/api/v1/assets/{assetID}/model-variants/{variantID}";
|
|
818
|
+
readonly scope: "assets:process";
|
|
794
819
|
}, {
|
|
795
820
|
readonly id: "resolveAssetPublicationAR";
|
|
796
821
|
readonly method: "POST";
|
|
797
822
|
readonly path: "/api/v1/assets/publications/{publicationID}/ar";
|
|
798
823
|
readonly scope: "assets:read";
|
|
824
|
+
}, {
|
|
825
|
+
readonly id: "createAssetPublicationARHandoff";
|
|
826
|
+
readonly method: "POST";
|
|
827
|
+
readonly path: "/api/v1/assets/publications/{publicationID}/ar-handoff";
|
|
828
|
+
readonly scope: "assets:read";
|
|
829
|
+
}, {
|
|
830
|
+
readonly id: "resolveAssetPublicationARHandoff";
|
|
831
|
+
readonly method: "GET";
|
|
832
|
+
readonly path: "/assets/ar-handoff/{token}";
|
|
833
|
+
readonly scope: "assets:read";
|
|
799
834
|
}, {
|
|
800
835
|
readonly id: "listAssetGalleries";
|
|
801
836
|
readonly method: "GET";
|
|
@@ -836,4 +871,254 @@ export declare const assetContractOperations: readonly [{
|
|
|
836
871
|
readonly method: "POST";
|
|
837
872
|
readonly path: "/assets/picker/select";
|
|
838
873
|
readonly scope: "assets:read";
|
|
874
|
+
}, {
|
|
875
|
+
readonly id: "listAssetPortals";
|
|
876
|
+
readonly method: "GET";
|
|
877
|
+
readonly path: "/api/v1/assets/portals";
|
|
878
|
+
readonly scope: "assets:read";
|
|
879
|
+
}, {
|
|
880
|
+
readonly id: "createAssetPortal";
|
|
881
|
+
readonly method: "POST";
|
|
882
|
+
readonly path: "/api/v1/assets/portals";
|
|
883
|
+
readonly scope: "assets:write";
|
|
884
|
+
}, {
|
|
885
|
+
readonly id: "updateAssetPortal";
|
|
886
|
+
readonly method: "PUT";
|
|
887
|
+
readonly path: "/api/v1/assets/portals/{portalID}";
|
|
888
|
+
readonly scope: "assets:write";
|
|
889
|
+
}, {
|
|
890
|
+
readonly id: "actOnAssetPortal";
|
|
891
|
+
readonly method: "POST";
|
|
892
|
+
readonly path: "/api/v1/assets/portals/{portalID}/{action}";
|
|
893
|
+
readonly scope: "assets:publish";
|
|
894
|
+
}, {
|
|
895
|
+
readonly id: "listAssetProofs";
|
|
896
|
+
readonly method: "GET";
|
|
897
|
+
readonly path: "/api/v1/assets/proofs";
|
|
898
|
+
readonly scope: "assets:read";
|
|
899
|
+
}, {
|
|
900
|
+
readonly id: "createAssetProof";
|
|
901
|
+
readonly method: "POST";
|
|
902
|
+
readonly path: "/api/v1/assets/proofs";
|
|
903
|
+
readonly scope: "assets:write";
|
|
904
|
+
}, {
|
|
905
|
+
readonly id: "getAssetProof";
|
|
906
|
+
readonly method: "GET";
|
|
907
|
+
readonly path: "/api/v1/assets/proofs/{proofID}";
|
|
908
|
+
readonly scope: "assets:read";
|
|
909
|
+
}, {
|
|
910
|
+
readonly id: "updateAssetProof";
|
|
911
|
+
readonly method: "PUT";
|
|
912
|
+
readonly path: "/api/v1/assets/proofs/{proofID}";
|
|
913
|
+
readonly scope: "assets:write";
|
|
914
|
+
}, {
|
|
915
|
+
readonly id: "decideAssetProof";
|
|
916
|
+
readonly method: "POST";
|
|
917
|
+
readonly path: "/api/v1/assets/proofs/{proofID}/decisions";
|
|
918
|
+
readonly scope: "assets:admin";
|
|
919
|
+
}, {
|
|
920
|
+
readonly id: "commentOnAssetProof";
|
|
921
|
+
readonly method: "POST";
|
|
922
|
+
readonly path: "/api/v1/assets/proofs/{proofID}/comments";
|
|
923
|
+
readonly scope: "assets:write";
|
|
924
|
+
}, {
|
|
925
|
+
readonly id: "inviteAssetProofGuest";
|
|
926
|
+
readonly method: "POST";
|
|
927
|
+
readonly path: "/api/v1/assets/proofs/{proofID}/invitations";
|
|
928
|
+
readonly scope: "assets:admin";
|
|
929
|
+
}, {
|
|
930
|
+
readonly id: "listAssetGuestGrants";
|
|
931
|
+
readonly method: "GET";
|
|
932
|
+
readonly path: "/api/v1/assets/guest-grants";
|
|
933
|
+
readonly scope: "assets:admin";
|
|
934
|
+
}, {
|
|
935
|
+
readonly id: "revokeAssetGuestGrant";
|
|
936
|
+
readonly method: "DELETE";
|
|
937
|
+
readonly path: "/api/v1/assets/guest-grants/{grantID}";
|
|
938
|
+
readonly scope: "assets:admin";
|
|
939
|
+
}, {
|
|
940
|
+
readonly id: "getAssetInsights";
|
|
941
|
+
readonly method: "GET";
|
|
942
|
+
readonly path: "/api/v1/assets/insights";
|
|
943
|
+
readonly scope: "assets:read";
|
|
944
|
+
}, {
|
|
945
|
+
readonly id: "setAssetInsightsTimezone";
|
|
946
|
+
readonly method: "PUT";
|
|
947
|
+
readonly path: "/api/v1/assets/insights";
|
|
948
|
+
readonly scope: "assets:write";
|
|
949
|
+
}, {
|
|
950
|
+
readonly id: "listAssetPlayerProfiles";
|
|
951
|
+
readonly method: "GET";
|
|
952
|
+
readonly path: "/api/v1/assets/player-profiles";
|
|
953
|
+
readonly scope: "assets:read";
|
|
954
|
+
}, {
|
|
955
|
+
readonly id: "createAssetPlayerProfile";
|
|
956
|
+
readonly method: "POST";
|
|
957
|
+
readonly path: "/api/v1/assets/player-profiles";
|
|
958
|
+
readonly scope: "assets:write";
|
|
959
|
+
}, {
|
|
960
|
+
readonly id: "getAssetPlayerProfile";
|
|
961
|
+
readonly method: "GET";
|
|
962
|
+
readonly path: "/api/v1/assets/player-profiles/{profileID}";
|
|
963
|
+
readonly scope: "assets:read";
|
|
964
|
+
}, {
|
|
965
|
+
readonly id: "updateAssetPlayerProfile";
|
|
966
|
+
readonly method: "PUT";
|
|
967
|
+
readonly path: "/api/v1/assets/player-profiles/{profileID}";
|
|
968
|
+
readonly scope: "assets:write";
|
|
969
|
+
}, {
|
|
970
|
+
readonly id: "archiveAssetPlayerProfile";
|
|
971
|
+
readonly method: "DELETE";
|
|
972
|
+
readonly path: "/api/v1/assets/player-profiles/{profileID}";
|
|
973
|
+
readonly scope: "assets:write";
|
|
974
|
+
}, {
|
|
975
|
+
readonly id: "getAssetPlayerAssociation";
|
|
976
|
+
readonly method: "GET";
|
|
977
|
+
readonly path: "/api/v1/assets/{assetID}/player-profile";
|
|
978
|
+
readonly scope: "assets:read";
|
|
979
|
+
}, {
|
|
980
|
+
readonly id: "setAssetPlayerAssociation";
|
|
981
|
+
readonly method: "PUT";
|
|
982
|
+
readonly path: "/api/v1/assets/{assetID}/player-profile";
|
|
983
|
+
readonly scope: "assets:write";
|
|
984
|
+
}, {
|
|
985
|
+
readonly id: "moveAssetFolder";
|
|
986
|
+
readonly method: "POST";
|
|
987
|
+
readonly path: "/api/v1/assets/folders/move";
|
|
988
|
+
readonly scope: "assets:write";
|
|
989
|
+
}, {
|
|
990
|
+
readonly id: "listAssetFolders";
|
|
991
|
+
readonly method: "GET";
|
|
992
|
+
readonly path: "/api/v1/assets/folders";
|
|
993
|
+
readonly scope: "assets:read";
|
|
994
|
+
}, {
|
|
995
|
+
readonly id: "createAssetFolder";
|
|
996
|
+
readonly method: "POST";
|
|
997
|
+
readonly path: "/api/v1/assets/folders";
|
|
998
|
+
readonly scope: "assets:write";
|
|
999
|
+
}, {
|
|
1000
|
+
readonly id: "deleteAssetFolder";
|
|
1001
|
+
readonly method: "DELETE";
|
|
1002
|
+
readonly path: "/api/v1/assets/folders";
|
|
1003
|
+
readonly scope: "assets:write";
|
|
1004
|
+
}, {
|
|
1005
|
+
readonly id: "listAssetSamples";
|
|
1006
|
+
readonly method: "GET";
|
|
1007
|
+
readonly path: "/api/v1/assets/samples";
|
|
1008
|
+
readonly scope: "assets:read";
|
|
1009
|
+
}, {
|
|
1010
|
+
readonly id: "previewAssetSample";
|
|
1011
|
+
readonly method: "GET";
|
|
1012
|
+
readonly path: "/api/v1/assets/samples/{sampleID}/preview";
|
|
1013
|
+
readonly scope: "assets:read";
|
|
1014
|
+
}, {
|
|
1015
|
+
readonly id: "copyAssetSample";
|
|
1016
|
+
readonly method: "POST";
|
|
1017
|
+
readonly path: "/api/v1/assets/samples/{sampleID}/copy";
|
|
1018
|
+
readonly scope: "assets:write";
|
|
1019
|
+
}, {
|
|
1020
|
+
readonly id: "getAssetCapabilities";
|
|
1021
|
+
readonly method: "GET";
|
|
1022
|
+
readonly path: "/api/v1/assets/capabilities";
|
|
1023
|
+
readonly scope: "assets:read";
|
|
1024
|
+
}, {
|
|
1025
|
+
readonly id: "listAssetModerationReviews";
|
|
1026
|
+
readonly method: "GET";
|
|
1027
|
+
readonly path: "/api/v1/assets/moderation-reviews";
|
|
1028
|
+
readonly scope: "assets:read";
|
|
1029
|
+
}, {
|
|
1030
|
+
readonly id: "submitAssetModerationReviews";
|
|
1031
|
+
readonly method: "POST";
|
|
1032
|
+
readonly path: "/api/v1/assets/moderation-reviews";
|
|
1033
|
+
readonly scope: "assets:admin";
|
|
1034
|
+
}, {
|
|
1035
|
+
readonly id: "getAssetModerationReviews";
|
|
1036
|
+
readonly method: "GET";
|
|
1037
|
+
readonly path: "/api/v1/assets/moderation-reviews/{assetID}";
|
|
1038
|
+
readonly scope: "assets:read";
|
|
1039
|
+
}, {
|
|
1040
|
+
readonly id: "listAssetIntegrations";
|
|
1041
|
+
readonly method: "GET";
|
|
1042
|
+
readonly path: "/api/v1/assets/integrations";
|
|
1043
|
+
readonly scope: "assets:admin";
|
|
1044
|
+
}, {
|
|
1045
|
+
readonly id: "createAssetIntegration";
|
|
1046
|
+
readonly method: "POST";
|
|
1047
|
+
readonly path: "/api/v1/assets/integrations";
|
|
1048
|
+
readonly scope: "assets:admin";
|
|
1049
|
+
}, {
|
|
1050
|
+
readonly id: "deleteAssetIntegration";
|
|
1051
|
+
readonly method: "DELETE";
|
|
1052
|
+
readonly path: "/api/v1/assets/integrations/{integrationID}";
|
|
1053
|
+
readonly scope: "assets:admin";
|
|
1054
|
+
}, {
|
|
1055
|
+
readonly id: "getCurrentAssetIntegration";
|
|
1056
|
+
readonly method: "GET";
|
|
1057
|
+
readonly path: "/api/v1/assets/integrations/current";
|
|
1058
|
+
readonly scope: "assets:read";
|
|
1059
|
+
}, {
|
|
1060
|
+
readonly id: "connectCurrentAssetIntegration";
|
|
1061
|
+
readonly method: "POST";
|
|
1062
|
+
readonly path: "/api/v1/assets/integrations/current";
|
|
1063
|
+
readonly scope: "assets:read";
|
|
1064
|
+
}, {
|
|
1065
|
+
readonly id: "disconnectCurrentAssetIntegration";
|
|
1066
|
+
readonly method: "DELETE";
|
|
1067
|
+
readonly path: "/api/v1/assets/integrations/current";
|
|
1068
|
+
readonly scope: "assets:read";
|
|
1069
|
+
}, {
|
|
1070
|
+
readonly id: "testAssetWebhook";
|
|
1071
|
+
readonly method: "POST";
|
|
1072
|
+
readonly path: "/api/v1/assets/webhooks/{webhookID}/test";
|
|
1073
|
+
readonly scope: "assets:write";
|
|
1074
|
+
}, {
|
|
1075
|
+
readonly id: "estimateAssetGeneration";
|
|
1076
|
+
readonly method: "POST";
|
|
1077
|
+
readonly path: "/api/v1/assets/generations/estimate";
|
|
1078
|
+
readonly scope: "assets:generate";
|
|
1079
|
+
}, {
|
|
1080
|
+
readonly id: "listAssetGenerations";
|
|
1081
|
+
readonly method: "GET";
|
|
1082
|
+
readonly path: "/api/v1/assets/generations";
|
|
1083
|
+
readonly scope: "assets:read";
|
|
1084
|
+
}, {
|
|
1085
|
+
readonly id: "retryAssetGeneration";
|
|
1086
|
+
readonly method: "POST";
|
|
1087
|
+
readonly path: "/api/v1/assets/generations/{requestID}/retry";
|
|
1088
|
+
readonly scope: "assets:generate";
|
|
1089
|
+
}, {
|
|
1090
|
+
readonly id: "cancelAssetGeneration";
|
|
1091
|
+
readonly method: "POST";
|
|
1092
|
+
readonly path: "/api/v1/assets/generations/{requestID}/cancel";
|
|
1093
|
+
readonly scope: "assets:generate";
|
|
1094
|
+
}, {
|
|
1095
|
+
readonly id: "previewAsset";
|
|
1096
|
+
readonly method: "GET";
|
|
1097
|
+
readonly path: "/api/v1/assets/{assetID}/preview";
|
|
1098
|
+
readonly scope: "assets:read";
|
|
1099
|
+
}, {
|
|
1100
|
+
readonly id: "previewAssetStudio";
|
|
1101
|
+
readonly method: "POST";
|
|
1102
|
+
readonly path: "/api/v1/assets/{assetID}/studio/preview";
|
|
1103
|
+
readonly scope: "assets:write";
|
|
1104
|
+
}, {
|
|
1105
|
+
readonly id: "saveAssetStudioOutput";
|
|
1106
|
+
readonly method: "POST";
|
|
1107
|
+
readonly path: "/api/v1/assets/{assetID}/derivatives/{outputID}/save";
|
|
1108
|
+
readonly scope: "assets:write";
|
|
1109
|
+
}, {
|
|
1110
|
+
readonly id: "signAssetStudioOutput";
|
|
1111
|
+
readonly method: "POST";
|
|
1112
|
+
readonly path: "/api/v1/assets/{assetID}/derivatives/{outputID}/signed-url";
|
|
1113
|
+
readonly scope: "assets:write";
|
|
1114
|
+
}, {
|
|
1115
|
+
readonly id: "getAssetStudioOutput";
|
|
1116
|
+
readonly method: "GET";
|
|
1117
|
+
readonly path: "/api/v1/assets/{assetID}/derivatives/{outputID}";
|
|
1118
|
+
readonly scope: "assets:read";
|
|
1119
|
+
}, {
|
|
1120
|
+
readonly id: "publishAssetTransformation";
|
|
1121
|
+
readonly method: "POST";
|
|
1122
|
+
readonly path: "/api/v1/assets/transformations/{name}/publish";
|
|
1123
|
+
readonly scope: "assets:write";
|
|
839
1124
|
}];
|
|
@@ -12,6 +12,7 @@ export const assetContractOperations = [
|
|
|
12
12
|
{ id: 'removeVideoCaption', method: 'DELETE', path: '/api/v1/assets/{assetID}/versions/{versionID}/video/captions/{captionID}', scope: 'assets:write' },
|
|
13
13
|
{ id: 'getVideoAnalytics', method: 'GET', path: '/api/v1/assets/{assetID}/video/analytics', scope: 'assets:read' },
|
|
14
14
|
{ id: 'createPublicVideoPlaybackSession', method: 'POST', path: '/playback/assets/{assetID}/sessions', scope: 'assets:read' },
|
|
15
|
+
{ id: 'openPublicPlayerMedia', method: 'GET', path: '/playback/media/{kind}', scope: 'assets:read' },
|
|
15
16
|
{ id: 'renewVideoPlaybackSession', method: 'POST', path: '/playback/sessions/renew', scope: 'assets:read' },
|
|
16
17
|
{ id: 'recordVideoPlaybackEvents', method: 'POST', path: '/playback/events', scope: 'assets:read' },
|
|
17
18
|
{ id: 'uploadAsset', method: 'POST', path: '/api/v1/assets/upload', scope: 'assets:write' },
|
|
@@ -156,7 +157,13 @@ export const assetContractOperations = [
|
|
|
156
157
|
{ id: 'revokeAssetPickerCapability', method: 'DELETE', path: '/api/v1/assets/picker-capabilities/{capabilityID}', scope: 'assets:read' },
|
|
157
158
|
{ id: 'listAssetModels', method: 'GET', path: '/api/v1/assets/{assetID}/models', scope: 'assets:read' },
|
|
158
159
|
{ id: 'processAssetModel', method: 'POST', path: '/api/v1/assets/{assetID}/models', scope: 'assets:process' },
|
|
160
|
+
{ id: 'listAssetModelVariants', method: 'GET', path: '/api/v1/assets/{assetID}/model-variants', scope: 'assets:read' },
|
|
161
|
+
{ id: 'createAssetModelVariant', method: 'POST', path: '/api/v1/assets/{assetID}/model-variants', scope: 'assets:process' },
|
|
162
|
+
{ id: 'updateAssetModelVariant', method: 'PUT', path: '/api/v1/assets/{assetID}/model-variants/{variantID}', scope: 'assets:process' },
|
|
163
|
+
{ id: 'deleteAssetModelVariant', method: 'DELETE', path: '/api/v1/assets/{assetID}/model-variants/{variantID}', scope: 'assets:process' },
|
|
159
164
|
{ id: 'resolveAssetPublicationAR', method: 'POST', path: '/api/v1/assets/publications/{publicationID}/ar', scope: 'assets:read' },
|
|
165
|
+
{ id: 'createAssetPublicationARHandoff', method: 'POST', path: '/api/v1/assets/publications/{publicationID}/ar-handoff', scope: 'assets:read' },
|
|
166
|
+
{ id: 'resolveAssetPublicationARHandoff', method: 'GET', path: '/assets/ar-handoff/{token}', scope: 'assets:read' },
|
|
160
167
|
{ id: 'listAssetGalleries', method: 'GET', path: '/api/v1/assets/galleries', scope: 'assets:read' },
|
|
161
168
|
{ id: 'createAssetGallery', method: 'POST', path: '/api/v1/assets/galleries', scope: 'assets:write' },
|
|
162
169
|
{ id: 'updateAssetGallery', method: 'PUT', path: '/api/v1/assets/galleries/{galleryID}', scope: 'assets:write' },
|
|
@@ -165,4 +172,54 @@ export const assetContractOperations = [
|
|
|
165
172
|
{ id: 'resolveAssetGalleryAR', method: 'POST', path: '/api/v1/assets/galleries/{galleryID}/ar', scope: 'assets:read' },
|
|
166
173
|
{ id: 'searchAssetPicker', method: 'POST', path: '/assets/picker/search', scope: 'assets:read' },
|
|
167
174
|
{ id: 'selectAssetPicker', method: 'POST', path: '/assets/picker/select', scope: 'assets:read' },
|
|
175
|
+
{ id: 'listAssetPortals', method: 'GET', path: '/api/v1/assets/portals', scope: 'assets:read' },
|
|
176
|
+
{ id: 'createAssetPortal', method: 'POST', path: '/api/v1/assets/portals', scope: 'assets:write' },
|
|
177
|
+
{ id: 'updateAssetPortal', method: 'PUT', path: '/api/v1/assets/portals/{portalID}', scope: 'assets:write' },
|
|
178
|
+
{ id: 'actOnAssetPortal', method: 'POST', path: '/api/v1/assets/portals/{portalID}/{action}', scope: 'assets:publish' },
|
|
179
|
+
{ id: 'listAssetProofs', method: 'GET', path: '/api/v1/assets/proofs', scope: 'assets:read' },
|
|
180
|
+
{ id: 'createAssetProof', method: 'POST', path: '/api/v1/assets/proofs', scope: 'assets:write' },
|
|
181
|
+
{ id: 'getAssetProof', method: 'GET', path: '/api/v1/assets/proofs/{proofID}', scope: 'assets:read' },
|
|
182
|
+
{ id: 'updateAssetProof', method: 'PUT', path: '/api/v1/assets/proofs/{proofID}', scope: 'assets:write' },
|
|
183
|
+
{ id: 'decideAssetProof', method: 'POST', path: '/api/v1/assets/proofs/{proofID}/decisions', scope: 'assets:admin' },
|
|
184
|
+
{ id: 'commentOnAssetProof', method: 'POST', path: '/api/v1/assets/proofs/{proofID}/comments', scope: 'assets:write' },
|
|
185
|
+
{ id: 'inviteAssetProofGuest', method: 'POST', path: '/api/v1/assets/proofs/{proofID}/invitations', scope: 'assets:admin' },
|
|
186
|
+
{ id: 'listAssetGuestGrants', method: 'GET', path: '/api/v1/assets/guest-grants', scope: 'assets:admin' },
|
|
187
|
+
{ id: 'revokeAssetGuestGrant', method: 'DELETE', path: '/api/v1/assets/guest-grants/{grantID}', scope: 'assets:admin' },
|
|
188
|
+
{ id: 'getAssetInsights', method: 'GET', path: '/api/v1/assets/insights', scope: 'assets:read' },
|
|
189
|
+
{ id: 'setAssetInsightsTimezone', method: 'PUT', path: '/api/v1/assets/insights', scope: 'assets:write' },
|
|
190
|
+
{ id: 'listAssetPlayerProfiles', method: 'GET', path: '/api/v1/assets/player-profiles', scope: 'assets:read' },
|
|
191
|
+
{ id: 'createAssetPlayerProfile', method: 'POST', path: '/api/v1/assets/player-profiles', scope: 'assets:write' },
|
|
192
|
+
{ id: 'getAssetPlayerProfile', method: 'GET', path: '/api/v1/assets/player-profiles/{profileID}', scope: 'assets:read' },
|
|
193
|
+
{ id: 'updateAssetPlayerProfile', method: 'PUT', path: '/api/v1/assets/player-profiles/{profileID}', scope: 'assets:write' },
|
|
194
|
+
{ id: 'archiveAssetPlayerProfile', method: 'DELETE', path: '/api/v1/assets/player-profiles/{profileID}', scope: 'assets:write' },
|
|
195
|
+
{ id: 'getAssetPlayerAssociation', method: 'GET', path: '/api/v1/assets/{assetID}/player-profile', scope: 'assets:read' },
|
|
196
|
+
{ id: 'setAssetPlayerAssociation', method: 'PUT', path: '/api/v1/assets/{assetID}/player-profile', scope: 'assets:write' },
|
|
197
|
+
{ id: 'moveAssetFolder', method: 'POST', path: '/api/v1/assets/folders/move', scope: 'assets:write' },
|
|
198
|
+
{ id: 'listAssetFolders', method: 'GET', path: '/api/v1/assets/folders', scope: 'assets:read' },
|
|
199
|
+
{ id: 'createAssetFolder', method: 'POST', path: '/api/v1/assets/folders', scope: 'assets:write' },
|
|
200
|
+
{ id: 'deleteAssetFolder', method: 'DELETE', path: '/api/v1/assets/folders', scope: 'assets:write' },
|
|
201
|
+
{ id: 'listAssetSamples', method: 'GET', path: '/api/v1/assets/samples', scope: 'assets:read' },
|
|
202
|
+
{ id: 'previewAssetSample', method: 'GET', path: '/api/v1/assets/samples/{sampleID}/preview', scope: 'assets:read' },
|
|
203
|
+
{ id: 'copyAssetSample', method: 'POST', path: '/api/v1/assets/samples/{sampleID}/copy', scope: 'assets:write' },
|
|
204
|
+
{ id: 'getAssetCapabilities', method: 'GET', path: '/api/v1/assets/capabilities', scope: 'assets:read' },
|
|
205
|
+
{ id: 'listAssetModerationReviews', method: 'GET', path: '/api/v1/assets/moderation-reviews', scope: 'assets:read' },
|
|
206
|
+
{ id: 'submitAssetModerationReviews', method: 'POST', path: '/api/v1/assets/moderation-reviews', scope: 'assets:admin' },
|
|
207
|
+
{ id: 'getAssetModerationReviews', method: 'GET', path: '/api/v1/assets/moderation-reviews/{assetID}', scope: 'assets:read' },
|
|
208
|
+
{ id: 'listAssetIntegrations', method: 'GET', path: '/api/v1/assets/integrations', scope: 'assets:admin' },
|
|
209
|
+
{ id: 'createAssetIntegration', method: 'POST', path: '/api/v1/assets/integrations', scope: 'assets:admin' },
|
|
210
|
+
{ id: 'deleteAssetIntegration', method: 'DELETE', path: '/api/v1/assets/integrations/{integrationID}', scope: 'assets:admin' },
|
|
211
|
+
{ id: 'getCurrentAssetIntegration', method: 'GET', path: '/api/v1/assets/integrations/current', scope: 'assets:read' },
|
|
212
|
+
{ id: 'connectCurrentAssetIntegration', method: 'POST', path: '/api/v1/assets/integrations/current', scope: 'assets:read' },
|
|
213
|
+
{ id: 'disconnectCurrentAssetIntegration', method: 'DELETE', path: '/api/v1/assets/integrations/current', scope: 'assets:read' },
|
|
214
|
+
{ id: 'testAssetWebhook', method: 'POST', path: '/api/v1/assets/webhooks/{webhookID}/test', scope: 'assets:write' },
|
|
215
|
+
{ id: 'estimateAssetGeneration', method: 'POST', path: '/api/v1/assets/generations/estimate', scope: 'assets:generate' },
|
|
216
|
+
{ id: 'listAssetGenerations', method: 'GET', path: '/api/v1/assets/generations', scope: 'assets:read' },
|
|
217
|
+
{ id: 'retryAssetGeneration', method: 'POST', path: '/api/v1/assets/generations/{requestID}/retry', scope: 'assets:generate' },
|
|
218
|
+
{ id: 'cancelAssetGeneration', method: 'POST', path: '/api/v1/assets/generations/{requestID}/cancel', scope: 'assets:generate' },
|
|
219
|
+
{ id: 'previewAsset', method: 'GET', path: '/api/v1/assets/{assetID}/preview', scope: 'assets:read' },
|
|
220
|
+
{ id: 'previewAssetStudio', method: 'POST', path: '/api/v1/assets/{assetID}/studio/preview', scope: 'assets:write' },
|
|
221
|
+
{ id: 'saveAssetStudioOutput', method: 'POST', path: '/api/v1/assets/{assetID}/derivatives/{outputID}/save', scope: 'assets:write' },
|
|
222
|
+
{ id: 'signAssetStudioOutput', method: 'POST', path: '/api/v1/assets/{assetID}/derivatives/{outputID}/signed-url', scope: 'assets:write' },
|
|
223
|
+
{ id: 'getAssetStudioOutput', method: 'GET', path: '/api/v1/assets/{assetID}/derivatives/{outputID}', scope: 'assets:read' },
|
|
224
|
+
{ id: 'publishAssetTransformation', method: 'POST', path: '/api/v1/assets/transformations/{name}/publish', scope: 'assets:write' },
|
|
168
225
|
];
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-cloud/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Official JavaScript and TypeScript SDK for StackShift.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
],
|
|
18
18
|
"scripts": {
|
|
19
19
|
"build": "tsc -p tsconfig.json",
|
|
20
|
-
"test": "npm run build && node test/mail.test.mjs && node test/mail-simulation.test.mjs && node test/mail-platform.test.mjs && node test/mail-webhooks.test.mjs && node test/mail-advanced.test.mjs && node test/mail-tracking.test.mjs && node test/mail-subscribers.test.mjs && node test/mail-exports.test.mjs && node test/mail-diagnostics.test.mjs && node test/assets.test.mjs && node test/assets-platform.test.mjs && node test/assets-video.test.mjs && node test/assets-dam.test.mjs"
|
|
20
|
+
"test": "npm run build && node test/mail.test.mjs && node test/mail-simulation.test.mjs && node test/mail-platform.test.mjs && node test/mail-webhooks.test.mjs && node test/mail-advanced.test.mjs && node test/mail-tracking.test.mjs && node test/mail-subscribers.test.mjs && node test/mail-exports.test.mjs && node test/mail-diagnostics.test.mjs && node test/assets.test.mjs && node test/assets-platform.test.mjs && node test/assets-video.test.mjs && node test/assets-dam.test.mjs && node test/ai-credits.test.mjs"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"typescript": "^5.4.0"
|