Documentation
¶
Index ¶
- type Account
- type AccountAddress
- type AccountBilling
- type AccountBranding
- type AccountGroup
- type AccountGroupProductLine
- type AccountGroupQuantityDiscount
- type AccountIntegration
- type AccountInventorySetting
- type AccountPlan
- type AccountPlanFeature
- type AccountPlanLimit
- type AccountPortal
- type AccountPrice
- type AccountPriceAttribute
- type AccountPriceItemCategory
- type AccountProductionScheduleSetting
- type AccountRelation
- type AccountRelationNotificationPreference
- type AccountRelationNotificationType
- type AccountRelationPriceGroup
- type AccountRelationProductLine
- type AccountStatus
- type AccountUser
- type AcquireTaskLeaseParams
- type ActionType
- type Address
- type AdjustmentType
- type AdvanceConversationAfterMessageParams
- type AdvanceIdempotencyRecoveryPointParams
- type AdvanceReadCursorByIDParams
- type AdvanceReadCursorParams
- type AgentTokenBilling
- type Announcement
- type AnnouncementReceipt
- type ApiKey
- type AssignConversationParams
- type Attribute
- type AuditEvent
- type Batch
- type BatchFlow
- type BatchesMachine
- type BindConversationInboxParams
- type BlockExistsBetweenParams
- type CancelScheduledMessageForUserParams
- type Carrier
- type CarrierOption
- type CarrierTransitEstimate
- type ChangeLog
- type ClaimScheduledMessageParams
- type ClearConversationGroupParams
- type Color
- type Consumption
- type Conversation
- type ConversationDmKey
- type ConversationLink
- type ConversationParticipant
- type CountDeletedRecordsByResourceAndResourceIDParams
- type CountEmailInboxesByDomainParams
- type CountUnseenAnnouncementsByUserAccountsRow
- type CountUnseenAnnouncementsParams
- type CountUnseenNotificationsByUserAccountsRow
- type CountVisibleMessagesAfterParams
- type CreateAgentParticipantParams
- type CreateAnnouncementParams
- type CreateBlockParams
- type CreateConversationLinkParams
- type CreateConversationParams
- type CreateCustomerParticipantParams
- type CreateCustomerSupportConversationParams
- type CreateDMKeyParams
- type CreateDraftMessageParams
- type CreateEmailDomainParams
- type CreateEmailInboxParams
- type CreateEmailLogParams
- type CreateEmailRecipientParams
- type CreateIdempotencyKeyParams
- type CreateMessageAttachmentParams
- type CreateMessageParams
- type CreateMessagingGroupMemberParams
- type CreateMessagingGroupParams
- type CreateMessagingReportParams
- type CreateNotificationParams
- type CreateOutboxMessageParams
- type CreateParticipantParams
- type CreateScheduledMessageParams
- type DBTX
- type DcLocation
- type DeleteBlockParams
- type DeleteConversationLinkParams
- type DeleteEmailDomainParams
- type DeleteEmailInboxParams
- type DeleteMessagingGroupMemberByIDParams
- type DeleteMessagingGroupParams
- type DeleteSupportRouteParams
- type DeletedRecord
- type Delivery
- type DeliveryLine
- type DeliveryStatus
- type DemandOverride
- type DemandOverrideType
- type Department
- type DepartmentsPick
- type DismissNotificationsByConversationParams
- type DismissNotificationsBySourceMessageParams
- type DocApiKey
- type EdiRun
- type EmailDomain
- type EmailInbox
- type EmailLog
- type EmailMessage
- type EmailRecipient
- type ErrorLog
- type FindEmailLogBySesMessageIDRow
- type FindEmailThreadConversationRow
- type FulfillmentPolicy
- type Geolocation
- type GetAccountUserIDByUserAndAccountParams
- type GetActiveAnnouncementByIDParams
- type GetActiveAnnouncementByIDRow
- type GetBlockByPairParams
- type GetConversationByIDParams
- type GetCustomerSupportConversationParams
- type GetDMConversationIDParams
- type GetEffectiveNotificationPreferenceParams
- type GetEmailDomainByIDParams
- type GetEmailInboxByIDParams
- type GetIdempotencyKeyByScopeHashParams
- type GetInboxRecordByMessageAndHandlerParams
- type GetLockedOutboxMessagesByIDsParams
- type GetMessageByClientIDParams
- type GetMessageByIDParams
- type GetMessagingGroupByIDParams
- type GetNotificationByIDParams
- type GetNotificationPreferenceByUserCategoryParams
- type GetParticipantByAgentConfigIDParams
- type GetParticipantByIDParams
- type GetParticipantByRelationAccountParams
- type GetParticipantParams
- type GetSupportRouteParams
- type GetUserContactByAccountUserIDRow
- type HideConversationParams
- type HubspotAccountUserLink
- type HubspotCompanyReview
- type HubspotSyncJob
- type HubspotSyncRecord
- type IdempotencyKey
- type InsertDeletedRecordParams
- type InventoryAllocation
- type InventoryChangeLog
- type InventoryIssue
- type InventoryLog
- type InventoryPolicyType
- type InventoryReceipt
- type InventoryReceiptStatus
- type Inventoryissuestatus
- type Invoice
- type InvoiceLine
- type Item
- type ItemAttribute
- type ItemCategoriesProperty
- type ItemCategoriesQuantityDiscount
- type ItemCategory
- type ItemCategoryType
- type ItemType
- type Job
- type JournalPosting
- type LabelSize
- type LabelType
- type LeaveConversationParams
- type ListActiveAnnouncementsParams
- type ListActiveAnnouncementsRow
- type ListConversationAttachmentsRow
- type ListConversationLinksParams
- type ListConversationsByResourceParams
- type ListConversationsForUserParams
- type ListConversationsForUserRow
- type ListDraftMessagesByConversationParams
- type ListMessagesParams
- type ListMessagesVisibleParams
- type ListMessagingContactsParams
- type ListMessagingContactsRow
- type ListNotificationsParams
- type ListPurgeableMessageAttachmentsParams
- type ListPurgeableMessageAttachmentsRow
- type ListScheduledMessagesByConversationParams
- type ListSupportInboxParams
- type LockConversationSequenceParams
- type LockOutboxMessagesByIDsParams
- type Lot
- type Machine
- type MachineDowntimeEvent
- type MachineDowntimeReason
- type MarkEmailDomainVerifiedParams
- type MarkInboxRecordFailedParams
- type MarkNotificationDismissedParams
- type MarkNotificationReadParams
- type MarkNotificationSeenParams
- type MarkOutboxMessageFailedParams
- type MarkScheduledMessageFailedParams
- type Material
- type Message
- type MessageAttachment
- type MessageInbox
- type MessageOutbox
- type MessageReceipt
- type MessagingBlock
- type MessagingGroup
- type MessagingGroupMember
- type MessagingReport
- type Notification
- type NotificationPreference
- type OnboardingStatus
- type OperatingCalendar
- type OperatingCalendarClosure
- type OrderDiscount
- type OrderEmailContact
- type OrderPaymentIntent
- type ParentChildProductionStep
- type Part
- type PaymentTerm
- type PaymentTermsRegistrationFlow
- type Permission
- type PermissionGroup
- type Pick
- type PickLine
- type PortalDomain
- type PortalRegistrationSession
- type Priority
- type Product
- type ProductLine
- type ProductLineTarget
- type ProductLinesQuantityDiscount
- type ProductType
- type Production
- type ProductionRun
- type ProductionSchedule
- type ProductionScheduleDerivedLine
- type ProductionScheduleDeviation
- type ProductionScheduleFinishedPolicy
- type ProductionScheduleFinishingLine
- type ProductionScheduleItemPolicy
- type ProductionScheduleItemSetting
- type ProductionScheduleLine
- type ProductionScheduleLineOrder
- type ProductionScheduleLineStatus
- type ProductionScheduleResourceSetting
- type ProductionScheduleStatus
- type ProductionShift
- type ProductionStep
- type PromoteDraftMessageParams
- type PromoteScheduledMessageParams
- type Property
- type PurgeActionedNotificationsParams
- type PurgeExpiredAnnouncementsParams
- type PurgeProcessedInboxMessagesParams
- type PurgePublishedOutboxMessagesByIDsParams
- type PurgeStaleNotificationsParams
- type PurgeTombstonedMessagesParams
- type Quantity
- type QuantityDiscount
- type QuantityDiscountTier
- type QuantityDiscountsAttribute
- type QuantityDiscountsUnit
- type Queries
- func (q *Queries) AcquireTaskLease(ctx context.Context, arg AcquireTaskLeaseParams) (sql.Result, error)
- func (q *Queries) AdvanceConversationAfterMessage(ctx context.Context, arg AdvanceConversationAfterMessageParams) error
- func (q *Queries) AdvanceIdempotencyRecoveryPoint(ctx context.Context, arg AdvanceIdempotencyRecoveryPointParams) error
- func (q *Queries) AdvanceReadCursor(ctx context.Context, arg AdvanceReadCursorParams) error
- func (q *Queries) AdvanceReadCursorByID(ctx context.Context, arg AdvanceReadCursorByIDParams) error
- func (q *Queries) AssignConversation(ctx context.Context, arg AssignConversationParams) error
- func (q *Queries) BindConversationInbox(ctx context.Context, arg BindConversationInboxParams) error
- func (q *Queries) BlockExistsBetween(ctx context.Context, arg BlockExistsBetweenParams) (bool, error)
- func (q *Queries) CancelScheduledMessageForUser(ctx context.Context, arg CancelScheduledMessageForUserParams) (int64, error)
- func (q *Queries) ClaimScheduledMessage(ctx context.Context, arg ClaimScheduledMessageParams) (int64, error)
- func (q *Queries) CleanupExpiredOutboxLocksByIDs(ctx context.Context, ids []int64) (sql.Result, error)
- func (q *Queries) ClearConversationGroup(ctx context.Context, arg ClearConversationGroupParams) error
- func (q *Queries) CountDeletedRecordsByResourceAndResourceID(ctx context.Context, arg CountDeletedRecordsByResourceAndResourceIDParams) (int64, error)
- func (q *Queries) CountEmailInboxesByDomain(ctx context.Context, arg CountEmailInboxesByDomainParams) (int64, error)
- func (q *Queries) CountUnseenAnnouncements(ctx context.Context, arg CountUnseenAnnouncementsParams) (int64, error)
- func (q *Queries) CountUnseenAnnouncementsByUserAccounts(ctx context.Context, userID string) ([]CountUnseenAnnouncementsByUserAccountsRow, error)
- func (q *Queries) CountUnseenNotifications(ctx context.Context, recipientAccountUserID string) (int64, error)
- func (q *Queries) CountUnseenNotificationsByUserAccounts(ctx context.Context, userID string) ([]CountUnseenNotificationsByUserAccountsRow, error)
- func (q *Queries) CountVisibleMessagesAfter(ctx context.Context, arg CountVisibleMessagesAfterParams) (int64, error)
- func (q *Queries) CreateAgentParticipant(ctx context.Context, arg CreateAgentParticipantParams) error
- func (q *Queries) CreateAnnouncement(ctx context.Context, arg CreateAnnouncementParams) error
- func (q *Queries) CreateBlock(ctx context.Context, arg CreateBlockParams) error
- func (q *Queries) CreateConversation(ctx context.Context, arg CreateConversationParams) error
- func (q *Queries) CreateConversationLink(ctx context.Context, arg CreateConversationLinkParams) error
- func (q *Queries) CreateCustomerParticipant(ctx context.Context, arg CreateCustomerParticipantParams) error
- func (q *Queries) CreateCustomerSupportConversation(ctx context.Context, arg CreateCustomerSupportConversationParams) error
- func (q *Queries) CreateDMKey(ctx context.Context, arg CreateDMKeyParams) error
- func (q *Queries) CreateDraftMessage(ctx context.Context, arg CreateDraftMessageParams) error
- func (q *Queries) CreateEmailDomain(ctx context.Context, arg CreateEmailDomainParams) error
- func (q *Queries) CreateEmailInbox(ctx context.Context, arg CreateEmailInboxParams) error
- func (q *Queries) CreateEmailLog(ctx context.Context, arg CreateEmailLogParams) error
- func (q *Queries) CreateEmailRecipient(ctx context.Context, arg CreateEmailRecipientParams) error
- func (q *Queries) CreateIdempotencyKey(ctx context.Context, arg CreateIdempotencyKeyParams) (int64, error)
- func (q *Queries) CreateMessage(ctx context.Context, arg CreateMessageParams) error
- func (q *Queries) CreateMessageAttachment(ctx context.Context, arg CreateMessageAttachmentParams) error
- func (q *Queries) CreateMessagingGroup(ctx context.Context, arg CreateMessagingGroupParams) error
- func (q *Queries) CreateMessagingGroupMember(ctx context.Context, arg CreateMessagingGroupMemberParams) error
- func (q *Queries) CreateMessagingReport(ctx context.Context, arg CreateMessagingReportParams) error
- func (q *Queries) CreateNotification(ctx context.Context, arg CreateNotificationParams) error
- func (q *Queries) CreateOutboxMessage(ctx context.Context, arg CreateOutboxMessageParams) (int64, error)
- func (q *Queries) CreateParticipant(ctx context.Context, arg CreateParticipantParams) error
- func (q *Queries) CreateScheduledMessage(ctx context.Context, arg CreateScheduledMessageParams) error
- func (q *Queries) DeleteBlock(ctx context.Context, arg DeleteBlockParams) error
- func (q *Queries) DeleteConversationLink(ctx context.Context, arg DeleteConversationLinkParams) (int64, error)
- func (q *Queries) DeleteEmailDomain(ctx context.Context, arg DeleteEmailDomainParams) (int64, error)
- func (q *Queries) DeleteEmailInbox(ctx context.Context, arg DeleteEmailInboxParams) (int64, error)
- func (q *Queries) DeleteExpiredIdempotencyKeys(ctx context.Context, limit int32) (sql.Result, error)
- func (q *Queries) DeleteMessageAttachmentByID(ctx context.Context, id string) error
- func (q *Queries) DeleteMessagingGroup(ctx context.Context, arg DeleteMessagingGroupParams) (int64, error)
- func (q *Queries) DeleteMessagingGroupMemberByID(ctx context.Context, arg DeleteMessagingGroupMemberByIDParams) (int64, error)
- func (q *Queries) DeleteMessagingGroupMembers(ctx context.Context, groupID string) error
- func (q *Queries) DeleteSupportRoute(ctx context.Context, arg DeleteSupportRouteParams) (int64, error)
- func (q *Queries) DismissNotificationsByConversation(ctx context.Context, arg DismissNotificationsByConversationParams) (int64, error)
- func (q *Queries) DismissNotificationsBySourceMessage(ctx context.Context, arg DismissNotificationsBySourceMessageParams) error
- func (q *Queries) FindEmailLogBySesMessageID(ctx context.Context, sesMessageID sql.NullString) (FindEmailLogBySesMessageIDRow, error)
- func (q *Queries) FindEmailThreadConversation(ctx context.Context, rfcMessageIds []string) (FindEmailThreadConversationRow, error)
- func (q *Queries) GetAccountUserIDByUserAndAccount(ctx context.Context, arg GetAccountUserIDByUserAndAccountParams) (string, error)
- func (q *Queries) GetActiveAnnouncementByID(ctx context.Context, arg GetActiveAnnouncementByIDParams) (GetActiveAnnouncementByIDRow, error)
- func (q *Queries) GetBlockByPair(ctx context.Context, arg GetBlockByPairParams) (MessagingBlock, error)
- func (q *Queries) GetConversationByID(ctx context.Context, arg GetConversationByIDParams) (Conversation, error)
- func (q *Queries) GetCustomerSupportConversation(ctx context.Context, arg GetCustomerSupportConversationParams) (Conversation, error)
- func (q *Queries) GetDMConversationID(ctx context.Context, arg GetDMConversationIDParams) (string, error)
- func (q *Queries) GetEffectiveNotificationPreference(ctx context.Context, arg GetEffectiveNotificationPreferenceParams) (NotificationPreference, error)
- func (q *Queries) GetEmailDomainByDomain(ctx context.Context, domain string) (EmailDomain, error)
- func (q *Queries) GetEmailDomainByID(ctx context.Context, arg GetEmailDomainByIDParams) (EmailDomain, error)
- func (q *Queries) GetEmailInboxByAddress(ctx context.Context, address string) (EmailInbox, error)
- func (q *Queries) GetEmailInboxByID(ctx context.Context, arg GetEmailInboxByIDParams) (EmailInbox, error)
- func (q *Queries) GetEmailInboxByIDSystem(ctx context.Context, id string) (EmailInbox, error)
- func (q *Queries) GetEmailMessageByRfcID(ctx context.Context, rfcMessageID string) (EmailMessage, error)
- func (q *Queries) GetIdempotencyKeyByScopeHash(ctx context.Context, arg GetIdempotencyKeyByScopeHashParams) (ServiceIdempotencyKey, error)
- func (q *Queries) GetIdempotencyKeyByTypeID(ctx context.Context, typeID string) (ServiceIdempotencyKey, error)
- func (q *Queries) GetIdempotencyRecoveryPoint(ctx context.Context, typeID string) (string, error)
- func (q *Queries) GetInboxRecordByMessageAndHandler(ctx context.Context, arg GetInboxRecordByMessageAndHandlerParams) (MessageInbox, error)
- func (q *Queries) GetLastVisibleMessage(ctx context.Context, conversationID string) (Message, error)
- func (q *Queries) GetLatestInboundEmailMessage(ctx context.Context, conversationID string) (EmailMessage, error)
- func (q *Queries) GetLockedOutboxMessagesByIDs(ctx context.Context, arg GetLockedOutboxMessagesByIDsParams) ([]MessageOutbox, error)
- func (q *Queries) GetMessageByClientID(ctx context.Context, arg GetMessageByClientIDParams) (Message, error)
- func (q *Queries) GetMessageByID(ctx context.Context, arg GetMessageByIDParams) (Message, error)
- func (q *Queries) GetMessagesByIDs(ctx context.Context, ids []string) ([]Message, error)
- func (q *Queries) GetMessagingGroupByID(ctx context.Context, arg GetMessagingGroupByIDParams) (MessagingGroup, error)
- func (q *Queries) GetNotificationByID(ctx context.Context, arg GetNotificationByIDParams) (Notification, error)
- func (q *Queries) GetNotificationPreferenceByUserCategory(ctx context.Context, arg GetNotificationPreferenceByUserCategoryParams) (NotificationPreference, error)
- func (q *Queries) GetParticipant(ctx context.Context, arg GetParticipantParams) (ConversationParticipant, error)
- func (q *Queries) GetParticipantByAgentConfigID(ctx context.Context, arg GetParticipantByAgentConfigIDParams) (ConversationParticipant, error)
- func (q *Queries) GetParticipantByID(ctx context.Context, arg GetParticipantByIDParams) (ConversationParticipant, error)
- func (q *Queries) GetParticipantByRelationAccount(ctx context.Context, arg GetParticipantByRelationAccountParams) (ConversationParticipant, error)
- func (q *Queries) GetSupportRoute(ctx context.Context, arg GetSupportRouteParams) (SupportRoute, error)
- func (q *Queries) GetUserContactByAccountUserID(ctx context.Context, id string) (GetUserContactByAccountUserIDRow, error)
- func (q *Queries) GetUserIDByAccountUserID(ctx context.Context, id string) (string, error)
- func (q *Queries) HideConversation(ctx context.Context, arg HideConversationParams) error
- func (q *Queries) InsertDeletedRecord(ctx context.Context, arg InsertDeletedRecordParams) error
- func (q *Queries) LeaveConversation(ctx context.Context, arg LeaveConversationParams) error
- func (q *Queries) ListActiveAnnouncements(ctx context.Context, arg ListActiveAnnouncementsParams) ([]ListActiveAnnouncementsRow, error)
- func (q *Queries) ListAllParticipants(ctx context.Context, conversationID string) ([]ConversationParticipant, error)
- func (q *Queries) ListBlocks(ctx context.Context, blockerAccountUserID string) ([]MessagingBlock, error)
- func (q *Queries) ListConversationAttachments(ctx context.Context, conversationID string) ([]ListConversationAttachmentsRow, error)
- func (q *Queries) ListConversationLinks(ctx context.Context, arg ListConversationLinksParams) ([]ConversationLink, error)
- func (q *Queries) ListConversationsByResource(ctx context.Context, arg ListConversationsByResourceParams) ([]Conversation, error)
- func (q *Queries) ListConversationsForUser(ctx context.Context, arg ListConversationsForUserParams) ([]ListConversationsForUserRow, error)
- func (q *Queries) ListDraftMessagesByConversation(ctx context.Context, arg ListDraftMessagesByConversationParams) ([]Message, error)
- func (q *Queries) ListDueScheduledMessages(ctx context.Context, limit int32) ([]Message, error)
- func (q *Queries) ListEmailDomainsByAccount(ctx context.Context, accountID string) ([]EmailDomain, error)
- func (q *Queries) ListEmailInboxesByAccount(ctx context.Context, accountID string) ([]EmailInbox, error)
- func (q *Queries) ListMessageAttachmentsByMessageIDs(ctx context.Context, messageIds []string) ([]MessageAttachment, error)
- func (q *Queries) ListMessages(ctx context.Context, arg ListMessagesParams) ([]Message, error)
- func (q *Queries) ListMessagesVisible(ctx context.Context, arg ListMessagesVisibleParams) ([]Message, error)
- func (q *Queries) ListMessagingContacts(ctx context.Context, arg ListMessagingContactsParams) ([]ListMessagingContactsRow, error)
- func (q *Queries) ListMessagingGroupMembers(ctx context.Context, groupID string) ([]MessagingGroupMember, error)
- func (q *Queries) ListMessagingGroups(ctx context.Context, accountID string) ([]MessagingGroup, error)
- func (q *Queries) ListNotificationPreferences(ctx context.Context, accountUserID string) ([]NotificationPreference, error)
- func (q *Queries) ListNotifications(ctx context.Context, arg ListNotificationsParams) ([]Notification, error)
- func (q *Queries) ListParticipants(ctx context.Context, conversationID string) ([]ConversationParticipant, error)
- func (q *Queries) ListPurgeableMessageAttachments(ctx context.Context, arg ListPurgeableMessageAttachmentsParams) ([]ListPurgeableMessageAttachmentsRow, error)
- func (q *Queries) ListScheduledMessagesByConversation(ctx context.Context, arg ListScheduledMessagesByConversationParams) ([]Message, error)
- func (q *Queries) ListSupportInbox(ctx context.Context, arg ListSupportInboxParams) ([]Conversation, error)
- func (q *Queries) LockConversationSequence(ctx context.Context, arg LockConversationSequenceParams) (int64, error)
- func (q *Queries) LockOutboxMessagesByIDs(ctx context.Context, arg LockOutboxMessagesByIDsParams) error
- func (q *Queries) MarkAllNotificationsSeen(ctx context.Context, recipientAccountUserID string) (int64, error)
- func (q *Queries) MarkEmailDomainVerified(ctx context.Context, arg MarkEmailDomainVerifiedParams) error
- func (q *Queries) MarkInboxRecordFailed(ctx context.Context, arg MarkInboxRecordFailedParams) error
- func (q *Queries) MarkInboxRecordProcessed(ctx context.Context, id int64) error
- func (q *Queries) MarkNotificationDismissed(ctx context.Context, arg MarkNotificationDismissedParams) error
- func (q *Queries) MarkNotificationRead(ctx context.Context, arg MarkNotificationReadParams) error
- func (q *Queries) MarkNotificationSeen(ctx context.Context, arg MarkNotificationSeenParams) error
- func (q *Queries) MarkOutboxMessageFailed(ctx context.Context, arg MarkOutboxMessageFailedParams) error
- func (q *Queries) MarkOutboxMessagesPublished(ctx context.Context, ids []int64) error
- func (q *Queries) MarkScheduledMessageFailed(ctx context.Context, arg MarkScheduledMessageFailedParams) error
- func (q *Queries) PromoteDraftMessage(ctx context.Context, arg PromoteDraftMessageParams) (int64, error)
- func (q *Queries) PromoteScheduledMessage(ctx context.Context, arg PromoteScheduledMessageParams) (int64, error)
- func (q *Queries) PurgeActionedNotifications(ctx context.Context, arg PurgeActionedNotificationsParams) (int64, error)
- func (q *Queries) PurgeExpiredAnnouncements(ctx context.Context, arg PurgeExpiredAnnouncementsParams) (int64, error)
- func (q *Queries) PurgeOrphanedAnnouncementReceipts(ctx context.Context, limit int32) (int64, error)
- func (q *Queries) PurgeProcessedInboxMessages(ctx context.Context, arg PurgeProcessedInboxMessagesParams) (sql.Result, error)
- func (q *Queries) PurgePublishedOutboxMessagesByIDs(ctx context.Context, arg PurgePublishedOutboxMessagesByIDsParams) (sql.Result, error)
- func (q *Queries) PurgeStaleNotifications(ctx context.Context, arg PurgeStaleNotificationsParams) (int64, error)
- func (q *Queries) PurgeTombstonedMessages(ctx context.Context, arg PurgeTombstonedMessagesParams) (int64, error)
- func (q *Queries) ReactivateAgentParticipant(ctx context.Context, arg ReactivateAgentParticipantParams) error
- func (q *Queries) ReactivateParticipant(ctx context.Context, arg ReactivateParticipantParams) error
- func (q *Queries) RedactConversationMessages(ctx context.Context, conversationID string) (int64, error)
- func (q *Queries) ReleaseTaskLease(ctx context.Context, arg ReleaseTaskLeaseParams) error
- func (q *Queries) RenewTaskLease(ctx context.Context, arg RenewTaskLeaseParams) (sql.Result, error)
- func (q *Queries) ResolveSupportRoute(ctx context.Context, arg ResolveSupportRouteParams) (SupportRoute, error)
- func (q *Queries) SelectExpiredOutboxLockIDs(ctx context.Context, limit int32) ([]int64, error)
- func (q *Queries) SelectOutboxMessageIDsForLock(ctx context.Context, limit int32) ([]int64, error)
- func (q *Queries) SelectPublishedOutboxMessageIDsForPurge(ctx context.Context, arg SelectPublishedOutboxMessageIDsForPurgeParams) ([]int64, error)
- func (q *Queries) SetConversationAudienceCustomer(ctx context.Context, arg SetConversationAudienceCustomerParams) error
- func (q *Queries) SetConversationLegalHold(ctx context.Context, arg SetConversationLegalHoldParams) error
- func (q *Queries) SetDraftMessageStatus(ctx context.Context, arg SetDraftMessageStatusParams) (int64, error)
- func (q *Queries) SetIdempotencyResponse(ctx context.Context, arg SetIdempotencyResponseParams) error
- func (q *Queries) SetMessageMetadata(ctx context.Context, arg SetMessageMetadataParams) (int64, error)
- func (q *Queries) SetMessageStreamingBody(ctx context.Context, arg SetMessageStreamingBodyParams) (int64, error)
- func (q *Queries) SetParticipantMembership(ctx context.Context, arg SetParticipantMembershipParams) error
- func (q *Queries) SetParticipantMembershipByID(ctx context.Context, arg SetParticipantMembershipByIDParams) error
- func (q *Queries) SetParticipantNotifications(ctx context.Context, arg SetParticipantNotificationsParams) error
- func (q *Queries) SetParticipantRole(ctx context.Context, arg SetParticipantRoleParams) error
- func (q *Queries) SoftDeleteMessage(ctx context.Context, arg SoftDeleteMessageParams) error
- func (q *Queries) SupersedeDraftMessagesForThread(ctx context.Context, arg SupersedeDraftMessagesForThreadParams) error
- func (q *Queries) TouchMessagingGroup(ctx context.Context, arg TouchMessagingGroupParams) error
- func (q *Queries) TryInsertEmailMessage(ctx context.Context, arg TryInsertEmailMessageParams) (int64, error)
- func (q *Queries) TryInsertInboxRecord(ctx context.Context, arg TryInsertInboxRecordParams) (sql.Result, error)
- func (q *Queries) UnhideConversation(ctx context.Context, arg UnhideConversationParams) error
- func (q *Queries) UpdateConversation(ctx context.Context, arg UpdateConversationParams) error
- func (q *Queries) UpdateConversationWorkflowStatus(ctx context.Context, arg UpdateConversationWorkflowStatusParams) error
- func (q *Queries) UpdateDraftMessageContent(ctx context.Context, arg UpdateDraftMessageContentParams) error
- func (q *Queries) UpdateEmailDomainStatus(ctx context.Context, arg UpdateEmailDomainStatusParams) error
- func (q *Queries) UpdateEmailInbox(ctx context.Context, arg UpdateEmailInboxParams) error
- func (q *Queries) UpdateMessageBody(ctx context.Context, arg UpdateMessageBodyParams) error
- func (q *Queries) UpdateMessagingGroupName(ctx context.Context, arg UpdateMessagingGroupNameParams) (int64, error)
- func (q *Queries) UpsertAnnouncementDismissed(ctx context.Context, arg UpsertAnnouncementDismissedParams) error
- func (q *Queries) UpsertAnnouncementRead(ctx context.Context, arg UpsertAnnouncementReadParams) error
- func (q *Queries) UpsertAnnouncementSeen(ctx context.Context, arg UpsertAnnouncementSeenParams) error
- func (q *Queries) UpsertNotificationPreference(ctx context.Context, arg UpsertNotificationPreferenceParams) error
- func (q *Queries) UpsertSupportRoute(ctx context.Context, arg UpsertSupportRouteParams) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type Rate
- type ReactivateAgentParticipantParams
- type ReactivateParticipantParams
- type ReceivingOrder
- type ReceivingOrderLine
- type RefreshToken
- type RegistrationFlow
- type RegistrationFlowsShippingTerm
- type RegistrationQueue
- type RegistrationSession
- type ReleaseTaskLeaseParams
- type RenewTaskLeaseParams
- type RequestLog
- type ResolveSupportRouteParams
- type Role
- type RolePermission
- type RoleType
- type SalesOrder
- type SalesOrderLine
- type SalesOrderStatus
- type SalesOrderType
- type SandboxAccount
- type ScanningStation
- type ScanningStationType
- type ScheduleDeviationType
- type SelectPublishedOutboxMessageIDsForPurgeParams
- type ServiceIdempotencyKey
- type SetConversationAudienceCustomerParams
- type SetConversationLegalHoldParams
- type SetDraftMessageStatusParams
- type SetIdempotencyResponseParams
- type SetMessageMetadataParams
- type SetMessageStreamingBodyParams
- type SetParticipantMembershipByIDParams
- type SetParticipantMembershipParams
- type SetParticipantNotificationsParams
- type SetParticipantRoleParams
- type Settlement
- type Shipment
- type ShipmentLine
- type ShipmentStatus
- type ShippingCase
- type ShippingTerm
- type ShippingTermFreeShippingRule
- type SoftDeleteMessageParams
- type StorageLocation
- type StorageLocationType
- type StripeEventLog
- type SupersedeDraftMessagesForThreadParams
- type SupplierMaterial
- type SupportRoute
- type SysProperty
- type SysPropertyType
- type Target
- type TaskLease
- type Territory
- type TokenPackPurchase
- type TouchMessagingGroupParams
- type Transaction
- type TransactionAllocation
- type TransactionMethod
- type TransactionType
- type TryInsertEmailMessageParams
- type TryInsertInboxRecordParams
- type UnhideConversationParams
- type Unit
- type UnitGroup
- type UnitGroupUnit
- type UnitType
- type UpdateConversationParams
- type UpdateConversationWorkflowStatusParams
- type UpdateDraftMessageContentParams
- type UpdateEmailDomainStatusParams
- type UpdateEmailInboxParams
- type UpdateMessageBodyParams
- type UpdateMessagingGroupNameParams
- type UpsertAnnouncementDismissedParams
- type UpsertAnnouncementReadParams
- type UpsertAnnouncementSeenParams
- type UpsertNotificationPreferenceParams
- type UpsertSupportRouteParams
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
ID string
Name string
AccountTypeCode string
OnboardingStatusCode string
AccountBillingID sql.NullString
DefaultBillingAddressID sql.NullString
DefaultShippingAddressID sql.NullString
UpdatedAt time.Time
CreatedAt time.Time
AccountPlanID sql.NullString
InternalStripeCustomerID sql.NullString
InternalStripeSubscriptionID sql.NullString
SubscriptionStatus sql.NullString
SubscriptionCurrentPeriodEnd sql.NullTime
}
type AccountAddress ¶
type AccountBilling ¶
type AccountBilling struct {
ID string
AccountPlanID string
InternalStripeCustomerID sql.NullString
InternalStripeSubscriptionID sql.NullString
SubscriptionStatus sql.NullString
SubscriptionCurrentPeriodEnd sql.NullTime
StripeBillingProfileID sql.NullString
StripeBillingCadenceID sql.NullString
StripePricingPlanSubscriptionID sql.NullString
ServicingStatus sql.NullString
CollectionStatus sql.NullString
AgentMonthlySpendingCapCents sql.NullInt64
CreatedAt time.Time
UpdatedAt time.Time
}
type AccountBranding ¶
type AccountBranding struct {
ID string
OwnerAccountID string
SupportEmail sql.NullString
LogoUrl sql.NullString
FaviconUrl sql.NullString
PhoneNumber sql.NullString
FacebookHandle sql.NullString
InstagramHandle sql.NullString
LinkedinHandle sql.NullString
TwitterHandle sql.NullString
WebsiteUrl sql.NullString
UpdatedAt time.Time
CreatedAt time.Time
}
type AccountGroup ¶
type AccountGroup struct {
ID string
OwnerAccountID string
Name string
Description sql.NullString
CommissionStatusCode string
FreightStatusCode string
AccountGroupTypeCode string
RegistrationFlowID sql.NullString
UpdatedAt time.Time
CreatedAt time.Time
DefaultLeadTimeDays sql.NullInt32
FulfillmentPolicyCode sql.NullString
ReceiveCalendarID sql.NullString
}
type AccountGroupProductLine ¶
type AccountIntegration ¶
type AccountInventorySetting ¶
type AccountPlan ¶
type AccountPlan struct {
ID int64
TypeID string
Name string
PlanTypeCode string
Version int32
PricePerSeat string
PricePerMonth sql.NullString
SeatMinimum sql.NullInt32
StripePricingPlanID sql.NullString
RegistrationLimit sql.NullInt32
DisplayFeatures json.RawMessage
DisplayOrder int32
IsHighlighted bool
ButtonText string
IncludesPreviousPlan sql.NullString
IsPubliclyVisible bool
EffectiveAt time.Time
ExpiresAt sql.NullTime
CreatedAt time.Time
UpdatedAt time.Time
}
type AccountPlanFeature ¶
type AccountPlanLimit ¶
type AccountPortal ¶
type AccountPrice ¶
type AccountPriceAttribute ¶
type AccountProductionScheduleSetting ¶
type AccountProductionScheduleSetting struct {
ID string
AccountID string
ConstraintDepartmentID sql.NullString
PlanningHorizonWeeks int32
FrozenWeeks int32
WeekStartDay int32
DemandWindowMonths int32
ForecastHistoryMonths int32
ForecastMonths int32
DemandBasisCode string
ForecastZ string
ChangeoverAvgMinutes string
ChangeoverMinMinutes string
ChangeoverMaxMinutes string
ChangeoverLaborRate string
HoldingRatePct string
ServiceLevelZ string
FinishLeadTimeWeeks string
DefaultConstraintLeadTimeWeeks string
MaxWeeksSupply string
MaxFlowDepth int32
ShiftsPerDay int32
HoursPerShift string
WorkDaysPerWeek int32
WeeksPerYear int32
CapacityHeadroomPct string
DefaultLotUnits string
IsEnabled bool
GenerationCron sql.NullString
GenerationTimezone string
AutoPublish bool
LastGeneratedAt sql.NullTime
CreatedAt time.Time
UpdatedAt time.Time
DefaultCustomerLeadTimeDays int32
DefaultFulfillmentPolicyCode string
RecommendationAdiThreshold string
RecommendationConcentrationPct string
RecommendationCv2Threshold string
RecommendationDormantMonths int32
RecommendationHighValueUnitCost string
RecommendationSlowMoverCogs string
ReceiveCalendarID sql.NullString
ShipCalendarID sql.NullString
}
type AccountRelation ¶
type AccountRelation struct {
ID string
OwnerAccountID string
CounterpartyAccountID string
AccountRelationRoleCode string
ExternalNumber string
IsEdiEnabled bool
StripeCustomerID sql.NullString
StripeEmail sql.NullString
HubspotCompanyID sql.NullString
Notes sql.NullString
UpdatedAt time.Time
CreatedAt time.Time
ParentAccountRelationID sql.NullString
Alias sql.NullString
DefaultBillingAddressID sql.NullString
DefaultShippingAddressID sql.NullString
CommissionStatusCode sql.NullString
FreightStatusCode sql.NullString
DefaultCarrierID sql.NullString
DefaultCarrierOptionID sql.NullString
DefaultSalesRepID sql.NullString
AccountStatusCode sql.NullString
PaymentTermID sql.NullString
AccountGroupID sql.NullString
PriorityCode string
ShippingTermID sql.NullString
CarrierBillingType sql.NullString
CarrierBillingAccount sql.NullString
CreditLimitID sql.NullString
DefaultLeadTimeDays sql.NullInt32
FulfillmentPolicyCode sql.NullString
ReceiveCalendarID sql.NullString
}
type AccountStatus ¶
type AccountUser ¶
type AcquireTaskLeaseParams ¶
type ActionType ¶
type Address ¶
type Address struct {
ID string
Name string
Phone sql.NullString
Email sql.NullString
IsDropShip bool
GeolocationID string
CreatedAt time.Time
UpdatedAt time.Time
ReceiveCalendarID sql.NullString
}
type AdjustmentType ¶
type AdvanceConversationAfterMessageParams ¶
type AdvanceConversationAfterMessageParams struct {
LastMessageID sql.NullString
LastMessageAt sql.NullTime
ID string
}
type AdvanceReadCursorByIDParams ¶
type AdvanceReadCursorByIDParams struct {
LastReadSequence int64
LastReadMessageID sql.NullString
ID string
LastReadSequence_2 int64
}
type AdvanceReadCursorParams ¶
type AdvanceReadCursorParams struct {
LastReadSequence int64
LastReadMessageID sql.NullString
ConversationID string
AccountUserID sql.NullString
LastReadSequence_2 int64
}
type AgentTokenBilling ¶
type Announcement ¶
type Announcement struct {
ID string
Scope string
AccountID sql.NullString
Category string
TemplateKey sql.NullString
TemplateParams db.NullableRawMessage
Title string
Body sql.NullString
LinkResourceType sql.NullString
LinkResourceID sql.NullString
Priority string
Audience db.NullableRawMessage
PublishAt time.Time
ExpiresAt sql.NullTime
CreatedBy sql.NullString
CreatedAt time.Time
UpdatedAt time.Time
}
type AnnouncementReceipt ¶
type AssignConversationParams ¶
type AssignConversationParams struct {
AssigneeResourceType sql.NullString
AssigneeResourceID sql.NullString
ID string
AccountID string
}
type AuditEvent ¶
type AuditEvent struct {
ID int64
TypeID string
ActorID string
ActorType string
IdentityType string
AccountID string
TargetAccountID string
Action string
ResourceType string
ResourceID string
Changes json.RawMessage
Metadata json.RawMessage
ServiceName string
RequestID sql.NullString
IdempotencyKeyID sql.NullString
SourceIp sql.NullString
OccurredAt time.Time
CreatedAt time.Time
RootResourceID sql.NullString
RootResourceType sql.NullString
}
type Batch ¶
type Batch struct {
ID string
CreatedAt time.Time
ClosedAt sql.NullTime
UpdatedAt time.Time
AccountID string
ItemID string
QuantityID string
ScanningStationID sql.NullString
SecondsQuantityID sql.NullString
WasteQuantityID sql.NullString
ProductionStepID sql.NullString
ProductionRunID sql.NullString
ScannedAt sql.NullTime
LocationID sql.NullString
}
type BatchesMachine ¶
type BindConversationInboxParams ¶
type BindConversationInboxParams struct {
EmailInboxID sql.NullString
EmailExternalAddress sql.NullString
ID string
AccountID string
}
type CancelScheduledMessageForUserParams ¶
type CancelScheduledMessageForUserParams struct {
ID string
AccountID string
AccountUserID sql.NullString
}
type Carrier ¶
type Carrier struct {
ID string
Code sql.NullString
Description sql.NullString
Name string
ShippoCarrierAccountID sql.NullString
AccountNumber sql.NullString
AccountID sql.NullString
CreatedAt time.Time
UpdatedAt time.Time
IsPortalEnabled bool
DeletedAt sql.NullTime
}
type CarrierOption ¶
type CarrierTransitEstimate ¶
type ClaimScheduledMessageParams ¶
type ClaimScheduledMessageParams struct {
LockOwner sql.NullString
ID string
}
type ClearConversationGroupParams ¶
type ClearConversationGroupParams struct {
AccountID string
GroupID sql.NullString
}
type Color ¶
type Color struct {
ID string
CreatedAt time.Time
DarkHex sql.NullString
LightHex sql.NullString
Name sql.NullString
Code string
UpdatedAt time.Time
}
type Consumption ¶
type Conversation ¶
type Conversation struct {
ID string
AccountID string
Type string
Audience string
Title sql.NullString
GroupID sql.NullString
TopicResourceType sql.NullString
TopicResourceID sql.NullString
CreatedByParticipantID sql.NullString
NextSequence int64
LastMessageID sql.NullString
LastMessageAt sql.NullTime
IsArchived bool
LegalHold bool
WorkflowStatus sql.NullString
AssigneeResourceType sql.NullString
AssigneeResourceID sql.NullString
EmailInboxID sql.NullString
EmailExternalAddress sql.NullString
Metadata db.NullableRawMessage
CreatedAt time.Time
UpdatedAt time.Time
}
type ConversationDmKey ¶
type ConversationLink ¶
type ConversationParticipant ¶
type ConversationParticipant struct {
ID string
ConversationID string
AccountID string
ParticipantType string
AccountUserID sql.NullString
AgentConfigID sql.NullString
Role string
Membership string
Notifications string
MutedUntil sql.NullTime
LastReadMessageID sql.NullString
LastReadSequence int64
LastReadAt sql.NullTime
LastSeenAt sql.NullTime
HiddenAt sql.NullTime
AgentTriggerPolicy sql.NullString
AgentTriggerKeywords db.NullableRawMessage
RelationAccountID sql.NullString
JoinedAt time.Time
CreatedAt time.Time
UpdatedAt time.Time
}
type CountUnseenAnnouncementsParams ¶
type CountUnseenAnnouncementsParams struct {
AccountUserID string
AccountID sql.NullString
}
type CreateAgentParticipantParams ¶
type CreateAgentParticipantParams struct {
ID string
ConversationID string
AccountID string
AgentConfigID sql.NullString
AgentTriggerPolicy sql.NullString
AgentTriggerKeywords db.NullableRawMessage
}
type CreateAnnouncementParams ¶
type CreateAnnouncementParams struct {
ID string
Scope string
AccountID sql.NullString
Category string
TemplateKey sql.NullString
TemplateParams db.NullableRawMessage
Title string
Body sql.NullString
LinkResourceType sql.NullString
LinkResourceID sql.NullString
Priority string
Audience db.NullableRawMessage
PublishAt time.Time
ExpiresAt sql.NullTime
CreatedBy sql.NullString
}
type CreateBlockParams ¶
type CreateConversationParams ¶
type CreateConversationParams struct {
ID string
AccountID string
Type string
Audience string
Title sql.NullString
GroupID sql.NullString
TopicResourceType sql.NullString
TopicResourceID sql.NullString
CreatedByParticipantID sql.NullString
Metadata db.NullableRawMessage
}
type CreateCustomerParticipantParams ¶
type CreateCustomerParticipantParams struct {
ID string
ConversationID string
AccountID string
RelationAccountID sql.NullString
AccountUserID sql.NullString
}
type CreateCustomerSupportConversationParams ¶
type CreateCustomerSupportConversationParams struct {
ID string
AccountID string
TopicResourceID sql.NullString
}
type CreateDMKeyParams ¶
type CreateDraftMessageParams ¶
type CreateDraftMessageParams struct {
ID string
ConversationID string
AccountID string
Channel sql.NullString
Subject sql.NullString
SenderParticipantID sql.NullString
AgentRunID sql.NullString
SourceThreadMessageID sql.NullString
Body sql.NullString
Preview sql.NullString
}
type CreateEmailDomainParams ¶
type CreateEmailDomainParams struct {
ID string
AccountID string
Domain string
DkimTokens db.NullableRawMessage
}
type CreateEmailInboxParams ¶
type CreateEmailInboxParams struct {
ID string
AccountID string
EmailDomainID string
Address string
FromName sql.NullString
AgentConfigID sql.NullString
AgentTriggerPolicy sql.NullString
AgentTriggerKeywords db.NullableRawMessage
GroupID sql.NullString
}
type CreateEmailLogParams ¶
type CreateEmailLogParams struct {
ID string
HasSent bool
AccountID string
SentByID sql.NullString
Subject sql.NullString
Filename sql.NullString
SesMessageID sql.NullString
}
type CreateEmailRecipientParams ¶
type CreateEmailRecipientParams struct {
ID string
Email string
EmailLogID sql.NullString
}
type CreateMessageAttachmentParams ¶
type CreateMessageAttachmentParams struct {
ID string
MessageID string
AccountID string
Kind string
S3Key sql.NullString
Url sql.NullString
Filename sql.NullString
ContentType sql.NullString
SizeBytes sql.NullInt64
ResourceType sql.NullString
ResourceID sql.NullString
}
type CreateMessageParams ¶
type CreateMessageParams struct {
ID string
ConversationID string
AccountID string
Sequence sql.NullInt64
Kind string
Visibility string
Channel sql.NullString
SenderParticipantID sql.NullString
ClientMessageID sql.NullString
Body sql.NullString
Preview sql.NullString
Subject sql.NullString
EventType sql.NullString
LinkResourceType sql.NullString
LinkResourceID sql.NullString
AgentRunID sql.NullString
ReplyToMessageID sql.NullString
StreamingState string
Metadata db.NullableRawMessage
}
type CreateMessagingGroupMemberParams ¶
type CreateMessagingGroupMemberParams struct {
ID string
GroupID string
AccountID string
MemberType string
AccountUserID sql.NullString
AgentConfigID sql.NullString
}
type CreateMessagingGroupParams ¶
type CreateMessagingGroupParams struct {
ID string
AccountID string
Name string
CreatedByAccountUserID sql.NullString
}
type CreateNotificationParams ¶
type CreateNotificationParams struct {
ID string
AccountID string
RecipientAccountUserID string
Category string
SourceMessageID sql.NullString
ConversationID sql.NullString
Title string
Body sql.NullString
TemplateKey sql.NullString
TemplateParams db.NullableRawMessage
LinkResourceType sql.NullString
LinkResourceID sql.NullString
SenderType sql.NullString
SenderID sql.NullString
SenderName sql.NullString
Priority string
SeenAt sql.NullTime
ReadAt sql.NullTime
DismissedAt sql.NullTime
Metadata db.NullableRawMessage
}
type CreateOutboxMessageParams ¶
type CreateOutboxMessageParams struct {
MessageID string
ServiceName string
MessageType string
Destination string
RoutingKey sql.NullString
Headers db.NullableRawMessage
Payload json.RawMessage
MaxAttempts int32
RequestID sql.NullString
ParentMessageID sql.NullString
}
type CreateParticipantParams ¶
type CreateParticipantParams struct {
ID string
ConversationID string
AccountID string
ParticipantType string
AccountUserID sql.NullString
AgentConfigID sql.NullString
Role string
}
type CreateScheduledMessageParams ¶
type CreateScheduledMessageParams struct {
ID string
ConversationID string
AccountID string
SenderParticipantID sql.NullString
Body sql.NullString
Preview sql.NullString
Channel sql.NullString
ScheduledFor sql.NullTime
}
type DcLocation ¶
type DeleteBlockParams ¶
type DeleteEmailDomainParams ¶
type DeleteEmailInboxParams ¶
type DeletedRecord ¶
type DeliveryLine ¶
type DeliveryStatus ¶
type DemandOverride ¶
type DemandOverride struct {
ID string
AccountID string
ScopeCode string
ScopeRefID string
PeriodStartDate time.Time
PeriodEndDate time.Time
OverrideTypeCode string
Value string
UnitID sql.NullString
ReasonCode sql.NullString
Note sql.NullString
CreatedByID string
EffectiveFrom time.Time
ExpiresAt sql.NullTime
IsActive bool
CreatedAt time.Time
UpdatedAt time.Time
}
type DemandOverrideType ¶
type Department ¶
type Department struct {
ID string
Name string
Notes sql.NullString
CreatedAt time.Time
UpdatedAt time.Time
LocationID sql.NullString
AccountID string
LaborRateID sql.NullString
}
type DepartmentsPick ¶
type DismissNotificationsByConversationParams ¶
type DismissNotificationsByConversationParams struct {
RecipientAccountUserID string
ConversationID sql.NullString
}
type DismissNotificationsBySourceMessageParams ¶
type DismissNotificationsBySourceMessageParams struct {
AccountID string
SourceMessageID sql.NullString
}
type EmailDomain ¶
type EmailInbox ¶
type EmailInbox struct {
ID string
AccountID string
EmailDomainID string
Address string
FromName sql.NullString
Status string
AgentConfigID sql.NullString
AgentTriggerPolicy sql.NullString
AgentTriggerKeywords db.NullableRawMessage
GroupID sql.NullString
CreatedAt time.Time
UpdatedAt time.Time
}
type EmailLog ¶
type EmailLog struct {
ID string
HasSent bool
AccountID string
SentByID sql.NullString
CreatedAt time.Time
UpdatedAt time.Time
Subject sql.NullString
Filename sql.NullString
SesMessageID sql.NullString
}
type EmailMessage ¶
type EmailMessage struct {
ID string
AccountID string
ConversationID string
MessageID string
EmailInboxID string
Direction string
RfcMessageID string
InReplyTo sql.NullString
References sql.NullString
FromAddr string
ToAddrs string
CcAddrs sql.NullString
Subject sql.NullString
RawS3Key sql.NullString
SesMessageID sql.NullString
CreatedAt time.Time
UpdatedAt time.Time
}
type EmailRecipient ¶
type FindEmailLogBySesMessageIDRow ¶
type FindEmailLogBySesMessageIDRow struct {
ID string
HasSent bool
AccountID string
SentByID sql.NullString
Subject sql.NullString
Filename sql.NullString
SesMessageID sql.NullString
CreatedAt time.Time
UpdatedAt time.Time
}
type FulfillmentPolicy ¶
type Geolocation ¶
type Geolocation struct {
ID string
StreetLine1 sql.NullString
StreetLine2 sql.NullString
Locality sql.NullString
State sql.NullString
PostalCode sql.NullString
Country string
AddressDetails json.RawMessage
GooglePlaceID sql.NullString
CreatedAt time.Time
UpdatedAt time.Time
Latitude sql.NullFloat64
Longitude sql.NullFloat64
Timezone sql.NullString
}
type GetActiveAnnouncementByIDParams ¶
type GetActiveAnnouncementByIDParams struct {
AccountUserID string
ID string
AccountID sql.NullString
}
type GetActiveAnnouncementByIDRow ¶
type GetActiveAnnouncementByIDRow struct {
ID string
Scope string
AccountID sql.NullString
Category string
TemplateKey sql.NullString
TemplateParams db.NullableRawMessage
Title string
Body sql.NullString
LinkResourceType sql.NullString
LinkResourceID sql.NullString
Priority string
Audience db.NullableRawMessage
PublishAt time.Time
ExpiresAt sql.NullTime
CreatedBy sql.NullString
CreatedAt time.Time
UpdatedAt time.Time
ReceiptSeenAt sql.NullTime
ReceiptReadAt sql.NullTime
ReceiptDismissedAt sql.NullTime
}
type GetBlockByPairParams ¶
type GetCustomerSupportConversationParams ¶
type GetCustomerSupportConversationParams struct {
AccountID string
RelationAccountID sql.NullString
}
type GetEmailInboxByIDParams ¶
type GetLockedOutboxMessagesByIDsParams ¶
type GetLockedOutboxMessagesByIDsParams struct {
Ids []int64
LockOwner sql.NullString
}
type GetMessageByClientIDParams ¶
type GetMessageByClientIDParams struct {
ConversationID string
ClientMessageID sql.NullString
}
type GetMessageByIDParams ¶
type GetParticipantByAgentConfigIDParams ¶
type GetParticipantByAgentConfigIDParams struct {
ConversationID string
AgentConfigID sql.NullString
}
type GetParticipantByRelationAccountParams ¶
type GetParticipantByRelationAccountParams struct {
ConversationID string
RelationAccountID sql.NullString
}
type GetParticipantParams ¶
type GetParticipantParams struct {
ConversationID string
AccountUserID sql.NullString
}
type GetSupportRouteParams ¶
type GetUserContactByAccountUserIDRow ¶
type GetUserContactByAccountUserIDRow struct {
Email sql.NullString
Name sql.NullString
}
type HideConversationParams ¶
type HideConversationParams struct {
ConversationID string
AccountUserID sql.NullString
}
type HubspotAccountUserLink ¶
type HubspotCompanyReview ¶
type HubspotCompanyReview struct {
ID string
JobID string
AccountID string
AugnoCustomerID string
CustomerName string
CustomerEmail sql.NullString
CustomerUrl sql.NullString
CandidateMatches json.RawMessage
Status string
Resolution sql.NullString
ResolvedHubspotID sql.NullString
CreatedAt time.Time
UpdatedAt time.Time
}
type HubspotSyncJob ¶
type HubspotSyncRecord ¶
type IdempotencyKey ¶
type IdempotencyKey struct {
ID int64
TypeID string
IdempotencyKey string
ActorID sql.NullString
IdentityType string
TargetAccountID sql.NullString
RequestMethod string
NormalizedRoute string
RequestBodyHash string
ScopeHash string
RequestParams json.RawMessage
ResponseCode sql.NullInt32
ResponseBody json.RawMessage
ResponseHeaders json.RawMessage
RecoveryPoint string
LockedAt sql.NullTime
LockOwner sql.NullString
LockExpiresAt sql.NullTime
CreatedAt time.Time
UpdatedAt time.Time
LastRunAt sql.NullTime
ExpiresAt sql.NullTime
}
type InsertDeletedRecordParams ¶
type InsertDeletedRecordParams struct {
ResourceType string
ResourceID string
Data json.RawMessage
}
type InventoryAllocation ¶
type InventoryChangeLog ¶
type InventoryChangeLog struct {
ID string
ItemID string
QuantityID string
ActionTypeCode string
ScanningStationID sql.NullString
CreatedAt time.Time
AccountID string
InventoryLogID sql.NullString
UpdatedAt time.Time
ResponsibleUserID sql.NullString
}
type InventoryIssue ¶
type InventoryIssue struct {
ID string
AccountID string
ItemID string
StorageLocationID sql.NullString
LotID sql.NullString
IssuedAt sql.NullTime
OrderID sql.NullString
BatchID sql.NullString
StatusCode string
QuantityID string
CreatedAt time.Time
UpdatedAt time.Time
}
type InventoryLog ¶
type InventoryPolicyType ¶
type InventoryReceipt ¶
type InventoryReceipt struct {
ID string
OwnerAccountID string
HolderAccountID string
ItemID string
StorageLocationID sql.NullString
LotID sql.NullString
ReceivedAt time.Time
QuantityID string
UnitCostID string
OrderID sql.NullString
BatchID sql.NullString
StatusCode string
CreatedAt time.Time
UpdatedAt time.Time
}
type InventoryReceiptStatus ¶
type Inventoryissuestatus ¶
type InvoiceLine ¶
type ItemAttribute ¶
type ItemCategoriesProperty ¶
type ItemCategory ¶
type ItemCategoryType ¶
type Job ¶
type Job struct {
ID int64
JobID string
Type string
JobItems json.RawMessage
AccountID sql.NullString
CreatedBy sql.NullString
Results json.RawMessage
Errors json.RawMessage
ErrorSummary sql.NullString
UpdatedAt time.Time
CreatedAt time.Time
StartedAt sql.NullTime
CancelledAt sql.NullTime
CompletedAt sql.NullTime
FailedAt sql.NullTime
Error json.RawMessage
ResourceType sql.NullString
}
type JournalPosting ¶
type LeaveConversationParams ¶
type LeaveConversationParams struct {
ConversationID string
AccountUserID sql.NullString
}
type ListActiveAnnouncementsParams ¶
type ListActiveAnnouncementsParams struct {
AccountUserID string
AccountID sql.NullString
CursorPublishAt sql.NullTime
CursorID sql.NullString
Limit int32
}
type ListActiveAnnouncementsRow ¶
type ListActiveAnnouncementsRow struct {
ID string
Scope string
AccountID sql.NullString
Category string
TemplateKey sql.NullString
TemplateParams db.NullableRawMessage
Title string
Body sql.NullString
LinkResourceType sql.NullString
LinkResourceID sql.NullString
Priority string
Audience db.NullableRawMessage
PublishAt time.Time
ExpiresAt sql.NullTime
CreatedBy sql.NullString
CreatedAt time.Time
UpdatedAt time.Time
ReceiptSeenAt sql.NullTime
ReceiptReadAt sql.NullTime
ReceiptDismissedAt sql.NullTime
}
type ListConversationAttachmentsRow ¶
type ListConversationAttachmentsRow struct {
ID string
S3Key sql.NullString
}
type ListConversationsByResourceParams ¶
type ListConversationsByResourceParams struct {
AccountID string
TopicResourceType sql.NullString
TopicResourceID sql.NullString
LinkResourceType string
LinkResourceID string
Limit int32
}
type ListConversationsForUserParams ¶
type ListConversationsForUserParams struct {
AccountUserID sql.NullString
AccountID string
Status interface{}
Type sql.NullString
CursorLastMessageAt sql.NullTime
CursorID sql.NullString
Limit int32
}
type ListConversationsForUserRow ¶
type ListConversationsForUserRow struct {
ID string
AccountID string
Type string
Audience string
Title sql.NullString
GroupID sql.NullString
TopicResourceType sql.NullString
TopicResourceID sql.NullString
CreatedByParticipantID sql.NullString
NextSequence int64
LastMessageID sql.NullString
LastMessageAt sql.NullTime
IsArchived bool
LegalHold bool
WorkflowStatus sql.NullString
AssigneeResourceType sql.NullString
AssigneeResourceID sql.NullString
EmailInboxID sql.NullString
EmailExternalAddress sql.NullString
Metadata db.NullableRawMessage
CreatedAt time.Time
UpdatedAt time.Time
ParticipantID string
ParticipantLastReadSequence int64
ParticipantHiddenAt sql.NullTime
}
type ListDraftMessagesByConversationParams ¶
type ListDraftMessagesByConversationParams struct {
ConversationID string
AccountID string
Status sql.NullString
}
type ListMessagesParams ¶
type ListMessagingContactsParams ¶
type ListMessagingContactsParams struct {
AccountID string
Name sql.NullString
}
type ListMessagingContactsRow ¶
type ListMessagingContactsRow struct {
AccountUserID string
Name sql.NullString
}
type ListNotificationsParams ¶
type ListNotificationsParams struct {
RecipientAccountUserID string
Category sql.NullString
Status interface{}
Search sql.NullString
IncludeSenderFilter interface{}
SenderIds []sql.NullString
IncludeSenderTypeFilter interface{}
SenderTypes []sql.NullString
CursorCreatedAt sql.NullTime
CursorID sql.NullString
Limit int32
}
type ListPurgeableMessageAttachmentsParams ¶
type ListPurgeableMessageAttachmentsParams struct {
Column1 interface{}
Limit int32
}
type ListPurgeableMessageAttachmentsRow ¶
type ListPurgeableMessageAttachmentsRow struct {
ID string
S3Key sql.NullString
}
type ListScheduledMessagesByConversationParams ¶
type ListScheduledMessagesByConversationParams struct {
AccountID string
ConversationID string
AccountUserID sql.NullString
Limit int32
}
type ListSupportInboxParams ¶
type ListSupportInboxParams struct {
AccountID string
IsArchived bool
WorkflowStatus sql.NullString
HideResolved interface{}
AssigneeResourceID sql.NullString
Unassigned interface{}
CursorLastMessageAt sql.NullTime
CursorID sql.NullString
Limit int32
}
type LockOutboxMessagesByIDsParams ¶
type LockOutboxMessagesByIDsParams struct {
LockOwner sql.NullString
LockDurationSeconds interface{}
Ids []int64
}
type MachineDowntimeEvent ¶
type MachineDowntimeEvent struct {
ID string
AccountID string
MachineID string
DepartmentID sql.NullString
ProductionStepID sql.NullString
ReasonCode string
StartedAt time.Time
EndedAt sql.NullTime
DurationSeconds sql.NullInt32
ShiftDate time.Time
ShiftCode sql.NullString
ItemID sql.NullString
ProductionRunID sql.NullString
BatchID sql.NullString
ScheduleLineID sql.NullString
Note sql.NullString
ReportedByID string
SourceCode string
CreatedAt time.Time
UpdatedAt time.Time
}
type MachineDowntimeReason ¶
type MarkInboxRecordFailedParams ¶
type MarkInboxRecordFailedParams struct {
LastError sql.NullString
ID int64
}
type MarkOutboxMessageFailedParams ¶
type MarkOutboxMessageFailedParams struct {
LastError sql.NullString
Column2 interface{}
ID int64
}
type MarkScheduledMessageFailedParams ¶
type MarkScheduledMessageFailedParams struct {
Status string
LastError sql.NullString
ID string
}
type Message ¶
type Message struct {
ID string
ConversationID string
AccountID string
Sequence sql.NullInt64
Kind string
Status string
Visibility string
SenderParticipantID sql.NullString
ClientMessageID sql.NullString
Body sql.NullString
Subject sql.NullString
Channel sql.NullString
Preview sql.NullString
EventType sql.NullString
TemplateKey sql.NullString
TemplateParams db.NullableRawMessage
LinkResourceType sql.NullString
LinkResourceID sql.NullString
AgentRunID sql.NullString
ReplyToMessageID sql.NullString
SourceThreadMessageID sql.NullString
ApprovedByAccountUserID sql.NullString
StreamingState string
ScheduledFor sql.NullTime
ScheduledAttempts int32
LastError sql.NullString
LockedAt sql.NullTime
LockOwner sql.NullString
EditedAt sql.NullTime
DeletedAt sql.NullTime
Metadata db.NullableRawMessage
CreatedAt time.Time
UpdatedAt time.Time
}
type MessageAttachment ¶
type MessageAttachment struct {
ID string
MessageID string
AccountID string
Kind string
S3Key sql.NullString
Url sql.NullString
ThumbnailUrl sql.NullString
Filename sql.NullString
ContentType sql.NullString
SizeBytes sql.NullInt64
ResourceType sql.NullString
ResourceID sql.NullString
DeletedAt sql.NullTime
S3PurgedAt sql.NullTime
CreatedAt time.Time
UpdatedAt time.Time
}
type MessageInbox ¶
type MessageOutbox ¶
type MessageOutbox struct {
ID int64
MessageID string
ServiceName string
MessageType string
Destination string
RoutingKey sql.NullString
Headers db.NullableRawMessage
Payload json.RawMessage
Status string
Attempts int32
MaxAttempts int32
NextRunAt time.Time
LockedAt sql.NullTime
LockOwner sql.NullString
LockExpiresAt sql.NullTime
LastError sql.NullString
PublishedAt sql.NullTime
RequestID sql.NullString
ParentMessageID sql.NullString
CreatedAt time.Time
UpdatedAt time.Time
}
type MessageReceipt ¶
type MessagingBlock ¶
type MessagingGroup ¶
type MessagingGroupMember ¶
type MessagingGroupMember struct {
ID string
GroupID string
AccountID string
MemberType string
AccountUserID sql.NullString
AgentConfigID sql.NullString
CreatedAt time.Time
}
type MessagingReport ¶
type Notification ¶
type Notification struct {
ID string
AccountID string
RecipientAccountUserID string
Category string
SourceMessageID sql.NullString
ConversationID sql.NullString
Title string
Body sql.NullString
TemplateKey sql.NullString
TemplateParams db.NullableRawMessage
LinkResourceType sql.NullString
LinkResourceID sql.NullString
SenderType sql.NullString
SenderID sql.NullString
SenderName sql.NullString
Priority string
SeenAt sql.NullTime
ReadAt sql.NullTime
DismissedAt sql.NullTime
Metadata db.NullableRawMessage
CreatedAt time.Time
UpdatedAt time.Time
}
type NotificationPreference ¶
type OnboardingStatus ¶
type OperatingCalendar ¶
type OrderDiscount ¶
type OrderEmailContact ¶
type OrderPaymentIntent ¶
type PaymentTerm ¶
type Permission ¶
type PermissionGroup ¶
type PortalDomain ¶
type PortalRegistrationSession ¶
type PortalRegistrationSession struct {
ID int64
TypeID string
UserID string
SellerAccountID string
SellerSlug string
IsExistingCustomer sql.NullBool
Step string
CustomerID sql.NullString
SessionData json.RawMessage
CompletedAt sql.NullTime
AbandonedAt sql.NullTime
CreatedAt time.Time
UpdatedAt time.Time
}
type ProductLine ¶
type ProductLine struct {
ID string
Name string
Description sql.NullString
Notes sql.NullString
CreatedAt time.Time
UpdatedAt time.Time
AccountID sql.NullString
UnitGroupID string
IsCommissionExempt bool
IsFreightExempt bool
DefaultLotID sql.NullString
FulfillmentPolicyCode sql.NullString
}
type ProductLineTarget ¶
type ProductType ¶
type Production ¶
type ProductionRun ¶
type ProductionSchedule ¶
type ProductionSchedule struct {
ID string
AccountID string
Version int32
StatusCode string
Name sql.NullString
PlanningAsOf time.Time
HorizonStartDate time.Time
HorizonEndDate time.Time
HorizonWeeks int32
FrozenWeeks int32
FrozenThroughDate sql.NullTime
DemandBasisCode string
GenerationSourceCode string
SolverVersion string
SettingsSnapshot json.RawMessage
Diagnostics json.RawMessage
ErrorMessage sql.NullString
FrozenLineCount int32
FrozenPlannedQuantity string
GeneratedByID sql.NullString
PublishedByID sql.NullString
PublishedAt sql.NullTime
SupersededByID sql.NullString
CreatedAt time.Time
UpdatedAt time.Time
}
type ProductionScheduleDerivedLine ¶
type ProductionScheduleDerivedLine struct {
ID string
AccountID string
ProductionScheduleID string
SourceLineID string
ProductionStepID string
DepartmentID sql.NullString
ItemID string
WeekIndex int32
WeekStartDate time.Time
Quantity string
PlannedUnitID sql.NullString
ExplosionDepth int32
OffsetWeeks int32
StatusCode string
CreatedAt time.Time
UpdatedAt time.Time
}
type ProductionScheduleDeviation ¶
type ProductionScheduleDeviation struct {
ID string
AccountID string
ProductionScheduleID string
ProductionScheduleLineID sql.NullString
DeviationTypeCode string
IsFrozenWeek bool
WeekIndex sql.NullInt32
MachineID sql.NullString
ItemID sql.NullString
BeforeJson json.RawMessage
AfterJson json.RawMessage
DeltaQuantity string
DeltaRunHours string
ReasonCode sql.NullString
ReasonNote sql.NullString
ActorID string
CreatedAt time.Time
}
type ProductionScheduleFinishedPolicy ¶
type ProductionScheduleFinishedPolicy struct {
ID string
AccountID string
ProductionScheduleID string
ItemID string
Sku string
GreigeItemID string
GreigeSku string
ProductLineID sql.NullString
AnnualDemand string
WeeklyDemand string
SigmaWeekly string
SafetyStock string
ReorderPoint string
OnHand string
WeeksOfCover string
CreatedAt time.Time
UpdatedAt time.Time
}
type ProductionScheduleFinishingLine ¶
type ProductionScheduleFinishingLine struct {
ID string
AccountID string
ProductionScheduleID string
WeekIndex int32
WeekStartDate time.Time
ItemID string
Sku string
GreigeItemID string
GreigeSku string
DepartmentID sql.NullString
ProductionStepID sql.NullString
PlannedQuantity string
PlannedUnitID sql.NullString
PlannedLots int32
PlannedLotUnits string
PlannedRunHours string
GreigeConsumed string
FirmUnits string
ProjectedOnHandBefore string
ProjectedOnHandAfter string
StatusCode string
SourceCode string
IsFrozen bool
CreatedAt time.Time
UpdatedAt time.Time
}
type ProductionScheduleItemPolicy ¶
type ProductionScheduleItemPolicy struct {
ID string
AccountID string
ProductionScheduleID string
ItemID string
Sku string
ProductionStepID sql.NullString
PrimaryMachineID sql.NullString
AnnualDemand string
WeeklyDemand string
SecondsPerUnit string
UnitCost string
SetupCost string
HoldingCost string
EoqUnits string
ConstraintLeadTimeWeeks string
FinishLeadTimeWeeks string
SigmaWeeklyPooled string
SigmaDownstreamSum string
SafetyStockPrimary string
SafetyStockDownstream string
ReorderPoint string
OrderUpTo string
OnHandEchelon string
OnHandGreige string
AverageGreigeInventory string
MaxGreigeInventory string
WeeksOfCover string
ProjectedOnHand json.RawMessage
AnnualRunHours string
AbcClass sql.NullString
WasEoqCapped bool
WasCapacityStarved bool
CreatedAt time.Time
UpdatedAt time.Time
UnitID sql.NullString
FirmDemandUnits string
ForecastDemandUnits string
FulfillmentPolicyCode string
PolicySourceCode string
}
type ProductionScheduleItemSetting ¶
type ProductionScheduleItemSetting struct {
ID string
AccountID string
ItemID string
IsExcluded bool
MinLotUnits sql.NullString
MaxLotUnits sql.NullString
LotMultipleUnits sql.NullString
FixedLeadTimeWeeks sql.NullString
ServiceLevelZ sql.NullString
ManualEoqUnits sql.NullString
AbcClassOverride sql.NullString
PreferredMachineID sql.NullString
CreatedAt time.Time
UpdatedAt time.Time
FulfillmentPolicyCode sql.NullString
}
type ProductionScheduleLine ¶
type ProductionScheduleLine struct {
ID string
AccountID string
ProductionScheduleID string
WeekIndex int32
WeekStartDate time.Time
MachineID string
ProductionStepID sql.NullString
DepartmentID sql.NullString
ItemID string
PlannedQuantity string
PlannedUnitID sql.NullString
PlannedLots int32
PlannedRunHours string
PlannedChangeoverMinutes string
SequenceIndex int32
ProjectedOnHandBefore string
ProjectedOnHandAfter string
StatusCode string
SourceCode string
ReasonCode sql.NullString
IsFrozen bool
ProductionRunID sql.NullString
CreatedAt time.Time
UpdatedAt time.Time
PlannedLotUnits string
}
type ProductionScheduleResourceSetting ¶
type ProductionScheduleResourceSetting struct {
ID string
AccountID string
ScopeCode string
ScopeRefID string
IsExcluded bool
IsEnabled bool
ShiftsPerDay sql.NullInt32
HoursPerShift sql.NullString
WorkDaysPerWeek sql.NullInt32
CapacityHeadroomPct sql.NullString
EfficiencyPct sql.NullString
LeadTimeWeeks sql.NullString
LeadTimeOffsetWeeks string
ChangeoverAvgMinutes sql.NullString
ChangeoverMinMinutes sql.NullString
ChangeoverMaxMinutes sql.NullString
SortOrder int32
CreatedAt time.Time
UpdatedAt time.Time
}
type ProductionShift ¶
type ProductionStep ¶
type PromoteDraftMessageParams ¶
type PromoteDraftMessageParams struct {
Sequence sql.NullInt64
Kind string
ApprovedByAccountUserID sql.NullString
Preview sql.NullString
ID string
AccountID string
}
type PurgeActionedNotificationsParams ¶
type PurgeActionedNotificationsParams struct {
Column1 interface{}
Limit int32
}
type PurgeExpiredAnnouncementsParams ¶
type PurgeExpiredAnnouncementsParams struct {
Column1 interface{}
Limit int32
}
type PurgeProcessedInboxMessagesParams ¶
type PurgeProcessedInboxMessagesParams struct {
Column1 interface{}
Limit int32
}
type PurgePublishedOutboxMessagesByIDsParams ¶
type PurgePublishedOutboxMessagesByIDsParams struct {
Ids []int64
RetentionHours interface{}
}
type PurgeStaleNotificationsParams ¶
type PurgeStaleNotificationsParams struct {
Column1 interface{}
Limit int32
}
type PurgeTombstonedMessagesParams ¶
type PurgeTombstonedMessagesParams struct {
Column1 interface{}
Limit int32
}
type QuantityDiscount ¶
type QuantityDiscountTier ¶
type QuantityDiscountsUnit ¶
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AcquireTaskLease ¶
func (*Queries) AdvanceConversationAfterMessage ¶
func (q *Queries) AdvanceConversationAfterMessage(ctx context.Context, arg AdvanceConversationAfterMessageParams) error
func (*Queries) AdvanceIdempotencyRecoveryPoint ¶
func (q *Queries) AdvanceIdempotencyRecoveryPoint(ctx context.Context, arg AdvanceIdempotencyRecoveryPointParams) error
func (*Queries) AdvanceReadCursor ¶
func (q *Queries) AdvanceReadCursor(ctx context.Context, arg AdvanceReadCursorParams) error
Advances the caller's read cursor forward only (never rewinds).
func (*Queries) AdvanceReadCursorByID ¶
func (q *Queries) AdvanceReadCursorByID(ctx context.Context, arg AdvanceReadCursorByIDParams) error
Advances a participant's read cursor by participant id (used for customer participants, which are keyed/looked up by relation_account_id rather than account_user_id). Forward-only.
func (*Queries) AssignConversation ¶
func (q *Queries) AssignConversation(ctx context.Context, arg AssignConversationParams) error
Assigns (or clears, with NULLs) the owning user or team for a customer-service case. The assignee is a single polymorphic reference (resource_type, resource_id) — an account_user or an account_group.
func (*Queries) BindConversationInbox ¶
func (q *Queries) BindConversationInbox(ctx context.Context, arg BindConversationInboxParams) error
Marks a conversation as bridged to an email inbox: inbound mail threads onto it and outbound replies route through the inbox identity.
func (*Queries) BlockExistsBetween ¶
func (q *Queries) BlockExistsBetween(ctx context.Context, arg BlockExistsBetweenParams) (bool, error)
True if either user has blocked the other (DM create and send are blocked in both directions).
func (*Queries) CancelScheduledMessageForUser ¶
func (q *Queries) CancelScheduledMessageForUser(ctx context.Context, arg CancelScheduledMessageForUserParams) (int64, error)
Cancels a scheduled message owned by the caller (resolved via the sender participant's account_user_id). Returns rows affected so the service can distinguish "canceled" from "not cancelable" (already sent/canceled, not owned, or not found).
func (*Queries) ClaimScheduledMessage ¶
func (q *Queries) ClaimScheduledMessage(ctx context.Context, arg ClaimScheduledMessageParams) (int64, error)
Claims a due scheduled message for delivery (compare-and-set on locked_at IS NULL) so a second pod between lease handoffs cannot also deliver it. rows-affected=0 means another worker already claimed it.
func (*Queries) CleanupExpiredOutboxLocksByIDs ¶
func (*Queries) ClearConversationGroup ¶
func (q *Queries) ClearConversationGroup(ctx context.Context, arg ClearConversationGroupParams) error
Detaches every conversation that was seeded from a roster when that roster is deleted. Membership is unaffected (snapshotted into conversation_participant); only the provenance link is nulled.
func (*Queries) CountDeletedRecordsByResourceAndResourceID ¶
func (*Queries) CountEmailInboxesByDomain ¶
func (*Queries) CountUnseenAnnouncements ¶
func (q *Queries) CountUnseenAnnouncements(ctx context.Context, arg CountUnseenAnnouncementsParams) (int64, error)
Counts active announcements the caller has neither seen nor dismissed.
func (*Queries) CountUnseenAnnouncementsByUserAccounts ¶
func (q *Queries) CountUnseenAnnouncementsByUserAccounts(ctx context.Context, userID string) ([]CountUnseenAnnouncementsByUserAccountsRow, error)
Aggregates the user's unseen, non-dismissed account-scoped announcements per account across every account they belong to.
func (*Queries) CountUnseenNotifications ¶
func (*Queries) CountUnseenNotificationsByUserAccounts ¶
func (q *Queries) CountUnseenNotificationsByUserAccounts(ctx context.Context, userID string) ([]CountUnseenNotificationsByUserAccountsRow, error)
Aggregates the user's unseen, non-dismissed notifications per account across every account they belong to. Powers the cross-account unread hint (the bell dot while viewing another account).
func (*Queries) CountVisibleMessagesAfter ¶
func (q *Queries) CountVisibleMessagesAfter(ctx context.Context, arg CountVisibleMessagesAfterParams) (int64, error)
Counts customer-visible messages after a read cursor, for the customer's unread badge (internal notes do not bump a customer's unread count).
func (*Queries) CreateAgentParticipant ¶
func (q *Queries) CreateAgentParticipant(ctx context.Context, arg CreateAgentParticipantParams) error
func (*Queries) CreateAnnouncement ¶
func (q *Queries) CreateAnnouncement(ctx context.Context, arg CreateAnnouncementParams) error
func (*Queries) CreateBlock ¶
func (q *Queries) CreateBlock(ctx context.Context, arg CreateBlockParams) error
Idempotent: re-blocking the same pair is a no-op.
func (*Queries) CreateConversation ¶
func (q *Queries) CreateConversation(ctx context.Context, arg CreateConversationParams) error
func (*Queries) CreateConversationLink ¶
func (q *Queries) CreateConversationLink(ctx context.Context, arg CreateConversationLinkParams) error
Adds a secondary business-record link to a conversation. Idempotent on the unique (conversation_id, resource_type, resource_id) — a duplicate insert is mapped to a conflict.
func (*Queries) CreateCustomerParticipant ¶
func (q *Queries) CreateCustomerParticipant(ctx context.Context, arg CreateCustomerParticipantParams) error
relation_account_id is the routing/dedup key (one support thread per customer account); account_user_id is the customer-account user who opened the case, surfaced as the participant's user actor.
func (*Queries) CreateCustomerSupportConversation ¶
func (q *Queries) CreateCustomerSupportConversation(ctx context.Context, arg CreateCustomerSupportConversationParams) error
The topic anchors the case to the customer record (object=customer, id=customer account), so the customer's name is derivable from the thread without a customer actor type.
func (*Queries) CreateDMKey ¶
func (q *Queries) CreateDMKey(ctx context.Context, arg CreateDMKeyParams) error
func (*Queries) CreateDraftMessage ¶
func (q *Queries) CreateDraftMessage(ctx context.Context, arg CreateDraftMessageParams) error
Inserts a customer-reply draft (status='draft', no timeline sequence yet). Held at visibility 'internal' so it can never reach a customer payload before approval; promote-on-approve flips it to 'external' and assigns a sequence. The conversation timeline is unaffected (no sequence advance).
func (*Queries) CreateEmailDomain ¶
func (q *Queries) CreateEmailDomain(ctx context.Context, arg CreateEmailDomainParams) error
func (*Queries) CreateEmailInbox ¶
func (q *Queries) CreateEmailInbox(ctx context.Context, arg CreateEmailInboxParams) error
func (*Queries) CreateEmailLog ¶
func (q *Queries) CreateEmailLog(ctx context.Context, arg CreateEmailLogParams) error
func (*Queries) CreateEmailRecipient ¶
func (q *Queries) CreateEmailRecipient(ctx context.Context, arg CreateEmailRecipientParams) error
func (*Queries) CreateIdempotencyKey ¶
func (*Queries) CreateMessage ¶
func (q *Queries) CreateMessage(ctx context.Context, arg CreateMessageParams) error
Inserts a sent (timeline) message. status defaults to 'sent' (column default) since it is not in the column list; draft/scheduled rows use CreateDraftMessage/CreateScheduledMessage instead.
func (*Queries) CreateMessageAttachment ¶
func (q *Queries) CreateMessageAttachment(ctx context.Context, arg CreateMessageAttachmentParams) error
func (*Queries) CreateMessagingGroup ¶
func (q *Queries) CreateMessagingGroup(ctx context.Context, arg CreateMessagingGroupParams) error
func (*Queries) CreateMessagingGroupMember ¶
func (q *Queries) CreateMessagingGroupMember(ctx context.Context, arg CreateMessagingGroupMemberParams) error
func (*Queries) CreateMessagingReport ¶
func (q *Queries) CreateMessagingReport(ctx context.Context, arg CreateMessagingReportParams) error
Persists a minimal abuse report filed by a participant against a conversation (optionally a specific message). message_id is nullable.
func (*Queries) CreateNotification ¶
func (q *Queries) CreateNotification(ctx context.Context, arg CreateNotificationParams) error
func (*Queries) CreateOutboxMessage ¶
func (*Queries) CreateParticipant ¶
func (q *Queries) CreateParticipant(ctx context.Context, arg CreateParticipantParams) error
func (*Queries) CreateScheduledMessage ¶
func (q *Queries) CreateScheduledMessage(ctx context.Context, arg CreateScheduledMessageParams) error
Inserts a future-delivery message (status='scheduled', no timeline sequence yet). The leased worker promotes it in place once scheduled_for arrives. visibility 'internal' (scheduled sends are team messages); kept out of the timeline until promoted.
func (*Queries) DeleteBlock ¶
func (q *Queries) DeleteBlock(ctx context.Context, arg DeleteBlockParams) error
func (*Queries) DeleteConversationLink ¶
func (*Queries) DeleteEmailDomain ¶
func (*Queries) DeleteEmailInbox ¶
func (*Queries) DeleteExpiredIdempotencyKeys ¶
func (*Queries) DeleteMessageAttachmentByID ¶
Deletes a single attachment row after its S3 object has been removed.
func (*Queries) DeleteMessagingGroup ¶
func (*Queries) DeleteMessagingGroupMemberByID ¶
func (*Queries) DeleteMessagingGroupMembers ¶
Removes every member of a roster (used before re-seeding, and on group delete).
func (*Queries) DeleteSupportRoute ¶
func (*Queries) DismissNotificationsByConversation ¶
func (q *Queries) DismissNotificationsByConversation(ctx context.Context, arg DismissNotificationsByConversationParams) (int64, error)
Auto-withdraw a recipient's bell notifications for a conversation once they read it in-thread, so already-seen chat alerts don't stack in the bell. Marks seen+read+dismissed in one pass.
func (*Queries) DismissNotificationsBySourceMessage ¶
func (q *Queries) DismissNotificationsBySourceMessage(ctx context.Context, arg DismissNotificationsBySourceMessageParams) error
Withdraws (dismisses) every bell notification that projected a now-deleted message (§12.7), across all recipients in the account.
func (*Queries) FindEmailLogBySesMessageID ¶
func (q *Queries) FindEmailLogBySesMessageID(ctx context.Context, sesMessageID sql.NullString) (FindEmailLogBySesMessageIDRow, error)
func (*Queries) FindEmailThreadConversation ¶
func (q *Queries) FindEmailThreadConversation(ctx context.Context, rfcMessageIds []string) (FindEmailThreadConversationRow, error)
Threading: given the candidate rfc Message-IDs from an inbound mail's In-Reply-To + References headers, find the most recent prior email in the same thread and return its conversation. Served by email_message_rfc_uq.
func (*Queries) GetAccountUserIDByUserAndAccount ¶
func (q *Queries) GetAccountUserIDByUserAndAccount(ctx context.Context, arg GetAccountUserIDByUserAndAccountParams) (string, error)
Resolves the account_user id (the notification recipient key) for a user within an account. identity.Actor.ID is the user id (us_), not the account_user id (acus_), so read/mark requests resolve the recipient via the unique (user_id, account_id) key.
func (*Queries) GetActiveAnnouncementByID ¶
func (q *Queries) GetActiveAnnouncementByID(ctx context.Context, arg GetActiveAnnouncementByIDParams) (GetActiveAnnouncementByIDRow, error)
Fetches a single active announcement visible to the caller, joined with the caller's per-user receipt (seen/read/dismissed) state.
func (*Queries) GetBlockByPair ¶
func (q *Queries) GetBlockByPair(ctx context.Context, arg GetBlockByPairParams) (MessagingBlock, error)
func (*Queries) GetConversationByID ¶
func (q *Queries) GetConversationByID(ctx context.Context, arg GetConversationByIDParams) (Conversation, error)
func (*Queries) GetCustomerSupportConversation ¶
func (q *Queries) GetCustomerSupportConversation(ctx context.Context, arg GetCustomerSupportConversationParams) (Conversation, error)
The portal support case in a vendor account for a given customer account (dedup target for "contact support"). Resolved via audience=customer and the customer participant's relation_account_id.
func (*Queries) GetDMConversationID ¶
func (*Queries) GetEffectiveNotificationPreference ¶
func (q *Queries) GetEffectiveNotificationPreference(ctx context.Context, arg GetEffectiveNotificationPreferenceParams) (NotificationPreference, error)
Resolves the most specific preference for a recipient + category: a category-specific row wins over the global (category = ”) default. Returns no row when neither exists (caller defaults).
func (*Queries) GetEmailDomainByDomain ¶
func (*Queries) GetEmailDomainByID ¶
func (q *Queries) GetEmailDomainByID(ctx context.Context, arg GetEmailDomainByIDParams) (EmailDomain, error)
func (*Queries) GetEmailInboxByAddress ¶
Inbound routing: resolve the inbox a piece of mail was delivered to. Address is globally unique.
func (*Queries) GetEmailInboxByID ¶
func (q *Queries) GetEmailInboxByID(ctx context.Context, arg GetEmailInboxByIDParams) (EmailInbox, error)
func (*Queries) GetEmailInboxByIDSystem ¶
Inbound routing (system, no account scope): resolve the inbox whose per-inbox forwarding address (<inbox_id>@<inbound domain>) a forwarded email was delivered to. IDs are globally unique.
func (*Queries) GetEmailMessageByRfcID ¶
func (*Queries) GetIdempotencyKeyByScopeHash ¶
func (q *Queries) GetIdempotencyKeyByScopeHash(ctx context.Context, arg GetIdempotencyKeyByScopeHashParams) (ServiceIdempotencyKey, error)
func (*Queries) GetIdempotencyKeyByTypeID ¶
func (*Queries) GetIdempotencyRecoveryPoint ¶
func (*Queries) GetInboxRecordByMessageAndHandler ¶
func (q *Queries) GetInboxRecordByMessageAndHandler(ctx context.Context, arg GetInboxRecordByMessageAndHandlerParams) (MessageInbox, error)
func (*Queries) GetLastVisibleMessage ¶
func (q *Queries) GetLastVisibleMessage(ctx context.Context, conversationID string) (Message, error)
The most recent customer-visible message in a conversation, for the customer's last-message preview (internal notes must not surface as the customer's preview/unread anchor).
func (*Queries) GetLatestInboundEmailMessage ¶
func (q *Queries) GetLatestInboundEmailMessage(ctx context.Context, conversationID string) (EmailMessage, error)
Outbound threading: the newest inbound email in a conversation, whose rfc_message_id seeds the In-Reply-To / References headers of an agent's reply.
func (*Queries) GetLockedOutboxMessagesByIDs ¶
func (q *Queries) GetLockedOutboxMessagesByIDs(ctx context.Context, arg GetLockedOutboxMessagesByIDsParams) ([]MessageOutbox, error)
func (*Queries) GetMessageByClientID ¶
func (q *Queries) GetMessageByClientID(ctx context.Context, arg GetMessageByClientIDParams) (Message, error)
Resolves an existing message by its client-supplied dedupe key (idempotent send).
func (*Queries) GetMessageByID ¶
func (*Queries) GetMessagesByIDs ¶
Batch-loads messages by id, for hydrating last-message previews on the conversation list without an N+1 fetch per row.
func (*Queries) GetMessagingGroupByID ¶
func (q *Queries) GetMessagingGroupByID(ctx context.Context, arg GetMessagingGroupByIDParams) (MessagingGroup, error)
func (*Queries) GetNotificationByID ¶
func (q *Queries) GetNotificationByID(ctx context.Context, arg GetNotificationByIDParams) (Notification, error)
func (*Queries) GetNotificationPreferenceByUserCategory ¶
func (q *Queries) GetNotificationPreferenceByUserCategory(ctx context.Context, arg GetNotificationPreferenceByUserCategoryParams) (NotificationPreference, error)
func (*Queries) GetParticipant ¶
func (q *Queries) GetParticipant(ctx context.Context, arg GetParticipantParams) (ConversationParticipant, error)
func (*Queries) GetParticipantByAgentConfigID ¶
func (q *Queries) GetParticipantByAgentConfigID(ctx context.Context, arg GetParticipantByAgentConfigIDParams) (ConversationParticipant, error)
func (*Queries) GetParticipantByID ¶
func (q *Queries) GetParticipantByID(ctx context.Context, arg GetParticipantByIDParams) (ConversationParticipant, error)
func (*Queries) GetParticipantByRelationAccount ¶
func (q *Queries) GetParticipantByRelationAccount(ctx context.Context, arg GetParticipantByRelationAccountParams) (ConversationParticipant, error)
func (*Queries) GetSupportRoute ¶
func (q *Queries) GetSupportRoute(ctx context.Context, arg GetSupportRouteParams) (SupportRoute, error)
func (*Queries) GetUserContactByAccountUserID ¶
func (q *Queries) GetUserContactByAccountUserID(ctx context.Context, id string) (GetUserContactByAccountUserIDRow, error)
Resolves a recipient's email + display name for the email bridge (chat-notification emails).
func (*Queries) GetUserIDByAccountUserID ¶
Resolves the user id (us_) for an account_user. The WS user-topic is keyed by user id (the gateway subscribes user:<user_id> from the validated identity), but notification rows are keyed by account_user id, so the realtime push reverses the mapping.
func (*Queries) HideConversation ¶
func (q *Queries) HideConversation(ctx context.Context, arg HideConversationParams) error
func (*Queries) InsertDeletedRecord ¶
func (q *Queries) InsertDeletedRecord(ctx context.Context, arg InsertDeletedRecordParams) error
func (*Queries) LeaveConversation ¶
func (q *Queries) LeaveConversation(ctx context.Context, arg LeaveConversationParams) error
func (*Queries) ListActiveAnnouncements ¶
func (q *Queries) ListActiveAnnouncements(ctx context.Context, arg ListActiveAnnouncementsParams) ([]ListActiveAnnouncementsRow, error)
Lists active announcements visible to the caller (platform-wide plus this account's), excluding ones the caller has dismissed, joined with per-user receipt state. Keyset paginated by (publish_at, id) descending.
func (*Queries) ListAllParticipants ¶
func (q *Queries) ListAllParticipants(ctx context.Context, conversationID string) ([]ConversationParticipant, error)
Every participant regardless of state. Used to resolve historical message authorship: a member who has left or been removed still authored their past messages, so their participant row must remain resolvable (active-only ListParticipants would drop them and surface "Unknown").
func (*Queries) ListBlocks ¶
func (*Queries) ListConversationAttachments ¶
func (q *Queries) ListConversationAttachments(ctx context.Context, conversationID string) ([]ListConversationAttachmentsRow, error)
All live attachments across a conversation's messages, for S3 deletion during redaction.
func (*Queries) ListConversationLinks ¶
func (q *Queries) ListConversationLinks(ctx context.Context, arg ListConversationLinksParams) ([]ConversationLink, error)
func (*Queries) ListConversationsByResource ¶
func (q *Queries) ListConversationsByResource(ctx context.Context, arg ListConversationsByResourceParams) ([]Conversation, error)
Every conversation linked to a business record, via either the primary topic anchor or a secondary conversation_link row. Drives the "conversations on this object" panel from a record's page.
func (*Queries) ListConversationsForUser ¶
func (q *Queries) ListConversationsForUser(ctx context.Context, arg ListConversationsForUserParams) ([]ListConversationsForUserRow, error)
Lists the caller's active, non-hidden conversations (most-recently-active first), joined with the caller's participant row so the service can compute per-conversation unread. Keyset paginates on (c.last_message_at DESC, c.id DESC) over the parent `conversation`. ACCEPTED RESIDUAL (performant-list-endpoint-patterns.md, residual-documentation): the selective scope (membership: p.account_user_id + p.membership='active' + p.hidden_at IS NULL) lives on the joined `conversation_participant`, while the keyset sort key lives on the parent `conversation`. For a user whose memberships are sparse relative to the account's conversation volume, the optimizer can drive the keyset off `conversation` and probe participant per row (a rare-match stall) rather than driving membership-first. This is accepted rather than denormalizing the keyset sort columns (last_message_at, id) onto `conversation_participant` and driving from a membership-pinned index. See notes for the membership-first subquery rewrite if this list becomes hot.
func (*Queries) ListDraftMessagesByConversation ¶
func (q *Queries) ListDraftMessagesByConversation(ctx context.Context, arg ListDraftMessagesByConversationParams) ([]Message, error)
A case's customer-reply drafts (draft-lifecycle rows only — never sent timeline or scheduled rows), newest first; optionally filtered to a single status (e.g. open drafts only).
func (*Queries) ListDueScheduledMessages ¶
Scheduled messages whose time has arrived and that are not already claimed by a worker. Served by message_status_sched_idx (status, scheduled_for).
func (*Queries) ListEmailDomainsByAccount ¶
func (*Queries) ListEmailInboxesByAccount ¶
func (*Queries) ListMessageAttachmentsByMessageIDs ¶
func (*Queries) ListMessages ¶
Lists a conversation's sent (timeline) messages newest-first, keyset-paginated by sequence. before_sequence loads older history (scroll up); after_sequence catches up after a reconnect. status='sent' keeps draft/scheduled (NULL-sequence) rows out of the timeline.
func (*Queries) ListMessagesVisible ¶
func (q *Queries) ListMessagesVisible(ctx context.Context, arg ListMessagesVisibleParams) ([]Message, error)
Customer-viewer variant of ListMessages: excludes internal-only messages so internal team discussion is never serialized into a customer payload. Served sort-free by message_conv_visibility_idx.
func (*Queries) ListMessagingContacts ¶
func (q *Queries) ListMessagingContacts(ctx context.Context, arg ListMessagingContactsParams) ([]ListMessagingContactsRow, error)
Returns active account_users in an account whose display name matches the (case-insensitive) substring filter, for the messaging directory. The caller passes name_like = "%" + query + "%".
func (*Queries) ListMessagingGroupMembers ¶
func (*Queries) ListMessagingGroups ¶
func (q *Queries) ListMessagingGroups(ctx context.Context, accountID string) ([]MessagingGroup, error)
All rosters in an account, most-recently-updated first.
func (*Queries) ListNotificationPreferences ¶
func (*Queries) ListNotifications ¶
func (q *Queries) ListNotifications(ctx context.Context, arg ListNotificationsParams) ([]Notification, error)
Keyset-paginated notification feed (created_at DESC, id DESC), driven by nf_recipient_feed_idx for the default (non-dismissed) feed, nf_recipient_category_created_idx for the category filter, and the (created_at DESC, id DESC) tail of nf_recipient_sender_idx for the sender_type/sender_id filters — each carries the sort key inline, so the common paths are sort-free. ACCEPTED RESIDUAL (performant-list-endpoint-patterns.md, residual-documentation): the status filter (unseen/seen/read/dismissed) resolves to nullable-timestamp predicates (seen_at/read_at/dismissed_at IS [NOT] NULL) that no covering index carries as a leading sort-free key, so a sparse-state status page can still filesort. This is bounded by the per-recipient row count and the LIMIT, and is accepted rather than carrying a derived low-cardinality status_code column + index. Revisit if status-filtered pages become hot. See notes for the rewrite.
func (*Queries) ListParticipants ¶
func (*Queries) ListPurgeableMessageAttachments ¶
func (q *Queries) ListPurgeableMessageAttachments(ctx context.Context, arg ListPurgeableMessageAttachmentsParams) ([]ListPurgeableMessageAttachmentsRow, error)
Attachments belonging to messages tombstoned longer than the retention window. The reaper deletes the S3 object (when present) before deleting the row, so the object delete is re-attempted rather than orphaned if a crash happens between the two steps. Served by mgah_message_idx joining message_purge_idx (deleted_at).
func (*Queries) ListScheduledMessagesByConversation ¶
func (q *Queries) ListScheduledMessagesByConversation(ctx context.Context, arg ListScheduledMessagesByConversationParams) ([]Message, error)
The caller's own scheduled messages in a single conversation (soonest first). Ownership is resolved via the sender participant's account_user_id, since sender_participant_id is per-conversation.
func (*Queries) ListSupportInbox ¶
func (q *Queries) ListSupportInbox(ctx context.Context, arg ListSupportInboxParams) ([]Conversation, error)
The customer-service inbox: external (audience='customer') cases for triage, filtered by status, assignee (a single polymorphic user-or-team reference), and archived state, keyset-paginated by (last_message_at DESC, id DESC). Served sort-free by conversation_inbox_idx.
func (*Queries) LockConversationSequence ¶
func (q *Queries) LockConversationSequence(ctx context.Context, arg LockConversationSequenceParams) (int64, error)
Locks the conversation row and returns the next sequence to assign. Must run inside the send transaction; the matching UPDATE increments next_sequence under the same lock.
func (*Queries) LockOutboxMessagesByIDs ¶
func (q *Queries) LockOutboxMessagesByIDs(ctx context.Context, arg LockOutboxMessagesByIDsParams) error
func (*Queries) MarkAllNotificationsSeen ¶
func (*Queries) MarkEmailDomainVerified ¶
func (q *Queries) MarkEmailDomainVerified(ctx context.Context, arg MarkEmailDomainVerifiedParams) error
func (*Queries) MarkInboxRecordFailed ¶
func (q *Queries) MarkInboxRecordFailed(ctx context.Context, arg MarkInboxRecordFailedParams) error
func (*Queries) MarkInboxRecordProcessed ¶
func (*Queries) MarkNotificationDismissed ¶
func (q *Queries) MarkNotificationDismissed(ctx context.Context, arg MarkNotificationDismissedParams) error
func (*Queries) MarkNotificationRead ¶
func (q *Queries) MarkNotificationRead(ctx context.Context, arg MarkNotificationReadParams) error
func (*Queries) MarkNotificationSeen ¶
func (q *Queries) MarkNotificationSeen(ctx context.Context, arg MarkNotificationSeenParams) error
func (*Queries) MarkOutboxMessageFailed ¶
func (q *Queries) MarkOutboxMessageFailed(ctx context.Context, arg MarkOutboxMessageFailedParams) error
func (*Queries) MarkOutboxMessagesPublished ¶
func (*Queries) MarkScheduledMessageFailed ¶
func (q *Queries) MarkScheduledMessageFailed(ctx context.Context, arg MarkScheduledMessageFailedParams) error
Records a delivery failure: bumps the attempt counter, releases the worker claim, and sets the new status ('scheduled' to retry next tick, or a terminal 'failed'/'canceled').
func (*Queries) PromoteDraftMessage ¶
func (q *Queries) PromoteDraftMessage(ctx context.Context, arg PromoteDraftMessageParams) (int64, error)
Approve-and-send: promotes a draft to a sent, customer-visible timeline message IN PLACE. Assigns the locked sequence, flips visibility to 'external', and records the approver. The customer-facing "Customer Service" branding is applied at read time, not persisted. Guarded on status='draft' (compare-and-set) so a concurrent double-approve sends only once.
func (*Queries) PromoteScheduledMessage ¶
func (q *Queries) PromoteScheduledMessage(ctx context.Context, arg PromoteScheduledMessageParams) (int64, error)
Promotes a claimed scheduled message to a sent timeline message IN PLACE: assigns the locked sequence and flips status to 'sent'. Guarded on status='scheduled' (compare-and-set) — the single-delivery idempotency guard; rows-affected=0 means a prior tick already delivered it.
func (*Queries) PurgeActionedNotifications ¶
func (q *Queries) PurgeActionedNotifications(ctx context.Context, arg PurgeActionedNotificationsParams) (int64, error)
Deletes notifications the recipient has already read or dismissed, once they are older than the retention window (measured from creation). Served by notification_purge_idx (created_at, read_at, dismissed_at): a leading created_at range bounds the scan to old rows, with the read/dismissed check applied as a covered residual. Batched via LIMIT.
func (*Queries) PurgeExpiredAnnouncements ¶
func (q *Queries) PurgeExpiredAnnouncements(ctx context.Context, arg PurgeExpiredAnnouncementsParams) (int64, error)
Deletes announcements that expired longer ago than the retention window.
func (*Queries) PurgeOrphanedAnnouncementReceipts ¶
func (q *Queries) PurgeOrphanedAnnouncementReceipts(ctx context.Context, limit int32) (int64, error)
Cleans up receipts whose announcement has been purged (no FK cascade exists).
func (*Queries) PurgeProcessedInboxMessages ¶
func (*Queries) PurgePublishedOutboxMessagesByIDs ¶
func (*Queries) PurgeStaleNotifications ¶
func (q *Queries) PurgeStaleNotifications(ctx context.Context, arg PurgeStaleNotificationsParams) (int64, error)
Hard cap: deletes any notification older than the maximum retention window regardless of read/dismissed state, so unattended feeds can't grow without bound. Served by the leading created_at column of notification_purge_idx.
func (*Queries) PurgeTombstonedMessages ¶
func (q *Queries) PurgeTombstonedMessages(ctx context.Context, arg PurgeTombstonedMessagesParams) (int64, error)
Hard-deletes messages tombstoned longer than the retention window, but only once all their attachments are gone (attachments are purged first so their S3 objects are deleted). Messages in conversations under legal hold are exempt until the hold clears. Served by message_purge_idx (deleted_at).
func (*Queries) ReactivateAgentParticipant ¶
func (q *Queries) ReactivateAgentParticipant(ctx context.Context, arg ReactivateAgentParticipantParams) error
func (*Queries) ReactivateParticipant ¶
func (q *Queries) ReactivateParticipant(ctx context.Context, arg ReactivateParticipantParams) error
func (*Queries) RedactConversationMessages ¶
func (q *Queries) RedactConversationMessages(ctx context.Context, conversationID string) (int64, error)
GDPR redaction: clears the body/preview of every non-deleted message in the conversation while keeping the row as an audit shell. The row is left non-tombstoned so the reaper retains the shell.
func (*Queries) ReleaseTaskLease ¶
func (q *Queries) ReleaseTaskLease(ctx context.Context, arg ReleaseTaskLeaseParams) error
func (*Queries) RenewTaskLease ¶
func (*Queries) ResolveSupportRoute ¶
func (q *Queries) ResolveSupportRoute(ctx context.Context, arg ResolveSupportRouteParams) (SupportRoute, error)
Resolves the route for a customer: a per-relation override (relation_account_id = the customer account) wins over the account-level default (relation_account_id = ”). DESC order puts the non-empty override ahead of the ” default.
func (*Queries) SelectExpiredOutboxLockIDs ¶
func (*Queries) SelectOutboxMessageIDsForLock ¶
func (*Queries) SelectPublishedOutboxMessageIDsForPurge ¶
func (*Queries) SetConversationAudienceCustomer ¶
func (q *Queries) SetConversationAudienceCustomer(ctx context.Context, arg SetConversationAudienceCustomerParams) error
Promotes a conversation to an external customer-facing case (used when an inbound email opens a new thread). Seeds the triage status if it was not already an external case.
func (*Queries) SetConversationLegalHold ¶
func (q *Queries) SetConversationLegalHold(ctx context.Context, arg SetConversationLegalHoldParams) error
Sets or clears the legal-hold flag, which exempts the conversation from the reaper and redaction.
func (*Queries) SetDraftMessageStatus ¶
func (q *Queries) SetDraftMessageStatus(ctx context.Context, arg SetDraftMessageStatusParams) (int64, error)
Transitions an open draft (draft->rejected). Guarded on status='draft' so only an open draft can transition; the rows-affected count tells the caller whether the transition applied.
func (*Queries) SetIdempotencyResponse ¶
func (q *Queries) SetIdempotencyResponse(ctx context.Context, arg SetIdempotencyResponseParams) error
func (*Queries) SetMessageMetadata ¶
func (q *Queries) SetMessageMetadata(ctx context.Context, arg SetMessageMetadataParams) (int64, error)
Sets a message's metadata JSON (used to record an agent reply's failure marker + error code when a streaming reply is finalized as failed). Does NOT touch edited_at — this is a system annotation.
func (*Queries) SetMessageStreamingBody ¶
func (q *Queries) SetMessageStreamingBody(ctx context.Context, arg SetMessageStreamingBodyParams) (int64, error)
Streams a partial or final body into an in-flight agent reply, optionally flipping streaming_state to 'complete'. Deliberately does NOT touch edited_at (streaming is not a human edit). Guarded on the row still being 'streaming' so a stale/reordered patch can't clobber an already-completed or deleted message — the rows-affected count lets the caller skip the realtime push when the update no-ops.
func (*Queries) SetParticipantMembership ¶
func (q *Queries) SetParticipantMembership(ctx context.Context, arg SetParticipantMembershipParams) error
func (*Queries) SetParticipantMembershipByID ¶
func (q *Queries) SetParticipantMembershipByID(ctx context.Context, arg SetParticipantMembershipByIDParams) error
func (*Queries) SetParticipantNotifications ¶
func (q *Queries) SetParticipantNotifications(ctx context.Context, arg SetParticipantNotificationsParams) error
func (*Queries) SetParticipantRole ¶
func (q *Queries) SetParticipantRole(ctx context.Context, arg SetParticipantRoleParams) error
func (*Queries) SoftDeleteMessage ¶
func (q *Queries) SoftDeleteMessage(ctx context.Context, arg SoftDeleteMessageParams) error
Tombstones a message: clears the body/preview and sets deleted_at.
func (*Queries) SupersedeDraftMessagesForThread ¶
func (q *Queries) SupersedeDraftMessagesForThread(ctx context.Context, arg SupersedeDraftMessagesForThreadParams) error
When a thread changes, mark its still-open drafts superseded so a stale draft can't be sent.
func (*Queries) TouchMessagingGroup ¶
func (q *Queries) TouchMessagingGroup(ctx context.Context, arg TouchMessagingGroupParams) error
Bumps updated_at so the roster re-sorts to the top after a membership change.
func (*Queries) TryInsertEmailMessage ¶
func (q *Queries) TryInsertEmailMessage(ctx context.Context, arg TryInsertEmailMessageParams) (int64, error)
At-least-once dedup: the unique rfc_message_id index collapses a redelivered inbound email to a no-op (0 rows affected), so the caller can skip re-threading. INSERT IGNORE swallows the dup-key.
func (*Queries) TryInsertInboxRecord ¶
func (*Queries) UnhideConversation ¶
func (q *Queries) UnhideConversation(ctx context.Context, arg UnhideConversationParams) error
func (*Queries) UpdateConversation ¶
func (q *Queries) UpdateConversation(ctx context.Context, arg UpdateConversationParams) error
Partial update: only the provided (non-null) fields change.
func (*Queries) UpdateConversationWorkflowStatus ¶
func (q *Queries) UpdateConversationWorkflowStatus(ctx context.Context, arg UpdateConversationWorkflowStatusParams) error
Sets the customer-service triage lane (new|open|waiting_internal|waiting_external|needs_approval|resolved).
func (*Queries) UpdateDraftMessageContent ¶
func (q *Queries) UpdateDraftMessageContent(ctx context.Context, arg UpdateDraftMessageContentParams) error
Edits a still-open draft's body/subject (rejected on non-draft rows by the WHERE guard).
func (*Queries) UpdateEmailDomainStatus ¶
func (q *Queries) UpdateEmailDomainStatus(ctx context.Context, arg UpdateEmailDomainStatusParams) error
func (*Queries) UpdateEmailInbox ¶
func (q *Queries) UpdateEmailInbox(ctx context.Context, arg UpdateEmailInboxParams) error
func (*Queries) UpdateMessageBody ¶
func (q *Queries) UpdateMessageBody(ctx context.Context, arg UpdateMessageBodyParams) error
Edits a message body (author only — ownership is checked in the service).
func (*Queries) UpdateMessagingGroupName ¶
func (*Queries) UpsertAnnouncementDismissed ¶
func (q *Queries) UpsertAnnouncementDismissed(ctx context.Context, arg UpsertAnnouncementDismissedParams) error
func (*Queries) UpsertAnnouncementRead ¶
func (q *Queries) UpsertAnnouncementRead(ctx context.Context, arg UpsertAnnouncementReadParams) error
func (*Queries) UpsertAnnouncementSeen ¶
func (q *Queries) UpsertAnnouncementSeen(ctx context.Context, arg UpsertAnnouncementSeenParams) error
func (*Queries) UpsertNotificationPreference ¶
func (q *Queries) UpsertNotificationPreference(ctx context.Context, arg UpsertNotificationPreferenceParams) error
func (*Queries) UpsertSupportRoute ¶
func (q *Queries) UpsertSupportRoute(ctx context.Context, arg UpsertSupportRouteParams) error
Designates (or re-points) the group conversation that handles support for a scope. The unique key is (account_id, relation_account_id), so a second set for the same scope updates the target.
type ReactivateAgentParticipantParams ¶
type ReactivateAgentParticipantParams struct {
AgentTriggerPolicy sql.NullString
AgentTriggerKeywords db.NullableRawMessage
ID string
}
type ReactivateParticipantParams ¶
type ReactivateParticipantParams struct {
Role string
ConversationID string
AccountUserID sql.NullString
}
type ReceivingOrder ¶
type ReceivingOrderLine ¶
type RefreshToken ¶
type RegistrationFlow ¶
type RegistrationQueue ¶
type RegistrationSession ¶
type RegistrationSession struct {
ID int64
TypeID string
Email string
PlanCode string
Step string
VerificationToken string
IsEmailVerified bool
IsExistingUser sql.NullBool
UserID sql.NullString
AccountID sql.NullString
StripeCustomerID sql.NullString
StripeCheckoutSessionID sql.NullString
StripeSubscriptionID sql.NullString
PaymentCompleted bool
SessionData json.RawMessage
CompletedAt sql.NullTime
CreatedAt time.Time
UpdatedAt time.Time
}
type ReleaseTaskLeaseParams ¶
type RenewTaskLeaseParams ¶
type RequestLog ¶
type RequestLog struct {
ID string
Method string
Host string
Path string
NormalizedRoute string
QueryJson json.RawMessage
RequestBodyJson json.RawMessage
ResponseBodyJson json.RawMessage
StatusCode int32
LatencyUs int64
TargetAccountID sql.NullString
PublicEndpoint bool
ApiVersion sql.NullString
AccountID sql.NullString
ActorID sql.NullString
ActorType sql.NullString
IdentityType sql.NullString
ClientIp sql.NullString
ClientIpString sql.NullString
UserAgent sql.NullString
Referrer sql.NullString
ErrorCode sql.NullString
ErrorMessage sql.NullString
CreatedAt time.Time
OccurredAt time.Time
IdempotencyKeyID sql.NullString
StackTrace sql.NullString
InternalErrorMessage sql.NullString
TraceID sql.NullString
Hidden bool
}
type RolePermission ¶
type SalesOrder ¶
type SalesOrder struct {
ID string
BillingAddressID string
ShippingAddressID string
CustomerPoNumber sql.NullString
Note sql.NullString
Number string
IsAcknowledgmentSent bool
CarrierID sql.NullString
CarrierOptionID sql.NullString
CarrierBillingType sql.NullString
CarrierBillingAccount sql.NullString
PriorityCode string
SalesRepID sql.NullString
ShippingTermID sql.NullString
SalesOrderStatusCode string
SalesOrderTypeCode string
PaymentTermID sql.NullString
ProductionRunID sql.NullString
OrderDiscountID sql.NullString
BuyerAccountID string
SellerAccountID string
OwnerAccountID string
CompletedAt sql.NullTime
ExpiredAt sql.NullTime
FirstShipAt sql.NullTime
IssuedAt sql.NullTime
PromisedAt sql.NullTime
CreatedAt time.Time
UpdatedAt time.Time
LeadTimeDays sql.NullInt32
LeadTimeSourceCode sql.NullString
ShipByDate sql.NullTime
TransitDays sql.NullInt32
TransitSourceCode sql.NullString
CalendarAdjustmentDays sql.NullInt32
LeadTimeOverrideDays sql.NullInt32
ShipByCutoffAt sql.NullTime
ShipByOverrideDate sql.NullTime
}
type SalesOrderLine ¶
type SalesOrderLine struct {
ID string
ProductSku string
ProductDescription sql.NullString
EdiLineItemID sql.NullString
LineItemNumber sql.NullInt32
ProductID sql.NullString
ItemID sql.NullString
SalesOrderID string
QuantityID string
UnitPriceID string
UnitCostID sql.NullString
CreatedAt time.Time
UpdatedAt time.Time
}
type SalesOrderStatus ¶
type SalesOrderType ¶
type SandboxAccount ¶
type ScanningStation ¶
type ScanningStationType ¶
type ScheduleDeviationType ¶
type SelectPublishedOutboxMessageIDsForPurgeParams ¶
type SelectPublishedOutboxMessageIDsForPurgeParams struct {
RetentionHours interface{}
Limit int32
}
type ServiceIdempotencyKey ¶
type ServiceIdempotencyKey struct {
ID int64
TypeID string
ServiceName string
Handler string
IdempotencyKey string
ActorID sql.NullString
IdentityType string
ScopeHash string
ResponseCode sql.NullInt32
ResponseBody *json.RawMessage
RecoveryPoint string
LockedAt sql.NullTime
LockOwner sql.NullString
LockExpiresAt sql.NullTime
CreatedAt time.Time
UpdatedAt time.Time
LastRunAt sql.NullTime
ExpiresAt sql.NullTime
}
type SetMessageMetadataParams ¶
type SetMessageMetadataParams struct {
Metadata db.NullableRawMessage
ID string
AccountID string
}
type SetMessageStreamingBodyParams ¶
type SetMessageStreamingBodyParams struct {
Body sql.NullString
Preview sql.NullString
StreamingState string
ID string
AccountID string
}
type SetParticipantMembershipParams ¶
type SetParticipantMembershipParams struct {
Membership string
ConversationID string
AccountUserID sql.NullString
}
type SetParticipantRoleParams ¶
type SetParticipantRoleParams struct {
Role string
ConversationID string
AccountUserID sql.NullString
}
type Settlement ¶
type Shipment ¶
type Shipment struct {
ID string
BillOfLading sql.NullString
ShippedAt sql.NullTime
Note sql.NullString
Number string
InvoiceID sql.NullString
CarrierID string
CarrierOptionID sql.NullString
ShippingAddressID string
ShippedByID sql.NullString
SalesOrderID string
ShipmentStatusCode string
AccountID string
CreatedAt time.Time
UpdatedAt time.Time
MasterTrackingNumber sql.NullString
}
type ShipmentLine ¶
type ShipmentStatus ¶
type ShippingCase ¶
type ShippingCase struct {
ID string
Number string
Sscc sql.NullString
TrackingNumber sql.NullString
ShippoTransactionID sql.NullString
ShippingLabelUrl sql.NullString
ShippedAt sql.NullTime
FreightAmountID string
FreightWeightID string
ShipmentID string
CarrierID string
AccountID string
CreatedAt time.Time
UpdatedAt time.Time
}
type ShippingTerm ¶
type ShippingTerm struct {
ID string
Name string
IsFreightExempt bool
IsCarrierRate bool
AccountID sql.NullString
FlatRateID sql.NullString
MinimumOrderID sql.NullString
CreatedAt time.Time
UpdatedAt time.Time
}
type SoftDeleteMessageParams ¶
type StorageLocation ¶
type StorageLocationType ¶
type StripeEventLog ¶
type SupersedeDraftMessagesForThreadParams ¶
type SupersedeDraftMessagesForThreadParams struct {
ConversationID string
SourceThreadMessageID sql.NullString
}
type SupplierMaterial ¶
type SupportRoute ¶
type SysProperty ¶
type SysPropertyType ¶
type TokenPackPurchase ¶
type Transaction ¶
type Transaction struct {
ID string
CustomerAccountID string
AmountID string
Note sql.NullString
TransactionMethodCode sql.NullString
TransactionTypeCode string
IsFullyAllocated bool
ResponsibleUserID sql.NullString
AccountID string
CreatedAt time.Time
UpdatedAt time.Time
AdjustmentTypeCode sql.NullString
StripePaymentID sql.NullString
FundsReceivedAt sql.NullTime
Number string
}
type TransactionAllocation ¶
type TransactionMethod ¶
type TransactionType ¶
type TryInsertEmailMessageParams ¶
type TryInsertEmailMessageParams struct {
ID string
AccountID string
ConversationID string
MessageID string
EmailInboxID string
Direction string
RfcMessageID string
InReplyTo sql.NullString
References sql.NullString
FromAddr string
ToAddrs string
CcAddrs sql.NullString
Subject sql.NullString
RawS3Key sql.NullString
SesMessageID sql.NullString
}
type TryInsertInboxRecordParams ¶
type TryInsertInboxRecordParams struct {
MessageID string
ServiceName string
Handler string
MessageType string
RequestID sql.NullString
ParentMessageID sql.NullString
}
type UnhideConversationParams ¶
type UnhideConversationParams struct {
ConversationID string
AccountUserID sql.NullString
}
type UnitGroupUnit ¶
type UpdateConversationWorkflowStatusParams ¶
type UpdateConversationWorkflowStatusParams struct {
WorkflowStatus sql.NullString
ID string
AccountID string
}
type UpdateDraftMessageContentParams ¶
type UpdateDraftMessageContentParams struct {
Body sql.NullString
Subject sql.NullString
Preview sql.NullString
ID string
AccountID string
}
type UpdateEmailDomainStatusParams ¶
type UpdateEmailDomainStatusParams struct {
Status string
DkimTokens db.NullableRawMessage
ID string
AccountID string
}
type UpdateEmailInboxParams ¶
type UpdateEmailInboxParams struct {
FromName sql.NullString
Status string
AgentConfigID sql.NullString
AgentTriggerPolicy sql.NullString
AgentTriggerKeywords db.NullableRawMessage
GroupID sql.NullString
ID string
AccountID string
}
type UpdateMessageBodyParams ¶
type UpdateMessageBodyParams struct {
Body sql.NullString
Preview sql.NullString
ID string
AccountID string
}
type User ¶
type User struct {
ID string
Email sql.NullString
Name sql.NullString
Username sql.NullString
HashedPassword sql.NullString
EmailVerified sql.NullTime
ImageUrl sql.NullString
StatusCode string
CreatedAt time.Time
UpdatedAt time.Time
}
Source Files
¶
- account_user.sql.go
- announcement.sql.go
- conversation.sql.go
- conversation_link.sql.go
- db.go
- deleted_record.sql.go
- email_domain.sql.go
- email_inbox.sql.go
- email_log.sql.go
- email_message.sql.go
- idempotency_key.sql.go
- inbox.sql.go
- message.sql.go
- message_attachment.sql.go
- messaging_block.sql.go
- messaging_group.sql.go
- messaging_reaper.sql.go
- messaging_report.sql.go
- models.go
- notification.sql.go
- notification_preference.sql.go
- outbox.sql.go
- support_route.sql.go
- task_lease.sql.go