samva 0.10.0 → 0.11.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.
Files changed (71) hide show
  1. package/README.md +59 -9
  2. package/dist/client/sdk.gen.d.ts +1106 -215
  3. package/dist/client/types.gen.d.ts +11522 -6311
  4. package/dist/{client-mI4S99Ts.js → client-8YXjfsVc.js} +5079 -1655
  5. package/dist/{client-attribution-Bl4nTEsE.js → client-attribution-Ct2FKITg.js} +2 -2
  6. package/dist/effect/analytics.d.ts +18 -18
  7. package/dist/effect/analytics.js +1 -1
  8. package/dist/effect/api-keys.d.ts +99 -43
  9. package/dist/effect/api-keys.js +2 -4
  10. package/dist/effect/attachments.d.ts +5 -6
  11. package/dist/effect/attachments.js +1 -1
  12. package/dist/effect/brands.d.ts +4 -4
  13. package/dist/effect/brands.js +2 -2
  14. package/dist/effect/campaigns.d.ts +30 -60
  15. package/dist/effect/campaigns.js +1 -1
  16. package/dist/effect/client.js +1 -1
  17. package/dist/effect/contact-groups.d.ts +29 -46
  18. package/dist/effect/contact-groups.js +1 -1
  19. package/dist/effect/contacts.d.ts +324 -726
  20. package/dist/effect/contacts.js +10 -2
  21. package/dist/effect/conversations.d.ts +575 -1130
  22. package/dist/effect/conversations.js +14 -2
  23. package/dist/effect/custom-fields.d.ts +3 -53
  24. package/dist/effect/custom-fields.js +1 -1
  25. package/dist/effect/email.d.ts +263 -297
  26. package/dist/effect/email.js +5 -3
  27. package/dist/effect/extension-installations.d.ts +218 -0
  28. package/dist/effect/extension-installations.js +25 -0
  29. package/dist/effect/extensions.d.ts +192 -0
  30. package/dist/effect/extensions.js +19 -0
  31. package/dist/effect/feedback.d.ts +12 -0
  32. package/dist/effect/feedback.js +13 -0
  33. package/dist/effect/generated.d.ts +31266 -14269
  34. package/dist/effect/index.d.ts +6 -1
  35. package/dist/effect/index.js +7 -2
  36. package/dist/effect/internal/client.d.ts +3 -0
  37. package/dist/effect/internal/mailbox-events.d.ts +11 -0
  38. package/dist/effect/internal/operation.d.ts +20 -374
  39. package/dist/effect/mailboxes.d.ts +1676 -0
  40. package/dist/effect/mailboxes.js +3 -0
  41. package/dist/effect/media.d.ts +5 -5
  42. package/dist/effect/media.js +1 -1
  43. package/dist/effect/messages.d.ts +171 -938
  44. package/dist/effect/messages.js +6 -2
  45. package/dist/effect/namespaces.d.ts +82 -0
  46. package/dist/effect/namespaces.js +19 -0
  47. package/dist/effect/operations.d.ts +68 -12
  48. package/dist/effect/operations.js +1 -1
  49. package/dist/effect/organizations.d.ts +5 -4
  50. package/dist/effect/organizations.js +1 -1
  51. package/dist/effect/pagination.d.ts +16 -21
  52. package/dist/effect/scheduled-messages.d.ts +13 -23
  53. package/dist/effect/scheduled-messages.js +1 -1
  54. package/dist/effect/templates.d.ts +204 -281
  55. package/dist/effect/templates.js +2 -2
  56. package/dist/effect/unsubscribe-groups.d.ts +21 -75
  57. package/dist/effect/unsubscribe-groups.js +1 -1
  58. package/dist/effect/webhooks.d.ts +117 -39
  59. package/dist/effect/webhooks.js +2 -2
  60. package/dist/index.js +3 -2
  61. package/dist/mailbox-events-CcWm8lO4.js +617 -0
  62. package/dist/mailbox-events.d.ts +175 -0
  63. package/dist/mailboxes-4gJMAJh4.js +147 -0
  64. package/dist/{operation-DQWJO4jY.js → operation-BuyvAsZ1.js} +403 -67
  65. package/dist/promises/errors.gen.d.ts +5 -0
  66. package/dist/promises/index.d.ts +23 -1
  67. package/dist/promises/index.js +3 -2
  68. package/dist/promises/types.gen.d.ts +1 -1
  69. package/dist/{promises-C7D4oaHn.js → promises-CqAmI39P.js} +3242 -556
  70. package/dist/service-map.d.ts +458 -36
  71. package/package.json +22 -2
@@ -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, 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, 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 a paginated list of messages, with optional filters for channel, direction, status, conversation, contact, sender address, and date range.
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
- startDate?: string | null | undefined;
32
- endDate?: string | null | undefined;
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 the created message 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 message; reusing the key for different content returns a conflict.
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 single message by its ID.
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
- includeS3Urls?: string | null | undefined;
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 list of delivery events recorded for a message.
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
- operationId: OperationId;
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
- operationId: OperationId;
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 a paginated list of scheduled messages, optionally filtered by status.
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 a paginated list of the organization's campaigns, optionally filtered by status. Each row carries `series`, the last 14 days of daily email sends the campaign produced, oldest first.
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 paginated list of runs for a campaign, optionally filtered by status.
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 paginated list of recipients for a campaign run, optionally filtered by status.
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 a paginated list of the organization's sending domains. `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.
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
  *
