@26lights/orcha 0.42.193 → 0.42.195

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { type ActivityFeed, type Milestone, type UpdateSubtaskFieldPayload, type AddSubtaskPayload, type Id, type User, type AddFilesPayload, type Attachment, type RemoveFilePayload, type UpdateActivityPayload, type Activity, type Subtask, type ActivityStatus, type ActivityDevStatus, type Sprint, type AddCommentPayload, type RemoveCommentPayload, type UpdateCommentPayload, type ActivityType, type Project, type TimeTracking } from '../types/index';
2
- import type { ActivityHistory } from '../types';
2
+ import type { HistoryEvent } from '../types';
3
3
  interface CreateSprintPayload {
4
4
  projectId: Id;
5
5
  name: string;
@@ -16,7 +16,7 @@ declare const __VLS_publicComponent: import("vue").DefineComponent<import("vue")
16
16
  required: true;
17
17
  };
18
18
  history: {
19
- type: import("vue").PropType<ActivityHistory[]>;
19
+ type: import("vue").PropType<HistoryEvent[]>;
20
20
  default: () => never[];
21
21
  };
22
22
  breadcrumbs: {
@@ -108,7 +108,7 @@ declare const __VLS_publicComponent: import("vue").DefineComponent<import("vue")
108
108
  required: true;
109
109
  };
110
110
  history: {
111
- type: import("vue").PropType<ActivityHistory[]>;
111
+ type: import("vue").PropType<HistoryEvent[]>;
112
112
  default: () => never[];
113
113
  };
