@stackshift-cloud/sdk 1.3.1 → 1.4.1

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.
Files changed (39) hide show
  1. package/README.md +68 -0
  2. package/dist/asset-media-v2.d.ts +15 -1
  3. package/dist/asset-workflows.d.ts +5 -13
  4. package/dist/assets-dam-types.d.ts +35 -0
  5. package/dist/assets.d.ts +11 -2
  6. package/dist/assets.js +22 -0
  7. package/dist/client.d.ts +2 -0
  8. package/dist/client.js +5 -1
  9. package/dist/generated/assets-contract.d.ts +41 -6
  10. package/dist/generated/assets-contract.js +8 -1
  11. package/dist/index.d.ts +12 -3
  12. package/dist/index.js +7 -0
  13. package/dist/mail-billing.d.ts +12 -0
  14. package/dist/mail-billing.js +3 -0
  15. package/dist/mail-brands.d.ts +14 -1
  16. package/dist/mail-campaigns.d.ts +6 -3
  17. package/dist/mail-campaigns.js +6 -4
  18. package/dist/mail-delivery-types.d.ts +1 -0
  19. package/dist/mail-events-webhooks.d.ts +8 -3
  20. package/dist/mail-events-webhooks.js +13 -0
  21. package/dist/mail-mailboxes.d.ts +358 -0
  22. package/dist/mail-mailboxes.js +202 -0
  23. package/dist/mail-webhook-types.d.ts +40 -1
  24. package/dist/mail.d.ts +8 -0
  25. package/dist/mail.js +15 -0
  26. package/dist/partner.d.ts +369 -0
  27. package/dist/partner.js +70 -0
  28. package/dist/support-action-manifest.d.ts +3 -0
  29. package/dist/support-action-manifest.js +40 -0
  30. package/dist/support-action-receiver.d.ts +20 -0
  31. package/dist/support-action-receiver.js +37 -0
  32. package/dist/support-action-sqlite.d.ts +17 -0
  33. package/dist/support-action-sqlite.js +30 -0
  34. package/dist/support-action-types.d.ts +93 -0
  35. package/dist/support-action-types.js +1 -0
  36. package/dist/support-actions.d.ts +19 -0
  37. package/dist/support-actions.js +213 -0
  38. package/dist/types.d.ts +5 -0
  39. package/package.json +3 -2
package/README.md CHANGED
@@ -34,6 +34,24 @@ Set your API key:
34
34
  STACKSHIFT_API_KEY=sk_live_xxx
