@stackshift-cloud/sdk 1.3.0 → 1.4.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 +50 -0
- package/dist/asset-workflows.d.ts +5 -13
- package/dist/assets-platform-types.d.ts +19 -2
- package/dist/assets.d.ts +2 -1
- package/dist/assets.js +3 -0
- package/dist/client.js +2 -1
- package/dist/generated/assets-contract.d.ts +41 -6
- package/dist/generated/assets-contract.js +8 -1
- package/dist/index.d.ts +13 -2
- package/dist/index.js +8 -0
- package/dist/mail-advanced-types.d.ts +11 -0
- package/dist/mail-billing.d.ts +4 -0
- package/dist/mail-campaigns.d.ts +1 -1
- package/dist/mail-mailboxes.d.ts +358 -0
- package/dist/mail-mailboxes.js +202 -0
- package/dist/mail-marketing.d.ts +9 -2
- package/dist/mail.d.ts +8 -0
- package/dist/mail.js +14 -0
- package/dist/s2-upload.d.ts +22 -0
- package/dist/s2-upload.js +49 -0
- package/dist/s2.d.ts +34 -0
- package/dist/s2.js +31 -0
- package/dist/support-action-manifest.d.ts +3 -0
- package/dist/support-action-manifest.js +40 -0
- package/dist/support-action-receiver.d.ts +20 -0
- package/dist/support-action-receiver.js +37 -0
- package/dist/support-action-sqlite.d.ts +17 -0
- package/dist/support-action-sqlite.js +30 -0
- package/dist/support-action-types.d.ts +93 -0
- package/dist/support-action-types.js +1 -0
- package/dist/support-actions.d.ts +19 -0
- package/dist/support-actions.js +213 -0
- package/dist/types.d.ts +17 -0
- package/dist/upload-controller.d.ts +2 -0
- package/dist/upload-controller.js +41 -18
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -172,6 +172,38 @@ await stackshift.mail.send({
|
|
|
172
172
|
|
|
173
173
|
Add the returned SPF, DKIM, and return-path DNS records before verifying. DMARC is recommended by default and may be required if your StackShift environment sets `MAIL_DMARC_REQUIRED=true`. DNS propagation can take time, so a missing or pending status usually means you should wait and verify again.
|
|
174
174
|
|
|
175
|
+
## Mailboxes
|
|
176
|
+
|
|
177
|
+
Host real mailboxes on your own domain. The mailbox owner gets an invitation by email and sets their own password.
|
|
178
|
+
|
|
179
|
+
```ts
|
|
180
|
+
const domain = await stackshift.mail.mailboxDomains.create('acme.com')
|
|
181
|
+
|
|
182
|
+
console.log(domain.records)
|
|
183
|
+
|
|
184
|
+
await stackshift.mail.mailboxDomains.verify(domain.id)
|
|
185
|
+
|
|
186
|
+
const mailbox = await stackshift.mail.mailboxes.create({
|
|
187
|
+
domainId: domain.id,
|
|
188
|
+
localPart: 'ada',
|
|
189
|
+
ownerEmail: 'ada@personal.example',
|
|
190
|
+
plan: 'basic',
|
|
191
|
+
})
|
|
192
|
+
|
|
193
|
+
await stackshift.mail.aliases.create({ mailboxId: mailbox.id, localPart: 'sales', sendAs: true })
|
|
194
|
+
|
|
195
|
+
await stackshift.mail.routes.create({
|
|
196
|
+
domainId: domain.id,
|
|
197
|
+
pattern: 'orders-*',
|
|
198
|
+
targets: [{ kind: 'app', webhookUrl: 'https://app.example.com/inbound' }],
|
|
199
|
+
})
|
|
200
|
+
|
|
201
|
+
const devices = await stackshift.mail.mailboxes.listDevices(mailbox.id)
|
|
202
|
+
await stackshift.mail.mailboxes.suspend(mailbox.id)
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
`stackshift.mail.groups` manages team addresses, and `stackshift.mail.mailboxImports` copies mail from Google, Microsoft or any IMAP server.
|
|
206
|
+
|
|
175
207
|
## Upload an asset
|
|
176
208
|
|
|
177
209
|
```ts
|
|
@@ -385,3 +417,21 @@ const workspace = await video.workspace(assetId)
|
|
|
385
417
|
Mutations carry the supplied revision in `If-Match`. Model preparation and rendering carry an idempotency key; render submission also carries the accepted maximum units. Playback renewal and events authenticate with the session credential, not the account key. Keep these clients on your backend and return grants with `Cache-Control: private, no-store`.
|
|
386
418
|
|
|
387
419
|
See the [Assets SDK guide](https://docs.stackshift.cloud/assets/sdk-media-workflows) and its linked feature guides for complete language examples, inputs, permissions, review transitions and browser callbacks.
|
|
420
|
+
|
|
421
|
+
## Support action receivers (unreleased)
|
|
422
|
+
|
|
423
|
+
The SDK exports `SupportActionManifest` / `SupportActionDescriptor` and installation consent types for `stackshift.support.app/v2`, `validateSupportActionCatalog`, `verifySupportAction`, `receiveSupportAction`, signing/receipt helpers, and `SupportActionSQLiteStore`. V1 app registration remains actionless. Registered writes require an idempotent receiver, reconciliation endpoint and registered read verification operation; installation `action_operations` is explicit consent. No action is automatically registered or granted by this SDK.
|
|
424
|
+
|
|
425
|
+
`receiveSupportAction(rawBytes, headers, { verification, store, execute, reconcile })` requires the installation action key/secret, exact catalog, installation ID and trusted expected customer external ID. It authenticates before dispatch, validates primitive arguments/success output and signs the exact returned receipt bytes. Keep the original body bytes across retries, use a new delivery UUID per attempt, and never derive the expected customer from unverified input. Reconciliation is a separate handler and never invokes `execute`.
|
|
426
|
+
|
|
427
|
+
Supply a durable `SupportActionDurableStore`. The SQLite adapter accepts a `node:sqlite` compatible database; its example requires Node >=22.13 and a persistent disk file. Core verification uses Web Crypto and does not require SQLite. The runnable file receiver at `examples/support-actions/receiver.mjs` intentionally returns `demo_not_implemented`; replace its handlers with customer-bound business transactions. Set `ACTION_KEY_ID`, `ACTION_SECRET`, `ACTION_INSTALLATION_ID`, and trusted `EXPECTED_CUSTOMER_EXTERNAL_ID`, then run:
|
|
428
|
+
|
|
429
|
+
```sh
|
|
430
|
+
npm run build
|
|
431
|
+
node examples/support-actions/receiver.mjs /absolute/path/claims.sqlite headers.json actions.json < body.json
|
|
432
|
+
npm run test:support-actions
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
Return `response.body` unchanged with `response.headers`. `accepted` means the application durably accepted work; unknown/running claims never redispatch. Resolve uncertain results through the separate reconciliation request or human review. The adapter is a single-host durable example, not a distributed exactly-once guarantee; downstream mutations need their own idempotency or an atomic business/receipt transaction. Claims are not automatically deleted or leased for takeover. There is no asynchronous callback reporting endpoint in this protocol version.
|
|
436
|
+
|
|
437
|
+
Shared conformance and operational details are in `../support-actions-conformance/README.md`. Eight action tests cover signatures, expiry/binding, raw-byte conflicts, disk restart, uncertain outcomes, in-flight execution, and fenced completion. Live installation/provider qualification remains unrun; this code is unreleased.
|
|
@@ -179,21 +179,13 @@ export interface AssetWorkflowHTTPCredentialInput {
|
|
|
179
179
|
value: string;
|
|
180
180
|
}
|
|
181
181
|
export interface AssetAutomationOverview {
|
|
182
|
-
mcp_endpoint: '/api/v1/
|
|
183
|
-
auth_method: '
|
|
182
|
+
mcp_endpoint: '/api/v1/agents/mcp';
|
|
183
|
+
auth_method: 'agent_connection';
|
|
184
184
|
tools: Array<{
|
|
185
|
-
|
|
185
|
+
action: string;
|
|
186
|
+
mcp_tool: string;
|
|
186
187
|
description: string;
|
|
187
|
-
|
|
188
|
-
required_scopes?: string[];
|
|
189
|
-
risk: string;
|
|
190
|
-
}>;
|
|
191
|
-
recent_executions: Array<{
|
|
192
|
-
id: string;
|
|
193
|
-
tool: string;
|
|
194
|
-
transport: string;
|
|
195
|
-
status: string;
|
|
196
|
-
created_at: string;
|
|
188
|
+
kind: 'read' | 'write' | 'destructive';
|
|
197
189
|
}>;
|
|
198
190
|
}
|
|
199
191
|
export declare class AssetWorkflowsClient {
|
|
@@ -209,10 +209,27 @@ export interface AssetTextExtractionInput {
|
|
|
209
209
|
language?: string;
|
|
210
210
|
options?: Record<string, JsonValue>;
|
|
211
211
|
}
|
|
212
|
-
export
|
|
212
|
+
export interface AssetMigrationReconciliation {
|
|
213
|
+
discovered: number;
|
|
214
|
+
imported: number;
|
|
215
|
+
skipped: number;
|
|
216
|
+
failed: number;
|
|
217
|
+
canceled: number;
|
|
218
|
+
unresolved: number;
|
|
219
|
+
mapped: number;
|
|
220
|
+
verified_checksums: number;
|
|
221
|
+
missing_checksums: number;
|
|
222
|
+
warnings: Record<string, number>;
|
|
223
|
+
inventory_reconciled: boolean;
|
|
224
|
+
delivery_verified: boolean;
|
|
225
|
+
cutover_ready: boolean;
|
|
226
|
+
next_actions: string[];
|
|
227
|
+
}
|
|
228
|
+
export interface AssetMigrationReport {
|
|
213
229
|
migration: AssetMigration;
|
|
214
230
|
items: AssetMigrationItem[];
|
|
215
|
-
|
|
231
|
+
reconciliation?: AssetMigrationReconciliation;
|
|
232
|
+
}
|
|
216
233
|
export type AssetCapabilityUploadResult = Asset;
|
|
217
234
|
export type AssetStorageBucket = AssetBucket;
|
|
218
235
|
export {};
|
package/dist/assets.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { StackShift } from './client.js';
|
|
|
4
4
|
import { AssetConnectionsClient, AssetMigrationsClient, AssetStorageClient, AssetTextClient, AssetUploadCapabilitiesClient } from './assets-platform.js';
|
|
5
5
|
import { AssetWorkflowsClient } from './asset-workflows.js';
|
|
6
6
|
import type { AssetDerivedAsset, AssetImageGenerationInput, AssetTransformDefinition, AssetTransformMaterializeInput } from './asset-media-v2.js';
|
|
7
|
-
import type { Asset, AssetBucket, AssetBucketInput, AssetAIAccountConfig, AssetPatchInput, AssetCustomDomain, AssetEvent, AssetJob, AssetJobSubmission, AssetLifecycleRule, AssetUsageSummary, AssetWebhook, AssetWebhookDelivery, AssetAIInfo, AssetCollection, AssetContentPolicy, AssetNamedTransformInput, AssetListOptions, AssetListResult, AssetSavedSearch, AssetTranscript, AssetUploadProgressCallbacks, AssetVersion, AssetSignedUploadUrl, AssetSignedUploadUrlOptions, AssetSignedTransformOptions, AssetSignedUrl, AssetSignedUrlOptions, AssetTransformOptions, AssetTransformPreset, AssetUploadOptions } from './types.js';
|
|
7
|
+
import type { Asset, AssetBucket, AssetBucketInput, AssetAIAccountConfig, AssetPatchInput, AssetAIAnnotation, AssetManualDescriptionInput, AssetCustomDomain, AssetEvent, AssetJob, AssetJobSubmission, AssetLifecycleRule, AssetUsageSummary, AssetWebhook, AssetWebhookDelivery, AssetAIInfo, AssetCollection, AssetContentPolicy, AssetNamedTransformInput, AssetListOptions, AssetListResult, AssetSavedSearch, AssetTranscript, AssetUploadProgressCallbacks, AssetVersion, AssetSignedUploadUrl, AssetSignedUploadUrlOptions, AssetSignedTransformOptions, AssetSignedUrl, AssetSignedUrlOptions, AssetTransformOptions, AssetTransformPreset, AssetUploadOptions } from './types.js';
|
|
8
8
|
export declare const assetTransformPresets: AssetTransformPreset[];
|
|
9
9
|
export declare function getAssetTransformPreset(name: string): AssetTransformPreset | undefined;
|
|
10
10
|
export declare function assetTransformOptions(preset: AssetTransformPreset): AssetTransformOptions;
|
|
@@ -47,6 +47,7 @@ export declare class AssetsClient {
|
|
|
47
47
|
tags: string[];
|
|
48
48
|
revision: number;
|
|
49
49
|
}>;
|
|
50
|
+
describe(assetId: string, input: AssetManualDescriptionInput): Promise<AssetAIAnnotation>;
|
|
50
51
|
patchMetadata(assetId: string, revision: number, metadata: Record<string, unknown>): Promise<{
|
|
51
52
|
updated: boolean;
|
|
52
53
|
revision: number;
|
package/dist/assets.js
CHANGED
|
@@ -196,6 +196,9 @@ export class AssetsClient {
|
|
|
196
196
|
method: 'PUT', body: { tags }, headers: { 'If-Match': `"${revision}"` },
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
|
+
describe(assetId, input) {
|
|
200
|
+
return this.client.request(`/assets/${encodeURIComponent(assetId)}/description`, { method: 'PUT', body: input });
|
|
201
|
+
}
|
|
199
202
|
patchMetadata(assetId, revision, metadata) {
|
|
200
203
|
return this.client.request(`/assets/${encodeURIComponent(assetId)}/metadata`, {
|
|
201
204
|
method: 'PATCH', body: { metadata }, headers: { 'If-Match': `"${revision}"` },
|
package/dist/client.js
CHANGED
|
@@ -4,7 +4,7 @@ import { MailClient } from './mail.js';
|
|
|
4
4
|
import { ProjectsClient } from './projects.js';
|
|
5
5
|
import { WorkloadSecurityClient } from './workload-security.js';
|
|
6
6
|
const defaultBaseUrl = 'https://api.stackshift.cloud/api/v1';
|
|
7
|
-
const defaultMailBaseUrl = 'https://api.stackshift.cloud/v1';
|
|
7
|
+
const defaultMailBaseUrl = 'https://api.stackshift.cloud/api/v1';
|
|
8
8
|
const defaultCdnBaseUrl = 'https://cdn.stackshift.cloud';
|
|
9
9
|
export class StackShift {
|
|
10
10
|
aiCredits;
|
|
@@ -64,6 +64,7 @@ export class StackShift {
|
|
|
64
64
|
method: init.method ?? 'GET',
|
|
65
65
|
headers: stripUndefined({
|
|
66
66
|
Authorization: `Bearer ${this.apiKey}`,
|
|
67
|
+
'User-Agent': typeof window === 'undefined' ? 'StackShift-JS/1.0' : undefined,
|
|
67
68
|
'X-Asset-Space-ID': path.startsWith('/assets') ? this.assetSpaceId : undefined,
|
|
68
69
|
'Content-Type': isFormData ? undefined : 'application/json',
|
|
69
70
|
...init.headers,
|
|
@@ -1,4 +1,4 @@
|
|
|
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' | '
|
|
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' | 'listAssetConnectionFolders' | 'updateAssetConnection' | 'verifyAssetConnection' | 'deleteAssetConnection' | 'listOwnedS2Buckets' | 'createOwnedS2Bucket' | 'startAssetMigration' | 'listAssetMigrations' | 'getAssetMigration' | 'cancelAssetMigration' | 'retryAssetMigrationItem' | 'downloadAssetMigrationReport' | 'createAssetUploadCapability' | 'getContentPolicy' | 'updateContentPolicy' | 'upsertTransformation' | 'listTransformations' | 'estimateAssetTransform' | 'materializeAssetTransform' | 'listAssetDerivatives' | 'generateAsset' | 'getAssetAutomation' | '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' | 'releaseAssetModeration' | 'getTranscript' | 'transcribeAsset' | 'smartCropAsset' | 'removeAssetBackground' | 'listAssetVersions' | 'createAssetBranch' | 'restoreAssetVersion' | 'promoteAssetBranch' | 'deleteAsset' | 'replaceAsset' | 'createAssetReuploadRequest' | 'listAssetReuploadRequests' | 'getAssetUsage' | 'getAssetHold' | 'createSignedAssetUrl' | 'createSignedTransformUrl' | 'setAssetTags' | 'patchAssetMetadata' | 'describeAsset' | '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;
|
|
@@ -161,6 +161,11 @@ export declare const assetContractOperations: readonly [{
|
|
|
161
161
|
readonly method: "GET";
|
|
162
162
|
readonly path: "/api/v1/assets/connections/{connectionID}";
|
|
163
163
|
readonly scope: "assets:read";
|
|
164
|
+
}, {
|
|
165
|
+
readonly id: "listAssetConnectionFolders";
|
|
166
|
+
readonly method: "GET";
|
|
167
|
+
readonly path: "/api/v1/assets/connections/{connectionID}/folders";
|
|
168
|
+
readonly scope: "assets:read";
|
|
164
169
|
}, {
|
|
165
170
|
readonly id: "updateAssetConnection";
|
|
166
171
|
readonly method: "PATCH";
|
|
@@ -241,6 +246,11 @@ export declare const assetContractOperations: readonly [{
|
|
|
241
246
|
readonly method: "GET";
|
|
242
247
|
readonly path: "/api/v1/assets/transformations";
|
|
243
248
|
readonly scope: "assets:read";
|
|
249
|
+
}, {
|
|
250
|
+
readonly id: "estimateAssetTransform";
|
|
251
|
+
readonly method: "POST";
|
|
252
|
+
readonly path: "/api/v1/assets/{assetID}/transforms/estimate";
|
|
253
|
+
readonly scope: "assets:process";
|
|
244
254
|
}, {
|
|
245
255
|
readonly id: "materializeAssetTransform";
|
|
246
256
|
readonly method: "POST";
|
|
@@ -261,11 +271,6 @@ export declare const assetContractOperations: readonly [{
|
|
|
261
271
|
readonly method: "GET";
|
|
262
272
|
readonly path: "/api/v1/assets/automation";
|
|
263
273
|
readonly scope: "assets:read";
|
|
264
|
-
}, {
|
|
265
|
-
readonly id: "assetMCP";
|
|
266
|
-
readonly method: "POST";
|
|
267
|
-
readonly path: "/api/v1/assets/mcp";
|
|
268
|
-
readonly scope: "assets:any";
|
|
269
274
|
}, {
|
|
270
275
|
readonly id: "getAssetWorkflowCatalog";
|
|
271
276
|
readonly method: "GET";
|
|
@@ -566,6 +571,11 @@ export declare const assetContractOperations: readonly [{
|
|
|
566
571
|
readonly method: "POST";
|
|
567
572
|
readonly path: "/api/v1/assets/{assetID}/moderation";
|
|
568
573
|
readonly scope: "assets:process";
|
|
574
|
+
}, {
|
|
575
|
+
readonly id: "releaseAssetModeration";
|
|
576
|
+
readonly method: "POST";
|
|
577
|
+
readonly path: "/api/v1/assets/{assetID}/moderation/release";
|
|
578
|
+
readonly scope: "assets:write";
|
|
569
579
|
}, {
|
|
570
580
|
readonly id: "getTranscript";
|
|
571
581
|
readonly method: "GET";
|
|
@@ -616,6 +626,26 @@ export declare const assetContractOperations: readonly [{
|
|
|
616
626
|
readonly method: "PUT";
|
|
617
627
|
readonly path: "/api/v1/assets/{assetID}/replace";
|
|
618
628
|
readonly scope: "assets:write";
|
|
629
|
+
}, {
|
|
630
|
+
readonly id: "createAssetReuploadRequest";
|
|
631
|
+
readonly method: "POST";
|
|
632
|
+
readonly path: "/api/v1/assets/{assetID}/reupload-requests";
|
|
633
|
+
readonly scope: "assets:write";
|
|
634
|
+
}, {
|
|
635
|
+
readonly id: "listAssetReuploadRequests";
|
|
636
|
+
readonly method: "GET";
|
|
637
|
+
readonly path: "/api/v1/assets/{assetID}/reupload-requests";
|
|
638
|
+
readonly scope: "assets:read";
|
|
639
|
+
}, {
|
|
640
|
+
readonly id: "getAssetUsage";
|
|
641
|
+
readonly method: "GET";
|
|
642
|
+
readonly path: "/api/v1/assets/{assetID}/usage";
|
|
643
|
+
readonly scope: "assets:read";
|
|
644
|
+
}, {
|
|
645
|
+
readonly id: "getAssetHold";
|
|
646
|
+
readonly method: "GET";
|
|
647
|
+
readonly path: "/api/v1/assets/{assetID}/hold";
|
|
648
|
+
readonly scope: "assets:read";
|
|
619
649
|
}, {
|
|
620
650
|
readonly id: "createSignedAssetUrl";
|
|
621
651
|
readonly method: "POST";
|
|
@@ -636,6 +666,11 @@ export declare const assetContractOperations: readonly [{
|
|
|
636
666
|
readonly method: "PATCH";
|
|
637
667
|
readonly path: "/api/v1/assets/{assetID}/metadata";
|
|
638
668
|
readonly scope: "assets:write";
|
|
669
|
+
}, {
|
|
670
|
+
readonly id: "describeAsset";
|
|
671
|
+
readonly method: "PUT";
|
|
672
|
+
readonly path: "/api/v1/assets/{assetID}/description";
|
|
673
|
+
readonly scope: "assets:write";
|
|
639
674
|
}, {
|
|
640
675
|
readonly id: "purgeAsset";
|
|
641
676
|
readonly method: "POST";
|
|
@@ -30,6 +30,7 @@ export const assetContractOperations = [
|
|
|
30
30
|
{ id: 'createAssetConnection', method: 'POST', path: '/api/v1/assets/connections', scope: 'assets:admin' },
|
|
31
31
|
{ id: 'listAssetConnections', method: 'GET', path: '/api/v1/assets/connections', scope: 'assets:read' },
|
|
32
32
|
{ id: 'getAssetConnection', method: 'GET', path: '/api/v1/assets/connections/{connectionID}', scope: 'assets:read' },
|
|
33
|
+
{ id: 'listAssetConnectionFolders', method: 'GET', path: '/api/v1/assets/connections/{connectionID}/folders', scope: 'assets:read' },
|
|
33
34
|
{ id: 'updateAssetConnection', method: 'PATCH', path: '/api/v1/assets/connections/{connectionID}', scope: 'assets:admin' },
|
|
34
35
|
{ id: 'verifyAssetConnection', method: 'POST', path: '/api/v1/assets/connections/{connectionID}/verify', scope: 'assets:admin' },
|
|
35
36
|
{ id: 'deleteAssetConnection', method: 'DELETE', path: '/api/v1/assets/connections/{connectionID}', scope: 'assets:admin' },
|
|
@@ -46,11 +47,11 @@ export const assetContractOperations = [
|
|
|
46
47
|
{ id: 'updateContentPolicy', method: 'PUT', path: '/api/v1/assets/policy', scope: 'assets:admin' },
|
|
47
48
|
{ id: 'upsertTransformation', method: 'POST', path: '/api/v1/assets/transformations', scope: 'assets:process' },
|
|
48
49
|
{ id: 'listTransformations', method: 'GET', path: '/api/v1/assets/transformations', scope: 'assets:read' },
|
|
50
|
+
{ id: 'estimateAssetTransform', method: 'POST', path: '/api/v1/assets/{assetID}/transforms/estimate', scope: 'assets:process' },
|
|
49
51
|
{ id: 'materializeAssetTransform', method: 'POST', path: '/api/v1/assets/{assetID}/transforms', scope: 'assets:process' },
|
|
50
52
|
{ id: 'listAssetDerivatives', method: 'GET', path: '/api/v1/assets/{assetID}/derivatives', scope: 'assets:read' },
|
|
51
53
|
{ id: 'generateAsset', method: 'POST', path: '/api/v1/assets/generations', scope: 'assets:generate' },
|
|
52
54
|
{ id: 'getAssetAutomation', method: 'GET', path: '/api/v1/assets/automation', scope: 'assets:read' },
|
|
53
|
-
{ id: 'assetMCP', method: 'POST', path: '/api/v1/assets/mcp', scope: 'assets:any' },
|
|
54
55
|
{ id: 'getAssetWorkflowCatalog', method: 'GET', path: '/api/v1/assets/workflows/catalog', scope: 'assets:read' },
|
|
55
56
|
{ id: 'listAssetWorkflows', method: 'GET', path: '/api/v1/assets/workflows', scope: 'assets:read' },
|
|
56
57
|
{ id: 'createAssetWorkflow', method: 'POST', path: '/api/v1/assets/workflows', scope: 'assets:write' },
|
|
@@ -111,6 +112,7 @@ export const assetContractOperations = [
|
|
|
111
112
|
{ id: 'getAssetAI', method: 'GET', path: '/api/v1/assets/{assetID}/ai', scope: 'assets:read' },
|
|
112
113
|
{ id: 'analyzeAsset', method: 'POST', path: '/api/v1/assets/{assetID}/ai/analyze', scope: 'assets:process' },
|
|
113
114
|
{ id: 'moderateAsset', method: 'POST', path: '/api/v1/assets/{assetID}/moderation', scope: 'assets:process' },
|
|
115
|
+
{ id: 'releaseAssetModeration', method: 'POST', path: '/api/v1/assets/{assetID}/moderation/release', scope: 'assets:write' },
|
|
114
116
|
{ id: 'getTranscript', method: 'GET', path: '/api/v1/assets/{assetID}/transcript', scope: 'assets:read' },
|
|
115
117
|
{ id: 'transcribeAsset', method: 'POST', path: '/api/v1/assets/{assetID}/transcript', scope: 'assets:process' },
|
|
116
118
|
{ id: 'smartCropAsset', method: 'POST', path: '/api/v1/assets/{assetID}/smart-crop', scope: 'assets:process' },
|
|
@@ -121,10 +123,15 @@ export const assetContractOperations = [
|
|
|
121
123
|
{ id: 'promoteAssetBranch', method: 'POST', path: '/api/v1/assets/{assetID}/branches/{branch}/promote', scope: 'assets:write' },
|
|
122
124
|
{ id: 'deleteAsset', method: 'DELETE', path: '/api/v1/assets/{assetID}', scope: 'assets:admin' },
|
|
123
125
|
{ id: 'replaceAsset', method: 'PUT', path: '/api/v1/assets/{assetID}/replace', scope: 'assets:write' },
|
|
126
|
+
{ id: 'createAssetReuploadRequest', method: 'POST', path: '/api/v1/assets/{assetID}/reupload-requests', scope: 'assets:write' },
|
|
127
|
+
{ id: 'listAssetReuploadRequests', method: 'GET', path: '/api/v1/assets/{assetID}/reupload-requests', scope: 'assets:read' },
|
|
128
|
+
{ id: 'getAssetUsage', method: 'GET', path: '/api/v1/assets/{assetID}/usage', scope: 'assets:read' },
|
|
129
|
+
{ id: 'getAssetHold', method: 'GET', path: '/api/v1/assets/{assetID}/hold', scope: 'assets:read' },
|
|
124
130
|
{ id: 'createSignedAssetUrl', method: 'POST', path: '/api/v1/assets/{assetID}/signed-url', scope: 'assets:read' },
|
|
125
131
|
{ id: 'createSignedTransformUrl', method: 'POST', path: '/api/v1/assets/{assetID}/transform-url', scope: 'assets:process' },
|
|
126
132
|
{ id: 'setAssetTags', method: 'PUT', path: '/api/v1/assets/{assetID}/tags', scope: 'assets:write' },
|
|
127
133
|
{ id: 'patchAssetMetadata', method: 'PATCH', path: '/api/v1/assets/{assetID}/metadata', scope: 'assets:write' },
|
|
134
|
+
{ id: 'describeAsset', method: 'PUT', path: '/api/v1/assets/{assetID}/description', scope: 'assets:write' },
|
|
128
135
|
{ id: 'purgeAsset', method: 'POST', path: '/api/v1/assets/{assetID}/purge', scope: 'assets:admin' },
|
|
129
136
|
{ id: 'widgetCreateUploadSession', method: 'POST', path: '/assets/widget/sessions', scope: 'assets:write' },
|
|
130
137
|
{ id: 'widgetGetUploadSession', method: 'GET', path: '/assets/widget/sessions/current', scope: 'assets:write' },
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,10 @@ export type * from './asset-media-v2.js';
|
|
|
6
6
|
export { AssetConnectionsClient, AssetMigrationsClient, AssetStorageClient, AssetTextClient, AssetUploadCapabilitiesClient } from './assets-platform.js';
|
|
7
7
|
export type * from './assets-platform-types.js';
|
|
8
8
|
export { ChunkedUploadController, UploadResumeInvalidError, putBlob, sha256Blob } from './upload-controller.js';
|
|
9
|
+
export { S2UploadsClient } from './s2.js';
|
|
10
|
+
export type { S2Object } from './s2.js';
|
|
11
|
+
export { S2Uploader, createS2ResumeStore } from './s2-upload.js';
|
|
12
|
+
export type { S2UploadBackend } from './s2-upload.js';
|
|
9
13
|
export type { ChunkUploadCallbacks, ChunkUploadRequest, ChunkUploadSession, ChunkUploadTransport, ChunkedUploadOptions, UploadProgress, UploadResumeRecord, UploadResumeStore, UploadedPart } from './upload-controller.js';
|
|
10
14
|
export { createResponsiveImage, namedResponsiveSource, uploadBrowserFile } from './assets-framework.js';
|
|
11
15
|
export type { ArtDirectionSource, ResponsiveImageDescriptor, ResponsiveImageOptions } from './assets-framework.js';
|
|
@@ -15,18 +19,20 @@ export { MailBouncesClient, MailClient, MailDomainsClient, MailEventsClient, Mai
|
|
|
15
19
|
export type { MailAudience, MailAudienceMember, MailAudienceMemberImport, MailCampaign } from './mail-campaigns.js';
|
|
16
20
|
export { MailExportsClient } from './mail-exports.js';
|
|
17
21
|
export type { MailExport, MailExportCreateInput } from './mail-exports.js';
|
|
22
|
+
export { MailboxAliasesClient, MailboxDomainsClient, MailboxGroupsClient, MailboxImportsClient, MailboxRoutesClient, MailboxesClient } from './mail-mailboxes.js';
|
|
23
|
+
export type * from './mail-mailboxes.js';
|
|
18
24
|
export type { MailDiagnosticFinding, MailTemplateDiagnosticInput, MailTemplateDiagnosticResult } from './mail-diagnostics.js';
|
|
19
25
|
export { ProjectsClient } from './projects.js';
|
|
20
26
|
export { WorkloadSecurityClient } from './workload-security.js';
|
|
21
27
|
export type * from './workload-security.js';
|
|
22
|
-
export type { Asset, AssetAIAnnotation, AssetAIInfo, AssetCollection, AssetListOptions, AssetListResult, AssetModerationResult, AssetSavedSearch, AssetSignedUploadUrl, AssetSignedUploadUrlOptions, AssetSignedUrl, AssetSignedUrlOptions, AssetTranscript, AssetTransformOptions, AssetTransformPreset, AssetTransformPresetCategory, AssetUploadOptions, AssetVisibility, AssetVersion, JsonValue, MailAddress, MailAddressInput, MailDnsRecord, MailDomain, MailDomainListResult, MailDomainStatus, MailIdempotencyStatus, MailLog, MailMessage, MailMessageListOptions, MailMessageListResult, MailMessageSummary, MailRecordStatus, MailSendAttempt, MailSendInput, MailSendResponse, MailStatus, MailRecipient, MailRecipientStatus, MailRecipientSummary, Project, ProjectListOptions, StackShiftOptions, } from './types.js';
|
|
28
|
+
export type { Asset, AssetAIAnnotation, AssetAIInfo, AssetManualDescriptionInput, AssetCollection, AssetListOptions, AssetListResult, AssetModerationResult, AssetSavedSearch, AssetSignedUploadUrl, AssetSignedUploadUrlOptions, AssetSignedUrl, AssetSignedUrlOptions, AssetTranscript, AssetTransformOptions, AssetTransformPreset, AssetTransformPresetCategory, AssetUploadOptions, AssetVisibility, AssetVersion, JsonValue, MailAddress, MailAddressInput, MailDnsRecord, MailDomain, MailDomainListResult, MailDomainStatus, MailIdempotencyStatus, MailLog, MailMessage, MailMessageListOptions, MailMessageListResult, MailMessageSummary, MailRecordStatus, MailSendAttempt, MailSendInput, MailSendResponse, MailStatus, MailRecipient, MailRecipientStatus, MailRecipientSummary, Project, ProjectListOptions, StackShiftOptions, } from './types.js';
|
|
23
29
|
export type { MailBounce, MailBounceListOptions, MailBounceListResult, MailBounceType, MailSuppression, MailSuppressionCreateInput, MailSuppressionListOptions, MailSuppressionListResult, MailSuppressionReason, MailSuppressionSource, } from './mail-delivery-types.js';
|
|
24
30
|
export type { MailOtpChallenge, MailOtpChallengeListOptions, MailOtpChallengeListResult, MailOtpSendInput, MailOtpSendResponse, MailOtpStatus, MailOtpVerifyInput, MailOtpVerifyResponse, } from './mail-otp-types.js';
|
|
25
31
|
export type { MailSendTemplateInput, MailSendTemplateResponse, MailTemplate, MailTemplateCreateInput, MailTemplateDetail, MailTemplateListOptions, MailTemplateListResult, MailTemplatePreview, MailTemplatePreviewInput, MailTemplateStatus, MailTemplateTestSendInput, MailTemplateTestSendResponse, MailTemplateUpdateInput, MailTemplateVersion, } from './mail-template-types.js';
|
|
26
32
|
export type { MailEvent, MailEventListOptions, MailEventListResult, MailEventType, MailTimelineItem, MailWebhook, MailWebhookCreateInput, MailWebhookCreateResponse, MailWebhookDelivery, MailWebhookDeliveryAttempt, MailWebhookDeliveryDetail, MailWebhookDeliveryListOptions, MailWebhookListOptions, MailWebhookListResult, MailWebhookUpdateInput, MailWebhookReplay, MailWebhookReplayInput, } from './mail-webhook-types.js';
|
|
27
33
|
export type { MailMessageStream, MailMessageStreamCreateInput, MailMessageStreamListResult } from './mail-streams.js';
|
|
28
34
|
export type { MailDomainReputation, MailLimits, MailManualReviewStatus, MailReputation, MailReputationEvent, MailReputationEventListOptions, MailReputationEventListResult, MailReputationEventSeverity, MailReputationStatus, MailReputationTier, MailReputationWorkspace, } from './mail-reputation-types.js';
|
|
29
|
-
export type { MailAnalytics, MailAnalyticsInput, MailAttachmentInput, MailBatch, MailBatchItem, MailBatchSendInput, MailBatchTemplateInput, MailInboundDomain, MailInboundMessage, MailScheduledCreateInput, MailScheduledMessage, } from './mail-advanced-types.js';
|
|
35
|
+
export type { MailAnalytics, MailAnalyticsRateCohort, MailAnalyticsInput, MailAttachmentInput, MailBatch, MailBatchItem, MailBatchSendInput, MailBatchTemplateInput, MailInboundDomain, MailInboundMessage, MailScheduledCreateInput, MailScheduledMessage, } from './mail-advanced-types.js';
|
|
30
36
|
export { AssetVideoClient } from './assets-video.js';
|
|
31
37
|
export type * from './assets-video-types.js';
|
|
32
38
|
export * from './mail-tracking.js';
|
|
@@ -41,3 +47,8 @@ export * from './mail-migration.js';
|
|
|
41
47
|
export * from './mail-marketing.js';
|
|
42
48
|
export { AICreditsClient } from './ai-credits.js';
|
|
43
49
|
export type * from './ai-credits.js';
|
|
50
|
+
export * from './support-action-types.js';
|
|
51
|
+
export * from './support-actions.js';
|
|
52
|
+
export * from './support-action-receiver.js';
|
|
53
|
+
export * from './support-action-sqlite.js';
|
|
54
|
+
export * from './support-action-manifest.js';
|
package/dist/index.js
CHANGED
|
@@ -3,10 +3,13 @@ export { AssetsClient, assetTransformOptions, assetTransformPresets, assetTransf
|
|
|
3
3
|
export { AssetWorkflowsClient } from './asset-workflows.js';
|
|
4
4
|
export { AssetConnectionsClient, AssetMigrationsClient, AssetStorageClient, AssetTextClient, AssetUploadCapabilitiesClient } from './assets-platform.js';
|
|
5
5
|
export { ChunkedUploadController, UploadResumeInvalidError, putBlob, sha256Blob } from './upload-controller.js';
|
|
6
|
+
export { S2UploadsClient } from './s2.js';
|
|
7
|
+
export { S2Uploader, createS2ResumeStore } from './s2-upload.js';
|
|
6
8
|
export { createResponsiveImage, namedResponsiveSource, uploadBrowserFile } from './assets-framework.js';
|
|
7
9
|
export { assetContractOperations } from './generated/assets-contract.js';
|
|
8
10
|
export { MailBouncesClient, MailClient, MailDomainsClient, MailEventsClient, MailLimitsClient, MailMessagesClient, MailScheduledClient, MailBatchClient, MailInboundClient, MailAnalyticsClient, MailOtpChallengesClient, MailOtpClient, MailReputationClient, MailReputationEventsClient, MailSuppressionsClient, MailTemplatesClient, MailWebhooksClient, MailStreamsClient, MailAudiencesClient, MailCampaignsClient, } from './mail.js';
|
|
9
11
|
export { MailExportsClient } from './mail-exports.js';
|
|
12
|
+
export { MailboxAliasesClient, MailboxDomainsClient, MailboxGroupsClient, MailboxImportsClient, MailboxRoutesClient, MailboxesClient } from './mail-mailboxes.js';
|
|
10
13
|
export { ProjectsClient } from './projects.js';
|
|
11
14
|
export { WorkloadSecurityClient } from './workload-security.js';
|
|
12
15
|
export { AssetVideoClient } from './assets-video.js';
|
|
@@ -17,3 +20,8 @@ export * from './mail-billing.js';
|
|
|
17
20
|
export * from './mail-migration.js';
|
|
18
21
|
export * from './mail-marketing.js';
|
|
19
22
|
export { AICreditsClient } from './ai-credits.js';
|
|
23
|
+
export * from './support-action-types.js';
|
|
24
|
+
export * from './support-actions.js';
|
|
25
|
+
export * from './support-action-receiver.js';
|
|
26
|
+
export * from './support-action-sqlite.js';
|
|
27
|
+
export * from './support-action-manifest.js';
|
|
@@ -107,7 +107,18 @@ export interface MailAnalyticsInput {
|
|
|
107
107
|
template?: string;
|
|
108
108
|
event?: string;
|
|
109
109
|
}
|
|
110
|
+
export interface MailAnalyticsRateCohort {
|
|
111
|
+
basis: 'recipient_created_at';
|
|
112
|
+
asOf: string;
|
|
113
|
+
queued: number;
|
|
114
|
+
mtaAccepted: number;
|
|
115
|
+
delivered: number;
|
|
116
|
+
bounced: number;
|
|
117
|
+
failed: number;
|
|
118
|
+
}
|
|
110
119
|
export interface MailAnalytics {
|
|
120
|
+
rateCohort?: MailAnalyticsRateCohort;
|
|
121
|
+
previousRateCohort?: MailAnalyticsRateCohort;
|
|
111
122
|
summary: Record<string, number>;
|
|
112
123
|
series: Array<Record<string, number | string>>;
|
|
113
124
|
}
|
package/dist/mail-billing.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { StackShift } from './client.js';
|
|
2
2
|
import type { MailMode } from './mail-simulation.js';
|
|
3
3
|
export interface MailBillingSummary {
|
|
4
|
+
catalogId?: string;
|
|
5
|
+
planSlug?: string;
|
|
6
|
+
monthlyPriceKobo?: number;
|
|
7
|
+
overageAllowed?: boolean;
|
|
4
8
|
reconciliationRequired: boolean;
|
|
5
9
|
active: boolean;
|
|
6
10
|
mode: MailMode;
|
package/dist/mail-campaigns.d.ts
CHANGED