114
114
  breadcrumbs: {
@@ -192,7 +192,7 @@ declare const __VLS_publicComponent: import("vue").DefineComponent<import("vue")
192
192
  onCreateSprint?: ((payload: CreateSprintPayload) => any) | undefined;
193
193
  }>, {
194
194
  milestoneId: string;
195
- history: ActivityHistory[];
195
+ history: HistoryEvent[];
196
196
  breadcrumbs: string;
197
197
  userId: string;
198
198
  isTemplate: boolean;
@@ -0,0 +1,20 @@
1
+ import type { HistoryEvent, HistoryPresentationConfig } from '../types';
2
+ declare const __VLS_publicComponent: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ events: {
4
+ type: import("vue").PropType<HistoryEvent[]>;
5
+ required: true;
6
+ };
7
+ presentationConfig: {
8
+ type: import("vue").PropType<HistoryPresentationConfig>;
9
+ };
10
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
11
+ events: {
12
+ type: import("vue").PropType<HistoryEvent[]>;
13
+ required: true;
14
+ };
15
+ presentationConfig: {
16
+ type: import("vue").PropType<HistoryPresentationConfig>;
17
+ };
18
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
19
+ declare const _default: typeof __VLS_publicComponent;
20
+ export default _default;
@@ -12,6 +12,7 @@ export { default as AoAvatar } from './components/AoAvatar.vue';
12
12
  export { default as AoColorPicker } from './components/AoColorPicker.vue';
13
13
  export { default as AoTabBar } from './components/AoTabBar.vue';
14
14
  export { default as AoAuditConfigTable } from './components/AoAuditConfigTable.vue';
15
+ export { default as AoHistory } from './components/AoHistory.vue';
15
16
  export { default as AoCardFeed } from './components/AoCardFeed.vue';
16
17
  export { default as AoProjectPhases } from './components/AoProjectPhases.vue';
17
18
  export { default as AoSprintList } from './components/AoSprintList.vue';
@@ -1,4 +1,75 @@
1
1
  export type Id = string;
2
+ /**
3
+ * History event types for the generic audit history UI.
4
+ *
5
+ * Backend returns raw values; frontend computes display representation.
6
+ */
7
+ export type HistoryEventOperation = 'CREATE' | 'UPDATE' | 'DELETE';
8
+ export type HistoryChangeType = 'TEXT' | 'BOOLEAN' | 'RELATION' | 'DATE' | 'NUMBER' | 'LONG_TEXT' | 'UNKNOWN';
9
+ /**
10
+ * A single field change in a history event.
11
+ * Backend returns raw values as strings; frontend computes display.
12
+ */
13
+ export interface HistoryValue {
14
+ raw: string | null;
15
+ display: string | null;
16
+ }
17
+ export interface HistoryChange {
18
+ field: string;
19
+ label: string;
20
+ oldValue: HistoryValue | null;
21
+ newValue: HistoryValue | null;
22
+ type: HistoryChangeType;
23
+ }
24
+ /**
25
+ * Actor information for a history event.
26
+ * Only contains ID; frontend resolves names via host-provided maps.
27
+ */
28
+ export interface HistoryActor {
29
+ id: string;
30
+ name: string | null;
31
+ }
32
+ export interface HistoryEntity {
33
+ tableName: string;
34
+ id: string;
35
+ type: string;
36
+ label: string | null;
37
+ }
38
+ export interface HistoryEvent {
39
+ id: string;
40
+ createdAt: string;
41
+ /** Actor only has ID; frontend resolves name via user map */
42
+ actor?: HistoryActor | null;
43
+ operation: HistoryEventOperation;
44
+ entity: HistoryEntity;
45
+ actionName?: string | null;
46
+ changes: HistoryChange[];
47
+ transactionId?: number | null;
48
+ }
49
+ /**
50
+ * Presentation configuration for history rendering.
51
+ * Allows host applications to provide custom labels and formatting.
52
+ */
53
+ export interface HistoryPresentationConfig {
54
+ /** Entity type labels (e.g., { task: { label: 'Task' } }) */
55
+ entities?: Record<string, {
56
+ label: string;
57
+ }>;
58
+ /** Field configuration for labels, types, and custom formatting */
59
+ fields?: Record<string, {
60
+ label: string;
61
+ type?: HistoryChangeType;
62
+ relationType?: string;
63
+ booleanLabels?: {
64
+ true: string;
65
+ false: string;
66
+ };
67
+ }>;
68
+ /** User ID to display name map for actor resolution */
69
+ users?: Record<string, string>;
70
+ /** Relation value resolution maps (field -> id -> display name) */
71
+ resolvedValues?: Record<string, Record<string, string>>;
72
+ }
2
73
  export interface Entity {
3
74
  __typename: string;
4
75
  id: Id;
@@ -135,7 +206,7 @@ export interface ActivityStatus extends Entity {
135
206
  export interface ActivityDevStatus extends Entity {
136
207
  name: string;
137
208
  }
138
- export interface ActivityHistory {
209
+ export interface AuditLog {
139
210
  id: number;
140
211
  schemaName: string;
141
212
  tableName: string;
@@ -151,9 +222,9 @@ export interface ActivityHistory {
151
222
  createdAt: string;
152
223
  }
153
224
  /**
154
- * Generic audit log type - identical to ActivityHistory, renamed for consistency with GraphQL schema.
225
+ * @deprecated Use AuditLog instead
155
226
  */
156
- export type AuditLog = ActivityHistory;
227
+ export type ActivityHistory = AuditLog;
157
228
  export interface Sprint extends Entity {
158
229
  name: string;
159
230
  projectId: string;
@@ -1,5 +1,5 @@
1
1
  import type { Attachment, TimeTracking } from '../types';
2
- import { type Activity, type ActivityDevStatus, type ActivityHistory, type ActivityStatus, type ActivityType, type AddActivityFeedPayload, type AddCommentPayload, type AddFilesPayload, type AddSubtaskPayload, type ChangeFeedActivitiesPayload, type FeedFilters, type Id, type Milestone, type Project, type RemoveCommentPayload, type RemoveFilePayload, type Sprint, type StartTimerPayload, type Subtask, type UpdateActivityPayload, type UpdateCommentPayload, type UpdateSubtaskFieldPayload, type User } from '../types';
2
+ import { type Activity, type ActivityDevStatus, type AuditLog, type ActivityStatus, type ActivityType, type AddActivityFeedPayload, type AddCommentPayload, type AddFilesPayload, type AddSubtaskPayload, type ChangeFeedActivitiesPayload, type FeedFilters, type Id, type Milestone, type Project, type RemoveCommentPayload, type RemoveFilePayload, type Sprint, type StartTimerPayload, type Subtask, type UpdateActivityPayload, type UpdateCommentPayload, type UpdateSubtaskFieldPayload, type User } from '../types';
3
3
  export type FeedMode = 'standard' | 'dev';
4
4
  declare const __VLS_publicComponent: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
5
  filters: {
@@ -111,7 +111,7 @@ declare const __VLS_publicComponent: import("vue").DefineComponent<import("vue")
111
111
  default: () => {};
112
112
  };
113
113
  activityHistory: {
114
- type: import("vue").PropType<ActivityHistory[]>;
114
+ type: import("vue").PropType<AuditLog[]>;
115
115
  default: () => never[];
116
116
  };
117
117
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -259,7 +259,7 @@ declare const __VLS_publicComponent: import("vue").DefineComponent<import("vue")
259
259
  default: () => {};
260
260
  };
261
261
  activityHistory: {
262
- type: import("vue").PropType<ActivityHistory[]>;
262
+ type: import("vue").PropType<AuditLog[]>;
263
263
  default: () => never[];
264
264
  };
265
265
  }>> & Readonly<{
@@ -318,7 +318,7 @@ declare const __VLS_publicComponent: import("vue").DefineComponent<import("vue")
318
318
  plannedManDays: number;
319
319
  remainingPlannedManDays: number;
320
320
  }>;
321
- activityHistory: ActivityHistory[];
321
+ activityHistory: AuditLog[];
322
322
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
323
323
  declare function __VLS_template(): {
324
324
  activityDetailsBody(props: {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "module",
5
5
  "license": "CC-BY-NC-ND-4.0",
6
6
  "author": "26lights <dev@26lights.com> (https://www.26lights.com)",
7
- "version": "0.42.193",
7
+ "version": "0.42.195",
8
8
  "workspaces": [
9
9
  "packages/*"
10
10
  ],