35
35
  ```
36
36
 
37
+ ## Partner platforms
38
+
39
+ Staff-enabled partner accounts buy domains for merchants from their StackShift wallet; StackShift registers the domain, sets up Mail and creates a warmed-up brand tagged with your merchant reference. Use an API token with the `partner:manage` scope (and `mail:manage` to run campaigns) on your server:
40
+
41
+ ```ts
42
+ const domain = await stackshift.partner.purchaseDomain({
43
+ domain: 'merchantshop.com',
44
+ years: 1,
45
+ merchantRef: 'm_123',
46
+ registrant: { first_name: 'Ada', last_name: 'Obi', email: 'ada@merchantshop.com', phone: '+2348012345678', address: '1 Marina', city: 'Lagos', state: 'Lagos', postal_code: '101001', country: 'NG' },
47
+ brand: { name: 'Merchant Shop', postalAddress: '1 Marina, Lagos, Nigeria' },
48
+ replies: { mode: 'forward', forwardTo: 'ada@gmail.com' },
49
+ }, { idempotencyKey: 'order-m_123-1' })
50
+ const status = await stackshift.partner.getDomain(domain.id)
51
+ ```
52
+
53
+ `partner` also exposes `overview`, `updateSettings`, `listDomains` (with `q` and `attention` to find the merchants that need you), `retryDomain`, `getDiagnosis`, `restoreDns`, `transferOut`, `resumeBrand`, `getComplaints`, `listComplaintSources`, `suppressNeverOpened`, `undoSuppression`, `usage`, `listRequests` and `createRequest`. `transferOut` needs the `partner:transfer` scope (or `*`); `partner:manage` alone is refused. Purchases are capped at 30 per minute and, per partner, at 25 domains in a rolling 24 hours (429 `daily_purchase_limit`; staff can raise it). Validation errors are 400, state conflicts are 409. Subscribe to the `partner.*` event types with `mail.webhooks.create` and send campaigns through the brand in `domain.brandId`.
54
+
37
55
  ## AI credits
38
56
 
39
57
  AI credits are account-scoped. Inspect the balance and usage, create a top-up checkout, or choose managed billing versus your own provider key:
@@ -172,6 +190,38 @@ await stackshift.mail.send({
172
190
 
173
191
  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
192
 
193
+ ## Mailboxes
194
+
195
+ Host real mailboxes on your own domain. The mailbox owner gets an invitation by email and sets their own password.
196
+
197
+ ```ts
198
+ const domain = await stackshift.mail.mailboxDomains.create('acme.com')
199
+
200
+ console.log(domain.records)
201
+
202
+ await stackshift.mail.mailboxDomains.verify(domain.id)
203
+
204
+ const mailbox = await stackshift.mail.mailboxes.create({
205
+ domainId: domain.id,
206
+ localPart: 'ada',
207
+ ownerEmail: 'ada@personal.example',
208
+ plan: 'basic',
209
+ })
210
+
211
+ await stackshift.mail.aliases.create({ mailboxId: mailbox.id, localPart: 'sales', sendAs: true })
212
+
213
+ await stackshift.mail.routes.create({
214
+ domainId: domain.id,
215
+ pattern: 'orders-*',
216
+ targets: [{ kind: 'app', webhookUrl: 'https://app.example.com/inbound' }],
217
+ })
218
+
219
+ const devices = await stackshift.mail.mailboxes.listDevices(mailbox.id)
220
+ await stackshift.mail.mailboxes.suspend(mailbox.id)
221
+ ```
222
+
223
+ `stackshift.mail.groups` manages team addresses, and `stackshift.mail.mailboxImports` copies mail from Google, Microsoft or any IMAP server.
224
+
175
225
  ## Upload an asset
176
226
 
177
227
  ```ts
@@ -385,3 +435,21 @@ const workspace = await video.workspace(assetId)
385
435
  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
436
 
387
437
  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.
438
+
439
+ ## Support action receivers (unreleased)
440
+
441
+ 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.
442
+
443
+ `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`.
444
+
445
+ 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:
446
+
447
+ ```sh
448
+ npm run build
449
+ node examples/support-actions/receiver.mjs /absolute/path/claims.sqlite headers.json actions.json < body.json
450
+ npm run test:support-actions
451
+ ```
452
+
453
+ 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.
454
+
455
+ 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.
@@ -2,7 +2,8 @@ export type AssetMediaKind = 'image' | 'video';
2
2
  export type AssetTransformOutputKind = 'image' | 'video' | 'audio' | 'thumbnail';
3
3
  export type AssetAnimationPolicy = 'first' | 'preserve' | 'reject';
