sqlc

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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 AccountAddress struct {
	ID        string
	AccountID string
	AddressID string
	CreatedAt time.Time
	UpdatedAt time.Time
}

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 AccountGroupProductLine struct {
	ID             string
	AccountGroupID string
	ProductLineID  string
	CreatedAt      time.Time
	UpdatedAt      time.Time
}

type AccountGroupQuantityDiscount

type AccountGroupQuantityDiscount struct {
	ID                 string
	AccountGroupID     string
	QuantityDiscountID string
	CreatedAt          time.Time
	UpdatedAt          time.Time
}

type AccountIntegration

type AccountIntegration struct {
	ID              string
	AccountID       string
	IntegrationCode string
	Name            string
	CredentialsV2   string
	IsActive        bool
	CreatedAt       time.Time
	UpdatedAt       time.Time
}

type AccountInventorySetting

type AccountInventorySetting struct {
	ID                  string
	AccountID           string
	InventoryPolicyCode string
	CreatedAt           time.Time
	UpdatedAt           time.Time
}

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 AccountPlanFeature struct {
	ID            int64
	AccountPlanID string
	Key           string
	Enabled       bool
	CreatedAt     time.Time
	UpdatedAt     time.Time
}

type AccountPlanLimit

type AccountPlanLimit struct {
	ID            int64
	AccountPlanID string
	Key           string
	Value         sql.NullInt32
	CreatedAt     time.Time
	UpdatedAt     time.Time
}

type AccountPortal

type AccountPortal struct {
	ID             string
	OwnerAccountID string
	Slug           string
	UpdatedAt      time.Time
	CreatedAt      time.Time
}

type AccountPrice

type AccountPrice struct {
	ID                 string
	CreatedAt          time.Time
	UpdatedAt          time.Time
	OwnerAccountID     string
	UnitValueID        string
	ProductLineID      string
	RecipientAccountID string
}

type AccountPriceAttribute

type AccountPriceAttribute struct {
	ID             string
	AccountPriceID string
	AttributeID    string
	CreatedAt      time.Time
	UpdatedAt      time.Time
}

type AccountPriceItemCategory

type AccountPriceItemCategory struct {
	ID             string
	AccountPriceID string
	ItemCategoryID string
	CreatedAt      time.Time
	UpdatedAt      time.Time
}

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 AccountRelationNotificationPreference

type AccountRelationNotificationPreference struct {
	ID                     string
	AccountRelationID      string
	RecipientAccountUserID string
	NotificationTypeCode   string
	CreatedAt              time.Time
	UpdatedAt              time.Time
}

type AccountRelationNotificationType