@@ -578,11 +596,11 @@ export declare class Email {
578
596
  /**
579
597
  * List senders
580
598
  *
581
- * Returns a paginated list of senders, optionally filtered by verification status, active state, or default flag. 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.
599
+ * 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
600
  */
583
601
  static listSenders<ThrowOnError extends boolean = false>(parameters?: {
584
- page?: string | null | undefined;
585
602
  limit?: string | null | undefined;
603
+ cursor?: Cursor | null | undefined;
586
604
  verificationStatus?: "pending" | "verified" | "failed" | null | undefined;
587
605
  isActive?: string | null | undefined;
588
606
  isDefault?: string | null | undefined;
@@ -634,11 +652,11 @@ export declare class Email {
634
652
  /**
635
653
  * Get email statistics
636
654
  *
637
- * Returns aggregate email statistics — sent, delivered, bounced, and complained counts with their rates — optionally scoped to a date range.
655
+ * 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
656
  */
639
657
  static getStats<ThrowOnError extends boolean = false>(parameters?: {
640
- startDate?: string | null | undefined;
641
- endDate?: string | null | undefined;
658
+ after?: string | null | undefined;
659
+ before?: string | null | undefined;
642
660
  }, options?: Options<never, ThrowOnError>): RequestResult<EmailGetStatsResponses, EmailGetStatsErrors, ThrowOnError>;
643
661
  /**
644
662
  * Enable catch-all receiving
@@ -646,7 +664,7 @@ export declare class Email {
646
664
  * 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.
647
665
  */
648
666
  static enableCatchAll<ThrowOnError extends boolean = false>(parameters: {
649
- domainId: EmailDomainId;
667
+ id: EmailDomainId;
650
668
  endpointId: WebhookEndpointId;
651
669
  }, options?: Options<never, ThrowOnError>): RequestResult<EmailEnableCatchAllResponses, EmailEnableCatchAllErrors, ThrowOnError>;
652
670
  /**
@@ -655,7 +673,7 @@ export declare class Email {
655
673
  * Disables catch-all inbound receiving for a domain.
656
674
  */
657
675
  static disableCatchAll<ThrowOnError extends boolean = false>(parameters: {
658
- domainId: EmailDomainId;
676
+ id: EmailDomainId;
659
677
  }, options?: Options<never, ThrowOnError>): RequestResult<EmailDisableCatchAllResponses, EmailDisableCatchAllErrors, ThrowOnError>;
660
678
  /**
661
679
  * Get catch-all configuration
@@ -677,25 +695,31 @@ export declare class Email {
677
695
  /**
678
696
  * Get catch-all statistics
679
697
  *
680
- * Returns catch-all receiving counters for a domain, adding an aggregated breakdown when a date range is supplied.
698
+ * Returns catch-all receiving counters for a domain, adding an aggregated breakdown when `after` or `before` bounds a range: `after` inclusive, `before` exclusive.
681
699
  */
682
700
  static getCatchAllStats<ThrowOnError extends boolean = false>(parameters: {
683
701
  domainId: EmailDomainId;
684
- startDate?: string | null | undefined;
685
- endDate?: string | null | undefined;
702
+ after?: string | null | undefined;
703
+ before?: string | null | undefined;
686
704
  }, options?: Options<never, ThrowOnError>): RequestResult<EmailGetCatchAllStatsResponses, EmailGetCatchAllStatsErrors, ThrowOnError>;
687
705
  /**
688
706
  * List suppressed addresses
689
707
  *
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, with limit and offset paging.
708
+ * 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
709
  */
692
710
  static listSuppressions<ThrowOnError extends boolean = false>(parameters?: {
693
711
  type?: "bounce" | "complaint" | "unsubscribe" | "manual" | null | undefined;
694
712
  status?: "active" | "expired" | null | undefined;
695
713
  search?: string | null | undefined;
696
714
  limit?: string | null | undefined;
697
- offset?: string | null | undefined;
715
+ cursor?: Cursor | null | undefined;
698
716
  }, options?: Options<never, ThrowOnError>): RequestResult<EmailListSuppressionsResponses, EmailListSuppressionsErrors, ThrowOnError>;
717
+ /**
718
+ * Count suppressed addresses
719
+ *
720
+ * Returns how many addresses this organization will not send to now, by suppression type. Expired suppressions are not counted.
721
+ */
722
+ static countSuppressions<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<EmailCountSuppressionsResponses, EmailCountSuppressionsErrors, ThrowOnError>;
699
723
  /**
700
724
  * Remove a suppressed address
701
725
  *
@@ -707,13 +731,13 @@ export declare class Email {
707
731
  /**
708
732
  * List block entries
709
733
  *
710
- * Returns block entries, optionally filtered by block type and active state, with limit and offset paging.
734
+ * 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
735
  */
712
736
  static listBlocks<ThrowOnError extends boolean = false>(parameters?: {
713
737
  blockType?: "email" | "domain" | null | undefined;
714
738
  isActive?: string | null | undefined;
715
739
  limit?: string | null | undefined;
716
- offset?: string | null | undefined;
740
+ cursor?: Cursor | null | undefined;
717
741
  }, options?: Options<never, ThrowOnError>): RequestResult<EmailListBlocksResponses, EmailListBlocksErrors, ThrowOnError>;
718
742
  /**
719
743
  * Add a block entry
@@ -750,15 +774,15 @@ export declare class Email {
750
774
  /**
751
775
  * List blocked email logs
752
776
  *
753
- * Returns a log of inbound emails that were blocked, optionally filtered by block entry, sender, or date range.
777
+ * 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
778
  */
755
779
  static getBlockLogs<ThrowOnError extends boolean = false>(parameters?: {
756
780
  blockedEmailId?: BlockedEmailId | null | undefined;
757
781
  fromAddress?: string | null | undefined;
758
- startDate?: string | null | undefined;
759
- endDate?: string | null | undefined;
782
+ after?: string | null | undefined;
783
+ before?: string | null | undefined;
760
784
  limit?: string | null | undefined;
761
- offset?: string | null | undefined;
785
+ cursor?: Cursor | null | undefined;
762
786
  }, options?: Options<never, ThrowOnError>): RequestResult<EmailGetBlockLogsResponses, EmailGetBlockLogsErrors, ThrowOnError>;
763
787
  /**
764
788
  * Check whether an address is blocked
@@ -771,18 +795,16 @@ export declare class Email {
771
795
  /**
772
796
  * List forwarding rules
773
797
  *
774
- * Returns inbound email forwarding rules, optionally filtered by domain and active state, with limit and offset paging.
798
+ * Returns every inbound email forwarding rule, highest priority first, optionally filtered by domain and active state. An organization holds at most 100, so the list is never paged.
775
799
  */
776
800
  static listForwardingRules<ThrowOnError extends boolean = false>(parameters?: {
777
801
  domainId?: EmailDomainId | null | undefined;
778
802
  isActive?: string | null | undefined;
779
- limit?: string | null | undefined;
780
- offset?: string | null | undefined;
781
803
  }, options?: Options<never, ThrowOnError>): RequestResult<EmailListForwardingRulesResponses, EmailListForwardingRulesErrors, ThrowOnError>;
782
804
  /**
783
805
  * Create a forwarding rule
784
806
  *
785
- * Creates an inbound email forwarding rule and returns it. Responds with 201.
807
+ * Creates an inbound email forwarding rule and returns it. Responds with 201. An organization holds at most 100 forwarding rules.
786
808
  */
787
809
  static createForwardingRule<ThrowOnError extends boolean = false>(parameters: {
788
810
  name: string;
@@ -831,15 +853,15 @@ export declare class Email {
831
853
  /**
832
854
  * List email forwarding logs
833
855
  *
834
- * Returns a log of forwarded inbound emails with their delivery outcomes, optionally filtered by rule, status, or date range.
856
+ * 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
857
  */
836
858
  static getForwardingLog<ThrowOnError extends boolean = false>(parameters?: {
837
859
  forwardingRuleId?: EmailForwardingRuleId | null | undefined;
838
860
  status?: "pending" | "forwarded" | "failed" | null | undefined;
839
- startDate?: string | null | undefined;
840
- endDate?: string | null | undefined;
861
+ after?: string | null | undefined;
862
+ before?: string | null | undefined;
841
863
  limit?: string | null | undefined;
842
- offset?: string | null | undefined;
864
+ cursor?: Cursor | null | undefined;
843
865
  }, options?: Options<never, ThrowOnError>): RequestResult<EmailGetForwardingLogResponses, EmailGetForwardingLogErrors, ThrowOnError>;
844
866
  /**
845
867
  * Get domain warming
@@ -931,7 +953,7 @@ export declare class Media {
931
953
  * Verifies the uploaded object exists in storage, marks the media object ready, and returns it with a download URL.
932
954
  */
933
955
  static complete<ThrowOnError extends boolean = false>(parameters: {
934
- mediaId: MediaId;
956
+ id: MediaId;
935
957
  }, options?: Options<never, ThrowOnError>): RequestResult<MediaCompleteResponses, MediaCompleteErrors, ThrowOnError>;
936
958
  /**
937
959
  * Delete a media object
@@ -939,7 +961,7 @@ export declare class Media {
939
961
  * Deletes a pending media object and the bytes stored for it. Fails if the media object is already ready.
940
962
  */
941
963
  static remove<ThrowOnError extends boolean = false>(parameters: {
942
- mediaId: MediaId;
964
+ id: MediaId;
943
965
  }, options?: Options<never, ThrowOnError>): RequestResult<MediaRemoveResponses, MediaRemoveErrors, ThrowOnError>;
944
966
  /**
945
967
  * Get a media object
@@ -947,7 +969,7 @@ export declare class Media {
947
969
  * Returns the media object's metadata, including status, dimensions, and confirmation timestamps.
948
970
  */
949
971
  static getById<ThrowOnError extends boolean = false>(parameters: {
950
- mediaId: MediaId;
972
+ id: MediaId;
951
973
  }, options?: Options<never, ThrowOnError>): RequestResult<MediaGetByIdResponses, MediaGetByIdErrors, ThrowOnError>;
952
974
  /**
953
975
  * Get a media download URL
@@ -955,7 +977,7 @@ export declare class Media {
955
977
  * Generates a presigned, time-limited download URL for a ready media object.
956
978
  */
957
979
  static downloadUrl<ThrowOnError extends boolean = false>(parameters: {
958
- mediaId: MediaId;
980
+ id: MediaId;
959
981
  }, options?: Options<never, ThrowOnError>): RequestResult<MediaDownloadUrlResponses, MediaDownloadUrlErrors, ThrowOnError>;
960
982
  }
961
983
  export declare class Media2 {
@@ -981,7 +1003,7 @@ export declare class Attachments {
981
1003
  /**
982
1004
  * List message attachments
983
1005
  *
984
- * Returns all attachments for the given message, along with a total count.
1006
+ * 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
1007
  */
986
1008
  static list<ThrowOnError extends boolean = false>(parameters: {
987
1009
  messageId: MessageId;
@@ -1003,16 +1025,16 @@ export declare class Conversations {
1003
1025
  /**
1004
1026
  * List conversations
1005
1027
  *
1006
- * Returns a paginated list of conversations for the organization, filterable by status, channel, contact, and date range.
1028
+ * 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
1029
  */
1008
1030
  static list<ThrowOnError extends boolean = false>(parameters?: {
1009
- page?: string | null | undefined;
1010
1031
  limit?: string | null | undefined;
1032
+ cursor?: Cursor | null | undefined;
1011
1033
  status?: "active" | "waiting" | "resolved" | "escalated" | "archived" | null | undefined;
1012
1034
  channel?: "email" | null | undefined;
1013
1035
  contactId?: ContactId | null | undefined;
1014
- startDate?: string | null | undefined;
1015
- endDate?: string | null | undefined;
1036
+ after?: string | null | undefined;
1037
+ before?: string | null | undefined;
1016
1038
  }, options?: Options<never, ThrowOnError>): RequestResult<ConversationsListResponses, ConversationsListErrors, ThrowOnError>;
1017
1039
  /**
1018
1040
  * Create a conversation
@@ -1031,9 +1053,7 @@ export declare class Conversations {
1031
1053
  priority?: number | null | undefined;
1032
1054
  urgency?: "low" | "medium" | "high" | "critical" | null | undefined;
1033
1055
  complexity?: "simple" | "moderate" | "complex" | null | undefined;
1034
- metadata?: ConversationMetadata | null | null | undefined;
1035
- actorTracking?: ActorTracking | null | undefined;
1036
- metrics?: ConversationMetrics | null | undefined;
1056
+ metadata?: JsonObject | null | undefined;
1037
1057
  context?: ConversationContext | null | null | undefined;
1038
1058
  tags?: Array<string> | null | undefined;
1039
1059
  categories?: Array<string> | null | undefined;
@@ -1044,7 +1064,7 @@ export declare class Conversations {
1044
1064
  /**
1045
1065
  * Get a conversation
1046
1066
  *
1047
- * Returns a single conversation by its ID.
1067
+ * Returns a single conversation with the contacts taking part in it.
1048
1068
  */
1049
1069
  static getById<ThrowOnError extends boolean = false>(parameters: {
1050
1070
  id: ConversationId;
@@ -1052,7 +1072,7 @@ export declare class Conversations {
1052
1072
  /**
1053
1073
  * Update a conversation
1054
1074
  *
1055
- * Updates an existing conversation's fields and returns the updated conversation.
1075
+ * 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
1076
  */
1057
1077
  static update<ThrowOnError extends boolean = false>(parameters: {
1058
1078
  id: ConversationId;
@@ -1067,12 +1087,7 @@ export declare class Conversations {
1067
1087
  urgency?: "low" | "medium" | "high" | "critical" | null | undefined;
1068
1088
  complexity?: "simple" | "moderate" | "complex" | null | undefined;
1069
1089
  context?: ConversationContext | null | null | undefined;
1070
- metadata?: ConversationMetadata | null | null | undefined;
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;
1090
+ metadata?: JsonObject | null | undefined;
1076
1091
  isTest?: boolean | null | undefined;
1077
1092
  isInternal?: boolean | null | undefined;
1078
1093
  isPrivate?: boolean | null | undefined;
@@ -1080,13 +1095,69 @@ export declare class Conversations {
1080
1095
  /**
1081
1096
  * List conversation messages
1082
1097
  *
1083
- * Returns the messages in a conversation using the canonical message schema and page-based pagination.
1098
+ * 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
1099
  */
1085
1100
  static listMessages<ThrowOnError extends boolean = false>(parameters: {
1086
1101
  id: ConversationId;
1087
- page?: string | null | undefined;
1088
1102
  limit?: string | null | undefined;
1103
+ cursor?: Cursor | null | undefined;
1104
+ after?: string | null | undefined;
1105
+ before?: string | null | undefined;
1089
1106
  }, options?: Options<never, ThrowOnError>): RequestResult<ConversationsListMessagesResponses, ConversationsListMessagesErrors, ThrowOnError>;
1107
+ /**
1108
+ * Remove conversation tags
1109
+ *
1110
+ * Removes the given tags from the conversation and returns the conversation. A tag the conversation does not have is ignored.
1111
+ */
1112
+ static removeTags<ThrowOnError extends boolean = false>(parameters: {
1113
+ id: ConversationId;
1114
+ tags: [string];
1115
+ }, options?: Options<never, ThrowOnError>): RequestResult<ConversationsRemoveTagsResponses, ConversationsRemoveTagsErrors, ThrowOnError>;
1116
+ /**
1117
+ * Add conversation tags
1118
+ *
1119
+ * Adds the given tags to the conversation, keeping the tags it already has, and returns the conversation.
1120
+ */
1121
+ static addTags<ThrowOnError extends boolean = false>(parameters: {
1122
+ id: ConversationId;
1123
+ tags: [string];
1124
+ }, options?: Options<never, ThrowOnError>): RequestResult<ConversationsAddTagsResponses, ConversationsAddTagsErrors, ThrowOnError>;
1125
+ /**
1126
+ * Remove conversation categories
1127
+ *
1128
+ * Removes the given categories from the conversation and returns the conversation. A category the conversation does not have is ignored.
1129
+ */
1130
+ static removeCategories<ThrowOnError extends boolean = false>(parameters: {
1131
+ id: ConversationId;
1132
+ categories: [string];
1133
+ }, options?: Options<never, ThrowOnError>): RequestResult<ConversationsRemoveCategoriesResponses, ConversationsRemoveCategoriesErrors, ThrowOnError>;
1134
+ /**
1135
+ * Add conversation categories
1136
+ *
1137
+ * Adds the given categories to the conversation, keeping the ones it already has, and returns the conversation.
1138
+ */
1139
+ static addCategories<ThrowOnError extends boolean = false>(parameters: {
1140
+ id: ConversationId;
1141
+ categories: [string];
1142
+ }, options?: Options<never, ThrowOnError>): RequestResult<ConversationsAddCategoriesResponses, ConversationsAddCategoriesErrors, ThrowOnError>;
1143
+ /**
1144
+ * Remove conversation channels
1145
+ *
1146
+ * 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.
1147
+ */
1148
+ static removeChannels<ThrowOnError extends boolean = false>(parameters: {
1149
+ id: ConversationId;
1150
+ channels: ["email"];
1151
+ }, options?: Options<never, ThrowOnError>): RequestResult<ConversationsRemoveChannelsResponses, ConversationsRemoveChannelsErrors, ThrowOnError>;
1152
+ /**
1153
+ * Add conversation channels
1154
+ *
1155
+ * Adds the given channels to the conversation, keeping the ones it already has, and returns the conversation.
1156
+ */
1157
+ static addChannels<ThrowOnError extends boolean = false>(parameters: {
1158
+ id: ConversationId;
1159
+ channels: ["email"];
1160
+ }, options?: Options<never, ThrowOnError>): RequestResult<ConversationsAddChannelsResponses, ConversationsAddChannelsErrors, ThrowOnError>;
1090
1161
  /**
1091
1162
  * Remove contacts from a conversation
1092
1163
  *
@@ -1094,7 +1165,7 @@ export declare class Conversations {
1094
1165
  */
1095
1166
  static removeContacts<ThrowOnError extends boolean = false>(parameters: {
1096
1167
  id: ConversationId;
1097
- contactIds: [ContactId, ContactId];
1168
+ contactIds: [ContactId];
1098
1169
  }, options?: Options<never, ThrowOnError>): RequestResult<ConversationsRemoveContactsResponses, ConversationsRemoveContactsErrors, ThrowOnError>;
1099
1170
  /**
1100
1171
  * Add contacts to a conversation
@@ -1103,7 +1174,7 @@ export declare class Conversations {
1103
1174
  */
1104
1175
  static addContacts<ThrowOnError extends boolean = false>(parameters: {
1105
1176
  id: ConversationId;
1106
- contactIds: [ContactId, ContactId];
1177
+ contactIds: [ContactId];
1107
1178
  }, options?: Options<never, ThrowOnError>): RequestResult<ConversationsAddContactsResponses, ConversationsAddContactsErrors, ThrowOnError>;
1108
1179
  }
1109
1180
  export declare class Conversations2 {
@@ -1113,40 +1184,33 @@ export declare class Contacts {
1113
1184
  /**
1114
1185
  * List contacts
1115
1186
  *
1116
- * Returns a paginated list of contacts for the organization, filterable by search term, type, status, and date range.
1187
+ * 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
1188
  */
1118
1189
  static list<ThrowOnError extends boolean = false>(parameters?: {
1119
- page?: string | null | undefined;
1120
1190
  limit?: string | null | undefined;
1191
+ cursor?: Cursor | null | undefined;
1121
1192
  search?: string | null | undefined;
1122
- type?: "human" | "system" | null | undefined;
1123
1193
  status?: "active" | "paused" | "blocked" | "archived" | null | undefined;
1124
- startDate?: string | null | undefined;
1125
- endDate?: string | null | undefined;
1194
+ after?: string | null | undefined;
1195
+ before?: string | null | undefined;
1126
1196
  }, options?: Options<never, ThrowOnError>): RequestResult<ContactsListResponses, ContactsListErrors, ThrowOnError>;
1127
1197
  /**
1128
1198
  * Create a contact
1129
1199
  *
1130
- * Creates a new contact and returns it with a 201 status.
1200
+ * Creates a contact and returns it with a 201 status. An identity another contact already holds is a conflict.
1131
1201
  */
1132
1202
  static create<ThrowOnError extends boolean = false>(parameters: {
1133
- type: "human" | "system";
1134
1203
  name: string;
1135
1204
  displayName?: string | null | null | undefined;
1136
1205
  avatar?: string | null | null | undefined;
1137
- identities?: Array<ContactIdentity> | null | undefined;
1138
- humanProfile?: HumanProfile | null | null | undefined;
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;
1206
+ identities?: Array<ContactIdentityInput> | null | undefined;
1207
+ profile?: ContactProfile | null | null | undefined;
1143
1208
  preferences?: ContactPreferences | null | null | undefined;
1209
+ tags?: Array<string> | null | undefined;
1144
1210
  status?: "active" | "paused" | "blocked" | "archived" | null | undefined;
1145
1211
  statusReason?: string | null | null | undefined;
1146
1212
  externalId?: string | null | null | undefined;
1147
1213
  metadata?: JsonObject | null | null | undefined;
1148
- createdBy?: ContactId | null | null | undefined;
1149
- lastModifiedBy?: ContactId | null | null | undefined;
1150
1214
  }, options?: Options<never, ThrowOnError>): RequestResult<ContactsCreateResponses, ContactsCreateErrors, ThrowOnError>;
1151
1215
  /**
1152
1216
  * Find a contact
@@ -1181,7 +1245,7 @@ export declare class Contacts {
1181
1245
  /**
1182
1246
  * Get a contact
1183
1247
  *
1184
- * Returns a single contact by its ID.
1248
+ * Returns a contact with its identities, profile, tags, and metadata.
1185
1249
  */
1186
1250
  static get<ThrowOnError extends boolean = false>(parameters: {
1187
1251
  id: ContactId;
@@ -1189,28 +1253,58 @@ export declare class Contacts {
1189
1253
  /**
1190
1254
  * Update a contact
1191
1255
  *
1192
- * Updates an existing contact's fields and returns the updated contact.
1256
+ * 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
1257
  */
1194
1258
  static update<ThrowOnError extends boolean = false>(parameters: {
1195
1259
  id: ContactId;
1196
- type?: "human" | "system" | null | undefined;
1197
1260
  name?: string | null | undefined;
1198
1261
  displayName?: string | null | null | undefined;
1199
1262
  avatar?: string | null | null | undefined;
1200
- identities?: Array<ContactIdentity> | null | undefined;
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;
1263
+ profile?: ContactProfileUpdate | null | undefined;
1206
1264
  preferences?: ContactPreferences | null | null | undefined;
1207
1265
  status?: "active" | "paused" | "blocked" | "archived" | null | undefined;
1208
1266
  statusReason?: string | null | null | undefined;
1209
1267
  externalId?: string | null | null | undefined;
1210
- metadata?: JsonObject | null | null | undefined;
1211
- createdBy?: ContactId | null | null | undefined;
1212
- lastModifiedBy?: ContactId | null | null | undefined;
1268
+ metadata?: JsonObject | null | undefined;
1213
1269
  }, options?: Options<never, ThrowOnError>): RequestResult<ContactsUpdateResponses, ContactsUpdateErrors, ThrowOnError>;
1270
+ /**
1271
+ * Add a contact identity
1272
+ *
1273
+ * 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.
1274
+ */
1275
+ static addIdentity<ThrowOnError extends boolean = false>(parameters: {
1276
+ id: ContactId;
1277
+ channel: "email";
1278
+ identifier: string;
1279
+ verified?: boolean | null | undefined;
1280
+ }, options?: Options<never, ThrowOnError>): RequestResult<ContactsAddIdentityResponses, ContactsAddIdentityErrors, ThrowOnError>;
1281
+ /**
1282
+ * Remove a contact identity
1283
+ *
1284
+ * Removes one address from the contact and returns the contact.
1285
+ */
1286
+ static removeIdentity<ThrowOnError extends boolean = false>(parameters: {
1287
+ id: ContactId;
1288
+ identityId: ContactIdentityId;
1289
+ }, options?: Options<never, ThrowOnError>): RequestResult<ContactsRemoveIdentityResponses, ContactsRemoveIdentityErrors, ThrowOnError>;
1290
+ /**
1291
+ * Remove contact tags
1292
+ *
1293
+ * Removes the given tags from the contact and returns the contact. A tag the contact does not have is ignored.
1294
+ */
1295
+ static removeTags<ThrowOnError extends boolean = false>(parameters: {
1296
+ id: ContactId;
1297
+ tags: [string];
1298
+ }, options?: Options<never, ThrowOnError>): RequestResult<ContactsRemoveTagsResponses, ContactsRemoveTagsErrors, ThrowOnError>;
1299
+ /**
1300
+ * Add contact tags
1301
+ *
1302
+ * Adds the given tags to the contact, keeping the tags it already has, and returns the contact.
1303
+ */
1304
+ static addTags<ThrowOnError extends boolean = false>(parameters: {
1305
+ id: ContactId;
1306
+ tags: [string];
1307
+ }, options?: Options<never, ThrowOnError>): RequestResult<ContactsAddTagsResponses, ContactsAddTagsErrors, ThrowOnError>;
1214
1308
  /**
1215
1309
  * Get contact engagement metrics
1216
1310
  *
@@ -1244,7 +1338,7 @@ export declare class Contacts {
1244
1338
  * Permanently deletes multiple contacts by ID, returning counts of deleted and failed records.
1245
1339
  */
1246
1340
  static bulkDelete<ThrowOnError extends boolean = false>(parameters: {
1247
- ids: [ContactId, ContactId];
1341
+ ids: [ContactId];
1248
1342
  }, options?: Options<never, ThrowOnError>): RequestResult<ContactsBulkDeleteResponses, ContactsBulkDeleteErrors, ThrowOnError>;
1249
1343
  /**
1250
1344
  * Bulk update contact tags
@@ -1252,9 +1346,9 @@ export declare class Contacts {
1252
1346
  * Adds, removes, or replaces tags on multiple contacts in one request, returning counts of updated and failed records.
1253
1347
  */
1254
1348
  static bulkUpdateTags<ThrowOnError extends boolean = false>(parameters: {
1255
- ids: [ContactId, ContactId];
1349
+ ids: [ContactId];
1256
1350
  operation: "add" | "remove" | "set";
1257
- tags: [string, string];
1351
+ tags: [string];
1258
1352
  }, options?: Options<never, ThrowOnError>): RequestResult<ContactsBulkUpdateTagsResponses, ContactsBulkUpdateTagsErrors, ThrowOnError>;
1259
1353
  /**
1260
1354
  * Bulk update contact status
@@ -1262,7 +1356,7 @@ export declare class Contacts {
1262
1356
  * Sets the status on multiple contacts in one request, returning counts of updated and failed records.
1263
1357
  */
1264
1358
  static bulkUpdateStatus<ThrowOnError extends boolean = false>(parameters: {
1265
- ids: [ContactId, ContactId];
1359
+ ids: [ContactId];
1266
1360
  status: "active" | "paused" | "blocked" | "archived";
1267
1361
  }, options?: Options<never, ThrowOnError>): RequestResult<ContactsBulkUpdateStatusResponses, ContactsBulkUpdateStatusErrors, ThrowOnError>;
1268
1362
  /**
@@ -1274,7 +1368,6 @@ export declare class Contacts {
1274
1368
  ids?: Array<ContactId> | null | undefined;
1275
1369
  format?: "json" | "csv" | null | undefined;
1276
1370
  filters?: {
1277
- type?: "human" | "system" | null | undefined;
1278
1371
  status?: "active" | "paused" | "blocked" | "archived" | null | undefined;
1279
1372
  tags?: Array<string> | null | undefined;
1280
1373
  } | null | undefined;
@@ -1283,21 +1376,23 @@ export declare class Contacts {
1283
1376
  /**
1284
1377
  * Get contact activity timeline
1285
1378
  *
1286
- * Returns a paginated timeline of a contact's message activity, optionally filtered by channel.
1379
+ * 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
1380
  */
1288
1381
  static getActivityTimeline<ThrowOnError extends boolean = false>(parameters: {
1289
1382
  id: ContactId;
1290
- page?: string | null | undefined;
1291
1383
  limit?: string | null | undefined;
1384
+ cursor?: Cursor | null | undefined;
1292
1385
  channel?: "email" | null | undefined;
1293
1386
  }, options?: Options<never, ThrowOnError>): RequestResult<ContactsGetActivityTimelineResponses, ContactsGetActivityTimelineErrors, ThrowOnError>;
1294
1387
  /**
1295
1388
  * List a contact's group memberships
1296
1389
  *
1297
- * Returns the contact groups that a contact currently belongs to.
1390
+ * 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
1391
  */
1299
1392
  static getGroupMemberships<ThrowOnError extends boolean = false>(parameters: {
1300
1393
  id: ContactId;
1394
+ limit?: string | null | undefined;
1395
+ cursor?: Cursor | null | undefined;
1301
1396
  }, options?: Options<never, ThrowOnError>): RequestResult<ContactsGetGroupMembershipsResponses, ContactsGetGroupMembershipsErrors, ThrowOnError>;
1302
1397
  }
1303
1398
  export declare class Contacts2 {
@@ -1307,11 +1402,11 @@ export declare class ContactGroups {
1307
1402
  /**
1308
1403
  * List contact groups
1309
1404
  *
1310
- * Returns a paginated list of contact groups for the organization, filterable by type and active state.
1405
+ * 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
1406
  */
1312
1407
  static list<ThrowOnError extends boolean = false>(parameters?: {
1313
- page?: string | null | undefined;
1314
1408
  limit?: string | null | undefined;
1409
+ cursor?: Cursor | null | undefined;
1315
1410
  type?: "static" | "dynamic" | "smart" | Array<"static" | "dynamic" | "smart"> | null | undefined;
1316
1411
  isActive?: string | null | undefined;
1317
1412
  }, options?: Options<never, ThrowOnError>): RequestResult<ContactGroupsListResponses, ContactGroupsListErrors, ThrowOnError>;
@@ -1372,18 +1467,18 @@ export declare class ContactGroups {
1372
1467
  * Removes one or more contacts from a contact group, returning the count of removed members.
1373
1468
  */
1374
1469
  static removeMembers<ThrowOnError extends boolean = false>(parameters: {
1375
- groupId: ContactGroupId;
1376
- contactIds: [ContactId, ContactId];
1470
+ id: ContactGroupId;
1471
+ contactIds: [ContactId];
1377
1472
  }, options?: Options<never, ThrowOnError>): RequestResult<ContactGroupsRemoveMembersResponses, ContactGroupsRemoveMembersErrors, ThrowOnError>;
1378
1473
  /**
1379
1474
  * List members of a contact group
1380
1475
  *
1381
- * Returns a paginated list of contacts belonging to a contact group.
1476
+ * 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
1477
  */
1383
1478
  static getMembers<ThrowOnError extends boolean = false>(parameters: {
1384
- groupId: ContactGroupId;
1385
- page?: string | null | undefined;
1479
+ id: ContactGroupId;
1386
1480
  limit?: string | null | undefined;
1481
+ cursor?: Cursor | null | undefined;
1387
1482
  }, options?: Options<never, ThrowOnError>): RequestResult<ContactGroupsGetMembersResponses, ContactGroupsGetMembersErrors, ThrowOnError>;
1388
1483
  /**
1389
1484
  * Add members to a contact group
@@ -1391,8 +1486,8 @@ export declare class ContactGroups {
1391
1486
  * Adds one or more contacts to a contact group, returning counts of added and skipped members.
1392
1487
  */
1393
1488
  static addMembers<ThrowOnError extends boolean = false>(parameters: {
1394
- groupId: ContactGroupId;
1395
- contactIds: [ContactId, ContactId];
1489
+ id: ContactGroupId;
1490
+ contactIds: [ContactId];
1396
1491
  role?: "member" | "moderator" | "admin" | null | undefined;
1397
1492
  }, options?: Options<never, ThrowOnError>): RequestResult<ContactGroupsAddMembersResponses, ContactGroupsAddMembersErrors, ThrowOnError>;
1398
1493
  /**
@@ -1401,7 +1496,7 @@ export declare class ContactGroups {
1401
1496
  * Recomputes a dynamic contact group's membership from its criteria, returning counts of added, removed, and total members.
1402
1497
  */
1403
1498
  static evaluateDynamic<ThrowOnError extends boolean = false>(parameters: {
1404
- groupId: ContactGroupId;
1499
+ id: ContactGroupId;
1405
1500
  }, options?: Options<never, ThrowOnError>): RequestResult<ContactGroupsEvaluateDynamicResponses, ContactGroupsEvaluateDynamicErrors, ThrowOnError>;
1406
1501
  /**
1407
1502
  * Preview contact group criteria
@@ -1430,16 +1525,13 @@ export declare class CustomFields {
1430
1525
  /**
1431
1526
  * List custom fields
1432
1527
  *
1433
- * Returns a paginated list of custom field definitions for the organization.
1528
+ * Returns every custom field definition for the organization in display order. An organization defines at most 100, so the list is never paged.
1434
1529
  */
1435
- static list<ThrowOnError extends boolean = false>(parameters?: {
1436
- page?: string | null | undefined;
1437
- limit?: string | null | undefined;
1438
- }, options?: Options<never, ThrowOnError>): RequestResult<CustomFieldsListResponses, CustomFieldsListErrors, ThrowOnError>;
1530
+ static list<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<CustomFieldsListResponses, CustomFieldsListErrors, ThrowOnError>;
1439
1531
  /**
1440
1532
  * Create a custom field
1441
1533
  *
1442
- * Creates a new custom field definition and returns it with a 201 status; the field key must be unique.
1534
+ * 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
1535
  */
1444
1536
  static create<ThrowOnError extends boolean = false>(parameters: {
1445
1537
  key: string;
@@ -1479,16 +1571,13 @@ export declare class Unsubscribe {
1479
1571
  /**
1480
1572
  * List unsubscribe groups
1481
1573
  *
1482
- * Returns a paginated list of the organization's unsubscribe groups, the default group first.
1574
+ * 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
1575
  */
1484
- static list<ThrowOnError extends boolean = false>(parameters?: {
1485
- page?: string | null | undefined;
1486
- limit?: string | null | undefined;
1487
- }, options?: Options<never, ThrowOnError>): RequestResult<UnsubscribeListResponses, UnsubscribeListErrors, ThrowOnError>;
1576
+ static list<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<UnsubscribeListResponses, UnsubscribeListErrors, ThrowOnError>;
1488
1577
  /**
1489
1578
  * Create an unsubscribe group
1490
1579
  *
1491
- * Creates a new unsubscribe group and returns it with a 201 Created status.
1580
+ * Creates a new unsubscribe group and returns it with a 201 Created status. An organization holds at most 200 groups.
1492
1581
  */
1493
1582
  static create<ThrowOnError extends boolean = false>(parameters: {
1494
1583
  name: string;
@@ -1526,18 +1615,18 @@ export declare class Unsubscribe {
1526
1615
  * Removes one or more email addresses from an unsubscribe group and returns the number removed.
1527
1616
  */
1528
1617
  static removeEmails<ThrowOnError extends boolean = false>(parameters: {
1529
- groupId: UnsubscribeId;
1618
+ id: UnsubscribeId;
1530
1619
  emails: Array<string>;
1531
1620
  }, options?: Options<never, ThrowOnError>): RequestResult<UnsubscribeRemoveEmailsResponses, UnsubscribeRemoveEmailsErrors, ThrowOnError>;
1532
1621
  /**
1533
1622
  * List unsubscribe group members
1534
1623
  *
1535
- * Returns a paginated list of the email addresses in an unsubscribe group.
1624
+ * 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
1625
  */
1537
1626
  static listMembers<ThrowOnError extends boolean = false>(parameters: {
1538
- groupId: UnsubscribeId;
1539
- page?: string | null | undefined;
1627
+ id: UnsubscribeId;
1540
1628
  limit?: string | null | undefined;
1629
+ cursor?: Cursor | null | undefined;
1541
1630
  }, options?: Options<never, ThrowOnError>): RequestResult<UnsubscribeListMembersResponses, UnsubscribeListMembersErrors, ThrowOnError>;
1542
1631
  /**
1543
1632
  * Add contacts to an unsubscribe group
@@ -1545,7 +1634,7 @@ export declare class Unsubscribe {
1545
1634
  * Adds one or more email addresses to an unsubscribe group and returns the number added and the number skipped.
1546
1635
  */
1547
1636
  static addEmails<ThrowOnError extends boolean = false>(parameters: {
1548
- groupId: UnsubscribeId;
1637
+ id: UnsubscribeId;
1549
1638
  emails: Array<string>;
1550
1639
  source?: "link" | "api" | "manual" | "complaint" | null | undefined;
1551
1640
  }, options?: Options<never, ThrowOnError>): RequestResult<UnsubscribeAddEmailsResponses, UnsubscribeAddEmailsErrors, ThrowOnError>;
@@ -1566,11 +1655,11 @@ export declare class Analytics {
1566
1655
  /**
1567
1656
  * Get message volume analytics
1568
1657
  *
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 `endDate` runs through the current instant, so its quiet trailing buckets are reported as zero.
1658
+ * 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
1659
  */
1571
1660
  static getStats<ThrowOnError extends boolean = false>(parameters?: {
1572
- startDate?: string | null | undefined;
1573
- endDate?: string | null | undefined;
1661
+ after?: string | null | undefined;
1662
+ before?: string | null | undefined;
1574
1663
  groupBy?: "day" | "week" | "month" | null | undefined;
1575
1664
  channel?: "email" | null | undefined;
1576
1665
  }, options?: Options<never, ThrowOnError>): RequestResult<AnalyticsGetStatsResponses, AnalyticsGetStatsErrors, ThrowOnError>;
@@ -1580,8 +1669,8 @@ export declare class Analytics {
1580
1669
  * 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
1670
  */
1582
1671
  static getChannelStats<ThrowOnError extends boolean = false>(parameters?: {
1583
- startDate?: string | null | undefined;
1584
- endDate?: string | null | undefined;
1672
+ after?: string | null | undefined;
1673
+ before?: string | null | undefined;
1585
1674
  }, options?: Options<never, ThrowOnError>): RequestResult<AnalyticsGetChannelStatsResponses, AnalyticsGetChannelStatsErrors, ThrowOnError>;
1586
1675
  /**
1587
1676
  * List top contacts by message volume
@@ -1589,8 +1678,8 @@ export declare class Analytics {
1589
1678
  * 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
1679
  */
1591
1680
  static getTopContacts<ThrowOnError extends boolean = false>(parameters?: {
1592
- startDate?: string | null | undefined;
1593
- endDate?: string | null | undefined;
1681
+ after?: string | null | undefined;
1682
+ before?: string | null | undefined;
1594
1683
  limit?: string | null | undefined;
1595
1684
  sortBy?: "sent" | "received" | "total" | null | undefined;
1596
1685
  }, options?: Options<never, ThrowOnError>): RequestResult<AnalyticsGetTopContactsResponses, AnalyticsGetTopContactsErrors, ThrowOnError>;
@@ -1600,8 +1689,8 @@ export declare class Analytics {
1600
1689
  * 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
1690
  */
1602
1691
  static getHourlyDistribution<ThrowOnError extends boolean = false>(parameters?: {
1603
- startDate?: string | null | undefined;
1604
- endDate?: string | null | undefined;
1692
+ after?: string | null | undefined;
1693
+ before?: string | null | undefined;
1605
1694
  }, options?: Options<never, ThrowOnError>): RequestResult<AnalyticsGetHourlyDistributionResponses, AnalyticsGetHourlyDistributionErrors, ThrowOnError>;
1606
1695
  /**
1607
1696
  * Get message delivery metrics
@@ -1609,8 +1698,8 @@ export declare class Analytics {
1609
1698
  * 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
1699
  */
1611
1700
  static getDeliveryMetrics<ThrowOnError extends boolean = false>(parameters?: {
1612
- startDate?: string | null | undefined;
1613
- endDate?: string | null | undefined;
1701
+ after?: string | null | undefined;
1702
+ before?: string | null | undefined;
1614
1703
  channel?: "email" | null | undefined;
1615
1704
  }, options?: Options<never, ThrowOnError>): RequestResult<AnalyticsGetDeliveryMetricsResponses, AnalyticsGetDeliveryMetricsErrors, ThrowOnError>;
1616
1705
  /**
@@ -1619,8 +1708,8 @@ export declare class Analytics {
1619
1708
  * 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
1709
  */
1621
1710
  static exportData<ThrowOnError extends boolean = false>(parameters: {
1622
- startDate: string;
1623
- endDate: string;
1711
+ after: string;
1712
+ before: string;
1624
1713
  format?: "csv" | "json" | null | undefined;
1625
1714
  includeChannels?: Array<"email"> | null | undefined;
1626
1715
  }, options?: Options<never, ThrowOnError>): RequestResult<AnalyticsExportDataResponses, AnalyticsExportDataErrors, ThrowOnError>;
@@ -1632,18 +1721,16 @@ export declare class Templates {
1632
1721
  /**
1633
1722
  * List templates
1634
1723
  *
1635
- * Returns a paginated list of the organization's templates, filterable by category, channel, status, and search, with configurable sorting.
1724
+ * 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
1725
  */
1637
1726
  static list<ThrowOnError extends boolean = false>(parameters?: {
1638
- page?: string | null | undefined;
1639
1727
  limit?: string | null | undefined;
1728
+ cursor?: Cursor | null | undefined;
1640
1729
  category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | undefined;
1641
1730
  channel?: "email" | null | undefined;
1642
1731
  status?: "draft" | "pending" | "approved" | "published" | "rejected" | "archived" | null | undefined;
1643
1732
  search?: string | null | undefined;
1644
1733
  projectId?: TemplateProjectId | null | undefined;
1645
- sortBy?: "name" | "createdAt" | "updatedAt" | "usageCount" | "lastUsedAt" | null | undefined;
1646
- sortOrder?: "asc" | "desc" | null | undefined;
1647
1734
  }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesListResponses, TemplatesListErrors, ThrowOnError>;
1648
1735
  /**
1649
1736
  * Create a template
@@ -1664,11 +1751,11 @@ export declare class Templates {
1664
1751
  /**
1665
1752
  * List template families
1666
1753
  *
1667
- * Returns a paginated list of the organization's template families and members.
1754
+ * 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
1755
  */
1669
1756
  static listFamilies<ThrowOnError extends boolean = false>(parameters?: {
1670
- page?: string | null | undefined;
1671
1757
  limit?: string | null | undefined;
1758
+ cursor?: Cursor | null | undefined;
1672
1759
  }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesListFamiliesResponses, TemplatesListFamiliesErrors, ThrowOnError>;
1673
1760
  /**
1674
1761
  * Create a template family
@@ -1684,7 +1771,7 @@ export declare class Templates {
1684
1771
  * Deletes a template family without deleting its member templates.
1685
1772
  */
1686
1773
  static deleteFamily<ThrowOnError extends boolean = false>(parameters: {
1687
- familyId: TemplateFamilyId;
1774
+ id: TemplateFamilyId;
1688
1775
  }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesDeleteFamilyResponses, TemplatesDeleteFamilyErrors, ThrowOnError>;
1689
1776
  /**
1690
1777
  * Get a template family
@@ -1692,7 +1779,7 @@ export declare class Templates {
1692
1779
  * Returns a template family and its channel-specific member templates.
1693
1780
  */
1694
1781
  static getFamily<ThrowOnError extends boolean = false>(parameters: {
1695
- familyId: TemplateFamilyId;
1782
+ id: TemplateFamilyId;
1696
1783
  }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesGetFamilyResponses, TemplatesGetFamilyErrors, ThrowOnError>;
1697
1784
  /**
1698
1785
  * Rename a template family
@@ -1700,7 +1787,7 @@ export declare class Templates {
1700
1787
  * Changes a template family's name and returns the updated family.
1701
1788
  */
1702
1789
  static renameFamily<ThrowOnError extends boolean = false>(parameters: {
1703
- familyId: TemplateFamilyId;
1790
+ id: TemplateFamilyId;
1704
1791
  name: string;
1705
1792
  }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesRenameFamilyResponses, TemplatesRenameFamilyErrors, ThrowOnError>;
1706
1793
  /**
@@ -1718,7 +1805,7 @@ export declare class Templates {
1718
1805
  * Removes a member template from the family without deleting the template.
1719
1806
  */
1720
1807
  static detachFamilyMember<ThrowOnError extends boolean = false>(parameters: {
1721
- familyId: TemplateFamilyId;
1808
+ id: TemplateFamilyId;
1722
1809
  templateId: TemplateId;
1723
1810
  }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesDetachFamilyMemberResponses, TemplatesDetachFamilyMemberErrors, ThrowOnError>;
1724
1811
  /**
@@ -1727,7 +1814,7 @@ export declare class Templates {
1727
1814
  * Adds an existing template as a channel member of the family and returns the updated family.
1728
1815
  */
1729
1816
  static attachFamilyMember<ThrowOnError extends boolean = false>(parameters: {
1730
- familyId: TemplateFamilyId;
1817
+ id: TemplateFamilyId;
1731
1818
  templateId: TemplateId;
1732
1819
  }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesAttachFamilyMemberResponses, TemplatesAttachFamilyMemberErrors, ThrowOnError>;
1733
1820
  /**
@@ -1741,7 +1828,7 @@ export declare class Templates {
1741
1828
  /**
1742
1829
  * Get a template
1743
1830
  *
1744
- * Returns template metadata, its project entry path, and compiled channel content. Open live project files through the workspace API.
1831
+ * 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
1832
  */
1746
1833
  static getById<ThrowOnError extends boolean = false>(parameters: {
1747
1834
  id: TemplateId;
@@ -1770,7 +1857,7 @@ export declare class Templates {
1770
1857
  * 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
1858
  */
1772
1859
  static addEntry<ThrowOnError extends boolean = false>(parameters: {
1773
- projectId: TemplateProjectId;
1860
+ id: TemplateProjectId;
1774
1861
  entryPath: string;
1775
1862
  name: string;
1776
1863
  slug: string;
@@ -1911,10 +1998,12 @@ export declare class Templates {
1911
1998
  /**
1912
1999
  * List a template's input contracts
1913
2000
  *
1914
- * Returns every immutable input contract this template has published under, newest version first. Send against a contract to follow later publications that validate input identically.
2001
+ * 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
2002
  */
1916
2003
  static listInputContracts<ThrowOnError extends boolean = false>(parameters: {
1917
2004
  id: TemplateId;
2005
+ limit?: string | null | undefined;
2006
+ cursor?: VersionCursor | null | undefined;
1918
2007
  }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesListInputContractsResponses, TemplatesListInputContractsErrors, ThrowOnError>;
1919
2008
  /**
1920
2009
  * Get a template input contract
@@ -2041,11 +2130,11 @@ export declare class Webhooks {
2041
2130
  /**
2042
2131
  * List webhooks
2043
2132
  *
2044
- * Returns a paginated list of the organization's webhook endpoints with each endpoint's delivery counts, optionally filtered by name search and status.
2133
+ * 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
2134
  */
2046
2135
  static list<ThrowOnError extends boolean = false>(parameters?: {
2047
- page?: string | null | undefined;
2048
2136
  limit?: string | null | undefined;
2137
+ cursor?: Cursor | null | undefined;
2049
2138
  search?: string | null | undefined;
2050
2139
  status?: "active" | "disabled" | null | undefined;
2051
2140
  }, options?: Options<never, ThrowOnError>): RequestResult<WebhooksListResponses, WebhooksListErrors, ThrowOnError>;
@@ -2057,8 +2146,10 @@ export declare class Webhooks {
2057
2146
  static create<ThrowOnError extends boolean = false>(parameters: {
2058
2147
  name: string;
2059
2148
  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">;
2149
+ 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
2150
  channels?: Array<"email"> | null | undefined;
2151
+ mailboxIds?: [MailboxId] | null | undefined;
2152
+ namespaceId?: NamespaceId | null | undefined;
2062
2153
  headers?: {
2063
2154
  [key: string]: string;
2064
2155
  } | null | undefined;
@@ -2089,8 +2180,10 @@ export declare class Webhooks {
2089
2180
  id: WebhookEndpointId;
2090
2181
  name?: string | null | undefined;
2091
2182
  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;
2183
+ 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
2184
  channels?: Array<"email"> | null | null | undefined;
2185
+ mailboxIds?: [MailboxId] | null | null | undefined;
2186
+ namespaceId?: NamespaceId | null | null | undefined;
2094
2187
  headers?: {
2095
2188
  [key: string]: string;
2096
2189
  } | null | undefined;
@@ -2110,20 +2203,22 @@ export declare class Webhooks {
2110
2203
  /**
2111
2204
  * List webhook delivery logs
2112
2205
  *
2113
- * Returns recent deliveries for a webhook endpoint, each naming the event type and time it was made for, with its nested attempt diagnostics.
2206
+ * 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
2207
  */
2115
2208
  static getLogs<ThrowOnError extends boolean = false>(parameters: {
2116
- webhookId: WebhookEndpointId;
2209
+ id: WebhookEndpointId;
2117
2210
  limit?: string | null | undefined;
2211
+ cursor?: Cursor | null | undefined;
2118
2212
  }, options?: Options<never, ThrowOnError>): RequestResult<WebhooksGetLogsResponses, WebhooksGetLogsErrors, ThrowOnError>;
2119
2213
  /**
2120
2214
  * Get webhook delivery statistics
2121
2215
  *
2122
- * Returns aggregate pending, delivered, exhausted, and cancelled delivery counts for a webhook endpoint, plus the same counts per organization-local calendar day over the selected period of 7, 30, or 90 days. Deliveries are retained for 90 days, so 90d is the whole history.
2216
+ * 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
2217
  */
2124
2218
  static getStats<ThrowOnError extends boolean = false>(parameters: {
2125
- webhookId: WebhookEndpointId;
2126
- period?: "7d" | "30d" | "90d" | null | undefined;
2219
+ id: WebhookEndpointId;
2220
+ after?: string | null | undefined;
2221
+ before?: string | null | undefined;
2127
2222
  }, options?: Options<never, ThrowOnError>): RequestResult<WebhooksGetStatsResponses, WebhooksGetStatsErrors, ThrowOnError>;
2128
2223
  /**
2129
2224
  * Retry a webhook delivery
@@ -2131,7 +2226,7 @@ export declare class Webhooks {
2131
2226
  * Performs one immediate manual redelivery attempt and returns that attempt's identity and outcome without changing the automatic retry lifecycle.
2132
2227
  */
2133
2228
  static retryDelivery<ThrowOnError extends boolean = false>(parameters: {
2134
- webhookId: WebhookEndpointId;
2229
+ id: WebhookEndpointId;
2135
2230
  deliveryId: WebhookDeliveryId;
2136
2231
  }, options?: Options<never, ThrowOnError>): RequestResult<WebhooksRetryDeliveryResponses, WebhooksRetryDeliveryErrors, ThrowOnError>;
2137
2232
  /**
@@ -2140,7 +2235,7 @@ export declare class Webhooks {
2140
2235
  * Generates and returns a new signing secret. The previous secret remains valid for a 24-hour rotation overlap.
2141
2236
  */
2142
2237
  static regenerateSecret<ThrowOnError extends boolean = false>(parameters: {
2143
- webhookId: WebhookEndpointId;
2238
+ id: WebhookEndpointId;
2144
2239
  }, options?: Options<never, ThrowOnError>): RequestResult<WebhooksRegenerateSecretResponses, WebhooksRegenerateSecretErrors, ThrowOnError>;
2145
2240
  }
2146
2241
  export declare class Webhooks2 {
@@ -2187,10 +2282,11 @@ export declare class Organizations {
2187
2282
  /**
2188
2283
  * Get organization usage
2189
2284
  *
2190
- * Returns usage statistics for the current organization over the selected reporting period.
2285
+ * 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
2286
  */
2192
2287
  static getUsage<ThrowOnError extends boolean = false>(parameters?: {
2193
- period?: "current" | "last_30_days" | "last_90_days" | "last_year" | null | undefined;
2288
+ after?: string | null | undefined;
2289
+ before?: string | null | undefined;
2194
2290
  }, options?: Options<never, ThrowOnError>): RequestResult<OrganizationsGetUsageResponses, OrganizationsGetUsageErrors, ThrowOnError>;
2195
2291
  /**
2196
2292
  * Delete the current organization
@@ -2209,11 +2305,11 @@ export declare class ApiKeys {
2209
2305
  /**
2210
2306
  * List API keys
2211
2307
  *
2212
- * Returns a paginated list of the organization's API keys, filterable by status and search term.
2308
+ * 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
2309
  */
2214
2310
  static list<ThrowOnError extends boolean = false>(parameters?: {
2215
- page?: string | null | undefined;
2216
2311
  limit?: string | null | undefined;
2312
+ cursor?: Cursor | null | undefined;
2217
2313
  status?: "active" | "revoked" | null | undefined;
2218
2314
  search?: string | null | undefined;
2219
2315
  }, options?: Options<never, ThrowOnError>): RequestResult<ApiKeysListResponses, ApiKeysListErrors, ThrowOnError>;
@@ -2228,14 +2324,6 @@ export declare class ApiKeys {
2228
2324
  expiresAt?: string | null | undefined;
2229
2325
  access?: ApiKeyAccess | null | undefined;
2230
2326
  }, 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
2327
  /**
2240
2328
  * Get an API key
2241
2329
  *
@@ -2247,49 +2335,852 @@ export declare class ApiKeys {
2247
2335
  /**
2248
2336
  * Update an API key
2249
2337
  *
2250
- * Updates the name or description of an API key and returns the updated key.
2338
+ * Updates an API key's settings and returns the updated key. A field left out keeps its value.
2251
2339
  */
2252
2340
  static update<ThrowOnError extends boolean = false>(parameters: {
2253
2341
  id: ApiKeyId;
2254
2342
  name?: string | null | undefined;
2255
2343
  description?: string | null | undefined;
2344
+ mailboxes?: ApiKeyMailboxAccessUpdate | null | undefined;
2256
2345
  }, options?: Options<never, ThrowOnError>): RequestResult<ApiKeysUpdateResponses, ApiKeysUpdateErrors, ThrowOnError>;
2257
2346
  /**
2258
- * Rotate an API key
2347
+ * Revoke an API key
2259
2348
  *
2260
- * Issues a replacement with the same owner, name, and access, then deactivates the existing key. Returns the new key, including the plaintext secret.
2349
+ * 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
2350
  */
2262
- static rotate<ThrowOnError extends boolean = false>(parameters: {
2351
+ static revoke<ThrowOnError extends boolean = false>(parameters: {
2263
2352
  id: ApiKeyId;
2264
- }, options?: Options<never, ThrowOnError>): RequestResult<ApiKeysRotateResponses, ApiKeysRotateErrors, ThrowOnError>;
2353
+ }, options?: Options<never, ThrowOnError>): RequestResult<ApiKeysRevokeResponses, ApiKeysRevokeErrors, ThrowOnError>;
2265
2354
  /**
2266
- * Delete an API key
2355
+ * Rotate an API key
2267
2356
  *
2268
- * Permanently deletes an API key record. Unlike revocation, the key row is removed rather than deactivated.
2357
+ * Issues a replacement with the same owner, name, and access, then deactivates the existing key. Returns the new key, including the plaintext secret.
2269
2358
  */
2270
- static remove<ThrowOnError extends boolean = false>(parameters: {
2359
+ static rotate<ThrowOnError extends boolean = false>(parameters: {
2271
2360
  id: ApiKeyId;
2272
- }, options?: Options<never, ThrowOnError>): RequestResult<ApiKeysRemoveResponses, ApiKeysRemoveErrors, ThrowOnError>;
2361
+ }, options?: Options<never, ThrowOnError>): RequestResult<ApiKeysRotateResponses, ApiKeysRotateErrors, ThrowOnError>;
2273
2362
  /**
2274
2363
  * Get API key send statistics
2275
2364
  *
2276
- * Returns aggregate send counts and daily volume attributed to an API key over the selected period of 7, 30, or 90 days.
2365
+ * 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
2366
  */
2278
2367
  static getStats<ThrowOnError extends boolean = false>(parameters: {
2279
2368
  id: ApiKeyId;
2280
- period?: "7d" | "30d" | "90d" | null | undefined;
2369
+ after?: string | null | undefined;
2370
+ before?: string | null | undefined;
2281
2371
  }, options?: Options<never, ThrowOnError>): RequestResult<ApiKeysGetStatsResponses, ApiKeysGetStatsErrors, ThrowOnError>;
2282
2372
  /**
2283
2373
  * List API key activity
2284
2374
  *
2285
- * Returns a paginated list of recent request activity recorded for an API key.
2375
+ * 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
2376
  */
2287
2377
  static getActivity<ThrowOnError extends boolean = false>(parameters: {
2288
2378
  id: ApiKeyId;
2289
- page?: string | null | undefined;
2290
2379
  limit?: string | null | undefined;
2380
+ cursor?: Cursor | null | undefined;
2291
2381
  }, options?: Options<never, ThrowOnError>): RequestResult<ApiKeysGetActivityResponses, ApiKeysGetActivityErrors, ThrowOnError>;
2292
2382
  }
2293
2383
  export declare class ApiKeys2 {
2294
2384
  static apiKeys: typeof ApiKeys;
2295
2385
  }
2386
+ export declare class Feedback {
2387
+ /**
2388
+ * Send feedback
2389
+ *
2390
+ * 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.
2391
+ */
2392
+ static send<ThrowOnError extends boolean = false>(parameters: {
2393
+ message: string;
2394
+ category?: "bug" | "confusing" | "missing" | "other" | null | undefined;
2395
+ context?: FeedbackContext | null | undefined;
2396
+ }, options?: Options<never, ThrowOnError>): RequestResult<FeedbackSendResponses, FeedbackSendErrors, ThrowOnError>;
2397
+ }
2398
+ export declare class Feedback2 {
2399
+ static feedback: typeof Feedback;
2400
+ }
2401
+ export declare class Mailboxes {
2402
+ /**
2403
+ * List mailboxes
2404
+ *
2405
+ * 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}`.
2406
+ */
2407
+ static list<ThrowOnError extends boolean = false>(parameters?: {
2408
+ limit?: string | null | undefined;
2409
+ cursor?: Cursor | null | undefined;
2410
+ after?: string | null | undefined;
2411
+ before?: string | null | undefined;
2412
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListResponses, MailboxesListErrors, ThrowOnError>;
2413
+ /**
2414
+ * Create a mailbox
2415
+ *
2416
+ * 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.
2417
+ */
2418
+ static create<ThrowOnError extends boolean = false>(parameters: {
2419
+ namespaceId?: NamespaceId | null | undefined;
2420
+ displayName: string;
2421
+ slug: string;
2422
+ addresses: [CreateMailboxAddressPayload];
2423
+ defaultFrom?: {
2424
+ address: string;
2425
+ displayName?: string | null | undefined;
2426
+ } | null | undefined;
2427
+ metadata?: MailboxMetadata | null | undefined;
2428
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesCreateResponses, MailboxesCreateErrors, ThrowOnError>;
2429
+ /**
2430
+ * Delete a mailbox
2431
+ *
2432
+ * 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.
2433
+ */
2434
+ static remove<ThrowOnError extends boolean = false>(parameters: {
2435
+ id: MailboxId;
2436
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesRemoveResponses, MailboxesRemoveErrors, ThrowOnError>;
2437
+ /**
2438
+ * Get a mailbox
2439
+ *
2440
+ * 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`.
2441
+ */
2442
+ static get<ThrowOnError extends boolean = false>(parameters: {
2443
+ id: MailboxId;
2444
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesGetResponses, MailboxesGetErrors, ThrowOnError>;
2445
+ /**
2446
+ * Update a mailbox
2447
+ *
2448
+ * 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.
2449
+ */
2450
+ static update<ThrowOnError extends boolean = false>(parameters: {
2451
+ id: MailboxId;
2452
+ displayName?: string | null | undefined;
2453
+ metadata?: MailboxMetadataPatch | null | undefined;
2454
+ defaultFrom?: {
2455
+ address: string;
2456
+ displayName?: string | null | null | undefined;
2457
+ } | null | undefined;
2458
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesUpdateResponses, MailboxesUpdateErrors, ThrowOnError>;
2459
+ /**
2460
+ * Pause a mailbox
2461
+ *
2462
+ * 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`.
2463
+ */
2464
+ static pause<ThrowOnError extends boolean = false>(parameters: {
2465
+ id: MailboxId;
2466
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesPauseResponses, MailboxesPauseErrors, ThrowOnError>;
2467
+ /**
2468
+ * Resume a mailbox
2469
+ *
2470
+ * Lets a paused mailbox send and receive again.
2471
+ */
2472
+ static resume<ThrowOnError extends boolean = false>(parameters: {
2473
+ id: MailboxId;
2474
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesResumeResponses, MailboxesResumeErrors, ThrowOnError>;
2475
+ /**
2476
+ * Get mailbox activity
2477
+ *
2478
+ * 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`.
2479
+ */
2480
+ static getAgentActivity<ThrowOnError extends boolean = false>(parameters: {
2481
+ id: MailboxId;
2482
+ after?: string | null | undefined;
2483
+ before?: string | null | undefined;
2484
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesGetAgentActivityResponses, MailboxesGetAgentActivityErrors, ThrowOnError>;
2485
+ /**
2486
+ * List mailbox grants
2487
+ *
2488
+ * 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.
2489
+ */
2490
+ static listGrants<ThrowOnError extends boolean = false>(parameters: {
2491
+ id: MailboxId;
2492
+ limit?: string | null | undefined;
2493
+ cursor?: Cursor | null | undefined;
2494
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListGrantsResponses, MailboxesListGrantsErrors, ThrowOnError>;
2495
+ /**
2496
+ * Grant a member access to a mailbox
2497
+ *
2498
+ * 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`.
2499
+ */
2500
+ static createGrant<ThrowOnError extends boolean = false>(parameters: {
2501
+ id: MailboxId;
2502
+ userId: UserId;
2503
+ role: MailboxGrantRole;
2504
+ sendMode?: MailboxSendMode | null | undefined;
2505
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesCreateGrantResponses, MailboxesCreateGrantErrors, ThrowOnError>;
2506
+ /**
2507
+ * Revoke a mailbox grant
2508
+ *
2509
+ * 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.
2510
+ */
2511
+ static revokeGrant<ThrowOnError extends boolean = false>(parameters: {
2512
+ id: MailboxId;
2513
+ grantId: MailboxGrantId;
2514
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesRevokeGrantResponses, MailboxesRevokeGrantErrors, ThrowOnError>;
2515
+ /**
2516
+ * Update a mailbox grant
2517
+ *
2518
+ * 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.
2519
+ */
2520
+ static updateGrant<ThrowOnError extends boolean = false>(parameters: {
2521
+ id: MailboxId;
2522
+ grantId: MailboxGrantId;
2523
+ role?: MailboxGrantRole | null | undefined;
2524
+ sendMode?: MailboxSendMode | null | undefined;
2525
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesUpdateGrantResponses, MailboxesUpdateGrantErrors, ThrowOnError>;
2526
+ /**
2527
+ * List mailbox policies
2528
+ *
2529
+ * 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.
2530
+ */
2531
+ static listPolicies<ThrowOnError extends boolean = false>(parameters: {
2532
+ id: MailboxId;
2533
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListPoliciesResponses, MailboxesListPoliciesErrors, ThrowOnError>;
2534
+ /**
2535
+ * Create a mailbox policy
2536
+ *
2537
+ * 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.
2538
+ */
2539
+ static createPolicy<ThrowOnError extends boolean = false>(parameters: {
2540
+ id: MailboxId;
2541
+ name: string;
2542
+ outcome: MailboxPolicyOutcomeKind;
2543
+ reason?: string | null | undefined;
2544
+ enabled?: boolean | null | undefined;
2545
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesCreatePolicyResponses, MailboxesCreatePolicyErrors, ThrowOnError>;
2546
+ /**
2547
+ * Delete a mailbox policy
2548
+ *
2549
+ * Deletes a send policy. Sends it already holds stay held until a person approves or denies them.
2550
+ */
2551
+ static deletePolicy<ThrowOnError extends boolean = false>(parameters: {
2552
+ id: MailboxId;
2553
+ policyId: MailboxPolicyId;
2554
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesDeletePolicyResponses, MailboxesDeletePolicyErrors, ThrowOnError>;
2555
+ /**
2556
+ * Get a mailbox policy
2557
+ *
2558
+ * Returns one send policy.
2559
+ */
2560
+ static getPolicy<ThrowOnError extends boolean = false>(parameters: {
2561
+ id: MailboxId;
2562
+ policyId: MailboxPolicyId;
2563
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesGetPolicyResponses, MailboxesGetPolicyErrors, ThrowOnError>;
2564
+ /**
2565
+ * Update a mailbox policy
2566
+ *
2567
+ * Updates the fields you name and keeps the rest. Set `enabled` to `false` to stop a policy applying without deleting it.
2568
+ */
2569
+ static updatePolicy<ThrowOnError extends boolean = false>(parameters: {
2570
+ id: MailboxId;
2571
+ policyId: MailboxPolicyId;
2572
+ name?: string | null | undefined;
2573
+ outcome?: MailboxPolicyOutcomeKind | null | undefined;
2574
+ reason?: string | null | null | undefined;
2575
+ enabled?: boolean | null | undefined;
2576
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesUpdatePolicyResponses, MailboxesUpdatePolicyErrors, ThrowOnError>;
2577
+ /**
2578
+ * List mailbox folders
2579
+ *
2580
+ * 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.
2581
+ */
2582
+ static listFolders<ThrowOnError extends boolean = false>(parameters: {
2583
+ id: MailboxId;
2584
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListFoldersResponses, MailboxesListFoldersErrors, ThrowOnError>;
2585
+ /**
2586
+ * List mailbox labels
2587
+ *
2588
+ * Returns every label defined on a mailbox, ordered by name. A mailbox holds at most 100 labels, so the list is never paged.
2589
+ */
2590
+ static listLabels<ThrowOnError extends boolean = false>(parameters: {
2591
+ id: MailboxId;
2592
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListLabelsResponses, MailboxesListLabelsErrors, ThrowOnError>;
2593
+ /**
2594
+ * Create a mailbox label
2595
+ *
2596
+ * 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.
2597
+ */
2598
+ static createLabel<ThrowOnError extends boolean = false>(parameters: {
2599
+ id: MailboxId;
2600
+ slug: string;
2601
+ displayName: string;
2602
+ color?: "billing" | "domain" | "agent" | "routing" | "important" | "neutral" | null | null | undefined;
2603
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesCreateLabelResponses, MailboxesCreateLabelErrors, ThrowOnError>;
2604
+ /**
2605
+ * Delete a mailbox label
2606
+ *
2607
+ * Deletes a label and removes it from every thread that carries it.
2608
+ */
2609
+ static deleteLabel<ThrowOnError extends boolean = false>(parameters: {
2610
+ id: MailboxId;
2611
+ labelId: MailboxLabelId;
2612
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesDeleteLabelResponses, MailboxesDeleteLabelErrors, ThrowOnError>;
2613
+ /**
2614
+ * Update a mailbox label
2615
+ *
2616
+ * Updates the fields you name and keeps the rest.
2617
+ */
2618
+ static updateLabel<ThrowOnError extends boolean = false>(parameters: {
2619
+ id: MailboxId;
2620
+ labelId: MailboxLabelId;
2621
+ displayName?: string | null | undefined;
2622
+ color?: "billing" | "domain" | "agent" | "routing" | "important" | "neutral" | null | null | undefined;
2623
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesUpdateLabelResponses, MailboxesUpdateLabelErrors, ThrowOnError>;
2624
+ /**
2625
+ * List threads in a mailbox
2626
+ *
2627
+ * 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.
2628
+ */
2629
+ static listThreads<ThrowOnError extends boolean = false>(parameters: {
2630
+ id: MailboxId;
2631
+ limit?: string | null | undefined;
2632
+ cursor?: Cursor | null | undefined;
2633
+ after?: string | null | undefined;
2634
+ before?: string | null | undefined;
2635
+ q?: string | null | undefined;
2636
+ folder?: MailboxThreadFolder | null | undefined;
2637
+ label?: MailboxLabelId | null | undefined;
2638
+ unread?: "true" | "false" | null | undefined;
2639
+ starred?: "true" | "false" | null | undefined;
2640
+ snoozed?: "true" | "false" | null | undefined;
2641
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListThreadsResponses, MailboxesListThreadsErrors, ThrowOnError>;
2642
+ /**
2643
+ * Get a mailbox thread
2644
+ *
2645
+ * 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`.
2646
+ */
2647
+ static getThread<ThrowOnError extends boolean = false>(parameters: {
2648
+ id: MailboxId;
2649
+ threadId: MailboxThreadId;
2650
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesGetThreadResponses, MailboxesGetThreadErrors, ThrowOnError>;
2651
+ /**
2652
+ * Update a mailbox thread
2653
+ *
2654
+ * 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}`.
2655
+ */
2656
+ static updateThread<ThrowOnError extends boolean = false>(parameters: {
2657
+ id: MailboxId;
2658
+ threadId: MailboxThreadId;
2659
+ folder?: MailboxThreadFolder | null | undefined;
2660
+ priority?: MailboxThreadPriority | null | undefined;
2661
+ read?: boolean | null | undefined;
2662
+ starred?: boolean | null | undefined;
2663
+ snoozedUntil?: string | null | null | undefined;
2664
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesUpdateThreadResponses, MailboxesUpdateThreadErrors, ThrowOnError>;
2665
+ /**
2666
+ * Remove thread labels
2667
+ *
2668
+ * Removes the given labels from the thread and returns where the thread stands. A label the thread does not carry is ignored.
2669
+ */
2670
+ static removeThreadLabels<ThrowOnError extends boolean = false>(parameters: {
2671
+ id: MailboxId;
2672
+ threadId: MailboxThreadId;
2673
+ labels: [MailboxLabelId];
2674
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesRemoveThreadLabelsResponses, MailboxesRemoveThreadLabelsErrors, ThrowOnError>;
2675
+ /**
2676
+ * Add thread labels
2677
+ *
2678
+ * 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.
2679
+ */
2680
+ static addThreadLabels<ThrowOnError extends boolean = false>(parameters: {
2681
+ id: MailboxId;
2682
+ threadId: MailboxThreadId;
2683
+ labels: [MailboxLabelId];
2684
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesAddThreadLabelsResponses, MailboxesAddThreadLabelsErrors, ThrowOnError>;
2685
+ /**
2686
+ * List messages in a mailbox thread
2687
+ *
2688
+ * 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}`.
2689
+ */
2690
+ static listThreadMessages<ThrowOnError extends boolean = false>(parameters: {
2691
+ id: MailboxId;
2692
+ threadId: MailboxThreadId;
2693
+ limit?: string | null | undefined;
2694
+ cursor?: Cursor | null | undefined;
2695
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListThreadMessagesResponses, MailboxesListThreadMessagesErrors, ThrowOnError>;
2696
+ /**
2697
+ * Read a mailbox thread
2698
+ *
2699
+ * 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.
2700
+ */
2701
+ static getThreadContent<ThrowOnError extends boolean = false>(parameters: {
2702
+ id: MailboxId;
2703
+ threadId: MailboxThreadId;
2704
+ limit?: string | null | undefined;
2705
+ cursor?: Cursor | null | undefined;
2706
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesGetThreadContentResponses, MailboxesGetThreadContentErrors, ThrowOnError>;
2707
+ /**
2708
+ * List notes in a mailbox thread
2709
+ *
2710
+ * 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.
2711
+ */
2712
+ static listThreadNotes<ThrowOnError extends boolean = false>(parameters: {
2713
+ id: MailboxId;
2714
+ threadId: MailboxThreadId;
2715
+ limit?: string | null | undefined;
2716
+ cursor?: Cursor | null | undefined;
2717
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListThreadNotesResponses, MailboxesListThreadNotesErrors, ThrowOnError>;
2718
+ /**
2719
+ * Create a mailbox note
2720
+ *
2721
+ * Adds an internal note to a thread and returns it with status 201. Notes are visible to everyone on the mailbox and never sent.
2722
+ */
2723
+ static createNote<ThrowOnError extends boolean = false>(parameters: {
2724
+ id: MailboxId;
2725
+ threadId: MailboxThreadId;
2726
+ body: string;
2727
+ color?: string | null | null | undefined;
2728
+ pinned?: boolean | null | undefined;
2729
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesCreateNoteResponses, MailboxesCreateNoteErrors, ThrowOnError>;
2730
+ /**
2731
+ * Delete a mailbox note
2732
+ *
2733
+ * Deletes a note. Only the note's author may.
2734
+ */
2735
+ static deleteNote<ThrowOnError extends boolean = false>(parameters: {
2736
+ id: MailboxId;
2737
+ threadId: MailboxThreadId;
2738
+ noteId: MailboxNoteId;
2739
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesDeleteNoteResponses, MailboxesDeleteNoteErrors, ThrowOnError>;
2740
+ /**
2741
+ * Update a mailbox note
2742
+ *
2743
+ * Updates the fields you name and keeps the rest. Only the note's author may.
2744
+ */
2745
+ static updateNote<ThrowOnError extends boolean = false>(parameters: {
2746
+ id: MailboxId;
2747
+ threadId: MailboxThreadId;
2748
+ noteId: MailboxNoteId;
2749
+ body?: string | null | undefined;
2750
+ color?: string | null | null | undefined;
2751
+ pinned?: boolean | null | undefined;
2752
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesUpdateNoteResponses, MailboxesUpdateNoteErrors, ThrowOnError>;
2753
+ /**
2754
+ * Send a new message
2755
+ *
2756
+ * 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.
2757
+ */
2758
+ static sendMessage<ThrowOnError extends boolean = false>(parameters: {
2759
+ "idempotency-key"?: string | null | undefined;
2760
+ id: MailboxId;
2761
+ to: [string];
2762
+ cc?: Array<string> | null | undefined;
2763
+ bcc?: Array<string> | null | undefined;
2764
+ replyTo?: Array<string> | null | undefined;
2765
+ subject: string;
2766
+ text?: string | null | undefined;
2767
+ html?: string | null | undefined;
2768
+ attachments?: Array<EmailAttachment> | null | undefined;
2769
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesSendMessageResponses, MailboxesSendMessageErrors, ThrowOnError>;
2770
+ /**
2771
+ * Get a mailbox message
2772
+ *
2773
+ * Returns a message in the mailbox with its text, sanitized HTML, `replyText` (what the sender wrote, without quoted history), authentication verdicts, and attachments.
2774
+ */
2775
+ static getMessage<ThrowOnError extends boolean = false>(parameters: {
2776
+ id: MailboxId;
2777
+ messageId: MessageId;
2778
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesGetMessageResponses, MailboxesGetMessageErrors, ThrowOnError>;
2779
+ /**
2780
+ * Get a message's raw MIME
2781
+ *
2782
+ * Returns a short-lived URL for the message exactly as it was received (`message/rfc822`). Sent messages have no stored MIME.
2783
+ */
2784
+ static getMessageRaw<ThrowOnError extends boolean = false>(parameters: {
2785
+ id: MailboxId;
2786
+ messageId: MessageId;
2787
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesGetMessageRawResponses, MailboxesGetMessageRawErrors, ThrowOnError>;
2788
+ /**
2789
+ * Get a message attachment
2790
+ *
2791
+ * Returns a short-lived download URL for one of the message's attachments.
2792
+ */
2793
+ static getMessageAttachment<ThrowOnError extends boolean = false>(parameters: {
2794
+ id: MailboxId;
2795
+ messageId: MessageId;
2796
+ attachmentId: AttachmentId;
2797
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesGetMessageAttachmentResponses, MailboxesGetMessageAttachmentErrors, ThrowOnError>;
2798
+ /**
2799
+ * Reply to a message
2800
+ *
2801
+ * Replies to the message's Reply-To address, or its sender, in the same thread. The server sets the recipients, subject, and threading headers.
2802
+ */
2803
+ static reply<ThrowOnError extends boolean = false>(parameters: {
2804
+ "idempotency-key"?: string | null | undefined;
2805
+ id: MailboxId;
2806
+ messageId: MessageId;
2807
+ cc?: Array<string> | null | undefined;
2808
+ bcc?: Array<string> | null | undefined;
2809
+ text?: string | null | undefined;
2810
+ html?: string | null | undefined;
2811
+ attachments?: Array<EmailAttachment> | null | undefined;
2812
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesReplyResponses, MailboxesReplyErrors, ThrowOnError>;
2813
+ /**
2814
+ * Reply to all recipients of a message
2815
+ *
2816
+ * Replies to the sender and every other recipient of the message except the mailbox itself, in the same thread.
2817
+ */
2818
+ static replyAll<ThrowOnError extends boolean = false>(parameters: {
2819
+ "idempotency-key"?: string | null | undefined;
2820
+ id: MailboxId;
2821
+ messageId: MessageId;
2822
+ cc?: Array<string> | null | undefined;
2823
+ bcc?: Array<string> | null | undefined;
2824
+ text?: string | null | undefined;
2825
+ html?: string | null | undefined;
2826
+ attachments?: Array<EmailAttachment> | null | undefined;
2827
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesReplyAllResponses, MailboxesReplyAllErrors, ThrowOnError>;
2828
+ /**
2829
+ * Forward a message
2830
+ *
2831
+ * 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.
2832
+ */
2833
+ static forward<ThrowOnError extends boolean = false>(parameters: {
2834
+ "idempotency-key"?: string | null | undefined;
2835
+ id: MailboxId;
2836
+ messageId: MessageId;
2837
+ to: [string];
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<MailboxesForwardResponses, MailboxesForwardErrors, ThrowOnError>;
2844
+ /**
2845
+ * List quarantined messages
2846
+ *
2847
+ * 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`.
2848
+ */
2849
+ static listQuarantine<ThrowOnError extends boolean = false>(parameters: {
2850
+ id: MailboxId;
2851
+ limit?: string | null | undefined;
2852
+ cursor?: Cursor | null | undefined;
2853
+ after?: string | null | undefined;
2854
+ before?: string | null | undefined;
2855
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListQuarantineResponses, MailboxesListQuarantineErrors, ThrowOnError>;
2856
+ /**
2857
+ * Release a quarantined message
2858
+ *
2859
+ * 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.
2860
+ */
2861
+ static releaseMessage<ThrowOnError extends boolean = false>(parameters: {
2862
+ id: MailboxId;
2863
+ messageId: MessageId;
2864
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesReleaseMessageResponses, MailboxesReleaseMessageErrors, ThrowOnError>;
2865
+ /**
2866
+ * Discard a quarantined message
2867
+ *
2868
+ * 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`.
2869
+ */
2870
+ static discardMessage<ThrowOnError extends boolean = false>(parameters: {
2871
+ id: MailboxId;
2872
+ messageId: MessageId;
2873
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesDiscardMessageResponses, MailboxesDiscardMessageErrors, ThrowOnError>;
2874
+ /**
2875
+ * List drafts
2876
+ *
2877
+ * 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}`.
2878
+ */
2879
+ static listDrafts<ThrowOnError extends boolean = false>(parameters: {
2880
+ id: MailboxId;
2881
+ limit?: string | null | undefined;
2882
+ cursor?: Cursor | null | undefined;
2883
+ threadId?: MailboxThreadId | null | undefined;
2884
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListDraftsResponses, MailboxesListDraftsErrors, ThrowOnError>;
2885
+ /**
2886
+ * Create a draft
2887
+ *
2888
+ * 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`.
2889
+ */
2890
+ static createDraft<ThrowOnError extends boolean = false>(parameters: {
2891
+ id: MailboxId;
2892
+ to?: Array<string> | null | undefined;
2893
+ cc?: Array<string> | null | undefined;
2894
+ bcc?: Array<string> | null | undefined;
2895
+ replyTo?: Array<string> | null | undefined;
2896
+ subject?: string | null | undefined;
2897
+ text?: string | null | undefined;
2898
+ html?: string | null | undefined;
2899
+ attachments?: Array<EmailAttachment> | null | undefined;
2900
+ inReplyToMessageId?: MessageId | null | undefined;
2901
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesCreateDraftResponses, MailboxesCreateDraftErrors, ThrowOnError>;
2902
+ /**
2903
+ * Delete a draft
2904
+ *
2905
+ * Discards an unsent draft.
2906
+ */
2907
+ static deleteDraft<ThrowOnError extends boolean = false>(parameters: {
2908
+ id: MailboxId;
2909
+ draftId: MailboxDraftId;
2910
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesDeleteDraftResponses, MailboxesDeleteDraftErrors, ThrowOnError>;
2911
+ /**
2912
+ * Get a draft
2913
+ *
2914
+ * Returns one of the caller's drafts, or the draft of a send waiting for approval when the caller may approve it.
2915
+ */
2916
+ static getDraft<ThrowOnError extends boolean = false>(parameters: {
2917
+ id: MailboxId;
2918
+ draftId: MailboxDraftId;
2919
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesGetDraftResponses, MailboxesGetDraftErrors, ThrowOnError>;
2920
+ /**
2921
+ * Update a draft
2922
+ *
2923
+ * 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.
2924
+ */
2925
+ static updateDraft<ThrowOnError extends boolean = false>(parameters: {
2926
+ id: MailboxId;
2927
+ draftId: MailboxDraftId;
2928
+ to?: Array<string> | null | undefined;
2929
+ cc?: Array<string> | null | null | undefined;
2930
+ bcc?: Array<string> | null | null | undefined;
2931
+ replyTo?: Array<string> | null | null | undefined;
2932
+ subject?: string | null | null | undefined;
2933
+ text?: string | null | null | undefined;
2934
+ html?: string | null | null | undefined;
2935
+ attachments?: Array<EmailAttachment> | null | null | undefined;
2936
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesUpdateDraftResponses, MailboxesUpdateDraftErrors, ThrowOnError>;
2937
+ /**
2938
+ * Send a draft
2939
+ *
2940
+ * 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.
2941
+ */
2942
+ static sendDraft<ThrowOnError extends boolean = false>(parameters: {
2943
+ "idempotency-key"?: string | null | undefined;
2944
+ id: MailboxId;
2945
+ draftId: MailboxDraftId;
2946
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesSendDraftResponses, MailboxesSendDraftErrors, ThrowOnError>;
2947
+ /**
2948
+ * List mailbox actions
2949
+ *
2950
+ * 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.
2951
+ */
2952
+ static listActions<ThrowOnError extends boolean = false>(parameters: {
2953
+ id: MailboxId;
2954
+ limit?: string | null | undefined;
2955
+ cursor?: Cursor | null | undefined;
2956
+ state?: "proposed" | "allowed" | "approvalRequired" | "policyDenied" | "approved" | "approvalDenied" | "executing" | "executed" | "failed" | null | undefined;
2957
+ after?: string | null | undefined;
2958
+ before?: string | null | undefined;
2959
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListActionsResponses, MailboxesListActionsErrors, ThrowOnError>;
2960
+ /**
2961
+ * Approve a mailbox action
2962
+ *
2963
+ * 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.
2964
+ */
2965
+ static approveAction<ThrowOnError extends boolean = false>(parameters: {
2966
+ id: MailboxId;
2967
+ actionId: MailboxActionId;
2968
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesApproveActionResponses, MailboxesApproveActionErrors, ThrowOnError>;
2969
+ /**
2970
+ * Deny a mailbox action
2971
+ *
2972
+ * 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.
2973
+ */
2974
+ static denyAction<ThrowOnError extends boolean = false>(parameters: {
2975
+ id: MailboxId;
2976
+ actionId: MailboxActionId;
2977
+ reason: string;
2978
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesDenyActionResponses, MailboxesDenyActionErrors, ThrowOnError>;
2979
+ /**
2980
+ * List mailbox events
2981
+ *
2982
+ * 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.
2983
+ */
2984
+ static listEvents<ThrowOnError extends boolean = false>(parameters: {
2985
+ id: MailboxId;
2986
+ limit?: string | null | undefined;
2987
+ cursor?: Cursor | null | undefined;
2988
+ after?: string | null | undefined;
2989
+ before?: string | null | undefined;
2990
+ }, options?: Options<never, ThrowOnError>): RequestResult<MailboxesListEventsResponses, MailboxesListEventsErrors, ThrowOnError>;
2991
+ }
2992
+ export declare class Mailboxes2 {
2993
+ static mailboxes: typeof Mailboxes;
2994
+ }
2995
+ export declare class Namespaces {
2996
+ /**
2997
+ * List namespaces
2998
+ *
2999
+ * 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}`.
3000
+ */
3001
+ static list<ThrowOnError extends boolean = false>(parameters?: {
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<NamespacesListResponses, NamespacesListErrors, ThrowOnError>;
3007
+ /**
3008
+ * Create a namespace
3009
+ *
3010
+ * Creates a namespace with status 201. Names are unique within the organization; a duplicate conflicts.
3011
+ */
3012
+ static create<ThrowOnError extends boolean = false>(parameters: {
3013
+ name: string;
3014
+ metadata?: NamespaceMetadata | null | undefined;
3015
+ }, options?: Options<never, ThrowOnError>): RequestResult<NamespacesCreateResponses, NamespacesCreateErrors, ThrowOnError>;
3016
+ /**
3017
+ * Delete a namespace
3018
+ *
3019
+ * Deletes an empty namespace. A namespace that still holds mailboxes or API keys conflicts: remove or move them first.
3020
+ */
3021
+ static remove<ThrowOnError extends boolean = false>(parameters: {
3022
+ id: NamespaceId;
3023
+ }, options?: Options<never, ThrowOnError>): RequestResult<NamespacesRemoveResponses, NamespacesRemoveErrors, ThrowOnError>;
3024
+ /**
3025
+ * Get a namespace
3026
+ *
3027
+ * Returns one namespace.
3028
+ */
3029
+ static get<ThrowOnError extends boolean = false>(parameters: {
3030
+ id: NamespaceId;
3031
+ }, options?: Options<never, ThrowOnError>): RequestResult<NamespacesGetResponses, NamespacesGetErrors, ThrowOnError>;
3032
+ /**
3033
+ * Update a namespace
3034
+ *
3035
+ * Updates the fields you name and keeps the rest. `metadata` merges into the stored metadata by key, and a `null` value deletes that key.
3036
+ */
3037
+ static update<ThrowOnError extends boolean = false>(parameters: {
3038
+ id: NamespaceId;
3039
+ name?: string | null | undefined;
3040
+ metadata?: {
3041
+ [key: string]: string | null;
3042
+ } | null | undefined;
3043
+ }, options?: Options<never, ThrowOnError>): RequestResult<NamespacesUpdateResponses, NamespacesUpdateErrors, ThrowOnError>;
3044
+ }
3045
+ export declare class Namespaces2 {
3046
+ static namespaces: typeof Namespaces;
3047
+ }
3048
+ export declare class Extensions {
3049
+ /**
3050
+ * List extensions
3051
+ *
3052
+ * 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.
3053
+ */
3054
+ static list<ThrowOnError extends boolean = false>(parameters?: {
3055
+ limit?: string | null | undefined;
3056
+ cursor?: Cursor | null | undefined;
3057
+ after?: string | null | undefined;
3058
+ before?: string | null | undefined;
3059
+ }, options?: Options<never, ThrowOnError>): RequestResult<ExtensionsListResponses, ExtensionsListErrors, ThrowOnError>;
3060
+ /**
3061
+ * Publish an extension version
3062
+ *
3063
+ * 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.
3064
+ */
3065
+ static publish<ThrowOnError extends boolean = false>(parameters: {
3066
+ manifest: {
3067
+ name: string;
3068
+ displayName: string;
3069
+ description?: string | null | undefined;
3070
+ version: string;
3071
+ runtime: "hosted" | "webhook";
3072
+ events: Array<"mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded">;
3073
+ permissions: Array<"read" | "update" | "send" | "quarantine.read">;
3074
+ };
3075
+ bundle?: string | null | undefined;
3076
+ }, options?: Options<never, ThrowOnError>): RequestResult<ExtensionsPublishResponses, ExtensionsPublishErrors, ThrowOnError>;
3077
+ /**
3078
+ * Get an extension
3079
+ *
3080
+ * Returns one extension by its id or name. Its versions are `GET /v1/extensions/{id}/versions`.
3081
+ */
3082
+ static get<ThrowOnError extends boolean = false>(parameters: {
3083
+ id: string;
3084
+ }, options?: Options<never, ThrowOnError>): RequestResult<ExtensionsGetResponses, ExtensionsGetErrors, ThrowOnError>;
3085
+ /**
3086
+ * List an extension's versions
3087
+ *
3088
+ * 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}`.
3089
+ */
3090
+ static listVersions<ThrowOnError extends boolean = false>(parameters: {
3091
+ id: string;
3092
+ limit?: string | null | undefined;
3093
+ cursor?: Cursor | null | undefined;
3094
+ }, options?: Options<never, ThrowOnError>): RequestResult<ExtensionsListVersionsResponses, ExtensionsListVersionsErrors, ThrowOnError>;
3095
+ /**
3096
+ * Get an extension version
3097
+ *
3098
+ * Returns one version, by its id or version string, with the manifest it was published with.
3099
+ */
3100
+ static getVersion<ThrowOnError extends boolean = false>(parameters: {
3101
+ id: string;
3102
+ versionId: string;
3103
+ }, options?: Options<never, ThrowOnError>): RequestResult<ExtensionsGetVersionResponses, ExtensionsGetVersionErrors, ThrowOnError>;
3104
+ }
3105
+ export declare class Extensions2 {
3106
+ static extensions: typeof Extensions;
3107
+ }
3108
+ export declare class ExtensionInstallations {
3109
+ /**
3110
+ * List installations
3111
+ *
3112
+ * 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}`.
3113
+ */
3114
+ static list<ThrowOnError extends boolean = false>(parameters?: {
3115
+ limit?: string | null | undefined;
3116
+ cursor?: Cursor | null | undefined;
3117
+ after?: string | null | undefined;
3118
+ before?: string | null | undefined;
3119
+ }, options?: Options<never, ThrowOnError>): RequestResult<ExtensionInstallationsListResponses, ExtensionInstallationsListErrors, ThrowOnError>;
3120
+ /**
3121
+ * Install an extension
3122
+ *
3123
+ * 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.
3124
+ */
3125
+ static install<ThrowOnError extends boolean = false>(parameters: {
3126
+ extension: string;
3127
+ version?: string | null | undefined;
3128
+ mailboxIds?: Array<MailboxId> | null | undefined;
3129
+ namespaceId?: NamespaceId | null | undefined;
3130
+ permissions?: Array<"read" | "update" | "send" | "quarantine.read"> | null | undefined;
3131
+ sendMode?: "send" | "approval" | null | undefined;
3132
+ webhookUrl?: string | null | undefined;
3133
+ }, options?: Options<never, ThrowOnError>): RequestResult<ExtensionInstallationsInstallResponses, ExtensionInstallationsInstallErrors, ThrowOnError>;
3134
+ /**
3135
+ * Uninstall an extension
3136
+ *
3137
+ * Deletes the installation with its API key and webhook endpoint. Actions it took keep their attribution.
3138
+ */
3139
+ static uninstall<ThrowOnError extends boolean = false>(parameters: {
3140
+ id: ExtensionInstallationId;
3141
+ }, options?: Options<never, ThrowOnError>): RequestResult<ExtensionInstallationsUninstallResponses, ExtensionInstallationsUninstallErrors, ThrowOnError>;
3142
+ /**
3143
+ * Get an installation
3144
+ *
3145
+ * Returns one installation with its permissions, scope, send mode, and webhook endpoint.
3146
+ */
3147
+ static get<ThrowOnError extends boolean = false>(parameters: {
3148
+ id: ExtensionInstallationId;
3149
+ }, options?: Options<never, ThrowOnError>): RequestResult<ExtensionInstallationsGetResponses, ExtensionInstallationsGetErrors, ThrowOnError>;
3150
+ /**
3151
+ * Disable an installation
3152
+ *
3153
+ * Stops the installation at once: its events stop, and its credential is refused on every surface until it is enabled again.
3154
+ */
3155
+ static disable<ThrowOnError extends boolean = false>(parameters: {
3156
+ id: ExtensionInstallationId;
3157
+ }, options?: Options<never, ThrowOnError>): RequestResult<ExtensionInstallationsDisableResponses, ExtensionInstallationsDisableErrors, ThrowOnError>;
3158
+ /**
3159
+ * Enable an installation
3160
+ *
3161
+ * Resumes a disabled installation. Events published while it was disabled are not delivered.
3162
+ */
3163
+ static enable<ThrowOnError extends boolean = false>(parameters: {
3164
+ id: ExtensionInstallationId;
3165
+ }, options?: Options<never, ThrowOnError>): RequestResult<ExtensionInstallationsEnableResponses, ExtensionInstallationsEnableErrors, ThrowOnError>;
3166
+ /**
3167
+ * List a hosted installation's runs
3168
+ *
3169
+ * 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}`.
3170
+ */
3171
+ static listRuns<ThrowOnError extends boolean = false>(parameters: {
3172
+ id: ExtensionInstallationId;
3173
+ }, options?: Options<never, ThrowOnError>): RequestResult<ExtensionInstallationsListRunsResponses, ExtensionInstallationsListRunsErrors, ThrowOnError>;
3174
+ /**
3175
+ * Get a hosted run
3176
+ *
3177
+ * Returns one retained run with the lines its handler logged: at most 50 lines of 500 characters.
3178
+ */
3179
+ static getRun<ThrowOnError extends boolean = false>(parameters: {
3180
+ id: ExtensionInstallationId;
3181
+ runId: string;
3182
+ }, options?: Options<never, ThrowOnError>): RequestResult<ExtensionInstallationsGetRunResponses, ExtensionInstallationsGetRunErrors, ThrowOnError>;
3183
+ }
3184
+ export declare class ExtensionInstallations2 {
3185
+ static extensionInstallations: typeof ExtensionInstallations;
3186
+ }