first commit

This commit is contained in:
2026-10-03 13:40:26 +02:00
parent 732a5b5a16
commit 566f415fa7
555 changed files with 62704 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
import { type } from '@ngrx/signals';
import { eventGroup } from '@ngrx/signals/events';
import {
BoardColumn,
BoardFilter,
CommandResult,
CreateIssueInput,
IssueChanged,
IssueStatus,
} from '@task-stream/web/tracker/domain';
export const boardPageEvents = eventGroup({
source: 'Board Page',
events: {
opened: type<BoardFilter>(),
filterChanged: type<BoardFilter>(),
/** Optimistic: the card moves immediately and comes back if the API refuses. */
issueMoved: type<{
issueId: string;
to: IssueStatus;
reason?: string | null;
}>(),
issueCreateRequested: type<CreateIssueInput>(),
},
});
export const boardApiEvents = eventGroup({
source: 'Board API',
events: {
loaded: type<BoardColumn[]>(),
loadFailed: type<string>(),
issueMoveFailed: type<string>(),
issueCreated: type<CommandResult>(),
issueCreateFailed: type<string>(),
},
});
export const boardRealtimeEvents = eventGroup({
source: 'Board Realtime',
events: {
issueChanged: type<IssueChanged>(),
},
});

View File

@@ -0,0 +1,57 @@
import { type } from '@ngrx/signals';
import { eventGroup } from '@ngrx/signals/events';
import {
Activity,
ChangeStatusInput,
Comment,
CommentChanged,
Issue,
LinkIssuesInput,
UpdateIssueInput,
} from '@task-stream/web/tracker/domain';
export const issuePageEvents = eventGroup({
source: 'Issue Page',
events: {
opened: type<{ idOrKey: string }>(),
statusChangeRequested: type<ChangeStatusInput>(),
assignRequested: type<{ issueId: string; assigneeId: string | null }>(),
updateRequested: type<UpdateIssueInput>(),
linkRequested: type<LinkIssuesInput>(),
/** Relate by the other ticket's key (e.g. BE-3), resolved to its id first. */
linkByKeyRequested: type<{
issueId: string;
type: LinkIssuesInput['type'];
targetKey: string;
}>(),
unlinkRequested: type<LinkIssuesInput>(),
releaseChangeRequested: type<{
issueId: string;
releaseId: string | null;
}>(),
commentAddRequested: type<{ issueId: string; body: string }>(),
commentEditRequested: type<{ commentId: string; body: string }>(),
commentDeleteRequested: type<{ commentId: string }>(),
},
});
export const issueApiEvents = eventGroup({
source: 'Issue API',
events: {
loaded: type<Issue>(),
loadFailed: type<string>(),
commentsLoaded: type<Comment[]>(),
historyLoaded: type<Activity[]>(),
commandSucceeded: type<string>(),
commandFailed: type<string>(),
},
});
export const issueRealtimeEvents = eventGroup({
source: 'Issue Realtime',
events: {
/** Something about this ticket changed: refetch it. */
issueTouched: type<{ issueId: string; version: number }>(),
commentChanged: type<CommentChanged>(),
},
});

View File

@@ -0,0 +1,48 @@
import { type } from '@ngrx/signals';
import { eventGroup } from '@ngrx/signals/events';
import {
Activity,
CreateReleaseInput,
MemberInput,
Project,
ProjectStats,
Release,
UserDirectoryEntry,
} from '@task-stream/web/tracker/domain';
export const projectPageEvents = eventGroup({
source: 'Project Page',
events: {
opened: type<{ idOrKey: string }>(),
memberAddRequested: type<MemberInput>(),
memberRoleChangeRequested: type<MemberInput>(),
memberRemoveRequested: type<{ projectId: string; userId: string }>(),
releaseCreateRequested: type<CreateReleaseInput>(),
releasePublishRequested: type<{ releaseId: string; force: boolean }>(),
releaseArchiveRequested: type<{ releaseId: string }>(),
userSearchRequested: type<string>(),
},
});
export const projectApiEvents = eventGroup({
source: 'Project API',
events: {
loaded: type<Project>(),
loadFailed: type<string>(),
statsLoaded: type<ProjectStats>(),
releasesLoaded: type<Release[]>(),
activityLoaded: type<Activity[]>(),
commandSucceeded: type<string>(),
commandFailed: type<string>(),
usersFound: type<UserDirectoryEntry[]>(),
},
});
export const projectRealtimeEvents = eventGroup({
source: 'Project Realtime',
events: {
projectChanged: type<Project>(),
activityAdded: type<Activity>(),
releaseChanged: type<Release>(),
},
});

View File

@@ -0,0 +1,33 @@
import { type } from '@ngrx/signals';
import { eventGroup } from '@ngrx/signals/events';
import {
CommandResult,
CreateProjectInput,
Project,
} from '@task-stream/web/tracker/domain';
export const projectsPageEvents = eventGroup({
source: 'Projects Page',
events: {
opened: type<void>(),
createRequested: type<CreateProjectInput>(),
},
});
export const projectsApiEvents = eventGroup({
source: 'Projects API',
events: {
loaded: type<Project[]>(),
loadFailed: type<string>(),
created: type<CommandResult>(),
createFailed: type<string>(),
},
});
export const projectsRealtimeEvents = eventGroup({
source: 'Projects Realtime',
events: {
/** Joined, left or changed one of my projects. */
projectChanged: type<{ project: Project; stillMember: boolean }>(),
},
});