@stackshift-cloud/sdk 1.1.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 +79 -1
- package/dist/ai-credits.d.ts +78 -0
- package/dist/ai-credits.js +15 -0
- package/dist/assets-dam-types.d.ts +259 -0
- package/dist/assets-dam-types.js +1 -0
- package/dist/assets-dam.d.ts +106 -0
- package/dist/assets-dam.js +52 -0
- package/dist/assets-video-types.d.ts +116 -0
- package/dist/assets-video-types.js +1 -0
- package/dist/assets-video.d.ts +25 -0
- package/dist/assets-video.js +19 -0
- package/dist/assets.d.ts +5 -1
- package/dist/assets.js +11 -2
- package/dist/client.d.ts +6 -0
- package/dist/client.js +14 -0
- package/dist/generated/assets-contract.d.ts +531 -1
- package/dist/generated/assets-contract.js +106 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +9 -0
- package/dist/mail-advanced-types.d.ts +9 -0
- package/dist/mail-billing.d.ts +34 -0
- package/dist/mail-billing.js +7 -0
- package/dist/mail-brands.d.ts +35 -0
- package/dist/mail-brands.js +17 -0
- package/dist/mail-campaigns.d.ts +72 -10
- package/dist/mail-campaigns.js +25 -2
- package/dist/mail-marketing.d.ts +84 -0
- package/dist/mail-marketing.js +24 -0
- package/dist/mail-migration.d.ts +16 -0
- package/dist/mail-migration.js +10 -0
- package/dist/mail-otp-types.d.ts +4 -0
- package/dist/mail-simulation.d.ts +4 -0
- package/dist/mail-simulation.js +1 -0
- package/dist/mail-subscribers.d.ts +39 -0
- package/dist/mail-subscribers.js +1 -0
- package/dist/mail-template-types.d.ts +8 -0
- package/dist/mail-tracking.d.ts +59 -0
- package/dist/mail-tracking.js +14 -0
- package/dist/mail-webhook-types.d.ts +4 -1
- package/dist/mail.d.ts +12 -0
- package/dist/mail.js +19 -0
- package/dist/types.d.ts +13 -0
- package/dist/workload-security.d.ts +172 -0
- package/dist/workload-security.js +50 -0
- package/package.json +2 -2
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
export const assetContractOperations = [
|
|
2
|
+
{ id: 'putAssetAICredential', method: 'PUT', path: '/api/v1/assets/ai/credential', scope: 'assets:process' },
|
|
3
|
+
{ id: 'deleteAssetAICredential', method: 'DELETE', path: '/api/v1/assets/ai/credential', scope: 'assets:process' },
|
|
4
|
+
{ id: 'openAssetAIOutput', method: 'GET', path: '/api/v1/assets/{assetID}/ai/outputs/{outputID}', scope: 'assets:read' },
|
|
5
|
+
{ id: 'getVideoWorkspace', method: 'GET', path: '/api/v1/assets/{assetID}/video', scope: 'assets:read' },
|
|
6
|
+
{ id: 'processVideoVersion', method: 'POST', path: '/api/v1/assets/{assetID}/versions/{versionID}/video', scope: 'assets:process' },
|
|
7
|
+
{ id: 'createVideoPlaybackSession', method: 'POST', path: '/api/v1/assets/{assetID}/playback-sessions', scope: 'assets:read' },
|
|
8
|
+
{ id: 'revokeVideoPlaybackSession', method: 'DELETE', path: '/api/v1/assets/{assetID}/playback-sessions/{sessionID}', scope: 'assets:write' },
|
|
9
|
+
{ id: 'reviewVideoVersion', method: 'POST', path: '/api/v1/assets/{assetID}/versions/{versionID}/video/review', scope: 'assets:admin' },
|
|
10
|
+
{ id: 'listVideoCaptions', method: 'GET', path: '/api/v1/assets/{assetID}/versions/{versionID}/video/captions', scope: 'assets:read' },
|
|
11
|
+
{ id: 'addVideoCaption', method: 'POST', path: '/api/v1/assets/{assetID}/versions/{versionID}/video/captions', scope: 'assets:write' },
|
|
12
|
+
{ id: 'removeVideoCaption', method: 'DELETE', path: '/api/v1/assets/{assetID}/versions/{versionID}/video/captions/{captionID}', scope: 'assets:write' },
|
|
13
|
+
{ id: 'getVideoAnalytics', method: 'GET', path: '/api/v1/assets/{assetID}/video/analytics', scope: 'assets:read' },
|
|
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' },
|
|
16
|
+
{ id: 'renewVideoPlaybackSession', method: 'POST', path: '/playback/sessions/renew', scope: 'assets:read' },
|
|
17
|
+
{ id: 'recordVideoPlaybackEvents', method: 'POST', path: '/playback/events', scope: 'assets:read' },
|
|
2
18
|
{ id: 'uploadAsset', method: 'POST', path: '/api/v1/assets/upload', scope: 'assets:write' },
|
|
3
19
|
{ id: 'createUploadSession', method: 'POST', path: '/api/v1/assets/upload-sessions', scope: 'assets:write' },
|
|
4
20
|
{ id: 'getUploadSession', method: 'GET', path: '/api/v1/assets/upload-sessions/{sessionID}', scope: 'assets:read' },
|
|
@@ -116,4 +132,94 @@ export const assetContractOperations = [
|
|
|
116
132
|
{ id: 'widgetCompleteUploadSession', method: 'POST', path: '/assets/widget/sessions/current/complete', scope: 'assets:write' },
|
|
117
133
|
{ id: 'widgetCancelUploadSession', method: 'DELETE', path: '/assets/widget/sessions/current', scope: 'assets:write' },
|
|
118
134
|
{ id: 'widgetIngestRemoteUrl', method: 'POST', path: '/assets/widget/remote-url', scope: 'assets:write' },
|
|
135
|
+
{ id: 'listAssetSpaces', method: 'GET', path: '/api/v1/assets/spaces', scope: 'assets:read' },
|
|
136
|
+
{ id: 'listAssetCollaborators', method: 'GET', path: '/api/v1/assets/collaborators', scope: 'assets:admin' },
|
|
137
|
+
{ id: 'inviteAssetCollaborator', method: 'POST', path: '/api/v1/assets/collaborators', scope: 'assets:admin' },
|
|
138
|
+
{ id: 'updateAssetCollaborator', method: 'PUT', path: '/api/v1/assets/collaborators/{collaboratorID}', scope: 'assets:admin' },
|
|
139
|
+
{ id: 'revokeAssetCollaborator', method: 'DELETE', path: '/api/v1/assets/collaborators/{collaboratorID}', scope: 'assets:admin' },
|
|
140
|
+
{ id: 'acceptAssetInvitation', method: 'POST', path: '/api/v1/assets/invitations/{invitationID}/accept', scope: 'assets:read' },
|
|
141
|
+
{ id: 'listAssetMetadataSchemas', method: 'GET', path: '/api/v1/assets/metadata-schemas', scope: 'assets:read' },
|
|
142
|
+
{ id: 'createAssetMetadataSchema', method: 'POST', path: '/api/v1/assets/metadata-schemas', scope: 'assets:admin' },
|
|
143
|
+
{ id: 'updateAssetMetadataSchema', method: 'PUT', path: '/api/v1/assets/metadata-schemas/{schemaID}', scope: 'assets:admin' },
|
|
144
|
+
{ id: 'publishAssetMetadataSchema', method: 'POST', path: '/api/v1/assets/metadata-schemas/{schemaID}/publish', scope: 'assets:admin' },
|
|
145
|
+
{ id: 'getAssetBucketGovernance', method: 'GET', path: '/api/v1/assets/buckets/{bucketID}/governance', scope: 'assets:admin' },
|
|
146
|
+
{ id: 'updateAssetBucketGovernance', method: 'PUT', path: '/api/v1/assets/buckets/{bucketID}/governance', scope: 'assets:admin' },
|
|
147
|
+
{ id: 'getAssetMetadataEditor', method: 'GET', path: '/api/v1/assets/{assetID}/metadata-editor', scope: 'assets:read' },
|
|
148
|
+
{ id: 'listAssetPublications', method: 'GET', path: '/api/v1/assets/publications', scope: 'assets:read' },
|
|
149
|
+
{ id: 'createAssetPublication', method: 'POST', path: '/api/v1/assets/publications', scope: 'assets:write' },
|
|
150
|
+
{ id: 'updateAssetPublication', method: 'PUT', path: '/api/v1/assets/publications/{publicationID}', scope: 'assets:write' },
|
|
151
|
+
{ id: 'transitionAssetPublication', method: 'POST', path: '/api/v1/assets/publications/{publicationID}/{action}', scope: 'assets:publish' },
|
|
152
|
+
{ id: 'resolveAssetPublication', method: 'GET', path: '/api/v1/assets/publications/{publicationID}/resolve', scope: 'assets:read' },
|
|
153
|
+
{ id: 'listAssetPublicationRenditions', method: 'GET', path: '/api/v1/assets/{assetID}/publication-renditions', scope: 'assets:read' },
|
|
154
|
+
{ id: 'previewAssetPublication', method: 'GET', path: '/api/v1/assets/publications/{publicationID}/preview', scope: 'assets:read' },
|
|
155
|
+
{ id: 'migrateAssetBucketGovernance', method: 'POST', path: '/api/v1/assets/buckets/{bucketID}/governance/migrate', scope: 'assets:admin' },
|
|
156
|
+
{ id: 'createAssetPickerCapability', method: 'POST', path: '/api/v1/assets/picker-capabilities', scope: 'assets:read' },
|
|
157
|
+
{ id: 'revokeAssetPickerCapability', method: 'DELETE', path: '/api/v1/assets/picker-capabilities/{capabilityID}', scope: 'assets:read' },
|
|
158
|
+
{ id: 'listAssetModels', method: 'GET', path: '/api/v1/assets/{assetID}/models', scope: 'assets:read' },
|
|
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' },
|
|
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' },
|
|
167
|
+
{ id: 'listAssetGalleries', method: 'GET', path: '/api/v1/assets/galleries', scope: 'assets:read' },
|
|
168
|
+
{ id: 'createAssetGallery', method: 'POST', path: '/api/v1/assets/galleries', scope: 'assets:write' },
|
|
169
|
+
{ id: 'updateAssetGallery', method: 'PUT', path: '/api/v1/assets/galleries/{galleryID}', scope: 'assets:write' },
|
|
170
|
+
{ id: 'transitionAssetGallery', method: 'POST', path: '/api/v1/assets/galleries/{galleryID}/{action}', scope: 'assets:publish' },
|
|
171
|
+
{ id: 'resolveAssetGallery', method: 'GET', path: '/api/v1/assets/galleries/{galleryID}/resolve', scope: 'assets:read' },
|
|
172
|
+
{ id: 'resolveAssetGalleryAR', method: 'POST', path: '/api/v1/assets/galleries/{galleryID}/ar', scope: 'assets:read' },
|
|
173
|
+
{ id: 'searchAssetPicker', method: 'POST', path: '/assets/picker/search', scope: 'assets:read' },
|
|
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' },
|
|
119
225
|
];
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export { MailExportsClient } from './mail-exports.js';
|
|
|
17
17
|
export type { MailExport, MailExportCreateInput } from './mail-exports.js';
|
|
18
18
|
export type { MailDiagnosticFinding, MailTemplateDiagnosticInput, MailTemplateDiagnosticResult } from './mail-diagnostics.js';
|
|
19
19
|
export { ProjectsClient } from './projects.js';
|
|
20
|
+
export { WorkloadSecurityClient } from './workload-security.js';
|
|
21
|
+
export type * from './workload-security.js';
|
|
20
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';
|
|
21
23
|
export type { MailBounce, MailBounceListOptions, MailBounceListResult, MailBounceType, MailSuppression, MailSuppressionCreateInput, MailSuppressionListOptions, MailSuppressionListResult, MailSuppressionReason, MailSuppressionSource, } from './mail-delivery-types.js';
|
|
22
24
|
export type { MailOtpChallenge, MailOtpChallengeListOptions, MailOtpChallengeListResult, MailOtpSendInput, MailOtpSendResponse, MailOtpStatus, MailOtpVerifyInput, MailOtpVerifyResponse, } from './mail-otp-types.js';
|
|
@@ -25,3 +27,17 @@ export type { MailEvent, MailEventListOptions, MailEventListResult, MailEventTyp
|
|
|
25
27
|
export type { MailMessageStream, MailMessageStreamCreateInput, MailMessageStreamListResult } from './mail-streams.js';
|
|
26
28
|
export type { MailDomainReputation, MailLimits, MailManualReviewStatus, MailReputation, MailReputationEvent, MailReputationEventListOptions, MailReputationEventListResult, MailReputationEventSeverity, MailReputationStatus, MailReputationTier, MailReputationWorkspace, } from './mail-reputation-types.js';
|
|
27
29
|
export type { MailAnalytics, MailAnalyticsInput, MailAttachmentInput, MailBatch, MailBatchItem, MailBatchSendInput, MailBatchTemplateInput, MailInboundDomain, MailInboundMessage, MailScheduledCreateInput, MailScheduledMessage, } from './mail-advanced-types.js';
|
|
30
|
+
export { AssetVideoClient } from './assets-video.js';
|
|
31
|
+
export type * from './assets-video-types.js';
|
|
32
|
+
export * from './mail-tracking.js';
|
|
33
|
+
export type { MailCampaignContent, MailCampaignInput } from './mail-campaigns.js';
|
|
34
|
+
export { AssetDAMClient } from './assets-dam.js';
|
|
35
|
+
export type * from './assets-dam-types.js';
|
|
36
|
+
export type * from './mail-subscribers.js';
|
|
37
|
+
export type { MailMode, MailSimulationOptions } from './mail-simulation.js';
|
|
38
|
+
export * from './mail-brands.js';
|
|
39
|
+
export * from './mail-billing.js';
|
|
40
|
+
export * from './mail-migration.js';
|
|
41
|
+
export * from './mail-marketing.js';
|
|
42
|
+
export { AICreditsClient } from './ai-credits.js';
|
|
43
|
+
export type * from './ai-credits.js';
|
package/dist/index.js
CHANGED
|
@@ -8,3 +8,12 @@ export { assetContractOperations } from './generated/assets-contract.js';
|
|
|
8
8
|
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
9
|
export { MailExportsClient } from './mail-exports.js';
|
|
10
10
|
export { ProjectsClient } from './projects.js';
|
|
11
|
+
export { WorkloadSecurityClient } from './workload-security.js';
|
|
12
|
+
export { AssetVideoClient } from './assets-video.js';
|
|
13
|
+
export * from './mail-tracking.js';
|
|
14
|
+
export { AssetDAMClient } from './assets-dam.js';
|
|
15
|
+
export * from './mail-brands.js';
|
|
16
|
+
export * from './mail-billing.js';
|
|
17
|
+
export * from './mail-migration.js';
|
|
18
|
+
export * from './mail-marketing.js';
|
|
19
|
+
export { AICreditsClient } from './ai-credits.js';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { MailMode, MailSimulationOptions } from './mail-simulation.js';
|
|
2
|
+
import type { MailTrackingOptions } from './mail-tracking.js';
|
|
1
3
|
import type { JsonValue, MailAddress, MailAddressInput, MailRecipient, MailSendInput, MailSendResponse } from './types.js';
|
|
2
4
|
import type { MailSendTemplateInput } from './mail-template-types.js';
|
|
3
5
|
export interface MailAttachmentInput {
|
|
@@ -9,6 +11,8 @@ export interface MailAttachmentInput {
|
|
|
9
11
|
contentId?: string;
|
|
10
12
|
}
|
|
11
13
|
export interface MailScheduledCreateInput {
|
|
14
|
+
simulation?: MailSimulationOptions;
|
|
15
|
+
tracking?: MailTrackingOptions;
|
|
12
16
|
sendAt: string;
|
|
13
17
|
message?: MailSendInput;
|
|
14
18
|
template?: string;
|
|
@@ -23,6 +27,7 @@ export interface MailScheduledCreateInput {
|
|
|
23
27
|
stream?: string;
|
|
24
28
|
}
|
|
25
29
|
export interface MailScheduledMessage {
|
|
30
|
+
mode?: MailMode;
|
|
26
31
|
id: string;
|
|
27
32
|
status: 'scheduled' | 'queued' | 'dispatched' | 'canceled' | 'failed';
|
|
28
33
|
sendAt: string;
|
|
@@ -36,6 +41,8 @@ export interface MailBatchSendInput {
|
|
|
36
41
|
messages: MailSendInput[];
|
|
37
42
|
}
|
|
38
43
|
export interface MailBatchTemplateInput {
|
|
44
|
+
simulation?: MailSimulationOptions;
|
|
45
|
+
tracking?: MailTrackingOptions;
|
|
39
46
|
template: string;
|
|
40
47
|
versionId?: string;
|
|
41
48
|
from: string | MailAddress;
|
|
@@ -49,6 +56,7 @@ export interface MailBatchTemplateInput {
|
|
|
49
56
|
stream?: string;
|
|
50
57
|
}
|
|
51
58
|
export interface MailBatch {
|
|
59
|
+
mode?: MailMode;
|
|
52
60
|
id: string;
|
|
53
61
|
status: 'queued' | 'processing' | 'completed' | 'failed';
|
|
54
62
|
messageCount: number;
|
|
@@ -58,6 +66,7 @@ export interface MailBatch {
|
|
|
58
66
|
suppressedCount: number;
|
|
59
67
|
}
|
|
60
68
|
export interface MailBatchItem {
|
|
69
|
+
mode?: MailMode;
|
|
61
70
|
id: string;
|
|
62
71
|
batchId: string;
|
|
63
72
|
messageId?: string | null;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { StackShift } from './client.js';
|
|
2
|
+
import type { MailMode } from './mail-simulation.js';
|
|
3
|
+
export interface MailBillingSummary {
|
|
4
|
+
reconciliationRequired: boolean;
|
|
5
|
+
active: boolean;
|
|
6
|
+
mode: MailMode;
|
|
7
|
+
currency: 'NGN';
|
|
8
|
+
periodStart: string;
|
|
9
|
+
periodEnd: string;
|
|
10
|
+
rateVersion: number;
|
|
11
|
+
recipientPriceKobo: number;
|
|
12
|
+
included: number;
|
|
13
|
+
used: number;
|
|
14
|
+
reserved: number;
|
|
15
|
+
remaining: number;
|
|
16
|
+
prepaidBalanceKobo: number;
|
|
17
|
+
spentKobo: number;
|
|
18
|
+
reservedKobo: number;
|
|
19
|
+
settings: {
|
|
20
|
+
prepaidEnabled: boolean;
|
|
21
|
+
capKobo: number;
|
|
22
|
+
revision: number;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export interface MailCampaignEstimate extends MailBillingSummary {
|
|
26
|
+
recipientCount: number;
|
|
27
|
+
requiredCreditKobo: number;
|
|
28
|
+
blockingReasons: string[];
|
|
29
|
+
}
|
|
30
|
+
export declare class MailBillingClient {
|
|
31
|
+
private readonly client;
|
|
32
|
+
constructor(client: StackShift);
|
|
33
|
+
summary(): Promise<MailBillingSummary>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { StackShift } from './client.js';
|
|
2
|
+
import type { MailMode } from './mail-simulation.js';
|
|
3
|
+
export interface MailBrandFields {
|
|
4
|
+
name: string;
|
|
5
|
+
logoUrl?: string;
|
|
6
|
+
sendingDomainId?: string | null;
|
|
7
|
+
defaultFrom?: string;
|
|
8
|
+
replyTo?: string;
|
|
9
|
+
postalAddress?: string;
|
|
10
|
+
website?: string;
|
|
11
|
+
supportEmail?: string;
|
|
12
|
+
editableFields?: string[];
|
|
13
|
+
}
|
|
14
|
+
export interface MailBrand extends MailBrandFields {
|
|
15
|
+
id: string;
|
|
16
|
+
workspaceId: string;
|
|
17
|
+
mode: MailMode;
|
|
18
|
+
status: 'active' | 'archived';
|
|
19
|
+
revision: number;
|
|
20
|
+
createdAt: string;
|
|
21
|
+
updatedAt: string;
|
|
22
|
+
}
|
|
23
|
+
export declare class MailBrandsClient {
|
|
24
|
+
private readonly client;
|
|
25
|
+
constructor(client: StackShift);
|
|
26
|
+
create(input: MailBrandFields): Promise<MailBrand>;
|
|
27
|
+
list(): Promise<{
|
|
28
|
+
data: MailBrand[];
|
|
29
|
+
}>;
|
|
30
|
+
get(id: string): Promise<MailBrand>;
|
|
31
|
+
update(id: string, input: MailBrandFields & {
|
|
32
|
+
revision: number;
|
|
33
|
+
}): Promise<MailBrand>;
|
|
34
|
+
archive(id: string): Promise<MailBrand>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export class MailBrandsClient {
|
|
2
|
+
client;
|
|
3
|
+
constructor(client) {
|
|
4
|
+
this.client = client;
|
|
5
|
+
}
|
|
6
|
+
create(input) {
|
|
7
|
+
return this.client.mailRequest('/mail/brands', { method: 'POST', body: input });
|
|
8
|
+
}
|
|
9
|
+
list() { return this.client.mailRequest('/mail/brands'); }
|
|
10
|
+
get(id) { return this.client.mailRequest(`/mail/brands/${encodeURIComponent(id)}`); }
|
|
11
|
+
update(id, input) {
|
|
12
|
+
return this.client.mailRequest(`/mail/brands/${encodeURIComponent(id)}`, { method: 'PUT', body: input });
|
|
13
|
+
}
|
|
14
|
+
archive(id) {
|
|
15
|
+
return this.client.mailRequest(`/mail/brands/${encodeURIComponent(id)}/archive`, { method: 'POST' });
|
|
16
|
+
}
|
|
17
|
+
}
|
package/dist/mail-campaigns.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
import type { MailCampaignEstimate } from './mail-billing.js';
|
|
2
|
+
import type { MailMode, MailSimulationOptions } from './mail-simulation.js';
|
|
3
|
+
import type { MailImportMode, MailImportResult } from './mail-subscribers.js';
|
|
4
|
+
import type { MailTrackingOptions, MailEngagementReport } from './mail-tracking.js';
|
|
5
|
+
import type { MailTemplatePreview } from './mail-template-types.js';
|
|
6
|
+
import type { MailTemplateDiagnosticResult } from './mail-diagnostics.js';
|
|
1
7
|
import type { StackShift } from './client.js';
|
|
2
8
|
export interface MailAudience {
|
|
9
|
+
brandId: string;
|
|
10
|
+
mode?: MailMode;
|
|
11
|
+
editableFields?: string[];
|
|
3
12
|
id: string;
|
|
4
13
|
workspaceId: string;
|
|
5
14
|
name: string;
|
|
@@ -10,14 +19,18 @@ export interface MailAudience {
|
|
|
10
19
|
updatedAt: string;
|
|
11
20
|
}
|
|
12
21
|
export interface MailAudienceMember {
|
|
22
|
+
brandId: string;
|
|
23
|
+
confirmedIp?: string;
|
|
24
|
+
confirmedAt?: string;
|
|
13
25
|
id: string;
|
|
14
26
|
audienceId: string;
|
|
15
27
|
email: string;
|
|
16
28
|
name?: string;
|
|
17
|
-
status: 'subscribed' | 'unsubscribed' | 'complained' | 'hard_bounced';
|
|
29
|
+
status: 'pending_confirmation' | 'subscribed' | 'unsubscribed' | 'complained' | 'hard_bounced';
|
|
18
30
|
consentSource: string;
|
|
19
31
|
consentAt: string;
|
|
20
32
|
consentIp?: string;
|
|
33
|
+
attributes?: Record<string, string>;
|
|
21
34
|
}
|
|
22
35
|
export interface MailAudienceMemberImport {
|
|
23
36
|
email: string;
|
|
@@ -25,8 +38,43 @@ export interface MailAudienceMemberImport {
|
|
|
25
38
|
consentSource: string;
|
|
26
39
|
consentAt: string;
|
|
27
40
|
consentIp?: string;
|
|
41
|
+
attributes?: Record<string, string>;
|
|
42
|
+
}
|
|
43
|
+
export interface MailCampaignContent {
|
|
44
|
+
subject: string;
|
|
45
|
+
previewText?: string;
|
|
46
|
+
html: string;
|
|
47
|
+
text: string;
|
|
48
|
+
editorMode: 'code' | 'visual';
|
|
49
|
+
editorState?: Record<string, unknown> | null;
|
|
50
|
+
}
|
|
51
|
+
export interface MailCampaignInput {
|
|
52
|
+
simulation?: MailSimulationOptions;
|
|
53
|
+
name: string;
|
|
54
|
+
audienceId: string;
|
|
55
|
+
segmentId?: string;
|
|
56
|
+
from?: string;
|
|
57
|
+
replyTo?: string;
|
|
58
|
+
template?: string;
|
|
59
|
+
versionId?: string;
|
|
60
|
+
content?: MailCampaignContent;
|
|
61
|
+
variantBVersionId?: string;
|
|
62
|
+
variantBContent?: MailCampaignContent | null;
|
|
63
|
+
variantBPercent?: number;
|
|
64
|
+
tracking?: MailTrackingOptions;
|
|
28
65
|
}
|
|
29
66
|
export interface MailCampaign {
|
|
67
|
+
approvedMaxKobo?: number;
|
|
68
|
+
billingBlockReason?: string;
|
|
69
|
+
simulation?: MailSimulationOptions;
|
|
70
|
+
brandId: string;
|
|
71
|
+
mode?: MailMode;
|
|
72
|
+
content?: MailCampaignContent;
|
|
73
|
+
variantBContent?: MailCampaignContent | null;
|
|
74
|
+
variantBPercent?: number;
|
|
75
|
+
replyTo?: string;
|
|
76
|
+
revision: number;
|
|
77
|
+
tracking?: MailTrackingOptions;
|
|
30
78
|
id: string;
|
|
31
79
|
audienceId: string;
|
|
32
80
|
batchId?: string;
|
|
@@ -34,7 +82,7 @@ export interface MailCampaign {
|
|
|
34
82
|
template: string;
|
|
35
83
|
versionId?: string;
|
|
36
84
|
from: string;
|
|
37
|
-
status: 'draft' | 'processing' | 'queued' | 'completed' | 'failed';
|
|
85
|
+
status: 'draft' | 'scheduled' | 'processing' | 'queued' | 'completed' | 'failed' | 'blocked';
|
|
38
86
|
createdAt: string;
|
|
39
87
|
updatedAt: string;
|
|
40
88
|
queuedAt?: string;
|
|
@@ -43,6 +91,7 @@ export declare class MailAudiencesClient {
|
|
|
43
91
|
private readonly client;
|
|
44
92
|
constructor(client: StackShift);
|
|
45
93
|
create(input: {
|
|
94
|
+
brandId: string;
|
|
46
95
|
name: string;
|
|
47
96
|
description?: string;
|
|
48
97
|
}): Promise<MailAudience>;
|
|
@@ -57,20 +106,33 @@ export declare class MailAudiencesClient {
|
|
|
57
106
|
imported: number;
|
|
58
107
|
skipped: number;
|
|
59
108
|
}>;
|
|
109
|
+
previewImport(id: string, members: MailAudienceMemberImport[], mode?: MailImportMode): Promise<MailImportResult>;
|
|
110
|
+
importDetailed(id: string, members: MailAudienceMemberImport[], mode?: MailImportMode): Promise<MailImportResult>;
|
|
111
|
+
setEditableFields(id: string, editableFields: string[]): Promise<{
|
|
112
|
+
editableFields: string[];
|
|
113
|
+
}>;
|
|
60
114
|
}
|
|
61
115
|
export declare class MailCampaignsClient {
|
|
62
116
|
private readonly client;
|
|
63
117
|
constructor(client: StackShift);
|
|
64
|
-
create(input:
|
|
65
|
-
name: string;
|
|
66
|
-
audienceId: string;
|
|
67
|
-
template: string;
|
|
68
|
-
versionId?: string;
|
|
69
|
-
from: string;
|
|
70
|
-
}): Promise<MailCampaign>;
|
|
118
|
+
create(input: MailCampaignInput): Promise<MailCampaign>;
|
|
71
119
|
list(): Promise<{
|
|
72
120
|
data: MailCampaign[];
|
|
73
121
|
}>;
|
|
74
122
|
get(id: string): Promise<MailCampaign>;
|
|
75
|
-
|
|
123
|
+
update(id: string, input: MailCampaignInput & {
|
|
124
|
+
revision: number;
|
|
125
|
+
}): Promise<MailCampaign>;
|
|
126
|
+
preview(id: string, data?: Record<string, unknown>, variant?: string): Promise<MailTemplatePreview & {
|
|
127
|
+
diagnostics: MailTemplateDiagnosticResult;
|
|
128
|
+
}>;
|
|
129
|
+
test(id: string, to: string, data?: Record<string, unknown>, variant?: string, simulation?: MailSimulationOptions): Promise<{
|
|
130
|
+
id: string;
|
|
131
|
+
status: string;
|
|
132
|
+
mode: "live" | "test";
|
|
133
|
+
}>;
|
|
134
|
+
schedule(id: string, sendAt: string, revision?: number, approvedMaxKobo?: number): Promise<MailCampaign>;
|
|
135
|
+
engagement(id: string): Promise<MailEngagementReport>;
|
|
136
|
+
estimate(id: string): Promise<MailCampaignEstimate>;
|
|
137
|
+
send(id: string, revision?: number, approvedMaxKobo?: number): Promise<MailCampaign>;
|
|
76
138
|
}
|
package/dist/mail-campaigns.js
CHANGED
|
@@ -21,6 +21,15 @@ export class MailAudiencesClient {
|
|
|
21
21
|
body: { members },
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
+
previewImport(id, members, mode = 'recorded_consent') {
|
|
25
|
+
return this.client.mailRequest(`/mail/audiences/${encodeURIComponent(id)}/imports/preview`, { method: 'POST', body: { members, mode } });
|
|
26
|
+
}
|
|
27
|
+
importDetailed(id, members, mode = 'recorded_consent') {
|
|
28
|
+
return this.client.mailRequest(`/mail/audiences/${encodeURIComponent(id)}/imports`, { method: 'POST', body: { members, mode } });
|
|
29
|
+
}
|
|
30
|
+
setEditableFields(id, editableFields) {
|
|
31
|
+
return this.client.mailRequest(`/mail/audiences/${encodeURIComponent(id)}/preferences`, { method: 'PUT', body: { editableFields } });
|
|
32
|
+
}
|
|
24
33
|
}
|
|
25
34
|
export class MailCampaignsClient {
|
|
26
35
|
client;
|
|
@@ -36,7 +45,21 @@ export class MailCampaignsClient {
|
|
|
36
45
|
get(id) {
|
|
37
46
|
return this.client.mailRequest(`/mail/campaigns/${encodeURIComponent(id)}`);
|
|
38
47
|
}
|
|
39
|
-
|
|
40
|
-
return this.client.mailRequest(`/mail/campaigns/${encodeURIComponent(id)}
|
|
48
|
+
update(id, input) {
|
|
49
|
+
return this.client.mailRequest(`/mail/campaigns/${encodeURIComponent(id)}`, { method: 'PUT', body: input });
|
|
50
|
+
}
|
|
51
|
+
preview(id, data = {}, variant = 'a') {
|
|
52
|
+
return this.client.mailRequest(`/mail/campaigns/${encodeURIComponent(id)}/preview`, { method: 'POST', body: { data, variant } });
|
|
53
|
+
}
|
|
54
|
+
test(id, to, data = {}, variant = 'a', simulation) {
|
|
55
|
+
return this.client.mailRequest(`/mail/campaigns/${encodeURIComponent(id)}/test`, { method: 'POST', body: { to, data, variant, simulation } });
|
|
56
|
+
}
|
|
57
|
+
schedule(id, sendAt, revision, approvedMaxKobo) {
|
|
58
|
+
return this.client.mailRequest(`/mail/campaigns/${encodeURIComponent(id)}/schedule`, { method: 'POST', body: { sendAt, revision, approvedMaxKobo } });
|
|
59
|
+
}
|
|
60
|
+
engagement(id) { return this.client.mailRequest(`/mail/campaigns/${encodeURIComponent(id)}/engagement`); }
|
|
61
|
+
estimate(id) { return this.client.mailRequest(`/mail/campaigns/${encodeURIComponent(id)}/estimate`); }
|
|
62
|
+
send(id, revision, approvedMaxKobo) {
|
|
63
|
+
return this.client.mailRequest(`/mail/campaigns/${encodeURIComponent(id)}/send`, { method: 'POST', body: { revision, approvedMaxKobo } });
|
|
41
64
|
}
|
|
42
65
|
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { MailBrand } from './mail-brands.js';
|
|
2
|
+
import type { StackShift } from './client.js';
|
|
3
|
+
import type { MailMode, MailSimulationOptions } from './mail-simulation.js';
|
|
4
|
+
export interface MailAutomationInput {
|
|
5
|
+
audienceId: string;
|
|
6
|
+
name: string;
|
|
7
|
+
template: string;
|
|
8
|
+
versionId?: string;
|
|
9
|
+
from: string;
|
|
10
|
+
delaySeconds?: number;
|
|
11
|
+
simulation?: MailSimulationOptions;
|
|
12
|
+
}
|
|
13
|
+
export interface MailAutomation extends MailAutomationInput {
|
|
14
|
+
triggerType: string;
|
|
15
|
+
runCount: number;
|
|
16
|
+
id: string;
|
|
17
|
+
workspaceId: string;
|
|
18
|
+
brandId: string;
|
|
19
|
+
mode: MailMode;
|
|
20
|
+
createdAt: string;
|
|
21
|
+
updatedAt: string;
|
|
22
|
+
status?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare class MailAutomationsClient {
|
|
25
|
+
private readonly client;
|
|
26
|
+
constructor(client: StackShift);
|
|
27
|
+
create(input: MailAutomationInput): Promise<MailAutomation>;
|
|
28
|
+
list(): Promise<{
|
|
29
|
+
data: MailAutomation[];
|
|
30
|
+
}>;
|
|
31
|
+
}
|
|
32
|
+
export interface MailSignupFormInput {
|
|
33
|
+
audienceId: string;
|
|
34
|
+
name: string;
|
|
35
|
+
heading?: string;
|
|
36
|
+
description?: string;
|
|
37
|
+
buttonLabel?: string;
|
|
38
|
+
successMessage?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface MailSignupForm extends MailSignupFormInput {
|
|
41
|
+
publicToken: string;
|
|
42
|
+
brand?: MailBrand;
|
|
43
|
+
id: string;
|
|
44
|
+
workspaceId: string;
|
|
45
|
+
brandId: string;
|
|
46
|
+
mode: MailMode;
|
|
47
|
+
createdAt: string;
|
|
48
|
+
updatedAt: string;
|
|
49
|
+
status?: string;
|
|
50
|
+
}
|
|
51
|
+
export declare class MailFormsClient {
|
|
52
|
+
private readonly client;
|
|
53
|
+
constructor(client: StackShift);
|
|
54
|
+
create(input: MailSignupFormInput): Promise<MailSignupForm>;
|
|
55
|
+
list(): Promise<{
|
|
56
|
+
data: MailSignupForm[];
|
|
57
|
+
}>;
|
|
58
|
+
}
|
|
59
|
+
export interface MailSegmentInput {
|
|
60
|
+
audienceId: string;
|
|
61
|
+
name: string;
|
|
62
|
+
description?: string;
|
|
63
|
+
field: string;
|
|
64
|
+
operator: string;
|
|
65
|
+
value?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface MailSegment extends MailSegmentInput {
|
|
68
|
+
memberCount: number;
|
|
69
|
+
id: string;
|
|
70
|
+
workspaceId: string;
|
|
71
|
+
brandId: string;
|
|
72
|
+
mode: MailMode;
|
|
73
|
+
createdAt: string;
|
|
74
|
+
updatedAt: string;
|
|
75
|
+
status?: string;
|
|
76
|
+
}
|
|
77
|
+
export declare class MailSegmentsClient {
|
|
78
|
+
private readonly client;
|
|
79
|
+
constructor(client: StackShift);
|
|
80
|
+
create(input: MailSegmentInput): Promise<MailSegment>;
|
|
81
|
+
list(): Promise<{
|
|
82
|
+
data: MailSegment[];
|
|
83
|
+
}>;
|
|
84
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export class MailAutomationsClient {
|
|
2
|
+
client;
|
|
3
|
+
constructor(client) {
|
|
4
|
+
this.client = client;
|
|
5
|
+
}
|
|
6
|
+
create(input) { return this.client.mailRequest('/mail/automations', { method: 'POST', body: input }); }
|
|
7
|
+
list() { return this.client.mailRequest('/mail/automations'); }
|
|
8
|
+
}
|
|
9
|
+
export class MailFormsClient {
|
|
10
|
+
client;
|
|
11
|
+
constructor(client) {
|
|
12
|
+
this.client = client;
|
|
13
|
+
}
|
|
14
|
+
create(input) { return this.client.mailRequest('/mail/forms', { method: 'POST', body: input }); }
|
|
15
|
+
list() { return this.client.mailRequest('/mail/forms'); }
|
|
16
|
+
}
|
|
17
|
+
export class MailSegmentsClient {
|
|
18
|
+
client;
|
|
19
|
+
constructor(client) {
|
|
20
|
+
this.client = client;
|
|
21
|
+
}
|
|
22
|
+
create(input) { return this.client.mailRequest('/mail/segments', { method: 'POST', body: input }); }
|
|
23
|
+
list() { return this.client.mailRequest('/mail/segments'); }
|
|
24
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { StackShift } from './client.js';
|
|
2
|
+
export interface MailMigrationChecklist {
|
|
3
|
+
domain: string;
|
|
4
|
+
provider: string;
|
|
5
|
+
completed: string[];
|
|
6
|
+
revision: number;
|
|
7
|
+
updatedAt?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class MailMigrationClient {
|
|
10
|
+
private readonly client;
|
|
11
|
+
constructor(client: StackShift);
|
|
12
|
+
audit(domain: string, selectors?: string[]): Promise<Record<string, unknown>>;
|
|
13
|
+
plan(domain: string, provider: string, selectors?: string[]): Promise<Record<string, unknown>>;
|
|
14
|
+
checklist(domain: string, provider: string): Promise<MailMigrationChecklist>;
|
|
15
|
+
saveChecklist(input: MailMigrationChecklist): Promise<MailMigrationChecklist>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export class MailMigrationClient {
|
|
2
|
+
client;
|
|
3
|
+
constructor(client) {
|
|
4
|
+
this.client = client;
|
|
5
|
+
}
|
|
6
|
+
audit(domain, selectors = []) { return this.client.request(`/mail/audit?${new URLSearchParams({ domain, selectors: selectors.join(',') })}`); }
|
|
7
|
+
plan(domain, provider, selectors = []) { return this.client.request(`/mail/migration-plan?${new URLSearchParams({ domain, provider, selectors: selectors.join(',') })}`); }
|
|
8
|
+
checklist(domain, provider) { return this.client.mailRequest(`/mail/migration/checklist?${new URLSearchParams({ domain, provider })}`); }
|
|
9
|
+
saveChecklist(input) { return this.client.mailRequest('/mail/migration/checklist', { method: 'PUT', body: { domain: input.domain, provider: input.provider, completed: input.completed, revision: input.revision } }); }
|
|
10
|
+
}
|