4
4
  export interface AssetTransformOperation {
5
- type: 'crop' | 'resize' | 'rotate' | 'blur' | 'radius' | 'dpr' | 'background' | 'overlay' | 'trim' | 'fps' | 'timestamp';
5
+ type: 'crop' | 'resize' | 'rotate' | 'blur' | 'radius' | 'dpr' | 'background' | 'overlay' | 'trim' | 'fps' | 'timestamp' | 'remove_background' | 'smart_crop';
6
+ focus?: 'attention' | 'entropy';
6
7
  mode?: 'explicit' | 'fit' | 'fill' | 'pad';
7
8
  gravity?: 'northwest' | 'north' | 'northeast' | 'west' | 'centre' | 'east' | 'southwest' | 'south' | 'southeast';
8
9
  width?: number;
@@ -39,6 +40,19 @@ export type AssetTransformMaterializeInput = {
39
40
  preset: string;
40
41
  definition?: never;
41
42
  };
43
+ export interface AssetTransformEstimateInput {
44
+ version_id: string;
45
+ definition: AssetTransformDefinition;
46
+ }
47
+ export interface AssetTransformEstimate {
48
+ cost_micros: number;
49
+ currency: string;
50
+ steps: Array<{
51
+ index: number;
52
+ type: AssetTransformOperation['type'];
53
+ cost_micros: number;
54
+ }>;
55
+ }
42
56
  export interface AssetDerivedAsset {
43
57
  id: string;
44
58
  asset_id: string;
@@ -179,21 +179,13 @@ export interface AssetWorkflowHTTPCredentialInput {
179
179
  value: string;
180
180
  }
181
181
  export interface AssetAutomationOverview {
182
- mcp_endpoint: '/api/v1/assets/mcp';
183
- auth_method: 'pat';
182
+ mcp_endpoint: '/api/v1/agents/mcp';
183
+ auth_method: 'agent_connection';
184
184
  tools: Array<{
185
- name: string;
185
+ action: string;
186
+ mcp_tool: string;
186
187
  description: string;
187
- required_scope: string;
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 {
@@ -257,3 +257,38 @@ export interface AssetRenderingInfo {
257
257
  sets: AssetRenderSet[];
258
258
  deliveries: Record<string, AssetPublicationDelivery>;
259
259
  }
260
+ export interface AssetReferrerUsage {
261
+ window_days: number;
262
+ referrers: Array<{
263
+ host: string;
264
+ requests: number;
265
+ }>;
266
+ }
267
+ export interface AssetHoldDetail {
268
+ kind: 'scan' | 'content' | 'policy';
269
+ finding: string;
270
+ explanation: string;
271
+ explained_by: 'stackie' | 'scan_result' | 'content_check';
272
+ version_id: string;
273
+ upload: {
274
+ window_minutes: number;
275
+ files: number;
276
+ held: Array<{
277
+ id: string;
278
+ name: string;
279
+ }>;
280
+ };
281
+ same_content: number;
282
+ }
283
+ export interface AssetReuploadRequestInput {
284
+ email?: string;
285
+ message?: string;
286
+ }
287
+ export interface AssetReuploadRequest {
288
+ id: string;
289
+ email: string;
290
+ status: 'sent' | 'completed' | 'expired' | 'revoked';
291
+ expires_at: string;
292
+ created_at: string;
293
+ completed_at?: string;
294
+ }
package/dist/assets.d.ts CHANGED
@@ -2,9 +2,10 @@ import { AssetDAMClient } from './assets-dam.js';
2
2
  import { AssetVideoClient } from './assets-video.js';
3
3
  import type { StackShift } from './client.js';
4
4
  import { AssetConnectionsClient, AssetMigrationsClient, AssetStorageClient, AssetTextClient, AssetUploadCapabilitiesClient } from './assets-platform.js';
5
+ import type { AssetHoldDetail, AssetReferrerUsage, AssetReuploadRequest, AssetReuploadRequestInput } from './assets-dam-types.js';
5
6
  import { AssetWorkflowsClient } from './asset-workflows.js';
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 { AssetDerivedAsset, AssetImageGenerationInput, AssetTransformDefinition, AssetTransformEstimate, AssetTransformEstimateInput, AssetTransformMaterializeInput } from './asset-media-v2.js';
8
+ 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
9
  export declare const assetTransformPresets: AssetTransformPreset[];
9
10
  export declare function getAssetTransformPreset(name: string): AssetTransformPreset | undefined;
10
11
  export declare function assetTransformOptions(preset: AssetTransformPreset): AssetTransformOptions;
@@ -47,6 +48,7 @@ export declare class AssetsClient {
47
48
  tags: string[];
48
49
  revision: number;
49
50
  }>;
51
+ describe(assetId: string, input: AssetManualDescriptionInput): Promise<AssetAIAnnotation>;
50
52
  patchMetadata(assetId: string, revision: number, metadata: Record<string, unknown>): Promise<{
51
53
  updated: boolean;
52
54
  revision: number;
@@ -65,6 +67,12 @@ export declare class AssetsClient {
65
67
  requestTranscript(assetId: string, idempotencyKey?: string): Promise<AssetJobSubmission>;
66
68
  requestSmartCrop(assetId: string, idempotencyKey?: string): Promise<AssetJobSubmission>;
67
69
  requestBackgroundRemoval(assetId: string, idempotencyKey?: string): Promise<AssetJobSubmission>;
70
+ usage(assetId: string): Promise<AssetReferrerUsage>;
71
+ hold(assetId: string): Promise<AssetHoldDetail>;
72
+ createReuploadRequest(assetId: string, input?: AssetReuploadRequestInput): Promise<AssetReuploadRequest>;
73
+ reuploadRequests(assetId: string): Promise<{
74
+ requests: AssetReuploadRequest[];
75
+ }>;
68
76
  versions(assetId: string): Promise<{
69
77
  versions: AssetVersion[];
70
78
  }>;
@@ -109,6 +117,7 @@ export declare class AssetsClient {
109
117
  updatePolicy(policy: AssetContentPolicy): Promise<AssetContentPolicy>;
110
118
  createTransformation(input: AssetNamedTransformInput): Promise<unknown>;
111
119
  createTransformationV2(name: string, definition: AssetTransformDefinition, eager?: boolean): Promise<unknown>;
120
+ estimateTransform(assetId: string, input: AssetTransformEstimateInput): Promise<AssetTransformEstimate>;
112
121
  materializeTransform(assetId: string, input: AssetTransformMaterializeInput, idempotencyKey?: string): Promise<AssetJobSubmission>;
113
122
  derivatives(assetId: string): Promise<{
114
123
  derivatives: AssetDerivedAsset[];
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}"` },
@@ -288,6 +291,20 @@ export class AssetsClient {
288
291
  requestBackgroundRemoval(assetId, idempotencyKey) {
289
292
  return this.requestAssetJob(`/assets/${encodeURIComponent(assetId)}/background-remove`, idempotencyKey);
290
293
  }
294
+ usage(assetId) {
295
+ return this.client.request(`/assets/${encodeURIComponent(assetId)}/usage`);
296
+ }
297
+ hold(assetId) {
298
+ return this.client.request(`/assets/${encodeURIComponent(assetId)}/hold`);
299
+ }
300
+ createReuploadRequest(assetId, input = {}) {
301
+ return this.client.request(`/assets/${encodeURIComponent(assetId)}/reupload-requests`, {
302
+ method: 'POST', body: input,
303
+ });
304
+ }
305
+ reuploadRequests(assetId) {
306
+ return this.client.request(`/assets/${encodeURIComponent(assetId)}/reupload-requests`);
307
+ }
291
308
  versions(assetId) {
292
309
  return this.client.request(`/assets/${encodeURIComponent(assetId)}/versions`);
293
310
  }
@@ -347,6 +364,11 @@ export class AssetsClient {
347
364
  method: 'POST', body: { name, definition, eager },
348
365
  });
349
366
  }
367
+ estimateTransform(assetId, input) {
368
+ return this.client.request(`/assets/${encodeURIComponent(assetId)}/transforms/estimate`, {
369
+ method: 'POST', body: input,
370
+ });
371
+ }
350
372
  materializeTransform(assetId, input, idempotencyKey) {
351
373
  return this.client.request(`/assets/${encodeURIComponent(assetId)}/transforms`, {
352
374
  method: 'POST', body: input,
package/dist/client.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { AICreditsClient } from './ai-credits.js';
2
2
  import { AssetsClient } from './assets.js';
3
3
  import { MailClient } from './mail.js';
4
+ import { PartnerClient } from './partner.js';
4
5
  import { ProjectsClient } from './projects.js';
5
6
  import { WorkloadSecurityClient } from './workload-security.js';
6
7
  import type { StackShiftOptions } from './types.js';
@@ -14,6 +15,7 @@ export declare class StackShift {
14
15
  readonly projects: ProjectsClient;
15
16
  readonly assets: AssetsClient;
16
17
  readonly mail: MailClient;
18
+ readonly partner: PartnerClient;
17
19
  readonly workloadSecurity: WorkloadSecurityClient;
18
20
  private readonly fetcher;
19
21
  constructor(options?: StackShiftOptions);
package/dist/client.js CHANGED
@@ -1,10 +1,11 @@
1
1
  import { AICreditsClient } from './ai-credits.js';
2
2
  import { AssetsClient } from './assets.js';
3
3
  import { MailClient } from './mail.js';
4
+ import { PartnerClient } from './partner.js';
4
5
  import { ProjectsClient } from './projects.js';
5
6
  import { WorkloadSecurityClient } from './workload-security.js';
6
7
  const defaultBaseUrl = 'https://api.stackshift.cloud/api/v1';
7
- const defaultMailBaseUrl = 'https://api.stackshift.cloud/v1';
8
+ const defaultMailBaseUrl = 'https://api.stackshift.cloud/api/v1';
8
9
  const defaultCdnBaseUrl = 'https://cdn.stackshift.cloud';
9
10
  export class StackShift {
10
11
  aiCredits;
@@ -16,6 +17,7 @@ export class StackShift {
16
17
  projects;
17
18
  assets;
18
19
  mail;
20
+ partner;
19
21
  workloadSecurity;
20
22
  fetcher;
21
23
  constructor(options = {}) {
@@ -33,6 +35,7 @@ export class StackShift {
33
35
  this.projects = new ProjectsClient(this);
34
36
  this.assets = new AssetsClient(this);
35
37
  this.mail = new MailClient(this);
38
+ this.partner = new PartnerClient(this);
36
39
  this.workloadSecurity = new WorkloadSecurityClient(this);
37
40
  }
38
41
  async request(path, init = {}) {
@@ -64,6 +67,7 @@ export class StackShift {
64
67
  method: init.method ?? 'GET',
65
68
  headers: stripUndefined({
66
69
  Authorization: `Bearer ${this.apiKey}`,
70
+ 'User-Agent': typeof window === 'undefined' ? 'StackShift-JS/1.0' : undefined,
67
71
  'X-Asset-Space-ID': path.startsWith('/assets') ? this.assetSpaceId : undefined,
68
72
  'Content-Type': isFormData ? undefined : 'application/json',
69
73
  ...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' | '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';
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
@@ -16,18 +16,20 @@ export type { ArtDirectionSource, ResponsiveImageDescriptor, ResponsiveImageOpti
16
16
  export { assetContractOperations } from './generated/assets-contract.js';
17
17
  export type { AssetAPIScope, AssetContractOperation, AssetOperationId } from './generated/assets-contract.js';
18
18
  export { MailBouncesClient, MailClient, MailDomainsClient, MailEventsClient, MailLimitsClient, MailMessagesClient, MailScheduledClient, MailBatchClient, MailInboundClient, MailAnalyticsClient, MailOtpChallengesClient, MailOtpClient, MailReputationClient, MailReputationEventsClient, MailSuppressionsClient, MailTemplatesClient, MailWebhooksClient, MailStreamsClient, MailAudiencesClient, MailCampaignsClient, } from './mail.js';
19
- export type { MailAudience, MailAudienceMember, MailAudienceMemberImport, MailCampaign } from './mail-campaigns.js';
19
+ export type { MailAudience, MailAudienceMember, MailAudienceMemberImport, MailBrandFilterOptions, MailCampaign } from './mail-campaigns.js';
20
20
  export { MailExportsClient } from './mail-exports.js';
21
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';
22
24
  export type { MailDiagnosticFinding, MailTemplateDiagnosticInput, MailTemplateDiagnosticResult } from './mail-diagnostics.js';
23
25
  export { ProjectsClient } from './projects.js';
24
26
  export { WorkloadSecurityClient } from './workload-security.js';
25
27
  export type * from './workload-security.js';
26
- 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';
27
29
  export type { MailBounce, MailBounceListOptions, MailBounceListResult, MailBounceType, MailSuppression, MailSuppressionCreateInput, MailSuppressionListOptions, MailSuppressionListResult, MailSuppressionReason, MailSuppressionSource, } from './mail-delivery-types.js';
28
30
  export type { MailOtpChallenge, MailOtpChallengeListOptions, MailOtpChallengeListResult, MailOtpSendInput, MailOtpSendResponse, MailOtpStatus, MailOtpVerifyInput, MailOtpVerifyResponse, } from './mail-otp-types.js';
29
31
  export type { MailSendTemplateInput, MailSendTemplateResponse, MailTemplate, MailTemplateCreateInput, MailTemplateDetail, MailTemplateListOptions, MailTemplateListResult, MailTemplatePreview, MailTemplatePreviewInput, MailTemplateStatus, MailTemplateTestSendInput, MailTemplateTestSendResponse, MailTemplateUpdateInput, MailTemplateVersion, } from './mail-template-types.js';
30
- export type { MailEvent, MailEventListOptions, MailEventListResult, MailEventType, MailTimelineItem, MailWebhook, MailWebhookCreateInput, MailWebhookCreateResponse, MailWebhookDelivery, MailWebhookDeliveryAttempt, MailWebhookDeliveryDetail, MailWebhookDeliveryListOptions, MailWebhookListOptions, MailWebhookListResult, MailWebhookUpdateInput, MailWebhookReplay, MailWebhookReplayInput, } from './mail-webhook-types.js';
32
+ export type { MailEvent, MailEventListOptions, MailEventListResult, MailEventType, MailTimelineItem, MailWebhook, MailWebhookCreateInput, MailWebhookCreateResponse, MailWebhookDelivery, MailWebhookDeliveryAttempt, MailWebhookDeliveryDetail, MailWebhookDeliveryListItem, MailWebhookDeliveryListOptions, MailWebhookDeliveryMerchant, MailWebhookDetail, MailWebhookDiagnosis, MailWebhookDiagnosisResult, MailWebhookListOptions, MailWebhookListResult, MailWebhookUpdateInput, MailWebhookReplay, MailWebhookReplayInput, MailWebhookWaitingHighlight, MailWebhookWaitingSummary, } from './mail-webhook-types.js';
31
33
  export type { MailMessageStream, MailMessageStreamCreateInput, MailMessageStreamListResult } from './mail-streams.js';
32
34
  export type { MailDomainReputation, MailLimits, MailManualReviewStatus, MailReputation, MailReputationEvent, MailReputationEventListOptions, MailReputationEventListResult, MailReputationEventSeverity, MailReputationStatus, MailReputationTier, MailReputationWorkspace, } from './mail-reputation-types.js';
33
35
  export type { MailAnalytics, MailAnalyticsRateCohort, MailAnalyticsInput, MailAttachmentInput, MailBatch, MailBatchItem, MailBatchSendInput, MailBatchTemplateInput, MailInboundDomain, MailInboundMessage, MailScheduledCreateInput, MailScheduledMessage, } from './mail-advanced-types.js';
@@ -43,5 +45,12 @@ export * from './mail-brands.js';
43
45
  export * from './mail-billing.js';
44
46
  export * from './mail-migration.js';
45
47
  export * from './mail-marketing.js';
48
+ export { PartnerClient } from './partner.js';
49
+ export type * from './partner.js';
46
50
  export { AICreditsClient } from './ai-credits.js';
47
51
  export type * from './ai-credits.js';
52
+ export * from './support-action-types.js';
53
+ export * from './support-actions.js';
54
+ export * from './support-action-receiver.js';
55
+ export * from './support-action-sqlite.js';
56
+ export * from './support-action-manifest.js';
package/dist/index.js CHANGED
@@ -9,6 +9,7 @@ export { createResponsiveImage, namedResponsiveSource, uploadBrowserFile } from
9
9
  export { assetContractOperations } from './generated/assets-contract.js';
10
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';
11
11
  export { MailExportsClient } from './mail-exports.js';
12
+ export { MailboxAliasesClient, MailboxDomainsClient, MailboxGroupsClient, MailboxImportsClient, MailboxRoutesClient, MailboxesClient } from './mail-mailboxes.js';
12
13
  export { ProjectsClient } from './projects.js';
13
14
  export { WorkloadSecurityClient } from './workload-security.js';
14
15
  export { AssetVideoClient } from './assets-video.js';
@@ -18,4 +19,10 @@ export * from './mail-brands.js';
18
19
  export * from './mail-billing.js';
19
20
  export * from './mail-migration.js';
20
21
  export * from './mail-marketing.js';
22
+ export { PartnerClient } from './partner.js';
21
23
  export { AICreditsClient } from './ai-credits.js';
24
+ export * from './support-action-types.js';
25
+ export * from './support-actions.js';
26
+ export * from './support-action-receiver.js';
27
+ export * from './support-action-sqlite.js';
28
+ export * from './support-action-manifest.js';
@@ -26,6 +26,17 @@ export interface MailBillingSummary {
26
26
  revision: number;
27
27
  };
28
28
  }
29
+ export interface MailBillingPeriodUsage {
30
+ period: string;
31
+ planSlug?: string;
32
+ currency: 'NGN';
33
+ periodStart: string;
34
+ periodEnd: string;
35
+ monthlyPriceKobo: number;
36
+ included: number;
37
+ used: number;
38
+ spentKobo: number;
39
+ }
29
40
  export interface MailCampaignEstimate extends MailBillingSummary {
30
41
  recipientCount: number;
31
42
  requiredCreditKobo: number;
@@ -35,4 +46,5 @@ export declare class MailBillingClient {
35
46
  private readonly client;
36
47
  constructor(client: StackShift);
37
48
  summary(): Promise<MailBillingSummary>;
49
+ periodUsage(period: string): Promise<MailBillingPeriodUsage>;
38
50
  }
@@ -4,4 +4,7 @@ export class MailBillingClient {
4
4
  this.client = client;
5
5
  }
6
6
  summary() { return this.client.mailRequest('/mail/billing'); }
7
+ periodUsage(period) {
8
+ return this.client.mailRequest(`/mail/billing?period=${encodeURIComponent(period)}`);
9
+ }
7
10
  }
@@ -10,22 +10,35 @@ export interface MailBrandFields {
10
10
  website?: string;
11
11
  supportEmail?: string;
12
12
  editableFields?: string[];
13
+ merchantRef?: string;
13
14
  }
14
15
  export interface MailBrand extends MailBrandFields {
15
16
  id: string;
16
17
  workspaceId: string;
17
18
  mode: MailMode;
18
19
  status: 'active' | 'archived';
20
+ sendingPausedAt: string | null;
21
+ sendingPauseReason: string;
22
+ suspendedAt: string | null;
19
23
  revision: number;
20
24
  createdAt: string;
21
25
  updatedAt: string;
22
26
  }
27
+ export interface MailBrandWarmup {
28
+ day: number;
29
+ totalDays: number;
30
+ marketingUnlocked: boolean;
31
+ status: 'new' | 'warming' | 'trusted';
32
+ }
33
+ export interface MailBrandListItem extends MailBrand {
34
+ warmup: MailBrandWarmup | null;
35
+ }
23
36
  export declare class MailBrandsClient {
24
37
  private readonly client;
25
38
  constructor(client: StackShift);
26
39
  create(input: MailBrandFields): Promise<MailBrand>;
27
40
  list(): Promise<{
28
- data: MailBrand[];
41
+ data: MailBrandListItem[];
29
42
  }>;
30
43
  get(id: string): Promise<MailBrand>;
31
44
  update(id: string, input: MailBrandFields & {