Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
// This file is auto-generated by @hey-api/openapi-ts
import { type Client, type ClientMeta, formDataBodySerializer, type Options as Options2, type RequestResult, type ServerSentEventsResult, type TDataShape } from './client';
import { client } from './client.gen';
import type { AccessRequestsCancelData, AccessRequestsCancelErrors, AccessRequestsCancelResponses, AccessRequestsDirectData, AccessRequestsDirectErrors, AccessRequestsDirectResponses, AccessRequestsRemoveDirectData, AccessRequestsRemoveDirectErrors, AccessRequestsRemoveDirectResponses, AccessRequestsResolveData, AccessRequestsResolveErrors, AccessRequestsResolveResponses, AccessRequestsSetDirectData, AccessRequestsSetDirectErrors, AccessRequestsSetDirectResponses, AccessRequestsStateData, AccessRequestsStateErrors, AccessRequestsStateResponses, AccessRequestsSubmitData, AccessRequestsSubmitErrors, AccessRequestsSubmitResponses, AddChannelBotData, AddChannelBotErrors, AddChannelBotResponses, AddFavoriteData, AddFavoriteErrors, AddFavoriteResponses, AddParticipantsData, AddParticipantsErrors, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerErrors, AddPinHandlerResponses, ApplyCrmPipelineOpsData, ApplyCrmPipelineOpsResponses, ApplyDatabaseOpsData, ApplyDatabaseOpsErrors, ApplyDatabaseOpsResponses, ApproveHarnessPairingData, ApproveHarnessPairingErrors, ApproveHarnessPairingResponses, BlockCrmDomainData, BlockCrmDomainErrors, BlockCrmDomainResponses, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponses, CallWebhookData, CallWebhookErrors, CallWebhookResponses, CancelChannelAccessRequestData, CancelChannelAccessRequestErrors, CancelChannelAccessRequestResponses, CancelSlackImportData, CancelSlackImportErrors, CancelSlackImportResponses, CheckActiveCallData, CheckActiveCallErrors, CheckActiveCallResponses, ClaimAccountManagerTokenData, ClaimAccountManagerTokenErrors, ClaimAccountManagerTokenResponses, ClaimHarnessPairingData, ClaimHarnessPairingErrors, ClaimHarnessPairingResponses, CollaborateFormData, CollaborateFormErrors, CollaborateFormResponses, CompleteSlackImportUploadsData, CompleteSlackImportUploadsErrors, CompleteSlackImportUploadsResponses, ConvertDatabaseColumnData, ConvertDatabaseColumnErrors, ConvertDatabaseColumnResponses, CopyDocumentData, CopyDocumentErrors, CopyDocumentResponses, CopyPresentationData, CopyPresentationErrors, CopyPresentationResponses, CreateAgentData, CreateAgentErrors, CreateAgentResponses, CreateAnchorData, CreateAnchorErrors, CreateAnchorResponses, CreateBotData, CreateBotErrors, CreateBotResponses, CreateBotTokenData, CreateBotTokenErrors, CreateBotTokenResponses, CreateCanvasHandlerData, CreateCanvasHandlerErrors, CreateCanvasHandlerResponses, CreateChannelData, CreateChannelErrors, CreateChannelLabelData, CreateChannelLabelErrors, CreateChannelLabelResponses, CreateChannelResponses, CreateChannelScopedBotData, CreateChannelScopedBotErrors, CreateChannelScopedBotResponses, CreateCollabSurfaceTokenData, CreateCollabSurfaceTokenErrors, CreateCollabSurfaceTokenResponses, CreateCrmCompanyData, CreateCrmCompanyErrors, CreateCrmCompanyResponses, CreateCrmContactData, CreateCrmContactErrors, CreateCrmContactResponses, CreateCrmPipelineData, CreateCrmPipelineResponses, CreateCrmTeamContactData, CreateCrmTeamContactErrors, CreateCrmTeamContactResponses, CreateDatabaseData, CreateDatabaseErrors, CreateDatabaseResponses, CreateDatabaseWebhookData, CreateDatabaseWebhookErrors, CreateDatabaseWebhookResponses, CreateDocumentData, CreateDocumentErrors, CreateDocumentResponses, CreateEntityMentionData, CreateEntityMentionErrors, CreateEntityMentionResponses, CreateFormData, CreateFormErrors, CreateFormResponses, CreateHarnessPairingData, CreateHarnessPairingErrors, CreateHarnessPairingResponses, CreateInitiativeData, CreateInitiativeErrors, CreateInitiativeResponses, CreateInstructionsHandlerData, CreateInstructionsHandlerErrors, CreateInstructionsHandlerResponses, CreateMarkdownHandlerData, CreateMarkdownHandlerErrors, CreateMarkdownHandlerResponses, CreateProjectHandlerData, CreateProjectHandlerErrors, CreateProjectHandlerResponses, CreateSkillHandlerData, CreateSkillHandlerErrors, CreateSkillHandlerResponses, CreateSlackImportData, CreateSlackImportErrors, CreateSlackImportResponses, CreateSnippetHandlerData, CreateSnippetHandlerErrors, CreateSnippetHandlerResponses, CreateTaskHandlerData, CreateTaskHandlerErrors, CreateTaskHandlerResponses, CreateUserApiKeyData, CreateUserApiKeyErrors, CreateUserApiKeyResponses, CreateViewHandlerData, CreateViewHandlerErrors, CreateViewHandlerResponses, CreateWebhookData, CreateWebhookErrors, CreateWebhookResponses, DeclineCallData, DeclineCallErrors, DeclineCallResponses, DeclineRingData, DeclineRingErrors, DeclineRingResponses, DeleteAnchorData, DeleteAnchorErrors, DeleteAnchorResponses, DeleteBotData, DeleteBotErrors, DeleteBotResponses, DeleteCallRecordData, DeleteCallRecordErrors, DeleteCallRecordResponses, DeleteChannelData, DeleteChannelErrors, DeleteChannelLabelData, DeleteChannelLabelErrors, DeleteChannelLabelResponses, DeleteChannelResponses, DeleteCollabSurfaceData, DeleteCollabSurfaceErrors, DeleteCollabSurfaceResponses, DeleteDatabaseWebhookData, DeleteDatabaseWebhookErrors, DeleteDatabaseWebhookResponses, DeleteDocumentData, DeleteDocumentErrors, DeleteDocumentResponses, DeleteEntityMentionData, DeleteEntityMentionErrors, DeleteEntityMentionResponses, DeleteHarnessData, DeleteHarnessErrors, DeleteHarnessResponses, DeleteHistoryHandlerData, DeleteHistoryHandlerErrors, DeleteHistoryHandlerResponses, DeleteInitiativeData, DeleteInitiativeErrors, DeleteInitiativeResponses, DeleteProjectHandlerData, DeleteProjectHandlerErrors, DeleteProjectHandlerResponses, DeleteSelfHarnessData, DeleteSelfHarnessErrors, DeleteSelfHarnessResponses, DeleteUserApiKeyData, DeleteUserApiKeyErrors, DeleteUserApiKeyResponses, DeleteUserDocumentViewLocationData, DeleteUserDocumentViewLocationErrors, DeleteUserDocumentViewLocationResponses, DeleteViewHandlerData, DeleteViewHandlerErrors, DeleteViewHandlerResponses, DeleteWebhookData, DeleteWebhookErrors, DeleteWebhookResponses, DeliverDatabaseWebhookData, DeliverDatabaseWebhookErrors, DeliverDatabaseWebhookResponses, DuplicateDatabaseData, DuplicateDatabaseErrors, DuplicateDatabaseResponses, EditAnchorData, EditAnchorErrors, EditAnchorResponses, EditCallRecordData, EditCallRecordErrors, EditCallRecordResponses, EditCallTranscriptData, EditCallTranscriptErrors, EditCallTranscriptResponses, EditDocumentData, EditDocumentErrors, EditDocumentResponses, EditDocumentWithAiData, EditDocumentWithAiErrors, EditDocumentWithAiResponses, EditMyFormResponseData, EditMyFormResponseErrors, EditMyFormResponseResponses, EditPresentationData, EditPresentationErrors, EditPresentationResponses, EditProjectV2Data, EditProjectV2Errors, EditProjectV2Responses, EditThreadV2Data, EditThreadV2Errors, EditThreadV2Responses, EditWordDocumentData, EditWordDocumentErrors, EditWordDocumentResponses, EnsureCollabSurfaceData, EnsureCollabSurfaceErrors, EnsureCollabSurfaceResponses, EnsureStarterHandlerData, EnsureStarterHandlerErrors, EnsureStarterHandlerResponses, EntityMessageCreateData, EntityMessageCreateResponses, EntityMessageDeleteMessageData, EntityMessageDeleteMessageResponses, EntityMessageDeleteThreadData, EntityMessageDeleteThreadResponses, EntityMessageEditData, EntityMessageEditResponses, EntityMessageGetMessageData, EntityMessageGetMessageResponses, EntityMessageGetThreadData, EntityMessageGetThreadResponses, EntityMessageLegacyData, EntityMessageLegacyResponses, EntityMessagePatchThreadData, EntityMessagePatchThreadResponses, EntityMessageReactData, EntityMessageReactResponses, EntityMessageTypingData, EntityMessageTypingResponses, EventIcsData, EventIcsErrors, EventIcsResponses, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExportDocumentData, ExportDocumentErrors, ExportDocumentResponses, ExternalChatAddData, ExternalChatAddResponses, ExternalChatData, ExternalChatDeliveryData, ExternalChatDeliveryResponses, ExternalChatMessageAttachmentsData, ExternalChatMessageAttachmentsResponses, ExternalChatMessageData, ExternalChatMessageResponses, ExternalChatMessagesData, ExternalChatMessagesResponses, ExternalChatPermissionsData, ExternalChatPermissionsResponses, ExternalChatReadData, ExternalChatReadResponses, ExternalChatRemoveData, ExternalChatRemoveResponses, ExternalChatResponses, ExternalChatsData, ExternalChatSendData, ExternalChatSendErrors, ExternalChatSendResponses, ExternalChatSendsData, ExternalChatSendsResponses, ExternalChatsResponses, ExternalChatUpdatePermissionsData, ExternalChatUpdatePermissionsResponses, ExternalChatUploadData, ExternalChatUploadResponses, FinalizeSlackImportData, FinalizeSlackImportErrors, FinalizeSlackImportResponses, GetAccountManagerGrantData, GetAccountManagerGrantErrors, GetAccountManagerGrantResponses, GetActiveCallsData, GetActiveCallsErrors, GetActiveCallsResponses, GetActivityData, GetActivityErrors, GetActivityResponses, GetAttachmentReferencesData, GetAttachmentReferencesErrors, GetAttachmentReferencesResponses, GetBatchCallRecordPreviewData, GetBatchCallRecordPreviewErrors, GetBatchCallRecordPreviewResponses, GetBatchChannelPreviewData, GetBatchChannelPreviewErrors, GetBatchChannelPreviewResponses, GetBatchPreviewHandlerData, GetBatchPreviewHandlerErrors, GetBatchPreviewHandlerResponses, GetBatchProjectPreviewData, GetBatchProjectPreviewErrors, GetBatchProjectPreviewResponses, GetBotData, GetBotErrors, GetBotOwnerProfilesData, GetBotOwnerProfilesErrors, GetBotOwnerProfilesResponses, GetBotResponses, GetCallParticipantsData, GetCallParticipantsErrors, GetCallParticipantsResponses, GetCallRecordData, GetCallRecordErrors, GetCallRecordingData, GetCallRecordingErrors, GetCallRecordingResponses, GetCallRecordResponses, GetCallRingStateData, GetCallRingStateResponses, GetChannelAccessRequestData, GetChannelAccessRequestErrors, GetChannelAccessRequestResponses, GetChannelAttachmentsData, GetChannelAttachmentsErrors, GetChannelAttachmentsResponses, GetChannelData, GetChannelErrors, GetChannelJoinLinkData, GetChannelJoinLinkErrors, GetChannelJoinLinkResponses, GetChannelParticipantsData, GetChannelParticipantsErrors, GetChannelParticipantsResponses, GetChannelResponses, GetChannelsData, GetChannelsErrors, GetChannelsResponses, GetCollabSurfaceData, GetCollabSurfaceErrors, GetCollabSurfaceResponses, GetCompanyData, GetCompanyErrors, GetCompanyResponses, GetContactByEmailData, GetContactByEmailErrors, GetContactByEmailResponses, GetContactData, GetContactErrors, GetContactResponses, GetCrmPipelineData, GetCrmPipelinePermissionsData, GetCrmPipelinePermissionsResponses, GetCrmPipelineResponses, GetCrmPipelineRowsData, GetCrmPipelineRowsResponses, GetCrmPipelineStageRequirementsData, GetCrmPipelineStageRequirementsResponses, GetCrmPipelineTableData, GetCrmPipelineTableResponses, GetCrmPipelineViewPositionsData, GetCrmPipelineViewPositionsResponses, GetCrmTeamSettingsData, GetCrmTeamSettingsErrors, GetCrmTeamSettingsResponses, GetDatabaseData, GetDatabaseErrors, GetDatabasePermissionsData, GetDatabasePermissionsErrors, GetDatabasePermissionsResponses, GetDatabaseQueryData, GetDatabaseQueryErrors, GetDatabaseQueryResponses, GetDatabaseResponses, GetDatabaseRowHistoryData, GetDatabaseRowHistoryErrors, GetDatabaseRowHistoryResponses, GetDatabaseTableChangesData, GetDatabaseTableChangesErrors, GetDatabaseTableChangesResponses, GetDatabaseViewPositionsData, GetDatabaseViewPositionsErrors, GetDatabaseViewPositionsResponses, GetDocumentAnchorsData, GetDocumentAnchorsErrors, GetDocumentAnchorsResponses, GetDocumentBranchNameData, GetDocumentBranchNameErrors, GetDocumentBranchNameResponses, GetDocumentByTeamSlugData, GetDocumentByTeamSlugErrors, GetDocumentByTeamSlugResponses, GetDocumentData, GetDocumentErrors, GetDocumentGithubPullRequestsData, GetDocumentGithubPullRequestsErrors, GetDocumentGithubPullRequestsResponses, GetDocumentListHandlerData, GetDocumentListHandlerErrors, GetDocumentListHandlerResponses, GetDocumentLocationV3Data, GetDocumentLocationV3Errors, GetDocumentLocationV3Responses, GetDocumentPermissionsTokenData, GetDocumentPermissionsTokenErrors, GetDocumentPermissionsTokenResponses, GetDocumentPermissionsV2Data, GetDocumentPermissionsV2Errors, GetDocumentPermissionsV2Responses, GetDocumentProcessingResultData, GetDocumentProcessingResultErrors, GetDocumentProcessingResultResponses, GetDocumentResponses, GetDocumentShortIdData, GetDocumentShortIdErrors, GetDocumentShortIdResponses, GetDocumentTeamShareData, GetDocumentTeamShareErrors, GetDocumentTeamShareResponses, GetDocumentTextContentData, GetDocumentTextContentErrors, GetDocumentTextContentResponses, GetDocumentVersionData, GetDocumentVersionErrors, GetDocumentVersionResponses, GetDocumentViewsHandlerData, GetDocumentViewsHandlerErrors, GetDocumentViewsHandlerResponses, GetEmailFollowupData, GetEmailFollowupErrors, GetEmailFollowupResponses, GetEntityPermissionData, GetEntityPermissionErrors, GetEntityPermissionResponses, GetForeignEntityBySourceData, GetForeignEntityBySourceErrors, GetForeignEntityBySourceResponses, GetForeignEntityData, GetForeignEntityErrors, GetForeignEntityResponses, GetFormData, GetFormErrors, GetFormPermissionsData, GetFormPermissionsErrors, GetFormPermissionsResponses, GetFormResponses, GetFormResponseSummaryData, GetFormResponseSummaryErrors, GetFormResponseSummaryResponses, GetFormTallyData, GetFormTallyErrors, GetFormTallyResponses, GetGithubPullRequestChangesData, GetGithubPullRequestChangesErrors, GetGithubPullRequestChangesPatchData, GetGithubPullRequestChangesPatchErrors, GetGithubPullRequestChangesPatchResponses, GetGithubPullRequestChangesResponses, GetGithubPullRequestData, GetGithubPullRequestErrors, GetGithubPullRequestFacetsData, GetGithubPullRequestFacetsErrors, GetGithubPullRequestFacetsResponses, GetGithubPullRequestResponses, GetGithubPullRequestTasksData, GetGithubPullRequestTasksErrors, GetGithubPullRequestTasksResponses, GetHarnessPairingData, GetHarnessPairingErrors, GetHarnessPairingResponses, GetHistoryHandlerData, GetHistoryHandlerErrors, GetHistoryHandlerResponses, GetInitiativeData, GetInitiativeErrors, GetInitiativeResponses, GetInstructionsHandlerData, GetInstructionsHandlerErrors, GetInstructionsHandlerResponses, GetItemsSoupData, GetItemsSoupErrors, GetItemsSoupResponses, GetLiveCallsData, GetLiveCallsResponses, GetLocationHandlerData, GetLocationHandlerErrors, GetLocationHandlerResponses, GetMyChannelAccessRequestData, GetMyChannelAccessRequestErrors, GetMyChannelAccessRequestResponses, GetMyFormResponseData, GetMyFormResponseErrors, GetMyFormResponseResponses, GetOrCreateCallData, GetOrCreateCallErrors, GetOrCreateCallResponses, GetOrCreateDmData, GetOrCreateDmErrors, GetOrCreateDmResponses, GetOrCreatePrivateData, GetOrCreatePrivateErrors, GetOrCreatePrivateResponses, GetPendingProjectsHandlerData, GetPendingProjectsHandlerErrors, GetPendingProjectsHandlerResponses, GetPinsHandlerData, GetPinsHandlerErrors, GetPinsHandlerResponses, GetProjectContentHandlerData, GetProjectContentHandlerErrors, GetProjectContentHandlerResponses, GetProjectHandlerData, GetProjectHandlerErrors, GetProjectHandlerResponses, GetProjectPermissionsV2Data, GetProjectPermissionsV2Errors, GetProjectPermissionsV2Responses, GetProjectsHandlerData, GetProjectsHandlerErrors, GetProjectsHandlerResponses, GetProjectUserAccessLevelData, GetProjectUserAccessLevelErrors, GetProjectUserAccessLevelResponses, GetRingStatusData, GetRingStatusErrors, GetRingStatusResponses, GetSelfBotData, GetSelfBotErrors, GetSelfBotResponses, GetSelfHarnessData, GetSelfHarnessErrors, GetSelfHarnessResponses, GetSkillDescriptionData, GetSkillDescriptionErrors, GetSkillDescriptionResponses, GetSlackImportData, GetSlackImportErrors, GetSlackImportResponses, GetSystemSkillsHandlerData, GetSystemSkillsHandlerErrors, GetSystemSkillsHandlerResponses, GetUserDocumentsHandlerData, GetUserDocumentsHandlerErrors, GetUserDocumentsHandlerResponses, GetUserDocumentViewLocationData, GetUserDocumentViewLocationErrors, GetUserDocumentViewLocationResponses, GetViewsHandlerData, GetViewsHandlerErrors, GetViewsHandlerResponses, GetWebhookData, GetWebhookErrors, GetWebhookResponses, GuestCallChatPostData, GuestCallChatPostErrors, GuestCallChatPostResponses, GuestCallChatReadData, GuestCallChatReadErrors, GuestCallChatReadResponses, HandlerData, HandlerErrors, HandlerResponses, HealthHandlerData, HealthHandlerResponses, ImportDatabaseTableData, ImportDatabaseTableErrors, ImportDatabaseTableResponses, InferDatabaseColumnTypeData, InferDatabaseColumnTypeErrors, InferDatabaseColumnTypeResponses, IngestTranscriptData, IngestTranscriptErrors, IngestTranscriptResponses, InitializeUserDocumentsData, InitializeUserDocumentsErrors, InitializeUserDocumentsResponses, InstallSyncData, InstallSyncErrors, JobProcessingResultHandlerData, JobProcessingResultHandlerErrors, JobProcessingResultHandlerResponses, JoinCallData, JoinCallErrors, JoinCallResponses, JoinChannelByCodeData, JoinChannelByCodeErrors, JoinChannelByCodeResponses, JoinChannelData, JoinChannelErrors, JoinChannelResponses, LeaveCallData, LeaveCallErrors, LeaveCallResponses, LeaveChannelData, LeaveChannelErrors, LeaveChannelResponses, LeaveOrEndCallData, LeaveOrEndCallErrors, LeaveOrEndCallResponses, ListAccessibleFormsData, ListAccessibleFormsErrors, ListAccessibleFormsResponses, ListAccountManagersData, ListAccountManagersErrors, ListAccountManagersResponses, ListAgentsData, ListAgentsErrors, ListAgentsResponses, ListBotChannelsData, ListBotChannelsErrors, ListBotChannelsResponses, ListBotsData, ListBotsErrors, ListBotsResponses, ListBotTokensData, ListBotTokensErrors, ListBotTokensResponses, ListChannelBotsData, ListChannelBotsErrors, ListChannelBotsResponses, ListChannelLabelsData, ListChannelLabelsErrors, ListChannelLabelsResponses, ListCompanyContactsData, ListCompanyContactsErrors, ListCompanyContactsResponses, ListCrmBlockedDomainsData, ListCrmBlockedDomainsErrors, ListCrmBlockedDomainsResponses, ListCrmPipelinesData, ListCrmPipelinesResponses, ListDatabaseColumnCastsData, ListDatabaseColumnCastsErrors, ListDatabaseColumnCastsResponses, ListDatabasesData, ListDatabasesErrors, ListDatabasesResponses, ListDatabaseWebhooksData, ListDatabaseWebhooksErrors, ListDatabaseWebhooksResponses, ListEmailRemindersData, ListEmailRemindersErrors, ListEmailRemindersResponses, ListFavoritesData, ListFavoritesErrors, ListFavoritesResponses, ListFormsData, ListFormsErrors, ListFormsResponses, ListHarnessAgentsData, ListHarnessAgentsErrors, ListHarnessAgentsResponses, ListHarnessesData, ListHarnessesErrors, ListHarnessesResponses, ListHarnessSessionsData, ListHarnessSessionsErrors, ListHarnessSessionsResponses, ListInitiativesData, ListInitiativesErrors, ListInitiativesResponses, ListJoinRequestsData, ListJoinRequestsErrors, ListJoinRequestsResponses, ListOccurrencesData, ListOccurrencesErrors, ListOccurrencesResponses, ListSlackImportsData, ListSlackImportsResponses, ListTeamCalendarData, ListTeamCalendarResponses, ListTeamOutOfOfficeData, ListTeamOutOfOfficeErrors, ListTeamOutOfOfficeResponses, ListUserApiKeysData, ListUserApiKeysErrors, ListUserApiKeysResponses, ListWebhooksData, ListWebhooksErrors, ListWebhooksResponses, MeetingCancelData, MeetingCancelErrors, MeetingCancelPreparationData, MeetingCancelPreparationErrors, MeetingCancelPreparationResponses, MeetingCancelResponses, MeetingCreateData, MeetingCreateErrors, MeetingCreateResponses, MeetingGuestJoinData, MeetingGuestJoinErrors, MeetingGuestJoinResponses, MeetingGuestParticipantsData, MeetingGuestParticipantsErrors, MeetingGuestParticipantsResponses, MeetingInviteData, MeetingInviteErrors, MeetingInvitePermissionsData, MeetingInvitePermissionsErrors, MeetingInvitePermissionsResponses, MeetingInviteResponses, MeetingInviteUsersData, MeetingInviteUsersErrors, MeetingInviteUsersResponses, MeetingJoinData, MeetingJoinErrors, MeetingJoinResponses, MeetingLeaveData, MeetingLeaveErrors, MeetingLeaveResponses, MeetingListActiveData, MeetingListActiveErrors, MeetingListActiveResponses, MeetingListData, MeetingListErrors, MeetingListResponses, MeetingLookupData, MeetingLookupErrors, MeetingLookupResponses, MeetingParticipantsData, MeetingParticipantsErrors, MeetingParticipantsResponses, MeetingPrepareData, MeetingPrepareErrors, MeetingPrepareResponses, MeetingShareData, MeetingShareErrors, MeetingShareResponses, MeetingUpdateData, MeetingUpdateErrors, MeetingUpdateResponses, MentionPreviewsData, MentionPreviewsErrors, MentionPreviewsResponses, MessageTimelineData, MessageTimelineEntriesData, MessageTimelineEntriesResponses, MessageTimelineResponses, PatchBotData, PatchBotErrors, PatchBotResponses, PatchChannelData, PatchChannelErrors, PatchChannelResponses, PatchHarnessData, PatchHarnessErrors, PatchHarnessResponses, PatchViewHandlerData, PatchViewHandlerErrors, PatchViewHandlerResponses, PatchWebhookData, PatchWebhookErrors, PatchWebhookResponses, PermanentlyDeleteDocumentData, PermanentlyDeleteDocumentErrors, PermanentlyDeleteDocumentResponses, PermanentlyDeleteProjectData, PermanentlyDeleteProjectErrors, PermanentlyDeleteProjectResponses, PostActivityData, PostActivityErrors, PostActivityResponses, PostChannelBotWebhookData, PostChannelBotWebhookErrors, PostChannelBotWebhookResponses, PostItemsSoupAstData, PostItemsSoupAstErrors, PostItemsSoupAstGroupedData, PostItemsSoupAstGroupedErrors, PostItemsSoupAstGroupedResponses, PostItemsSoupAstResponses, PostItemsSoupData, PostItemsSoupErrors, PostItemsSoupResponses, PresaveDocumentHandlerData, PresaveDocumentHandlerErrors, PresaveDocumentHandlerResponses, PreviewSmartTagData, PreviewSmartTagErrors, PreviewSmartTagResponses, PutCrmTeamSettingsData, PutCrmTeamSettingsErrors, PutCrmTeamSettingsResponses, PutCrmTeamStagesData, PutCrmTeamStagesErrors, PutCrmTeamStagesResponses, PutFormLayoutData, PutFormLayoutErrors, PutFormLayoutResponses, QueryCrmPipelineRowsData, QueryCrmPipelineRowsResponses, QueryDatabasesData, QueryDatabasesErrors, QueryDatabasesResponses, ReadDesignData, ReadDesignErrors, ReadDesignResponses, ReadIllustratorDocumentData, ReadIllustratorDocumentErrors, ReadIllustratorDocumentResponses, ReadPhotoshopDocumentData, ReadPhotoshopDocumentErrors, ReadPhotoshopDocumentResponses, ReadPresentationData, ReadPresentationErrors, ReadPresentationResponses, ReadWordDocumentData, ReadWordDocumentErrors, ReadWordDocumentResponses, RecentlyDeletedData, RecentlyDeletedErrors, RecentlyDeletedResponses, RegisterSlackImportUploadsData, RegisterSlackImportUploadsErrors, RegisterSlackImportUploadsResponses, RemoveBotFromChannelByBotData, RemoveBotFromChannelByBotErrors, RemoveBotFromChannelByBotResponses, RemoveFavoriteByEntityData, RemoveFavoriteByEntityErrors, RemoveFavoriteByEntityResponses, RemoveParticipantsData, RemoveParticipantsErrors, RemoveParticipantsResponses, RemovePinHandlerData, RemovePinHandlerErrors, RemovePinHandlerResponses, RenameChannelLabelData, RenameChannelLabelErrors, RenameChannelLabelResponses, RenameCrmPipelineData, RenameCrmPipelineResponses, ReorderFavoritesData, ReorderFavoritesErrors, ReorderFavoritesResponses, ReorderPinsHandlerData, ReorderPinsHandlerErrors, ReorderPinsHandlerResponses, RequestAccountManagerData, RequestAccountManagerErrors, RequestAccountManagerResponses, RequestChannelAccessData, RequestChannelAccessErrors, RequestChannelAccessResponses, RequestToJoinData, RequestToJoinErrors, RequestToJoinResponses, ResetCrmTeamStagesData, ResetCrmTeamStagesErrors, ResetCrmTeamStagesResponses, ResolveChannelAccessRequestData, ResolveChannelAccessRequestErrors, ResolveChannelAccessRequestResponses, RespondToAccountManagerRequestData, RespondToAccountManagerRequestErrors, RespondToAccountManagerRequestResponses, RevertDeleteDocumentData, RevertDeleteDocumentErrors, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectErrors, RevertDeleteProjectResponses, RevokeAccountManagerGrantData, RevokeAccountManagerGrantErrors, RevokeAccountManagerGrantResponses, RevokeBotTokenData, RevokeBotTokenErrors, RevokeBotTokenResponses, SaveDatabaseQueryData, SaveDatabaseQueryErrors, SaveDatabaseQueryResponses, SaveDocumentHandlerData, SaveDocumentHandlerErrors, SaveDocumentHandlerResponses, SearchContactsData, SearchContactsErrors, SearchContactsResponses, SetChannelLabelData, SetChannelLabelErrors, SetChannelLabelResponses, SetChannelPictureData, SetChannelPictureErrors, SetChannelPictureResponses, SetCompanyHiddenData, SetCompanyHiddenErrors, SetCompanyHiddenResponses, SetContactHiddenData, SetContactHiddenErrors, SetContactHiddenResponses, SetCrmCompanyNameData, SetCrmCompanyNameErrors, SetCrmCompanyNameResponses, SetCrmContactNameData, SetCrmContactNameErrors, SetCrmContactNameResponses, SetCrmPipelineStageRequirementData, SetCrmPipelineStageRequirementResponses, SetDocumentTeamShareData, SetDocumentTeamShareErrors, SetDocumentTeamShareResponses, SetEmailFollowupData, SetEmailFollowupErrors, SetEmailFollowupResponses, SetEmailSyncData, SetEmailSyncErrors, SetEmailSyncResponses, SetSkillDescriptionData, SetSkillDescriptionErrors, SetSkillDescriptionResponses, ShareCrmPipelineData, ShareCrmPipelineResponses, ShareDatabaseAwarenessData, ShareDatabaseAwarenessErrors, ShareDatabaseAwarenessResponses, SimpleSaveData, SimpleSaveErrors, SimpleSaveResponses, StartCallData, StartCallErrors, StartCallResponses, StreamEventsData, StreamEventsErrors, StreamEventsResponse, StreamEventsResponses, SubmitFormResponseData, SubmitFormResponseErrors, SubmitFormResponseResponses, TaskSimilaritySearchHandlerData, TaskSimilaritySearchHandlerErrors, TaskSimilaritySearchHandlerResponses, ToggleShareWithTeamData, ToggleShareWithTeamErrors, ToggleShareWithTeamResponses, TranscribeDictationData, TranscribeDictationErrors, TranscribeDictationResponses, TrashCrmPipelineData, TrashCrmPipelineResponses, UnblockCrmDomainData, UnblockCrmDomainErrors, UnblockCrmDomainResponses, UndoDatabaseChangeData, UndoDatabaseChangeErrors, UndoDatabaseChangeResponses, UpdateAgentData, UpdateAgentErrors, UpdateAgentResponses, UpdateCrmPipelinePermissionsData, UpdateCrmPipelinePermissionsResponses, UpdateDatabasePermissionsData, UpdateDatabasePermissionsErrors, UpdateDatabasePermissionsResponses, UpdateFormData, UpdateFormErrors, UpdateFormPermissionsData, UpdateFormPermissionsErrors, UpdateFormPermissionsResponses, UpdateFormResponses, UpdateInitiativeData, UpdateInitiativeErrors, UpdateInitiativeResponses, UploadExtractFolderHandlerData, UploadExtractFolderHandlerErrors, UploadExtractFolderHandlerResponses, UploadFileData, UploadFileErrors, UploadFileResponses, UploadFolderHandlerData, UploadFolderHandlerErrors, UploadFolderHandlerResponses, UpsertHistoryHandlerData, UpsertHistoryHandlerErrors, UpsertHistoryHandlerResponses, UpsertUserDocumentViewLocationData, UpsertUserDocumentViewLocationErrors, UpsertUserDocumentViewLocationResponses, ValidateDocumentPermissionsTokenData, ValidateDocumentPermissionsTokenErrors, ValidateDocumentPermissionsTokenResponses, ValidateWebhookData, ValidateWebhookErrors, ValidateWebhookResponses, WhatsappAccountData, WhatsappAccountResponses, WhatsappCancelPairingData, WhatsappCancelPairingResponses, WhatsappChatsData, WhatsappChatsResponses, WhatsappConnectData, WhatsappConnectResponses, WhatsappDisconnectData, WhatsappDisconnectResponses, WhatsappImportHistoryData, WhatsappImportHistoryResponses, WhatsappLookupData, WhatsappLookupResponses, WhatsappPairingData, WhatsappPairingResponses, WhatsappPasskeyData, WhatsappPasskeyResponses, WhatsappStartLookupData, WhatsappStartLookupResponses } from './types.gen';
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
/**
* You can provide a client instance returned by `createClient()` instead of
* individual options. This might be also useful if you want to implement a
* custom client.
*/
client?: Client;
/**
* You can pass arbitrary values through the `meta` object. This can be
* used to access values that aren't defined as part of the SDK function.
*/
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
};
class HeyApiClient {
protected client: Client;
constructor(args?: {
client?: Client;
}) {
this.client = args?.client ?? client;
}
}
class HeyApiRegistry<T> {
private readonly defaultKey = 'default';
private readonly instances: Map<string, T> = new Map();
get(key?: string): T {
const instance = this.instances.get(key ?? this.defaultKey);
if (!instance) {
throw new Error(`No SDK client found. Create one with "new Sdk()" to fix this error.`);
}
return instance;
}
set(value: T, key?: string): void {
this.instances.set(key ?? this.defaultKey, value);
}
}
export class Sdk extends HeyApiClient {
public static readonly __registry: HeyApiRegistry<Sdk> = new HeyApiRegistry<Sdk>();
constructor(args?: {
client?: Client;
key?: string;
}) {
super(args);
Sdk.__registry.set(this, args?.key);
}
/**
* List the managers of the caller's account.
*/
public listAccountManagers<ThrowOnError extends boolean = false>(options?: Options<ListAccountManagersData, ThrowOnError>): RequestResult<ListAccountManagersResponses, ListAccountManagersErrors, ThrowOnError> {
return (options?.client ?? this.client).get<ListAccountManagersResponses, ListAccountManagersErrors, ThrowOnError>({ url: '/account-managers', ...options });
}
/**
* Ask another account for manager access, in your DM with them.
*/
public requestAccountManager<ThrowOnError extends boolean = false>(options: Options<RequestAccountManagerData, ThrowOnError>): RequestResult<RequestAccountManagerResponses, RequestAccountManagerErrors, ThrowOnError> {
return (options.client ?? this.client).post<RequestAccountManagerResponses, RequestAccountManagerErrors, ThrowOnError>({
url: '/account-managers',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* End a grant. Either side may withdraw it.
*/
public revokeAccountManagerGrant<ThrowOnError extends boolean = false>(options: Options<RevokeAccountManagerGrantData, ThrowOnError>): RequestResult<RevokeAccountManagerGrantResponses, RevokeAccountManagerGrantErrors, ThrowOnError> {
return (options.client ?? this.client).delete<RevokeAccountManagerGrantResponses, RevokeAccountManagerGrantErrors, ThrowOnError>({ url: '/account-managers/{id}', ...options });
}
/**
* Read a grant the caller is part of.
*/
public getAccountManagerGrant<ThrowOnError extends boolean = false>(options: Options<GetAccountManagerGrantData, ThrowOnError>): RequestResult<GetAccountManagerGrantResponses, GetAccountManagerGrantErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetAccountManagerGrantResponses, GetAccountManagerGrantErrors, ThrowOnError>({ url: '/account-managers/{id}', ...options });
}
/**
* Approve or decline a request the caller didn't make.
*/
public respondToAccountManagerRequest<ThrowOnError extends boolean = false>(options: Options<RespondToAccountManagerRequestData, ThrowOnError>): RequestResult<RespondToAccountManagerRequestResponses, RespondToAccountManagerRequestErrors, ThrowOnError> {
return (options.client ?? this.client).post<RespondToAccountManagerRequestResponses, RespondToAccountManagerRequestErrors, ThrowOnError>({
url: '/account-managers/{id}/response',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Issue the credential to the manager. Works once. A POST, so link previews
* and crawlers can't use it up.
*/
public claimAccountManagerToken<ThrowOnError extends boolean = false>(options: Options<ClaimAccountManagerTokenData, ThrowOnError>): RequestResult<ClaimAccountManagerTokenResponses, ClaimAccountManagerTokenErrors, ThrowOnError> {
return (options.client ?? this.client).post<ClaimAccountManagerTokenResponses, ClaimAccountManagerTokenErrors, ThrowOnError>({ url: '/account-managers/{id}/token', ...options });
}
/**
* Handler for `GET /agents`.
*/
public listAgents<ThrowOnError extends boolean = false>(options?: Options<ListAgentsData, ThrowOnError>): RequestResult<ListAgentsResponses, ListAgentsErrors, ThrowOnError> {
return (options?.client ?? this.client).get<ListAgentsResponses, ListAgentsErrors, ThrowOnError>({ url: '/agents', ...options });
}
/**
* Handler for `POST /agents`.
*/
public createAgent<ThrowOnError extends boolean = false>(options: Options<CreateAgentData, ThrowOnError>): RequestResult<CreateAgentResponses, CreateAgentErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateAgentResponses, CreateAgentErrors, ThrowOnError>({
url: '/agents',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `PUT /agents/{agent_id}`.
*/
public updateAgent<ThrowOnError extends boolean = false>(options: Options<UpdateAgentData, ThrowOnError>): RequestResult<UpdateAgentResponses, UpdateAgentErrors, ThrowOnError> {
return (options.client ?? this.client).put<UpdateAgentResponses, UpdateAgentErrors, ThrowOnError>({
url: '/agents/{agent_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Deletes a highlight and any attached discussion under the annotation policy.
*/
public deleteAnchor<ThrowOnError extends boolean = false>(options: Options<DeleteAnchorData, ThrowOnError>): RequestResult<DeleteAnchorResponses, DeleteAnchorErrors, ThrowOnError> {
return (options.client ?? this.client).delete<DeleteAnchorResponses, DeleteAnchorErrors, ThrowOnError>({
url: '/annotations/anchors',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Edits a single anchor for a document
*/
public editAnchor<ThrowOnError extends boolean = false>(options: Options<EditAnchorData, ThrowOnError>): RequestResult<EditAnchorResponses, EditAnchorErrors, ThrowOnError> {
return (options.client ?? this.client).patch<EditAnchorResponses, EditAnchorErrors, ThrowOnError>({
url: '/annotations/anchors',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Gets a set of comment anchors for a document
*/
public getDocumentAnchors<ThrowOnError extends boolean = false>(options: Options<GetDocumentAnchorsData, ThrowOnError>): RequestResult<GetDocumentAnchorsResponses, GetDocumentAnchorsErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetDocumentAnchorsResponses, GetDocumentAnchorsErrors, ThrowOnError>({ url: '/annotations/anchors/document/{document_id}', ...options });
}
/**
* Creates an unthreaded anchor for a document
* Attach a discussion through the shared message API.
*/
public createAnchor<ThrowOnError extends boolean = false>(options: Options<CreateAnchorData, ThrowOnError>): RequestResult<CreateAnchorResponses, CreateAnchorErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateAnchorResponses, CreateAnchorErrors, ThrowOnError>({
url: '/annotations/anchors/document/{document_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `GET /bots`: the bots the caller can manage.
*/
public listBots<ThrowOnError extends boolean = false>(options?: Options<ListBotsData, ThrowOnError>): RequestResult<ListBotsResponses, ListBotsErrors, ThrowOnError> {
return (options?.client ?? this.client).get<ListBotsResponses, ListBotsErrors, ThrowOnError>({ url: '/bots', ...options });
}
/**
* Handler for `POST /bots`.
*/
public createBot<ThrowOnError extends boolean = false>(options: Options<CreateBotData, ThrowOnError>): RequestResult<CreateBotResponses, CreateBotErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateBotResponses, CreateBotErrors, ThrowOnError>({
url: '/bots',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `GET /bots/me`.
*/
public getSelfBot<ThrowOnError extends boolean = false>(options?: Options<GetSelfBotData, ThrowOnError>): RequestResult<GetSelfBotResponses, GetSelfBotErrors, ThrowOnError> {
return (options?.client ?? this.client).get<GetSelfBotResponses, GetSelfBotErrors, ThrowOnError>({ url: '/bots/me', ...options });
}
/**
* Handler for `GET /bots/profiles`.
*
* Returns display fields and the sponsor for each requested bot. Not a
* manageability check: any authenticated user or internal caller may look up
* ids they already have.
*/
public getBotOwnerProfiles<ThrowOnError extends boolean = false>(options?: Options<GetBotOwnerProfilesData, ThrowOnError>): RequestResult<GetBotOwnerProfilesResponses, GetBotOwnerProfilesErrors, ThrowOnError> {
return (options?.client ?? this.client).get<GetBotOwnerProfilesResponses, GetBotOwnerProfilesErrors, ThrowOnError>({ url: '/bots/profiles', ...options });
}
/**
* Handler for `DELETE /bots/{bot_id}`.
*/
public deleteBot<ThrowOnError extends boolean = false>(options: Options<DeleteBotData, ThrowOnError>): RequestResult<DeleteBotResponses, DeleteBotErrors, ThrowOnError> {
return (options.client ?? this.client).delete<DeleteBotResponses, DeleteBotErrors, ThrowOnError>({ url: '/bots/{bot_id}', ...options });
}
/**
* Handler for `GET /bots/{bot_id}`.
*/
public getBot<ThrowOnError extends boolean = false>(options: Options<GetBotData, ThrowOnError>): RequestResult<GetBotResponses, GetBotErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetBotResponses, GetBotErrors, ThrowOnError>({ url: '/bots/{bot_id}', ...options });
}
/**
* Handler for `PATCH /bots/{bot_id}`.
*/
public patchBot<ThrowOnError extends boolean = false>(options: Options<PatchBotData, ThrowOnError>): RequestResult<PatchBotResponses, PatchBotErrors, ThrowOnError> {
return (options.client ?? this.client).patch<PatchBotResponses, PatchBotErrors, ThrowOnError>({
url: '/bots/{bot_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `GET /bots/{bot_id}/channels`.
*/
public listBotChannels<ThrowOnError extends boolean = false>(options: Options<ListBotChannelsData, ThrowOnError>): RequestResult<ListBotChannelsResponses, ListBotChannelsErrors, ThrowOnError> {
return (options.client ?? this.client).get<ListBotChannelsResponses, ListBotChannelsErrors, ThrowOnError>({ url: '/bots/{bot_id}/channels', ...options });
}
/**
* Handler for `DELETE /bots/{bot_id}/channels/{channel_id}`.
*/
public removeBotFromChannelByBot<ThrowOnError extends boolean = false>(options: Options<RemoveBotFromChannelByBotData, ThrowOnError>): RequestResult<RemoveBotFromChannelByBotResponses, RemoveBotFromChannelByBotErrors, ThrowOnError> {
return (options.client ?? this.client).delete<RemoveBotFromChannelByBotResponses, RemoveBotFromChannelByBotErrors, ThrowOnError>({ url: '/bots/{bot_id}/channels/{channel_id}', ...options });
}
/**
* Handler for `GET /bots/{bot_id}/tokens`.
*/
public listBotTokens<ThrowOnError extends boolean = false>(options: Options<ListBotTokensData, ThrowOnError>): RequestResult<ListBotTokensResponses, ListBotTokensErrors, ThrowOnError> {
return (options.client ?? this.client).get<ListBotTokensResponses, ListBotTokensErrors, ThrowOnError>({ url: '/bots/{bot_id}/tokens', ...options });
}
/**
* Handler for `POST /bots/{bot_id}/tokens`.
*/
public createBotToken<ThrowOnError extends boolean = false>(options: Options<CreateBotTokenData, ThrowOnError>): RequestResult<CreateBotTokenResponses, CreateBotTokenErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateBotTokenResponses, CreateBotTokenErrors, ThrowOnError>({
url: '/bots/{bot_id}/tokens',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `DELETE /bots/{bot_id}/tokens/{token_id}`.
*/
public revokeBotToken<ThrowOnError extends boolean = false>(options: Options<RevokeBotTokenData, ThrowOnError>): RequestResult<RevokeBotTokenResponses, RevokeBotTokenErrors, ThrowOnError> {
return (options.client ?? this.client).delete<RevokeBotTokenResponses, RevokeBotTokenErrors, ThrowOnError>({ url: '/bots/{bot_id}/tokens/{token_id}', ...options });
}
/**
* Return calendar occurrences visible to the authenticated requester.
*/
public listOccurrences<ThrowOnError extends boolean = false>(options: Options<ListOccurrencesData, ThrowOnError>): RequestResult<ListOccurrencesResponses, ListOccurrencesErrors, ThrowOnError> {
return (options.client ?? this.client).get<ListOccurrencesResponses, ListOccurrencesErrors, ThrowOnError>({ url: '/calendar-events', ...options });
}
/**
* Resolve mentioned calendar events to the requester's own projections.
*/
public mentionPreviews<ThrowOnError extends boolean = false>(options: Options<MentionPreviewsData, ThrowOnError>): RequestResult<MentionPreviewsResponses, MentionPreviewsErrors, ThrowOnError> {
return (options.client ?? this.client).post<MentionPreviewsResponses, MentionPreviewsErrors, ThrowOnError>({
url: '/calendar-events/preview',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Query authorized projections in a bounded viewport.
*/
public listTeamCalendar<ThrowOnError extends boolean = false>(options: Options<ListTeamCalendarData, ThrowOnError>): RequestResult<ListTeamCalendarResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).get<ListTeamCalendarResponses, unknown, ThrowOnError>({ url: '/calendar-events/team', ...options });
}
/**
* Return teammates' out-of-office occurrences in the requested viewport.
*/
public listTeamOutOfOffice<ThrowOnError extends boolean = false>(options: Options<ListTeamOutOfOfficeData, ThrowOnError>): RequestResult<ListTeamOutOfOfficeResponses, ListTeamOutOfOfficeErrors, ThrowOnError> {
return (options.client ?? this.client).get<ListTeamOutOfOfficeResponses, ListTeamOutOfOfficeErrors, ThrowOnError>({ url: '/calendar-events/team-out-of-office', ...options });
}
/**
* Export an event the requester can see — their own, or one shared with a
* channel they belong to — as an iCalendar file named after its title.
*/
public eventIcs<ThrowOnError extends boolean = false>(options: Options<EventIcsData, ThrowOnError>): RequestResult<EventIcsResponses, EventIcsErrors, ThrowOnError> {
return (options.client ?? this.client).get<EventIcsResponses, EventIcsErrors, ThrowOnError>({ url: '/calendar-events/{event_id}/ics', ...options });
}
/**
* List pending requests to join an event the requester can change.
*/
public listJoinRequests<ThrowOnError extends boolean = false>(options: Options<ListJoinRequestsData, ThrowOnError>): RequestResult<ListJoinRequestsResponses, ListJoinRequestsErrors, ThrowOnError> {
return (options.client ?? this.client).get<ListJoinRequestsResponses, ListJoinRequestsErrors, ThrowOnError>({ url: '/calendar-events/{event_id}/join-requests', ...options });
}
/**
* Ask the person who shared an event with one of the requester's channels
* to add them as a guest. Asking again while the request is pending or
* accepted changes nothing; a declined request stands, so asking after a
* decline is refused with `request_declined`.
*/
public requestToJoin<ThrowOnError extends boolean = false>(options: Options<RequestToJoinData, ThrowOnError>): RequestResult<RequestToJoinResponses, RequestToJoinErrors, ThrowOnError> {
return (options.client ?? this.client).post<RequestToJoinResponses, RequestToJoinErrors, ThrowOnError>({ url: '/calendar-events/{event_id}/join-requests', ...options });
}
/**
* Handler for `GET /call/active`.
*
* Lists all active calls in channels the caller is an active member of,
* newest first. Calls with no active participants (orphaned by dropped RTC
* webhooks) are excluded.
*/
public getActiveCalls<ThrowOnError extends boolean = false>(options?: Options<GetActiveCallsData, ThrowOnError>): RequestResult<GetActiveCallsResponses, GetActiveCallsErrors, ThrowOnError> {
return (options?.client ?? this.client).get<GetActiveCallsResponses, GetActiveCallsErrors, ThrowOnError>({ url: '/call/active', ...options });
}
/**
* List all channel and standalone calls this account can join.
*/
public getLiveCalls<ThrowOnError extends boolean = false>(options?: Options<GetLiveCallsData, ThrowOnError>): RequestResult<GetLiveCallsResponses, unknown, ThrowOnError> {
return (options?.client ?? this.client).get<GetLiveCallsResponses, unknown, ThrowOnError>({ url: '/call/active/all', ...options });
}
/**
* Read the live call discussion as a verified guest.
*/
public guestCallChatRead<ThrowOnError extends boolean = false>(options: Options<GuestCallChatReadData, ThrowOnError>): RequestResult<GuestCallChatReadResponses, GuestCallChatReadErrors, ThrowOnError> {
return (options.client ?? this.client).get<GuestCallChatReadResponses, GuestCallChatReadErrors, ThrowOnError>({ url: '/call/guest-chat/{call_id}', ...options });
}
/**
* Append text to the same saved discussion used by account participants.
*/
public guestCallChatPost<ThrowOnError extends boolean = false>(options: Options<GuestCallChatPostData, ThrowOnError>): RequestResult<GuestCallChatPostResponses, GuestCallChatPostErrors, ThrowOnError> {
return (options.client ?? this.client).post<GuestCallChatPostResponses, GuestCallChatPostErrors, ThrowOnError>({
url: '/call/guest-chat/{call_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handle `GET /call/join/{token}` through the call domain service.
*/
public meetingLookup<ThrowOnError extends boolean = false>(options: Options<MeetingLookupData, ThrowOnError>): RequestResult<MeetingLookupResponses, MeetingLookupErrors, ThrowOnError> {
return (options.client ?? this.client).get<MeetingLookupResponses, MeetingLookupErrors, ThrowOnError>({ url: '/call/join/{token}', ...options });
}
/**
* Handle `POST /call/join/{token}` through the call domain service.
*/
public meetingGuestJoin<ThrowOnError extends boolean = false>(options: Options<MeetingGuestJoinData, ThrowOnError>): RequestResult<MeetingGuestJoinResponses, MeetingGuestJoinErrors, ThrowOnError> {
return (options.client ?? this.client).post<MeetingGuestJoinResponses, MeetingGuestJoinErrors, ThrowOnError>({
url: '/call/join/{token}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handle `POST /call/join/{token}/leave` through the call domain service.
*/
public meetingLeave<ThrowOnError extends boolean = false>(options: Options<MeetingLeaveData, ThrowOnError>): RequestResult<MeetingLeaveResponses, MeetingLeaveErrors, ThrowOnError> {
return (options.client ?? this.client).post<MeetingLeaveResponses, MeetingLeaveErrors, ThrowOnError>({ url: '/call/join/{token}/leave', ...options });
}
/**
* Read a standalone meeting preview without admitting a guest to the room.
*/
public meetingGuestParticipants<ThrowOnError extends boolean = false>(options: Options<MeetingGuestParticipantsData, ThrowOnError>): RequestResult<MeetingGuestParticipantsResponses, MeetingGuestParticipantsErrors, ThrowOnError> {
return (options.client ?? this.client).get<MeetingGuestParticipantsResponses, MeetingGuestParticipantsErrors, ThrowOnError>({ url: '/call/join/{token}/participants', ...options });
}
/**
* Handle `GET /call/meetings` through the call domain service.
*/
public meetingList<ThrowOnError extends boolean = false>(options?: Options<MeetingListData, ThrowOnError>): RequestResult<MeetingListResponses, MeetingListErrors, ThrowOnError> {
return (options?.client ?? this.client).get<MeetingListResponses, MeetingListErrors, ThrowOnError>({ url: '/call/meetings', ...options });
}
/**
* Handle `POST /call/meetings` through the call domain service.
*/
public meetingCreate<ThrowOnError extends boolean = false>(options: Options<MeetingCreateData, ThrowOnError>): RequestResult<MeetingCreateResponses, MeetingCreateErrors, ThrowOnError> {
return (options.client ?? this.client).post<MeetingCreateResponses, MeetingCreateErrors, ThrowOnError>({
url: '/call/meetings',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* List the authenticated actor's active quick calls.
*/
public meetingListActive<ThrowOnError extends boolean = false>(options?: Options<MeetingListActiveData, ThrowOnError>): RequestResult<MeetingListActiveResponses, MeetingListActiveErrors, ThrowOnError> {
return (options?.client ?? this.client).get<MeetingListActiveResponses, MeetingListActiveErrors, ThrowOnError>({ url: '/call/meetings/active', ...options });
}
/**
* Read the authenticated caller's invitation capability without exposing the creator.
*/
public meetingInvitePermissions<ThrowOnError extends boolean = false>(options: Options<MeetingInvitePermissionsData, ThrowOnError>): RequestResult<MeetingInvitePermissionsResponses, MeetingInvitePermissionsErrors, ThrowOnError> {
return (options.client ?? this.client).get<MeetingInvitePermissionsResponses, MeetingInvitePermissionsErrors, ThrowOnError>({ url: '/call/meetings/invite/{token}', ...options });
}
/**
* Queue an owner-authorized guest invitation email.
*/
public meetingInvite<ThrowOnError extends boolean = false>(options: Options<MeetingInviteData, ThrowOnError>): RequestResult<MeetingInviteResponses, MeetingInviteErrors, ThrowOnError> {
return (options.client ?? this.client).post<MeetingInviteResponses, MeetingInviteErrors, ThrowOnError>({
url: '/call/meetings/invite/{token}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Ring registered teammates selected by the standalone meeting owner.
*/
public meetingInviteUsers<ThrowOnError extends boolean = false>(options: Options<MeetingInviteUsersData, ThrowOnError>): RequestResult<MeetingInviteUsersResponses, MeetingInviteUsersErrors, ThrowOnError> {
return (options.client ?? this.client).post<MeetingInviteUsersResponses, MeetingInviteUsersErrors, ThrowOnError>({
url: '/call/meetings/invite/{token}/users',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handle `POST /call/meetings/join/{token}` through the call domain service.
*/
public meetingJoin<ThrowOnError extends boolean = false>(options: Options<MeetingJoinData, ThrowOnError>): RequestResult<MeetingJoinResponses, MeetingJoinErrors, ThrowOnError> {
return (options.client ?? this.client).post<MeetingJoinResponses, MeetingJoinErrors, ThrowOnError>({
url: '/call/meetings/join/{token}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Read the participant preview for an authenticated invitation holder.
*/
public meetingParticipants<ThrowOnError extends boolean = false>(options: Options<MeetingParticipantsData, ThrowOnError>): RequestResult<MeetingParticipantsResponses, MeetingParticipantsErrors, ThrowOnError> {
return (options.client ?? this.client).get<MeetingParticipantsResponses, MeetingParticipantsErrors, ThrowOnError>({ url: '/call/meetings/join/{token}/participants', ...options });
}
/**
* Reserve a room while the authenticated caller configures a new call.
*/
public meetingPrepare<ThrowOnError extends boolean = false>(options?: Options<MeetingPrepareData, ThrowOnError>): RequestResult<MeetingPrepareResponses, MeetingPrepareErrors, ThrowOnError> {
return (options?.client ?? this.client).post<MeetingPrepareResponses, MeetingPrepareErrors, ThrowOnError>({ url: '/call/meetings/prepare', ...options });
}
/**
* Cancel an unused room; the domain owns ownership and activation checks.
*/
public meetingCancelPreparation<ThrowOnError extends boolean = false>(options: Options<MeetingCancelPreparationData, ThrowOnError>): RequestResult<MeetingCancelPreparationResponses, MeetingCancelPreparationErrors, ThrowOnError> {
return (options.client ?? this.client).delete<MeetingCancelPreparationResponses, MeetingCancelPreparationErrors, ThrowOnError>({ url: '/call/meetings/prepare/{preparation_id}', ...options });
}
/**
* Handle `DELETE /call/meetings/{meeting_id}` through the call domain service.
*/
public meetingCancel<ThrowOnError extends boolean = false>(options: Options<MeetingCancelData, ThrowOnError>): RequestResult<MeetingCancelResponses, MeetingCancelErrors, ThrowOnError> {
return (options.client ?? this.client).delete<MeetingCancelResponses, MeetingCancelErrors, ThrowOnError>({ url: '/call/meetings/{meeting_id}', ...options });
}
/**
* Handle owner-authorized meeting title and schedule edits.
*/
public meetingUpdate<ThrowOnError extends boolean = false>(options: Options<MeetingUpdateData, ThrowOnError>): RequestResult<MeetingUpdateResponses, MeetingUpdateErrors, ThrowOnError> {
return (options.client ?? this.client).patch<MeetingUpdateResponses, MeetingUpdateErrors, ThrowOnError>({
url: '/call/meetings/{meeting_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `POST /call/record/preview`.
*
* Batch-fetches lightweight previews for a list of call ids. Mirrors the
* `POST /documents/preview` endpoint: no per-id access checks, duplicate
* ids are deduplicated server-side, and missing ids come back as
* `CallRecordPreview::DoesNotExist` rather than producing an error.
*/
public getBatchCallRecordPreview<ThrowOnError extends boolean = false>(options: Options<GetBatchCallRecordPreviewData, ThrowOnError>): RequestResult<GetBatchCallRecordPreviewResponses, GetBatchCallRecordPreviewErrors, ThrowOnError> {
return (options.client ?? this.client).post<GetBatchCallRecordPreviewResponses, GetBatchCallRecordPreviewErrors, ThrowOnError>({
url: '/call/record/preview',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `DELETE /call/record/{call_id}`.
*
* Deletes a call record (and its participants/transcripts via cascade).
* Access is validated via channel membership (MemberParticipantRole).
*/
public deleteCallRecord<ThrowOnError extends boolean = false>(options: Options<DeleteCallRecordData, ThrowOnError>): RequestResult<DeleteCallRecordResponses, DeleteCallRecordErrors, ThrowOnError> {
return (options.client ?? this.client).delete<DeleteCallRecordResponses, DeleteCallRecordErrors, ThrowOnError>({ url: '/call/record/{call_id}', ...options });
}
/**
* Handler for `GET /call/record/{call_id}`.
*
* Returns the full [`CallRecord`] (metadata + participants + transcript)
* for a call identified by its own id. Covers both active and archived calls.
* Access is validated via channel membership (MemberParticipantRole).
*/
public getCallRecord<ThrowOnError extends boolean = false>(options: Options<GetCallRecordData, ThrowOnError>): RequestResult<GetCallRecordResponses, GetCallRecordErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetCallRecordResponses, GetCallRecordErrors, ThrowOnError>({ url: '/call/record/{call_id}', ...options });
}
/**
* Handler for `PATCH /call/record/{call_id}`.
*
* Edits a call record: link/channel share permissions, display name, and
* team sharing. Edit access (channel membership) is required for the request.
* `sharePermission.teamShareAccessLevel` only accepts `view` or `null`; while
* the call is live it sets the pending share-with-team toggle, and once the
* call is archived it is additionally authorized against the call's creator.
*/
public editCallRecord<ThrowOnError extends boolean = false>(options: Options<EditCallRecordData, ThrowOnError>): RequestResult<EditCallRecordResponses, EditCallRecordErrors, ThrowOnError> {
return (options.client ?? this.client).patch<EditCallRecordResponses, EditCallRecordErrors, ThrowOnError>({
url: '/call/record/{call_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `POST /call/record/{call_id}/decline`.
*
* Declines the identified active call for the caller without joining it.
* Bound to `call_id` so a stale incoming-call UI cannot decline a newer call
* that replaced it in the same channel. The caller's other devices are told
* to stop ringing (`call_declined`); the call continues for everyone else.
*/
public declineCall<ThrowOnError extends boolean = false>(options: Options<DeclineCallData, ThrowOnError>): RequestResult<DeclineCallResponses, DeclineCallErrors, ThrowOnError> {
return (options.client ?? this.client).post<DeclineCallResponses, DeclineCallErrors, ThrowOnError>({ url: '/call/record/{call_id}/decline', ...options });
}
/**
* Join a live call by its session id.
*/
public joinCall<ThrowOnError extends boolean = false>(options: Options<JoinCallData, ThrowOnError>): RequestResult<JoinCallResponses, JoinCallErrors, ThrowOnError> {
return (options.client ?? this.client).post<JoinCallResponses, JoinCallErrors, ThrowOnError>({
url: '/call/record/{call_id}/join',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Leave a specific live call.
*/
public leaveCall<ThrowOnError extends boolean = false>(options: Options<LeaveCallData, ThrowOnError>): RequestResult<LeaveCallResponses, LeaveCallErrors, ThrowOnError> {
return (options.client ?? this.client).post<LeaveCallResponses, LeaveCallErrors, ThrowOnError>({ url: '/call/record/{call_id}/leave', ...options });
}
/**
* Handle `POST /call/record/{call_id}/link` through the call domain service.
*/
public meetingShare<ThrowOnError extends boolean = false>(options: Options<MeetingShareData, ThrowOnError>): RequestResult<MeetingShareResponses, MeetingShareErrors, ThrowOnError> {
return (options.client ?? this.client).post<MeetingShareResponses, MeetingShareErrors, ThrowOnError>({ url: '/call/record/{call_id}/link', ...options });
}
/**
* Read live participants and track state for a joinable call.
*/
public getCallParticipants<ThrowOnError extends boolean = false>(options: Options<GetCallParticipantsData, ThrowOnError>): RequestResult<GetCallParticipantsResponses, GetCallParticipantsErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetCallParticipantsResponses, GetCallParticipantsErrors, ThrowOnError>({ url: '/call/record/{call_id}/participants', ...options });
}
/**
* Stream the recording bytes for a call record the caller may view.
*/
public getCallRecording<ThrowOnError extends boolean = false>(options: Options<GetCallRecordingData, ThrowOnError>): RequestResult<GetCallRecordingResponses, GetCallRecordingErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetCallRecordingResponses, GetCallRecordingErrors, ThrowOnError>({ url: '/call/record/{call_id}/recording', ...options });
}
/**
* Read this account's ring state for a call.
*/
public getCallRingState<ThrowOnError extends boolean = false>(options: Options<GetCallRingStateData, ThrowOnError>): RequestResult<GetCallRingStateResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).get<GetCallRingStateResponses, unknown, ThrowOnError>({ url: '/call/record/{call_id}/ring', ...options });
}
/**
* Handler for `POST /call/record/{call_id}/share-with-team/toggle`.
*
* Flips the live call's share-with-team toggle and returns the new value as
* the JSON body. The toggle is applied as canonical team sharing (View for
* the creator's team) when the call is archived; archived calls answer 409
* and are edited through `PATCH /call/record/{call_id}` instead.
*/
public toggleShareWithTeam<ThrowOnError extends boolean = false>(options: Options<ToggleShareWithTeamData, ThrowOnError>): RequestResult<ToggleShareWithTeamResponses, ToggleShareWithTeamErrors, ThrowOnError> {
return (options.client ?? this.client).post<ToggleShareWithTeamResponses, ToggleShareWithTeamErrors, ThrowOnError>({ url: '/call/record/{call_id}/share-with-team/toggle', ...options });
}
/**
* Handler for `PATCH /call/record/{call_id}/transcript`.
*
* Applies per-diarized-speaker `custom_speaker` overrides to the call's
* archived transcript rows. Auth uses the same `EditAccessLevel` extractor
* as `edit_call_record_handler`.
*/
public editCallTranscript<ThrowOnError extends boolean = false>(options: Options<EditCallTranscriptData, ThrowOnError>): RequestResult<EditCallTranscriptResponses, EditCallTranscriptErrors, ThrowOnError> {
return (options.client ?? this.client).patch<EditCallTranscriptResponses, EditCallTranscriptErrors, ThrowOnError>({
url: '/call/record/{call_id}/transcript',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `GET /call/ring-status/{call_id}`.
*
* Reports whether the authenticated user should keep ringing for the call.
* Polled by native clients while the CallKit incoming-call UI is showing, so
* a ring can be cancelled when the user answers on another device
* (`answered`) or the call ends before anyone answers (`ended`).
*
* Outside the user-auth layer: the bearer credential is the recipient's
* LiveKit JWT from the VoIP push payload, verified with the LiveKit secret.
*/
public getRingStatus<ThrowOnError extends boolean = false>(options: Options<GetRingStatusData, ThrowOnError>): RequestResult<GetRingStatusResponses, GetRingStatusErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetRingStatusResponses, GetRingStatusErrors, ThrowOnError>({ url: '/call/ring-status/{call_id}', ...options });
}
/**
* Handler for `POST /call/ring-status/{call_id}/decline`.
*
* Declines a ringing call from a native client, e.g. the iPhone lock-screen
* decline button, so the user's other devices stop ringing. Authorized like
* [`ring_status_handler`]: the bearer credential is the recipient's LiveKit
* JWT from the VoIP push payload, which identifies both the room and the
* declining user.
*/
public declineRing<ThrowOnError extends boolean = false>(options: Options<DeclineRingData, ThrowOnError>): RequestResult<DeclineRingResponses, DeclineRingErrors, ThrowOnError> {
return (options.client ?? this.client).post<DeclineRingResponses, DeclineRingErrors, ThrowOnError>({ url: '/call/ring-status/{call_id}/decline', ...options });
}
/**
* Handler for `POST /call/webhook`.
*
* Receives webhook events from the RTC provider (e.g. LiveKit).
* The `Authorization` header contains the webhook auth token
* and the body contains the raw event payload.
*/
public callWebhook<ThrowOnError extends boolean = false>(options?: Options<CallWebhookData, ThrowOnError>): RequestResult<CallWebhookResponses, CallWebhookErrors, ThrowOnError> {
return (options?.client ?? this.client).post<CallWebhookResponses, CallWebhookErrors, ThrowOnError>({ url: '/call/webhook', ...options });
}
/**
* Handler for `DELETE /call/{channel_id}`.
*/
public leaveOrEndCall<ThrowOnError extends boolean = false>(options: Options<LeaveOrEndCallData, ThrowOnError>): RequestResult<LeaveOrEndCallResponses, LeaveOrEndCallErrors, ThrowOnError> {
return (options.client ?? this.client).delete<LeaveOrEndCallResponses, LeaveOrEndCallErrors, ThrowOnError>({ url: '/call/{channel_id}', ...options });
}
/**
* Handler for `GET /call/{channel_id}`.
*
* Gets or creates a call for the channel. If a call already exists, joins it;
* otherwise creates a new one. Always returns a join token.
*/
public getOrCreateCall<ThrowOnError extends boolean = false>(options: Options<GetOrCreateCallData, ThrowOnError>): RequestResult<GetOrCreateCallResponses, GetOrCreateCallErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetOrCreateCallResponses, GetOrCreateCallErrors, ThrowOnError>({ url: '/call/{channel_id}', ...options });
}
/**
* Start or join a channel call explicitly.
*/
public startCall<ThrowOnError extends boolean = false>(options: Options<StartCallData, ThrowOnError>): RequestResult<StartCallResponses, StartCallErrors, ThrowOnError> {
return (options.client ?? this.client).post<StartCallResponses, StartCallErrors, ThrowOnError>({
url: '/call/{channel_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `GET /call/{channel_id}/active`.
*
* Returns 200 with call info if an active call exists, or 204 No Content if not.
*/
public checkActiveCall<ThrowOnError extends boolean = false>(options: Options<CheckActiveCallData, ThrowOnError>): RequestResult<CheckActiveCallResponses, CheckActiveCallErrors, ThrowOnError> {
return (options.client ?? this.client).get<CheckActiveCallResponses, CheckActiveCallErrors, ThrowOnError>({ url: '/call/{channel_id}/active', ...options });
}
/**
* Handler for `POST /call/{channel_id}/transcript`.
*
* Receives transcript segments from the transcription agent.
* Authenticated via the `x-macro-internal-call` shared secret.
* Duplicate segments (same `segment_id`) are ignored.
*/
public ingestTranscript<ThrowOnError extends boolean = false>(options: Options<IngestTranscriptData, ThrowOnError>): RequestResult<IngestTranscriptResponses, IngestTranscriptErrors, ThrowOnError> {
return (options.client ?? this.client).post<IngestTranscriptResponses, IngestTranscriptErrors, ThrowOnError>({
url: '/call/{room_name}/transcript',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* List the caller's shared or private labels.
*/
public listChannelLabels<ThrowOnError extends boolean = false>(options?: Options<ListChannelLabelsData, ThrowOnError>): RequestResult<ListChannelLabelsResponses, ListChannelLabelsErrors, ThrowOnError> {
return (options?.client ?? this.client).get<ListChannelLabelsResponses, ListChannelLabelsErrors, ThrowOnError>({ url: '/channel-labels', ...options });
}
/**
* Create a label for the caller's authorized scope.
*/
public createChannelLabel<ThrowOnError extends boolean = false>(options: Options<CreateChannelLabelData, ThrowOnError>): RequestResult<CreateChannelLabelResponses, CreateChannelLabelErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateChannelLabelResponses, CreateChannelLabelErrors, ThrowOnError>({
url: '/channel-labels',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Move a channel into a label of the caller's authorized scope, or out of any label.
*/
public setChannelLabel<ThrowOnError extends boolean = false>(options: Options<SetChannelLabelData, ThrowOnError>): RequestResult<SetChannelLabelResponses, SetChannelLabelErrors, ThrowOnError> {
return (options.client ?? this.client).put<SetChannelLabelResponses, SetChannelLabelErrors, ThrowOnError>({
url: '/channel-labels/channels/{channel_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Preview visible channels matched by a smart tag, without creating it.
*/
public previewSmartTag<ThrowOnError extends boolean = false>(options: Options<PreviewSmartTagData, ThrowOnError>): RequestResult<PreviewSmartTagResponses, PreviewSmartTagErrors, ThrowOnError> {
return (options.client ?? this.client).post<PreviewSmartTagResponses, PreviewSmartTagErrors, ThrowOnError>({
url: '/channel-labels/preview',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Delete a label of the caller's authorized scope. Its channels return to the plain list.
*/
public deleteChannelLabel<ThrowOnError extends boolean = false>(options: Options<DeleteChannelLabelData, ThrowOnError>): RequestResult<DeleteChannelLabelResponses, DeleteChannelLabelErrors, ThrowOnError> {
return (options.client ?? this.client).delete<DeleteChannelLabelResponses, DeleteChannelLabelErrors, ThrowOnError>({ url: '/channel-labels/{label_id}', ...options });
}
/**
* Update a label, optionally moving it to another authorized scope.
*/
public renameChannelLabel<ThrowOnError extends boolean = false>(options: Options<RenameChannelLabelData, ThrowOnError>): RequestResult<RenameChannelLabelResponses, RenameChannelLabelErrors, ThrowOnError> {
return (options.client ?? this.client).patch<RenameChannelLabelResponses, RenameChannelLabelErrors, ThrowOnError>({
url: '/channel-labels/{label_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `POST /channels`.
*/
public createChannel<ThrowOnError extends boolean = false>(options: Options<CreateChannelData, ThrowOnError>): RequestResult<CreateChannelResponses, CreateChannelErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateChannelResponses, CreateChannelErrors, ThrowOnError>({
url: '/channels',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `GET /channels/activity`.
*/
public getActivity<ThrowOnError extends boolean = false>(options?: Options<GetActivityData, ThrowOnError>): RequestResult<GetActivityResponses, GetActivityErrors, ThrowOnError> {
return (options?.client ?? this.client).get<GetActivityResponses, GetActivityErrors, ThrowOnError>({ url: '/channels/activity', ...options });
}
/**
* Handler for `POST /channels/activity`.
*/
public postActivity<ThrowOnError extends boolean = false>(options: Options<PostActivityData, ThrowOnError>): RequestResult<PostActivityResponses, PostActivityErrors, ThrowOnError> {
return (options.client ?? this.client).post<PostActivityResponses, PostActivityErrors, ThrowOnError>({
url: '/channels/activity',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `GET /channels/attachments/{entity_type}/{entity_id}/references`.
*/
public getAttachmentReferences<ThrowOnError extends boolean = false>(options: Options<GetAttachmentReferencesData, ThrowOnError>): RequestResult<GetAttachmentReferencesResponses, GetAttachmentReferencesErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetAttachmentReferencesResponses, GetAttachmentReferencesErrors, ThrowOnError>({ url: '/channels/attachments/{entity_type}/{entity_id}/references', ...options });
}
/**
* Handler for `POST /channels/get_or_create_dm`.
*/
public getOrCreateDm<ThrowOnError extends boolean = false>(options: Options<GetOrCreateDmData, ThrowOnError>): RequestResult<GetOrCreateDmResponses, GetOrCreateDmErrors, ThrowOnError> {
return (options.client ?? this.client).post<GetOrCreateDmResponses, GetOrCreateDmErrors, ThrowOnError>({
url: '/channels/get_or_create_dm',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `POST /channels/get_or_create_private`.
*/
public getOrCreatePrivate<ThrowOnError extends boolean = false>(options: Options<GetOrCreatePrivateData, ThrowOnError>): RequestResult<GetOrCreatePrivateResponses, GetOrCreatePrivateErrors, ThrowOnError> {
return (options.client ?? this.client).post<GetOrCreatePrivateResponses, GetOrCreatePrivateErrors, ThrowOnError>({
url: '/channels/get_or_create_private',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `POST /channels/join/{join_code}`.
*/
public joinChannelByCode<ThrowOnError extends boolean = false>(options: Options<JoinChannelByCodeData, ThrowOnError>): RequestResult<JoinChannelByCodeResponses, JoinChannelByCodeErrors, ThrowOnError> {
return (options.client ?? this.client).post<JoinChannelByCodeResponses, JoinChannelByCodeErrors, ThrowOnError>({ url: '/channels/join/{join_code}', ...options });
}
/**
* Handler for `POST /channels/mentions`.
*/
public createEntityMention<ThrowOnError extends boolean = false>(options: Options<CreateEntityMentionData, ThrowOnError>): RequestResult<CreateEntityMentionResponses, CreateEntityMentionErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateEntityMentionResponses, CreateEntityMentionErrors, ThrowOnError>({
url: '/channels/mentions',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `DELETE /channels/mentions/{mention_id}`.
*/
public deleteEntityMention<ThrowOnError extends boolean = false>(options: Options<DeleteEntityMentionData, ThrowOnError>): RequestResult<DeleteEntityMentionResponses, DeleteEntityMentionErrors, ThrowOnError> {
return (options.client ?? this.client).delete<DeleteEntityMentionResponses, DeleteEntityMentionErrors, ThrowOnError>({ url: '/channels/mentions/{mention_id}', ...options });
}
/**
* Handler for `POST /channels/preview`.
*/
public getBatchChannelPreview<ThrowOnError extends boolean = false>(options: Options<GetBatchChannelPreviewData, ThrowOnError>): RequestResult<GetBatchChannelPreviewResponses, GetBatchChannelPreviewErrors, ThrowOnError> {
return (options.client ?? this.client).post<GetBatchChannelPreviewResponses, GetBatchChannelPreviewErrors, ThrowOnError>({
url: '/channels/preview',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `DELETE /channels/{channel_id}`.
*/
public deleteChannel<ThrowOnError extends boolean = false>(options: Options<DeleteChannelData, ThrowOnError>): RequestResult<DeleteChannelResponses, DeleteChannelErrors, ThrowOnError> {
return (options.client ?? this.client).delete<DeleteChannelResponses, DeleteChannelErrors, ThrowOnError>({ url: '/channels/{channel_id}', ...options });
}
/**
* Handler for `GET /channels/{channel_id}`.
*/
public getChannel<ThrowOnError extends boolean = false>(options: Options<GetChannelData, ThrowOnError>): RequestResult<GetChannelResponses, GetChannelErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetChannelResponses, GetChannelErrors, ThrowOnError>({ url: '/channels/{channel_id}', ...options });
}
/**
* Handler for `PATCH /channels/{channel_id}`.
*/
public patchChannel<ThrowOnError extends boolean = false>(options: Options<PatchChannelData, ThrowOnError>): RequestResult<PatchChannelResponses, PatchChannelErrors, ThrowOnError> {
return (options.client ?? this.client).patch<PatchChannelResponses, PatchChannelErrors, ThrowOnError>({
url: '/channels/{channel_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `DELETE /channels/{channel_id}/access-requests/mine`.
*/
public cancelChannelAccessRequest<ThrowOnError extends boolean = false>(options: Options<CancelChannelAccessRequestData, ThrowOnError>): RequestResult<CancelChannelAccessRequestResponses, CancelChannelAccessRequestErrors, ThrowOnError> {
return (options.client ?? this.client).delete<CancelChannelAccessRequestResponses, CancelChannelAccessRequestErrors, ThrowOnError>({ url: '/channels/{channel_id}/access-requests/mine', ...options });
}
/**
* Handler for `GET /channels/{channel_id}/access-requests/mine`.
*/
public getMyChannelAccessRequest<ThrowOnError extends boolean = false>(options: Options<GetMyChannelAccessRequestData, ThrowOnError>): RequestResult<GetMyChannelAccessRequestResponses, GetMyChannelAccessRequestErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetMyChannelAccessRequestResponses, GetMyChannelAccessRequestErrors, ThrowOnError>({ url: '/channels/{channel_id}/access-requests/mine', ...options });
}
/**
* Handler for `PUT /channels/{channel_id}/access-requests/mine`.
*/
public requestChannelAccess<ThrowOnError extends boolean = false>(options: Options<RequestChannelAccessData, ThrowOnError>): RequestResult<RequestChannelAccessResponses, RequestChannelAccessErrors, ThrowOnError> {
return (options.client ?? this.client).put<RequestChannelAccessResponses, RequestChannelAccessErrors, ThrowOnError>({ url: '/channels/{channel_id}/access-requests/mine', ...options });
}
/**
* Handler for `GET /channels/{channel_id}/access-requests/{request_id}`.
*/
public getChannelAccessRequest<ThrowOnError extends boolean = false>(options: Options<GetChannelAccessRequestData, ThrowOnError>): RequestResult<GetChannelAccessRequestResponses, GetChannelAccessRequestErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetChannelAccessRequestResponses, GetChannelAccessRequestErrors, ThrowOnError>({ url: '/channels/{channel_id}/access-requests/{request_id}', ...options });
}
/**
* Handler for `POST /channels/{channel_id}/access-requests/{request_id}/resolve`.
*/
public resolveChannelAccessRequest<ThrowOnError extends boolean = false>(options: Options<ResolveChannelAccessRequestData, ThrowOnError>): RequestResult<ResolveChannelAccessRequestResponses, ResolveChannelAccessRequestErrors, ThrowOnError> {
return (options.client ?? this.client).post<ResolveChannelAccessRequestResponses, ResolveChannelAccessRequestErrors, ThrowOnError>({
url: '/channels/{channel_id}/access-requests/{request_id}/resolve',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `GET /channels/{channel_id}/attachments`.
*/
public getChannelAttachments<ThrowOnError extends boolean = false>(options: Options<GetChannelAttachmentsData, ThrowOnError>): RequestResult<GetChannelAttachmentsResponses, GetChannelAttachmentsErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetChannelAttachmentsResponses, GetChannelAttachmentsErrors, ThrowOnError>({ url: '/channels/{channel_id}/attachments', ...options });
}
/**
* Handler for `GET /channels/{channel_id}/bots`.
*/
public listChannelBots<ThrowOnError extends boolean = false>(options: Options<ListChannelBotsData, ThrowOnError>): RequestResult<ListChannelBotsResponses, ListChannelBotsErrors, ThrowOnError> {
return (options.client ?? this.client).get<ListChannelBotsResponses, ListChannelBotsErrors, ThrowOnError>({ url: '/channels/{channel_id}/bots', ...options });
}
/**
* Handler for `POST /channels/{channel_id}/bots`.
*/
public addChannelBot<ThrowOnError extends boolean = false>(options: Options<AddChannelBotData, ThrowOnError>): RequestResult<AddChannelBotResponses, AddChannelBotErrors, ThrowOnError> {
return (options.client ?? this.client).post<AddChannelBotResponses, AddChannelBotErrors, ThrowOnError>({
url: '/channels/{channel_id}/bots',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `POST /channels/{channel_id}/bots/scoped`.
*/
public createChannelScopedBot<ThrowOnError extends boolean = false>(options: Options<CreateChannelScopedBotData, ThrowOnError>): RequestResult<CreateChannelScopedBotResponses, CreateChannelScopedBotErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateChannelScopedBotResponses, CreateChannelScopedBotErrors, ThrowOnError>({
url: '/channels/{channel_id}/bots/scoped',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `POST /channels/{channel_id}/join`.
*/
public joinChannel<ThrowOnError extends boolean = false>(options: Options<JoinChannelData, ThrowOnError>): RequestResult<JoinChannelResponses, JoinChannelErrors, ThrowOnError> {
return (options.client ?? this.client).post<JoinChannelResponses, JoinChannelErrors, ThrowOnError>({ url: '/channels/{channel_id}/join', ...options });
}
/**
* Handler for `GET /channels/{channel_id}/join-link`.
*/
public getChannelJoinLink<ThrowOnError extends boolean = false>(options: Options<GetChannelJoinLinkData, ThrowOnError>): RequestResult<GetChannelJoinLinkResponses, GetChannelJoinLinkErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetChannelJoinLinkResponses, GetChannelJoinLinkErrors, ThrowOnError>({ url: '/channels/{channel_id}/join-link', ...options });
}
/**
* Handler for `POST /channels/{channel_id}/leave`.
*/
public leaveChannel<ThrowOnError extends boolean = false>(options: Options<LeaveChannelData, ThrowOnError>): RequestResult<LeaveChannelResponses, LeaveChannelErrors, ThrowOnError> {
return (options.client ?? this.client).post<LeaveChannelResponses, LeaveChannelErrors, ThrowOnError>({ url: '/channels/{channel_id}/leave', ...options });
}
/**
* Handler for `DELETE /channels/{channel_id}/participants`.
*/
public removeParticipants<ThrowOnError extends boolean = false>(options: Options<RemoveParticipantsData, ThrowOnError>): RequestResult<RemoveParticipantsResponses, RemoveParticipantsErrors, ThrowOnError> {
return (options.client ?? this.client).delete<RemoveParticipantsResponses, RemoveParticipantsErrors, ThrowOnError>({
url: '/channels/{channel_id}/participants',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `GET /channels/{channel_id}/participants`.
*/
public getChannelParticipants<ThrowOnError extends boolean = false>(options: Options<GetChannelParticipantsData, ThrowOnError>): RequestResult<GetChannelParticipantsResponses, GetChannelParticipantsErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetChannelParticipantsResponses, GetChannelParticipantsErrors, ThrowOnError>({ url: '/channels/{channel_id}/participants', ...options });
}
/**
* Handler for `POST /channels/{channel_id}/participants`.
*/
public addParticipants<ThrowOnError extends boolean = false>(options: Options<AddParticipantsData, ThrowOnError>): RequestResult<AddParticipantsResponses, AddParticipantsErrors, ThrowOnError> {
return (options.client ?? this.client).post<AddParticipantsResponses, AddParticipantsErrors, ThrowOnError>({
url: '/channels/{channel_id}/participants',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Set a channel or group chat profile picture. Requires channel participation.
*/
public setChannelPicture<ThrowOnError extends boolean = false>(options: Options<SetChannelPictureData, ThrowOnError>): RequestResult<SetChannelPictureResponses, SetChannelPictureErrors, ThrowOnError> {
return (options.client ?? this.client).put<SetChannelPictureResponses, SetChannelPictureErrors, ThrowOnError>({
url: '/channels/{channel_id}/profile_picture',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `POST /channels/{channel_id}/webhook`.
*/
public postChannelBotWebhook<ThrowOnError extends boolean = false>(options: Options<PostChannelBotWebhookData, ThrowOnError>): RequestResult<PostChannelBotWebhookResponses, PostChannelBotWebhookErrors, ThrowOnError> {
return (options.client ?? this.client).post<PostChannelBotWebhookResponses, PostChannelBotWebhookErrors, ThrowOnError>({
url: '/channels/{channel_id}/webhook',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Soft-delete a collab surface.
*/
public deleteCollabSurface<ThrowOnError extends boolean = false>(options: Options<DeleteCollabSurfaceData, ThrowOnError>): RequestResult<DeleteCollabSurfaceResponses, DeleteCollabSurfaceErrors, ThrowOnError> {
return (options.client ?? this.client).delete<DeleteCollabSurfaceResponses, DeleteCollabSurfaceErrors, ThrowOnError>({ url: '/collab_surfaces/{id}', ...options });
}
/**
* Fetch a collab surface.
*/
public getCollabSurface<ThrowOnError extends boolean = false>(options: Options<GetCollabSurfaceData, ThrowOnError>): RequestResult<GetCollabSurfaceResponses, GetCollabSurfaceErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetCollabSurfaceResponses, GetCollabSurfaceErrors, ThrowOnError>({ url: '/collab_surfaces/{id}', ...options });
}
/**
* Idempotently ensure a collab surface exists (load-or-create).
*
* The id is caller-supplied, so an embedding surface can hold a stable id
* and blindly ensure it on mount: the first ensure creates and initializes
* the session, every later one (including concurrent ones) returns the same
* surface. A soft-deleted id is `410 Gone` and never comes back.
*/
public ensureCollabSurface<ThrowOnError extends boolean = false>(options: Options<EnsureCollabSurfaceData, ThrowOnError>): RequestResult<EnsureCollabSurfaceResponses, EnsureCollabSurfaceErrors, ThrowOnError> {
return (options.client ?? this.client).put<EnsureCollabSurfaceResponses, EnsureCollabSurfaceErrors, ThrowOnError>({
url: '/collab_surfaces/{id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Mint a sync-service connection token for a surface.
*/
public createCollabSurfaceToken<ThrowOnError extends boolean = false>(options: Options<CreateCollabSurfaceTokenData, ThrowOnError>): RequestResult<CreateCollabSurfaceTokenResponses, CreateCollabSurfaceTokenErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateCollabSurfaceTokenResponses, CreateCollabSurfaceTokenErrors, ThrowOnError>({ url: '/collab_surfaces/{id}/token', ...options });
}
/**
* Handle channel list requests for `GET /comms/channels`.
*/
public getChannels<ThrowOnError extends boolean = false>(options?: Options<GetChannelsData, ThrowOnError>): RequestResult<GetChannelsResponses, GetChannelsErrors, ThrowOnError> {
return (options?.client ?? this.client).get<GetChannelsResponses, GetChannelsErrors, ThrowOnError>({ url: '/comms/channels', ...options });
}
/**
* List the domains the caller's team keeps out of email sync,
* alphabetically. Any team member may read.
*/
public listCrmBlockedDomains<ThrowOnError extends boolean = false>(options?: Options<ListCrmBlockedDomainsData, ThrowOnError>): RequestResult<ListCrmBlockedDomainsResponses, ListCrmBlockedDomainsErrors, ThrowOnError> {
return (options?.client ?? this.client).get<ListCrmBlockedDomainsResponses, ListCrmBlockedDomainsErrors, ThrowOnError>({ url: '/crm/blocked-domains', ...options });
}
/**
* Unblock a domain: email sync resumes for it, and what blocking hid is
* shown again. Idempotent. Requires an admin/owner team role (403).
*/
public unblockCrmDomain<ThrowOnError extends boolean = false>(options: Options<UnblockCrmDomainData, ThrowOnError>): RequestResult<UnblockCrmDomainResponses, UnblockCrmDomainErrors, ThrowOnError> {
return (options.client ?? this.client).delete<UnblockCrmDomainResponses, UnblockCrmDomainErrors, ThrowOnError>({ url: '/crm/blocked-domains/{domain}', ...options });
}
/**
* Block a domain: email sync stops creating or updating CRM records for
* it, and the company and contacts the CRM holds for it are hidden.
* Idempotent. Requires an admin/owner team role (403).
*/
public blockCrmDomain<ThrowOnError extends boolean = false>(options: Options<BlockCrmDomainData, ThrowOnError>): RequestResult<BlockCrmDomainResponses, BlockCrmDomainErrors, ThrowOnError> {
return (options.client ?? this.client).put<BlockCrmDomainResponses, BlockCrmDomainErrors, ThrowOnError>({ url: '/crm/blocked-domains/{domain}', ...options });
}
/**
* Manually create a CRM company for the caller's team. Any team member
* may create one. A domain, when given, must not already be tracked by the team
* (409), and the team's CRM killswitch must be on (403). Returns the
* created company in the same shape as `GET /crm/companies/{id}` (its
* contact list is empty until emails populate it).
*/
public createCrmCompany<ThrowOnError extends boolean = false>(options: Options<CreateCrmCompanyData, ThrowOnError>): RequestResult<CreateCrmCompanyResponses, CreateCrmCompanyErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateCrmCompanyResponses, CreateCrmCompanyErrors, ThrowOnError>({
url: '/crm/companies',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Fetch a single CRM company by id, hydrated with its domains, the
* primary domain's directory display metadata (name + description),
* and the company's contacts. Access is enforced by
* [`CrmCompanyAccessLevelExtractor`]: the user must be on the team
* that owns the company, and hidden companies are invisible to plain
* members. Admin/owner callers see hidden companies and contacts so
* they can render the right unhide UI.
*/
public getCompany<ThrowOnError extends boolean = false>(options: Options<GetCompanyData, ThrowOnError>): RequestResult<GetCompanyResponses, GetCompanyErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetCompanyResponses, GetCompanyErrors, ThrowOnError>({ url: '/crm/companies/{company_id}', ...options });
}
/**
* List the contacts of a CRM company. Access is enforced by
* [`CrmCompanyAccessLevelExtractor`]: the user must be on the team that
* owns the company. Hidden companies and hidden contacts are invisible
* to plain members; admin/owner callers see hidden rows so they can
* render the right unhide UI.
*/
public listCompanyContacts<ThrowOnError extends boolean = false>(options: Options<ListCompanyContactsData, ThrowOnError>): RequestResult<ListCompanyContactsResponses, ListCompanyContactsErrors, ThrowOnError> {
return (options.client ?? this.client).get<ListCompanyContactsResponses, ListCompanyContactsErrors, ThrowOnError>({ url: '/crm/companies/{company_id}/contacts', ...options });
}
/**
* Manually create a contact under a CRM company. Access is enforced by
* [`CrmCompanyAccessLevelExtractor`]: the caller must be on the team
* that owns the company (hidden companies are reachable for
* admin/owner only, and the new contact then inherits `hidden`). The
* company must not already track the email (409), and the team's CRM
* killswitch must be on (403).
*/
public createCrmContact<ThrowOnError extends boolean = false>(options: Options<CreateCrmContactData, ThrowOnError>): RequestResult<CreateCrmContactResponses, CreateCrmContactErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateCrmContactResponses, CreateCrmContactErrors, ThrowOnError>({
url: '/crm/companies/{company_id}/contacts',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Toggle `email_sync` on a CRM company. Purely a visibility flag —
* it gates whether team members can see each other's emails with
* this company. Existing CRM data is unaffected.
*/
public setEmailSync<ThrowOnError extends boolean = false>(options: Options<SetEmailSyncData, ThrowOnError>): RequestResult<SetEmailSyncResponses, SetEmailSyncErrors, ThrowOnError> {
return (options.client ?? this.client).put<SetEmailSyncResponses, SetEmailSyncErrors, ThrowOnError>({
url: '/crm/companies/{company_id}/email-sync',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Toggle `hidden` on a CRM company. Hiding also disables
* `email_sync` and soft-hides every contact under the company.
* Un-hide restores contact visibility only; `email_sync` is left
* untouched (the team must re-enable it explicitly). Contact rows
* and contact sources survive the cycle.
*/
public setCompanyHidden<ThrowOnError extends boolean = false>(options: Options<SetCompanyHiddenData, ThrowOnError>): RequestResult<SetCompanyHiddenResponses, SetCompanyHiddenErrors, ThrowOnError> {
return (options.client ?? this.client).put<SetCompanyHiddenResponses, SetCompanyHiddenErrors, ThrowOnError>({
url: '/crm/companies/{company_id}/hidden',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Rename a CRM company. Access is enforced by
* [`CrmCompanyAccessLevelExtractor`]: the caller must be on the team
* that owns the company (hidden companies are reachable for
* admin/owner only). The name is a team-scoped override
* (`custom_name`) and never touches the global domain directory.
*/
public setCrmCompanyName<ThrowOnError extends boolean = false>(options: Options<SetCrmCompanyNameData, ThrowOnError>): RequestResult<SetCrmCompanyNameResponses, SetCrmCompanyNameErrors, ThrowOnError> {
return (options.client ?? this.client).put<SetCrmCompanyNameResponses, SetCrmCompanyNameErrors, ThrowOnError>({
url: '/crm/companies/{company_id}/name',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Search the caller's team's CRM contacts by email or name. Any team member
* may search visible contacts; admin/owner callers also match hidden
* contacts and contacts under hidden companies.
*/
public searchContacts<ThrowOnError extends boolean = false>(options?: Options<SearchContactsData, ThrowOnError>): RequestResult<SearchContactsResponses, SearchContactsErrors, ThrowOnError> {
return (options?.client ?? this.client).get<SearchContactsResponses, SearchContactsErrors, ThrowOnError>({ url: '/crm/contacts', ...options });
}
/**
* Manually create a contact without a company for the caller's team.
* Any team member may create one. The team must not already have a
* company-less contact with the email (409), and the team's CRM
* killswitch must be on (403).
*/
public createCrmTeamContact<ThrowOnError extends boolean = false>(options: Options<CreateCrmTeamContactData, ThrowOnError>): RequestResult<CreateCrmTeamContactResponses, CreateCrmTeamContactErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateCrmTeamContactResponses, CreateCrmTeamContactErrors, ThrowOnError>({
url: '/crm/contacts',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Look up a CRM contact by email in the caller's team. Returns a null
* `contact` when no visible contact exists. Any team member may resolve a
* visible contact; admin/owner callers may also resolve hidden contacts and
* contacts under hidden companies. Returns 400 when several visible contacts
* match; callers must choose an explicit contact ID instead.
*/
public getContactByEmail<ThrowOnError extends boolean = false>(options: Options<GetContactByEmailData, ThrowOnError>): RequestResult<GetContactByEmailResponses, GetContactByEmailErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetContactByEmailResponses, GetContactByEmailErrors, ThrowOnError>({ url: '/crm/contacts/by-email', ...options });
}
/**
* Fetch a single CRM contact by id. Access is enforced by
* [`CrmContactAccessLevelExtractor`]: the user must be on the team that
* owns the contact's parent company, and hidden contacts are invisible
* to plain members. Admin/owner callers see hidden contacts so they can
* render the right unhide UI.
*/
public getContact<ThrowOnError extends boolean = false>(options: Options<GetContactData, ThrowOnError>): RequestResult<GetContactResponses, GetContactErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetContactResponses, GetContactErrors, ThrowOnError>({ url: '/crm/contacts/{contact_id}', ...options });
}
/**
* Toggle `hidden` on a CRM contact. Hiding is a display-only opt-out
* scoped to the team that owns the contact's company.
*/
public setContactHidden<ThrowOnError extends boolean = false>(options: Options<SetContactHiddenData, ThrowOnError>): RequestResult<SetContactHiddenResponses, SetContactHiddenErrors, ThrowOnError> {
return (options.client ?? this.client).put<SetContactHiddenResponses, SetContactHiddenErrors, ThrowOnError>({
url: '/crm/contacts/{contact_id}/hidden',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Rename a CRM contact. Access is enforced by
* [`CrmContactAccessLevelExtractor`]: the caller must be on the team
* that owns the contact's company (hidden contacts are reachable for
* admin/owner only). The name overwrites the team-scoped
* `crm_contacts.name` column.
*/
public setCrmContactName<ThrowOnError extends boolean = false>(options: Options<SetCrmContactNameData, ThrowOnError>): RequestResult<SetCrmContactNameResponses, SetCrmContactNameErrors, ThrowOnError> {
return (options.client ?? this.client).put<SetCrmContactNameResponses, SetCrmContactNameErrors, ThrowOnError>({
url: '/crm/contacts/{contact_id}/name',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* List the caller's live pipelines in their CRM.
*/
public listCrmPipelines<ThrowOnError extends boolean = false>(options?: Options<ListCrmPipelinesData, ThrowOnError>): RequestResult<ListCrmPipelinesResponses, unknown, ThrowOnError> {
return (options?.client ?? this.client).get<ListCrmPipelinesResponses, unknown, ThrowOnError>({ url: '/crm/pipelines', ...options });
}
/**
* Create a private or team-shared pipeline.
*/
public createCrmPipeline<ThrowOnError extends boolean = false>(options: Options<CreateCrmPipelineData, ThrowOnError>): RequestResult<CreateCrmPipelineResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).post<CreateCrmPipelineResponses, unknown, ThrowOnError>({
url: '/crm/pipelines',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Read one pipeline by its entity identity.
*/
public getCrmPipeline<ThrowOnError extends boolean = false>(options: Options<GetCrmPipelineData, ThrowOnError>): RequestResult<GetCrmPipelineResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).get<GetCrmPipelineResponses, unknown, ThrowOnError>({ url: '/crm/pipelines/{id}', ...options });
}
/**
* Rename a pipeline.
*/
public renameCrmPipeline<ThrowOnError extends boolean = false>(options: Options<RenameCrmPipelineData, ThrowOnError>): RequestResult<RenameCrmPipelineResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).put<RenameCrmPipelineResponses, unknown, ThrowOnError>({
url: '/crm/pipelines/{id}/name',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Edit pipeline schema or records with the common typed operations.
*/
public applyCrmPipelineOps<ThrowOnError extends boolean = false>(options: Options<ApplyCrmPipelineOpsData, ThrowOnError>): RequestResult<ApplyCrmPipelineOpsResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).post<ApplyCrmPipelineOpsResponses, unknown, ThrowOnError>({
url: '/crm/pipelines/{id}/ops',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Read the owner, team grant and channel recipients of a pipeline the caller can edit.
*/
public getCrmPipelinePermissions<ThrowOnError extends boolean = false>(options: Options<GetCrmPipelinePermissionsData, ThrowOnError>): RequestResult<GetCrmPipelinePermissionsResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).get<GetCrmPipelinePermissionsResponses, unknown, ThrowOnError>({ url: '/crm/pipelines/{id}/permissions', ...options });
}
/**
* Share a pipeline the caller can edit with channels, or change or remove
* their access. Team access changes through `/sharing`; there is no share link.
*/
public updateCrmPipelinePermissions<ThrowOnError extends boolean = false>(options: Options<UpdateCrmPipelinePermissionsData, ThrowOnError>): RequestResult<UpdateCrmPipelinePermissionsResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).patch<UpdateCrmPipelinePermissionsResponses, unknown, ThrowOnError>({
url: '/crm/pipelines/{id}/permissions',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Read pipeline records through pipeline access.
*/
public getCrmPipelineRows<ThrowOnError extends boolean = false>(options: Options<GetCrmPipelineRowsData, ThrowOnError>): RequestResult<GetCrmPipelineRowsResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).get<GetCrmPipelineRowsResponses, unknown, ThrowOnError>({ url: '/crm/pipelines/{id}/rows', ...options });
}
/**
* Query rows through pipeline access using the shared view protocol.
*/
public queryCrmPipelineRows<ThrowOnError extends boolean = false>(options: Options<QueryCrmPipelineRowsData, ThrowOnError>): RequestResult<QueryCrmPipelineRowsResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).post<QueryCrmPipelineRowsResponses, unknown, ThrowOnError>({
url: '/crm/pipelines/{id}/rows',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Update sharing.
*/
public shareCrmPipeline<ThrowOnError extends boolean = false>(options: Options<ShareCrmPipelineData, ThrowOnError>): RequestResult<ShareCrmPipelineResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).put<ShareCrmPipelineResponses, unknown, ThrowOnError>({
url: '/crm/pipelines/{id}/sharing',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Read requirements by stable stage and field identities.
*/
public getCrmPipelineStageRequirements<ThrowOnError extends boolean = false>(options: Options<GetCrmPipelineStageRequirementsData, ThrowOnError>): RequestResult<GetCrmPipelineStageRequirementsResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).get<GetCrmPipelineStageRequirementsResponses, unknown, ThrowOnError>({ url: '/crm/pipelines/{id}/stage-requirements', ...options });
}
/**
* Replace the required fields for one stage. An empty list removes its rule.
*/
public setCrmPipelineStageRequirement<ThrowOnError extends boolean = false>(options: Options<SetCrmPipelineStageRequirementData, ThrowOnError>): RequestResult<SetCrmPipelineStageRequirementResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).put<SetCrmPipelineStageRequirementResponses, unknown, ThrowOnError>({
url: '/crm/pipelines/{id}/stage-requirements',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Read the host-owned table schema.
*/
public getCrmPipelineTable<ThrowOnError extends boolean = false>(options: Options<GetCrmPipelineTableData, ThrowOnError>): RequestResult<GetCrmPipelineTableResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).get<GetCrmPipelineTableResponses, unknown, ThrowOnError>({ url: '/crm/pipelines/{id}/table', ...options });
}
/**
* Trash or restore a pipeline.
*/
public trashCrmPipeline<ThrowOnError extends boolean = false>(options: Options<TrashCrmPipelineData, ThrowOnError>): RequestResult<TrashCrmPipelineResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).put<TrashCrmPipelineResponses, unknown, ThrowOnError>({
url: '/crm/pipelines/{id}/trash',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Read saved board positions through pipeline access.
*/
public getCrmPipelineViewPositions<ThrowOnError extends boolean = false>(options: Options<GetCrmPipelineViewPositionsData, ThrowOnError>): RequestResult<GetCrmPipelineViewPositionsResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).get<GetCrmPipelineViewPositionsResponses, unknown, ThrowOnError>({ url: '/crm/pipelines/{id}/views/{view}/positions', ...options });
}
/**
* Read the caller's team CRM configuration. Any team member may read;
* teams without a settings row get the defaults.
*/
public getCrmTeamSettings<ThrowOnError extends boolean = false>(options?: Options<GetCrmTeamSettingsData, ThrowOnError>): RequestResult<GetCrmTeamSettingsResponses, GetCrmTeamSettingsErrors, ThrowOnError> {
return (options?.client ?? this.client).get<GetCrmTeamSettingsResponses, GetCrmTeamSettingsErrors, ThrowOnError>({ url: '/crm/settings', ...options });
}
/**
* Partially update the caller's team CRM configuration. Any team
* member may update the views fields (`team_views`,
* `default_team_view_id`); the governance fields (permission
* thresholds, `closed_stage_ids`, `exclude_personal_emails`) require an admin/owner team role
* (403 otherwise). Omitted fields keep their current values;
* `team_views` is replaced whole. Returns the resulting settings.
*/
public putCrmTeamSettings<ThrowOnError extends boolean = false>(options: Options<PutCrmTeamSettingsData, ThrowOnError>): RequestResult<PutCrmTeamSettingsResponses, PutCrmTeamSettingsErrors, ThrowOnError> {
return (options.client ?? this.client).put<PutCrmTeamSettingsResponses, PutCrmTeamSettingsErrors, ThrowOnError>({
url: '/crm/settings',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Reset the team's deal stages to the defaults; gated like `PUT /crm/stages`.
*/
public resetCrmTeamStages<ThrowOnError extends boolean = false>(options?: Options<ResetCrmTeamStagesData, ThrowOnError>): RequestResult<ResetCrmTeamStagesResponses, ResetCrmTeamStagesErrors, ThrowOnError> {
return (options?.client ?? this.client).delete<ResetCrmTeamStagesResponses, ResetCrmTeamStagesErrors, ThrowOnError>({ url: '/crm/stages', ...options });
}
/**
* Replace the team's deal stages; requires `edit_stages_role` (403 otherwise).
*/
public putCrmTeamStages<ThrowOnError extends boolean = false>(options: Options<PutCrmTeamStagesData, ThrowOnError>): RequestResult<PutCrmTeamStagesResponses, PutCrmTeamStagesErrors, ThrowOnError> {
return (options.client ?? this.client).put<PutCrmTeamStagesResponses, PutCrmTeamStagesErrors, ThrowOnError>({
url: '/crm/stages',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* List the caller's databases.
*/
public listDatabases<ThrowOnError extends boolean = false>(options?: Options<ListDatabasesData, ThrowOnError>): RequestResult<ListDatabasesResponses, ListDatabasesErrors, ThrowOnError> {
return (options?.client ?? this.client).get<ListDatabasesResponses, ListDatabasesErrors, ThrowOnError>({ url: '/databases', ...options });
}
/**
* Create a database owned by the caller; its first table, "Table 1", holds a
* "Name" text column.
*/
public createDatabase<ThrowOnError extends boolean = false>(options: Options<CreateDatabaseData, ThrowOnError>): RequestResult<CreateDatabaseResponses, CreateDatabaseErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateDatabaseResponses, CreateDatabaseErrors, ThrowOnError>({
url: '/databases',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Save an immutable query. Editing a question saves a new one.
*/
public saveDatabaseQuery<ThrowOnError extends boolean = false>(options: Options<SaveDatabaseQueryData, ThrowOnError>): RequestResult<SaveDatabaseQueryResponses, SaveDatabaseQueryErrors, ThrowOnError> {
return (options.client ?? this.client).post<SaveDatabaseQueryResponses, SaveDatabaseQueryErrors, ThrowOnError>({
url: '/databases/queries',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* A saved query's definition, for its creator or a viewer of its database.
*/
public getDatabaseQuery<ThrowOnError extends boolean = false>(options: Options<GetDatabaseQueryData, ThrowOnError>): RequestResult<GetDatabaseQueryResponses, GetDatabaseQueryErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetDatabaseQueryResponses, GetDatabaseQueryErrors, ThrowOnError>({ url: '/databases/queries/{query_id}', ...options });
}
/**
* Run one statement as the authenticated user. The viewer's catalog authorizes reads;
* the SQL domain service obtains an edit receipt for every written database.
*/
public queryDatabases<ThrowOnError extends boolean = false>(options: Options<QueryDatabasesData, ThrowOnError>): RequestResult<QueryDatabasesResponses, QueryDatabasesErrors, ThrowOnError> {
return (options.client ?? this.client).post<QueryDatabasesResponses, QueryDatabasesErrors, ThrowOnError>({
url: '/databases/query',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Create a small example once for the authenticated user, if they have no databases.
*/
public ensureStarterHandler<ThrowOnError extends boolean = false>(options?: Options<EnsureStarterHandlerData, ThrowOnError>): RequestResult<EnsureStarterHandlerResponses, EnsureStarterHandlerErrors, ThrowOnError> {
return (options?.client ?? this.client).post<EnsureStarterHandlerResponses, EnsureStarterHandlerErrors, ThrowOnError>({ url: '/databases/starter', ...options });
}
/**
* Insert rows through a webhook. The body is a JSON object, one row, or
* an array of up to 100 objects, one row each. Keys name columns by name
* (ignoring case) or id; `null` leaves a cell empty. Values may be loose:
* `"45"` for a number, `"true"` for a checkbox, a label or labels for a
* select, `2026-10-09` for a date. Nothing is written unless every row fits.
*/
public deliverDatabaseWebhook<ThrowOnError extends boolean = false>(options: Options<DeliverDatabaseWebhookData, ThrowOnError>): RequestResult<DeliverDatabaseWebhookResponses, DeliverDatabaseWebhookErrors, ThrowOnError> {
return (options.client ?? this.client).post<DeliverDatabaseWebhookResponses, DeliverDatabaseWebhookErrors, ThrowOnError>({
url: '/databases/webhooks/{token}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Schema detail of one database.
*/
public getDatabase<ThrowOnError extends boolean = false>(options: Options<GetDatabaseData, ThrowOnError>): RequestResult<GetDatabaseResponses, GetDatabaseErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetDatabaseResponses, GetDatabaseErrors, ThrowOnError>({ url: '/databases/{id}', ...options });
}
/**
* Tell a database's other viewers where the caller is.
*/
public shareDatabaseAwareness<ThrowOnError extends boolean = false>(options: Options<ShareDatabaseAwarenessData, ThrowOnError>): RequestResult<ShareDatabaseAwarenessResponses, ShareDatabaseAwarenessErrors, ThrowOnError> {
return (options.client ?? this.client).put<ShareDatabaseAwarenessResponses, ShareDatabaseAwarenessErrors, ThrowOnError>({
url: '/databases/{id}/awareness',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Undo one of your own committed changes: its inverse applies as a new,
* journaled batch, under the table's lock, guarded against what others
* changed since. A cell someone changed since is left alone and listed; a
* row or column you added that someone else wrote since, or a name, option,
* order, view or card place changed since, refuses the undo. Others'
* changes always stay. Redo by undoing the undo's change.
*/
public undoDatabaseChange<ThrowOnError extends boolean = false>(options: Options<UndoDatabaseChangeData, ThrowOnError>): RequestResult<UndoDatabaseChangeResponses, UndoDatabaseChangeErrors, ThrowOnError> {
return (options.client ?? this.client).post<UndoDatabaseChangeResponses, UndoDatabaseChangeErrors, ThrowOnError>({ url: '/databases/{id}/changes/{change}/undo', ...options });
}
/**
* Copy a database, with its tables, columns, views and rows, into a new one
* the caller owns. Its sharing, forms, webhooks and history stay behind.
*/
public duplicateDatabase<ThrowOnError extends boolean = false>(options: Options<DuplicateDatabaseData, ThrowOnError>): RequestResult<DuplicateDatabaseResponses, DuplicateDatabaseErrors, ThrowOnError> {
return (options.client ?? this.client).post<DuplicateDatabaseResponses, DuplicateDatabaseErrors, ThrowOnError>({
url: '/databases/{id}/duplicate',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Import a new table and every row atomically; retries carry the same request ID.
*/
public importDatabaseTable<ThrowOnError extends boolean = false>(options: Options<ImportDatabaseTableData, ThrowOnError>): RequestResult<ImportDatabaseTableResponses, ImportDatabaseTableErrors, ThrowOnError> {
return (options.client ?? this.client).post<ImportDatabaseTableResponses, ImportDatabaseTableErrors, ThrowOnError>({
url: '/databases/{id}/import',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Apply a batch of typed ops, the one write surface of a database: add,
* rename, remove and order tables and columns, change a column's type, add
* and change options, insert, update and delete rows, and write views and a
* board's card places. The ops apply in order in one transaction, so a
* later op may name a table, column, option or view an earlier one created
* under the id its client minted. Ops are last-write-wins unless the batch names
* base versions. A refused op, named by its index (and row and column where
* relevant), leaves the whole batch unwritten.
*/
public applyDatabaseOps<ThrowOnError extends boolean = false>(options: Options<ApplyDatabaseOpsData, ThrowOnError>): RequestResult<ApplyDatabaseOpsResponses, ApplyDatabaseOpsErrors, ThrowOnError> {
return (options.client ?? this.client).post<ApplyDatabaseOpsResponses, ApplyDatabaseOpsErrors, ThrowOnError>({
url: '/databases/{id}/ops',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Read recipients and the team share for a database owned by the caller.
* Link sharing is always `null`: databases do not support it.
*/
public getDatabasePermissions<ThrowOnError extends boolean = false>(options: Options<GetDatabasePermissionsData, ThrowOnError>): RequestResult<GetDatabasePermissionsResponses, GetDatabasePermissionsErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetDatabasePermissionsResponses, GetDatabasePermissionsErrors, ThrowOnError>({ url: '/databases/{id}/permissions', ...options });
}
/**
* Update channel recipients and the team share after proving database
* ownership. Turning on link sharing is refused; ownership cannot be
* changed here. Only the actual owner may change the team share, and a 409
* means sharing changed since the request was authorized.
*/
public updateDatabasePermissions<ThrowOnError extends boolean = false>(options: Options<UpdateDatabasePermissionsData, ThrowOnError>): RequestResult<UpdateDatabasePermissionsResponses, UpdateDatabasePermissionsErrors, ThrowOnError> {
return (options.client ?? this.client).patch<UpdateDatabasePermissionsResponses, UpdateDatabasePermissionsErrors, ThrowOnError>({
url: '/databases/{id}/permissions',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* What changed in a table since a version, from the change journal: the
* rows that changed, each once as it stands now (`insert`, `update` or
* `delete`), and the columns. A reader holding the table at `since` reads
* just those rows; it reads the table whole when a column changed, the
* journal is not `complete`, or the rows are `truncated`.
*/
public getDatabaseTableChanges<ThrowOnError extends boolean = false>(options: Options<GetDatabaseTableChangesData, ThrowOnError>): RequestResult<GetDatabaseTableChangesResponses, GetDatabaseTableChangesErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetDatabaseTableChangesResponses, GetDatabaseTableChangesErrors, ThrowOnError>({ url: '/databases/{id}/tables/{table_id}/changes', ...options });
}
/**
* What changing one column to each type of the type menu would do to its
* values: safe, checked (with how many values would not convert and a few
* of them), or never (with why). Changes nothing.
*/
public listDatabaseColumnCasts<ThrowOnError extends boolean = false>(options: Options<ListDatabaseColumnCastsData, ThrowOnError>): RequestResult<ListDatabaseColumnCastsResponses, ListDatabaseColumnCastsErrors, ThrowOnError> {
return (options.client ?? this.client).get<ListDatabaseColumnCastsResponses, ListDatabaseColumnCastsErrors, ThrowOnError>({ url: '/databases/{id}/tables/{table_id}/columns/{column_id}/casts', ...options });
}
/**
* What one column's values become under another type: the values that
* convert, with the options they need, for a new column of that type beside
* it. The column itself is left as it is: a client writes the conversion as
* one ops batch, a `create_column` then an `update_rows`, with the answered
* table version as its base version. Changes nothing.
*/
public convertDatabaseColumn<ThrowOnError extends boolean = false>(options: Options<ConvertDatabaseColumnData, ThrowOnError>): RequestResult<ConvertDatabaseColumnResponses, ConvertDatabaseColumnErrors, ThrowOnError> {
return (options.client ?? this.client).post<ConvertDatabaseColumnResponses, ConvertDatabaseColumnErrors, ThrowOnError>({
url: '/databases/{id}/tables/{table_id}/columns/{column_id}/conversion',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Settle a new empty text column's type.
*/
public inferDatabaseColumnType<ThrowOnError extends boolean = false>(options: Options<InferDatabaseColumnTypeData, ThrowOnError>): RequestResult<InferDatabaseColumnTypeResponses, InferDatabaseColumnTypeErrors, ThrowOnError> {
return (options.client ?? this.client).post<InferDatabaseColumnTypeResponses, InferDatabaseColumnTypeErrors, ThrowOnError>({
url: '/databases/{id}/tables/{table_id}/columns/{column_id}/infer-type',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* A row's history, from the change journal: every committed change that
* touched it, newest first, with who made it, when, and the values of the
* columns it touched before and after. It reads after the row is removed,
* so a removed row's last values stay readable.
*/
public getDatabaseRowHistory<ThrowOnError extends boolean = false>(options: Options<GetDatabaseRowHistoryData, ThrowOnError>): RequestResult<GetDatabaseRowHistoryResponses, GetDatabaseRowHistoryErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetDatabaseRowHistoryResponses, GetDatabaseRowHistoryErrors, ThrowOnError>({ url: '/databases/{id}/tables/{table_id}/rows/{row_id}/history', ...options });
}
/**
* Where a board's cards sit, for drawing it: the views come with the
* database's detail, their cards' places from here.
*/
public getDatabaseViewPositions<ThrowOnError extends boolean = false>(options: Options<GetDatabaseViewPositionsData, ThrowOnError>): RequestResult<GetDatabaseViewPositionsResponses, GetDatabaseViewPositionsErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetDatabaseViewPositionsResponses, GetDatabaseViewPositionsErrors, ThrowOnError>({ url: '/databases/{id}/views/{view_id}/positions', ...options });
}
/**
* The database's webhooks.
*/
public listDatabaseWebhooks<ThrowOnError extends boolean = false>(options: Options<ListDatabaseWebhooksData, ThrowOnError>): RequestResult<ListDatabaseWebhooksResponses, ListDatabaseWebhooksErrors, ThrowOnError> {
return (options.client ?? this.client).get<ListDatabaseWebhooksResponses, ListDatabaseWebhooksErrors, ThrowOnError>({ url: '/databases/{id}/webhooks', ...options });
}
/**
* Create a webhook: a secret URL whose calls insert rows into one of the
* database's tables, writing with the creator's access.
*/
public createDatabaseWebhook<ThrowOnError extends boolean = false>(options: Options<CreateDatabaseWebhookData, ThrowOnError>): RequestResult<CreateDatabaseWebhookResponses, CreateDatabaseWebhookErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateDatabaseWebhookResponses, CreateDatabaseWebhookErrors, ThrowOnError>({
url: '/databases/{id}/webhooks',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Delete a webhook; its URL stops working.
*/
public deleteDatabaseWebhook<ThrowOnError extends boolean = false>(options: Options<DeleteDatabaseWebhookData, ThrowOnError>): RequestResult<DeleteDatabaseWebhookResponses, DeleteDatabaseWebhookErrors, ThrowOnError> {
return (options.client ?? this.client).delete<DeleteDatabaseWebhookResponses, DeleteDatabaseWebhookErrors, ThrowOnError>({ url: '/databases/{id}/webhooks/{webhook_id}', ...options });
}
/**
* Transcribe a transient recording with OpenAI Whisper.
*
* Available to every signed-in user on every plan; does not consume chat
* credits. Audio and transcripts are never persisted.
*/
public transcribeDictation<ThrowOnError extends boolean = false>(options: Options<TranscribeDictationData, ThrowOnError>): RequestResult<TranscribeDictationResponses, TranscribeDictationErrors, ThrowOnError> {
return (options.client ?? this.client).post<TranscribeDictationResponses, TranscribeDictationErrors, ThrowOnError>({
bodySerializer: null,
url: '/dictation/transcribe',
...options,
headers: {
'Content-Type': 'audio/webm',
...options.headers
}
});
}
/**
* Gets the users documents to populate their recent document list
*/
public getUserDocumentsHandler<ThrowOnError extends boolean = false>(options: Options<GetUserDocumentsHandlerData, ThrowOnError>): RequestResult<GetUserDocumentsHandlerResponses, GetUserDocumentsHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetUserDocumentsHandlerResponses, GetUserDocumentsHandlerErrors, ThrowOnError>({ url: '/documents', ...options });
}
/**
* Handler for `POST /documents`.
*
* Creates a new document, generates an S3 presigned upload URL, and returns
* the document metadata with the URL for the client to upload to.
*/
public createDocument<ThrowOnError extends boolean = false>(options: Options<CreateDocumentData, ThrowOnError>): RequestResult<CreateDocumentResponses, CreateDocumentErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateDocumentResponses, CreateDocumentErrors, ThrowOnError>({
url: '/documents',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Creates and initializes a Canvas in one backend-owned lifecycle.
*/
public createCanvasHandler<ThrowOnError extends boolean = false>(options: Options<CreateCanvasHandlerData, ThrowOnError>): RequestResult<CreateCanvasHandlerResponses, CreateCanvasHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateCanvasHandlerResponses, CreateCanvasHandlerErrors, ThrowOnError>({
url: '/documents/create_canvas',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Creates and initializes a markdown document in one backend-owned lifecycle.
*/
public createMarkdownHandler<ThrowOnError extends boolean = false>(options: Options<CreateMarkdownHandlerData, ThrowOnError>): RequestResult<CreateMarkdownHandlerResponses, CreateMarkdownHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateMarkdownHandlerResponses, CreateMarkdownHandlerErrors, ThrowOnError>({
url: '/documents/create_markdown',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Creates a skill document with initialized markdown content and its
* routing description in one backend-owned lifecycle. Skills are markdown documents containing
* instructions that AI reads and follows when the skill is referenced in an
* AI input.
*/
public createSkillHandler<ThrowOnError extends boolean = false>(options: Options<CreateSkillHandlerData, ThrowOnError>): RequestResult<CreateSkillHandlerResponses, CreateSkillHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateSkillHandlerResponses, CreateSkillHandlerErrors, ThrowOnError>({
url: '/documents/create_skill',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Creates a snippet document with initialized markdown content in one
* backend-owned lifecycle. Snippets are created personal; team sharing is
* toggled separately via `PUT /documents/{document_id}/team_share`.
*/
public createSnippetHandler<ThrowOnError extends boolean = false>(options: Options<CreateSnippetHandlerData, ThrowOnError>): RequestResult<CreateSnippetHandlerResponses, CreateSnippetHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateSnippetHandlerResponses, CreateSnippetHandlerErrors, ThrowOnError>({
url: '/documents/create_snippet',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Creates a task document with properties and initialized markdown content in
* one backend-owned lifecycle.
*/
public createTaskHandler<ThrowOnError extends boolean = false>(options: Options<CreateTaskHandlerData, ThrowOnError>): RequestResult<CreateTaskHandlerResponses, CreateTaskHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateTaskHandlerResponses, CreateTaskHandlerErrors, ThrowOnError>({
url: '/documents/create_task',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `POST /documents/github_prs/tasks`.
*
* Returns the task documents each of up to 100 GitHub pull requests references, for the pull
* requests the caller can see.
*/
public getGithubPullRequestTasks<ThrowOnError extends boolean = false>(options: Options<GetGithubPullRequestTasksData, ThrowOnError>): RequestResult<GetGithubPullRequestTasksResponses, GetGithubPullRequestTasksErrors, ThrowOnError> {
return (options.client ?? this.client).post<GetGithubPullRequestTasksResponses, GetGithubPullRequestTasksErrors, ThrowOnError>({
url: '/documents/github_prs/tasks',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
public initializeUserDocuments<ThrowOnError extends boolean = false>(options?: Options<InitializeUserDocumentsData, ThrowOnError>): RequestResult<InitializeUserDocumentsResponses, InitializeUserDocumentsErrors, ThrowOnError> {
return (options?.client ?? this.client).post<InitializeUserDocumentsResponses, InitializeUserDocumentsErrors, ThrowOnError>({ url: '/documents/initialize_user_documents', ...options });
}
/**
* Gets a list of all the user's documents so they are able to be searched on
*/
public getDocumentListHandler<ThrowOnError extends boolean = false>(options?: Options<GetDocumentListHandlerData, ThrowOnError>): RequestResult<GetDocumentListHandlerResponses, GetDocumentListHandlerErrors, ThrowOnError> {
return (options?.client ?? this.client).get<GetDocumentListHandlerResponses, GetDocumentListHandlerErrors, ThrowOnError>({ url: '/documents/list', ...options });
}
/**
* Validates the provided document permissions token
*/
public validateDocumentPermissionsToken<ThrowOnError extends boolean = false>(options: Options<ValidateDocumentPermissionsTokenData, ThrowOnError>): RequestResult<ValidateDocumentPermissionsTokenResponses, ValidateDocumentPermissionsTokenErrors, ThrowOnError> {
return (options.client ?? this.client).post<ValidateDocumentPermissionsTokenResponses, ValidateDocumentPermissionsTokenErrors, ThrowOnError>({
url: '/documents/permissions_token/validate',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Generates a document permissions token for a provided document id
*/
public getDocumentPermissionsToken<ThrowOnError extends boolean = false>(options: Options<GetDocumentPermissionsTokenData, ThrowOnError>): RequestResult<GetDocumentPermissionsTokenResponses, GetDocumentPermissionsTokenErrors, ThrowOnError> {
return (options.client ?? this.client).post<GetDocumentPermissionsTokenResponses, GetDocumentPermissionsTokenErrors, ThrowOnError>({ url: '/documents/permissions_token/{document_id}', ...options });
}
/**
* Takes the docx document bom parts and generates presigned urls to upload
* any new content
*
* @deprecated
*/
public presaveDocumentHandler<ThrowOnError extends boolean = false>(options: Options<PresaveDocumentHandlerData, ThrowOnError>): RequestResult<PresaveDocumentHandlerResponses, PresaveDocumentHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).put<PresaveDocumentHandlerResponses, PresaveDocumentHandlerErrors, ThrowOnError>({
url: '/documents/presave/{document_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
public getBatchPreviewHandler<ThrowOnError extends boolean = false>(options: Options<GetBatchPreviewHandlerData, ThrowOnError>): RequestResult<GetBatchPreviewHandlerResponses, GetBatchPreviewHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).post<GetBatchPreviewHandlerResponses, GetBatchPreviewHandlerErrors, ThrowOnError>({
url: '/documents/preview',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `POST /documents/similarity_search`.
*
* Returns existing tasks similar to an unsaved draft. Runs vector retrieval +
* rerank only and persists nothing.
*/
public taskSimilaritySearchHandler<ThrowOnError extends boolean = false>(options: Options<TaskSimilaritySearchHandlerData, ThrowOnError>): RequestResult<TaskSimilaritySearchHandlerResponses, TaskSimilaritySearchHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).post<TaskSimilaritySearchHandlerResponses, TaskSimilaritySearchHandlerErrors, ThrowOnError>({
url: '/documents/similarity_search',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `GET /documents/slug/{slug}`.
*
* Returns document metadata, user access level, and view location.
*/
public getDocumentByTeamSlug<ThrowOnError extends boolean = false>(options: Options<GetDocumentByTeamSlugData, ThrowOnError>): RequestResult<GetDocumentByTeamSlugResponses, GetDocumentByTeamSlugErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetDocumentByTeamSlugResponses, GetDocumentByTeamSlugErrors, ThrowOnError>({ url: '/documents/slug/{slug}', ...options });
}
/**
* Resolves the current user's starter documents.
*/
public handler<ThrowOnError extends boolean = false>(options?: Options<HandlerData, ThrowOnError>): RequestResult<HandlerResponses, HandlerErrors, ThrowOnError> {
return (options?.client ?? this.client).get<HandlerResponses, HandlerErrors, ThrowOnError>({ url: '/documents/starter_docs', ...options });
}
/**
* Lists the built-in system skills. System skills are static, code-defined
* AI instructions (see the `system_skills` crate); they surface in the
* skills menu and AI skill tools like user skills, but have no document
* behind them, so clients must not offer to open them.
*/
public getSystemSkillsHandler<ThrowOnError extends boolean = false>(options?: Options<GetSystemSkillsHandlerData, ThrowOnError>): RequestResult<GetSystemSkillsHandlerResponses, GetSystemSkillsHandlerErrors, ThrowOnError> {
return (options?.client ?? this.client).get<GetSystemSkillsHandlerResponses, GetSystemSkillsHandlerErrors, ThrowOnError>({ url: '/documents/system_skills', ...options });
}
/**
* Upload a file's bytes as a new document, up to 25 MiB.
*
* The body is the raw file content. Preview generation and indexing may
* finish after the response.
*/
public uploadFile<ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>): RequestResult<UploadFileResponses, UploadFileErrors, ThrowOnError> {
return (options.client ?? this.client).post<UploadFileResponses, UploadFileErrors, ThrowOnError>({
bodySerializer: null,
url: '/documents/upload',
...options,
headers: {
'Content-Type': 'application/octet-stream',
...options.headers
}
});
}
/**
* Handler for `DELETE /documents/{document_id}`.
*
* Soft-deletes a document (only owners can delete).
*/
public deleteDocument<ThrowOnError extends boolean = false>(options: Options<DeleteDocumentData, ThrowOnError>): RequestResult<DeleteDocumentResponses, DeleteDocumentErrors, ThrowOnError> {
return (options.client ?? this.client).delete<DeleteDocumentResponses, DeleteDocumentErrors, ThrowOnError>({ url: '/documents/{document_id}', ...options });
}
/**
* Handler for `GET /documents/{document_id}`.
*
* Returns document metadata, user access level, and view location.
*/
public getDocument<ThrowOnError extends boolean = false>(options: Options<GetDocumentData, ThrowOnError>): RequestResult<GetDocumentResponses, GetDocumentErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetDocumentResponses, GetDocumentErrors, ThrowOnError>({ url: '/documents/{document_id}', ...options });
}
/**
* Handler for `PATCH /documents/{document_id}`.
*
* Edits document metadata such as name or project, and modifies
* the document's share permissions. Requires edit access to the document,
* and edit access to the target project if moving the document.
*/
public editDocument<ThrowOnError extends boolean = false>(options: Options<EditDocumentData, ThrowOnError>): RequestResult<EditDocumentResponses, EditDocumentErrors, ThrowOnError> {
return (options.client ?? this.client).patch<EditDocumentResponses, EditDocumentErrors, ThrowOnError>({
url: '/documents/{document_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Creates a new version of a document
*/
public saveDocumentHandler<ThrowOnError extends boolean = false>(options: Options<SaveDocumentHandlerData, ThrowOnError>): RequestResult<SaveDocumentHandlerResponses, SaveDocumentHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).put<SaveDocumentHandlerResponses, SaveDocumentHandlerErrors, ThrowOnError>({
url: '/documents/{document_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Edit a markdown document or task by instructions with the caller's edit
* access. Runs EditDocument's pipeline as a live collaborator, with its AI
* admission and billing.
*
* A client that disconnects aborts the edit: axum drops this handler's
* future, which drops the in-flight request to the editing worker, and the
* worker aborts on its request signal. Steps already acknowledged stay.
*/
public editDocumentWithAi<ThrowOnError extends boolean = false>(options: Options<EditDocumentWithAiData, ThrowOnError>): RequestResult<EditDocumentWithAiResponses, EditDocumentWithAiErrors, ThrowOnError> {
return (options.client ?? this.client).post<EditDocumentWithAiResponses, EditDocumentWithAiErrors, ThrowOnError>({
url: '/documents/{document_id}/ai-edit',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `GET /documents/{document_id}/branch_name`.
*
* Returns the short UUID and git branch name for a task document.
* Returns 400 if the document is not a task.
*/
public getDocumentBranchName<ThrowOnError extends boolean = false>(options: Options<GetDocumentBranchNameData, ThrowOnError>): RequestResult<GetDocumentBranchNameResponses, GetDocumentBranchNameErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetDocumentBranchNameResponses, GetDocumentBranchNameErrors, ThrowOnError>({ url: '/documents/{document_id}/branch_name', ...options });
}
/**
* Handler for `POST /documents/{document_id}/copy`.
*
* Copies an existing document, creating a new document with the same content.
* Does not require re-uploading the document file.
*/
public copyDocument<ThrowOnError extends boolean = false>(options: Options<CopyDocumentData, ThrowOnError>): RequestResult<CopyDocumentResponses, CopyDocumentErrors, ThrowOnError> {
return (options.client ?? this.client).post<CopyDocumentResponses, CopyDocumentErrors, ThrowOnError>({
url: '/documents/{document_id}/copy',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Read a Figma (.fig) design as text with the caller's view access: its
* pages, each page's top-level frames and sections with their text, the
* components their instances use, and the file's components, styles and
* variables.
*/
public readDesign<ThrowOnError extends boolean = false>(options: Options<ReadDesignData, ThrowOnError>): RequestResult<ReadDesignResponses, ReadDesignErrors, ThrowOnError> {
return (options.client ?? this.client).get<ReadDesignResponses, ReadDesignErrors, ThrowOnError>({ url: '/documents/{document_id}/design', ...options });
}
/**
* Generates a presigned url to download the raw content of the document
* For files with modification layers, they will not be applied in the downloaded file.
*/
public exportDocument<ThrowOnError extends boolean = false>(options: Options<ExportDocumentData, ThrowOnError>): RequestResult<ExportDocumentResponses, ExportDocumentErrors, ThrowOnError> {
return (options.client ?? this.client).get<ExportDocumentResponses, ExportDocumentErrors, ThrowOnError>({ url: '/documents/{document_id}/export', ...options });
}
/**
* Handler for `GET /documents/{document_id}/github_prs`.
*
* Returns GitHub pull requests associated with a task document.
* Returns 400 if the document is not a task.
*/
public getDocumentGithubPullRequests<ThrowOnError extends boolean = false>(options: Options<GetDocumentGithubPullRequestsData, ThrowOnError>): RequestResult<GetDocumentGithubPullRequestsResponses, GetDocumentGithubPullRequestsErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetDocumentGithubPullRequestsResponses, GetDocumentGithubPullRequestsErrors, ThrowOnError>({ url: '/documents/{document_id}/github_prs', ...options });
}
/**
* Read an Illustrator (.ai) document as text with the caller's view access:
* its artboards, its layer tree from top to bottom, and the text of its
* text objects.
*/
public readIllustratorDocument<ThrowOnError extends boolean = false>(options: Options<ReadIllustratorDocumentData, ThrowOnError>): RequestResult<ReadIllustratorDocumentResponses, ReadIllustratorDocumentErrors, ThrowOnError> {
return (options.client ?? this.client).get<ReadIllustratorDocumentResponses, ReadIllustratorDocumentErrors, ThrowOnError>({ url: '/documents/{document_id}/illustrator', ...options });
}
/**
* Gets the presigned url(s) for the document. aka location
*/
public getLocationHandler<ThrowOnError extends boolean = false>(options: Options<GetLocationHandlerData, ThrowOnError>): RequestResult<GetLocationHandlerResponses, GetLocationHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetLocationHandlerResponses, GetLocationHandlerErrors, ThrowOnError>({ url: '/documents/{document_id}/location', ...options });
}
/**
* Handler for `GET /documents/{document_id}/location_v3`.
*
* Returns a presigned URL or sync service content for accessing the document.
*/
public getDocumentLocationV3<ThrowOnError extends boolean = false>(options: Options<GetDocumentLocationV3Data, ThrowOnError>): RequestResult<GetDocumentLocationV3Responses, GetDocumentLocationV3Errors, ThrowOnError> {
return (options.client ?? this.client).get<GetDocumentLocationV3Responses, GetDocumentLocationV3Errors, ThrowOnError>({ url: '/documents/{document_id}/location_v3', ...options });
}
/**
* Permanently deletes a document.
*/
public permanentlyDeleteDocument<ThrowOnError extends boolean = false>(options: Options<PermanentlyDeleteDocumentData, ThrowOnError>): RequestResult<PermanentlyDeleteDocumentResponses, PermanentlyDeleteDocumentErrors, ThrowOnError> {
return (options.client ?? this.client).delete<PermanentlyDeleteDocumentResponses, PermanentlyDeleteDocumentErrors, ThrowOnError>({ url: '/documents/{document_id}/permanent', ...options });
}
/**
* Read a Photoshop (.psd or .psb) document as text with the caller's view
* access: its canvas, its layer tree from top to bottom with each layer's
* settings, and the text of its text layers.
*/
public readPhotoshopDocument<ThrowOnError extends boolean = false>(options: Options<ReadPhotoshopDocumentData, ThrowOnError>): RequestResult<ReadPhotoshopDocumentResponses, ReadPhotoshopDocumentErrors, ThrowOnError> {
return (options.client ?? this.client).get<ReadPhotoshopDocumentResponses, ReadPhotoshopDocumentErrors, ThrowOnError>({ url: '/documents/{document_id}/photoshop', ...options });
}
/**
* Read a PowerPoint deck as text with the caller's view access: every
* slide's id and shapes with their ids, positions and text. Edits address
* slides and shapes by these ids, which are not slide numbers.
*/
public readPresentation<ThrowOnError extends boolean = false>(options: Options<ReadPresentationData, ThrowOnError>): RequestResult<ReadPresentationResponses, ReadPresentationErrors, ThrowOnError> {
return (options.client ?? this.client).get<ReadPresentationResponses, ReadPresentationErrors, ThrowOnError>({ url: '/documents/{document_id}/presentation', ...options });
}
/**
* Create an edited copy of a PowerPoint deck as a new presentation, leaving
* the original unchanged. Needs view access to the deck and edit access to
* the destination project; the outcome's `documentId` is the copy.
*/
public copyPresentation<ThrowOnError extends boolean = false>(options: Options<CopyPresentationData, ThrowOnError>): RequestResult<CopyPresentationResponses, CopyPresentationErrors, ThrowOnError> {
return (options.client ?? this.client).post<CopyPresentationResponses, CopyPresentationErrors, ThrowOnError>({
url: '/documents/{document_id}/presentation/copy',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Apply a batch of edit operations to a PowerPoint deck atomically with the
* caller's edit access, saved as a new version. If any operation fails,
* nothing is saved.
*/
public editPresentation<ThrowOnError extends boolean = false>(options: Options<EditPresentationData, ThrowOnError>): RequestResult<EditPresentationResponses, EditPresentationErrors, ThrowOnError> {
return (options.client ?? this.client).post<EditPresentationResponses, EditPresentationErrors, ThrowOnError>({
url: '/documents/{document_id}/presentation/edits',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Fetches the document pdf processing result for a given document id
*/
public getDocumentProcessingResult<ThrowOnError extends boolean = false>(options: Options<GetDocumentProcessingResultData, ThrowOnError>): RequestResult<GetDocumentProcessingResultResponses, GetDocumentProcessingResultErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetDocumentProcessingResultResponses, GetDocumentProcessingResultErrors, ThrowOnError>({ url: '/documents/{document_id}/processing', ...options });
}
/**
* Fetches the document processing result for a given document id and job id
*/
public jobProcessingResultHandler<ThrowOnError extends boolean = false>(options: Options<JobProcessingResultHandlerData, ThrowOnError>): RequestResult<JobProcessingResultHandlerResponses, JobProcessingResultHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).get<JobProcessingResultHandlerResponses, JobProcessingResultHandlerErrors, ThrowOnError>({ url: '/documents/{document_id}/processing/{job_id}', ...options });
}
/**
* Deletes a specific document
*/
public revertDeleteDocument<ThrowOnError extends boolean = false>(options: Options<RevertDeleteDocumentData, ThrowOnError>): RequestResult<RevertDeleteDocumentResponses, RevertDeleteDocumentErrors, ThrowOnError> {
return (options.client ?? this.client).put<RevertDeleteDocumentResponses, RevertDeleteDocumentErrors, ThrowOnError>({ url: '/documents/{document_id}/revert_delete', ...options });
}
/**
* Handler for `GET /documents/{document_id}/short_id`.
*
* Returns the short UUID for a document.
*/
public getDocumentShortId<ThrowOnError extends boolean = false>(options: Options<GetDocumentShortIdData, ThrowOnError>): RequestResult<GetDocumentShortIdResponses, GetDocumentShortIdErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetDocumentShortIdResponses, GetDocumentShortIdErrors, ThrowOnError>({ url: '/documents/{document_id}/short_id', ...options });
}
/**
* For any file that isn't PDF or DOCX, use this endpoint for saving.
* This endpoint will allow you to save the document by providing the file content as part of a multipart request. Use key 'file' along with the file bytes.
* simple_save is different than the save_document endpoint because it does not return a presigned URL, Instead, it simply saves the file to S3 directly (and returns the document metadata).
*/
public simpleSave<ThrowOnError extends boolean = false>(options: Options<SimpleSaveData, ThrowOnError>): RequestResult<SimpleSaveResponses, SimpleSaveErrors, ThrowOnError> {
return (options.client ?? this.client).put<SimpleSaveResponses, SimpleSaveErrors, ThrowOnError>({ url: '/documents/{document_id}/simple_save', ...options });
}
/**
* Gets when to use a skill. `description` is absent for a skill created
* before descriptions existed.
*/
public getSkillDescription<ThrowOnError extends boolean = false>(options: Options<GetSkillDescriptionData, ThrowOnError>): RequestResult<GetSkillDescriptionResponses, GetSkillDescriptionErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetSkillDescriptionResponses, GetSkillDescriptionErrors, ThrowOnError>({ url: '/documents/{document_id}/skill_description', ...options });
}
/**
* Sets when to use a skill: one line starting "Use when", at most 300
* characters. Agents choose skills for a request by it.
*/
public setSkillDescription<ThrowOnError extends boolean = false>(options: Options<SetSkillDescriptionData, ThrowOnError>): RequestResult<SetSkillDescriptionResponses, SetSkillDescriptionErrors, ThrowOnError> {
return (options.client ?? this.client).put<SetSkillDescriptionResponses, SetSkillDescriptionErrors, ThrowOnError>({
url: '/documents/{document_id}/skill_description',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Gets the team-share state of a document. The team is resolved from the
* document owner's team membership; `teamId` is omitted when the owner does
* not belong to a team.
*/
public getDocumentTeamShare<ThrowOnError extends boolean = false>(options: Options<GetDocumentTeamShareData, ThrowOnError>): RequestResult<GetDocumentTeamShareResponses, GetDocumentTeamShareErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetDocumentTeamShareResponses, GetDocumentTeamShareErrors, ThrowOnError>({ url: '/documents/{document_id}/team_share', ...options });
}
/**
* Sets explicit team sharing. Requires a verified acting identity matching
* the persisted document owner, not merely effective Edit or Owner access.
* Initial enable defaults to Edit; repeated enable preserves the chosen level.
* Clear removes only the managed direct grant, not inherited team access.
*/
public setDocumentTeamShare<ThrowOnError extends boolean = false>(options: Options<SetDocumentTeamShareData, ThrowOnError>): RequestResult<SetDocumentTeamShareResponses, SetDocumentTeamShareErrors, ThrowOnError> {
return (options.client ?? this.client).put<SetDocumentTeamShareResponses, SetDocumentTeamShareErrors, ThrowOnError>({
url: '/documents/{document_id}/team_share',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Read current Markdown or extracted file text with the document's view receipt.
*/
public getDocumentTextContent<ThrowOnError extends boolean = false>(options: Options<GetDocumentTextContentData, ThrowOnError>): RequestResult<GetDocumentTextContentResponses, GetDocumentTextContentErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetDocumentTextContentResponses, GetDocumentTextContentErrors, ThrowOnError>({ url: '/documents/{document_id}/text-content', ...options });
}
/**
* Gets the list of users who have viewed a given document
*/
public getDocumentViewsHandler<ThrowOnError extends boolean = false>(options: Options<GetDocumentViewsHandlerData, ThrowOnError>): RequestResult<GetDocumentViewsHandlerResponses, GetDocumentViewsHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetDocumentViewsHandlerResponses, GetDocumentViewsHandlerErrors, ThrowOnError>({ url: '/documents/{document_id}/views', ...options });
}
/**
* Read an uploaded Word document as it stands now, including edits made in
* Macro, with the caller's view access: every paragraph, table cell and
* content control with its stable id, style and text, tracked changes, and
* Word comments. Long documents are paged.
*/
public readWordDocument<ThrowOnError extends boolean = false>(options: Options<ReadWordDocumentData, ThrowOnError>): RequestResult<ReadWordDocumentResponses, ReadWordDocumentErrors, ThrowOnError> {
return (options.client ?? this.client).get<ReadWordDocumentResponses, ReadWordDocumentErrors, ThrowOnError>({ url: '/documents/{document_id}/word', ...options });
}
/**
* Apply a batch of edits to an uploaded Word document's live copy
* atomically with the caller's edit access. Nothing changes if any
* operation fails. Returns the changed blocks as they now read.
*/
public editWordDocument<ThrowOnError extends boolean = false>(options: Options<EditWordDocumentData, ThrowOnError>): RequestResult<EditWordDocumentResponses, EditWordDocumentErrors, ThrowOnError> {
return (options.client ?? this.client).post<EditWordDocumentResponses, EditWordDocumentErrors, ThrowOnError>({
url: '/documents/{document_id}/word/edits',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Gets a particular document by its id
*/
public getDocumentVersion<ThrowOnError extends boolean = false>(options: Options<GetDocumentVersionData, ThrowOnError>): RequestResult<GetDocumentVersionResponses, GetDocumentVersionErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetDocumentVersionResponses, GetDocumentVersionErrors, ThrowOnError>({ url: '/documents/{document_id}/{document_version_id}', ...options });
}
/**
* State access request state through the domain service.
*/
public accessRequestsState<ThrowOnError extends boolean = false>(options: Options<AccessRequestsStateData, ThrowOnError>): RequestResult<AccessRequestsStateResponses, AccessRequestsStateErrors, ThrowOnError> {
return (options.client ?? this.client).get<AccessRequestsStateResponses, AccessRequestsStateErrors, ThrowOnError>({ url: '/entities/{entity_type}/{entity_id}/access-requests', ...options });
}
/**
* Cancel access request state through the domain service.
*/
public accessRequestsCancel<ThrowOnError extends boolean = false>(options: Options<AccessRequestsCancelData, ThrowOnError>): RequestResult<AccessRequestsCancelResponses, AccessRequestsCancelErrors, ThrowOnError> {
return (options.client ?? this.client).delete<AccessRequestsCancelResponses, AccessRequestsCancelErrors, ThrowOnError>({ url: '/entities/{entity_type}/{entity_id}/access-requests/mine', ...options });
}
/**
* Submit access request state through the domain service.
*/
public accessRequestsSubmit<ThrowOnError extends boolean = false>(options: Options<AccessRequestsSubmitData, ThrowOnError>): RequestResult<AccessRequestsSubmitResponses, AccessRequestsSubmitErrors, ThrowOnError> {
return (options.client ?? this.client).put<AccessRequestsSubmitResponses, AccessRequestsSubmitErrors, ThrowOnError>({
url: '/entities/{entity_type}/{entity_id}/access-requests/mine',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Resolve access request state through the domain service.
*/
public accessRequestsResolve<ThrowOnError extends boolean = false>(options: Options<AccessRequestsResolveData, ThrowOnError>): RequestResult<AccessRequestsResolveResponses, AccessRequestsResolveErrors, ThrowOnError> {
return (options.client ?? this.client).post<AccessRequestsResolveResponses, AccessRequestsResolveErrors, ThrowOnError>({
url: '/entities/{entity_type}/{entity_id}/access-requests/{request_id}/resolve',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Direct access request state through the domain service.
*/
public accessRequestsDirect<ThrowOnError extends boolean = false>(options: Options<AccessRequestsDirectData, ThrowOnError>): RequestResult<AccessRequestsDirectResponses, AccessRequestsDirectErrors, ThrowOnError> {
return (options.client ?? this.client).get<AccessRequestsDirectResponses, AccessRequestsDirectErrors, ThrowOnError>({ url: '/entities/{entity_type}/{entity_id}/direct-access', ...options });
}
/**
* Remove direct access request state through the domain service.
*/
public accessRequestsRemoveDirect<ThrowOnError extends boolean = false>(options: Options<AccessRequestsRemoveDirectData, ThrowOnError>): RequestResult<AccessRequestsRemoveDirectResponses, AccessRequestsRemoveDirectErrors, ThrowOnError> {
return (options.client ?? this.client).delete<AccessRequestsRemoveDirectResponses, AccessRequestsRemoveDirectErrors, ThrowOnError>({ url: '/entities/{entity_type}/{entity_id}/direct-access/{user_id}', ...options });
}
/**
* Set direct access request state through the domain service.
*/
public accessRequestsSetDirect<ThrowOnError extends boolean = false>(options: Options<AccessRequestsSetDirectData, ThrowOnError>): RequestResult<AccessRequestsSetDirectResponses, AccessRequestsSetDirectErrors, ThrowOnError> {
return (options.client ?? this.client).put<AccessRequestsSetDirectResponses, AccessRequestsSetDirectErrors, ThrowOnError>({
url: '/entities/{entity_type}/{entity_id}/direct-access/{user_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Get the current user's permission for a given entity.
*/
public getEntityPermission<ThrowOnError extends boolean = false>(options: Options<GetEntityPermissionData, ThrowOnError>): RequestResult<GetEntityPermissionResponses, GetEntityPermissionErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetEntityPermissionResponses, GetEntityPermissionErrors, ThrowOnError>({ url: '/entity/{entity_type}/{entity_id}/permissions', ...options });
}
/**
* List external chats the caller can view, including without a provider account.
*/
public externalChats<ThrowOnError extends boolean = false>(options?: Options<ExternalChatsData, ThrowOnError>): RequestResult<ExternalChatsResponses, unknown, ThrowOnError> {
return (options?.client ?? this.client).get<ExternalChatsResponses, unknown, ThrowOnError>({ url: '/external-chats', ...options });
}
/**
* Add one of the caller's provider chats as their own external chat.
*/
public externalChatAdd<ThrowOnError extends boolean = false>(options: Options<ExternalChatAddData, ThrowOnError>): RequestResult<ExternalChatAddResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).post<ExternalChatAddResponses, unknown, ThrowOnError>({
url: '/external-chats',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Stop syncing the chat, locally. Owner only, in their own session.
*/
public externalChatRemove<ThrowOnError extends boolean = false>(options: Options<ExternalChatRemoveData, ThrowOnError>): RequestResult<ExternalChatRemoveResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).delete<ExternalChatRemoveResponses, unknown, ThrowOnError>({ url: '/external-chats/{chat_id}', ...options });
}
/**
* An external chat the caller can read.
*/
public externalChat<ThrowOnError extends boolean = false>(options: Options<ExternalChatData, ThrowOnError>): RequestResult<ExternalChatResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).get<ExternalChatResponses, unknown, ThrowOnError>({ url: '/external-chats/{chat_id}', ...options });
}
/**
* Stage one attachment for a later media send in this chat.
*/
public externalChatUpload<ThrowOnError extends boolean = false>(options: Options<ExternalChatUploadData, ThrowOnError>): RequestResult<ExternalChatUploadResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).post<ExternalChatUploadResponses, unknown, ThrowOnError>({
...formDataBodySerializer,
url: '/external-chats/{chat_id}/attachments',
...options,
headers: {
'Content-Type': null,
...options.headers
}
});
}
/**
* The caller's send progress for intents or messages.
*/
public externalChatDelivery<ThrowOnError extends boolean = false>(options: Options<ExternalChatDeliveryData, ThrowOnError>): RequestResult<ExternalChatDeliveryResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).post<ExternalChatDeliveryResponses, unknown, ThrowOnError>({
url: '/external-chats/{chat_id}/delivery',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Newest-first timeline through ordinary view access.
*/
public externalChatMessages<ThrowOnError extends boolean = false>(options: Options<ExternalChatMessagesData, ThrowOnError>): RequestResult<ExternalChatMessagesResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).get<ExternalChatMessagesResponses, unknown, ThrowOnError>({ url: '/external-chats/{chat_id}/messages', ...options });
}
/**
* Attachment states of messages, by message id (at most 100).
*/
public externalChatMessageAttachments<ThrowOnError extends boolean = false>(options: Options<ExternalChatMessageAttachmentsData, ThrowOnError>): RequestResult<ExternalChatMessageAttachmentsResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).post<ExternalChatMessageAttachmentsResponses, unknown, ThrowOnError>({
url: '/external-chats/{chat_id}/messages/attachments',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* One message of the timeline, as the timeline shows it.
*/
public externalChatMessage<ThrowOnError extends boolean = false>(options: Options<ExternalChatMessageData, ThrowOnError>): RequestResult<ExternalChatMessageResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).get<ExternalChatMessageResponses, unknown, ThrowOnError>({ url: '/external-chats/{chat_id}/messages/{message_id}', ...options });
}
/**
* Generic Share dialog policy.
*/
public externalChatPermissions<ThrowOnError extends boolean = false>(options: Options<ExternalChatPermissionsData, ThrowOnError>): RequestResult<ExternalChatPermissionsResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).get<ExternalChatPermissionsResponses, unknown, ThrowOnError>({ url: '/external-chats/{chat_id}/permissions', ...options });
}
/**
* The owner, in their own session, updates link, team and channel sharing.
*/
public externalChatUpdatePermissions<ThrowOnError extends boolean = false>(options: Options<ExternalChatUpdatePermissionsData, ThrowOnError>): RequestResult<ExternalChatUpdatePermissionsResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).patch<ExternalChatUpdatePermissionsResponses, unknown, ThrowOnError>({
url: '/external-chats/{chat_id}/permissions',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Advance this viewer's read position.
*/
public externalChatRead<ThrowOnError extends boolean = false>(options: Options<ExternalChatReadData, ThrowOnError>): RequestResult<ExternalChatReadResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).post<ExternalChatReadResponses, unknown, ThrowOnError>({
url: '/external-chats/{chat_id}/read',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Caller-owned pending, failed and uncertain sends.
*/
public externalChatSends<ThrowOnError extends boolean = false>(options: Options<ExternalChatSendsData, ThrowOnError>): RequestResult<ExternalChatSendsResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).get<ExternalChatSendsResponses, unknown, ThrowOnError>({ url: '/external-chats/{chat_id}/sends', ...options });
}
/**
* Send to the chat from the caller's own provider account (one request per second per user).
*/
public externalChatSend<ThrowOnError extends boolean = false>(options: Options<ExternalChatSendData, ThrowOnError>): RequestResult<ExternalChatSendResponses, ExternalChatSendErrors, ThrowOnError> {
return (options.client ?? this.client).post<ExternalChatSendResponses, ExternalChatSendErrors, ThrowOnError>({
url: '/external-chats/{chat_id}/sends',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* List the caller's favorites.
*/
public listFavorites<ThrowOnError extends boolean = false>(options?: Options<ListFavoritesData, ThrowOnError>): RequestResult<ListFavoritesResponses, ListFavoritesErrors, ThrowOnError> {
return (options?.client ?? this.client).get<ListFavoritesResponses, ListFavoritesErrors, ThrowOnError>({ url: '/favorites', ...options });
}
/**
* Favorite an entity in the caller's collection.
*/
public addFavorite<ThrowOnError extends boolean = false>(options: Options<AddFavoriteData, ThrowOnError>): RequestResult<AddFavoriteResponses, AddFavoriteErrors, ThrowOnError> {
return (options.client ?? this.client).post<AddFavoriteResponses, AddFavoriteErrors, ThrowOnError>({
url: '/favorites',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Persist a manual order for the caller's favorites.
*/
public reorderFavorites<ThrowOnError extends boolean = false>(options: Options<ReorderFavoritesData, ThrowOnError>): RequestResult<ReorderFavoritesResponses, ReorderFavoritesErrors, ThrowOnError> {
return (options.client ?? this.client).patch<ReorderFavoritesResponses, ReorderFavoritesErrors, ThrowOnError>({
url: '/favorites/reorder',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Remove a favorite by entity.
*/
public removeFavoriteByEntity<ThrowOnError extends boolean = false>(options: Options<RemoveFavoriteByEntityData, ThrowOnError>): RequestResult<RemoveFavoriteByEntityResponses, RemoveFavoriteByEntityErrors, ThrowOnError> {
return (options.client ?? this.client).delete<RemoveFavoriteByEntityResponses, RemoveFavoriteByEntityErrors, ThrowOnError>({ url: '/favorites/{entity_type}/{entity_id}', ...options });
}
/**
* Get a visible foreign entity by the identifier its source system assigned.
*
* `foreign_entity_id` is a wildcard path segment: sources store slashes inside
* the identifier, for example `owner/repo/pull/12`.
*
* Authorization matches the by-id route. Internal service callers see every
* record; an authenticated user sees a record only when they have view access
* to it, and records they cannot view are reported as `404` so the route never
* reveals that a mapping exists. Bot tokens are not accepted here — they use
* the by-id route, which mints a bot-scoped receipt.
*/
public getForeignEntityBySource<ThrowOnError extends boolean = false>(options: Options<GetForeignEntityBySourceData, ThrowOnError>): RequestResult<GetForeignEntityBySourceResponses, GetForeignEntityBySourceErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetForeignEntityBySourceResponses, GetForeignEntityBySourceErrors, ThrowOnError>({ url: '/foreign_entity/by_source/{source}/{foreign_entity_id}', ...options });
}
/**
* Get a visible foreign entity by its internal ID.
*/
public getForeignEntity<ThrowOnError extends boolean = false>(options: Options<GetForeignEntityData, ThrowOnError>): RequestResult<GetForeignEntityResponses, GetForeignEntityErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetForeignEntityResponses, GetForeignEntityErrors, ThrowOnError>({ url: '/foreign_entity/{id}', ...options });
}
/**
* The live forms over a database the caller can see, for the grid's chip
* and the delete-table confirmation.
*/
public listForms<ThrowOnError extends boolean = false>(options: Options<ListFormsData, ThrowOnError>): RequestResult<ListFormsResponses, ListFormsErrors, ThrowOnError> {
return (options.client ?? this.client).get<ListFormsResponses, ListFormsErrors, ThrowOnError>({ url: '/forms', ...options });
}
/**
* Create a form owned by the caller: over a new database named like it, or
* over an existing table of a database the caller owns. Database Edit is
* not enough to attach a form: the form's editors gain Edit on the
* database through it.
*/
public createForm<ThrowOnError extends boolean = false>(options: Options<CreateFormData, ThrowOnError>): RequestResult<CreateFormResponses, CreateFormErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateFormResponses, CreateFormErrors, ThrowOnError>({
url: '/forms',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Every live form the caller holds a grant on, newest first, with their
* level: what Drive and Quick Access list. Public forms reached only by
* their link are not listed.
*/
public listAccessibleForms<ThrowOnError extends boolean = false>(options?: Options<ListAccessibleFormsData, ThrowOnError>): RequestResult<ListAccessibleFormsResponses, ListAccessibleFormsErrors, ThrowOnError> {
return (options?.client ?? this.client).get<ListAccessibleFormsResponses, ListAccessibleFormsErrors, ThrowOnError>({ url: '/forms/accessible', ...options });
}
/**
* A form with its layout, each question joined with its column's title,
* type and options. Never rows. Readable by anyone when the form is public.
*/
public getForm<ThrowOnError extends boolean = false>(options: Options<GetFormData, ThrowOnError>): RequestResult<GetFormResponses, GetFormErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetFormResponses, GetFormErrors, ThrowOnError>({ url: '/forms/{id}', ...options });
}
/**
* Change a form's facts. The description and confirmation message take
* edit; who responds, open or closed, the closing time and tallies take
* its owner.
*/
public updateForm<ThrowOnError extends boolean = false>(options: Options<UpdateFormData, ThrowOnError>): RequestResult<UpdateFormResponses, UpdateFormErrors, ThrowOnError> {
return (options.client ?? this.client).patch<UpdateFormResponses, UpdateFormErrors, ThrowOnError>({
url: '/forms/{id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Open the editor-only collaborative layout, or publish its latest valid
* revision. Content stays in the existing collaboration surface.
*/
public collaborateForm<ThrowOnError extends boolean = false>(options: Options<CollaborateFormData, ThrowOnError>): RequestResult<CollaborateFormResponses, CollaborateFormErrors, ThrowOnError> {
return (options.client ?? this.client).post<CollaborateFormResponses, CollaborateFormErrors, ThrowOnError>({ url: '/forms/{id}/collaboration', ...options });
}
/**
* Save a validated replacement in the shared layout and report publication.
* A 200 response with `publicationError` means the draft is saved, while
* respondents still see `detail`. Retrying collaboration retries publication.
*/
public putFormLayout<ThrowOnError extends boolean = false>(options: Options<PutFormLayoutData, ThrowOnError>): RequestResult<PutFormLayoutResponses, PutFormLayoutErrors, ThrowOnError> {
return (options.client ?? this.client).put<PutFormLayoutResponses, PutFormLayoutErrors, ThrowOnError>({
url: '/forms/{id}/layout',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* A form's recipients, for its owner. Link and team sharing are always
* `null`: a form's public audience is its own setting.
*/
public getFormPermissions<ThrowOnError extends boolean = false>(options: Options<GetFormPermissionsData, ThrowOnError>): RequestResult<GetFormPermissionsResponses, GetFormPermissionsErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetFormPermissionsResponses, GetFormPermissionsErrors, ThrowOnError>({ url: '/forms/{id}/permissions', ...options });
}
/**
* Change a form's channel recipients, for its owner. Turning on link or
* team sharing is refused.
*/
public updateFormPermissions<ThrowOnError extends boolean = false>(options: Options<UpdateFormPermissionsData, ThrowOnError>): RequestResult<UpdateFormPermissionsResponses, UpdateFormPermissionsErrors, ThrowOnError> {
return (options.client ?? this.client).patch<UpdateFormPermissionsResponses, UpdateFormPermissionsErrors, ThrowOnError>({
url: '/forms/{id}/permissions',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Respond to a form. A gate that stops the response answers `stopped` and
* writes nothing to the table. A public form takes anonymous responses.
*/
public submitFormResponse<ThrowOnError extends boolean = false>(options: Options<SubmitFormResponseData, ThrowOnError>): RequestResult<SubmitFormResponseResponses, SubmitFormResponseErrors, ThrowOnError> {
return (options.client ?? this.client).post<SubmitFormResponseResponses, SubmitFormResponseErrors, ThrowOnError>({
url: '/forms/{id}/responses',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* The signed-in caller's own response, with the row's current cells.
*/
public getMyFormResponse<ThrowOnError extends boolean = false>(options: Options<GetMyFormResponseData, ThrowOnError>): RequestResult<GetMyFormResponseResponses, GetMyFormResponseErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetMyFormResponseResponses, GetMyFormResponseErrors, ThrowOnError>({ url: '/forms/{id}/responses/mine', ...options });
}
/**
* Replace the signed-in caller's answers while the form is open. A gate
* that stops the edit leaves the saved response as it was.
*/
public editMyFormResponse<ThrowOnError extends boolean = false>(options: Options<EditMyFormResponseData, ThrowOnError>): RequestResult<EditMyFormResponseResponses, EditMyFormResponseErrors, ThrowOnError> {
return (options.client ?? this.client).put<EditMyFormResponseResponses, EditMyFormResponseErrors, ThrowOnError>({
url: '/forms/{id}/responses/mine',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Response counts for the form's editors.
*/
public getFormResponseSummary<ThrowOnError extends boolean = false>(options: Options<GetFormResponseSummaryData, ThrowOnError>): RequestResult<GetFormResponseSummaryResponses, GetFormResponseSummaryErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetFormResponseSummaryResponses, GetFormResponseSummaryErrors, ThrowOnError>({ url: '/forms/{id}/responses/summary', ...options });
}
/**
* Option counts of the form's choice questions: for respondents when the
* owner shows them, for editors always.
*/
public getFormTally<ThrowOnError extends boolean = false>(options: Options<GetFormTallyData, ThrowOnError>): RequestResult<GetFormTallyResponses, GetFormTallyErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetFormTallyResponses, GetFormTallyErrors, ThrowOnError>({ url: '/forms/{id}/tally', ...options });
}
/**
* Redirects an authenticated user to the github sync app installation page.
*/
public installSync<ThrowOnError extends boolean = false>(options?: Options<InstallSyncData, ThrowOnError>): RequestResult<unknown, InstallSyncErrors, ThrowOnError> {
return (options?.client ?? this.client).get<unknown, InstallSyncErrors, ThrowOnError>({ url: '/github/install-sync', ...options });
}
/**
* List the repositories and authors among the GitHub pull requests visible to the caller.
*/
public getGithubPullRequestFacets<ThrowOnError extends boolean = false>(options?: Options<GetGithubPullRequestFacetsData, ThrowOnError>): RequestResult<GetGithubPullRequestFacetsResponses, GetGithubPullRequestFacetsErrors, ThrowOnError> {
return (options?.client ?? this.client).get<GetGithubPullRequestFacetsResponses, GetGithubPullRequestFacetsErrors, ThrowOnError>({ url: '/github_pull_requests/facets', ...options });
}
/**
* Get the pull request behind a foreign entity record the caller can view.
*/
public getGithubPullRequest<ThrowOnError extends boolean = false>(options: Options<GetGithubPullRequestData, ThrowOnError>): RequestResult<GetGithubPullRequestResponses, GetGithubPullRequestErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetGithubPullRequestResponses, GetGithubPullRequestErrors, ThrowOnError>({ url: '/github_pull_requests/{id}', ...options });
}
/**
* Get the changes of the pull request behind a foreign entity record the caller can view.
*/
public getGithubPullRequestChanges<ThrowOnError extends boolean = false>(options: Options<GetGithubPullRequestChangesData, ThrowOnError>): RequestResult<GetGithubPullRequestChangesResponses, GetGithubPullRequestChangesErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetGithubPullRequestChangesResponses, GetGithubPullRequestChangesErrors, ThrowOnError>({ url: '/github_pull_requests/{id}/changes', ...options });
}
/**
* Get the patch of changes of the pull request behind a foreign entity record the caller can
* view.
*/
public getGithubPullRequestChangesPatch<ThrowOnError extends boolean = false>(options: Options<GetGithubPullRequestChangesPatchData, ThrowOnError>): RequestResult<GetGithubPullRequestChangesPatchResponses, GetGithubPullRequestChangesPatchErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetGithubPullRequestChangesPatchResponses, GetGithubPullRequestChangesPatchErrors, ThrowOnError>({ url: '/github_pull_requests/{id}/changes/patch', ...options });
}
/**
* Handler for `POST /harness-pairings`.
*
* Unauthenticated by design: the daemon has no credential yet - obtaining one
* is the point. The pairing releases nothing until a signed-in user approves
* it, and creation is throttled in the domain service.
*/
public createHarnessPairing<ThrowOnError extends boolean = false>(options: Options<CreateHarnessPairingData, ThrowOnError>): RequestResult<CreateHarnessPairingResponses, CreateHarnessPairingErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateHarnessPairingResponses, CreateHarnessPairingErrors, ThrowOnError>({
url: '/harness-pairings',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `GET /harness-pairings/{code}`.
*/
public getHarnessPairing<ThrowOnError extends boolean = false>(options: Options<GetHarnessPairingData, ThrowOnError>): RequestResult<GetHarnessPairingResponses, GetHarnessPairingErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetHarnessPairingResponses, GetHarnessPairingErrors, ThrowOnError>({ url: '/harness-pairings/{code}', ...options });
}
/**
* Handler for `POST /harness-pairings/{code}/approve`.
*/
public approveHarnessPairing<ThrowOnError extends boolean = false>(options: Options<ApproveHarnessPairingData, ThrowOnError>): RequestResult<ApproveHarnessPairingResponses, ApproveHarnessPairingErrors, ThrowOnError> {
return (options.client ?? this.client).post<ApproveHarnessPairingResponses, ApproveHarnessPairingErrors, ThrowOnError>({
url: '/harness-pairings/{code}/approve',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `POST /harness-pairings/{pairing_id}/claim`.
*
* Unauthenticated like pairing creation; the device secret minted alongside
* the pairing is the credential, and the pairing id (not the short user
* code) addresses it.
*/
public claimHarnessPairing<ThrowOnError extends boolean = false>(options: Options<ClaimHarnessPairingData, ThrowOnError>): RequestResult<ClaimHarnessPairingResponses, ClaimHarnessPairingErrors, ThrowOnError> {
return (options.client ?? this.client).post<ClaimHarnessPairingResponses, ClaimHarnessPairingErrors, ThrowOnError>({
url: '/harness-pairings/{pairing_id}/claim',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Handler for `GET /harnesses`.
*/
public listHarnesses<ThrowOnError extends boolean = false>(options?: Options<ListHarnessesData, ThrowOnError>): RequestResult<ListHarnessesResponses, ListHarnessesErrors, ThrowOnError> {
return (options?.client ?? this.client).get<ListHarnessesResponses, ListHarnessesErrors, ThrowOnError>({ url: '/harnesses', ...options });
}
/**
* Handler for `DELETE /harnesses/me`.
*
* A daemon retiring itself: the valid credential is the authorization.
*/
public deleteSelfHarness<ThrowOnError extends boolean = false>(options?: Options<DeleteSelfHarnessData, ThrowOnError>): RequestResult<DeleteSelfHarnessResponses, DeleteSelfHarnessErrors, ThrowOnError> {
return (options?.client ?? this.client).delete<DeleteSelfHarnessResponses, DeleteSelfHarnessErrors, ThrowOnError>({ url: '/harnesses/me', ...options });
}
/**
* Handler for `GET /harnesses/me`.
*/
public getSelfHarness<ThrowOnError extends boolean = false>(options?: Options<GetSelfHarnessData, ThrowOnError>): RequestResult<GetSelfHarnessResponses, GetSelfHarnessErrors, ThrowOnError> {
return (options?.client ?? this.client).get<GetSelfHarnessResponses, GetSelfHarnessErrors, ThrowOnError>({ url: '/harnesses/me', ...options });
}
/**
* Handler for `GET /harnesses/me/agents`.
*/
public listHarnessAgents<ThrowOnError extends boolean = false>(options?: Options<ListHarnessAgentsData, ThrowOnError>): RequestResult<ListHarnessAgentsResponses, ListHarnessAgentsErrors, ThrowOnError> {
return (options?.client ?? this.client).get<ListHarnessAgentsResponses, ListHarnessAgentsErrors, ThrowOnError>({ url: '/harnesses/me/agents', ...options });
}
/**
* Handler for `GET /harnesses/me/sessions`.
*/
public listHarnessSessions<ThrowOnError extends boolean = false>(options?: Options<ListHarnessSessionsData, ThrowOnError>): RequestResult<ListHarnessSessionsResponses, ListHarnessSessionsErrors, ThrowOnError> {
return (options?.client ?? this.client).get<ListHarnessSessionsResponses, ListHarnessSessionsErrors, ThrowOnError>({ url: '/harnesses/me/sessions', ...options });
}
/**
* Handler for `DELETE /harnesses/{harness_id}`.
*/
public deleteHarness<ThrowOnError extends boolean = false>(options: Options<DeleteHarnessData, ThrowOnError>): RequestResult<DeleteHarnessResponses, DeleteHarnessErrors, ThrowOnError> {
return (options.client ?? this.client).delete<DeleteHarnessResponses, DeleteHarnessErrors, ThrowOnError>({ url: '/harnesses/{harness_id}', ...options });
}
/**
* Handler for `PATCH /harnesses/{harness_id}`.
*/
public patchHarness<ThrowOnError extends boolean = false>(options: Options<PatchHarnessData, ThrowOnError>): RequestResult<PatchHarnessResponses, PatchHarnessErrors, ThrowOnError> {
return (options.client ?? this.client).patch<PatchHarnessResponses, PatchHarnessErrors, ThrowOnError>({
url: '/harnesses/{harness_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Health check
*/
public healthHandler<ThrowOnError extends boolean = false>(options?: Options<HealthHandlerData, ThrowOnError>): RequestResult<HealthHandlerResponses, unknown, ThrowOnError> {
return (options?.client ?? this.client).get<HealthHandlerResponses, unknown, ThrowOnError>({ url: '/health', ...options });
}
/**
* Gets the users history
*/
public getHistoryHandler<ThrowOnError extends boolean = false>(options?: Options<GetHistoryHandlerData, ThrowOnError>): RequestResult<GetHistoryHandlerResponses, GetHistoryHandlerErrors, ThrowOnError> {
return (options?.client ?? this.client).get<GetHistoryHandlerResponses, GetHistoryHandlerErrors, ThrowOnError>({ url: '/history', ...options });
}
/**
* Deletes an item from the user's history
*/
public deleteHistoryHandler<ThrowOnError extends boolean = false>(options: Options<DeleteHistoryHandlerData, ThrowOnError>): RequestResult<DeleteHistoryHandlerResponses, DeleteHistoryHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).delete<DeleteHistoryHandlerResponses, DeleteHistoryHandlerErrors, ThrowOnError>({ url: '/history/{item_type}/{item_id}', ...options });
}
/**
* Upserts an item into the user's history and performs other necessary tracking actions
*/
public upsertHistoryHandler<ThrowOnError extends boolean = false>(options: Options<UpsertHistoryHandlerData, ThrowOnError>): RequestResult<UpsertHistoryHandlerResponses, UpsertHistoryHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).post<UpsertHistoryHandlerResponses, UpsertHistoryHandlerErrors, ThrowOnError>({ url: '/history/{item_type}/{item_id}', ...options });
}
/**
* List initiatives the caller can view.
*/
public listInitiatives<ThrowOnError extends boolean = false>(options?: Options<ListInitiativesData, ThrowOnError>): RequestResult<ListInitiativesResponses, ListInitiativesErrors, ThrowOnError> {
return (options?.client ?? this.client).get<ListInitiativesResponses, ListInitiativesErrors, ThrowOnError>({ url: '/initiatives', ...options });
}
/**
* Create an initiative owned by the caller.
*/
public createInitiative<ThrowOnError extends boolean = false>(options: Options<CreateInitiativeData, ThrowOnError>): RequestResult<CreateInitiativeResponses, CreateInitiativeErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateInitiativeResponses, CreateInitiativeErrors, ThrowOnError>({
url: '/initiatives',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Delete the initiative the caller owns.
*/
public deleteInitiative<ThrowOnError extends boolean = false>(options: Options<DeleteInitiativeData, ThrowOnError>): RequestResult<DeleteInitiativeResponses, DeleteInitiativeErrors, ThrowOnError> {
return (options.client ?? this.client).delete<DeleteInitiativeResponses, DeleteInitiativeErrors, ThrowOnError>({ url: '/initiatives/{initiative_id}', ...options });
}
/**
* Fetch one initiative the caller can view.
*/
public getInitiative<ThrowOnError extends boolean = false>(options: Options<GetInitiativeData, ThrowOnError>): RequestResult<GetInitiativeResponses, GetInitiativeErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetInitiativeResponses, GetInitiativeErrors, ThrowOnError>({ url: '/initiatives/{initiative_id}', ...options });
}
/**
* Update fields the caller can edit.
*/
public updateInitiative<ThrowOnError extends boolean = false>(options: Options<UpdateInitiativeData, ThrowOnError>): RequestResult<UpdateInitiativeResponses, UpdateInitiativeErrors, ThrowOnError> {
return (options.client ?? this.client).patch<UpdateInitiativeResponses, UpdateInitiativeErrors, ThrowOnError>({
url: '/initiatives/{initiative_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Gets the instructions document for the current user
*/
public getInstructionsHandler<ThrowOnError extends boolean = false>(options?: Options<GetInstructionsHandlerData, ThrowOnError>): RequestResult<GetInstructionsHandlerResponses, GetInstructionsHandlerErrors, ThrowOnError> {
return (options?.client ?? this.client).get<GetInstructionsHandlerResponses, GetInstructionsHandlerErrors, ThrowOnError>({ url: '/instructions', ...options });
}
/**
* Creates an instructions document for the current user
*/
public createInstructionsHandler<ThrowOnError extends boolean = false>(options?: Options<CreateInstructionsHandlerData, ThrowOnError>): RequestResult<CreateInstructionsHandlerResponses, CreateInstructionsHandlerErrors, ThrowOnError> {
return (options?.client ?? this.client).post<CreateInstructionsHandlerResponses, CreateInstructionsHandlerErrors, ThrowOnError>({ url: '/instructions', ...options });
}
/**
* Gets the items the user has access to
*/
public getItemsSoup<ThrowOnError extends boolean = false>(options?: Options<GetItemsSoupData, ThrowOnError>): RequestResult<GetItemsSoupResponses, GetItemsSoupErrors, ThrowOnError> {
return (options?.client ?? this.client).get<GetItemsSoupResponses, GetItemsSoupErrors, ThrowOnError>({ url: '/items/soup', ...options });
}
/**
* Gets the items the user has access to
*/
public postItemsSoup<ThrowOnError extends boolean = false>(options: Options<PostItemsSoupData, ThrowOnError>): RequestResult<PostItemsSoupResponses, PostItemsSoupErrors, ThrowOnError> {
return (options.client ?? this.client).post<PostItemsSoupResponses, PostItemsSoupErrors, ThrowOnError>({
url: '/items/soup',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Gets the items the user has access to using AST filters
*/
public postItemsSoupAst<ThrowOnError extends boolean = false>(options: Options<PostItemsSoupAstData, ThrowOnError>): RequestResult<PostItemsSoupAstResponses, PostItemsSoupAstErrors, ThrowOnError> {
return (options.client ?? this.client).post<PostItemsSoupAstResponses, PostItemsSoupAstErrors, ThrowOnError>({
url: '/items/soup/ast',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Gets the items grouped by the specified field using AST filters.
*/
public postItemsSoupAstGrouped<ThrowOnError extends boolean = false>(options: Options<PostItemsSoupAstGroupedData, ThrowOnError>): RequestResult<PostItemsSoupAstGroupedResponses, PostItemsSoupAstGroupedErrors, ThrowOnError> {
return (options.client ?? this.client).post<PostItemsSoupAstGroupedResponses, PostItemsSoupAstGroupedErrors, ThrowOnError>({
url: '/items/soup/ast/grouped',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Read a bounded timeline with lazy thread previews.
*/
public messageTimeline<ThrowOnError extends boolean = false>(options: Options<MessageTimelineData, ThrowOnError>): RequestResult<MessageTimelineResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).get<MessageTimelineResponses, unknown, ThrowOnError>({ url: '/messages/{parent_type}/{parent_id}', ...options });
}
/**
* Create a root message or reply.
*/
public entityMessageCreate<ThrowOnError extends boolean = false>(options: Options<EntityMessageCreateData, ThrowOnError>): RequestResult<EntityMessageCreateResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).post<EntityMessageCreateResponses, unknown, ThrowOnError>({
url: '/messages/{parent_type}/{parent_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Tombstone one message; deleting a discussion's root deletes the discussion.
*/
public entityMessageDeleteMessage<ThrowOnError extends boolean = false>(options: Options<EntityMessageDeleteMessageData, ThrowOnError>): RequestResult<EntityMessageDeleteMessageResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).delete<EntityMessageDeleteMessageResponses, unknown, ThrowOnError>({ url: '/messages/{parent_type}/{parent_id}/items/{id}', ...options });
}
/**
* Resolve a message within its parent.
*/
public entityMessageGetMessage<ThrowOnError extends boolean = false>(options: Options<EntityMessageGetMessageData, ThrowOnError>): RequestResult<EntityMessageGetMessageResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).get<EntityMessageGetMessageResponses, unknown, ThrowOnError>({ url: '/messages/{parent_type}/{parent_id}/items/{id}', ...options });
}
/**
* Edit an owned message.
*/
public entityMessageEdit<ThrowOnError extends boolean = false>(options: Options<EntityMessageEditData, ThrowOnError>): RequestResult<EntityMessageEditResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).patch<EntityMessageEditResponses, unknown, ThrowOnError>({
url: '/messages/{parent_type}/{parent_id}/items/{id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Change the caller's reaction.
*/
public entityMessageReact<ThrowOnError extends boolean = false>(options: Options<EntityMessageReactData, ThrowOnError>): RequestResult<EntityMessageReactResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).post<EntityMessageReactResponses, unknown, ThrowOnError>({
url: '/messages/{parent_type}/{parent_id}/items/{id}/reactions',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Resolve an old link under current parent permissions.
*/
public entityMessageLegacy<ThrowOnError extends boolean = false>(options: Options<EntityMessageLegacyData, ThrowOnError>): RequestResult<EntityMessageLegacyResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).get<EntityMessageLegacyResponses, unknown, ThrowOnError>({ url: '/messages/{parent_type}/{parent_id}/legacy/{legacy_id}', ...options });
}
/**
* Explicitly remove a discussion.
*/
public entityMessageDeleteThread<ThrowOnError extends boolean = false>(options: Options<EntityMessageDeleteThreadData, ThrowOnError>): RequestResult<EntityMessageDeleteThreadResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).delete<EntityMessageDeleteThreadResponses, unknown, ThrowOnError>({ url: '/messages/{parent_type}/{parent_id}/threads/{id}', ...options });
}
/**
* Open a specific discussion from a link or annotation.
*/
public entityMessageGetThread<ThrowOnError extends boolean = false>(options: Options<EntityMessageGetThreadData, ThrowOnError>): RequestResult<EntityMessageGetThreadResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).get<EntityMessageGetThreadResponses, unknown, ThrowOnError>({ url: '/messages/{parent_type}/{parent_id}/threads/{id}', ...options });
}
/**
* Update a discussion's lifecycle and placement.
*/
public entityMessagePatchThread<ThrowOnError extends boolean = false>(options: Options<EntityMessagePatchThreadData, ThrowOnError>): RequestResult<EntityMessagePatchThreadResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).patch<EntityMessagePatchThreadResponses, unknown, ThrowOnError>({
url: '/messages/{parent_type}/{parent_id}/threads/{id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Read a bounded window of messages and the parent's activity, ordered by the server.
*/
public messageTimelineEntries<ThrowOnError extends boolean = false>(options: Options<MessageTimelineEntriesData, ThrowOnError>): RequestResult<MessageTimelineEntriesResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).get<MessageTimelineEntriesResponses, unknown, ThrowOnError>({ url: '/messages/{parent_type}/{parent_id}/timeline', ...options });
}
/**
* Broadcast typing within an authorized discussion.
*/
public entityMessageTyping<ThrowOnError extends boolean = false>(options: Options<EntityMessageTypingData, ThrowOnError>): RequestResult<EntityMessageTypingResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).post<EntityMessageTypingResponses, unknown, ThrowOnError>({
url: '/messages/{parent_type}/{parent_id}/typing',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Gets the users pinned items
*/
public getPinsHandler<ThrowOnError extends boolean = false>(options?: Options<GetPinsHandlerData, ThrowOnError>): RequestResult<GetPinsHandlerResponses, GetPinsHandlerErrors, ThrowOnError> {
return (options?.client ?? this.client).get<GetPinsHandlerResponses, GetPinsHandlerErrors, ThrowOnError>({ url: '/pins', ...options });
}
/**
* Saves the updated order of the pins for the user
*/
public reorderPinsHandler<ThrowOnError extends boolean = false>(options: Options<ReorderPinsHandlerData, ThrowOnError>): RequestResult<ReorderPinsHandlerResponses, ReorderPinsHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).patch<ReorderPinsHandlerResponses, ReorderPinsHandlerErrors, ThrowOnError>({
url: '/pins',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Deletes the pin for the user
*/
public removePinHandler<ThrowOnError extends boolean = false>(options: Options<RemovePinHandlerData, ThrowOnError>): RequestResult<RemovePinHandlerResponses, RemovePinHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).delete<RemovePinHandlerResponses, RemovePinHandlerErrors, ThrowOnError>({
url: '/pins/{pinned_item_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Pins the item for the user
*/
public addPinHandler<ThrowOnError extends boolean = false>(options: Options<AddPinHandlerData, ThrowOnError>): RequestResult<AddPinHandlerResponses, AddPinHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).post<AddPinHandlerResponses, AddPinHandlerErrors, ThrowOnError>({
url: '/pins/{pinned_item_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* List projects visible to the authenticated user.
*/
public getProjectsHandler<ThrowOnError extends boolean = false>(options?: Options<GetProjectsHandlerData, ThrowOnError>): RequestResult<GetProjectsHandlerResponses, GetProjectsHandlerErrors, ThrowOnError> {
return (options?.client ?? this.client).get<GetProjectsHandlerResponses, GetProjectsHandlerErrors, ThrowOnError>({ url: '/projects', ...options });
}
/**
* Create a project, optionally beneath an existing project.
*/
public createProjectHandler<ThrowOnError extends boolean = false>(options: Options<CreateProjectHandlerData, ThrowOnError>): RequestResult<CreateProjectHandlerResponses, CreateProjectHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateProjectHandlerResponses, CreateProjectHandlerErrors, ThrowOnError>({
url: '/projects',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* List pending root projects owned by the authenticated user.
*/
public getPendingProjectsHandler<ThrowOnError extends boolean = false>(options?: Options<GetPendingProjectsHandlerData, ThrowOnError>): RequestResult<GetPendingProjectsHandlerResponses, GetPendingProjectsHandlerErrors, ThrowOnError> {
return (options?.client ?? this.client).get<GetPendingProjectsHandlerResponses, GetPendingProjectsHandlerErrors, ThrowOnError>({ url: '/projects/pending', ...options });
}
/**
* Get previews for a batch of project IDs.
*/
public getBatchProjectPreview<ThrowOnError extends boolean = false>(options: Options<GetBatchProjectPreviewData, ThrowOnError>): RequestResult<GetBatchProjectPreviewResponses, GetBatchProjectPreviewErrors, ThrowOnError> {
return (options.client ?? this.client).post<GetBatchProjectPreviewResponses, GetBatchProjectPreviewErrors, ThrowOnError>({
url: '/projects/preview',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Upload a folder tree and create its upload destinations.
*/
public uploadFolderHandler<ThrowOnError extends boolean = false>(options: Options<UploadFolderHandlerData, ThrowOnError>): RequestResult<UploadFolderHandlerResponses, UploadFolderHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).post<UploadFolderHandlerResponses, UploadFolderHandlerErrors, ThrowOnError>({
url: '/projects/upload',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Create a request for extracting an uploaded folder archive.
*/
public uploadExtractFolderHandler<ThrowOnError extends boolean = false>(options: Options<UploadExtractFolderHandlerData, ThrowOnError>): RequestResult<UploadExtractFolderHandlerResponses, UploadExtractFolderHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).post<UploadExtractFolderHandlerResponses, UploadExtractFolderHandlerErrors, ThrowOnError>({
url: '/projects/upload_extract',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Soft-delete a project and all of its children.
*/
public deleteProjectHandler<ThrowOnError extends boolean = false>(options: Options<DeleteProjectHandlerData, ThrowOnError>): RequestResult<DeleteProjectHandlerResponses, DeleteProjectHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).delete<DeleteProjectHandlerResponses, DeleteProjectHandlerErrors, ThrowOnError>({ url: '/projects/{id}', ...options });
}
/**
* Get project metadata.
*/
public getProjectHandler<ThrowOnError extends boolean = false>(options: Options<GetProjectHandlerData, ThrowOnError>): RequestResult<GetProjectHandlerResponses, GetProjectHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetProjectHandlerResponses, GetProjectHandlerErrors, ThrowOnError>({ url: '/projects/{id}', ...options });
}
/**
* Get the caller's project access level.
*/
public getProjectUserAccessLevel<ThrowOnError extends boolean = false>(options: Options<GetProjectUserAccessLevelData, ThrowOnError>): RequestResult<GetProjectUserAccessLevelResponses, GetProjectUserAccessLevelErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetProjectUserAccessLevelResponses, GetProjectUserAccessLevelErrors, ThrowOnError>({ url: '/projects/{id}/access_level', ...options });
}
/**
* Get a project's immediate children.
*/
public getProjectContentHandler<ThrowOnError extends boolean = false>(options: Options<GetProjectContentHandlerData, ThrowOnError>): RequestResult<GetProjectContentHandlerResponses, GetProjectContentHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetProjectContentHandlerResponses, GetProjectContentHandlerErrors, ThrowOnError>({ url: '/projects/{id}/content', ...options });
}
/**
* Permanently delete a soft-deleted project and all of its children.
*/
public permanentlyDeleteProject<ThrowOnError extends boolean = false>(options: Options<PermanentlyDeleteProjectData, ThrowOnError>): RequestResult<PermanentlyDeleteProjectResponses, PermanentlyDeleteProjectErrors, ThrowOnError> {
return (options.client ?? this.client).delete<PermanentlyDeleteProjectResponses, PermanentlyDeleteProjectErrors, ThrowOnError>({ url: '/projects/{id}/permanent', ...options });
}
/**
* Get a project's share permissions.
*/
public getProjectPermissionsV2<ThrowOnError extends boolean = false>(options: Options<GetProjectPermissionsV2Data, ThrowOnError>): RequestResult<GetProjectPermissionsV2Responses, GetProjectPermissionsV2Errors, ThrowOnError> {
return (options.client ?? this.client).get<GetProjectPermissionsV2Responses, GetProjectPermissionsV2Errors, ThrowOnError>({ url: '/projects/{id}/permissions', ...options });
}
/**
* Restore a soft-deleted project and its children.
*/
public revertDeleteProject<ThrowOnError extends boolean = false>(options: Options<RevertDeleteProjectData, ThrowOnError>): RequestResult<RevertDeleteProjectResponses, RevertDeleteProjectErrors, ThrowOnError> {
return (options.client ?? this.client).put<RevertDeleteProjectResponses, RevertDeleteProjectErrors, ThrowOnError>({ url: '/projects/{id}/revert_delete', ...options });
}
/**
* Gets the users recently deleted items.
*/
public recentlyDeleted<ThrowOnError extends boolean = false>(options?: Options<RecentlyDeletedData, ThrowOnError>): RequestResult<RecentlyDeletedResponses, RecentlyDeletedErrors, ThrowOnError> {
return (options?.client ?? this.client).get<RecentlyDeletedResponses, RecentlyDeletedErrors, ThrowOnError>({ url: '/recents/deleted', ...options });
}
/**
* List original email threads with caller-private reminder work.
*/
public listEmailReminders<ThrowOnError extends boolean = false>(options?: Options<ListEmailRemindersData, ThrowOnError>): RequestResult<ListEmailRemindersResponses, ListEmailRemindersErrors, ThrowOnError> {
return (options?.client ?? this.client).get<ListEmailRemindersResponses, ListEmailRemindersErrors, ThrowOnError>({ url: '/reminders/email/collection', ...options });
}
/**
* Read an email follow-up and reconcile inbound reply cancellation.
*/
public getEmailFollowup<ThrowOnError extends boolean = false>(options: Options<GetEmailFollowupData, ThrowOnError>): RequestResult<GetEmailFollowupResponses, GetEmailFollowupErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetEmailFollowupResponses, GetEmailFollowupErrors, ThrowOnError>({ url: '/reminders/email/{thread_id}', ...options });
}
/**
* Schedule, edit or remove one email follow-up as an idempotent operation.
*/
public setEmailFollowup<ThrowOnError extends boolean = false>(options: Options<SetEmailFollowupData, ThrowOnError>): RequestResult<SetEmailFollowupResponses, SetEmailFollowupErrors, ThrowOnError> {
return (options.client ?? this.client).put<SetEmailFollowupResponses, SetEmailFollowupErrors, ThrowOnError>({
url: '/reminders/email/{thread_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
public getViewsHandler<ThrowOnError extends boolean = false>(options?: Options<GetViewsHandlerData, ThrowOnError>): RequestResult<GetViewsHandlerResponses, GetViewsHandlerErrors, ThrowOnError> {
return (options?.client ?? this.client).get<GetViewsHandlerResponses, GetViewsHandlerErrors, ThrowOnError>({ url: '/saved_views', ...options });
}
public createViewHandler<ThrowOnError extends boolean = false>(options: Options<CreateViewHandlerData, ThrowOnError>): RequestResult<CreateViewHandlerResponses, CreateViewHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateViewHandlerResponses, CreateViewHandlerErrors, ThrowOnError>({
url: '/saved_views',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
public excludeDefaultViewHandler<ThrowOnError extends boolean = false>(options: Options<ExcludeDefaultViewHandlerData, ThrowOnError>): RequestResult<ExcludeDefaultViewHandlerResponses, ExcludeDefaultViewHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).post<ExcludeDefaultViewHandlerResponses, ExcludeDefaultViewHandlerErrors, ThrowOnError>({
url: '/saved_views/exclude_default',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
public deleteViewHandler<ThrowOnError extends boolean = false>(options: Options<DeleteViewHandlerData, ThrowOnError>): RequestResult<DeleteViewHandlerResponses, DeleteViewHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).delete<DeleteViewHandlerResponses, DeleteViewHandlerErrors, ThrowOnError>({ url: '/saved_views/{saved_view_id}', ...options });
}
public patchViewHandler<ThrowOnError extends boolean = false>(options: Options<PatchViewHandlerData, ThrowOnError>): RequestResult<PatchViewHandlerResponses, PatchViewHandlerErrors, ThrowOnError> {
return (options.client ?? this.client).patch<PatchViewHandlerResponses, PatchViewHandlerErrors, ThrowOnError>({
url: '/saved_views/{saved_view_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* List this administrator's team receipts, effective server limits and source binding.
*/
public listSlackImports<ThrowOnError extends boolean = false>(options?: Options<ListSlackImportsData, ThrowOnError>): RequestResult<ListSlackImportsResponses, unknown, ThrowOnError> {
return (options?.client ?? this.client).get<ListSlackImportsResponses, unknown, ThrowOnError>({ url: '/slack/imports', ...options });
}
/**
* Create or replay a job using a scoped idempotency token and full selected metadata.
* Missing creation timestamps and unknown message counts are represented as null.
*/
public createSlackImport<ThrowOnError extends boolean = false>(options: Options<CreateSlackImportData, ThrowOnError>): RequestResult<CreateSlackImportResponses, CreateSlackImportErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateSlackImportResponses, CreateSlackImportErrors, ThrowOnError>({
url: '/slack/imports',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Read sanitized progress; foreign jobs are indistinguishable from missing jobs.
*/
public getSlackImport<ThrowOnError extends boolean = false>(options: Options<GetSlackImportData, ThrowOnError>): RequestResult<GetSlackImportResponses, GetSlackImportErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetSlackImportResponses, GetSlackImportErrors, ThrowOnError>({ url: '/slack/imports/{job_id}', ...options });
}
/**
* Stop unclaimed work. Active leases may settle; cancellation does not roll back history.
*/
public cancelSlackImport<ThrowOnError extends boolean = false>(options: Options<CancelSlackImportData, ThrowOnError>): RequestResult<CancelSlackImportResponses, CancelSlackImportErrors, ThrowOnError> {
return (options.client ?? this.client).post<CancelSlackImportResponses, CancelSlackImportErrors, ThrowOnError>({ url: '/slack/imports/{job_id}/cancel', ...options });
}
/**
* Close registration idempotently; never-ready conversations are skipped, not queued work.
*/
public finalizeSlackImport<ThrowOnError extends boolean = false>(options: Options<FinalizeSlackImportData, ThrowOnError>): RequestResult<FinalizeSlackImportResponses, FinalizeSlackImportErrors, ThrowOnError> {
return (options.client ?? this.client).post<FinalizeSlackImportResponses, FinalizeSlackImportErrors, ThrowOnError>({ url: '/slack/imports/{job_id}/finalize', ...options });
}
/**
* Issue short-lived, checksum/length-bound, create-only PUT grants. Do not log or persist URLs.
* Retry a PUT returning 412 by completing/verifying the existing object, not overwriting it.
*/
public registerSlackImportUploads<ThrowOnError extends boolean = false>(options: Options<RegisterSlackImportUploadsData, ThrowOnError>): RequestResult<RegisterSlackImportUploadsResponses, RegisterSlackImportUploadsErrors, ThrowOnError> {
return (options.client ?? this.client).post<RegisterSlackImportUploadsResponses, RegisterSlackImportUploadsErrors, ThrowOnError>({
url: '/slack/imports/{job_id}/uploads',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Verify storage checksums and lengths for registered objects. A seal fixes the ENTIRE
* descriptor set (contiguous indices, sizes and hashes), not just this completion batch.
* Empty uploads with a zero-part seal support shape-only or empty-history imports.
* Work becomes ready only after verified users metadata, a seal and every required part.
*/
public completeSlackImportUploads<ThrowOnError extends boolean = false>(options: Options<CompleteSlackImportUploadsData, ThrowOnError>): RequestResult<CompleteSlackImportUploadsResponses, CompleteSlackImportUploadsErrors, ThrowOnError> {
return (options.client ?? this.client).post<CompleteSlackImportUploadsResponses, CompleteSlackImportUploadsErrors, ThrowOnError>({
url: '/slack/imports/{job_id}/uploads/complete',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
public bulkWakeupSyncServiceDocuments<ThrowOnError extends boolean = false>(options: Options<BulkWakeupSyncServiceDocumentsData, ThrowOnError>): RequestResult<BulkWakeupSyncServiceDocumentsResponses, BulkWakeupSyncServiceDocumentsErrors, ThrowOnError> {
return (options.client ?? this.client).post<BulkWakeupSyncServiceDocumentsResponses, BulkWakeupSyncServiceDocumentsErrors, ThrowOnError>({
url: '/sync_service/wakeup',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Edits the share permissions of a thread.
*/
public editThreadV2<ThrowOnError extends boolean = false>(options: Options<EditThreadV2Data, ThrowOnError>): RequestResult<EditThreadV2Responses, EditThreadV2Errors, ThrowOnError> {
return (options.client ?? this.client).patch<EditThreadV2Responses, EditThreadV2Errors, ThrowOnError>({
url: '/threads/{thread_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* List the caller's API keys.
*/
public listUserApiKeys<ThrowOnError extends boolean = false>(options?: Options<ListUserApiKeysData, ThrowOnError>): RequestResult<ListUserApiKeysResponses, ListUserApiKeysErrors, ThrowOnError> {
return (options?.client ?? this.client).get<ListUserApiKeysResponses, ListUserApiKeysErrors, ThrowOnError>({ url: '/user-api-keys', ...options });
}
/**
* Mint a new API key for the caller.
*/
public createUserApiKey<ThrowOnError extends boolean = false>(options: Options<CreateUserApiKeyData, ThrowOnError>): RequestResult<CreateUserApiKeyResponses, CreateUserApiKeyErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateUserApiKeyResponses, CreateUserApiKeyErrors, ThrowOnError>({
url: '/user-api-keys',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Delete one of the caller's API keys.
*/
public deleteUserApiKey<ThrowOnError extends boolean = false>(options: Options<DeleteUserApiKeyData, ThrowOnError>): RequestResult<DeleteUserApiKeyResponses, DeleteUserApiKeyErrors, ThrowOnError> {
return (options.client ?? this.client).delete<DeleteUserApiKeyResponses, DeleteUserApiKeyErrors, ThrowOnError>({ url: '/user-api-keys/{id}', ...options });
}
/**
* Deletes a document location for the user
*/
public deleteUserDocumentViewLocation<ThrowOnError extends boolean = false>(options: Options<DeleteUserDocumentViewLocationData, ThrowOnError>): RequestResult<DeleteUserDocumentViewLocationResponses, DeleteUserDocumentViewLocationErrors, ThrowOnError> {
return (options.client ?? this.client).delete<DeleteUserDocumentViewLocationResponses, DeleteUserDocumentViewLocationErrors, ThrowOnError>({ url: '/user_document_view_location/{document_id}', ...options });
}
/**
* Gets a UserPdfDocumentLocation entry
*/
public getUserDocumentViewLocation<ThrowOnError extends boolean = false>(options: Options<GetUserDocumentViewLocationData, ThrowOnError>): RequestResult<GetUserDocumentViewLocationResponses, GetUserDocumentViewLocationErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetUserDocumentViewLocationResponses, GetUserDocumentViewLocationErrors, ThrowOnError>({ url: '/user_document_view_location/{document_id}', ...options });
}
public upsertUserDocumentViewLocation<ThrowOnError extends boolean = false>(options: Options<UpsertUserDocumentViewLocationData, ThrowOnError>): RequestResult<UpsertUserDocumentViewLocationResponses, UpsertUserDocumentViewLocationErrors, ThrowOnError> {
return (options.client ?? this.client).post<UpsertUserDocumentViewLocationResponses, UpsertUserDocumentViewLocationErrors, ThrowOnError>({
url: '/user_document_view_location/{document_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Gets the current documents share permissions
*/
public getDocumentPermissionsV2<ThrowOnError extends boolean = false>(options: Options<GetDocumentPermissionsV2Data, ThrowOnError>): RequestResult<GetDocumentPermissionsV2Responses, GetDocumentPermissionsV2Errors, ThrowOnError> {
return (options.client ?? this.client).get<GetDocumentPermissionsV2Responses, GetDocumentPermissionsV2Errors, ThrowOnError>({ url: '/v2/documents/{document_id}/permissions', ...options });
}
/**
* Edit project metadata and sharing settings.
*/
public editProjectV2<ThrowOnError extends boolean = false>(options: Options<EditProjectV2Data, ThrowOnError>): RequestResult<EditProjectV2Responses, EditProjectV2Errors, ThrowOnError> {
return (options.client ?? this.client).patch<EditProjectV2Responses, EditProjectV2Errors, ThrowOnError>({
url: '/v2/projects/{id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Stream matching broker events to the caller over Server-Sent Events.
*/
public streamEvents<ThrowOnError extends boolean = false>(options: Options<StreamEventsData, ThrowOnError, StreamEventsResponse>): Promise<ServerSentEventsResult<StreamEventsResponses>> {
return (options.client ?? this.client).sse.get<StreamEventsResponses, StreamEventsErrors, ThrowOnError>({ url: '/webhook/events/stream', ...options });
}
/**
* List the caller's webhooks.
*/
public listWebhooks<ThrowOnError extends boolean = false>(options?: Options<ListWebhooksData, ThrowOnError>): RequestResult<ListWebhooksResponses, ListWebhooksErrors, ThrowOnError> {
return (options?.client ?? this.client).get<ListWebhooksResponses, ListWebhooksErrors, ThrowOnError>({ url: '/webhook/webhooks', ...options });
}
/**
* Create a webhook.
*/
public createWebhook<ThrowOnError extends boolean = false>(options: Options<CreateWebhookData, ThrowOnError>): RequestResult<CreateWebhookResponses, CreateWebhookErrors, ThrowOnError> {
return (options.client ?? this.client).post<CreateWebhookResponses, CreateWebhookErrors, ThrowOnError>({
url: '/webhook/webhooks',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Delete a webhook.
*/
public deleteWebhook<ThrowOnError extends boolean = false>(options: Options<DeleteWebhookData, ThrowOnError>): RequestResult<DeleteWebhookResponses, DeleteWebhookErrors, ThrowOnError> {
return (options.client ?? this.client).delete<DeleteWebhookResponses, DeleteWebhookErrors, ThrowOnError>({ url: '/webhook/webhooks/{webhook_id}', ...options });
}
/**
* Get a webhook.
*/
public getWebhook<ThrowOnError extends boolean = false>(options: Options<GetWebhookData, ThrowOnError>): RequestResult<GetWebhookResponses, GetWebhookErrors, ThrowOnError> {
return (options.client ?? this.client).get<GetWebhookResponses, GetWebhookErrors, ThrowOnError>({ url: '/webhook/webhooks/{webhook_id}', ...options });
}
/**
* Patch a webhook.
*/
public patchWebhook<ThrowOnError extends boolean = false>(options: Options<PatchWebhookData, ThrowOnError>): RequestResult<PatchWebhookResponses, PatchWebhookErrors, ThrowOnError> {
return (options.client ?? this.client).patch<PatchWebhookResponses, PatchWebhookErrors, ThrowOnError>({
url: '/webhook/webhooks/{webhook_id}',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Validate a webhook endpoint.
*/
public validateWebhook<ThrowOnError extends boolean = false>(options: Options<ValidateWebhookData, ThrowOnError>): RequestResult<ValidateWebhookResponses, ValidateWebhookErrors, ThrowOnError> {
return (options.client ?? this.client).post<ValidateWebhookResponses, ValidateWebhookErrors, ThrowOnError>({ url: '/webhook/webhooks/{webhook_id}/validate', ...options });
}
/**
* The caller's own account.
*/
public whatsappAccount<ThrowOnError extends boolean = false>(options?: Options<WhatsappAccountData, ThrowOnError>): RequestResult<WhatsappAccountResponses, unknown, ThrowOnError> {
return (options?.client ?? this.client).get<WhatsappAccountResponses, unknown, ThrowOnError>({ url: '/whatsapp/account', ...options });
}
/**
* The caller's WhatsApp chat list (groups and direct chats), newest
* activity first, with what can be added to Macro.
*/
public whatsappChats<ThrowOnError extends boolean = false>(options?: Options<WhatsappChatsData, ThrowOnError>): RequestResult<WhatsappChatsResponses, unknown, ThrowOnError> {
return (options?.client ?? this.client).get<WhatsappChatsResponses, unknown, ThrowOnError>({ url: '/whatsapp/chats', ...options });
}
/**
* Start or resume the caller's pairing transaction.
*/
public whatsappConnect<ThrowOnError extends boolean = false>(options: Options<WhatsappConnectData, ThrowOnError>): RequestResult<WhatsappConnectResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).post<WhatsappConnectResponses, unknown, ThrowOnError>({
url: '/whatsapp/connect',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* End the caller's observation consent.
*/
public whatsappDisconnect<ThrowOnError extends boolean = false>(options: Options<WhatsappDisconnectData, ThrowOnError>): RequestResult<WhatsappDisconnectResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).post<WhatsappDisconnectResponses, unknown, ThrowOnError>({
url: '/whatsapp/disconnect',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Import earlier messages of the caller's chats that wait for their phone
* (`backfill.state` `waiting_for_phone`). WhatsApp must be open on the phone.
*/
public whatsappImportHistory<ThrowOnError extends boolean = false>(options?: Options<WhatsappImportHistoryData, ThrowOnError>): RequestResult<WhatsappImportHistoryResponses, unknown, ThrowOnError> {
return (options?.client ?? this.client).post<WhatsappImportHistoryResponses, unknown, ThrowOnError>({ url: '/whatsapp/history-import', ...options });
}
/**
* Ask whether a phone number has a WhatsApp account, to start a direct chat
* with it; poll the lookup until it is no longer `pending`. Found numbers
* join the chat list, so `POST /external-chats` adds them.
*/
public whatsappStartLookup<ThrowOnError extends boolean = false>(options: Options<WhatsappStartLookupData, ThrowOnError>): RequestResult<WhatsappStartLookupResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).post<WhatsappStartLookupResponses, unknown, ThrowOnError>({
url: '/whatsapp/lookups',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
/**
* Poll the caller's phone-number lookup.
*/
public whatsappLookup<ThrowOnError extends boolean = false>(options: Options<WhatsappLookupData, ThrowOnError>): RequestResult<WhatsappLookupResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).get<WhatsappLookupResponses, unknown, ThrowOnError>({ url: '/whatsapp/lookups/{id}', ...options });
}
/**
* Cancel the caller's pairing transaction.
*/
public whatsappCancelPairing<ThrowOnError extends boolean = false>(options: Options<WhatsappCancelPairingData, ThrowOnError>): RequestResult<WhatsappCancelPairingResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).delete<WhatsappCancelPairingResponses, unknown, ThrowOnError>({ url: '/whatsapp/pairing/{id}', ...options });
}
/**
* Poll the caller's pairing transaction, including its current QR code.
*/
public whatsappPairing<ThrowOnError extends boolean = false>(options: Options<WhatsappPairingData, ThrowOnError>): RequestResult<WhatsappPairingResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).get<WhatsappPairingResponses, unknown, ThrowOnError>({ url: '/whatsapp/pairing/{id}', ...options });
}
/**
* Forward the owner's WebAuthn assertion to the pairing replica.
*/
public whatsappPasskey<ThrowOnError extends boolean = false>(options: Options<WhatsappPasskeyData, ThrowOnError>): RequestResult<WhatsappPasskeyResponses, unknown, ThrowOnError> {
return (options.client ?? this.client).post<WhatsappPasskeyResponses, unknown, ThrowOnError>({
url: '/whatsapp/pairing/{id}/passkey',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
}
}