Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ Reference docs are generated from the source code and live under `./reference/ar
- [Software Matching Helpers](./reference/architecture/data-mongo-sync/software-matching-helpers/software-matching-helpers.md), [Software Matching Service](./reference/architecture/data-mongo-sync/software-matching-service/software-matching-service.md)
- [Software Repository](./reference/architecture/data-mongo-sync/software-repository/software-repository.md)
- [Tenant Repository](./reference/architecture/data-mongo-sync/tenant-repository/tenant-repository.md)
- [Ticket Repository](./reference/architecture/data-mongo-sync/ticket-repository/ticket-repository.md)
- [Timetracking Repository](./reference/architecture/data-mongo-sync/timetracking-repository/timetracking-repository.md)
- [Tool Repository](./reference/architecture/data-mongo-sync/tool-repository/tool-repository.md)
- [User Repository](./reference/architecture/data-mongo-sync/user-repository/user-repository.md), [Invitation Query Repository](./reference/architecture/data-mongo-sync/user-repository/invitation-query-repository.md), [User Publication](./reference/architecture/data-mongo-sync/user-repository/user-publication.md), [User Query Repository](./reference/architecture/data-mongo-sync/user-repository/user-query-repository.md)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import com.openframe.data.document.ticket.filter.TicketQueryFilter;
import com.openframe.data.mongo.TenantAwareMongoTemplate;
import com.openframe.data.repository.cursor.CursorPosition;
import com.openframe.data.repository.ticket.CustomTicketRepository;
import com.openframe.data.repository.ticket.CustomTicketRepositoryImpl;
import com.openframe.data.repository.ticket.TicketRepositoryOperations;
import com.openframe.data.repository.ticket.TicketRepositoryOperationsImpl;
import com.openframe.data.repository.ticket.TicketRepository;
import com.openframe.data.repository.ticket.publishing.TicketAggregateSpec;
import com.openframe.publishing.api.OutboxPublisher;
Expand Down Expand Up @@ -113,7 +113,7 @@ void searchTickets_afterARawTicketId_newestFirstPastThatRow() {
@Test
void searchTickets_afterATicketThatWasRemoved_newestFirstPastThatId() {
// setup
CustomTicketRepository storedTickets = new CustomTicketRepositoryImpl(mongoTemplate, outboxPublisher, ticketSpec);
TicketRepositoryOperations storedTickets = new TicketRepositoryOperationsImpl(mongoTemplate, outboxPublisher, ticketSpec);
CursorPosition afterRow = new CursorPosition.RowId(AFTER_TICKET_ID);
Document pastTheRemovedTicket = new Document("_id", new Document("$lt", new ObjectId(AFTER_TICKET_ID)));
Document newestFirst = new Document(CREATED_AT, -1).append("_id", -1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import com.openframe.data.repository.cursor.KeysetCursor;
import com.openframe.data.repository.device.MachineRepository;
import com.openframe.data.repository.organization.OrganizationRepository;
import com.openframe.data.repository.ticket.CustomTicketRepository;
import com.openframe.data.repository.ticket.CustomTicketRepositoryImpl;
import com.openframe.data.repository.ticket.TicketRepositoryOperations;
import com.openframe.data.repository.ticket.TicketRepositoryOperationsImpl;
import com.openframe.data.repository.ticket.TicketRepository;
import com.openframe.data.repository.user.UserRepository;
import com.openframe.security.authentication.ActorType;
Expand Down Expand Up @@ -107,7 +107,7 @@ class TicketServicePaginationTest {
.build();

@SuppressWarnings("unchecked")
private final CustomTicketRepository cursorIssuer = new CustomTicketRepositoryImpl(
private final TicketRepositoryOperations cursorIssuer = new TicketRepositoryOperationsImpl(
mock(TenantAwareMongoTemplate.class), mock(ObjectProvider.class), mock(ObjectProvider.class));

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,10 @@ public enum AuditAction {
AI_DIALOG_RENAME("ai.dialog.rename", "AI chat renamed", CHANGE, DIALOG),
AI_DIALOG_RATING_SET("ai.dialog_rating.set", "AI chat rated", CHANGE, DIALOG),
AI_DIALOG_CONTEXT_UPDATE("ai.dialog_context.update", "AI chat context summarized", CHANGE, DIALOG),
CHAT_ATTACHMENT_UPLOAD("ai.chat_attachment.upload", "Chat attachment uploaded", CHANGE, CHAT_ATTACHMENT),
CHAT_ATTACHMENT_DOWNLOAD_LINK_ISSUE("ai.chat_attachment.download_link.issue",
"Chat attachment link issued", SENSITIVE_READ, CHAT_ATTACHMENT),
CHAT_ATTACHMENT_DELETE("ai.chat_attachment.delete", "Chat attachment deleted", CHANGE, CHAT_ATTACHMENT),
AUDIT_LOG_VIEW("audit_log.view", "Audit log viewed", SENSITIVE_READ, AUDIT_LOG),
AUDIT_LOG_EVENT_VIEW("audit_log.event.view", "Audit event viewed", SENSITIVE_READ, AUDIT_LOG),
LOG_VIEW("log.view", "Logs viewed", SENSITIVE_READ, LOG),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public enum AuditTargetType {
BILLING_PLAN("Billing plan"),
BLOCKED_EMAIL("Blocked email"),
BLOCKED_EMAIL_DOMAIN("Blocked email domain"),
CHAT_ATTACHMENT("Chat attachment"),
CUSTOMER_USER("End user"),
DEVICE("Device"),
DIALOG("AI chat"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.FieldNameConstants;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
Expand All @@ -17,7 +18,8 @@
* Files are stored externally (S3/MinIO), this stores metadata.
*/
@Data
@Builder
@FieldNameConstants
@Builder(toBuilder = true)
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "ticket_attachments")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.openframe.data.repository.ticket;

import com.openframe.data.document.ticket.TicketAttachment;

/** Carries the stored attachment and whether this attempt created its ticket link. */
public record TicketAttachmentInsertionResult(TicketAttachment attachment, boolean inserted) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
import java.util.List;
import java.util.Optional;

/** Reads and writes metadata for files linked to tickets. */
@Repository
public interface TicketAttachmentRepository extends MongoRepository<TicketAttachment, String> {
public interface TicketAttachmentRepository extends MongoRepository<TicketAttachment, String>,
TicketAttachmentUpsertOperations {

List<TicketAttachment> findByTicketId(String ticketId);

Expand Down
Loading