type AccountRelationNotificationType struct {
	ID        string
	Code      string
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type AccountRelationPriceGroup

type AccountRelationPriceGroup struct {
	ID                string
	AccountRelationID string
	AccountGroupID    string
	CreatedAt         time.Time
	UpdatedAt         time.Time
}

type AccountRelationProductLine

type AccountRelationProductLine struct {
	ID                string
	AccountRelationID string
	ProductLineID     string
	CreatedAt         time.Time
	UpdatedAt         time.Time
}

type AccountStatus

type AccountStatus struct {
	ID        string
	Code      string
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type AccountUser

type AccountUser struct {
	ID                   string
	UserID               string
	DepartmentID         sql.NullString
	LastUsedAt           sql.NullTime
	StatusCode           string
	CreatedAt            time.Time
	UpdatedAt            time.Time
	RoleID               sql.NullString
	AccountID            string
	IsCommissionEligible bool
}

type AcquireTaskLeaseParams

type AcquireTaskLeaseParams struct {
	Name    string
	Holder  string
	Column3 interface{}
}

type ActionType

type ActionType struct {
	ID        string
	CreatedAt time.Time
	Name      string
	Code      string
	UpdatedAt time.Time
}

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 AdjustmentType struct {
	ID        string
	Name      string
	Code      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type AdvanceConversationAfterMessageParams

type AdvanceConversationAfterMessageParams struct {
	LastMessageID sql.NullString
	LastMessageAt sql.NullTime
	ID            string
}

type AdvanceIdempotencyRecoveryPointParams

type AdvanceIdempotencyRecoveryPointParams struct {
	RecoveryPoint string
	TypeID        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 AgentTokenBilling struct {
	ID                     string
	AccountID              string
	PeriodStart            time.Time
	PeriodEnd              time.Time
	TotalInputTokens       int64
	TotalOutputTokens      int64
	TotalTokens            int64
	TokensReportedToStripe int64
	StripeMeteredItemID    sql.NullString
	RunCount               int32
	CreatedAt              time.Time
	UpdatedAt              time.Time
}

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 AnnouncementReceipt struct {
	ID             string
	AnnouncementID string
	AccountUserID  string
	SeenAt         sql.NullTime
	ReadAt         sql.NullTime
	DismissedAt    sql.NullTime
	CreatedAt      time.Time
}

type ApiKey

type ApiKey struct {
	ID             int64
	TypeID         string
	KeyID          string
	Name           sql.NullString
	SecretHash     []byte
	RedactedValue  string
	OwnerAccountID string
	RoleID         string
	CreatedAt      time.Time
	UpdatedAt      time.Time
	LastUsedAt     sql.NullTime
	ExpiresAt      sql.NullTime
	RevokedAt      sql.NullTime
}

type AssignConversationParams

type AssignConversationParams struct {
	AssigneeResourceType sql.NullString
	AssigneeResourceID   sql.NullString
	ID                   string
	AccountID            string
}

type Attribute

type Attribute struct {
	ID         string
	Text       string
	Order      int32
	CreatedAt  time.Time
	UpdatedAt  time.Time
	PropertyID string
	ColorCode  string
	AccountID  string
	IsPublic   bool
}

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 BatchFlow

type BatchFlow struct {
	A string
	B string
}

type BatchesMachine

type BatchesMachine struct {
	A string
	B string
}

type BindConversationInboxParams

type BindConversationInboxParams struct {
	EmailInboxID         sql.NullString
	EmailExternalAddress sql.NullString
	ID                   string
	AccountID            string
}

type BlockExistsBetweenParams

type BlockExistsBetweenParams struct {
	A string
	B 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 CarrierOption struct {
	ID                 string
	Code               string
	Name               string
	ServiceLevelToken  sql.NullString
	IsPortalEnabled    bool
	IsDefault          bool
	CarrierID          string
	AccountID          sql.NullString
	CreatedAt          time.Time
	UpdatedAt          time.Time
	DefaultTransitDays sql.NullInt32
}

type CarrierTransitEstimate

type CarrierTransitEstimate struct {
	ID              string
	AccountID       string
	CarrierOptionID string
	OriginCountry   string
	OriginPostal    string
	DestCountry     string
	DestPostal      string
	TransitDays     int32
	SourceCode      string
	RefreshedAt     time.Time
	CreatedAt       time.Time
	UpdatedAt       time.Time
}

type ChangeLog

type ChangeLog struct {
	ID                string
	CreatedAt         time.Time
	UpdatedAt         time.Time
	ActionTypeCode    string
	Description       string
	ResponsibleUserID sql.NullString
	AccountID         string
	ModelType         string
	RecordID          string
}

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 Consumption struct {
	ID               string
	CreatedAt        time.Time
	UpdatedAt        time.Time
	ItemID           string
	QuantityID       string
	ProductionStepID sql.NullString
	WasteQuantityID  string
	Instructions     sql.NullString
}

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 ConversationDmKey struct {
	AccountID      string
	DmKey          string
	ConversationID string
}
type ConversationLink struct {
	ID                     string
	AccountID              string
	ConversationID         string
	ResourceType           string
	ResourceID             string
	CreatedByParticipantID sql.NullString
	CreatedAt              time.Time
}

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 CountDeletedRecordsByResourceAndResourceIDParams

type CountDeletedRecordsByResourceAndResourceIDParams struct {
	ResourceType string
	ResourceID   string
}

type CountEmailInboxesByDomainParams

type CountEmailInboxesByDomainParams struct {
	AccountID     string
	EmailDomainID string
}

type CountUnseenAnnouncementsByUserAccountsRow

type CountUnseenAnnouncementsByUserAccountsRow struct {
	AccountID string
	Unread    int64
}

type CountUnseenAnnouncementsParams

type CountUnseenAnnouncementsParams struct {
	AccountUserID string
	AccountID     sql.NullString
}

type CountUnseenNotificationsByUserAccountsRow

type CountUnseenNotificationsByUserAccountsRow struct {
	AccountID string
	Unread    int64
}

type CountVisibleMessagesAfterParams

type CountVisibleMessagesAfterParams struct {
	ConversationID string
	AfterSequence  sql.NullInt64
}

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 CreateBlockParams struct {
	ID                   string
	AccountID            string
	BlockerAccountUserID string
	BlockedAccountUserID string
}

type CreateConversationLinkParams

type CreateConversationLinkParams struct {
	ID                     string
	AccountID              string
	ConversationID         string
	ResourceType           string
	ResourceID             string
	CreatedByParticipantID sql.NullString
}

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 CreateDMKeyParams struct {
	AccountID      string
	DmKey          string
	ConversationID string
}

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 CreateIdempotencyKeyParams

type CreateIdempotencyKeyParams struct {
	TypeID         string
	ServiceName    string
	Handler        string
	IdempotencyKey string
	ActorID        sql.NullString
	IdentityType   string
	ScopeHash      string
	RecoveryPoint  string
}

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 CreateMessagingReportParams

type CreateMessagingReportParams struct {
	ID                    string
	AccountID             string
	ConversationID        string
	MessageID             sql.NullString
	ReporterAccountUserID string
	Reason                string
}

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 DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type DcLocation

type DcLocation struct {
	ID             string
	Location       string
	AccountID      string
	CreatedAt      time.Time
	UpdatedAt      time.Time
	OwnerAccountID string
}

type DeleteBlockParams

type DeleteBlockParams struct {
	BlockerAccountUserID string
	BlockedAccountUserID string
}

type DeleteConversationLinkParams

type DeleteConversationLinkParams struct {
	ID             string
	ConversationID string
	AccountID      string
}

type DeleteEmailDomainParams

type DeleteEmailDomainParams struct {
	ID        string
	AccountID string
}

type DeleteEmailInboxParams

type DeleteEmailInboxParams struct {
	ID        string
	AccountID string
}

type DeleteMessagingGroupMemberByIDParams

type DeleteMessagingGroupMemberByIDParams struct {
	ID      string
	GroupID string
}

type DeleteMessagingGroupParams

type DeleteMessagingGroupParams struct {
	ID        string
	AccountID string
}

type DeleteSupportRouteParams

type DeleteSupportRouteParams struct {
	AccountID         string
	RelationAccountID string
}

type DeletedRecord

type DeletedRecord struct {
	ID           int64
	DeletedAt    time.Time
	ResourceType string
	ResourceID   string
	Data         json.RawMessage
}

type Delivery

type Delivery struct {
	ID                 string
	Number             string
	SalesOrderID       string
	AccountID          string
	DeliveryStatusCode string
	AcceptedAt         sql.NullTime
	RejectedAt         sql.NullTime
	CreatedAt          time.Time
	UpdatedAt          time.Time
}

type DeliveryLine

type DeliveryLine struct {
	ID                   string
	DeliveryID           string
	ReceivingOrderLineID string
	QuantityID           string
	UnitCostID           string
	StorageLocationID    sql.NullString
	AcceptedAt           sql.NullTime
	RejectedAt           sql.NullTime
	LotID                sql.NullString
	CreatedAt            time.Time
	UpdatedAt            time.Time
}

type DeliveryStatus

type DeliveryStatus struct {
	ID        string
	Code      string
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

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 DemandOverrideType struct {
	ID        string
	Code      string
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

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 DepartmentsPick struct {
	A string
	B string
}

type DismissNotificationsByConversationParams

type DismissNotificationsByConversationParams struct {
	RecipientAccountUserID string
	ConversationID         sql.NullString
}

type DismissNotificationsBySourceMessageParams

type DismissNotificationsBySourceMessageParams struct {
	AccountID       string
	SourceMessageID sql.NullString
}

type DocApiKey

type DocApiKey struct {
	ID              int64
	TypeID          string
	ApiKeyID        string
	OwnerAccountID  string
	EncryptedSecret string
	CreatedAt       time.Time
	UpdatedAt       time.Time
}

type EdiRun

type EdiRun struct {
	ID           string
	CompletedAt  time.Time
	AccountID    string
	CreatedAt    time.Time
	HasSucceeded bool
	Failures     json.RawMessage
	UpdatedAt    time.Time
}

type EmailDomain

type EmailDomain struct {
	ID         string
	AccountID  string
	Domain     string
	Status     string
	DkimTokens db.NullableRawMessage
	VerifiedAt sql.NullTime
	CreatedAt  time.Time
	UpdatedAt  time.Time
}

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 EmailRecipient struct {
	ID         string
	Email      string
	CreatedAt  time.Time
	UpdatedAt  time.Time
	EmailLogID sql.NullString
}

type ErrorLog

type ErrorLog struct {
	ID                string
	AffectedUserID    sql.NullString
	ApiLocationCode   string
	PublicMessage     string
	PrivateMessage    sql.NullString
	Name              string
	ErrorSeverityCode string
	LocationFile      string
	LocationMethod    string
	CreatedAt         time.Time
	UpdatedAt         time.Time
	AccountID         sql.NullString
}

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 FindEmailThreadConversationRow

type FindEmailThreadConversationRow struct {
	ConversationID string
	EmailInboxID   string
}

type FulfillmentPolicy

type FulfillmentPolicy struct {
	ID        string
	Code      string
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

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 GetAccountUserIDByUserAndAccountParams

type GetAccountUserIDByUserAndAccountParams struct {
	UserID    string
	AccountID string
}

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 GetBlockByPairParams struct {
	BlockerAccountUserID string
	BlockedAccountUserID string
}

type GetConversationByIDParams

type GetConversationByIDParams struct {
	ID        string
	AccountID string
}

type GetCustomerSupportConversationParams

type GetCustomerSupportConversationParams struct {
	AccountID         string
	RelationAccountID sql.NullString
}

type GetDMConversationIDParams

type GetDMConversationIDParams struct {
	AccountID string
	DmKey     string
}

type GetEffectiveNotificationPreferenceParams

type GetEffectiveNotificationPreferenceParams struct {
	AccountUserID string
	Category      string
}

type GetEmailDomainByIDParams

type GetEmailDomainByIDParams struct {
	ID        string
	AccountID string
}

type GetEmailInboxByIDParams

type GetEmailInboxByIDParams struct {
	ID        string
	AccountID string
}

type GetIdempotencyKeyByScopeHashParams

type GetIdempotencyKeyByScopeHashParams struct {
	ServiceName string
	ScopeHash   string
}

type GetInboxRecordByMessageAndHandlerParams

type GetInboxRecordByMessageAndHandlerParams struct {
	MessageID string
	Handler   string
}

type GetLockedOutboxMessagesByIDsParams

type GetLockedOutboxMessagesByIDsParams struct {
	Ids       []int64
	LockOwner sql.NullString
}

type GetMessageByClientIDParams

type GetMessageByClientIDParams struct {
	ConversationID  string
	ClientMessageID sql.NullString
}

type GetMessageByIDParams

type GetMessageByIDParams struct {
	ID        string
	AccountID string
}

type GetMessagingGroupByIDParams

type GetMessagingGroupByIDParams struct {
	ID        string
	AccountID string
}

type GetNotificationByIDParams

type GetNotificationByIDParams struct {
	ID                     string
	RecipientAccountUserID string
}

type GetNotificationPreferenceByUserCategoryParams

type GetNotificationPreferenceByUserCategoryParams struct {
	AccountUserID string
	Category      string
}

type GetParticipantByAgentConfigIDParams

type GetParticipantByAgentConfigIDParams struct {
	ConversationID string
	AgentConfigID  sql.NullString
}

type GetParticipantByIDParams

type GetParticipantByIDParams struct {
	ID             string
	ConversationID string
}

type GetParticipantByRelationAccountParams

type GetParticipantByRelationAccountParams struct {
	ConversationID    string
	RelationAccountID sql.NullString
}

type GetParticipantParams

type GetParticipantParams struct {
	ConversationID string
	AccountUserID  sql.NullString
}

type GetSupportRouteParams

type GetSupportRouteParams struct {
	AccountID         string
	RelationAccountID string
}

type GetUserContactByAccountUserIDRow

type GetUserContactByAccountUserIDRow struct {
	Email sql.NullString
	Name  sql.NullString
}

type HideConversationParams

type HideConversationParams struct {
	ConversationID string
	AccountUserID  sql.NullString
}
type HubspotAccountUserLink struct {
	ID                string
	AccountUserID     string
	HubspotContactID  string
	CreatedAt         time.Time
	UpdatedAt         time.Time
	OwnerAccountID    string
	CustomerAccountID string
}

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 HubspotSyncJob struct {
	ID             string
	AccountID      string
	Status         string
	DryRun         bool
	GoliveCutoffAt sql.NullTime
	Cursors        json.RawMessage
	Counts         json.RawMessage
	LastError      sql.NullString
	StartedAt      sql.NullTime
	CompletedAt    sql.NullTime
	CreatedAt      time.Time
	UpdatedAt      time.Time
}

type HubspotSyncRecord

type HubspotSyncRecord struct {
	ID           string
	AccountID    string
	AugnoType    string
	AugnoID      string
	HubspotType  string
	HubspotID    string
	SyncHash     sql.NullString
	LastSyncedAt sql.NullTime
	LastError    sql.NullString
	CreatedAt    time.Time
	UpdatedAt    time.Time
}

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 InventoryAllocation struct {
	ID                 string
	InventoryReceiptID string
	InventoryIssueID   string
	QuantityID         string
	UnitCostID         string
	TotalCostID        string
	CreatedAt          time.Time
	UpdatedAt          time.Time
}

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 InventoryLog struct {
	ID         string
	ItemID     string
	QuantityID string
	CreatedAt  time.Time
	AccountID  string
	UpdatedAt  time.Time
}

type InventoryPolicyType

type InventoryPolicyType struct {
	ID        string
	Code      string
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

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 InventoryReceiptStatus struct {
	ID        string
	Code      string
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Inventoryissuestatus

type Inventoryissuestatus struct {
	ID        string
	Code      string
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Invoice

type Invoice struct {
	ID               string
	Number           string
	Note             sql.NullString
	HasBeenSent      bool
	IsPaidInFull     bool
	SalesOrderID     string
	BillingAddressID string
	AccountID        string
	CreatedAt        time.Time
	UpdatedAt        time.Time
	IsOverPaid       bool
	IsEdiSent        bool
}

type InvoiceLine

type InvoiceLine struct {
	ID               string
	InvoiceID        string
	QuantityID       string
	SalesOrderLineID string
	CreatedAt        time.Time
	UpdatedAt        time.Time
}

type Item

type Item struct {
	ID             string
	Sku            string
	Description    sql.NullString
	Notes          sql.NullString
	CreatedAt      time.Time
	UpdatedAt      time.Time
	DeletedAt      sql.NullTime
	UnitValueID    string
	BurnRateID     string
	AccountID      string
	ItemTypeCode   string
	UnitCostID     string
	ItemCategoryID string
	IsDirty        bool
}

type ItemAttribute

type ItemAttribute struct {
	A string
	B string
}

type ItemCategoriesProperty

type ItemCategoriesProperty struct {
	A string
	B string
}

type ItemCategoriesQuantityDiscount

type ItemCategoriesQuantityDiscount struct {
	A string
	B string
}

type ItemCategory

type ItemCategory struct {
	ID                   string
	Name                 string
	Notes                sql.NullString
	CreatedAt            time.Time
	UpdatedAt            time.Time
	AccountID            sql.NullString
	ItemCategoryTypeCode string
	UnitGroupID          string
}

type ItemCategoryType

type ItemCategoryType struct {
	ID        string
	CreatedAt time.Time
	Name      string
	Code      string
	UpdatedAt time.Time
}

type ItemType

type ItemType struct {
	ID        string
	CreatedAt time.Time
	UpdatedAt time.Time
	Name      sql.NullString
	Code      string
}

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 JournalPosting struct {
	ID                   string
	AccountTransactionID string
	AccountID            string
	PostingSideCode      string
	AmountID             string
	CreatedAt            time.Time
	UpdatedAt            time.Time
}

type LabelSize

type LabelSize struct {
	ID        string
	Name      string
	Code      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type LabelType

type LabelType struct {
	ID        string
	Name      string
	Code      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

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 ListConversationLinksParams

type ListConversationLinksParams struct {
	ConversationID string
	AccountID      string
}

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 ListMessagesParams struct {
	ConversationID string
	BeforeSequence sql.NullInt64
	AfterSequence  sql.NullInt64
	Limit          int32
}

type ListMessagesVisibleParams

type ListMessagesVisibleParams struct {
	ConversationID string
	BeforeSequence sql.NullInt64
	AfterSequence  sql.NullInt64
	Limit          int32
}

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 LockConversationSequenceParams

type LockConversationSequenceParams struct {
	ID        string
	AccountID string
}

type LockOutboxMessagesByIDsParams

type LockOutboxMessagesByIDsParams struct {
	LockOwner           sql.NullString
	LockDurationSeconds interface{}
	Ids                 []int64
}

type Lot

type Lot struct {
	ID             string
	AccountID      string
	ItemID         string
	LotNumber      string
	ManufacturedAt sql.NullTime
	ExpiresAt      sql.NullTime
	CreatedAt      time.Time
	UpdatedAt      time.Time
}

type Machine

type Machine struct {
	ID               string
	AccountID        string
	Name             string
	Notes            sql.NullString
	CreatedAt        time.Time
	UpdatedAt        time.Time
	ProductionStepID sql.NullString
	SerialNumber     string
	DepartmentID     string
}

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 MachineDowntimeReason struct {
	ID        string
	Code      string
	Name      string
	OeeBucket string
	IsPlanned bool
	SortOrder int32
	CreatedAt time.Time
	UpdatedAt time.Time
}

type MarkEmailDomainVerifiedParams

type MarkEmailDomainVerifiedParams struct {
	ID        string
	AccountID string
}

type MarkInboxRecordFailedParams

type MarkInboxRecordFailedParams struct {
	LastError sql.NullString
	ID        int64
}

type MarkNotificationDismissedParams

type MarkNotificationDismissedParams struct {
	ID                     string
	RecipientAccountUserID string
}

type MarkNotificationReadParams

type MarkNotificationReadParams struct {
	ID                     string
	RecipientAccountUserID string
}

type MarkNotificationSeenParams

type MarkNotificationSeenParams struct {
	ID                     string
	RecipientAccountUserID string
}

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 Material

type Material struct {
	ID           string
	CreatedAt    time.Time
	UpdatedAt    time.Time
	ItemID       string
	OrderPointID string
	LeadTimeID   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 MessageInbox struct {
	ID              int64
	MessageID       string
	ServiceName     string
	Handler         string
	MessageType     string
	RequestID       sql.NullString
	ParentMessageID sql.NullString
	Status          string
	Attempts        int32
	LastError       sql.NullString
	ReceivedAt      time.Time
	ProcessedAt     sql.NullTime
}

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 MessageReceipt struct {
	ID             string
	MessageID      string
	ConversationID string
	AccountUserID  string
	DeliveredAt    sql.NullTime
	ReadAt         sql.NullTime
	CreatedAt      time.Time
	UpdatedAt      time.Time
}

type MessagingBlock

type MessagingBlock struct {
	ID                   string
	AccountID            string
	BlockerAccountUserID string
	BlockedAccountUserID string
	CreatedAt            time.Time
}

type MessagingGroup

type MessagingGroup struct {
	ID                     string
	AccountID              string
	Name                   string
	CreatedByAccountUserID sql.NullString
	CreatedAt              time.Time
	UpdatedAt              time.Time
}

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 MessagingReport struct {
	ID                    string
	AccountID             string
	ConversationID        string
	MessageID             sql.NullString
	ReporterAccountUserID string
	Reason                string
	CreatedAt             time.Time
}

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 NotificationPreference struct {
	ID            string
	AccountID     string
	AccountUserID string
	Category      string
	InAppEnabled  bool
	EmailEnabled  bool
	PushEnabled   bool
	Digest        string
	CreatedAt     time.Time
	UpdatedAt     time.Time
}

type OnboardingStatus

type OnboardingStatus struct {
	ID        string
	Name      string
	Code      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type OperatingCalendar

type OperatingCalendar struct {
	ID                        string
	AccountID                 string
	Code                      string
	Name                      string
	OperatingCalendarKindCode string
	DaysOfWeek                string
	CutoffAt                  sql.NullString
	Timezone                  sql.NullString
	IsDefault                 bool
	CreatedAt                 time.Time
	UpdatedAt                 time.Time
	DeletedAt                 sql.NullTime
}

type OperatingCalendarClosure

type OperatingCalendarClosure struct {
	ID                  string
	AccountID           string
	OperatingCalendarID string
	ClosedOn            time.Time
	Name                string
	CreatedAt           time.Time
	UpdatedAt           time.Time
}

type OrderDiscount

type OrderDiscount struct {
	ID               string
	Name             string
	Code             string
	Percentage       float64
	Value            float64
	DiscountTypeCode string
	AccountID        string
	CreatedAt        time.Time
	UpdatedAt        time.Time
}

type OrderEmailContact

type OrderEmailContact struct {
	ID                   string
	SalesOrderID         string
	AccountUserID        string
	NotificationTypeCode string
	CreatedAt            time.Time
	UpdatedAt            time.Time
}

type OrderPaymentIntent

type OrderPaymentIntent struct {
	ID              string
	PaymentIntentID string
	CreatedAt       time.Time
	UpdatedAt       time.Time
	SalesOrderID    string
}

type ParentChildProductionStep

type ParentChildProductionStep struct {
	A string
	B string
}

type Part

type Part struct {
	ID        string
	CreatedAt time.Time
	UpdatedAt time.Time
	ItemID    string
}

type PaymentTerm

type PaymentTerm struct {
	ID        string
	IsActive  bool
	Name      string
	AccountID sql.NullString
	CreatedAt time.Time
	UpdatedAt time.Time
}

type PaymentTermsRegistrationFlow

type PaymentTermsRegistrationFlow struct {
	A string
	B string
}

type Permission

type Permission struct {
	ID                  string
	Code                string
	Name                string
	Description         sql.NullString
	CreatedAt           time.Time
	UpdatedAt           time.Time
	PermissionGroupCode string
}

type PermissionGroup

type PermissionGroup struct {
	ID          string
	Code        string
	Name        string
	Description sql.NullString
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

type Pick

type Pick struct {
	ID           string
	Number       string
	SalesOrderID string
	AccountID    string
	FinishedAt   sql.NullTime
	CreatedAt    time.Time
	UpdatedAt    time.Time
}

type PickLine

type PickLine struct {
	ID               string
	PickID           string
	QuantityID       string
	SalesOrderLineID string
	CreatedAt        time.Time
	UpdatedAt        time.Time
	PackedAt         sql.NullTime
}

type PortalDomain

type PortalDomain struct {
	ID         string
	AccountID  string
	Domain     string
	Status     string
	DnsRecords json.RawMessage
	VerifiedAt sql.NullTime
	CreatedAt  time.Time
	UpdatedAt  time.Time
}

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 Priority

type Priority struct {
	ID        string
	Name      string
	Code      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Product

type Product struct {
	ID              string
	CreatedAt       time.Time
	UpdatedAt       time.Time
	ItemID          string
	ProductTypeCode string
	ProductLineID   sql.NullString
	IsPortalReady   bool
}

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 ProductLineTarget struct {
	ID            string
	StartDate     time.Time
	EndDate       time.Time
	ProductLineID string
	SalesRepID    string
	AccountID     string
	CreatedAt     time.Time
	AmountID      string
	UpdatedAt     time.Time
}

type ProductLinesQuantityDiscount

type ProductLinesQuantityDiscount struct {
	A string
	B string
}

type ProductType

type ProductType struct {
	ID        string
	Name      string
	Code      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Production

type Production struct {
	ID               string
	CreatedAt        time.Time
	UpdatedAt        time.Time
	ItemID           string
	QuantityID       string
	ProductionStepID sql.NullString
}

type ProductionRun

type ProductionRun struct {
	ID                string
	ResponsibleUserID string
	Number            string
	CreatedAt         time.Time
	UpdatedAt         time.Time
	AccountID         string
	CompletedAt       sql.NullTime
	StartedAt         sql.NullTime
}

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 ProductionScheduleLineOrder

type ProductionScheduleLineOrder struct {
	ID                       string
	AccountID                string
	ProductionScheduleID     string
	ProductionScheduleLineID string
	SalesOrderID             string
	SalesOrderLineID         string
	AllocatedQuantity        string
	CreatedAt                time.Time
	UpdatedAt                time.Time
}

type ProductionScheduleLineStatus

type ProductionScheduleLineStatus struct {
	ID        string
	Code      string
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

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 ProductionScheduleStatus

type ProductionScheduleStatus struct {
	ID        string
	Code      string
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type ProductionShift

type ProductionShift struct {
	ID              string
	AccountID       string
	DepartmentID    sql.NullString
	Code            string
	Name            string
	StartTime       string
	EndTime         string
	CrossesMidnight bool
	DaysOfWeek      string
	IsActive        bool
	SortOrder       int32
	CreatedAt       time.Time
	UpdatedAt       time.Time
}

type ProductionStep

type ProductionStep struct {
	ID                string
	Name              string
	Notes             sql.NullString
	CreatedAt         time.Time
	UpdatedAt         time.Time
	AccountID         string
	ScanningStationID sql.NullString
	Allowances        string
	LaborRateID       string
	LaborTimeID       string
	LevelingFactor    string
	OverheadRateID    string
	DepartmentID      sql.NullString
}

type PromoteDraftMessageParams

type PromoteDraftMessageParams struct {
	Sequence                sql.NullInt64
	Kind                    string
	ApprovedByAccountUserID sql.NullString
	Preview                 sql.NullString
	ID                      string
	AccountID               string
}

type PromoteScheduledMessageParams

type PromoteScheduledMessageParams struct {
	Sequence sql.NullInt64
	ID       string
}

type Property

type Property struct {
	ID        string
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
	IsPublic  bool
	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 Quantity

type Quantity struct {
	ID        string
	Value     string
	CreatedAt time.Time
	UpdatedAt time.Time
	UnitID    string
}

type QuantityDiscount

type QuantityDiscount struct {
	ID        string
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
	AccountID string
}

type QuantityDiscountTier

type QuantityDiscountTier struct {
	ID                 string
	DiscountPercentage string
	Name               string
	Threshold          string
	ParentTierID       sql.NullString
	CreatedAt          time.Time
	UpdatedAt          time.Time
	QuantityDiscountID sql.NullString
}

type QuantityDiscountsAttribute

type QuantityDiscountsAttribute struct {
	A string
	B string
}

type QuantityDiscountsUnit

type QuantityDiscountsUnit struct {
	A string
	B string
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) AcquireTaskLease

func (q *Queries) AcquireTaskLease(ctx context.Context, arg AcquireTaskLeaseParams) (sql.Result, error)

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 (q *Queries) CleanupExpiredOutboxLocksByIDs(ctx context.Context, ids []int64) (sql.Result, error)

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 (q *Queries) CountDeletedRecordsByResourceAndResourceID(ctx context.Context, arg CountDeletedRecordsByResourceAndResourceIDParams) (int64, error)

func (*Queries) CountEmailInboxesByDomain

func (q *Queries) CountEmailInboxesByDomain(ctx context.Context, arg CountEmailInboxesByDomainParams) (int64, error)

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 (q *Queries) CountUnseenNotifications(ctx context.Context, recipientAccountUserID string) (int64, error)

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 (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 (q *Queries) CreateIdempotencyKey(ctx context.Context, arg CreateIdempotencyKeyParams) (int64, error)

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 (q *Queries) CreateOutboxMessage(ctx context.Context, arg CreateOutboxMessageParams) (int64, error)

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 (q *Queries) DeleteConversationLink(ctx context.Context, arg DeleteConversationLinkParams) (int64, error)

func (*Queries) DeleteEmailDomain

func (q *Queries) DeleteEmailDomain(ctx context.Context, arg DeleteEmailDomainParams) (int64, error)

func (*Queries) DeleteEmailInbox

func (q *Queries) DeleteEmailInbox(ctx context.Context, arg DeleteEmailInboxParams) (int64, error)

func (*Queries) DeleteExpiredIdempotencyKeys

func (q *Queries) DeleteExpiredIdempotencyKeys(ctx context.Context, limit int32) (sql.Result, error)

func (*Queries) DeleteMessageAttachmentByID

func (q *Queries) DeleteMessageAttachmentByID(ctx context.Context, id string) error

Deletes a single attachment row after its S3 object has been removed.

func (*Queries) DeleteMessagingGroup

func (q *Queries) DeleteMessagingGroup(ctx context.Context, arg DeleteMessagingGroupParams) (int64, error)

func (*Queries) DeleteMessagingGroupMemberByID

func (q *Queries) DeleteMessagingGroupMemberByID(ctx context.Context, arg DeleteMessagingGroupMemberByIDParams) (int64, error)

func (*Queries) DeleteMessagingGroupMembers

func (q *Queries) DeleteMessagingGroupMembers(ctx context.Context, groupID string) error

Removes every member of a roster (used before re-seeding, and on group delete).

func (*Queries) DeleteSupportRoute

func (q *Queries) DeleteSupportRoute(ctx context.Context, arg DeleteSupportRouteParams) (int64, error)

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

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 (q *Queries) GetDMConversationID(ctx context.Context, arg GetDMConversationIDParams) (string, error)

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 (q *Queries) GetEmailDomainByDomain(ctx context.Context, domain string) (EmailDomain, error)

func (*Queries) GetEmailDomainByID

func (q *Queries) GetEmailDomainByID(ctx context.Context, arg GetEmailDomainByIDParams) (EmailDomain, error)

func (*Queries) GetEmailInboxByAddress

func (q *Queries) GetEmailInboxByAddress(ctx context.Context, address string) (EmailInbox, error)

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

func (q *Queries) GetEmailInboxByIDSystem(ctx context.Context, id string) (EmailInbox, error)

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 (q *Queries) GetEmailMessageByRfcID(ctx context.Context, rfcMessageID string) (EmailMessage, error)

func (*Queries) GetIdempotencyKeyByScopeHash

func (q *Queries) GetIdempotencyKeyByScopeHash(ctx context.Context, arg GetIdempotencyKeyByScopeHashParams) (ServiceIdempotencyKey, error)

func (*Queries) GetIdempotencyKeyByTypeID

func (q *Queries) GetIdempotencyKeyByTypeID(ctx context.Context, typeID string) (ServiceIdempotencyKey, error)

func (*Queries) GetIdempotencyRecoveryPoint

func (q *Queries) GetIdempotencyRecoveryPoint(ctx context.Context, typeID string) (string, error)

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 (q *Queries) GetMessageByID(ctx context.Context, arg GetMessageByIDParams) (Message, error)

func (*Queries) GetMessagesByIDs

func (q *Queries) GetMessagesByIDs(ctx context.Context, ids []string) ([]Message, error)

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) GetParticipant

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

func (q *Queries) GetUserIDByAccountUserID(ctx context.Context, id string) (string, error)

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 (q *Queries) ListBlocks(ctx context.Context, blockerAccountUserID string) ([]MessagingBlock, error)

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 (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

func (q *Queries) ListDueScheduledMessages(ctx context.Context, limit int32) ([]Message, error)

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 (q *Queries) ListEmailDomainsByAccount(ctx context.Context, accountID string) ([]EmailDomain, error)

func (*Queries) ListEmailInboxesByAccount

func (q *Queries) ListEmailInboxesByAccount(ctx context.Context, accountID string) ([]EmailInbox, error)

func (*Queries) ListMessageAttachmentsByMessageIDs

func (q *Queries) ListMessageAttachmentsByMessageIDs(ctx context.Context, messageIds []string) ([]MessageAttachment, error)

func (*Queries) ListMessages

func (q *Queries) ListMessages(ctx context.Context, arg ListMessagesParams) ([]Message, error)

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 (q *Queries) ListMessagingGroupMembers(ctx context.Context, groupID string) ([]MessagingGroupMember, error)

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 (q *Queries) ListNotificationPreferences(ctx context.Context, accountUserID string) ([]NotificationPreference, error)

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 (q *Queries) ListParticipants(ctx context.Context, conversationID string) ([]ConversationParticipant, error)

func (*Queries) ListPurgeableMessageAttachments

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 (q *Queries) MarkAllNotificationsSeen(ctx context.Context, recipientAccountUserID string) (int64, error)

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 (q *Queries) MarkInboxRecordProcessed(ctx context.Context, id int64) error

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 (q *Queries) MarkOutboxMessagesPublished(ctx context.Context, ids []int64) error

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 (q *Queries) PurgeProcessedInboxMessages(ctx context.Context, arg PurgeProcessedInboxMessagesParams) (sql.Result, error)

func (*Queries) PurgePublishedOutboxMessagesByIDs

func (q *Queries) PurgePublishedOutboxMessagesByIDs(ctx context.Context, arg PurgePublishedOutboxMessagesByIDsParams) (sql.Result, error)

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 (q *Queries) RenewTaskLease(ctx context.Context, arg RenewTaskLeaseParams) (sql.Result, error)

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 (q *Queries) SelectExpiredOutboxLockIDs(ctx context.Context, limit int32) ([]int64, error)

func (*Queries) SelectOutboxMessageIDsForLock

func (q *Queries) SelectOutboxMessageIDsForLock(ctx context.Context, limit int32) ([]int64, error)

func (*Queries) SelectPublishedOutboxMessageIDsForPurge

func (q *Queries) SelectPublishedOutboxMessageIDsForPurge(ctx context.Context, arg SelectPublishedOutboxMessageIDsForPurgeParams) ([]int64, error)

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 (q *Queries) TryInsertInboxRecord(ctx context.Context, arg TryInsertInboxRecordParams) (sql.Result, error)

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 (q *Queries) UpdateMessagingGroupName(ctx context.Context, arg UpdateMessagingGroupNameParams) (int64, error)

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.

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type Rate

type Rate struct {
	ID                string
	Value             string
	CreatedAt         time.Time
	UpdatedAt         time.Time
	NumeratorUnitID   string
	DenominatorUnitID string
}

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 ReceivingOrder struct {
	ID          string
	Number      string
	OrderID     string
	AccountID   string
	CompletedAt sql.NullTime
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

type ReceivingOrderLine

type ReceivingOrderLine struct {
	ID               string
	ReceivingOrderID string
	QuantityID       string
	SalesOrderLineID string
	CreatedAt        time.Time
	UpdatedAt        time.Time
	StockedAt        sql.NullTime
}

type RefreshToken

type RefreshToken struct {
	Token     string
	UserID    string
	ExpiresAt time.Time
	RevokedAt sql.NullTime
	CreatedAt time.Time
	UpdatedAt time.Time
}

type RegistrationFlow

type RegistrationFlow struct {
	ID        string
	Name      string
	AccountID string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type RegistrationFlowsShippingTerm

type RegistrationFlowsShippingTerm struct {
	A string
	B string
}

type RegistrationQueue

type RegistrationQueue struct {
	ID                    int64
	Email                 string
	Name                  string
	PlanCode              string
	RegistrationSessionID string
	Contacted             bool
	CreatedAt             time.Time
	UpdatedAt             time.Time
}

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 ReleaseTaskLeaseParams struct {
	Name   string
	Holder string
}

type RenewTaskLeaseParams

type RenewTaskLeaseParams struct {
	Column1 interface{}
	Name    string
	Holder  string
}

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 ResolveSupportRouteParams

type ResolveSupportRouteParams struct {
	AccountID         string
	RelationAccountID string
}

type Role

type Role struct {
	ID           string
	Name         string
	RoleTypeCode string
	AccountID    sql.NullString
	CreatedAt    time.Time
	UpdatedAt    time.Time
}

type RolePermission

type RolePermission struct {
	ID             string
	Create         bool
	Read           bool
	Update         bool
	Delete         bool
	RoleID         string
	PermissionCode string
	CreatedAt      time.Time
	UpdatedAt      time.Time
}

type RoleType

type RoleType struct {
	ID        string
	Code      string
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

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 SalesOrderStatus struct {
	ID        string
	Name      string
	Code      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type SalesOrderType

type SalesOrderType struct {
	ID        string
	Code      string
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type SandboxAccount

type SandboxAccount struct {
	ID             int64
	TypeID         string
	CreatedAt      time.Time
	UpdatedAt      time.Time
	OwnerAccountID string
	AccountID      string
}

type ScanningStation

type ScanningStation struct {
	ID                      string
	Name                    string
	Notes                   sql.NullString
	CreatedAt               time.Time
	UpdatedAt               time.Time
	DepartmentID            string
	AccountID               string
	ScanningStationTypeCode string
	LabelSizeCode           sql.NullString
	LabelTypeCode           sql.NullString
	MaterialCheckRequired   bool
}

type ScanningStationType

type ScanningStationType struct {
	ID        string
	CreatedAt time.Time
	Name      string
	Code      string
	UpdatedAt time.Time
}

type ScheduleDeviationType

type ScheduleDeviationType struct {
	ID        string
	Code      string
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

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 SetConversationAudienceCustomerParams

type SetConversationAudienceCustomerParams struct {
	ID        string
	AccountID string
}

type SetConversationLegalHoldParams

type SetConversationLegalHoldParams struct {
	LegalHold bool
	ID        string
	AccountID string
}

type SetDraftMessageStatusParams

type SetDraftMessageStatusParams struct {
	Status    string
	ID        string
	AccountID string
}

type SetIdempotencyResponseParams

type SetIdempotencyResponseParams struct {
	ResponseCode  sql.NullInt32
	ResponseBody  *json.RawMessage
	RecoveryPoint string
	TypeID        string
}

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 SetParticipantMembershipByIDParams

type SetParticipantMembershipByIDParams struct {
	Membership     string
	ID             string
	ConversationID string
}

type SetParticipantMembershipParams

type SetParticipantMembershipParams struct {
	Membership     string
	ConversationID string
	AccountUserID  sql.NullString
}

type SetParticipantNotificationsParams

type SetParticipantNotificationsParams struct {
	Notifications  string
	MutedUntil     sql.NullTime
	ConversationID string
	AccountUserID  sql.NullString
}

type SetParticipantRoleParams

type SetParticipantRoleParams struct {
	Role           string
	ConversationID string
	AccountUserID  sql.NullString
}

type Settlement

type Settlement struct {
	ID                string
	ResponsibleUserID sql.NullString
	AccountID         string
	CreatedAt         time.Time
	UpdatedAt         time.Time
	Note              sql.NullString
	Number            string
}

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 ShipmentLine struct {
	ID               string
	ShipmentID       string
	SalesOrderLineID string
	QuantityID       string
	CreatedAt        time.Time
	UpdatedAt        time.Time
}

type ShipmentStatus

type ShipmentStatus struct {
	ID        string
	Name      string
	Code      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

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 ShippingTermFreeShippingRule

type ShippingTermFreeShippingRule struct {
	ID              string
	ShippingTermID  string
	CarrierOptionID string
	CreatedAt       time.Time
}

type SoftDeleteMessageParams

type SoftDeleteMessageParams struct {
	ID        string
	AccountID string
}

type StorageLocation

type StorageLocation struct {
	ID                      string
	AccountID               string
	AddressID               sql.NullString
	StorageLocationTypeCode string
	Name                    string
	ParentID                sql.NullString
	CreatedAt               time.Time
	UpdatedAt               time.Time
}

type StorageLocationType

type StorageLocationType struct {
	ID        string
	Code      string
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type StripeEventLog

type StripeEventLog struct {
	ID        string
	EventID   string
	EventType string
	ObjectID  string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type SupersedeDraftMessagesForThreadParams

type SupersedeDraftMessagesForThreadParams struct {
	ConversationID        string
	SourceThreadMessageID sql.NullString
}

type SupplierMaterial

type SupplierMaterial struct {
	ID                  string
	MaterialID          string
	SupplierAccountID   string
	SupplierPartNumber  string
	SupplierDescription sql.NullString
	IsActive            bool
	OwnerAccountID      string
	CreatedAt           time.Time
	UpdatedAt           time.Time
}

type SupportRoute

type SupportRoute struct {
	ID                  string
	AccountID           string
	RelationAccountID   string
	GroupConversationID string
	CreatedAt           time.Time
	UpdatedAt           time.Time
}

type SysProperty

type SysProperty struct {
	ID                  string
	SysPropertyTypeCode string
	Value               int32
	AccountID           string
	CreatedAt           time.Time
	UpdatedAt           time.Time
}

type SysPropertyType

type SysPropertyType struct {
	ID        string
	Name      string
	Code      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Target

type Target struct {
	ID         string
	StartDate  time.Time
	EndDate    time.Time
	SalesRepID string
	AccountID  string
	CreatedAt  time.Time
	AmountID   string
	UpdatedAt  time.Time
}

type TaskLease

type TaskLease struct {
	Name       string
	Holder     string
	AcquiredAt time.Time
	ExpiresAt  time.Time
}

type Territory

type Territory struct {
	ID            string
	StartZipcode  sql.NullInt32
	EndZipcode    sql.NullInt32
	State         string
	SalesRepID    string
	AccountID     string
	ProductLineID sql.NullString
	CreatedAt     time.Time
	UpdatedAt     time.Time
}

type TokenPackPurchase

type TokenPackPurchase struct {
	ID                      string
	AccountID               string
	PackID                  string
	TokenCount              int64
	PriceCents              int64
	StripePaymentIntentID   sql.NullString
	StripeCheckoutSessionID sql.NullString
	Status                  string
	CreatedAt               time.Time
	UpdatedAt               time.Time
}

type TouchMessagingGroupParams

type TouchMessagingGroupParams struct {
	ID        string
	AccountID string
}

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 TransactionAllocation struct {
	ID            string
	TransactionID string
	AmountID      string
	InvoiceID     string
	SettlementID  sql.NullString
	CreatedAt     time.Time
	UpdatedAt     time.Time
	Note          sql.NullString
}

type TransactionMethod

type TransactionMethod struct {
	ID        string
	Name      string
	Code      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type TransactionType

type TransactionType struct {
	ID                   string
	Name                 string
	Code                 string
	IsCommissionAffected bool
	CreatedAt            time.Time
	UpdatedAt            time.Time
}

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 Unit

type Unit struct {
	ID                string
	Name              string
	CreatedAt         time.Time
	UpdatedAt         time.Time
	AccountID         sql.NullString
	Abbreviation      string
	UnitDimensionCode string
	RatioNumerator    string
	RatioDenominator  string
	OffsetNumerator   string
	OffsetDenominator string
	IsBaseUnit        bool
}

type UnitGroup

type UnitGroup struct {
	ID           string
	Name         string
	Notes        sql.NullString
	CreatedAt    time.Time
	UpdatedAt    time.Time
	BaseUnitID   string
	AccountID    sql.NullString
	UnitTypeCode string
}

type UnitGroupUnit

type UnitGroupUnit struct {
	ID                 string
	CreatedAt          time.Time
	UpdatedAt          time.Time
	UnitGroupID        string
	UnitID             string
	DiscountPercentage string
	DiscountFixed      string
	IsVisible          bool
}

type UnitType

type UnitType struct {
	ID        string
	CreatedAt time.Time
	UpdatedAt time.Time
	Name      sql.NullString
	Code      string
}

type UpdateConversationParams

type UpdateConversationParams struct {
	ClearTitle interface{}
	Title      sql.NullString
	IsArchived sql.NullBool
	ID         string
	AccountID  string
}

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 UpdateMessagingGroupNameParams

type UpdateMessagingGroupNameParams struct {
	Name      string
	ID        string
	AccountID string
}

type UpsertAnnouncementDismissedParams

type UpsertAnnouncementDismissedParams struct {
	ID             string
	AnnouncementID string
	AccountUserID  string
}

type UpsertAnnouncementReadParams

type UpsertAnnouncementReadParams struct {
	ID             string
	AnnouncementID string
	AccountUserID  string
}

type UpsertAnnouncementSeenParams

type UpsertAnnouncementSeenParams struct {
	ID             string
	AnnouncementID string
	AccountUserID  string
}

type UpsertNotificationPreferenceParams

type UpsertNotificationPreferenceParams struct {
	ID            string
	AccountID     string
	AccountUserID string
	Category      string
	InAppEnabled  bool
	EmailEnabled  bool
	PushEnabled   bool
	Digest        string
}

type UpsertSupportRouteParams

type UpsertSupportRouteParams struct {
	ID                  string
	AccountID           string
	RelationAccountID   string
	GroupConversationID 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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL