samva 0.10.0 → 0.12.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 +59 -9
- package/dist/client/sdk.gen.d.ts +1126 -219
- package/dist/client/types.gen.d.ts +11655 -6311
- package/dist/{client-mI4S99Ts.js → client-Cj1bqIEe.js} +5169 -1639
- package/dist/{client-attribution-Bl4nTEsE.js → client-attribution-BTWYSXxo.js} +2 -2
- package/dist/effect/analytics.d.ts +18 -18
- package/dist/effect/analytics.js +1 -1
- package/dist/effect/api-keys.d.ts +99 -43
- package/dist/effect/api-keys.js +2 -4
- package/dist/effect/attachments.d.ts +5 -6
- package/dist/effect/attachments.js +1 -1
- package/dist/effect/brands.d.ts +4 -4
- package/dist/effect/brands.js +2 -2
- package/dist/effect/campaigns.d.ts +30 -60
- package/dist/effect/campaigns.js +1 -1
- package/dist/effect/client.js +1 -1
- package/dist/effect/contact-groups.d.ts +29 -46
- package/dist/effect/contact-groups.js +1 -1
- package/dist/effect/contacts.d.ts +324 -726
- package/dist/effect/contacts.js +10 -2
- package/dist/effect/conversations.d.ts +575 -1130
- package/dist/effect/conversations.js +14 -2
- package/dist/effect/custom-fields.d.ts +3 -53
- package/dist/effect/custom-fields.js +1 -1
- package/dist/effect/email.d.ts +349 -298
- package/dist/effect/email.js +9 -3
- package/dist/effect/extension-installations.d.ts +218 -0
- package/dist/effect/extension-installations.js +25 -0
- package/dist/effect/extensions.d.ts +192 -0
- package/dist/effect/extensions.js +19 -0
- package/dist/effect/feedback.d.ts +12 -0
- package/dist/effect/feedback.js +13 -0
- package/dist/effect/generated.d.ts +33011 -15519
- package/dist/effect/index.d.ts +6 -1
- package/dist/effect/index.js +7 -2
- package/dist/effect/internal/client.d.ts +3 -0
- package/dist/effect/internal/mailbox-events.d.ts +11 -0
- package/dist/effect/internal/operation.d.ts +20 -374
- package/dist/effect/mailboxes.d.ts +1676 -0
- package/dist/effect/mailboxes.js +3 -0
- package/dist/effect/media.d.ts +5 -5
- package/dist/effect/media.js +1 -1
- package/dist/effect/messages.d.ts +171 -938
- package/dist/effect/messages.js +6 -2
- package/dist/effect/namespaces.d.ts +82 -0
- package/dist/effect/namespaces.js +19 -0
- package/dist/effect/operations.d.ts +68 -12
- package/dist/effect/operations.js +1 -1
- package/dist/effect/organizations.d.ts +5 -4
- package/dist/effect/organizations.js +1 -1
- package/dist/effect/pagination.d.ts +16 -21
- package/dist/effect/scheduled-messages.d.ts +13 -23
- package/dist/effect/scheduled-messages.js +1 -1
- package/dist/effect/templates.d.ts +204 -281
- package/dist/effect/templates.js +2 -2
- package/dist/effect/unsubscribe-groups.d.ts +21 -75
- package/dist/effect/unsubscribe-groups.js +1 -1
- package/dist/effect/webhooks.d.ts +117 -39
- package/dist/effect/webhooks.js +2 -2
- package/dist/index.js +3 -2
- package/dist/mailbox-events-CsbF35vH.js +629 -0
- package/dist/mailbox-events.d.ts +178 -0
- package/dist/mailboxes-BtcktcNB.js +147 -0
- package/dist/{operation-DQWJO4jY.js → operation-BEghYyLu.js} +411 -67
- package/dist/promises/errors.gen.d.ts +5 -0
- package/dist/promises/index.d.ts +23 -1
- package/dist/promises/index.js +3 -2
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/{promises-C7D4oaHn.js → promises-BzrwhHEW.js} +3273 -547
- package/dist/service-map.d.ts +468 -36
- package/package.json +22 -2
package/dist/client/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Client, type ClientMeta, type Options as Options2, type RequestResult, type TDataShape } from "./client";
|
|
2
|
-
import type { ActorTracking, AnalyticsExportDataErrors, AnalyticsExportDataResponses, AnalyticsGetChannelStatsErrors, AnalyticsGetChannelStatsResponses, AnalyticsGetDeliveryMetricsErrors, AnalyticsGetDeliveryMetricsResponses, AnalyticsGetHourlyDistributionErrors, AnalyticsGetHourlyDistributionResponses, AnalyticsGetStatsErrors, AnalyticsGetStatsResponses, AnalyticsGetTopContactsErrors, AnalyticsGetTopContactsResponses, ApiKeyAccess, ApiKeyId, ApiKeysCreateErrors, ApiKeysCreateResponses, ApiKeysGetActivityErrors, ApiKeysGetActivityResponses, ApiKeysGetErrors, ApiKeysGetResponses, ApiKeysGetStatsErrors, ApiKeysGetStatsResponses, ApiKeysListErrors, ApiKeysListResponses, ApiKeysRemoveErrors, ApiKeysRemoveResponses, ApiKeysRevokeErrors, ApiKeysRevokeResponses, ApiKeysRotateErrors, ApiKeysRotateResponses, ApiKeysUpdateErrors, ApiKeysUpdateResponses, AttachmentId, AttachmentsDownloadUrlErrors, AttachmentsDownloadUrlResponses, AttachmentsGetByIdErrors, AttachmentsGetByIdResponses, AttachmentsListErrors, AttachmentsListResponses, AttachmentsRemoveErrors, AttachmentsRemoveResponses, BlockedEmailId, BrandAssets, BrandFooter, BrandsCreateErrors, BrandsCreateResponses, BrandsGetErrors, BrandsGetResponses, BrandsListErrors, BrandsListResponses, BrandsRemoveErrors, BrandsRemoveResponses, BrandsSetDefaultErrors, BrandsSetDefaultResponses, BrandsUpdateErrors, BrandsUpdateResponses, CampaignAudience, CampaignContentInput, CampaignId, CampaignPolicy, CampaignRunId, CampaignsArchiveErrors, CampaignsArchiveResponses, CampaignsCancelRunErrors, CampaignsCancelRunResponses, CampaignsCreateErrors, CampaignsCreateResponses, CampaignsGetErrors, CampaignsGetResponses, CampaignsGetRunErrors, CampaignsGetRunResponses, CampaignsListErrors, CampaignsListRecipientsErrors, CampaignsListRecipientsResponses, CampaignsListResponses, CampaignsListRunsErrors, CampaignsListRunsResponses, CampaignsPauseRunErrors, CampaignsPauseRunResponses, CampaignsResumeRunErrors, CampaignsResumeRunResponses, CampaignsScheduleRunErrors, CampaignsScheduleRunResponses, CampaignsUpdateErrors, CampaignsUpdateResponses, ContactAccessConfig, ContactGroupId, ContactGroupsAddMembersErrors, ContactGroupsAddMembersResponses, ContactGroupsCreateErrors, ContactGroupsCreateResponses, ContactGroupsEvaluateDynamicErrors, ContactGroupsEvaluateDynamicResponses, ContactGroupsGetByIdErrors, ContactGroupsGetByIdResponses, ContactGroupsGetMembersErrors, ContactGroupsGetMembersResponses, ContactGroupsListErrors, ContactGroupsListResponses, ContactGroupsPreviewErrors, ContactGroupsPreviewResponses, ContactGroupsRemoveErrors, ContactGroupsRemoveMembersErrors, ContactGroupsRemoveMembersResponses, ContactGroupsRemoveResponses, ContactGroupsUpdateErrors, ContactGroupsUpdateResponses, ContactId, ContactIdentity, ContactPreferences, ContactsBulkDeleteErrors, ContactsBulkDeleteResponses, ContactsBulkImportErrors, ContactsBulkImportResponses, ContactsBulkUpdateStatusErrors, ContactsBulkUpdateStatusResponses, ContactsBulkUpdateTagsErrors, ContactsBulkUpdateTagsResponses, ContactsCreateErrors, ContactsCreateResponses, ContactsExportErrors, ContactsExportResponses, ContactsFindErrors, ContactsFindOrCreateErrors, ContactsFindOrCreateResponses, ContactsFindResponses, ContactsGetActivityTimelineErrors, ContactsGetActivityTimelineResponses, ContactsGetEngagementErrors, ContactsGetEngagementResponses, ContactsGetErrors, ContactsGetGroupMembershipsErrors, ContactsGetGroupMembershipsResponses, ContactsGetResponses, ContactsListErrors, ContactsListResponses, ContactsRemoveErrors, ContactsRemoveResponses, ContactsUpdateErrors, ContactsUpdateResponses, ConversationContext, ConversationId, ConversationMetadata, ConversationMetrics, ConversationsAddContactsErrors, ConversationsAddContactsResponses, ConversationsCreateErrors, ConversationsCreateResponses, ConversationsGetByIdErrors, ConversationsGetByIdResponses, ConversationsListErrors, ConversationsListMessagesErrors, ConversationsListMessagesResponses, ConversationsListResponses, ConversationsRemoveContactsErrors, ConversationsRemoveContactsResponses, ConversationsUpdateErrors, ConversationsUpdateResponses, CustomFieldDefinitionId, CustomFieldsCreateErrors, CustomFieldsCreateResponses, CustomFieldsListErrors, CustomFieldsListResponses, CustomFieldsRemoveErrors, CustomFieldsRemoveResponses, CustomFieldsUpdateErrors, CustomFieldsUpdateResponses, DispatchSendMessagePayload, EmailAddBlockErrors, EmailAddBlockResponses, EmailAddDomainErrors, EmailAddDomainResponses, EmailAddSenderErrors, EmailAddSenderResponses, EmailAdvanceDomainVerificationErrors, EmailAdvanceDomainVerificationResponses, EmailBccRecipients, EmailBuildCustomTrackingDomainConnectApplyUrlErrors, EmailBuildCustomTrackingDomainConnectApplyUrlResponses, EmailBuildDomainConnectApplyUrlErrors, EmailBuildDomainConnectApplyUrlResponses, EmailCancelDomainWarmingBatchErrors, EmailCancelDomainWarmingBatchResponses, EmailCcRecipients, EmailCheckBlockedErrors, EmailCheckBlockedResponses, EmailCheckSenderVerificationErrors, EmailCheckSenderVerificationResponses, EmailClearDomainDefaultSenderErrors, EmailClearDomainDefaultSenderResponses, EmailCompleteCustomTrackingDomainConnectErrors, EmailCompleteCustomTrackingDomainConnectResponses, EmailCompleteDomainConnectErrors, EmailCompleteDomainConnectResponses, EmailCompleteDomainWarmingErrors, EmailCompleteDomainWarmingResponses, EmailContent, EmailCreateDomainWarmingPlanErrors, EmailCreateDomainWarmingPlanResponses, EmailCreateForwardingRuleErrors, EmailCreateForwardingRuleResponses, EmailDeleteForwardingRuleErrors, EmailDeleteForwardingRuleResponses, EmailDetectRegistrarErrors, EmailDetectRegistrarResponses, EmailDisableCatchAllErrors, EmailDisableCatchAllResponses, EmailDisableCustomTrackingErrors, EmailDisableCustomTrackingResponses, EmailDomainId, EmailDomainWarmingBatchId, EmailEnableCatchAllErrors, EmailEnableCatchAllResponses, EmailEnableCustomTrackingErrors, EmailEnableCustomTrackingResponses, EmailEnableReceivingErrors, EmailEnableReceivingResponses, EmailForwardingRuleId, EmailGetBlockLogsErrors, EmailGetBlockLogsResponses, EmailGetCatchAllConfigErrors, EmailGetCatchAllConfigResponses, EmailGetCatchAllStatsErrors, EmailGetCatchAllStatsResponses, EmailGetCustomTrackingDomainConnectErrors, EmailGetCustomTrackingDomainConnectResponses, EmailGetCustomTrackingErrors, EmailGetCustomTrackingResponses, EmailGetDomainByIdErrors, EmailGetDomainByIdResponses, EmailGetDomainConnectErrors, EmailGetDomainConnectResponses, EmailGetDomainVerificationErrors, EmailGetDomainVerificationResponses, EmailGetDomainWarmingErrors, EmailGetDomainWarmingResponses, EmailGetForwardingLogErrors, EmailGetForwardingLogResponses, EmailGetOnboardingReviewErrors, EmailGetOnboardingReviewResponses, EmailGetRecipientTrackingPreferenceErrors, EmailGetRecipientTrackingPreferenceResponses, EmailGetSenderErrors, EmailGetSenderResponses, EmailGetStatsErrors, EmailGetStatsResponses, EmailGetTrackingDefaultsErrors, EmailGetTrackingDefaultsResponses, EmailListBlocksErrors, EmailListBlocksResponses, EmailListDomainsErrors, EmailListDomainsResponses, EmailListForwardingRulesErrors, EmailListForwardingRulesResponses, EmailListSendersErrors, EmailListSendersResponses, EmailListSuppressionsErrors, EmailListSuppressionsResponses, EmailPauseDomainWarmingErrors, EmailPauseDomainWarmingResponses, EmailReapplyOnboardingReviewErrors, EmailReapplyOnboardingReviewResponses, EmailRecipients, EmailRemoveBlockErrors, EmailRemoveBlockResponses, EmailRemoveDomainErrors, EmailRemoveDomainResponses, EmailRemoveSenderErrors, EmailRemoveSenderResponses, EmailRemoveSuppressionErrors, EmailRemoveSuppressionResponses, EmailRespondToOnboardingInformationRequestErrors, EmailRespondToOnboardingInformationRequestResponses, EmailResumeDomainWarmingErrors, EmailResumeDomainWarmingResponses, EmailRotateDomainDkimErrors, EmailRotateDomainDkimResponses, EmailSender, EmailSenderId, EmailSendMessagePayload, EmailSetDefaultDomainErrors, EmailSetDefaultDomainResponses, EmailSetDefaultSenderErrors, EmailSetDefaultSenderResponses, EmailSetDomainDefaultSenderErrors, EmailSetDomainDefaultSenderResponses, EmailUpdateBlockErrors, EmailUpdateBlockResponses, EmailUpdateCatchAllConfigErrors, EmailUpdateCatchAllConfigResponses, EmailUpdateDomainConfigErrors, EmailUpdateDomainConfigResponses, EmailUpdateDomainWarmingPolicyErrors, EmailUpdateDomainWarmingPolicyResponses, EmailUpdateForwardingRuleErrors, EmailUpdateForwardingRuleResponses, EmailUpdateRecipientTrackingPreferenceErrors, EmailUpdateRecipientTrackingPreferenceResponses, EmailUpdateTrackingDefaultsErrors, EmailUpdateTrackingDefaultsResponses, ForwardingConditions, HumanProfile, IanaTimezone, JsonObject, JsonValue, MediaCompleteErrors, MediaCompleteResponses, MediaCreateErrors, MediaCreateResponses, MediaDownloadUrlErrors, MediaDownloadUrlResponses, MediaGetByIdErrors, MediaGetByIdResponses, MediaId, MediaRemoveErrors, MediaRemoveResponses, MessageId, MessageMetadata, MessagesGetEmailErrors, MessagesGetEmailResponses, MessagesGetErrors, MessagesGetEventsErrors, MessagesGetEventsResponses, MessagesGetResponses, MessagesGetStatusErrors, MessagesGetStatusResponses, MessagesListErrors, MessagesListResponses, MessagesRemoveErrors, MessagesRemoveResponses, MessagesSendErrors, MessagesSendResponses, MessagesValidateEmailErrors, MessagesValidateEmailResponses, OperationId, OperationsGetErrors, OperationsGetResponses, OperationsListErrors, OperationsListResponses, OperationsRetryErrors, OperationsRetryResponses, OrganizationsCreateErrors, OrganizationsCreateResponses, OrganizationsDeleteErrors, OrganizationsDeleteResponses, OrganizationsGetErrors, OrganizationsGetProfileErrors, OrganizationsGetProfileResponses, OrganizationsGetResponses, OrganizationsGetUsageErrors, OrganizationsGetUsageResponses, OrganizationsUpdateErrors, OrganizationsUpdateResponses, ScheduledMessageId, ScheduledMessagesCancelErrors, ScheduledMessagesCancelResponses, ScheduledMessagesCreateErrors, ScheduledMessagesCreateResponses, ScheduledMessagesGetErrors, ScheduledMessagesGetResponses, ScheduledMessagesListErrors, ScheduledMessagesListResponses, ScheduledMessagesResumeErrors, ScheduledMessagesResumeResponses, SuppressionId, TemplateFamilyId, TemplateFromDefault, TemplateId, TemplateInputContractId, TemplateProjectId, TemplatePublicationId, TemplatesAddEntryErrors, TemplatesAddEntryResponses, TemplatesAttachFamilyMemberErrors, TemplatesAttachFamilyMemberResponses, TemplatesAttachWorkspaceResourceErrors, TemplatesAttachWorkspaceResourceResponses, TemplatesCheckWorkspaceErrors, TemplatesCheckWorkspaceResponses, TemplatesCreateErrors, TemplatesCreateFamilyErrors, TemplatesCreateFamilyFromTemplateErrors, TemplatesCreateFamilyFromTemplateResponses, TemplatesCreateFamilyResponses, TemplatesCreateResponses, TemplatesDeleteFamilyErrors, TemplatesDeleteFamilyResponses, TemplatesDetachFamilyMemberErrors, TemplatesDetachFamilyMemberResponses, TemplatesDiffWorkspaceErrors, TemplatesDiffWorkspaceResponses, TemplatesGetByIdErrors, TemplatesGetByIdResponses, TemplatesGetFamilyErrors, TemplatesGetFamilyResponses, TemplatesGetGitRepositoryErrors, TemplatesGetGitRepositoryResponses, TemplatesGetInputContractErrors, TemplatesGetInputContractResponses, TemplatesGetPublicationErrors, TemplatesGetPublicationResponses, TemplatesIssueGitCredentialErrors, TemplatesIssueGitCredentialResponses, TemplatesListErrors, TemplatesListFamiliesErrors, TemplatesListFamiliesResponses, TemplatesListInputContractsErrors, TemplatesListInputContractsResponses, TemplatesListResponses, TemplatesOpenWorkspaceErrors, TemplatesOpenWorkspaceResponses, TemplatesPatchWorkspaceErrors, TemplatesPatchWorkspaceResponses, TemplatesPublishErrors, TemplatesPublishResponses, TemplatesPutWorkspaceAssetErrors, TemplatesPutWorkspaceAssetResponses, TemplatesRemoveErrors, TemplatesRemoveResponses, TemplatesRemoveWorkspaceResourceErrors, TemplatesRemoveWorkspaceResourceResponses, TemplatesRenameFamilyErrors, TemplatesRenameFamilyResponses, TemplatesRenderWorkspaceFixtureErrors, TemplatesRenderWorkspaceFixtureResponses, TemplatesResolveWorkspaceConflictErrors, TemplatesResolveWorkspaceConflictResponses, TemplatesRestoreWorkspaceErrors, TemplatesRestoreWorkspaceResponses, TemplatesSaveWorkspaceErrors, TemplatesSaveWorkspaceResponses, TemplatesUpdateErrors, TemplatesUpdateResponses, TemplatesWorkspaceHistoryErrors, TemplatesWorkspaceHistoryResponses, TrackingRecipientEmail, UnknownRecord, UnsubscribeAddEmailsErrors, UnsubscribeAddEmailsResponses, UnsubscribeCheckSubscriptionErrors, UnsubscribeCheckSubscriptionResponses, UnsubscribeCreateErrors, UnsubscribeCreateResponses, UnsubscribeId, UnsubscribeListErrors, UnsubscribeListMembersErrors, UnsubscribeListMembersResponses, UnsubscribeListResponses, UnsubscribeRemoveEmailsErrors, UnsubscribeRemoveEmailsResponses, UnsubscribeRemoveErrors, UnsubscribeRemoveResponses, UnsubscribeSetDefaultErrors, UnsubscribeSetDefaultResponses, UnsubscribeUpdateErrors, UnsubscribeUpdateResponses, WebhookDeliveryId, WebhookEndpointId, WebhooksCreateErrors, WebhooksCreateResponses, WebhooksGetErrors, WebhooksGetLogsErrors, WebhooksGetLogsResponses, WebhooksGetResponses, WebhooksGetStatsErrors, WebhooksGetStatsResponses, WebhooksListErrors, WebhooksListResponses, WebhooksRegenerateSecretErrors, WebhooksRegenerateSecretResponses, WebhooksRemoveErrors, WebhooksRemoveResponses, WebhooksRetryDeliveryErrors, WebhooksRetryDeliveryResponses, WebhooksTestErrors, WebhooksTestResponses, WebhooksUpdateErrors, WebhooksUpdateResponses } from "./types.gen";
|
|
2
|
+
import type { AnalyticsExportDataErrors, AnalyticsExportDataResponses, AnalyticsGetChannelStatsErrors, AnalyticsGetChannelStatsResponses, AnalyticsGetDeliveryMetricsErrors, AnalyticsGetDeliveryMetricsResponses, AnalyticsGetHourlyDistributionErrors, AnalyticsGetHourlyDistributionResponses, AnalyticsGetStatsErrors, AnalyticsGetStatsResponses, AnalyticsGetTopContactsErrors, AnalyticsGetTopContactsResponses, ApiKeyAccess, ApiKeyId, ApiKeyMailboxAccessUpdate, ApiKeysCreateErrors, ApiKeysCreateResponses, ApiKeysGetActivityErrors, ApiKeysGetActivityResponses, ApiKeysGetErrors, ApiKeysGetResponses, ApiKeysGetStatsErrors, ApiKeysGetStatsResponses, ApiKeysListErrors, ApiKeysListResponses, ApiKeysRevokeErrors, ApiKeysRevokeResponses, ApiKeysRotateErrors, ApiKeysRotateResponses, ApiKeysUpdateErrors, ApiKeysUpdateResponses, AttachmentId, AttachmentsDownloadUrlErrors, AttachmentsDownloadUrlResponses, AttachmentsGetByIdErrors, AttachmentsGetByIdResponses, AttachmentsListErrors, AttachmentsListResponses, AttachmentsRemoveErrors, AttachmentsRemoveResponses, BlockedEmailId, BrandAssets, BrandFooter, BrandsCreateErrors, BrandsCreateResponses, BrandsGetErrors, BrandsGetResponses, BrandsListErrors, BrandsListResponses, BrandsRemoveErrors, BrandsRemoveResponses, BrandsSetDefaultErrors, BrandsSetDefaultResponses, BrandsUpdateErrors, BrandsUpdateResponses, CampaignAudience, CampaignContentInput, CampaignId, CampaignPolicy, CampaignRunId, CampaignsArchiveErrors, CampaignsArchiveResponses, CampaignsCancelRunErrors, CampaignsCancelRunResponses, CampaignsCreateErrors, CampaignsCreateResponses, CampaignsGetErrors, CampaignsGetResponses, CampaignsGetRunErrors, CampaignsGetRunResponses, CampaignsListErrors, CampaignsListRecipientsErrors, CampaignsListRecipientsResponses, CampaignsListResponses, CampaignsListRunsErrors, CampaignsListRunsResponses, CampaignsPauseRunErrors, CampaignsPauseRunResponses, CampaignsResumeRunErrors, CampaignsResumeRunResponses, CampaignsScheduleRunErrors, CampaignsScheduleRunResponses, CampaignsUpdateErrors, CampaignsUpdateResponses, ContactGroupId, ContactGroupsAddMembersErrors, ContactGroupsAddMembersResponses, ContactGroupsCreateErrors, ContactGroupsCreateResponses, ContactGroupsEvaluateDynamicErrors, ContactGroupsEvaluateDynamicResponses, ContactGroupsGetByIdErrors, ContactGroupsGetByIdResponses, ContactGroupsGetMembersErrors, ContactGroupsGetMembersResponses, ContactGroupsListErrors, ContactGroupsListResponses, ContactGroupsPreviewErrors, ContactGroupsPreviewResponses, ContactGroupsRemoveErrors, ContactGroupsRemoveMembersErrors, ContactGroupsRemoveMembersResponses, ContactGroupsRemoveResponses, ContactGroupsUpdateErrors, ContactGroupsUpdateResponses, ContactId, ContactIdentityId, ContactIdentityInput, ContactPreferences, ContactProfile, ContactProfileUpdate, ContactsAddIdentityErrors, ContactsAddIdentityResponses, ContactsAddTagsErrors, ContactsAddTagsResponses, ContactsBulkDeleteErrors, ContactsBulkDeleteResponses, ContactsBulkImportErrors, ContactsBulkImportResponses, ContactsBulkUpdateStatusErrors, ContactsBulkUpdateStatusResponses, ContactsBulkUpdateTagsErrors, ContactsBulkUpdateTagsResponses, ContactsCreateErrors, ContactsCreateResponses, ContactsExportErrors, ContactsExportResponses, ContactsFindErrors, ContactsFindOrCreateErrors, ContactsFindOrCreateResponses, ContactsFindResponses, ContactsGetActivityTimelineErrors, ContactsGetActivityTimelineResponses, ContactsGetEngagementErrors, ContactsGetEngagementResponses, ContactsGetErrors, ContactsGetGroupMembershipsErrors, ContactsGetGroupMembershipsResponses, ContactsGetResponses, ContactsListErrors, ContactsListResponses, ContactsRemoveErrors, ContactsRemoveIdentityErrors, ContactsRemoveIdentityResponses, ContactsRemoveResponses, ContactsRemoveTagsErrors, ContactsRemoveTagsResponses, ContactsUpdateErrors, ContactsUpdateResponses, ConversationContext, ConversationId, ConversationsAddCategoriesErrors, ConversationsAddCategoriesResponses, ConversationsAddChannelsErrors, ConversationsAddChannelsResponses, ConversationsAddContactsErrors, ConversationsAddContactsResponses, ConversationsAddTagsErrors, ConversationsAddTagsResponses, ConversationsCreateErrors, ConversationsCreateResponses, ConversationsGetByIdErrors, ConversationsGetByIdResponses, ConversationsListErrors, ConversationsListMessagesErrors, ConversationsListMessagesResponses, ConversationsListResponses, ConversationsRemoveCategoriesErrors, ConversationsRemoveCategoriesResponses, ConversationsRemoveChannelsErrors, ConversationsRemoveChannelsResponses, ConversationsRemoveContactsErrors, ConversationsRemoveContactsResponses, ConversationsRemoveTagsErrors, ConversationsRemoveTagsResponses, ConversationsUpdateErrors, ConversationsUpdateResponses, CreateMailboxAddressPayload, Cursor, CustomFieldDefinitionId, CustomFieldsCreateErrors, CustomFieldsCreateResponses, CustomFieldsListErrors, CustomFieldsListResponses, CustomFieldsRemoveErrors, CustomFieldsRemoveResponses, CustomFieldsUpdateErrors, CustomFieldsUpdateResponses, DispatchSendMessagePayload, EmailAddBlockErrors, EmailAddBlockResponses, EmailAddDomainErrors, EmailAddDomainResponses, EmailAddSenderErrors, EmailAddSenderResponses, EmailAdvanceDomainVerificationErrors, EmailAdvanceDomainVerificationResponses, EmailAttachment, EmailBccRecipients, EmailBuildCustomTrackingDomainConnectApplyUrlErrors, EmailBuildCustomTrackingDomainConnectApplyUrlResponses, EmailBuildDomainConnectApplyUrlErrors, EmailBuildDomainConnectApplyUrlResponses, EmailCancelDomainWarmingBatchErrors, EmailCancelDomainWarmingBatchResponses, EmailCcRecipients, EmailCheckBlockedErrors, EmailCheckBlockedResponses, EmailCheckSenderVerificationErrors, EmailCheckSenderVerificationResponses, EmailClearDomainDefaultSenderErrors, EmailClearDomainDefaultSenderResponses, EmailCompleteCustomTrackingDomainConnectErrors, EmailCompleteCustomTrackingDomainConnectResponses, EmailCompleteDomainConnectErrors, EmailCompleteDomainConnectResponses, EmailCompleteDomainWarmingErrors, EmailCompleteDomainWarmingResponses, EmailContent, EmailCountSuppressionsErrors, EmailCountSuppressionsResponses, EmailCreateDomainWarmingPlanErrors, EmailCreateDomainWarmingPlanResponses, EmailCreateForwardingRuleErrors, EmailCreateForwardingRuleResponses, EmailDeleteForwardingRuleErrors, EmailDeleteForwardingRuleResponses, EmailDetectRegistrarErrors, EmailDetectRegistrarResponses, EmailDisableCatchAllErrors, EmailDisableCatchAllResponses, EmailDisableCustomTrackingErrors, EmailDisableCustomTrackingResponses, EmailDomainId, EmailDomainWarmingBatchId, EmailEnableCatchAllErrors, EmailEnableCatchAllResponses, EmailEnableCustomTrackingErrors, EmailEnableCustomTrackingResponses, EmailEnableReceivingErrors, EmailEnableReceivingResponses, EmailForwardingRuleId, EmailGetBlockLogsErrors, EmailGetBlockLogsResponses, EmailGetCatchAllConfigErrors, EmailGetCatchAllConfigResponses, EmailGetCatchAllStatsErrors, EmailGetCatchAllStatsResponses, EmailGetCustomTrackingDomainConnectErrors, EmailGetCustomTrackingDomainConnectResponses, EmailGetCustomTrackingErrors, EmailGetCustomTrackingResponses, EmailGetDomainByIdErrors, EmailGetDomainByIdResponses, EmailGetDomainConnectErrors, EmailGetDomainConnectResponses, EmailGetDomainVerificationErrors, EmailGetDomainVerificationResponses, EmailGetDomainWarmingErrors, EmailGetDomainWarmingResponses, EmailGetForwardingLogErrors, EmailGetForwardingLogResponses, EmailGetOnboardingReviewErrors, EmailGetOnboardingReviewResponses, EmailGetReceivingStatusErrors, EmailGetReceivingStatusResponses, EmailGetRecipientTrackingPreferenceErrors, EmailGetRecipientTrackingPreferenceResponses, EmailGetSenderErrors, EmailGetSenderResponses, EmailGetStatsErrors, EmailGetStatsResponses, EmailGetTrackingDefaultsErrors, EmailGetTrackingDefaultsResponses, EmailListBlocksErrors, EmailListBlocksResponses, EmailListDomainsErrors, EmailListDomainsResponses, EmailListForwardingRulesErrors, EmailListForwardingRulesResponses, EmailListSendersErrors, EmailListSendersResponses, EmailListSuppressionsErrors, EmailListSuppressionsResponses, EmailPauseDomainWarmingErrors, EmailPauseDomainWarmingResponses, EmailReapplyOnboardingReviewErrors, EmailReapplyOnboardingReviewResponses, EmailRecheckCustomTrackingErrors, EmailRecheckCustomTrackingResponses, EmailRecipients, EmailRemoveBlockErrors, EmailRemoveBlockResponses, EmailRemoveDomainErrors, EmailRemoveDomainResponses, EmailRemoveSenderErrors, EmailRemoveSenderResponses, EmailRemoveSuppressionErrors, EmailRemoveSuppressionResponses, EmailRespondToOnboardingInformationRequestErrors, EmailRespondToOnboardingInformationRequestResponses, EmailResumeDomainWarmingErrors, EmailResumeDomainWarmingResponses, EmailRotateDomainDkimErrors, EmailRotateDomainDkimResponses, EmailSender, EmailSenderId, EmailSendMessagePayload, EmailSetDefaultDomainErrors, EmailSetDefaultDomainResponses, EmailSetDefaultSenderErrors, EmailSetDefaultSenderResponses, EmailSetDomainDefaultSenderErrors, EmailSetDomainDefaultSenderResponses, EmailUpdateBlockErrors, EmailUpdateBlockResponses, EmailUpdateCatchAllConfigErrors, EmailUpdateCatchAllConfigResponses, EmailUpdateDomainConfigErrors, EmailUpdateDomainConfigResponses, EmailUpdateDomainWarmingPolicyErrors, EmailUpdateDomainWarmingPolicyResponses, EmailUpdateForwardingRuleErrors, EmailUpdateForwardingRuleResponses, EmailUpdateRecipientTrackingPreferenceErrors, EmailUpdateRecipientTrackingPreferenceResponses, EmailUpdateTrackingDefaultsErrors, EmailUpdateTrackingDefaultsResponses, ExtensionInstallationId, ExtensionInstallationsDisableErrors, ExtensionInstallationsDisableResponses, ExtensionInstallationsEnableErrors, ExtensionInstallationsEnableResponses, ExtensionInstallationsGetErrors, ExtensionInstallationsGetResponses, ExtensionInstallationsGetRunErrors, ExtensionInstallationsGetRunResponses, ExtensionInstallationsInstallErrors, ExtensionInstallationsInstallResponses, ExtensionInstallationsListErrors, ExtensionInstallationsListResponses, ExtensionInstallationsListRunsErrors, ExtensionInstallationsListRunsResponses, ExtensionInstallationsUninstallErrors, ExtensionInstallationsUninstallResponses, ExtensionsGetErrors, ExtensionsGetResponses, ExtensionsGetVersionErrors, ExtensionsGetVersionResponses, ExtensionsListErrors, ExtensionsListResponses, ExtensionsListVersionsErrors, ExtensionsListVersionsResponses, ExtensionsPublishErrors, ExtensionsPublishResponses, FeedbackContext, FeedbackSendErrors, FeedbackSendResponses, ForwardingConditions, IanaTimezone, JsonObject, JsonValue, MailboxActionId, MailboxDraftId, MailboxesAddThreadLabelsErrors, MailboxesAddThreadLabelsResponses, MailboxesApproveActionErrors, MailboxesApproveActionResponses, MailboxesCreateDraftErrors, MailboxesCreateDraftResponses, MailboxesCreateErrors, MailboxesCreateGrantErrors, MailboxesCreateGrantResponses, MailboxesCreateLabelErrors, MailboxesCreateLabelResponses, MailboxesCreateNoteErrors, MailboxesCreateNoteResponses, MailboxesCreatePolicyErrors, MailboxesCreatePolicyResponses, MailboxesCreateResponses, MailboxesDeleteDraftErrors, MailboxesDeleteDraftResponses, MailboxesDeleteLabelErrors, MailboxesDeleteLabelResponses, MailboxesDeleteNoteErrors, MailboxesDeleteNoteResponses, MailboxesDeletePolicyErrors, MailboxesDeletePolicyResponses, MailboxesDenyActionErrors, MailboxesDenyActionResponses, MailboxesDiscardMessageErrors, MailboxesDiscardMessageResponses, MailboxesForwardErrors, MailboxesForwardResponses, MailboxesGetAgentActivityErrors, MailboxesGetAgentActivityResponses, MailboxesGetDraftErrors, MailboxesGetDraftResponses, MailboxesGetErrors, MailboxesGetMessageAttachmentErrors, MailboxesGetMessageAttachmentResponses, MailboxesGetMessageErrors, MailboxesGetMessageRawErrors, MailboxesGetMessageRawResponses, MailboxesGetMessageResponses, MailboxesGetPolicyErrors, MailboxesGetPolicyResponses, MailboxesGetResponses, MailboxesGetThreadContentErrors, MailboxesGetThreadContentResponses, MailboxesGetThreadErrors, MailboxesGetThreadResponses, MailboxesListActionsErrors, MailboxesListActionsResponses, MailboxesListDraftsErrors, MailboxesListDraftsResponses, MailboxesListErrors, MailboxesListEventsErrors, MailboxesListEventsResponses, MailboxesListFoldersErrors, MailboxesListFoldersResponses, MailboxesListGrantsErrors, MailboxesListGrantsResponses, MailboxesListLabelsErrors, MailboxesListLabelsResponses, MailboxesListPoliciesErrors, MailboxesListPoliciesResponses, MailboxesListQuarantineErrors, MailboxesListQuarantineResponses, MailboxesListResponses, MailboxesListThreadMessagesErrors, MailboxesListThreadMessagesResponses, MailboxesListThreadNotesErrors, MailboxesListThreadNotesResponses, MailboxesListThreadsErrors, MailboxesListThreadsResponses, MailboxesPauseErrors, MailboxesPauseResponses, MailboxesReleaseMessageErrors, MailboxesReleaseMessageResponses, MailboxesRemoveErrors, MailboxesRemoveResponses, MailboxesRemoveThreadLabelsErrors, MailboxesRemoveThreadLabelsResponses, MailboxesReplyAllErrors, MailboxesReplyAllResponses, MailboxesReplyErrors, MailboxesReplyResponses, MailboxesResumeErrors, MailboxesResumeResponses, MailboxesRevokeGrantErrors, MailboxesRevokeGrantResponses, MailboxesSendDraftErrors, MailboxesSendDraftResponses, MailboxesSendMessageErrors, MailboxesSendMessageResponses, MailboxesUpdateDraftErrors, MailboxesUpdateDraftResponses, MailboxesUpdateErrors, MailboxesUpdateGrantErrors, MailboxesUpdateGrantResponses, MailboxesUpdateLabelErrors, MailboxesUpdateLabelResponses, MailboxesUpdateNoteErrors, MailboxesUpdateNoteResponses, MailboxesUpdatePolicyErrors, MailboxesUpdatePolicyResponses, MailboxesUpdateResponses, MailboxesUpdateThreadErrors, MailboxesUpdateThreadResponses, MailboxGrantId, MailboxGrantRole, MailboxId, MailboxLabelId, MailboxMetadata, MailboxMetadataPatch, MailboxNoteId, MailboxPolicyId, MailboxPolicyOutcomeKind, MailboxSendMode, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MediaCompleteErrors, MediaCompleteResponses, MediaCreateErrors, MediaCreateResponses, MediaDownloadUrlErrors, MediaDownloadUrlResponses, MediaGetByIdErrors, MediaGetByIdResponses, MediaId, MediaRemoveErrors, MediaRemoveResponses, MessageId, MessageMetadata, MessagesGetContentErrors, MessagesGetContentResponses, MessagesGetEmailErrors, MessagesGetEmailResponses, MessagesGetErrors, MessagesGetEventsErrors, MessagesGetEventsResponses, MessagesGetResponses, MessagesGetStatusErrors, MessagesGetStatusResponses, MessagesListDeliveriesErrors, MessagesListDeliveriesResponses, MessagesListErrors, MessagesListResponses, MessagesRemoveErrors, MessagesRemoveResponses, MessagesSendErrors, MessagesSendResponses, MessagesValidateEmailErrors, MessagesValidateEmailResponses, NamespaceId, NamespaceMetadata, NamespacesCreateErrors, NamespacesCreateResponses, NamespacesGetErrors, NamespacesGetResponses, NamespacesListErrors, NamespacesListResponses, NamespacesRemoveErrors, NamespacesRemoveResponses, NamespacesUpdateErrors, NamespacesUpdateResponses, OperationId, OperationsGetErrors, OperationsGetResponses, OperationsListErrors, OperationsListResponses, OperationsRetryErrors, OperationsRetryResponses, OrganizationsCreateErrors, OrganizationsCreateResponses, OrganizationsDeleteErrors, OrganizationsDeleteResponses, OrganizationsGetErrors, OrganizationsGetProfileErrors, OrganizationsGetProfileResponses, OrganizationsGetResponses, OrganizationsGetUsageErrors, OrganizationsGetUsageResponses, OrganizationsUpdateErrors, OrganizationsUpdateResponses, ScheduledMessageId, ScheduledMessagesCancelErrors, ScheduledMessagesCancelResponses, ScheduledMessagesCreateErrors, ScheduledMessagesCreateResponses, ScheduledMessagesGetErrors, ScheduledMessagesGetResponses, ScheduledMessagesListErrors, ScheduledMessagesListResponses, ScheduledMessagesResumeErrors, ScheduledMessagesResumeResponses, SuppressionId, TemplateFamilyId, TemplateFromDefault, TemplateId, TemplateInputContractId, TemplateProjectId, TemplatePublicationId, TemplatesAddEntryErrors, TemplatesAddEntryResponses, TemplatesAttachFamilyMemberErrors, TemplatesAttachFamilyMemberResponses, TemplatesAttachWorkspaceResourceErrors, TemplatesAttachWorkspaceResourceResponses, TemplatesCheckWorkspaceErrors, TemplatesCheckWorkspaceResponses, TemplatesCreateErrors, TemplatesCreateFamilyErrors, TemplatesCreateFamilyFromTemplateErrors, TemplatesCreateFamilyFromTemplateResponses, TemplatesCreateFamilyResponses, TemplatesCreateResponses, TemplatesDeleteFamilyErrors, TemplatesDeleteFamilyResponses, TemplatesDetachFamilyMemberErrors, TemplatesDetachFamilyMemberResponses, TemplatesDiffWorkspaceErrors, TemplatesDiffWorkspaceResponses, TemplatesGetByIdErrors, TemplatesGetByIdResponses, TemplatesGetFamilyErrors, TemplatesGetFamilyResponses, TemplatesGetGitRepositoryErrors, TemplatesGetGitRepositoryResponses, TemplatesGetInputContractErrors, TemplatesGetInputContractResponses, TemplatesGetPublicationErrors, TemplatesGetPublicationResponses, TemplatesIssueGitCredentialErrors, TemplatesIssueGitCredentialResponses, TemplatesListErrors, TemplatesListFamiliesErrors, TemplatesListFamiliesResponses, TemplatesListInputContractsErrors, TemplatesListInputContractsResponses, TemplatesListResponses, TemplatesOpenWorkspaceErrors, TemplatesOpenWorkspaceResponses, TemplatesPatchWorkspaceErrors, TemplatesPatchWorkspaceResponses, TemplatesPublishErrors, TemplatesPublishResponses, TemplatesPutWorkspaceAssetErrors, TemplatesPutWorkspaceAssetResponses, TemplatesRemoveErrors, TemplatesRemoveResponses, TemplatesRemoveWorkspaceResourceErrors, TemplatesRemoveWorkspaceResourceResponses, TemplatesRenameFamilyErrors, TemplatesRenameFamilyResponses, TemplatesRenderWorkspaceFixtureErrors, TemplatesRenderWorkspaceFixtureResponses, TemplatesResolveWorkspaceConflictErrors, TemplatesResolveWorkspaceConflictResponses, TemplatesRestoreWorkspaceErrors, TemplatesRestoreWorkspaceResponses, TemplatesSaveWorkspaceErrors, TemplatesSaveWorkspaceResponses, TemplatesUpdateErrors, TemplatesUpdateResponses, TemplatesWorkspaceHistoryErrors, TemplatesWorkspaceHistoryResponses, TrackingRecipientEmail, UnknownRecord, UnsubscribeAddEmailsErrors, UnsubscribeAddEmailsResponses, UnsubscribeCheckSubscriptionErrors, UnsubscribeCheckSubscriptionResponses, UnsubscribeCreateErrors, UnsubscribeCreateResponses, UnsubscribeId, UnsubscribeListErrors, UnsubscribeListMembersErrors, UnsubscribeListMembersResponses, UnsubscribeListResponses, UnsubscribeRemoveEmailsErrors, UnsubscribeRemoveEmailsResponses, UnsubscribeRemoveErrors, UnsubscribeRemoveResponses, UnsubscribeSetDefaultErrors, UnsubscribeSetDefaultResponses, UnsubscribeUpdateErrors, UnsubscribeUpdateResponses, UserId, VersionCursor, WebhookDeliveryId, WebhookEndpointId, WebhooksCreateErrors, WebhooksCreateResponses, WebhooksGetErrors, WebhooksGetLogsErrors, WebhooksGetLogsResponses, WebhooksGetResponses, WebhooksGetStatsErrors, WebhooksGetStatsResponses, WebhooksListErrors, WebhooksListResponses, WebhooksRegenerateSecretErrors, WebhooksRegenerateSecretResponses, WebhooksRemoveErrors, WebhooksRemoveResponses, WebhooksRetryDeliveryErrors, WebhooksRetryDeliveryResponses, WebhooksTestErrors, WebhooksTestResponses, WebhooksUpdateErrors, WebhooksUpdateResponses } from "./types.gen";
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -17,24 +17,24 @@ export declare class Messages {
|
|
|
17
17
|
/**
|
|
18
18
|
* List messages
|
|
19
19
|
*
|
|
20
|
-
* Returns
|
|
20
|
+
* Returns message summaries, newest first (oldest first when filtered by conversation), with optional filters for channel, direction, status, conversation, contact, sender address, and creation time. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
21
21
|
*/
|
|
22
22
|
static list<ThrowOnError extends boolean = false>(parameters?: {
|
|
23
|
-
page?: string | null | undefined;
|
|
24
23
|
limit?: string | null | undefined;
|
|
24
|
+
cursor?: Cursor | null | undefined;
|
|
25
25
|
channel?: "email" | null | undefined;
|
|
26
26
|
direction?: "outbound" | "inbound" | null | undefined;
|
|
27
27
|
status?: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained" | null | undefined;
|
|
28
28
|
conversationId?: ConversationId | null | undefined;
|
|
29
29
|
contactId?: ContactId | null | undefined;
|
|
30
30
|
from?: string | null | undefined;
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
after?: string | null | undefined;
|
|
32
|
+
before?: string | null | undefined;
|
|
33
33
|
}, options?: Options<never, ThrowOnError>): RequestResult<MessagesListResponses, MessagesListErrors, ThrowOnError>;
|
|
34
34
|
/**
|
|
35
35
|
* Send a message
|
|
36
36
|
*
|
|
37
|
-
* Sends a message on the requested channel and returns
|
|
37
|
+
* Sends a message on the requested channel and returns its receipt (id, status, and why it waits when it does) with a 201 Created status. Requires `messages:create` or the send permission of the channel it sends on, such as `email:send`. `channel` selects the payload variant. Repeating an identical request with the same optional `Idempotency-Key` header returns the original receipt; reusing the key for different content returns a conflict.
|
|
38
38
|
*/
|
|
39
39
|
static send<ThrowOnError extends boolean = false>(parameters: {
|
|
40
40
|
"idempotency-key"?: string | null | undefined;
|
|
@@ -51,11 +51,27 @@ export declare class Messages {
|
|
|
51
51
|
/**
|
|
52
52
|
* Get a message
|
|
53
53
|
*
|
|
54
|
-
* Returns a
|
|
54
|
+
* Returns a message by its ID: addresses, subject, status, and why it is waiting when it is. Per-recipient delivery state and the body are their own reads.
|
|
55
55
|
*/
|
|
56
56
|
static get<ThrowOnError extends boolean = false>(parameters: {
|
|
57
57
|
id: MessageId;
|
|
58
58
|
}, options?: Options<never, ThrowOnError>): RequestResult<MessagesGetResponses, MessagesGetErrors, ThrowOnError>;
|
|
59
|
+
/**
|
|
60
|
+
* List message deliveries
|
|
61
|
+
*
|
|
62
|
+
* Returns one delivery per recipient: its status, attempts, delivery times, and why it failed or is waiting.
|
|
63
|
+
*/
|
|
64
|
+
static listDeliveries<ThrowOnError extends boolean = false>(parameters: {
|
|
65
|
+
id: MessageId;
|
|
66
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MessagesListDeliveriesResponses, MessagesListDeliveriesErrors, ThrowOnError>;
|
|
67
|
+
/**
|
|
68
|
+
* Get message content
|
|
69
|
+
*
|
|
70
|
+
* Returns the content the message was sent or received with.
|
|
71
|
+
*/
|
|
72
|
+
static getContent<ThrowOnError extends boolean = false>(parameters: {
|
|
73
|
+
id: MessageId;
|
|
74
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MessagesGetContentResponses, MessagesGetContentErrors, ThrowOnError>;
|
|
59
75
|
/**
|
|
60
76
|
* Get email message details
|
|
61
77
|
*
|
|
@@ -63,7 +79,7 @@ export declare class Messages {
|
|
|
63
79
|
*/
|
|
64
80
|
static getEmail<ThrowOnError extends boolean = false>(parameters: {
|
|
65
81
|
id: MessageId;
|
|
66
|
-
|
|
82
|
+
includeDownloadUrls?: string | null | undefined;
|
|
67
83
|
urlExpiresIn?: string | null | undefined;
|
|
68
84
|
}, options?: Options<never, ThrowOnError>): RequestResult<MessagesGetEmailResponses, MessagesGetEmailErrors, ThrowOnError>;
|
|
69
85
|
/**
|
|
@@ -92,10 +108,12 @@ export declare class Messages {
|
|
|
92
108
|
/**
|
|
93
109
|
* List message events
|
|
94
110
|
*
|
|
95
|
-
* Returns the
|
|
111
|
+
* Returns the delivery events recorded for a message, oldest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
96
112
|
*/
|
|
97
113
|
static getEvents<ThrowOnError extends boolean = false>(parameters: {
|
|
98
114
|
id: MessageId;
|
|
115
|
+
limit?: string | null | undefined;
|
|
116
|
+
cursor?: Cursor | null | undefined;
|
|
99
117
|
}, options?: Options<never, ThrowOnError>): RequestResult<MessagesGetEventsResponses, MessagesGetEventsErrors, ThrowOnError>;
|
|
100
118
|
}
|
|
101
119
|
export declare class Messages2 {
|
|
@@ -105,11 +123,11 @@ export declare class Operations {
|
|
|
105
123
|
/**
|
|
106
124
|
* List asynchronous operations
|
|
107
125
|
*
|
|
108
|
-
* Lists asynchronous operations for the active organization.
|
|
126
|
+
* Lists asynchronous operations for the active organization, newest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
109
127
|
*/
|
|
110
128
|
static list<ThrowOnError extends boolean = false>(parameters?: {
|
|
111
|
-
page?: string | null | undefined;
|
|
112
129
|
limit?: string | null | undefined;
|
|
130
|
+
cursor?: Cursor | null | undefined;
|
|
113
131
|
kind?: "email-domain-provisioning" | "organization-deletion" | null | undefined;
|
|
114
132
|
status?: "pending" | "running" | "succeeded" | "failed" | null | undefined;
|
|
115
133
|
}, options?: Options<never, ThrowOnError>): RequestResult<OperationsListResponses, OperationsListErrors, ThrowOnError>;
|
|
@@ -119,7 +137,7 @@ export declare class Operations {
|
|
|
119
137
|
* Returns one asynchronous operation from the active organization.
|
|
120
138
|
*/
|
|
121
139
|
static get<ThrowOnError extends boolean = false>(parameters: {
|
|
122
|
-
|
|
140
|
+
id: OperationId;
|
|
123
141
|
}, options?: Options<never, ThrowOnError>): RequestResult<OperationsGetResponses, OperationsGetErrors, ThrowOnError>;
|
|
124
142
|
/**
|
|
125
143
|
* Retry an asynchronous operation
|
|
@@ -127,7 +145,7 @@ export declare class Operations {
|
|
|
127
145
|
* Retries a failed operation in place when its error is retryable. Retrying an organization deletion additionally requires `organization:delete`.
|
|
128
146
|
*/
|
|
129
147
|
static retry<ThrowOnError extends boolean = false>(parameters: {
|
|
130
|
-
|
|
148
|
+
id: OperationId;
|
|
131
149
|
}, options?: Options<never, ThrowOnError>): RequestResult<OperationsRetryResponses, OperationsRetryErrors, ThrowOnError>;
|
|
132
150
|
}
|
|
133
151
|
export declare class Operations2 {
|
|
@@ -137,12 +155,12 @@ export declare class ScheduledMessages {
|
|
|
137
155
|
/**
|
|
138
156
|
* List scheduled messages
|
|
139
157
|
*
|
|
140
|
-
* Returns
|
|
158
|
+
* Returns scheduled messages, soonest send first, optionally filtered by status. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
141
159
|
*/
|
|
142
160
|
static list<ThrowOnError extends boolean = false>(parameters?: {
|
|
143
|
-
status?: "pending" | "dispatching" | "paused" | "dispatched" | "cancelled" | "failed" | null | undefined;
|
|
144
|
-
page?: string | null | undefined;
|
|
145
161
|
limit?: string | null | undefined;
|
|
162
|
+
cursor?: Cursor | null | undefined;
|
|
163
|
+
status?: "pending" | "dispatching" | "paused" | "dispatched" | "cancelled" | "failed" | null | undefined;
|
|
146
164
|
}, options?: Options<never, ThrowOnError>): RequestResult<ScheduledMessagesListResponses, ScheduledMessagesListErrors, ThrowOnError>;
|
|
147
165
|
/**
|
|
148
166
|
* Schedule a message
|
|
@@ -194,12 +212,12 @@ export declare class Campaigns {
|
|
|
194
212
|
/**
|
|
195
213
|
* List campaigns
|
|
196
214
|
*
|
|
197
|
-
* Returns
|
|
215
|
+
* Returns the organization's campaigns, newest first, optionally filtered by status. Each row carries `series`, the last 14 days of daily email sends the campaign produced, oldest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
198
216
|
*/
|
|
199
217
|
static list<ThrowOnError extends boolean = false>(parameters?: {
|
|
200
218
|
status?: "draft" | "archived" | null | undefined;
|
|
201
|
-
page?: string | null | undefined;
|
|
202
219
|
limit?: string | null | undefined;
|
|
220
|
+
cursor?: Cursor | null | undefined;
|
|
203
221
|
}, options?: Options<never, ThrowOnError>): RequestResult<CampaignsListResponses, CampaignsListErrors, ThrowOnError>;
|
|
204
222
|
/**
|
|
205
223
|
* Create a campaign
|
|
@@ -213,14 +231,6 @@ export declare class Campaigns {
|
|
|
213
231
|
audience: CampaignAudience;
|
|
214
232
|
policy?: CampaignPolicy | null | undefined;
|
|
215
233
|
}, options?: Options<never, ThrowOnError>): RequestResult<CampaignsCreateResponses, CampaignsCreateErrors, ThrowOnError>;
|
|
216
|
-
/**
|
|
217
|
-
* Archive a campaign
|
|
218
|
-
*
|
|
219
|
-
* Archives a draft campaign so it can no longer be scheduled, returning the archived campaign.
|
|
220
|
-
*/
|
|
221
|
-
static archive<ThrowOnError extends boolean = false>(parameters: {
|
|
222
|
-
id: CampaignId;
|
|
223
|
-
}, options?: Options<never, ThrowOnError>): RequestResult<CampaignsArchiveResponses, CampaignsArchiveErrors, ThrowOnError>;
|
|
224
234
|
/**
|
|
225
235
|
* Get a campaign
|
|
226
236
|
*
|
|
@@ -241,16 +251,24 @@ export declare class Campaigns {
|
|
|
241
251
|
audience?: CampaignAudience | null | undefined;
|
|
242
252
|
policy?: CampaignPolicy | null | undefined;
|
|
243
253
|
}, options?: Options<never, ThrowOnError>): RequestResult<CampaignsUpdateResponses, CampaignsUpdateErrors, ThrowOnError>;
|
|
254
|
+
/**
|
|
255
|
+
* Archive a campaign
|
|
256
|
+
*
|
|
257
|
+
* Archives a draft campaign so it can no longer be scheduled, returning the archived campaign.
|
|
258
|
+
*/
|
|
259
|
+
static archive<ThrowOnError extends boolean = false>(parameters: {
|
|
260
|
+
id: CampaignId;
|
|
261
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CampaignsArchiveResponses, CampaignsArchiveErrors, ThrowOnError>;
|
|
244
262
|
/**
|
|
245
263
|
* List campaign runs
|
|
246
264
|
*
|
|
247
|
-
* Returns a
|
|
265
|
+
* Returns a campaign's runs, newest first, optionally filtered by status. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
248
266
|
*/
|
|
249
267
|
static listRuns<ThrowOnError extends boolean = false>(parameters: {
|
|
250
268
|
id: CampaignId;
|
|
251
269
|
status?: "scheduled" | "resolving" | "dispatching" | "paused" | "completed" | "cancelled" | "failed" | null | undefined;
|
|
252
|
-
page?: string | null | undefined;
|
|
253
270
|
limit?: string | null | undefined;
|
|
271
|
+
cursor?: Cursor | null | undefined;
|
|
254
272
|
}, options?: Options<never, ThrowOnError>): RequestResult<CampaignsListRunsResponses, CampaignsListRunsErrors, ThrowOnError>;
|
|
255
273
|
/**
|
|
256
274
|
* Schedule a campaign run
|
|
@@ -301,14 +319,14 @@ export declare class Campaigns {
|
|
|
301
319
|
/**
|
|
302
320
|
* List campaign recipients
|
|
303
321
|
*
|
|
304
|
-
* Returns a
|
|
322
|
+
* Returns a campaign run's recipients in the order the run admitted them, optionally filtered by status. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
305
323
|
*/
|
|
306
324
|
static listRecipients<ThrowOnError extends boolean = false>(parameters: {
|
|
307
325
|
id: CampaignId;
|
|
308
326
|
runId: CampaignRunId;
|
|
309
327
|
status?: "pending" | "dispatching" | "dispatched" | "failed" | "skipped" | null | undefined;
|
|
310
|
-
page?: string | null | undefined;
|
|
311
328
|
limit?: string | null | undefined;
|
|
329
|
+
cursor?: Cursor | null | undefined;
|
|
312
330
|
}, options?: Options<never, ThrowOnError>): RequestResult<CampaignsListRecipientsResponses, CampaignsListRecipientsErrors, ThrowOnError>;
|
|
313
331
|
}
|
|
314
332
|
export declare class Campaigns2 {
|
|
@@ -374,11 +392,11 @@ export declare class Email {
|
|
|
374
392
|
/**
|
|
375
393
|
* List sending domains
|
|
376
394
|
*
|
|
377
|
-
* Returns
|
|
395
|
+
* Returns the organization's sending domains, newest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. `sendable=true` lists only domains a send can use now: active, and verified, or verified before and degraded since. Each row carries `deliverability` (bounce and complaint rates over the last 24 hours, the window the 5% bounce limit is enforced over) and `series`, the last 14 days of daily email sends attributed to the domain, oldest first.
|
|
378
396
|
*/
|
|
379
397
|
static listDomains<ThrowOnError extends boolean = false>(parameters?: {
|
|
380
|
-
page?: string | null | undefined;
|
|
381
398
|
limit?: string | null | undefined;
|
|
399
|
+
cursor?: Cursor | null | undefined;
|
|
382
400
|
sendable?: "true" | null | undefined;
|
|
383
401
|
}, options?: Options<never, ThrowOnError>): RequestResult<EmailListDomainsResponses, EmailListDomainsErrors, ThrowOnError>;
|
|
384
402
|
/**
|
|
@@ -401,14 +419,6 @@ export declare class Email {
|
|
|
401
419
|
static getDomainVerification<ThrowOnError extends boolean = false>(parameters: {
|
|
402
420
|
id: EmailDomainId;
|
|
403
421
|
}, options?: Options<never, ThrowOnError>): RequestResult<EmailGetDomainVerificationResponses, EmailGetDomainVerificationErrors, ThrowOnError>;
|
|
404
|
-
/**
|
|
405
|
-
* Advance domain verification
|
|
406
|
-
*
|
|
407
|
-
* Checks the required DNS records now and, once they all match, moves the domain toward verified. Safe to call repeatedly.
|
|
408
|
-
*/
|
|
409
|
-
static advanceDomainVerification<ThrowOnError extends boolean = false>(parameters: {
|
|
410
|
-
id: EmailDomainId;
|
|
411
|
-
}, options?: Options<never, ThrowOnError>): RequestResult<EmailAdvanceDomainVerificationResponses, EmailAdvanceDomainVerificationErrors, ThrowOnError>;
|
|
412
422
|
/**
|
|
413
423
|
* Stage a DKIM selector rotation
|
|
414
424
|
*
|
|
@@ -418,6 +428,14 @@ export declare class Email {
|
|
|
418
428
|
"idempotency-key": string;
|
|
419
429
|
id: EmailDomainId;
|
|
420
430
|
}, options?: Options<never, ThrowOnError>): RequestResult<EmailRotateDomainDkimResponses, EmailRotateDomainDkimErrors, ThrowOnError>;
|
|
431
|
+
/**
|
|
432
|
+
* Advance domain verification
|
|
433
|
+
*
|
|
434
|
+
* Checks the required DNS records now and, once they all match, moves the domain toward verified. Safe to call repeatedly.
|
|
435
|
+
*/
|
|
436
|
+
static advanceDomainVerification<ThrowOnError extends boolean = false>(parameters: {
|
|
437
|
+
id: EmailDomainId;
|
|
438
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailAdvanceDomainVerificationResponses, EmailAdvanceDomainVerificationErrors, ThrowOnError>;
|
|
421
439
|
/**
|
|
422
440
|
* Remove a sending domain
|
|
423
441
|
*
|
|
@@ -455,7 +473,7 @@ export declare class Email {
|
|
|
455
473
|
/**
|
|
456
474
|
* Build a one-click DNS apply URL
|
|
457
475
|
*
|
|
458
|
-
* Builds the signed Domain Connect apply URL for the selected sending-only or sending-and-receiving service. Manual DNS remains available for either mode.
|
|
476
|
+
* Builds the signed Domain Connect apply URL for the selected sending-only or sending-and-receiving service. The sending-and-receiving service writes the apex inbound MX, so it is refused until the domain's receiving is enabled. Manual DNS remains available for either mode.
|
|
459
477
|
*/
|
|
460
478
|
static buildDomainConnectApplyUrl<ThrowOnError extends boolean = false>(parameters: {
|
|
461
479
|
id: EmailDomainId;
|
|
@@ -475,7 +493,7 @@ export declare class Email {
|
|
|
475
493
|
/**
|
|
476
494
|
* Enable inbound email for a domain
|
|
477
495
|
*
|
|
478
|
-
* Enables inbound receiving for a verified domain and returns the recipient addresses it accepts. Set `catchAll` to route every address on the domain; that
|
|
496
|
+
* Enables inbound receiving for a verified domain and returns the recipient addresses it accepts. Set `catchAll` to route every address on the domain; that needs a destination: a webhook endpoint, supplied as `endpointId` or already configured on the domain, or at least one active forwarding rule that covers the domain. Mail that matches neither is rejected, never accepted and dropped.
|
|
479
497
|
*/
|
|
480
498
|
static enableReceiving<ThrowOnError extends boolean = false>(parameters: {
|
|
481
499
|
id: EmailDomainId;
|
|
@@ -484,6 +502,14 @@ export declare class Email {
|
|
|
484
502
|
endpointId?: WebhookEndpointId | null | undefined;
|
|
485
503
|
addresses?: Array<string> | null | undefined;
|
|
486
504
|
}, options?: Options<never, ThrowOnError>): RequestResult<EmailEnableReceivingResponses, EmailEnableReceivingErrors, ThrowOnError>;
|
|
505
|
+
/**
|
|
506
|
+
* Get receiving setup status
|
|
507
|
+
*
|
|
508
|
+
* Reports each prerequisite for receiving a domain's mail at Samva, in order: sending verified, a destination (a webhook endpoint or an active forwarding rule), receiving enabled, and the inbound MX record. The MX answer is a live DNS lookup that names the current target when mail is routed elsewhere.
|
|
509
|
+
*/
|
|
510
|
+
static getReceivingStatus<ThrowOnError extends boolean = false>(parameters: {
|
|
511
|
+
id: EmailDomainId;
|
|
512
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailGetReceivingStatusResponses, EmailGetReceivingStatusErrors, ThrowOnError>;
|
|
487
513
|
/**
|
|
488
514
|
* Set the default sending domain
|
|
489
515
|
*
|
|
@@ -548,6 +574,14 @@ export declare class Email {
|
|
|
548
574
|
id: EmailDomainId;
|
|
549
575
|
label?: string | null | undefined;
|
|
550
576
|
}, options?: Options<never, ThrowOnError>): RequestResult<EmailEnableCustomTrackingResponses, EmailEnableCustomTrackingErrors, ThrowOnError>;
|
|
577
|
+
/**
|
|
578
|
+
* Recheck a custom tracking domain's certificate
|
|
579
|
+
*
|
|
580
|
+
* Checks the hostname's certificate now instead of waiting for the next scheduled check, and returns the refreshed state. Samva checks a hostname at most once every 30 seconds; a recheck inside that window returns the state from the last check. Returns a conflict when custom tracking is disabled or being torn down.
|
|
581
|
+
*/
|
|
582
|
+
static recheckCustomTracking<ThrowOnError extends boolean = false>(parameters: {
|
|
583
|
+
id: EmailDomainId;
|
|
584
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailRecheckCustomTrackingResponses, EmailRecheckCustomTrackingErrors, ThrowOnError>;
|
|
551
585
|
/**
|
|
552
586
|
* Check automatic Custom Tracking Domain setup eligibility
|
|
553
587
|
*
|
|
@@ -578,11 +612,11 @@ export declare class Email {
|
|
|
578
612
|
/**
|
|
579
613
|
* List senders
|
|
580
614
|
*
|
|
581
|
-
* Returns
|
|
615
|
+
* Returns senders, newest first, optionally filtered by verification status, active state, or default flag. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Each row carries `deliverability` (bounce and complaint rates over the last 24 hours) and `series`, the last 14 days of daily email sends from the address, oldest first.
|
|
582
616
|
*/
|
|
583
617
|
static listSenders<ThrowOnError extends boolean = false>(parameters?: {
|
|
584
|
-
page?: string | null | undefined;
|
|
585
618
|
limit?: string | null | undefined;
|
|
619
|
+
cursor?: Cursor | null | undefined;
|
|
586
620
|
verificationStatus?: "pending" | "verified" | "failed" | null | undefined;
|
|
587
621
|
isActive?: string | null | undefined;
|
|
588
622
|
isDefault?: string | null | undefined;
|
|
@@ -634,20 +668,20 @@ export declare class Email {
|
|
|
634
668
|
/**
|
|
635
669
|
* Get email statistics
|
|
636
670
|
*
|
|
637
|
-
* Returns aggregate email statistics — sent, delivered, bounced, and complained counts with their rates — optionally scoped to
|
|
671
|
+
* Returns aggregate email statistics — sent, delivered, bounced, and complained counts with their rates — optionally scoped to messages created from `after` (inclusive) to `before` (exclusive).
|
|
638
672
|
*/
|
|
639
673
|
static getStats<ThrowOnError extends boolean = false>(parameters?: {
|
|
640
|
-
|
|
641
|
-
|
|
674
|
+
after?: string | null | undefined;
|
|
675
|
+
before?: string | null | undefined;
|
|
642
676
|
}, options?: Options<never, ThrowOnError>): RequestResult<EmailGetStatsResponses, EmailGetStatsErrors, ThrowOnError>;
|
|
643
677
|
/**
|
|
644
678
|
* Enable catch-all receiving
|
|
645
679
|
*
|
|
646
|
-
* Enables catch-all inbound receiving for a domain. `endpointId` is one of the organization's webhook endpoints; every address on the domain delivers `message.received` to it. Responds with 201.
|
|
680
|
+
* Enables catch-all inbound receiving for a verified domain. `endpointId` is one of the organization's webhook endpoints; every address on the domain delivers `message.received` to it. Omit it to deliver through forwarding rules alone, which needs at least one active forwarding rule covering the domain. Mail that matches neither a rule nor an endpoint is rejected as an unknown recipient. Responds with 201.
|
|
647
681
|
*/
|
|
648
682
|
static enableCatchAll<ThrowOnError extends boolean = false>(parameters: {
|
|
649
|
-
|
|
650
|
-
endpointId
|
|
683
|
+
id: EmailDomainId;
|
|
684
|
+
endpointId?: WebhookEndpointId | null | undefined;
|
|
651
685
|
}, options?: Options<never, ThrowOnError>): RequestResult<EmailEnableCatchAllResponses, EmailEnableCatchAllErrors, ThrowOnError>;
|
|
652
686
|
/**
|
|
653
687
|
* Disable catch-all receiving
|
|
@@ -655,7 +689,7 @@ export declare class Email {
|
|
|
655
689
|
* Disables catch-all inbound receiving for a domain.
|
|
656
690
|
*/
|
|
657
691
|
static disableCatchAll<ThrowOnError extends boolean = false>(parameters: {
|
|
658
|
-
|
|
692
|
+
id: EmailDomainId;
|
|
659
693
|
}, options?: Options<never, ThrowOnError>): RequestResult<EmailDisableCatchAllResponses, EmailDisableCatchAllErrors, ThrowOnError>;
|
|
660
694
|
/**
|
|
661
695
|
* Get catch-all configuration
|
|
@@ -677,25 +711,31 @@ export declare class Email {
|
|
|
677
711
|
/**
|
|
678
712
|
* Get catch-all statistics
|
|
679
713
|
*
|
|
680
|
-
* Returns catch-all receiving counters for a domain, adding an aggregated breakdown when a
|
|
714
|
+
* Returns catch-all receiving counters for a domain, adding an aggregated breakdown when `after` or `before` bounds a range: `after` inclusive, `before` exclusive.
|
|
681
715
|
*/
|
|
682
716
|
static getCatchAllStats<ThrowOnError extends boolean = false>(parameters: {
|
|
683
717
|
domainId: EmailDomainId;
|
|
684
|
-
|
|
685
|
-
|
|
718
|
+
after?: string | null | undefined;
|
|
719
|
+
before?: string | null | undefined;
|
|
686
720
|
}, options?: Options<never, ThrowOnError>): RequestResult<EmailGetCatchAllStatsResponses, EmailGetCatchAllStatsErrors, ThrowOnError>;
|
|
687
721
|
/**
|
|
688
722
|
* List suppressed addresses
|
|
689
723
|
*
|
|
690
|
-
* Returns the addresses this organization will not send to, newest first, optionally filtered by suppression type, active or expired state, and an address substring
|
|
724
|
+
* Returns the addresses this organization will not send to, newest first, optionally filtered by suppression type, active or expired state, and an address substring. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
691
725
|
*/
|
|
692
726
|
static listSuppressions<ThrowOnError extends boolean = false>(parameters?: {
|
|
693
727
|
type?: "bounce" | "complaint" | "unsubscribe" | "manual" | null | undefined;
|
|
694
728
|
status?: "active" | "expired" | null | undefined;
|
|
695
729
|
search?: string | null | undefined;
|
|
696
730
|
limit?: string | null | undefined;
|
|
697
|
-
|
|
731
|
+
cursor?: Cursor | null | undefined;
|
|
698
732
|
}, options?: Options<never, ThrowOnError>): RequestResult<EmailListSuppressionsResponses, EmailListSuppressionsErrors, ThrowOnError>;
|
|
733
|
+
/**
|
|
734
|
+
* Count suppressed addresses
|
|
735
|
+
*
|
|
736
|
+
* Returns how many addresses this organization will not send to now, by suppression type. Expired suppressions are not counted.
|
|
737
|
+
*/
|
|
738
|
+
static countSuppressions<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<EmailCountSuppressionsResponses, EmailCountSuppressionsErrors, ThrowOnError>;
|
|
699
739
|
/**
|
|
700
740
|
* Remove a suppressed address
|
|
701
741
|
*
|
|
@@ -707,13 +747,13 @@ export declare class Email {
|
|
|
707
747
|
/**
|
|
708
748
|
* List block entries
|
|
709
749
|
*
|
|
710
|
-
* Returns block entries, optionally filtered by block type and active state
|
|
750
|
+
* Returns block entries, newest first, optionally filtered by block type and active state. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
711
751
|
*/
|
|
712
752
|
static listBlocks<ThrowOnError extends boolean = false>(parameters?: {
|
|
713
753
|
blockType?: "email" | "domain" | null | undefined;
|
|
714
754
|
isActive?: string | null | undefined;
|
|
715
755
|
limit?: string | null | undefined;
|
|
716
|
-
|
|
756
|
+
cursor?: Cursor | null | undefined;
|
|
717
757
|
}, options?: Options<never, ThrowOnError>): RequestResult<EmailListBlocksResponses, EmailListBlocksErrors, ThrowOnError>;
|
|
718
758
|
/**
|
|
719
759
|
* Add a block entry
|
|
@@ -750,15 +790,15 @@ export declare class Email {
|
|
|
750
790
|
/**
|
|
751
791
|
* List blocked email logs
|
|
752
792
|
*
|
|
753
|
-
* Returns
|
|
793
|
+
* Returns inbound emails that were blocked, most recently blocked first, optionally filtered by block entry, sender, or block time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
754
794
|
*/
|
|
755
795
|
static getBlockLogs<ThrowOnError extends boolean = false>(parameters?: {
|
|
756
796
|
blockedEmailId?: BlockedEmailId | null | undefined;
|
|
757
797
|
fromAddress?: string | null | undefined;
|
|
758
|
-
|
|
759
|
-
|
|
798
|
+
after?: string | null | undefined;
|
|
799
|
+
before?: string | null | undefined;
|
|
760
800
|
limit?: string | null | undefined;
|
|
761
|
-
|
|
801
|
+
cursor?: Cursor | null | undefined;
|
|
762
802
|
}, options?: Options<never, ThrowOnError>): RequestResult<EmailGetBlockLogsResponses, EmailGetBlockLogsErrors, ThrowOnError>;
|
|
763
803
|
/**
|
|
764
804
|
* Check whether an address is blocked
|
|
@@ -771,18 +811,16 @@ export declare class Email {
|
|
|
771
811
|
/**
|
|
772
812
|
* List forwarding rules
|
|
773
813
|
*
|
|
774
|
-
* Returns inbound email forwarding
|
|
814
|
+
* Returns every inbound email forwarding rule in the order inbound mail is matched against them: highest priority first, then an exact address before a wildcard pattern at equal priority, then oldest first. The first rule that matches is the one that forwards. Filtering by domain returns that domain's rules and the rules that apply to every domain (domainId null). An organization holds at most 100, so the list is never paged.
|
|
775
815
|
*/
|
|
776
816
|
static listForwardingRules<ThrowOnError extends boolean = false>(parameters?: {
|
|
777
817
|
domainId?: EmailDomainId | null | undefined;
|
|
778
818
|
isActive?: string | null | undefined;
|
|
779
|
-
limit?: string | null | undefined;
|
|
780
|
-
offset?: string | null | undefined;
|
|
781
819
|
}, options?: Options<never, ThrowOnError>): RequestResult<EmailListForwardingRulesResponses, EmailListForwardingRulesErrors, ThrowOnError>;
|
|
782
820
|
/**
|
|
783
821
|
* Create a forwarding rule
|
|
784
822
|
*
|
|
785
|
-
* Creates an inbound email forwarding rule and returns it. Responds with 201.
|
|
823
|
+
* Creates an inbound email forwarding rule and returns it. Responds with 201. Priority is a non-negative integer, default 0; higher priority rules are tried first, and at equal priority an exact address outranks a wildcard pattern. An organization holds at most 100 forwarding rules.
|
|
786
824
|
*/
|
|
787
825
|
static createForwardingRule<ThrowOnError extends boolean = false>(parameters: {
|
|
788
826
|
name: string;
|
|
@@ -831,15 +869,15 @@ export declare class Email {
|
|
|
831
869
|
/**
|
|
832
870
|
* List email forwarding logs
|
|
833
871
|
*
|
|
834
|
-
* Returns
|
|
872
|
+
* Returns forwarded inbound emails with their delivery outcomes, newest first, optionally filtered by rule, status, or creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
835
873
|
*/
|
|
836
874
|
static getForwardingLog<ThrowOnError extends boolean = false>(parameters?: {
|
|
837
875
|
forwardingRuleId?: EmailForwardingRuleId | null | undefined;
|
|
838
876
|
status?: "pending" | "forwarded" | "failed" | null | undefined;
|
|
839
|
-
|
|
840
|
-
|
|
877
|
+
after?: string | null | undefined;
|
|
878
|
+
before?: string | null | undefined;
|
|
841
879
|
limit?: string | null | undefined;
|
|
842
|
-
|
|
880
|
+
cursor?: Cursor | null | undefined;
|
|
843
881
|
}, options?: Options<never, ThrowOnError>): RequestResult<EmailGetForwardingLogResponses, EmailGetForwardingLogErrors, ThrowOnError>;
|
|
844
882
|
/**
|
|
845
883
|
* Get domain warming
|
|
@@ -931,7 +969,7 @@ export declare class Media {
|
|
|
931
969
|
* Verifies the uploaded object exists in storage, marks the media object ready, and returns it with a download URL.
|
|
932
970
|
*/
|
|
933
971
|
static complete<ThrowOnError extends boolean = false>(parameters: {
|
|
934
|
-
|
|
972
|
+
id: MediaId;
|
|
935
973
|
}, options?: Options<never, ThrowOnError>): RequestResult<MediaCompleteResponses, MediaCompleteErrors, ThrowOnError>;
|
|
936
974
|
/**
|
|
937
975
|
* Delete a media object
|
|
@@ -939,7 +977,7 @@ export declare class Media {
|
|
|
939
977
|
* Deletes a pending media object and the bytes stored for it. Fails if the media object is already ready.
|
|
940
978
|
*/
|
|
941
979
|
static remove<ThrowOnError extends boolean = false>(parameters: {
|
|
942
|
-
|
|
980
|
+
id: MediaId;
|
|
943
981
|
}, options?: Options<never, ThrowOnError>): RequestResult<MediaRemoveResponses, MediaRemoveErrors, ThrowOnError>;
|
|
944
982
|
/**
|
|
945
983
|
* Get a media object
|
|
@@ -947,7 +985,7 @@ export declare class Media {
|
|
|
947
985
|
* Returns the media object's metadata, including status, dimensions, and confirmation timestamps.
|
|
948
986
|
*/
|
|
949
987
|
static getById<ThrowOnError extends boolean = false>(parameters: {
|
|
950
|
-
|
|
988
|
+
id: MediaId;
|
|
951
989
|
}, options?: Options<never, ThrowOnError>): RequestResult<MediaGetByIdResponses, MediaGetByIdErrors, ThrowOnError>;
|
|
952
990
|
/**
|
|
953
991
|
* Get a media download URL
|
|
@@ -955,7 +993,7 @@ export declare class Media {
|
|
|
955
993
|
* Generates a presigned, time-limited download URL for a ready media object.
|
|
956
994
|
*/
|
|
957
995
|
static downloadUrl<ThrowOnError extends boolean = false>(parameters: {
|
|
958
|
-
|
|
996
|
+
id: MediaId;
|
|
959
997
|
}, options?: Options<never, ThrowOnError>): RequestResult<MediaDownloadUrlResponses, MediaDownloadUrlErrors, ThrowOnError>;
|
|
960
998
|
}
|
|
961
999
|
export declare class Media2 {
|
|
@@ -981,7 +1019,7 @@ export declare class Attachments {
|
|
|
981
1019
|
/**
|
|
982
1020
|
* List message attachments
|
|
983
1021
|
*
|
|
984
|
-
* Returns
|
|
1022
|
+
* Returns every attachment of the given message, newest first. A message's attachments all ride that one email, so the list is never paged.
|
|
985
1023
|
*/
|
|
986
1024
|
static list<ThrowOnError extends boolean = false>(parameters: {
|
|
987
1025
|
messageId: MessageId;
|
|
@@ -1003,16 +1041,16 @@ export declare class Conversations {
|
|
|
1003
1041
|
/**
|
|
1004
1042
|
* List conversations
|
|
1005
1043
|
*
|
|
1006
|
-
* Returns
|
|
1044
|
+
* Returns conversation summaries, most recently active first, filterable by status, channel, contact, and creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. A conversation that gains activity while you page moves ahead of the cursor, so a walk lists each conversation at most once. Read a conversation's contacts, metadata, and resolution with `GET /v1/conversations/{id}`.
|
|
1007
1045
|
*/
|
|
1008
1046
|
static list<ThrowOnError extends boolean = false>(parameters?: {
|
|
1009
|
-
page?: string | null | undefined;
|
|
1010
1047
|
limit?: string | null | undefined;
|
|
1048
|
+
cursor?: Cursor | null | undefined;
|
|
1011
1049
|
status?: "active" | "waiting" | "resolved" | "escalated" | "archived" | null | undefined;
|
|
1012
1050
|
channel?: "email" | null | undefined;
|
|
1013
1051
|
contactId?: ContactId | null | undefined;
|
|
1014
|
-
|
|
1015
|
-
|
|
1052
|
+
after?: string | null | undefined;
|
|
1053
|
+
before?: string | null | undefined;
|
|
1016
1054
|
}, options?: Options<never, ThrowOnError>): RequestResult<ConversationsListResponses, ConversationsListErrors, ThrowOnError>;
|
|
1017
1055
|
/**
|
|
1018
1056
|
* Create a conversation
|
|
@@ -1031,9 +1069,7 @@ export declare class Conversations {
|
|
|
1031
1069
|
priority?: number | null | undefined;
|
|
1032
1070
|
urgency?: "low" | "medium" | "high" | "critical" | null | undefined;
|
|
1033
1071
|
complexity?: "simple" | "moderate" | "complex" | null | undefined;
|
|
1034
|
-
metadata?:
|
|
1035
|
-
actorTracking?: ActorTracking | null | undefined;
|
|
1036
|
-
metrics?: ConversationMetrics | null | undefined;
|
|
1072
|
+
metadata?: JsonObject | null | undefined;
|
|
1037
1073
|
context?: ConversationContext | null | null | undefined;
|
|
1038
1074
|
tags?: Array<string> | null | undefined;
|
|
1039
1075
|
categories?: Array<string> | null | undefined;
|
|
@@ -1044,7 +1080,7 @@ export declare class Conversations {
|
|
|
1044
1080
|
/**
|
|
1045
1081
|
* Get a conversation
|
|
1046
1082
|
*
|
|
1047
|
-
* Returns a single conversation
|
|
1083
|
+
* Returns a single conversation with the contacts taking part in it.
|
|
1048
1084
|
*/
|
|
1049
1085
|
static getById<ThrowOnError extends boolean = false>(parameters: {
|
|
1050
1086
|
id: ConversationId;
|
|
@@ -1052,7 +1088,7 @@ export declare class Conversations {
|
|
|
1052
1088
|
/**
|
|
1053
1089
|
* Update a conversation
|
|
1054
1090
|
*
|
|
1055
|
-
* Updates
|
|
1091
|
+
* Updates the fields you name and keeps the rest. `metadata` merges into the stored metadata by key, and a `null` value deletes that key. `primaryChannel` must be one of the conversation's channels. Tags, categories, and channels are not updated here: use `POST` and `DELETE` on `/v1/conversations/{id}/tags`, `/v1/conversations/{id}/categories`, and `/v1/conversations/{id}/channels`.
|
|
1056
1092
|
*/
|
|
1057
1093
|
static update<ThrowOnError extends boolean = false>(parameters: {
|
|
1058
1094
|
id: ConversationId;
|
|
@@ -1067,12 +1103,7 @@ export declare class Conversations {
|
|
|
1067
1103
|
urgency?: "low" | "medium" | "high" | "critical" | null | undefined;
|
|
1068
1104
|
complexity?: "simple" | "moderate" | "complex" | null | undefined;
|
|
1069
1105
|
context?: ConversationContext | null | null | undefined;
|
|
1070
|
-
metadata?:
|
|
1071
|
-
metrics?: ConversationMetrics | null | undefined;
|
|
1072
|
-
actorTracking?: ActorTracking | null | undefined;
|
|
1073
|
-
channels?: Array<"email"> | null | undefined;
|
|
1074
|
-
tags?: Array<string> | null | undefined;
|
|
1075
|
-
categories?: Array<string> | null | undefined;
|
|
1106
|
+
metadata?: JsonObject | null | undefined;
|
|
1076
1107
|
isTest?: boolean | null | undefined;
|
|
1077
1108
|
isInternal?: boolean | null | undefined;
|
|
1078
1109
|
isPrivate?: boolean | null | undefined;
|
|
@@ -1080,13 +1111,69 @@ export declare class Conversations {
|
|
|
1080
1111
|
/**
|
|
1081
1112
|
* List conversation messages
|
|
1082
1113
|
*
|
|
1083
|
-
* Returns the
|
|
1114
|
+
* Returns the conversation's message summaries, oldest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Read a message's content with `GET /v1/messages/{id}/content`.
|
|
1084
1115
|
*/
|
|
1085
1116
|
static listMessages<ThrowOnError extends boolean = false>(parameters: {
|
|
1086
1117
|
id: ConversationId;
|
|
1087
|
-
page?: string | null | undefined;
|
|
1088
1118
|
limit?: string | null | undefined;
|
|
1119
|
+
cursor?: Cursor | null | undefined;
|
|
1120
|
+
after?: string | null | undefined;
|
|
1121
|
+
before?: string | null | undefined;
|
|
1089
1122
|
}, options?: Options<never, ThrowOnError>): RequestResult<ConversationsListMessagesResponses, ConversationsListMessagesErrors, ThrowOnError>;
|
|
1123
|
+
/**
|
|
1124
|
+
* Remove conversation tags
|
|
1125
|
+
*
|
|
1126
|
+
* Removes the given tags from the conversation and returns the conversation. A tag the conversation does not have is ignored.
|
|
1127
|
+
*/
|
|
1128
|
+
static removeTags<ThrowOnError extends boolean = false>(parameters: {
|
|
1129
|
+
id: ConversationId;
|
|
1130
|
+
tags: [string];
|
|
1131
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ConversationsRemoveTagsResponses, ConversationsRemoveTagsErrors, ThrowOnError>;
|
|
1132
|
+
/**
|
|
1133
|
+
* Add conversation tags
|
|
1134
|
+
*
|
|
1135
|
+
* Adds the given tags to the conversation, keeping the tags it already has, and returns the conversation.
|
|
1136
|
+
*/
|
|
1137
|
+
static addTags<ThrowOnError extends boolean = false>(parameters: {
|
|
1138
|
+
id: ConversationId;
|
|
1139
|
+
tags: [string];
|
|
1140
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ConversationsAddTagsResponses, ConversationsAddTagsErrors, ThrowOnError>;
|
|
1141
|
+
/**
|
|
1142
|
+
* Remove conversation categories
|
|
1143
|
+
*
|
|
1144
|
+
* Removes the given categories from the conversation and returns the conversation. A category the conversation does not have is ignored.
|
|
1145
|
+
*/
|
|
1146
|
+
static removeCategories<ThrowOnError extends boolean = false>(parameters: {
|
|
1147
|
+
id: ConversationId;
|
|
1148
|
+
categories: [string];
|
|
1149
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ConversationsRemoveCategoriesResponses, ConversationsRemoveCategoriesErrors, ThrowOnError>;
|
|
1150
|
+
/**
|
|
1151
|
+
* Add conversation categories
|
|
1152
|
+
*
|
|
1153
|
+
* Adds the given categories to the conversation, keeping the ones it already has, and returns the conversation.
|
|
1154
|
+
*/
|
|
1155
|
+
static addCategories<ThrowOnError extends boolean = false>(parameters: {
|
|
1156
|
+
id: ConversationId;
|
|
1157
|
+
categories: [string];
|
|
1158
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ConversationsAddCategoriesResponses, ConversationsAddCategoriesErrors, ThrowOnError>;
|
|
1159
|
+
/**
|
|
1160
|
+
* Remove conversation channels
|
|
1161
|
+
*
|
|
1162
|
+
* Removes the given channels from the conversation and returns the conversation. The primary channel cannot be removed; a channel the conversation does not have is ignored.
|
|
1163
|
+
*/
|
|
1164
|
+
static removeChannels<ThrowOnError extends boolean = false>(parameters: {
|
|
1165
|
+
id: ConversationId;
|
|
1166
|
+
channels: ["email"];
|
|
1167
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ConversationsRemoveChannelsResponses, ConversationsRemoveChannelsErrors, ThrowOnError>;
|
|
1168
|
+
/**
|
|
1169
|
+
* Add conversation channels
|
|
1170
|
+
*
|
|
1171
|
+
* Adds the given channels to the conversation, keeping the ones it already has, and returns the conversation.
|
|
1172
|
+
*/
|
|
1173
|
+
static addChannels<ThrowOnError extends boolean = false>(parameters: {
|
|
1174
|
+
id: ConversationId;
|
|
1175
|
+
channels: ["email"];
|
|
1176
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ConversationsAddChannelsResponses, ConversationsAddChannelsErrors, ThrowOnError>;
|
|
1090
1177
|
/**
|
|
1091
1178
|
* Remove contacts from a conversation
|
|
1092
1179
|
*
|
|
@@ -1094,7 +1181,7 @@ export declare class Conversations {
|
|
|
1094
1181
|
*/
|
|
1095
1182
|
static removeContacts<ThrowOnError extends boolean = false>(parameters: {
|
|
1096
1183
|
id: ConversationId;
|
|
1097
|
-
contactIds: [ContactId
|
|
1184
|
+
contactIds: [ContactId];
|
|
1098
1185
|
}, options?: Options<never, ThrowOnError>): RequestResult<ConversationsRemoveContactsResponses, ConversationsRemoveContactsErrors, ThrowOnError>;
|
|
1099
1186
|
/**
|
|
1100
1187
|
* Add contacts to a conversation
|
|
@@ -1103,7 +1190,7 @@ export declare class Conversations {
|
|
|
1103
1190
|
*/
|
|
1104
1191
|
static addContacts<ThrowOnError extends boolean = false>(parameters: {
|
|
1105
1192
|
id: ConversationId;
|
|
1106
|
-
contactIds: [ContactId
|
|
1193
|
+
contactIds: [ContactId];
|
|
1107
1194
|
}, options?: Options<never, ThrowOnError>): RequestResult<ConversationsAddContactsResponses, ConversationsAddContactsErrors, ThrowOnError>;
|
|
1108
1195
|
}
|
|
1109
1196
|
export declare class Conversations2 {
|
|
@@ -1113,40 +1200,33 @@ export declare class Contacts {
|
|
|
1113
1200
|
/**
|
|
1114
1201
|
* List contacts
|
|
1115
1202
|
*
|
|
1116
|
-
* Returns
|
|
1203
|
+
* Returns contact summaries for the organization, newest first, filterable by search term, status, and creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Read a contact's identities, profile, and metadata with `GET /v1/contacts/{id}`.
|
|
1117
1204
|
*/
|
|
1118
1205
|
static list<ThrowOnError extends boolean = false>(parameters?: {
|
|
1119
|
-
page?: string | null | undefined;
|
|
1120
1206
|
limit?: string | null | undefined;
|
|
1207
|
+
cursor?: Cursor | null | undefined;
|
|
1121
1208
|
search?: string | null | undefined;
|
|
1122
|
-
type?: "human" | "system" | null | undefined;
|
|
1123
1209
|
status?: "active" | "paused" | "blocked" | "archived" | null | undefined;
|
|
1124
|
-
|
|
1125
|
-
|
|
1210
|
+
after?: string | null | undefined;
|
|
1211
|
+
before?: string | null | undefined;
|
|
1126
1212
|
}, options?: Options<never, ThrowOnError>): RequestResult<ContactsListResponses, ContactsListErrors, ThrowOnError>;
|
|
1127
1213
|
/**
|
|
1128
1214
|
* Create a contact
|
|
1129
1215
|
*
|
|
1130
|
-
* Creates a
|
|
1216
|
+
* Creates a contact and returns it with a 201 status. An identity another contact already holds is a conflict.
|
|
1131
1217
|
*/
|
|
1132
1218
|
static create<ThrowOnError extends boolean = false>(parameters: {
|
|
1133
|
-
type: "human" | "system";
|
|
1134
1219
|
name: string;
|
|
1135
1220
|
displayName?: string | null | null | undefined;
|
|
1136
1221
|
avatar?: string | null | null | undefined;
|
|
1137
|
-
identities?: Array<
|
|
1138
|
-
|
|
1139
|
-
capabilities?: Array<string> | null | undefined;
|
|
1140
|
-
tags?: Array<string> | null | undefined;
|
|
1141
|
-
accessLevel?: "public" | "authenticated" | "vip" | "internal" | null | undefined;
|
|
1142
|
-
accessConfig?: ContactAccessConfig | null | null | undefined;
|
|
1222
|
+
identities?: Array<ContactIdentityInput> | null | undefined;
|
|
1223
|
+
profile?: ContactProfile | null | null | undefined;
|
|
1143
1224
|
preferences?: ContactPreferences | null | null | undefined;
|
|
1225
|
+
tags?: Array<string> | null | undefined;
|
|
1144
1226
|
status?: "active" | "paused" | "blocked" | "archived" | null | undefined;
|
|
1145
1227
|
statusReason?: string | null | null | undefined;
|
|
1146
1228
|
externalId?: string | null | null | undefined;
|
|
1147
1229
|
metadata?: JsonObject | null | null | undefined;
|
|
1148
|
-
createdBy?: ContactId | null | null | undefined;
|
|
1149
|
-
lastModifiedBy?: ContactId | null | null | undefined;
|
|
1150
1230
|
}, options?: Options<never, ThrowOnError>): RequestResult<ContactsCreateResponses, ContactsCreateErrors, ThrowOnError>;
|
|
1151
1231
|
/**
|
|
1152
1232
|
* Find a contact
|
|
@@ -1181,7 +1261,7 @@ export declare class Contacts {
|
|
|
1181
1261
|
/**
|
|
1182
1262
|
* Get a contact
|
|
1183
1263
|
*
|
|
1184
|
-
* Returns a
|
|
1264
|
+
* Returns a contact with its identities, profile, tags, and metadata.
|
|
1185
1265
|
*/
|
|
1186
1266
|
static get<ThrowOnError extends boolean = false>(parameters: {
|
|
1187
1267
|
id: ContactId;
|
|
@@ -1189,28 +1269,58 @@ export declare class Contacts {
|
|
|
1189
1269
|
/**
|
|
1190
1270
|
* Update a contact
|
|
1191
1271
|
*
|
|
1192
|
-
* Updates
|
|
1272
|
+
* Updates the fields you name and keeps the rest. `metadata` merges into the stored metadata by key, and a `null` value deletes that key. `profile` replaces each field it names and `null` clears one; its `customFields` merge by key the same way. Identities and tags are not updated here: use `POST /v1/contacts/{id}/identities`, `DELETE /v1/contacts/{id}/identities/{identityId}`, `POST /v1/contacts/{id}/tags`, and `DELETE /v1/contacts/{id}/tags`.
|
|
1193
1273
|
*/
|
|
1194
1274
|
static update<ThrowOnError extends boolean = false>(parameters: {
|
|
1195
1275
|
id: ContactId;
|
|
1196
|
-
type?: "human" | "system" | null | undefined;
|
|
1197
1276
|
name?: string | null | undefined;
|
|
1198
1277
|
displayName?: string | null | null | undefined;
|
|
1199
1278
|
avatar?: string | null | null | undefined;
|
|
1200
|
-
|
|
1201
|
-
humanProfile?: HumanProfile | null | null | undefined;
|
|
1202
|
-
capabilities?: Array<string> | null | undefined;
|
|
1203
|
-
tags?: Array<string> | null | undefined;
|
|
1204
|
-
accessLevel?: "public" | "authenticated" | "vip" | "internal" | null | undefined;
|
|
1205
|
-
accessConfig?: ContactAccessConfig | null | null | undefined;
|
|
1279
|
+
profile?: ContactProfileUpdate | null | undefined;
|
|
1206
1280
|
preferences?: ContactPreferences | null | null | undefined;
|
|
1207
1281
|
status?: "active" | "paused" | "blocked" | "archived" | null | undefined;
|
|
1208
1282
|
statusReason?: string | null | null | undefined;
|
|
1209
1283
|
externalId?: string | null | null | undefined;
|
|
1210
|
-
metadata?: JsonObject | null |
|
|
1211
|
-
createdBy?: ContactId | null | null | undefined;
|
|
1212
|
-
lastModifiedBy?: ContactId | null | null | undefined;
|
|
1284
|
+
metadata?: JsonObject | null | undefined;
|
|
1213
1285
|
}, options?: Options<never, ThrowOnError>): RequestResult<ContactsUpdateResponses, ContactsUpdateErrors, ThrowOnError>;
|
|
1286
|
+
/**
|
|
1287
|
+
* Add a contact identity
|
|
1288
|
+
*
|
|
1289
|
+
* Adds an address the contact is reached at and returns the contact. Adding an address the contact already has updates whether it is verified. An address another contact holds is a conflict.
|
|
1290
|
+
*/
|
|
1291
|
+
static addIdentity<ThrowOnError extends boolean = false>(parameters: {
|
|
1292
|
+
id: ContactId;
|
|
1293
|
+
channel: "email";
|
|
1294
|
+
identifier: string;
|
|
1295
|
+
verified?: boolean | null | undefined;
|
|
1296
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ContactsAddIdentityResponses, ContactsAddIdentityErrors, ThrowOnError>;
|
|
1297
|
+
/**
|
|
1298
|
+
* Remove a contact identity
|
|
1299
|
+
*
|
|
1300
|
+
* Removes one address from the contact and returns the contact.
|
|
1301
|
+
*/
|
|
1302
|
+
static removeIdentity<ThrowOnError extends boolean = false>(parameters: {
|
|
1303
|
+
id: ContactId;
|
|
1304
|
+
identityId: ContactIdentityId;
|
|
1305
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ContactsRemoveIdentityResponses, ContactsRemoveIdentityErrors, ThrowOnError>;
|
|
1306
|
+
/**
|
|
1307
|
+
* Remove contact tags
|
|
1308
|
+
*
|
|
1309
|
+
* Removes the given tags from the contact and returns the contact. A tag the contact does not have is ignored.
|
|
1310
|
+
*/
|
|
1311
|
+
static removeTags<ThrowOnError extends boolean = false>(parameters: {
|
|
1312
|
+
id: ContactId;
|
|
1313
|
+
tags: [string];
|
|
1314
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ContactsRemoveTagsResponses, ContactsRemoveTagsErrors, ThrowOnError>;
|
|
1315
|
+
/**
|
|
1316
|
+
* Add contact tags
|
|
1317
|
+
*
|
|
1318
|
+
* Adds the given tags to the contact, keeping the tags it already has, and returns the contact.
|
|
1319
|
+
*/
|
|
1320
|
+
static addTags<ThrowOnError extends boolean = false>(parameters: {
|
|
1321
|
+
id: ContactId;
|
|
1322
|
+
tags: [string];
|
|
1323
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ContactsAddTagsResponses, ContactsAddTagsErrors, ThrowOnError>;
|
|
1214
1324
|
/**
|
|
1215
1325
|
* Get contact engagement metrics
|
|
1216
1326
|
*
|
|
@@ -1244,7 +1354,7 @@ export declare class Contacts {
|
|
|
1244
1354
|
* Permanently deletes multiple contacts by ID, returning counts of deleted and failed records.
|
|
1245
1355
|
*/
|
|
1246
1356
|
static bulkDelete<ThrowOnError extends boolean = false>(parameters: {
|
|
1247
|
-
ids: [ContactId
|
|
1357
|
+
ids: [ContactId];
|
|
1248
1358
|
}, options?: Options<never, ThrowOnError>): RequestResult<ContactsBulkDeleteResponses, ContactsBulkDeleteErrors, ThrowOnError>;
|
|
1249
1359
|
/**
|
|
1250
1360
|
* Bulk update contact tags
|
|
@@ -1252,9 +1362,9 @@ export declare class Contacts {
|
|
|
1252
1362
|
* Adds, removes, or replaces tags on multiple contacts in one request, returning counts of updated and failed records.
|
|
1253
1363
|
*/
|
|
1254
1364
|
static bulkUpdateTags<ThrowOnError extends boolean = false>(parameters: {
|
|
1255
|
-
ids: [ContactId
|
|
1365
|
+
ids: [ContactId];
|
|
1256
1366
|
operation: "add" | "remove" | "set";
|
|
1257
|
-
tags: [string
|
|
1367
|
+
tags: [string];
|
|
1258
1368
|
}, options?: Options<never, ThrowOnError>): RequestResult<ContactsBulkUpdateTagsResponses, ContactsBulkUpdateTagsErrors, ThrowOnError>;
|
|
1259
1369
|
/**
|
|
1260
1370
|
* Bulk update contact status
|
|
@@ -1262,7 +1372,7 @@ export declare class Contacts {
|
|
|
1262
1372
|
* Sets the status on multiple contacts in one request, returning counts of updated and failed records.
|
|
1263
1373
|
*/
|
|
1264
1374
|
static bulkUpdateStatus<ThrowOnError extends boolean = false>(parameters: {
|
|
1265
|
-
ids: [ContactId
|
|
1375
|
+
ids: [ContactId];
|
|
1266
1376
|
status: "active" | "paused" | "blocked" | "archived";
|
|
1267
1377
|
}, options?: Options<never, ThrowOnError>): RequestResult<ContactsBulkUpdateStatusResponses, ContactsBulkUpdateStatusErrors, ThrowOnError>;
|
|
1268
1378
|
/**
|
|
@@ -1274,7 +1384,6 @@ export declare class Contacts {
|
|
|
1274
1384
|
ids?: Array<ContactId> | null | undefined;
|
|
1275
1385
|
format?: "json" | "csv" | null | undefined;
|
|
1276
1386
|
filters?: {
|
|
1277
|
-
type?: "human" | "system" | null | undefined;
|
|
1278
1387
|
status?: "active" | "paused" | "blocked" | "archived" | null | undefined;
|
|
1279
1388
|
tags?: Array<string> | null | undefined;
|
|
1280
1389
|
} | null | undefined;
|
|
@@ -1283,21 +1392,23 @@ export declare class Contacts {
|
|
|
1283
1392
|
/**
|
|
1284
1393
|
* Get contact activity timeline
|
|
1285
1394
|
*
|
|
1286
|
-
* Returns a
|
|
1395
|
+
* Returns a contact's message activity, newest first, optionally filtered by channel. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
1287
1396
|
*/
|
|
1288
1397
|
static getActivityTimeline<ThrowOnError extends boolean = false>(parameters: {
|
|
1289
1398
|
id: ContactId;
|
|
1290
|
-
page?: string | null | undefined;
|
|
1291
1399
|
limit?: string | null | undefined;
|
|
1400
|
+
cursor?: Cursor | null | undefined;
|
|
1292
1401
|
channel?: "email" | null | undefined;
|
|
1293
1402
|
}, options?: Options<never, ThrowOnError>): RequestResult<ContactsGetActivityTimelineResponses, ContactsGetActivityTimelineErrors, ThrowOnError>;
|
|
1294
1403
|
/**
|
|
1295
1404
|
* List a contact's group memberships
|
|
1296
1405
|
*
|
|
1297
|
-
* Returns the contact groups
|
|
1406
|
+
* Returns the contact groups a contact belongs to, most recently joined first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
1298
1407
|
*/
|
|
1299
1408
|
static getGroupMemberships<ThrowOnError extends boolean = false>(parameters: {
|
|
1300
1409
|
id: ContactId;
|
|
1410
|
+
limit?: string | null | undefined;
|
|
1411
|
+
cursor?: Cursor | null | undefined;
|
|
1301
1412
|
}, options?: Options<never, ThrowOnError>): RequestResult<ContactsGetGroupMembershipsResponses, ContactsGetGroupMembershipsErrors, ThrowOnError>;
|
|
1302
1413
|
}
|
|
1303
1414
|
export declare class Contacts2 {
|
|
@@ -1307,11 +1418,11 @@ export declare class ContactGroups {
|
|
|
1307
1418
|
/**
|
|
1308
1419
|
* List contact groups
|
|
1309
1420
|
*
|
|
1310
|
-
* Returns
|
|
1421
|
+
* Returns the organization's contact groups, newest first, filterable by type and active state. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
1311
1422
|
*/
|
|
1312
1423
|
static list<ThrowOnError extends boolean = false>(parameters?: {
|
|
1313
|
-
page?: string | null | undefined;
|
|
1314
1424
|
limit?: string | null | undefined;
|
|
1425
|
+
cursor?: Cursor | null | undefined;
|
|
1315
1426
|
type?: "static" | "dynamic" | "smart" | Array<"static" | "dynamic" | "smart"> | null | undefined;
|
|
1316
1427
|
isActive?: string | null | undefined;
|
|
1317
1428
|
}, options?: Options<never, ThrowOnError>): RequestResult<ContactGroupsListResponses, ContactGroupsListErrors, ThrowOnError>;
|
|
@@ -1372,18 +1483,18 @@ export declare class ContactGroups {
|
|
|
1372
1483
|
* Removes one or more contacts from a contact group, returning the count of removed members.
|
|
1373
1484
|
*/
|
|
1374
1485
|
static removeMembers<ThrowOnError extends boolean = false>(parameters: {
|
|
1375
|
-
|
|
1376
|
-
contactIds: [ContactId
|
|
1486
|
+
id: ContactGroupId;
|
|
1487
|
+
contactIds: [ContactId];
|
|
1377
1488
|
}, options?: Options<never, ThrowOnError>): RequestResult<ContactGroupsRemoveMembersResponses, ContactGroupsRemoveMembersErrors, ThrowOnError>;
|
|
1378
1489
|
/**
|
|
1379
1490
|
* List members of a contact group
|
|
1380
1491
|
*
|
|
1381
|
-
* Returns a
|
|
1492
|
+
* Returns a contact group's members, most recently joined first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
1382
1493
|
*/
|
|
1383
1494
|
static getMembers<ThrowOnError extends boolean = false>(parameters: {
|
|
1384
|
-
|
|
1385
|
-
page?: string | null | undefined;
|
|
1495
|
+
id: ContactGroupId;
|
|
1386
1496
|
limit?: string | null | undefined;
|
|
1497
|
+
cursor?: Cursor | null | undefined;
|
|
1387
1498
|
}, options?: Options<never, ThrowOnError>): RequestResult<ContactGroupsGetMembersResponses, ContactGroupsGetMembersErrors, ThrowOnError>;
|
|
1388
1499
|
/**
|
|
1389
1500
|
* Add members to a contact group
|
|
@@ -1391,8 +1502,8 @@ export declare class ContactGroups {
|
|
|
1391
1502
|
* Adds one or more contacts to a contact group, returning counts of added and skipped members.
|
|
1392
1503
|
*/
|
|
1393
1504
|
static addMembers<ThrowOnError extends boolean = false>(parameters: {
|
|
1394
|
-
|
|
1395
|
-
contactIds: [ContactId
|
|
1505
|
+
id: ContactGroupId;
|
|
1506
|
+
contactIds: [ContactId];
|
|
1396
1507
|
role?: "member" | "moderator" | "admin" | null | undefined;
|
|
1397
1508
|
}, options?: Options<never, ThrowOnError>): RequestResult<ContactGroupsAddMembersResponses, ContactGroupsAddMembersErrors, ThrowOnError>;
|
|
1398
1509
|
/**
|
|
@@ -1401,7 +1512,7 @@ export declare class ContactGroups {
|
|
|
1401
1512
|
* Recomputes a dynamic contact group's membership from its criteria, returning counts of added, removed, and total members.
|
|
1402
1513
|
*/
|
|
1403
1514
|
static evaluateDynamic<ThrowOnError extends boolean = false>(parameters: {
|
|
1404
|
-
|
|
1515
|
+
id: ContactGroupId;
|
|
1405
1516
|
}, options?: Options<never, ThrowOnError>): RequestResult<ContactGroupsEvaluateDynamicResponses, ContactGroupsEvaluateDynamicErrors, ThrowOnError>;
|
|
1406
1517
|
/**
|
|
1407
1518
|
* Preview contact group criteria
|
|
@@ -1430,16 +1541,13 @@ export declare class CustomFields {
|
|
|
1430
1541
|
/**
|
|
1431
1542
|
* List custom fields
|
|
1432
1543
|
*
|
|
1433
|
-
* Returns
|
|
1544
|
+
* Returns every custom field definition for the organization in display order. An organization defines at most 100, so the list is never paged.
|
|
1434
1545
|
*/
|
|
1435
|
-
static list<ThrowOnError extends boolean = false>(
|
|
1436
|
-
page?: string | null | undefined;
|
|
1437
|
-
limit?: string | null | undefined;
|
|
1438
|
-
}, options?: Options<never, ThrowOnError>): RequestResult<CustomFieldsListResponses, CustomFieldsListErrors, ThrowOnError>;
|
|
1546
|
+
static list<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<CustomFieldsListResponses, CustomFieldsListErrors, ThrowOnError>;
|
|
1439
1547
|
/**
|
|
1440
1548
|
* Create a custom field
|
|
1441
1549
|
*
|
|
1442
|
-
* Creates a new custom field definition and returns it with a 201 status; the field key must be unique.
|
|
1550
|
+
* Creates a new custom field definition and returns it with a 201 status; the field key must be unique, and an organization defines at most 100.
|
|
1443
1551
|
*/
|
|
1444
1552
|
static create<ThrowOnError extends boolean = false>(parameters: {
|
|
1445
1553
|
key: string;
|
|
@@ -1479,16 +1587,13 @@ export declare class Unsubscribe {
|
|
|
1479
1587
|
/**
|
|
1480
1588
|
* List unsubscribe groups
|
|
1481
1589
|
*
|
|
1482
|
-
* Returns
|
|
1590
|
+
* Returns every unsubscribe group in the organization, the default group first, then by name. An organization holds at most 200, so the list is never paged.
|
|
1483
1591
|
*/
|
|
1484
|
-
static list<ThrowOnError extends boolean = false>(
|
|
1485
|
-
page?: string | null | undefined;
|
|
1486
|
-
limit?: string | null | undefined;
|
|
1487
|
-
}, options?: Options<never, ThrowOnError>): RequestResult<UnsubscribeListResponses, UnsubscribeListErrors, ThrowOnError>;
|
|
1592
|
+
static list<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<UnsubscribeListResponses, UnsubscribeListErrors, ThrowOnError>;
|
|
1488
1593
|
/**
|
|
1489
1594
|
* Create an unsubscribe group
|
|
1490
1595
|
*
|
|
1491
|
-
* Creates a new unsubscribe group and returns it with a 201 Created status.
|
|
1596
|
+
* Creates a new unsubscribe group and returns it with a 201 Created status. An organization holds at most 200 groups.
|
|
1492
1597
|
*/
|
|
1493
1598
|
static create<ThrowOnError extends boolean = false>(parameters: {
|
|
1494
1599
|
name: string;
|
|
@@ -1526,18 +1631,18 @@ export declare class Unsubscribe {
|
|
|
1526
1631
|
* Removes one or more email addresses from an unsubscribe group and returns the number removed.
|
|
1527
1632
|
*/
|
|
1528
1633
|
static removeEmails<ThrowOnError extends boolean = false>(parameters: {
|
|
1529
|
-
|
|
1634
|
+
id: UnsubscribeId;
|
|
1530
1635
|
emails: Array<string>;
|
|
1531
1636
|
}, options?: Options<never, ThrowOnError>): RequestResult<UnsubscribeRemoveEmailsResponses, UnsubscribeRemoveEmailsErrors, ThrowOnError>;
|
|
1532
1637
|
/**
|
|
1533
1638
|
* List unsubscribe group members
|
|
1534
1639
|
*
|
|
1535
|
-
* Returns
|
|
1640
|
+
* Returns the email addresses in an unsubscribe group, newest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
1536
1641
|
*/
|
|
1537
1642
|
static listMembers<ThrowOnError extends boolean = false>(parameters: {
|
|
1538
|
-
|
|
1539
|
-
page?: string | null | undefined;
|
|
1643
|
+
id: UnsubscribeId;
|
|
1540
1644
|
limit?: string | null | undefined;
|
|
1645
|
+
cursor?: Cursor | null | undefined;
|
|
1541
1646
|
}, options?: Options<never, ThrowOnError>): RequestResult<UnsubscribeListMembersResponses, UnsubscribeListMembersErrors, ThrowOnError>;
|
|
1542
1647
|
/**
|
|
1543
1648
|
* Add contacts to an unsubscribe group
|
|
@@ -1545,7 +1650,7 @@ export declare class Unsubscribe {
|
|
|
1545
1650
|
* Adds one or more email addresses to an unsubscribe group and returns the number added and the number skipped.
|
|
1546
1651
|
*/
|
|
1547
1652
|
static addEmails<ThrowOnError extends boolean = false>(parameters: {
|
|
1548
|
-
|
|
1653
|
+
id: UnsubscribeId;
|
|
1549
1654
|
emails: Array<string>;
|
|
1550
1655
|
source?: "link" | "api" | "manual" | "complaint" | null | undefined;
|
|
1551
1656
|
}, options?: Options<never, ThrowOnError>): RequestResult<UnsubscribeAddEmailsResponses, UnsubscribeAddEmailsErrors, ThrowOnError>;
|
|
@@ -1566,11 +1671,11 @@ export declare class Analytics {
|
|
|
1566
1671
|
/**
|
|
1567
1672
|
* Get message volume analytics
|
|
1568
1673
|
*
|
|
1569
|
-
* Returns outbound message counts over the half-open selected instant range, grouped by organization-local calendar day, week, or month. A range with traffic returns every bucket in it, including the ones that saw none; a range with no outbound traffic at all returns no buckets. A range with no `
|
|
1674
|
+
* Returns outbound message counts over the half-open selected instant range, grouped by organization-local calendar day, week, or month. A range with traffic returns every bucket in it, including the ones that saw none; a range with no outbound traffic at all returns no buckets. A range with no `before` runs through the current instant, so its quiet trailing buckets are reported as zero.
|
|
1570
1675
|
*/
|
|
1571
1676
|
static getStats<ThrowOnError extends boolean = false>(parameters?: {
|
|
1572
|
-
|
|
1573
|
-
|
|
1677
|
+
after?: string | null | undefined;
|
|
1678
|
+
before?: string | null | undefined;
|
|
1574
1679
|
groupBy?: "day" | "week" | "month" | null | undefined;
|
|
1575
1680
|
channel?: "email" | null | undefined;
|
|
1576
1681
|
}, options?: Options<never, ThrowOnError>): RequestResult<AnalyticsGetStatsResponses, AnalyticsGetStatsErrors, ThrowOnError>;
|
|
@@ -1580,8 +1685,8 @@ export declare class Analytics {
|
|
|
1580
1685
|
* Returns aggregate delivery metrics plus unique-message email Open and Click rates over the selected date range. `sent` counts every outbound message accepted in the range; each rate is taken over the messages the channel actually attempted, so one still waiting to be sent neither helps nor hurts it. Each engagement rate uses the corresponding tracking-eligible delivered-message cohort; repeated provider observations do not inflate the numerator.
|
|
1581
1686
|
*/
|
|
1582
1687
|
static getChannelStats<ThrowOnError extends boolean = false>(parameters?: {
|
|
1583
|
-
|
|
1584
|
-
|
|
1688
|
+
after?: string | null | undefined;
|
|
1689
|
+
before?: string | null | undefined;
|
|
1585
1690
|
}, options?: Options<never, ThrowOnError>): RequestResult<AnalyticsGetChannelStatsResponses, AnalyticsGetChannelStatsErrors, ThrowOnError>;
|
|
1586
1691
|
/**
|
|
1587
1692
|
* List top contacts by message volume
|
|
@@ -1589,8 +1694,8 @@ export declare class Analytics {
|
|
|
1589
1694
|
* Returns the contacts your organization exchanged the most messages with over the selected date range. `sortBy` chooses the traffic `messageCount` reports and ranks by: `sent` counts outbound messages addressed to the contact, `received` counts inbound messages the contact sent you, and `total` (the default) counts both. Contacts with no traffic in the range are omitted, and at most 100 are returned.
|
|
1590
1695
|
*/
|
|
1591
1696
|
static getTopContacts<ThrowOnError extends boolean = false>(parameters?: {
|
|
1592
|
-
|
|
1593
|
-
|
|
1697
|
+
after?: string | null | undefined;
|
|
1698
|
+
before?: string | null | undefined;
|
|
1594
1699
|
limit?: string | null | undefined;
|
|
1595
1700
|
sortBy?: "sent" | "received" | "total" | null | undefined;
|
|
1596
1701
|
}, options?: Options<never, ThrowOnError>): RequestResult<AnalyticsGetTopContactsResponses, AnalyticsGetTopContactsErrors, ThrowOnError>;
|
|
@@ -1600,8 +1705,8 @@ export declare class Analytics {
|
|
|
1600
1705
|
* Returns outbound message counts over the half-open selected instant range, bucketed by organization-local hour. Empty ranges return no rows; non-empty ranges include all 24 hours.
|
|
1601
1706
|
*/
|
|
1602
1707
|
static getHourlyDistribution<ThrowOnError extends boolean = false>(parameters?: {
|
|
1603
|
-
|
|
1604
|
-
|
|
1708
|
+
after?: string | null | undefined;
|
|
1709
|
+
before?: string | null | undefined;
|
|
1605
1710
|
}, options?: Options<never, ThrowOnError>): RequestResult<AnalyticsGetHourlyDistributionResponses, AnalyticsGetHourlyDistributionErrors, ThrowOnError>;
|
|
1606
1711
|
/**
|
|
1607
1712
|
* Get message delivery metrics
|
|
@@ -1609,8 +1714,8 @@ export declare class Analytics {
|
|
|
1609
1714
|
* Returns delivered, failed, and pending rates plus average delivery time for the outbound messages accepted in the selected date range, optionally filtered by channel. Every accepted message falls into exactly one of the three, so they always sum to 100%: a complaint counts as delivered because the message arrived, a bounce counts as failed, and anything the provider has not resolved yet counts as pending. Mail your organization received is not rated here.
|
|
1610
1715
|
*/
|
|
1611
1716
|
static getDeliveryMetrics<ThrowOnError extends boolean = false>(parameters?: {
|
|
1612
|
-
|
|
1613
|
-
|
|
1717
|
+
after?: string | null | undefined;
|
|
1718
|
+
before?: string | null | undefined;
|
|
1614
1719
|
channel?: "email" | null | undefined;
|
|
1615
1720
|
}, options?: Options<never, ThrowOnError>): RequestResult<AnalyticsGetDeliveryMetricsResponses, AnalyticsGetDeliveryMetricsErrors, ThrowOnError>;
|
|
1616
1721
|
/**
|
|
@@ -1619,8 +1724,8 @@ export declare class Analytics {
|
|
|
1619
1724
|
* Exports one record per outbound message accepted in the given date range as CSV or JSON and returns the file content inline. CSV follows RFC 4180: fields containing a quote, comma, or line break are quoted with embedded quotes doubled, and records are separated by CRLF. At most 10,000 records are returned, newest first.
|
|
1620
1725
|
*/
|
|
1621
1726
|
static exportData<ThrowOnError extends boolean = false>(parameters: {
|
|
1622
|
-
|
|
1623
|
-
|
|
1727
|
+
after: string;
|
|
1728
|
+
before: string;
|
|
1624
1729
|
format?: "csv" | "json" | null | undefined;
|
|
1625
1730
|
includeChannels?: Array<"email"> | null | undefined;
|
|
1626
1731
|
}, options?: Options<never, ThrowOnError>): RequestResult<AnalyticsExportDataResponses, AnalyticsExportDataErrors, ThrowOnError>;
|
|
@@ -1632,18 +1737,16 @@ export declare class Templates {
|
|
|
1632
1737
|
/**
|
|
1633
1738
|
* List templates
|
|
1634
1739
|
*
|
|
1635
|
-
* Returns
|
|
1740
|
+
* Returns template summaries, newest first, filterable by category, channel, status, project, and search. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Read a template's compiled content, current publication, and input schema with `GET /v1/templates/{id}`.
|
|
1636
1741
|
*/
|
|
1637
1742
|
static list<ThrowOnError extends boolean = false>(parameters?: {
|
|
1638
|
-
page?: string | null | undefined;
|
|
1639
1743
|
limit?: string | null | undefined;
|
|
1744
|
+
cursor?: Cursor | null | undefined;
|
|
1640
1745
|
category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | undefined;
|
|
1641
1746
|
channel?: "email" | null | undefined;
|
|
1642
1747
|
status?: "draft" | "pending" | "approved" | "published" | "rejected" | "archived" | null | undefined;
|
|
1643
1748
|
search?: string | null | undefined;
|
|
1644
1749
|
projectId?: TemplateProjectId | null | undefined;
|
|
1645
|
-
sortBy?: "name" | "createdAt" | "updatedAt" | "usageCount" | "lastUsedAt" | null | undefined;
|
|
1646
|
-
sortOrder?: "asc" | "desc" | null | undefined;
|
|
1647
1750
|
}, options?: Options<never, ThrowOnError>): RequestResult<TemplatesListResponses, TemplatesListErrors, ThrowOnError>;
|
|
1648
1751
|
/**
|
|
1649
1752
|
* Create a template
|
|
@@ -1664,11 +1767,11 @@ export declare class Templates {
|
|
|
1664
1767
|
/**
|
|
1665
1768
|
* List template families
|
|
1666
1769
|
*
|
|
1667
|
-
* Returns
|
|
1770
|
+
* Returns the organization's template families with their members, newest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
1668
1771
|
*/
|
|
1669
1772
|
static listFamilies<ThrowOnError extends boolean = false>(parameters?: {
|
|
1670
|
-
page?: string | null | undefined;
|
|
1671
1773
|
limit?: string | null | undefined;
|
|
1774
|
+
cursor?: Cursor | null | undefined;
|
|
1672
1775
|
}, options?: Options<never, ThrowOnError>): RequestResult<TemplatesListFamiliesResponses, TemplatesListFamiliesErrors, ThrowOnError>;
|
|
1673
1776
|
/**
|
|
1674
1777
|
* Create a template family
|
|
@@ -1684,7 +1787,7 @@ export declare class Templates {
|
|
|
1684
1787
|
* Deletes a template family without deleting its member templates.
|
|
1685
1788
|
*/
|
|
1686
1789
|
static deleteFamily<ThrowOnError extends boolean = false>(parameters: {
|
|
1687
|
-
|
|
1790
|
+
id: TemplateFamilyId;
|
|
1688
1791
|
}, options?: Options<never, ThrowOnError>): RequestResult<TemplatesDeleteFamilyResponses, TemplatesDeleteFamilyErrors, ThrowOnError>;
|
|
1689
1792
|
/**
|
|
1690
1793
|
* Get a template family
|
|
@@ -1692,7 +1795,7 @@ export declare class Templates {
|
|
|
1692
1795
|
* Returns a template family and its channel-specific member templates.
|
|
1693
1796
|
*/
|
|
1694
1797
|
static getFamily<ThrowOnError extends boolean = false>(parameters: {
|
|
1695
|
-
|
|
1798
|
+
id: TemplateFamilyId;
|
|
1696
1799
|
}, options?: Options<never, ThrowOnError>): RequestResult<TemplatesGetFamilyResponses, TemplatesGetFamilyErrors, ThrowOnError>;
|
|
1697
1800
|
/**
|
|
1698
1801
|
* Rename a template family
|
|
@@ -1700,7 +1803,7 @@ export declare class Templates {
|
|
|
1700
1803
|
* Changes a template family's name and returns the updated family.
|
|
1701
1804
|
*/
|
|
1702
1805
|
static renameFamily<ThrowOnError extends boolean = false>(parameters: {
|
|
1703
|
-
|
|
1806
|
+
id: TemplateFamilyId;
|
|
1704
1807
|
name: string;
|
|
1705
1808
|
}, options?: Options<never, ThrowOnError>): RequestResult<TemplatesRenameFamilyResponses, TemplatesRenameFamilyErrors, ThrowOnError>;
|
|
1706
1809
|
/**
|
|
@@ -1718,7 +1821,7 @@ export declare class Templates {
|
|
|
1718
1821
|
* Removes a member template from the family without deleting the template.
|
|
1719
1822
|
*/
|
|
1720
1823
|
static detachFamilyMember<ThrowOnError extends boolean = false>(parameters: {
|
|
1721
|
-
|
|
1824
|
+
id: TemplateFamilyId;
|
|
1722
1825
|
templateId: TemplateId;
|
|
1723
1826
|
}, options?: Options<never, ThrowOnError>): RequestResult<TemplatesDetachFamilyMemberResponses, TemplatesDetachFamilyMemberErrors, ThrowOnError>;
|
|
1724
1827
|
/**
|
|
@@ -1727,7 +1830,7 @@ export declare class Templates {
|
|
|
1727
1830
|
* Adds an existing template as a channel member of the family and returns the updated family.
|
|
1728
1831
|
*/
|
|
1729
1832
|
static attachFamilyMember<ThrowOnError extends boolean = false>(parameters: {
|
|
1730
|
-
|
|
1833
|
+
id: TemplateFamilyId;
|
|
1731
1834
|
templateId: TemplateId;
|
|
1732
1835
|
}, options?: Options<never, ThrowOnError>): RequestResult<TemplatesAttachFamilyMemberResponses, TemplatesAttachFamilyMemberErrors, ThrowOnError>;
|
|
1733
1836
|
/**
|
|
@@ -1741,7 +1844,7 @@ export declare class Templates {
|
|
|
1741
1844
|
/**
|
|
1742
1845
|
* Get a template
|
|
1743
1846
|
*
|
|
1744
|
-
* Returns template
|
|
1847
|
+
* Returns the template with its project entry path, delivery defaults, compiled channel content, current publication, and the input schema that publication validates against. Open live project files through the workspace API.
|
|
1745
1848
|
*/
|
|
1746
1849
|
static getById<ThrowOnError extends boolean = false>(parameters: {
|
|
1747
1850
|
id: TemplateId;
|
|
@@ -1770,7 +1873,7 @@ export declare class Templates {
|
|
|
1770
1873
|
* Registers a `.tsx` file under `templates/` or `emails/` in an existing template project as its own template and returns it with status 201. The file does not need to exist yet; publishing fails until a commit contains it. Repeating the call with the same entry path, name, and slug returns the existing template.
|
|
1771
1874
|
*/
|
|
1772
1875
|
static addEntry<ThrowOnError extends boolean = false>(parameters: {
|
|
1773
|
-
|
|
1876
|
+
id: TemplateProjectId;
|
|
1774
1877
|
entryPath: string;
|
|
1775
1878
|
name: string;
|
|
1776
1879
|
slug: string;
|
|
@@ -1911,10 +2014,12 @@ export declare class Templates {
|
|
|
1911
2014
|
/**
|
|
1912
2015
|
* List a template's input contracts
|
|
1913
2016
|
*
|
|
1914
|
-
* Returns
|
|
2017
|
+
* Returns the immutable input contracts this template has published under, newest version first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Send against a contract to follow later publications that validate input identically.
|
|
1915
2018
|
*/
|
|
1916
2019
|
static listInputContracts<ThrowOnError extends boolean = false>(parameters: {
|
|
1917
2020
|
id: TemplateId;
|
|
2021
|
+
limit?: string | null | undefined;
|
|
2022
|
+
cursor?: VersionCursor | null | undefined;
|
|
1918
2023
|
}, options?: Options<never, ThrowOnError>): RequestResult<TemplatesListInputContractsResponses, TemplatesListInputContractsErrors, ThrowOnError>;
|
|
1919
2024
|
/**
|
|
1920
2025
|
* Get a template input contract
|
|
@@ -2041,11 +2146,11 @@ export declare class Webhooks {
|
|
|
2041
2146
|
/**
|
|
2042
2147
|
* List webhooks
|
|
2043
2148
|
*
|
|
2044
|
-
* Returns
|
|
2149
|
+
* Returns the organization's webhook endpoints, oldest first, with each endpoint's delivery counts, optionally filtered by a search term matched against name and URL, and by status. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
2045
2150
|
*/
|
|
2046
2151
|
static list<ThrowOnError extends boolean = false>(parameters?: {
|
|
2047
|
-
page?: string | null | undefined;
|
|
2048
2152
|
limit?: string | null | undefined;
|
|
2153
|
+
cursor?: Cursor | null | undefined;
|
|
2049
2154
|
search?: string | null | undefined;
|
|
2050
2155
|
status?: "active" | "disabled" | null | undefined;
|
|
2051
2156
|
}, options?: Options<never, ThrowOnError>): RequestResult<WebhooksListResponses, WebhooksListErrors, ThrowOnError>;
|
|
@@ -2057,8 +2162,10 @@ export declare class Webhooks {
|
|
|
2057
2162
|
static create<ThrowOnError extends boolean = false>(parameters: {
|
|
2058
2163
|
name: string;
|
|
2059
2164
|
url: string;
|
|
2060
|
-
eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated">;
|
|
2165
|
+
eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded">;
|
|
2061
2166
|
channels?: Array<"email"> | null | undefined;
|
|
2167
|
+
mailboxIds?: [MailboxId] | null | undefined;
|
|
2168
|
+
namespaceId?: NamespaceId | null | undefined;
|
|
2062
2169
|
headers?: {
|
|
2063
2170
|
[key: string]: string;
|
|
2064
2171
|
} | null | undefined;
|
|
@@ -2089,8 +2196,10 @@ export declare class Webhooks {
|
|
|
2089
2196
|
id: WebhookEndpointId;
|
|
2090
2197
|
name?: string | null | undefined;
|
|
2091
2198
|
url?: string | null | undefined;
|
|
2092
|
-
eventTypes?: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated"> | null | undefined;
|
|
2199
|
+
eventTypes?: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded"> | null | undefined;
|
|
2093
2200
|
channels?: Array<"email"> | null | null | undefined;
|
|
2201
|
+
mailboxIds?: [MailboxId] | null | null | undefined;
|
|
2202
|
+
namespaceId?: NamespaceId | null | null | undefined;
|
|
2094
2203
|
headers?: {
|
|
2095
2204
|
[key: string]: string;
|
|
2096
2205
|
} | null | undefined;
|
|
@@ -2110,20 +2219,22 @@ export declare class Webhooks {
|
|
|
2110
2219
|
/**
|
|
2111
2220
|
* List webhook delivery logs
|
|
2112
2221
|
*
|
|
2113
|
-
* Returns
|
|
2222
|
+
* Returns a webhook endpoint's deliveries, newest first, each naming the event type and time it was made for, with its nested attempt diagnostics. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
2114
2223
|
*/
|
|
2115
2224
|
static getLogs<ThrowOnError extends boolean = false>(parameters: {
|
|
2116
|
-
|
|
2225
|
+
id: WebhookEndpointId;
|
|
2117
2226
|
limit?: string | null | undefined;
|
|
2227
|
+
cursor?: Cursor | null | undefined;
|
|
2118
2228
|
}, options?: Options<never, ThrowOnError>): RequestResult<WebhooksGetLogsResponses, WebhooksGetLogsErrors, ThrowOnError>;
|
|
2119
2229
|
/**
|
|
2120
2230
|
* Get webhook delivery statistics
|
|
2121
2231
|
*
|
|
2122
|
-
* Returns aggregate pending, delivered, exhausted, and cancelled delivery counts for a webhook endpoint, plus the same counts per organization-local calendar day
|
|
2232
|
+
* Returns aggregate pending, delivered, exhausted, and cancelled delivery counts for a webhook endpoint over its whole retained history, plus the same counts per organization-local calendar day between `after` and `before`, a window of at most 90 days that defaults to the last 30 days. Deliveries are retained for 90 days, so the longest window is the whole history.
|
|
2123
2233
|
*/
|
|
2124
2234
|
static getStats<ThrowOnError extends boolean = false>(parameters: {
|
|
2125
|
-
|
|
2126
|
-
|
|
2235
|
+
id: WebhookEndpointId;
|
|
2236
|
+
after?: string | null | undefined;
|
|
2237
|
+
before?: string | null | undefined;
|
|
2127
2238
|
}, options?: Options<never, ThrowOnError>): RequestResult<WebhooksGetStatsResponses, WebhooksGetStatsErrors, ThrowOnError>;
|
|
2128
2239
|
/**
|
|
2129
2240
|
* Retry a webhook delivery
|
|
@@ -2131,7 +2242,7 @@ export declare class Webhooks {
|
|
|
2131
2242
|
* Performs one immediate manual redelivery attempt and returns that attempt's identity and outcome without changing the automatic retry lifecycle.
|
|
2132
2243
|
*/
|
|
2133
2244
|
static retryDelivery<ThrowOnError extends boolean = false>(parameters: {
|
|
2134
|
-
|
|
2245
|
+
id: WebhookEndpointId;
|
|
2135
2246
|
deliveryId: WebhookDeliveryId;
|
|
2136
2247
|
}, options?: Options<never, ThrowOnError>): RequestResult<WebhooksRetryDeliveryResponses, WebhooksRetryDeliveryErrors, ThrowOnError>;
|
|
2137
2248
|
/**
|
|
@@ -2140,7 +2251,7 @@ export declare class Webhooks {
|
|
|
2140
2251
|
* Generates and returns a new signing secret. The previous secret remains valid for a 24-hour rotation overlap.
|
|
2141
2252
|
*/
|
|
2142
2253
|
static regenerateSecret<ThrowOnError extends boolean = false>(parameters: {
|
|
2143
|
-
|
|
2254
|
+
id: WebhookEndpointId;
|
|
2144
2255
|
}, options?: Options<never, ThrowOnError>): RequestResult<WebhooksRegenerateSecretResponses, WebhooksRegenerateSecretErrors, ThrowOnError>;
|
|
2145
2256
|
}
|
|
2146
2257
|
export declare class Webhooks2 {
|
|
@@ -2187,10 +2298,11 @@ export declare class Organizations {
|
|
|
2187
2298
|
/**
|
|
2188
2299
|
* Get organization usage
|
|
2189
2300
|
*
|
|
2190
|
-
* Returns usage statistics for the current organization
|
|
2301
|
+
* Returns usage statistics for the current organization between `after` and `before`, which default to the current calendar month so far. `usage.periodStart` and `usage.periodEnd` echo the window counted.
|
|
2191
2302
|
*/
|
|
2192
2303
|
static getUsage<ThrowOnError extends boolean = false>(parameters?: {
|
|
2193
|
-
|
|
2304
|
+
after?: string | null | undefined;
|
|
2305
|
+
before?: string | null | undefined;
|
|
2194
2306
|
}, options?: Options<never, ThrowOnError>): RequestResult<OrganizationsGetUsageResponses, OrganizationsGetUsageErrors, ThrowOnError>;
|
|
2195
2307
|
/**
|
|
2196
2308
|
* Delete the current organization
|
|
@@ -2209,11 +2321,11 @@ export declare class ApiKeys {
|
|
|
2209
2321
|
/**
|
|
2210
2322
|
* List API keys
|
|
2211
2323
|
*
|
|
2212
|
-
* Returns
|
|
2324
|
+
* Returns the organization's API keys, newest first, filterable by status and a search term matched against name and description. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
2213
2325
|
*/
|
|
2214
2326
|
static list<ThrowOnError extends boolean = false>(parameters?: {
|
|
2215
|
-
page?: string | null | undefined;
|
|
2216
2327
|
limit?: string | null | undefined;
|
|
2328
|
+
cursor?: Cursor | null | undefined;
|
|
2217
2329
|
status?: "active" | "revoked" | null | undefined;
|
|
2218
2330
|
search?: string | null | undefined;
|
|
2219
2331
|
}, options?: Options<never, ThrowOnError>): RequestResult<ApiKeysListResponses, ApiKeysListErrors, ThrowOnError>;
|
|
@@ -2228,14 +2340,6 @@ export declare class ApiKeys {
|
|
|
2228
2340
|
expiresAt?: string | null | undefined;
|
|
2229
2341
|
access?: ApiKeyAccess | null | undefined;
|
|
2230
2342
|
}, options?: Options<never, ThrowOnError>): RequestResult<ApiKeysCreateResponses, ApiKeysCreateErrors, ThrowOnError>;
|
|
2231
|
-
/**
|
|
2232
|
-
* Revoke an API key
|
|
2233
|
-
*
|
|
2234
|
-
* Deactivates an API key so it can no longer authenticate requests. The key record is retained and remains listable.
|
|
2235
|
-
*/
|
|
2236
|
-
static revoke<ThrowOnError extends boolean = false>(parameters: {
|
|
2237
|
-
id: ApiKeyId;
|
|
2238
|
-
}, options?: Options<never, ThrowOnError>): RequestResult<ApiKeysRevokeResponses, ApiKeysRevokeErrors, ThrowOnError>;
|
|
2239
2343
|
/**
|
|
2240
2344
|
* Get an API key
|
|
2241
2345
|
*
|
|
@@ -2247,49 +2351,852 @@ export declare class ApiKeys {
|
|
|
2247
2351
|
/**
|
|
2248
2352
|
* Update an API key
|
|
2249
2353
|
*
|
|
2250
|
-
* Updates
|
|
2354
|
+
* Updates an API key's settings and returns the updated key. A field left out keeps its value.
|
|
2251
2355
|
*/
|
|
2252
2356
|
static update<ThrowOnError extends boolean = false>(parameters: {
|
|
2253
2357
|
id: ApiKeyId;
|
|
2254
2358
|
name?: string | null | undefined;
|
|
2255
2359
|
description?: string | null | undefined;
|
|
2360
|
+
mailboxes?: ApiKeyMailboxAccessUpdate | null | undefined;
|
|
2256
2361
|
}, options?: Options<never, ThrowOnError>): RequestResult<ApiKeysUpdateResponses, ApiKeysUpdateErrors, ThrowOnError>;
|
|
2257
2362
|
/**
|
|
2258
|
-
*
|
|
2363
|
+
* Revoke an API key
|
|
2259
2364
|
*
|
|
2260
|
-
*
|
|
2365
|
+
* Deactivates an API key so it can no longer authenticate requests. Revocation is final: a revoked key never authenticates again. Its record stays listable, so the messages it sent stay attributed to it.
|
|
2261
2366
|
*/
|
|
2262
|
-
static
|
|
2367
|
+
static revoke<ThrowOnError extends boolean = false>(parameters: {
|
|
2263
2368
|
id: ApiKeyId;
|
|
2264
|
-
}, options?: Options<never, ThrowOnError>): RequestResult<
|
|
2369
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ApiKeysRevokeResponses, ApiKeysRevokeErrors, ThrowOnError>;
|
|
2265
2370
|
/**
|
|
2266
|
-
*
|
|
2371
|
+
* Rotate an API key
|
|
2267
2372
|
*
|
|
2268
|
-
*
|
|
2373
|
+
* Issues a replacement with the same owner, name, and access, then deactivates the existing key. Returns the new key, including the plaintext secret.
|
|
2269
2374
|
*/
|
|
2270
|
-
static
|
|
2375
|
+
static rotate<ThrowOnError extends boolean = false>(parameters: {
|
|
2271
2376
|
id: ApiKeyId;
|
|
2272
|
-
}, options?: Options<never, ThrowOnError>): RequestResult<
|
|
2377
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ApiKeysRotateResponses, ApiKeysRotateErrors, ThrowOnError>;
|
|
2273
2378
|
/**
|
|
2274
2379
|
* Get API key send statistics
|
|
2275
2380
|
*
|
|
2276
|
-
* Returns aggregate send counts and daily volume attributed to an API key
|
|
2381
|
+
* Returns aggregate send counts and daily volume attributed to an API key between `after` and `before`, a window of at most 90 days that defaults to the last 30 days.
|
|
2277
2382
|
*/
|
|
2278
2383
|
static getStats<ThrowOnError extends boolean = false>(parameters: {
|
|
2279
2384
|
id: ApiKeyId;
|
|
2280
|
-
|
|
2385
|
+
after?: string | null | undefined;
|
|
2386
|
+
before?: string | null | undefined;
|
|
2281
2387
|
}, options?: Options<never, ThrowOnError>): RequestResult<ApiKeysGetStatsResponses, ApiKeysGetStatsErrors, ThrowOnError>;
|
|
2282
2388
|
/**
|
|
2283
2389
|
* List API key activity
|
|
2284
2390
|
*
|
|
2285
|
-
* Returns
|
|
2391
|
+
* Returns the sends attributed to an API key, newest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
2286
2392
|
*/
|
|
2287
2393
|
static getActivity<ThrowOnError extends boolean = false>(parameters: {
|
|
2288
2394
|
id: ApiKeyId;
|
|
2289
|
-
page?: string | null | undefined;
|
|
2290
2395
|
limit?: string | null | undefined;
|
|
2396
|
+
cursor?: Cursor | null | undefined;
|
|
2291
2397
|
}, options?: Options<never, ThrowOnError>): RequestResult<ApiKeysGetActivityResponses, ApiKeysGetActivityErrors, ThrowOnError>;
|
|
2292
2398
|
}
|
|
2293
2399
|
export declare class ApiKeys2 {
|
|
2294
2400
|
static apiKeys: typeof ApiKeys;
|
|
2295
2401
|
}
|
|
2402
|
+
export declare class Feedback {
|
|
2403
|
+
/**
|
|
2404
|
+
* Send feedback
|
|
2405
|
+
*
|
|
2406
|
+
* Tells Samva what was confusing, broken, or missing in the API. Programs and coding agents can call it the moment something goes wrong, naming the operation and resource involved. Samva's team reads every report; the answer is a receipt, not a reply.
|
|
2407
|
+
*/
|
|
2408
|
+
static send<ThrowOnError extends boolean = false>(parameters: {
|
|
2409
|
+
message: string;
|
|
2410
|
+
category?: "bug" | "confusing" | "missing" | "other" | null | undefined;
|
|
2411
|
+
context?: FeedbackContext | null | undefined;
|
|
2412
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<FeedbackSendResponses, FeedbackSendErrors, ThrowOnError>;
|
|
2413
|
+
}
|
|
2414
|
+
export declare class Feedback2 {
|
|
2415
|
+
static feedback: typeof Feedback;
|
|
2416
|
+
}
|
|
2417
|
+
export declare class Mailboxes {
|
|
2418
|
+
/**
|
|
2419
|
+
* List mailboxes
|
|
2420
|
+
*
|
|
2421
|
+
* Returns summaries of the mailboxes the caller can read, newest first, filterable by creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Read a mailbox's addresses and metadata with `GET /v1/mailboxes/{id}`.
|
|
2422
|
+
*/
|
|
2423
|
+
static list<ThrowOnError extends boolean = false>(parameters?: {
|
|
2424
|
+
limit?: string | null | undefined;
|
|
2425
|
+
cursor?: Cursor | null | undefined;
|
|
2426
|
+
after?: string | null | undefined;
|
|
2427
|
+
before?: string | null | undefined;
|
|
2428
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListResponses, MailboxesListErrors, ThrowOnError>;
|
|
2429
|
+
/**
|
|
2430
|
+
* Create a mailbox
|
|
2431
|
+
*
|
|
2432
|
+
* Creates a mailbox with its addresses and returns it with status 201; the caller gets an admin grant on it. Each address must be under the organization's Samva-hosted mail domain or a verified domain with receiving enabled. The mailbox receives mail from now on; mail that arrived earlier is not added to it. Conflicts if an address or slug is already in use. Returns 402 when the organization is at its plan's mailbox allowance or at its mailbox storage allowance; incoming mail is still received past the storage allowance.
|
|
2433
|
+
*/
|
|
2434
|
+
static create<ThrowOnError extends boolean = false>(parameters: {
|
|
2435
|
+
namespaceId?: NamespaceId | null | undefined;
|
|
2436
|
+
displayName: string;
|
|
2437
|
+
slug: string;
|
|
2438
|
+
addresses: [CreateMailboxAddressPayload];
|
|
2439
|
+
defaultFrom?: {
|
|
2440
|
+
address: string;
|
|
2441
|
+
displayName?: string | null | undefined;
|
|
2442
|
+
} | null | undefined;
|
|
2443
|
+
metadata?: MailboxMetadata | null | undefined;
|
|
2444
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesCreateResponses, MailboxesCreateErrors, ThrowOnError>;
|
|
2445
|
+
/**
|
|
2446
|
+
* Delete a mailbox
|
|
2447
|
+
*
|
|
2448
|
+
* Deletes a mailbox with its addresses, threads, drafts, and history. The messages it received stay with the organization. The mailbox leaves every API key scope and webhook endpoint filter that named it; a key or endpoint left with no mailbox is disabled.
|
|
2449
|
+
*/
|
|
2450
|
+
static remove<ThrowOnError extends boolean = false>(parameters: {
|
|
2451
|
+
id: MailboxId;
|
|
2452
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesRemoveResponses, MailboxesRemoveErrors, ThrowOnError>;
|
|
2453
|
+
/**
|
|
2454
|
+
* Get a mailbox
|
|
2455
|
+
*
|
|
2456
|
+
* Returns a mailbox with its addresses, metadata, and the identity it sends from. Its grants are `GET /v1/mailboxes/{id}/grants` and its send policies `GET /v1/mailboxes/{id}/policies`.
|
|
2457
|
+
*/
|
|
2458
|
+
static get<ThrowOnError extends boolean = false>(parameters: {
|
|
2459
|
+
id: MailboxId;
|
|
2460
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesGetResponses, MailboxesGetErrors, ThrowOnError>;
|
|
2461
|
+
/**
|
|
2462
|
+
* Update a mailbox
|
|
2463
|
+
*
|
|
2464
|
+
* Updates the fields you name and keeps the rest. `metadata` merges into the stored metadata by key, and a `null` value deletes that key. `defaultFrom` must be one of the mailbox's addresses.
|
|
2465
|
+
*/
|
|
2466
|
+
static update<ThrowOnError extends boolean = false>(parameters: {
|
|
2467
|
+
id: MailboxId;
|
|
2468
|
+
displayName?: string | null | undefined;
|
|
2469
|
+
metadata?: MailboxMetadataPatch | null | undefined;
|
|
2470
|
+
defaultFrom?: {
|
|
2471
|
+
address: string;
|
|
2472
|
+
displayName?: string | null | null | undefined;
|
|
2473
|
+
} | null | undefined;
|
|
2474
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesUpdateResponses, MailboxesUpdateErrors, ThrowOnError>;
|
|
2475
|
+
/**
|
|
2476
|
+
* Pause a mailbox
|
|
2477
|
+
*
|
|
2478
|
+
* Stops the mailbox sending and stops new inbound mail reaching it. Mail that arrives while it is paused is not added when it resumes. Resume it with `POST /v1/mailboxes/{id}/resume`.
|
|
2479
|
+
*/
|
|
2480
|
+
static pause<ThrowOnError extends boolean = false>(parameters: {
|
|
2481
|
+
id: MailboxId;
|
|
2482
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesPauseResponses, MailboxesPauseErrors, ThrowOnError>;
|
|
2483
|
+
/**
|
|
2484
|
+
* Resume a mailbox
|
|
2485
|
+
*
|
|
2486
|
+
* Lets a paused mailbox send and receive again.
|
|
2487
|
+
*/
|
|
2488
|
+
static resume<ThrowOnError extends boolean = false>(parameters: {
|
|
2489
|
+
id: MailboxId;
|
|
2490
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesResumeResponses, MailboxesResumeErrors, ThrowOnError>;
|
|
2491
|
+
/**
|
|
2492
|
+
* Get mailbox activity
|
|
2493
|
+
*
|
|
2494
|
+
* Counts the actions proposed and events recorded on a mailbox between `after` and `before` (omit both for all time), and the sends waiting for approval now. List the actions and events themselves with `GET /v1/mailboxes/{id}/actions` and `GET /v1/mailboxes/{id}/events`.
|
|
2495
|
+
*/
|
|
2496
|
+
static getAgentActivity<ThrowOnError extends boolean = false>(parameters: {
|
|
2497
|
+
id: MailboxId;
|
|
2498
|
+
after?: string | null | undefined;
|
|
2499
|
+
before?: string | null | undefined;
|
|
2500
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesGetAgentActivityResponses, MailboxesGetAgentActivityErrors, ThrowOnError>;
|
|
2501
|
+
/**
|
|
2502
|
+
* List mailbox grants
|
|
2503
|
+
*
|
|
2504
|
+
* Returns who can use the mailbox, what each grant allows, and whether its sends wait for approval, newest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
2505
|
+
*/
|
|
2506
|
+
static listGrants<ThrowOnError extends boolean = false>(parameters: {
|
|
2507
|
+
id: MailboxId;
|
|
2508
|
+
limit?: string | null | undefined;
|
|
2509
|
+
cursor?: Cursor | null | undefined;
|
|
2510
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListGrantsResponses, MailboxesListGrantsErrors, ThrowOnError>;
|
|
2511
|
+
/**
|
|
2512
|
+
* Grant a member access to a mailbox
|
|
2513
|
+
*
|
|
2514
|
+
* Shares a mailbox with an organization member and returns the grant with status 201. The member must already belong to the organization. A member who already holds a grant conflicts rather than being rewritten: change an existing grant with `PATCH /v1/mailboxes/{id}/grants/{grantId}`, so a grant is never widened as a side effect of granting. List the current grants with `GET /v1/mailboxes/{id}/grants`.
|
|
2515
|
+
*/
|
|
2516
|
+
static createGrant<ThrowOnError extends boolean = false>(parameters: {
|
|
2517
|
+
id: MailboxId;
|
|
2518
|
+
userId: UserId;
|
|
2519
|
+
role: MailboxGrantRole;
|
|
2520
|
+
sendMode?: MailboxSendMode | null | undefined;
|
|
2521
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesCreateGrantResponses, MailboxesCreateGrantErrors, ThrowOnError>;
|
|
2522
|
+
/**
|
|
2523
|
+
* Revoke a mailbox grant
|
|
2524
|
+
*
|
|
2525
|
+
* Removes a member's access to a mailbox. The last grant that can configure the mailbox cannot be revoked, so a mailbox is never left with nobody able to administer it: grant a teammate the admin role before removing your own.
|
|
2526
|
+
*/
|
|
2527
|
+
static revokeGrant<ThrowOnError extends boolean = false>(parameters: {
|
|
2528
|
+
id: MailboxId;
|
|
2529
|
+
grantId: MailboxGrantId;
|
|
2530
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesRevokeGrantResponses, MailboxesRevokeGrantErrors, ThrowOnError>;
|
|
2531
|
+
/**
|
|
2532
|
+
* Update a mailbox grant
|
|
2533
|
+
*
|
|
2534
|
+
* Changes a member's role, send mode, or both on a mailbox and returns the updated grant. A field left out keeps its value; naming neither is a validation error. Taking admin from the last grant that can configure the mailbox conflicts, as revoking it does. The change applies to the member's next request on every surface.
|
|
2535
|
+
*/
|
|
2536
|
+
static updateGrant<ThrowOnError extends boolean = false>(parameters: {
|
|
2537
|
+
id: MailboxId;
|
|
2538
|
+
grantId: MailboxGrantId;
|
|
2539
|
+
role?: MailboxGrantRole | null | undefined;
|
|
2540
|
+
sendMode?: MailboxSendMode | null | undefined;
|
|
2541
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesUpdateGrantResponses, MailboxesUpdateGrantErrors, ThrowOnError>;
|
|
2542
|
+
/**
|
|
2543
|
+
* List mailbox policies
|
|
2544
|
+
*
|
|
2545
|
+
* Returns every send policy on a mailbox, oldest first. A mailbox holds at most 20 policies, so the list is never paged. Each enabled policy holds (`requireApproval`) or refuses (`deny`) every send from the mailbox; `deny` wins when both apply.
|
|
2546
|
+
*/
|
|
2547
|
+
static listPolicies<ThrowOnError extends boolean = false>(parameters: {
|
|
2548
|
+
id: MailboxId;
|
|
2549
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListPoliciesResponses, MailboxesListPoliciesErrors, ThrowOnError>;
|
|
2550
|
+
/**
|
|
2551
|
+
* Create a mailbox policy
|
|
2552
|
+
*
|
|
2553
|
+
* Adds a send policy to a mailbox and returns it with status 201. It applies to every send proposed after it is created, whoever proposes it. A mailbox that already holds 20 policies conflicts.
|
|
2554
|
+
*/
|
|
2555
|
+
static createPolicy<ThrowOnError extends boolean = false>(parameters: {
|
|
2556
|
+
id: MailboxId;
|
|
2557
|
+
name: string;
|
|
2558
|
+
outcome: MailboxPolicyOutcomeKind;
|
|
2559
|
+
reason?: string | null | undefined;
|
|
2560
|
+
enabled?: boolean | null | undefined;
|
|
2561
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesCreatePolicyResponses, MailboxesCreatePolicyErrors, ThrowOnError>;
|
|
2562
|
+
/**
|
|
2563
|
+
* Delete a mailbox policy
|
|
2564
|
+
*
|
|
2565
|
+
* Deletes a send policy. Sends it already holds stay held until a person approves or denies them.
|
|
2566
|
+
*/
|
|
2567
|
+
static deletePolicy<ThrowOnError extends boolean = false>(parameters: {
|
|
2568
|
+
id: MailboxId;
|
|
2569
|
+
policyId: MailboxPolicyId;
|
|
2570
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesDeletePolicyResponses, MailboxesDeletePolicyErrors, ThrowOnError>;
|
|
2571
|
+
/**
|
|
2572
|
+
* Get a mailbox policy
|
|
2573
|
+
*
|
|
2574
|
+
* Returns one send policy.
|
|
2575
|
+
*/
|
|
2576
|
+
static getPolicy<ThrowOnError extends boolean = false>(parameters: {
|
|
2577
|
+
id: MailboxId;
|
|
2578
|
+
policyId: MailboxPolicyId;
|
|
2579
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesGetPolicyResponses, MailboxesGetPolicyErrors, ThrowOnError>;
|
|
2580
|
+
/**
|
|
2581
|
+
* Update a mailbox policy
|
|
2582
|
+
*
|
|
2583
|
+
* Updates the fields you name and keeps the rest. Set `enabled` to `false` to stop a policy applying without deleting it.
|
|
2584
|
+
*/
|
|
2585
|
+
static updatePolicy<ThrowOnError extends boolean = false>(parameters: {
|
|
2586
|
+
id: MailboxId;
|
|
2587
|
+
policyId: MailboxPolicyId;
|
|
2588
|
+
name?: string | null | undefined;
|
|
2589
|
+
outcome?: MailboxPolicyOutcomeKind | null | undefined;
|
|
2590
|
+
reason?: string | null | null | undefined;
|
|
2591
|
+
enabled?: boolean | null | undefined;
|
|
2592
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesUpdatePolicyResponses, MailboxesUpdatePolicyErrors, ThrowOnError>;
|
|
2593
|
+
/**
|
|
2594
|
+
* List mailbox folders
|
|
2595
|
+
*
|
|
2596
|
+
* Returns each folder that holds a thread with its thread count and the caller's unread count. The folder set is fixed, so the list is never paged.
|
|
2597
|
+
*/
|
|
2598
|
+
static listFolders<ThrowOnError extends boolean = false>(parameters: {
|
|
2599
|
+
id: MailboxId;
|
|
2600
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListFoldersResponses, MailboxesListFoldersErrors, ThrowOnError>;
|
|
2601
|
+
/**
|
|
2602
|
+
* List mailbox labels
|
|
2603
|
+
*
|
|
2604
|
+
* Returns every label defined on a mailbox, ordered by name. A mailbox holds at most 100 labels, so the list is never paged.
|
|
2605
|
+
*/
|
|
2606
|
+
static listLabels<ThrowOnError extends boolean = false>(parameters: {
|
|
2607
|
+
id: MailboxId;
|
|
2608
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListLabelsResponses, MailboxesListLabelsErrors, ThrowOnError>;
|
|
2609
|
+
/**
|
|
2610
|
+
* Create a mailbox label
|
|
2611
|
+
*
|
|
2612
|
+
* Creates a label on a mailbox and returns it with status 201. Slugs are unique within the mailbox, and a mailbox holds at most 100 labels; either limit conflicts.
|
|
2613
|
+
*/
|
|
2614
|
+
static createLabel<ThrowOnError extends boolean = false>(parameters: {
|
|
2615
|
+
id: MailboxId;
|
|
2616
|
+
slug: string;
|
|
2617
|
+
displayName: string;
|
|
2618
|
+
color?: "billing" | "domain" | "agent" | "routing" | "important" | "neutral" | null | null | undefined;
|
|
2619
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesCreateLabelResponses, MailboxesCreateLabelErrors, ThrowOnError>;
|
|
2620
|
+
/**
|
|
2621
|
+
* Delete a mailbox label
|
|
2622
|
+
*
|
|
2623
|
+
* Deletes a label and removes it from every thread that carries it.
|
|
2624
|
+
*/
|
|
2625
|
+
static deleteLabel<ThrowOnError extends boolean = false>(parameters: {
|
|
2626
|
+
id: MailboxId;
|
|
2627
|
+
labelId: MailboxLabelId;
|
|
2628
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesDeleteLabelResponses, MailboxesDeleteLabelErrors, ThrowOnError>;
|
|
2629
|
+
/**
|
|
2630
|
+
* Update a mailbox label
|
|
2631
|
+
*
|
|
2632
|
+
* Updates the fields you name and keeps the rest.
|
|
2633
|
+
*/
|
|
2634
|
+
static updateLabel<ThrowOnError extends boolean = false>(parameters: {
|
|
2635
|
+
id: MailboxId;
|
|
2636
|
+
labelId: MailboxLabelId;
|
|
2637
|
+
displayName?: string | null | undefined;
|
|
2638
|
+
color?: "billing" | "domain" | "agent" | "routing" | "important" | "neutral" | null | null | undefined;
|
|
2639
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesUpdateLabelResponses, MailboxesUpdateLabelErrors, ThrowOnError>;
|
|
2640
|
+
/**
|
|
2641
|
+
* List threads in a mailbox
|
|
2642
|
+
*
|
|
2643
|
+
* Returns thread summaries, most recent activity first. `after` and `before` filter by last activity, so an agent polling for new mail passes the last time it looked. `q` is a full-text search over subjects, senders, and message text; `folder`, `label`, `unread`, and `starred` narrow the list. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. A thread that gains activity while you page moves ahead of the cursor, so a walk lists each thread at most once.
|
|
2644
|
+
*/
|
|
2645
|
+
static listThreads<ThrowOnError extends boolean = false>(parameters: {
|
|
2646
|
+
id: MailboxId;
|
|
2647
|
+
limit?: string | null | undefined;
|
|
2648
|
+
cursor?: Cursor | null | undefined;
|
|
2649
|
+
after?: string | null | undefined;
|
|
2650
|
+
before?: string | null | undefined;
|
|
2651
|
+
q?: string | null | undefined;
|
|
2652
|
+
folder?: MailboxThreadFolder | null | undefined;
|
|
2653
|
+
label?: MailboxLabelId | null | undefined;
|
|
2654
|
+
unread?: "true" | "false" | null | undefined;
|
|
2655
|
+
starred?: "true" | "false" | null | undefined;
|
|
2656
|
+
snoozed?: "true" | "false" | null | undefined;
|
|
2657
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListThreadsResponses, MailboxesListThreadsErrors, ThrowOnError>;
|
|
2658
|
+
/**
|
|
2659
|
+
* Get a mailbox thread
|
|
2660
|
+
*
|
|
2661
|
+
* Returns a thread with its participants and where it stands. Read its messages with `GET .../threads/{threadId}/messages` and their bodies with `GET .../threads/{threadId}/content`.
|
|
2662
|
+
*/
|
|
2663
|
+
static getThread<ThrowOnError extends boolean = false>(parameters: {
|
|
2664
|
+
id: MailboxId;
|
|
2665
|
+
threadId: MailboxThreadId;
|
|
2666
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesGetThreadResponses, MailboxesGetThreadErrors, ThrowOnError>;
|
|
2667
|
+
/**
|
|
2668
|
+
* Update a mailbox thread
|
|
2669
|
+
*
|
|
2670
|
+
* Updates the fields you name and keeps the rest. `folder` and `priority` are shared with everyone on the mailbox; `read`, `starred`, and `snoozedUntil` are the caller's own. Labels are not updated here: use `POST` and `DELETE` on `/v1/mailboxes/{id}/threads/{threadId}/labels`. Returns where the thread stands, not its messages: read those with `GET .../threads/{threadId}`.
|
|
2671
|
+
*/
|
|
2672
|
+
static updateThread<ThrowOnError extends boolean = false>(parameters: {
|
|
2673
|
+
id: MailboxId;
|
|
2674
|
+
threadId: MailboxThreadId;
|
|
2675
|
+
folder?: MailboxThreadFolder | null | undefined;
|
|
2676
|
+
priority?: MailboxThreadPriority | null | undefined;
|
|
2677
|
+
read?: boolean | null | undefined;
|
|
2678
|
+
starred?: boolean | null | undefined;
|
|
2679
|
+
snoozedUntil?: string | null | null | undefined;
|
|
2680
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesUpdateThreadResponses, MailboxesUpdateThreadErrors, ThrowOnError>;
|
|
2681
|
+
/**
|
|
2682
|
+
* Remove thread labels
|
|
2683
|
+
*
|
|
2684
|
+
* Removes the given labels from the thread and returns where the thread stands. A label the thread does not carry is ignored.
|
|
2685
|
+
*/
|
|
2686
|
+
static removeThreadLabels<ThrowOnError extends boolean = false>(parameters: {
|
|
2687
|
+
id: MailboxId;
|
|
2688
|
+
threadId: MailboxThreadId;
|
|
2689
|
+
labels: [MailboxLabelId];
|
|
2690
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesRemoveThreadLabelsResponses, MailboxesRemoveThreadLabelsErrors, ThrowOnError>;
|
|
2691
|
+
/**
|
|
2692
|
+
* Add thread labels
|
|
2693
|
+
*
|
|
2694
|
+
* Adds the given mailbox labels to the thread, keeping the labels it already has, and returns where the thread stands. Every id must be one of the mailbox's labels.
|
|
2695
|
+
*/
|
|
2696
|
+
static addThreadLabels<ThrowOnError extends boolean = false>(parameters: {
|
|
2697
|
+
id: MailboxId;
|
|
2698
|
+
threadId: MailboxThreadId;
|
|
2699
|
+
labels: [MailboxLabelId];
|
|
2700
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesAddThreadLabelsResponses, MailboxesAddThreadLabelsErrors, ThrowOnError>;
|
|
2701
|
+
/**
|
|
2702
|
+
* List messages in a mailbox thread
|
|
2703
|
+
*
|
|
2704
|
+
* Returns the thread's message summaries, oldest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Read the bodies with `GET .../threads/{threadId}/content` or one message with `GET /v1/mailboxes/{id}/messages/{messageId}`.
|
|
2705
|
+
*/
|
|
2706
|
+
static listThreadMessages<ThrowOnError extends boolean = false>(parameters: {
|
|
2707
|
+
id: MailboxId;
|
|
2708
|
+
threadId: MailboxThreadId;
|
|
2709
|
+
limit?: string | null | undefined;
|
|
2710
|
+
cursor?: Cursor | null | undefined;
|
|
2711
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListThreadMessagesResponses, MailboxesListThreadMessagesErrors, ThrowOnError>;
|
|
2712
|
+
/**
|
|
2713
|
+
* Read a mailbox thread
|
|
2714
|
+
*
|
|
2715
|
+
* Returns the thread's messages with their text, sanitized HTML, `replyText` (what each sender wrote, without quoted history), authentication verdicts, and attachments, oldest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
2716
|
+
*/
|
|
2717
|
+
static getThreadContent<ThrowOnError extends boolean = false>(parameters: {
|
|
2718
|
+
id: MailboxId;
|
|
2719
|
+
threadId: MailboxThreadId;
|
|
2720
|
+
limit?: string | null | undefined;
|
|
2721
|
+
cursor?: Cursor | null | undefined;
|
|
2722
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesGetThreadContentResponses, MailboxesGetThreadContentErrors, ThrowOnError>;
|
|
2723
|
+
/**
|
|
2724
|
+
* List notes in a mailbox thread
|
|
2725
|
+
*
|
|
2726
|
+
* Returns the internal notes on a thread with their bodies, oldest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
2727
|
+
*/
|
|
2728
|
+
static listThreadNotes<ThrowOnError extends boolean = false>(parameters: {
|
|
2729
|
+
id: MailboxId;
|
|
2730
|
+
threadId: MailboxThreadId;
|
|
2731
|
+
limit?: string | null | undefined;
|
|
2732
|
+
cursor?: Cursor | null | undefined;
|
|
2733
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListThreadNotesResponses, MailboxesListThreadNotesErrors, ThrowOnError>;
|
|
2734
|
+
/**
|
|
2735
|
+
* Create a mailbox note
|
|
2736
|
+
*
|
|
2737
|
+
* Adds an internal note to a thread and returns it with status 201. Notes are visible to everyone on the mailbox and never sent.
|
|
2738
|
+
*/
|
|
2739
|
+
static createNote<ThrowOnError extends boolean = false>(parameters: {
|
|
2740
|
+
id: MailboxId;
|
|
2741
|
+
threadId: MailboxThreadId;
|
|
2742
|
+
body: string;
|
|
2743
|
+
color?: string | null | null | undefined;
|
|
2744
|
+
pinned?: boolean | null | undefined;
|
|
2745
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesCreateNoteResponses, MailboxesCreateNoteErrors, ThrowOnError>;
|
|
2746
|
+
/**
|
|
2747
|
+
* Delete a mailbox note
|
|
2748
|
+
*
|
|
2749
|
+
* Deletes a note. Only the note's author may.
|
|
2750
|
+
*/
|
|
2751
|
+
static deleteNote<ThrowOnError extends boolean = false>(parameters: {
|
|
2752
|
+
id: MailboxId;
|
|
2753
|
+
threadId: MailboxThreadId;
|
|
2754
|
+
noteId: MailboxNoteId;
|
|
2755
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesDeleteNoteResponses, MailboxesDeleteNoteErrors, ThrowOnError>;
|
|
2756
|
+
/**
|
|
2757
|
+
* Update a mailbox note
|
|
2758
|
+
*
|
|
2759
|
+
* Updates the fields you name and keeps the rest. Only the note's author may.
|
|
2760
|
+
*/
|
|
2761
|
+
static updateNote<ThrowOnError extends boolean = false>(parameters: {
|
|
2762
|
+
id: MailboxId;
|
|
2763
|
+
threadId: MailboxThreadId;
|
|
2764
|
+
noteId: MailboxNoteId;
|
|
2765
|
+
body?: string | null | undefined;
|
|
2766
|
+
color?: string | null | null | undefined;
|
|
2767
|
+
pinned?: boolean | null | undefined;
|
|
2768
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesUpdateNoteResponses, MailboxesUpdateNoteErrors, ThrowOnError>;
|
|
2769
|
+
/**
|
|
2770
|
+
* Send a new message
|
|
2771
|
+
*
|
|
2772
|
+
* Starts a new conversation from the mailbox's default From address. `status` is `sent`, or `pending_approval` when the caller's grant or a mailbox policy holds sends for a person's approval; a policy that denies sends refuses it with 403.
|
|
2773
|
+
*/
|
|
2774
|
+
static sendMessage<ThrowOnError extends boolean = false>(parameters: {
|
|
2775
|
+
"idempotency-key"?: string | null | undefined;
|
|
2776
|
+
id: MailboxId;
|
|
2777
|
+
to: [string];
|
|
2778
|
+
cc?: Array<string> | null | undefined;
|
|
2779
|
+
bcc?: Array<string> | null | undefined;
|
|
2780
|
+
replyTo?: Array<string> | null | undefined;
|
|
2781
|
+
subject: string;
|
|
2782
|
+
text?: string | null | undefined;
|
|
2783
|
+
html?: string | null | undefined;
|
|
2784
|
+
attachments?: Array<EmailAttachment> | null | undefined;
|
|
2785
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesSendMessageResponses, MailboxesSendMessageErrors, ThrowOnError>;
|
|
2786
|
+
/**
|
|
2787
|
+
* Get a mailbox message
|
|
2788
|
+
*
|
|
2789
|
+
* Returns a message in the mailbox with its text, sanitized HTML, `replyText` (what the sender wrote, without quoted history), authentication verdicts, and attachments.
|
|
2790
|
+
*/
|
|
2791
|
+
static getMessage<ThrowOnError extends boolean = false>(parameters: {
|
|
2792
|
+
id: MailboxId;
|
|
2793
|
+
messageId: MessageId;
|
|
2794
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesGetMessageResponses, MailboxesGetMessageErrors, ThrowOnError>;
|
|
2795
|
+
/**
|
|
2796
|
+
* Get a message's raw MIME
|
|
2797
|
+
*
|
|
2798
|
+
* Returns a short-lived URL for the message exactly as it was received (`message/rfc822`). Sent messages have no stored MIME.
|
|
2799
|
+
*/
|
|
2800
|
+
static getMessageRaw<ThrowOnError extends boolean = false>(parameters: {
|
|
2801
|
+
id: MailboxId;
|
|
2802
|
+
messageId: MessageId;
|
|
2803
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesGetMessageRawResponses, MailboxesGetMessageRawErrors, ThrowOnError>;
|
|
2804
|
+
/**
|
|
2805
|
+
* Get a message attachment
|
|
2806
|
+
*
|
|
2807
|
+
* Returns a short-lived download URL for one of the message's attachments.
|
|
2808
|
+
*/
|
|
2809
|
+
static getMessageAttachment<ThrowOnError extends boolean = false>(parameters: {
|
|
2810
|
+
id: MailboxId;
|
|
2811
|
+
messageId: MessageId;
|
|
2812
|
+
attachmentId: AttachmentId;
|
|
2813
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesGetMessageAttachmentResponses, MailboxesGetMessageAttachmentErrors, ThrowOnError>;
|
|
2814
|
+
/**
|
|
2815
|
+
* Reply to a message
|
|
2816
|
+
*
|
|
2817
|
+
* Replies to the message's Reply-To address, or its sender, in the same thread. The server sets the recipients, subject, and threading headers.
|
|
2818
|
+
*/
|
|
2819
|
+
static reply<ThrowOnError extends boolean = false>(parameters: {
|
|
2820
|
+
"idempotency-key"?: string | null | undefined;
|
|
2821
|
+
id: MailboxId;
|
|
2822
|
+
messageId: MessageId;
|
|
2823
|
+
cc?: Array<string> | null | undefined;
|
|
2824
|
+
bcc?: Array<string> | null | undefined;
|
|
2825
|
+
text?: string | null | undefined;
|
|
2826
|
+
html?: string | null | undefined;
|
|
2827
|
+
attachments?: Array<EmailAttachment> | null | undefined;
|
|
2828
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesReplyResponses, MailboxesReplyErrors, ThrowOnError>;
|
|
2829
|
+
/**
|
|
2830
|
+
* Reply to all recipients of a message
|
|
2831
|
+
*
|
|
2832
|
+
* Replies to the sender and every other recipient of the message except the mailbox itself, in the same thread.
|
|
2833
|
+
*/
|
|
2834
|
+
static replyAll<ThrowOnError extends boolean = false>(parameters: {
|
|
2835
|
+
"idempotency-key"?: string | null | undefined;
|
|
2836
|
+
id: MailboxId;
|
|
2837
|
+
messageId: MessageId;
|
|
2838
|
+
cc?: Array<string> | null | undefined;
|
|
2839
|
+
bcc?: Array<string> | null | undefined;
|
|
2840
|
+
text?: string | null | undefined;
|
|
2841
|
+
html?: string | null | undefined;
|
|
2842
|
+
attachments?: Array<EmailAttachment> | null | undefined;
|
|
2843
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesReplyAllResponses, MailboxesReplyAllErrors, ThrowOnError>;
|
|
2844
|
+
/**
|
|
2845
|
+
* Forward a message
|
|
2846
|
+
*
|
|
2847
|
+
* Forwards the message to new recipients as a new conversation, with the original quoted below the caller's text and its attachments attached ahead of any the caller adds. The combined attachments must fit the email attachment limits.
|
|
2848
|
+
*/
|
|
2849
|
+
static forward<ThrowOnError extends boolean = false>(parameters: {
|
|
2850
|
+
"idempotency-key"?: string | null | undefined;
|
|
2851
|
+
id: MailboxId;
|
|
2852
|
+
messageId: MessageId;
|
|
2853
|
+
to: [string];
|
|
2854
|
+
cc?: Array<string> | null | undefined;
|
|
2855
|
+
bcc?: Array<string> | null | undefined;
|
|
2856
|
+
text?: string | null | undefined;
|
|
2857
|
+
html?: string | null | undefined;
|
|
2858
|
+
attachments?: Array<EmailAttachment> | null | undefined;
|
|
2859
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesForwardResponses, MailboxesForwardErrors, ThrowOnError>;
|
|
2860
|
+
/**
|
|
2861
|
+
* List quarantined messages
|
|
2862
|
+
*
|
|
2863
|
+
* Returns the messages this mailbox holds instead of delivering, most recently held first: suspected spam, phishing, fraud, or prompt injection (`quarantined`), and malware (`isolated`). Each is metadata only; a held message appears in no thread, search, or `mailbox.message.received` event until a person releases it. `after` and `before` filter by when the message was held. Needs `quarantine.read`.
|
|
2864
|
+
*/
|
|
2865
|
+
static listQuarantine<ThrowOnError extends boolean = false>(parameters: {
|
|
2866
|
+
id: MailboxId;
|
|
2867
|
+
limit?: string | null | undefined;
|
|
2868
|
+
cursor?: Cursor | null | undefined;
|
|
2869
|
+
after?: string | null | undefined;
|
|
2870
|
+
before?: string | null | undefined;
|
|
2871
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListQuarantineResponses, MailboxesListQuarantineErrors, ThrowOnError>;
|
|
2872
|
+
/**
|
|
2873
|
+
* Release a quarantined message
|
|
2874
|
+
*
|
|
2875
|
+
* Delivers a quarantined message into the thread it would have joined and publishes one `mailbox.message.released` event. Releasing it again returns the same result and publishes nothing. Only a person can release; API keys never hold `quarantine.release`. Isolated (malware) messages and discarded messages cannot be released: 409.
|
|
2876
|
+
*/
|
|
2877
|
+
static releaseMessage<ThrowOnError extends boolean = false>(parameters: {
|
|
2878
|
+
id: MailboxId;
|
|
2879
|
+
messageId: MessageId;
|
|
2880
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesReleaseMessageResponses, MailboxesReleaseMessageErrors, ThrowOnError>;
|
|
2881
|
+
/**
|
|
2882
|
+
* Discard a quarantined message
|
|
2883
|
+
*
|
|
2884
|
+
* Removes a held message from the mailbox's quarantine for good: it leaves the quarantine list, never reaches a thread, and can no longer be released. Quarantined and isolated (malware) messages can both be discarded. Publishes one `mailbox.message.discarded` event; discarding it again returns the same result and publishes nothing. A released message is in its thread and cannot be discarded: 409. Only a person can discard; API keys never hold `quarantine.release`.
|
|
2885
|
+
*/
|
|
2886
|
+
static discardMessage<ThrowOnError extends boolean = false>(parameters: {
|
|
2887
|
+
id: MailboxId;
|
|
2888
|
+
messageId: MessageId;
|
|
2889
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesDiscardMessageResponses, MailboxesDiscardMessageErrors, ThrowOnError>;
|
|
2890
|
+
/**
|
|
2891
|
+
* List drafts
|
|
2892
|
+
*
|
|
2893
|
+
* Returns summaries of the caller's unsent drafts in the mailbox, newest first, optionally for one thread. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Read a draft's body with `GET /v1/mailboxes/{id}/drafts/{draftId}`.
|
|
2894
|
+
*/
|
|
2895
|
+
static listDrafts<ThrowOnError extends boolean = false>(parameters: {
|
|
2896
|
+
id: MailboxId;
|
|
2897
|
+
limit?: string | null | undefined;
|
|
2898
|
+
cursor?: Cursor | null | undefined;
|
|
2899
|
+
threadId?: MailboxThreadId | null | undefined;
|
|
2900
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListDraftsResponses, MailboxesListDraftsErrors, ThrowOnError>;
|
|
2901
|
+
/**
|
|
2902
|
+
* Create a draft
|
|
2903
|
+
*
|
|
2904
|
+
* Saves a draft of a new message, or of a reply when `inReplyToMessageId` names a message in the mailbox, and returns it with status 201. Send it with `POST /v1/mailboxes/{id}/drafts/{draftId}/send`.
|
|
2905
|
+
*/
|
|
2906
|
+
static createDraft<ThrowOnError extends boolean = false>(parameters: {
|
|
2907
|
+
id: MailboxId;
|
|
2908
|
+
to?: Array<string> | null | undefined;
|
|
2909
|
+
cc?: Array<string> | null | undefined;
|
|
2910
|
+
bcc?: Array<string> | null | undefined;
|
|
2911
|
+
replyTo?: Array<string> | null | undefined;
|
|
2912
|
+
subject?: string | null | undefined;
|
|
2913
|
+
text?: string | null | undefined;
|
|
2914
|
+
html?: string | null | undefined;
|
|
2915
|
+
attachments?: Array<EmailAttachment> | null | undefined;
|
|
2916
|
+
inReplyToMessageId?: MessageId | null | undefined;
|
|
2917
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesCreateDraftResponses, MailboxesCreateDraftErrors, ThrowOnError>;
|
|
2918
|
+
/**
|
|
2919
|
+
* Delete a draft
|
|
2920
|
+
*
|
|
2921
|
+
* Discards an unsent draft.
|
|
2922
|
+
*/
|
|
2923
|
+
static deleteDraft<ThrowOnError extends boolean = false>(parameters: {
|
|
2924
|
+
id: MailboxId;
|
|
2925
|
+
draftId: MailboxDraftId;
|
|
2926
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesDeleteDraftResponses, MailboxesDeleteDraftErrors, ThrowOnError>;
|
|
2927
|
+
/**
|
|
2928
|
+
* Get a draft
|
|
2929
|
+
*
|
|
2930
|
+
* Returns one of the caller's drafts, or the draft of a send waiting for approval when the caller may approve it.
|
|
2931
|
+
*/
|
|
2932
|
+
static getDraft<ThrowOnError extends boolean = false>(parameters: {
|
|
2933
|
+
id: MailboxId;
|
|
2934
|
+
draftId: MailboxDraftId;
|
|
2935
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesGetDraftResponses, MailboxesGetDraftErrors, ThrowOnError>;
|
|
2936
|
+
/**
|
|
2937
|
+
* Update a draft
|
|
2938
|
+
*
|
|
2939
|
+
* Updates the fields you name and keeps the rest; `null` clears an optional field. A draft whose send waits for approval cannot change and conflicts.
|
|
2940
|
+
*/
|
|
2941
|
+
static updateDraft<ThrowOnError extends boolean = false>(parameters: {
|
|
2942
|
+
id: MailboxId;
|
|
2943
|
+
draftId: MailboxDraftId;
|
|
2944
|
+
to?: Array<string> | null | undefined;
|
|
2945
|
+
cc?: Array<string> | null | null | undefined;
|
|
2946
|
+
bcc?: Array<string> | null | null | undefined;
|
|
2947
|
+
replyTo?: Array<string> | null | null | undefined;
|
|
2948
|
+
subject?: string | null | null | undefined;
|
|
2949
|
+
text?: string | null | null | undefined;
|
|
2950
|
+
html?: string | null | null | undefined;
|
|
2951
|
+
attachments?: Array<EmailAttachment> | null | null | undefined;
|
|
2952
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesUpdateDraftResponses, MailboxesUpdateDraftErrors, ThrowOnError>;
|
|
2953
|
+
/**
|
|
2954
|
+
* Send a draft
|
|
2955
|
+
*
|
|
2956
|
+
* Sends one of the caller's drafts: a reply draft in its thread, any other draft as a new conversation. A draft needs recipients, a subject, and a body.
|
|
2957
|
+
*/
|
|
2958
|
+
static sendDraft<ThrowOnError extends boolean = false>(parameters: {
|
|
2959
|
+
"idempotency-key"?: string | null | undefined;
|
|
2960
|
+
id: MailboxId;
|
|
2961
|
+
draftId: MailboxDraftId;
|
|
2962
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesSendDraftResponses, MailboxesSendDraftErrors, ThrowOnError>;
|
|
2963
|
+
/**
|
|
2964
|
+
* List mailbox actions
|
|
2965
|
+
*
|
|
2966
|
+
* Returns the actions proposed on a mailbox, newest first, filterable by `state` (`approvalRequired` lists the sends waiting for a person) and creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
2967
|
+
*/
|
|
2968
|
+
static listActions<ThrowOnError extends boolean = false>(parameters: {
|
|
2969
|
+
id: MailboxId;
|
|
2970
|
+
limit?: string | null | undefined;
|
|
2971
|
+
cursor?: Cursor | null | undefined;
|
|
2972
|
+
state?: "proposed" | "allowed" | "approvalRequired" | "policyDenied" | "approved" | "approvalDenied" | "executing" | "executed" | "failed" | null | undefined;
|
|
2973
|
+
after?: string | null | undefined;
|
|
2974
|
+
before?: string | null | undefined;
|
|
2975
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListActionsResponses, MailboxesListActionsErrors, ThrowOnError>;
|
|
2976
|
+
/**
|
|
2977
|
+
* Approve a mailbox action
|
|
2978
|
+
*
|
|
2979
|
+
* Approves an action waiting for approval, executes it, and returns the executed action. Only a person signed in or through OAuth may approve, and never the one who proposed it.
|
|
2980
|
+
*/
|
|
2981
|
+
static approveAction<ThrowOnError extends boolean = false>(parameters: {
|
|
2982
|
+
id: MailboxId;
|
|
2983
|
+
actionId: MailboxActionId;
|
|
2984
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesApproveActionResponses, MailboxesApproveActionErrors, ThrowOnError>;
|
|
2985
|
+
/**
|
|
2986
|
+
* Deny a mailbox action
|
|
2987
|
+
*
|
|
2988
|
+
* Denies an action waiting for approval with a reason and returns it without executing it. Only a person signed in or through OAuth may deny, and never the one who proposed it.
|
|
2989
|
+
*/
|
|
2990
|
+
static denyAction<ThrowOnError extends boolean = false>(parameters: {
|
|
2991
|
+
id: MailboxId;
|
|
2992
|
+
actionId: MailboxActionId;
|
|
2993
|
+
reason: string;
|
|
2994
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesDenyActionResponses, MailboxesDenyActionErrors, ThrowOnError>;
|
|
2995
|
+
/**
|
|
2996
|
+
* List mailbox events
|
|
2997
|
+
*
|
|
2998
|
+
* Returns what happened on a mailbox, newest first, filterable by when it happened (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
2999
|
+
*/
|
|
3000
|
+
static listEvents<ThrowOnError extends boolean = false>(parameters: {
|
|
3001
|
+
id: MailboxId;
|
|
3002
|
+
limit?: string | null | undefined;
|
|
3003
|
+
cursor?: Cursor | null | undefined;
|
|
3004
|
+
after?: string | null | undefined;
|
|
3005
|
+
before?: string | null | undefined;
|
|
3006
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListEventsResponses, MailboxesListEventsErrors, ThrowOnError>;
|
|
3007
|
+
}
|
|
3008
|
+
export declare class Mailboxes2 {
|
|
3009
|
+
static mailboxes: typeof Mailboxes;
|
|
3010
|
+
}
|
|
3011
|
+
export declare class Namespaces {
|
|
3012
|
+
/**
|
|
3013
|
+
* List namespaces
|
|
3014
|
+
*
|
|
3015
|
+
* Returns namespace summaries, newest first, filterable by creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Read a namespace's metadata with `GET /v1/namespaces/{id}`.
|
|
3016
|
+
*/
|
|
3017
|
+
static list<ThrowOnError extends boolean = false>(parameters?: {
|
|
3018
|
+
limit?: string | null | undefined;
|
|
3019
|
+
cursor?: Cursor | null | undefined;
|
|
3020
|
+
after?: string | null | undefined;
|
|
3021
|
+
before?: string | null | undefined;
|
|
3022
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<NamespacesListResponses, NamespacesListErrors, ThrowOnError>;
|
|
3023
|
+
/**
|
|
3024
|
+
* Create a namespace
|
|
3025
|
+
*
|
|
3026
|
+
* Creates a namespace with status 201. Names are unique within the organization; a duplicate conflicts.
|
|
3027
|
+
*/
|
|
3028
|
+
static create<ThrowOnError extends boolean = false>(parameters: {
|
|
3029
|
+
name: string;
|
|
3030
|
+
metadata?: NamespaceMetadata | null | undefined;
|
|
3031
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<NamespacesCreateResponses, NamespacesCreateErrors, ThrowOnError>;
|
|
3032
|
+
/**
|
|
3033
|
+
* Delete a namespace
|
|
3034
|
+
*
|
|
3035
|
+
* Deletes an empty namespace. A namespace that still holds mailboxes or API keys conflicts: remove or move them first.
|
|
3036
|
+
*/
|
|
3037
|
+
static remove<ThrowOnError extends boolean = false>(parameters: {
|
|
3038
|
+
id: NamespaceId;
|
|
3039
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<NamespacesRemoveResponses, NamespacesRemoveErrors, ThrowOnError>;
|
|
3040
|
+
/**
|
|
3041
|
+
* Get a namespace
|
|
3042
|
+
*
|
|
3043
|
+
* Returns one namespace.
|
|
3044
|
+
*/
|
|
3045
|
+
static get<ThrowOnError extends boolean = false>(parameters: {
|
|
3046
|
+
id: NamespaceId;
|
|
3047
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<NamespacesGetResponses, NamespacesGetErrors, ThrowOnError>;
|
|
3048
|
+
/**
|
|
3049
|
+
* Update a namespace
|
|
3050
|
+
*
|
|
3051
|
+
* Updates the fields you name and keeps the rest. `metadata` merges into the stored metadata by key, and a `null` value deletes that key.
|
|
3052
|
+
*/
|
|
3053
|
+
static update<ThrowOnError extends boolean = false>(parameters: {
|
|
3054
|
+
id: NamespaceId;
|
|
3055
|
+
name?: string | null | undefined;
|
|
3056
|
+
metadata?: {
|
|
3057
|
+
[key: string]: string | null;
|
|
3058
|
+
} | null | undefined;
|
|
3059
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<NamespacesUpdateResponses, NamespacesUpdateErrors, ThrowOnError>;
|
|
3060
|
+
}
|
|
3061
|
+
export declare class Namespaces2 {
|
|
3062
|
+
static namespaces: typeof Namespaces;
|
|
3063
|
+
}
|
|
3064
|
+
export declare class Extensions {
|
|
3065
|
+
/**
|
|
3066
|
+
* List extensions
|
|
3067
|
+
*
|
|
3068
|
+
* Returns the organization's published extensions with their latest version, newest first, filterable by creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
3069
|
+
*/
|
|
3070
|
+
static list<ThrowOnError extends boolean = false>(parameters?: {
|
|
3071
|
+
limit?: string | null | undefined;
|
|
3072
|
+
cursor?: Cursor | null | undefined;
|
|
3073
|
+
after?: string | null | undefined;
|
|
3074
|
+
before?: string | null | undefined;
|
|
3075
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ExtensionsListResponses, ExtensionsListErrors, ThrowOnError>;
|
|
3076
|
+
/**
|
|
3077
|
+
* Publish an extension version
|
|
3078
|
+
*
|
|
3079
|
+
* Publishes one version from its manifest and returns it with status 201, creating the extension named by the manifest on its first version. A hosted manifest carries its bundle. Publishing a version again with the same manifest and bundle returns it; a different one conflicts, so bump the manifest's version. Only a person can publish, not an API key.
|
|
3080
|
+
*/
|
|
3081
|
+
static publish<ThrowOnError extends boolean = false>(parameters: {
|
|
3082
|
+
manifest: {
|
|
3083
|
+
name: string;
|
|
3084
|
+
displayName: string;
|
|
3085
|
+
description?: string | null | undefined;
|
|
3086
|
+
version: string;
|
|
3087
|
+
runtime: "hosted" | "webhook";
|
|
3088
|
+
events: Array<"mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded">;
|
|
3089
|
+
permissions: Array<"read" | "update" | "send" | "quarantine.read">;
|
|
3090
|
+
};
|
|
3091
|
+
bundle?: string | null | undefined;
|
|
3092
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ExtensionsPublishResponses, ExtensionsPublishErrors, ThrowOnError>;
|
|
3093
|
+
/**
|
|
3094
|
+
* Get an extension
|
|
3095
|
+
*
|
|
3096
|
+
* Returns one extension by its id or name. Its versions are `GET /v1/extensions/{id}/versions`.
|
|
3097
|
+
*/
|
|
3098
|
+
static get<ThrowOnError extends boolean = false>(parameters: {
|
|
3099
|
+
id: string;
|
|
3100
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ExtensionsGetResponses, ExtensionsGetErrors, ThrowOnError>;
|
|
3101
|
+
/**
|
|
3102
|
+
* List an extension's versions
|
|
3103
|
+
*
|
|
3104
|
+
* Returns summaries of an extension's published versions, newest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Read a version's manifest with `GET /v1/extensions/{id}/versions/{versionId}`.
|
|
3105
|
+
*/
|
|
3106
|
+
static listVersions<ThrowOnError extends boolean = false>(parameters: {
|
|
3107
|
+
id: string;
|
|
3108
|
+
limit?: string | null | undefined;
|
|
3109
|
+
cursor?: Cursor | null | undefined;
|
|
3110
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ExtensionsListVersionsResponses, ExtensionsListVersionsErrors, ThrowOnError>;
|
|
3111
|
+
/**
|
|
3112
|
+
* Get an extension version
|
|
3113
|
+
*
|
|
3114
|
+
* Returns one version, by its id or version string, with the manifest it was published with.
|
|
3115
|
+
*/
|
|
3116
|
+
static getVersion<ThrowOnError extends boolean = false>(parameters: {
|
|
3117
|
+
id: string;
|
|
3118
|
+
versionId: string;
|
|
3119
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ExtensionsGetVersionResponses, ExtensionsGetVersionErrors, ThrowOnError>;
|
|
3120
|
+
}
|
|
3121
|
+
export declare class Extensions2 {
|
|
3122
|
+
static extensions: typeof Extensions;
|
|
3123
|
+
}
|
|
3124
|
+
export declare class ExtensionInstallations {
|
|
3125
|
+
/**
|
|
3126
|
+
* List installations
|
|
3127
|
+
*
|
|
3128
|
+
* Returns summaries of the organization's extension installations, newest first, filterable by creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Read an installation's permissions, scope, and webhook with `GET /v1/extension-installations/{id}`.
|
|
3129
|
+
*/
|
|
3130
|
+
static list<ThrowOnError extends boolean = false>(parameters?: {
|
|
3131
|
+
limit?: string | null | undefined;
|
|
3132
|
+
cursor?: Cursor | null | undefined;
|
|
3133
|
+
after?: string | null | undefined;
|
|
3134
|
+
before?: string | null | undefined;
|
|
3135
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ExtensionInstallationsListResponses, ExtensionInstallationsListErrors, ThrowOnError>;
|
|
3136
|
+
/**
|
|
3137
|
+
* Install an extension
|
|
3138
|
+
*
|
|
3139
|
+
* Installs a published version with a scope, permissions, and a send mode, and returns it with status 201. The installation acts on your grants narrowed to these; a webhook installation's API key and webhook secret are returned once. Only a person can install, not an API key.
|
|
3140
|
+
*/
|
|
3141
|
+
static install<ThrowOnError extends boolean = false>(parameters: {
|
|
3142
|
+
extension: string;
|
|
3143
|
+
version?: string | null | undefined;
|
|
3144
|
+
mailboxIds?: Array<MailboxId> | null | undefined;
|
|
3145
|
+
namespaceId?: NamespaceId | null | undefined;
|
|
3146
|
+
permissions?: Array<"read" | "update" | "send" | "quarantine.read"> | null | undefined;
|
|
3147
|
+
sendMode?: "send" | "approval" | null | undefined;
|
|
3148
|
+
webhookUrl?: string | null | undefined;
|
|
3149
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ExtensionInstallationsInstallResponses, ExtensionInstallationsInstallErrors, ThrowOnError>;
|
|
3150
|
+
/**
|
|
3151
|
+
* Uninstall an extension
|
|
3152
|
+
*
|
|
3153
|
+
* Deletes the installation with its API key and webhook endpoint. Actions it took keep their attribution.
|
|
3154
|
+
*/
|
|
3155
|
+
static uninstall<ThrowOnError extends boolean = false>(parameters: {
|
|
3156
|
+
id: ExtensionInstallationId;
|
|
3157
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ExtensionInstallationsUninstallResponses, ExtensionInstallationsUninstallErrors, ThrowOnError>;
|
|
3158
|
+
/**
|
|
3159
|
+
* Get an installation
|
|
3160
|
+
*
|
|
3161
|
+
* Returns one installation with its permissions, scope, send mode, and webhook endpoint.
|
|
3162
|
+
*/
|
|
3163
|
+
static get<ThrowOnError extends boolean = false>(parameters: {
|
|
3164
|
+
id: ExtensionInstallationId;
|
|
3165
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ExtensionInstallationsGetResponses, ExtensionInstallationsGetErrors, ThrowOnError>;
|
|
3166
|
+
/**
|
|
3167
|
+
* Disable an installation
|
|
3168
|
+
*
|
|
3169
|
+
* Stops the installation at once: its events stop, and its credential is refused on every surface until it is enabled again.
|
|
3170
|
+
*/
|
|
3171
|
+
static disable<ThrowOnError extends boolean = false>(parameters: {
|
|
3172
|
+
id: ExtensionInstallationId;
|
|
3173
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ExtensionInstallationsDisableResponses, ExtensionInstallationsDisableErrors, ThrowOnError>;
|
|
3174
|
+
/**
|
|
3175
|
+
* Enable an installation
|
|
3176
|
+
*
|
|
3177
|
+
* Resumes a disabled installation. Events published while it was disabled are not delivered.
|
|
3178
|
+
*/
|
|
3179
|
+
static enable<ThrowOnError extends boolean = false>(parameters: {
|
|
3180
|
+
id: ExtensionInstallationId;
|
|
3181
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ExtensionInstallationsEnableResponses, ExtensionInstallationsEnableErrors, ThrowOnError>;
|
|
3182
|
+
/**
|
|
3183
|
+
* List a hosted installation's runs
|
|
3184
|
+
*
|
|
3185
|
+
* Returns the hosted installation's retained handler runs, newest first: outcome, duration, and error. The host keeps the last 100 runs, so the list is bounded and has no cursor. Read a run's logged lines with `GET /v1/extension-installations/{id}/runs/{runId}`.
|
|
3186
|
+
*/
|
|
3187
|
+
static listRuns<ThrowOnError extends boolean = false>(parameters: {
|
|
3188
|
+
id: ExtensionInstallationId;
|
|
3189
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ExtensionInstallationsListRunsResponses, ExtensionInstallationsListRunsErrors, ThrowOnError>;
|
|
3190
|
+
/**
|
|
3191
|
+
* Get a hosted run
|
|
3192
|
+
*
|
|
3193
|
+
* Returns one retained run with the lines its handler logged: at most 50 lines of 500 characters.
|
|
3194
|
+
*/
|
|
3195
|
+
static getRun<ThrowOnError extends boolean = false>(parameters: {
|
|
3196
|
+
id: ExtensionInstallationId;
|
|
3197
|
+
runId: string;
|
|
3198
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ExtensionInstallationsGetRunResponses, ExtensionInstallationsGetRunErrors, ThrowOnError>;
|
|
3199
|
+
}
|
|
3200
|
+
export declare class ExtensionInstallations2 {
|
|
3201
|
+
static extensionInstallations: typeof ExtensionInstallations;
|
|
3202
|
+
}
|