@hawk.so/types 0.4.2 → 0.5.0
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.
- package/build/index.d.ts +1 -0
- package/build/src/base/project/ProjectTaskManager.d.ts +63 -0
- package/build/src/base/project/ProjectTaskManager.js +2 -0
- package/build/src/dbScheme/project.d.ts +5 -0
- package/index.ts +1 -0
- package/package.json +1 -1
- package/src/base/project/ProjectTaskManager.ts +74 -0
- package/src/dbScheme/project.ts +6 -0
package/build/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export type * from './src/base/event/event';
|
|
|
8
8
|
export type * from './src/base/event/sourceCodeLine';
|
|
9
9
|
export type * from './src/base/event/addons';
|
|
10
10
|
export type * from './src/base/integrations/integrationToken';
|
|
11
|
+
export type * from './src/base/project/ProjectTaskManager';
|
|
11
12
|
export type * from './src/dbScheme/businessOperation';
|
|
12
13
|
export type * from './src/dbScheme/groupedEvent';
|
|
13
14
|
export type * from './src/dbScheme/notificationsChannels';
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task Manager usage tracking for daily auto-task budget
|
|
3
|
+
*/
|
|
4
|
+
export interface ProjectTaskManagerUsage {
|
|
5
|
+
/**
|
|
6
|
+
* UTC day boundary (e.g. 2026-01-17T00:00:00.000Z)
|
|
7
|
+
*/
|
|
8
|
+
dayStartUtc: Date;
|
|
9
|
+
/**
|
|
10
|
+
* Number of auto-created tasks since dayStartUtc
|
|
11
|
+
*/
|
|
12
|
+
autoTasksCreated: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Task Manager configuration for project
|
|
16
|
+
*/
|
|
17
|
+
export interface ProjectTaskManagerConfig {
|
|
18
|
+
/**
|
|
19
|
+
* Type of task manager (currently only 'github' is supported)
|
|
20
|
+
*/
|
|
21
|
+
type: 'github';
|
|
22
|
+
/**
|
|
23
|
+
* Enable automatic task creation by scheduled worker
|
|
24
|
+
*/
|
|
25
|
+
autoTaskEnabled: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Threshold for auto task creation (minimum totalCount)
|
|
28
|
+
*/
|
|
29
|
+
taskThresholdTotalCount: number;
|
|
30
|
+
/**
|
|
31
|
+
* Assign agent (e.g. Copilot) to newly created tasks
|
|
32
|
+
*/
|
|
33
|
+
assignAgent: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Usage tracking for daily auto-task budget
|
|
36
|
+
*/
|
|
37
|
+
usage?: ProjectTaskManagerUsage;
|
|
38
|
+
/**
|
|
39
|
+
* Date when integration was connected
|
|
40
|
+
*/
|
|
41
|
+
connectedAt: Date;
|
|
42
|
+
/**
|
|
43
|
+
* Date when configuration was last updated
|
|
44
|
+
*/
|
|
45
|
+
updatedAt: Date;
|
|
46
|
+
/**
|
|
47
|
+
* Task manager specific configuration (typed by `type`)
|
|
48
|
+
*/
|
|
49
|
+
config: {
|
|
50
|
+
/**
|
|
51
|
+
* GitHub App installation ID
|
|
52
|
+
*/
|
|
53
|
+
installationId: string;
|
|
54
|
+
/**
|
|
55
|
+
* Repository ID
|
|
56
|
+
*/
|
|
57
|
+
repoId: string | number;
|
|
58
|
+
/**
|
|
59
|
+
* Repository full name (owner/repo)
|
|
60
|
+
*/
|
|
61
|
+
repoFullName: string;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ObjectId } from 'bson';
|
|
2
2
|
import type { ProjectNotificationsRuleDBScheme } from '../../index.ts';
|
|
3
3
|
import type { ProjectEventGroupingPatternsDBScheme } from '../../index.ts';
|
|
4
|
+
import type { ProjectTaskManagerConfig } from '../base/project/ProjectTaskManager.ts';
|
|
4
5
|
/**
|
|
5
6
|
* Structure represents a Project in DataBase
|
|
6
7
|
*/
|
|
@@ -46,4 +47,8 @@ export interface ProjectDBScheme {
|
|
|
46
47
|
* Patterns for manual event grouping
|
|
47
48
|
*/
|
|
48
49
|
eventGroupingPatterns: ProjectEventGroupingPatternsDBScheme[];
|
|
50
|
+
/**
|
|
51
|
+
* Task Manager configuration
|
|
52
|
+
*/
|
|
53
|
+
taskManager?: ProjectTaskManagerConfig;
|
|
49
54
|
}
|
package/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ export type * from './src/base/event/sourceCodeLine';
|
|
|
12
12
|
export type * from './src/base/event/addons';
|
|
13
13
|
|
|
14
14
|
export type * from './src/base/integrations/integrationToken';
|
|
15
|
+
export type * from './src/base/project/ProjectTaskManager';
|
|
15
16
|
|
|
16
17
|
export type * from './src/dbScheme/businessOperation';
|
|
17
18
|
export type * from './src/dbScheme/groupedEvent';
|
package/package.json
CHANGED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task Manager usage tracking for daily auto-task budget
|
|
3
|
+
*/
|
|
4
|
+
export interface ProjectTaskManagerUsage {
|
|
5
|
+
/**
|
|
6
|
+
* UTC day boundary (e.g. 2026-01-17T00:00:00.000Z)
|
|
7
|
+
*/
|
|
8
|
+
dayStartUtc: Date;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Number of auto-created tasks since dayStartUtc
|
|
12
|
+
*/
|
|
13
|
+
autoTasksCreated: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Task Manager configuration for project
|
|
18
|
+
*/
|
|
19
|
+
export interface ProjectTaskManagerConfig {
|
|
20
|
+
/**
|
|
21
|
+
* Type of task manager (currently only 'github' is supported)
|
|
22
|
+
*/
|
|
23
|
+
type: 'github';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Enable automatic task creation by scheduled worker
|
|
27
|
+
*/
|
|
28
|
+
autoTaskEnabled: boolean;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Threshold for auto task creation (minimum totalCount)
|
|
32
|
+
*/
|
|
33
|
+
taskThresholdTotalCount: number;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Assign agent (e.g. Copilot) to newly created tasks
|
|
37
|
+
*/
|
|
38
|
+
assignAgent: boolean;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Usage tracking for daily auto-task budget
|
|
42
|
+
*/
|
|
43
|
+
usage?: ProjectTaskManagerUsage;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Date when integration was connected
|
|
47
|
+
*/
|
|
48
|
+
connectedAt: Date;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Date when configuration was last updated
|
|
52
|
+
*/
|
|
53
|
+
updatedAt: Date;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Task manager specific configuration (typed by `type`)
|
|
57
|
+
*/
|
|
58
|
+
config: {
|
|
59
|
+
/**
|
|
60
|
+
* GitHub App installation ID
|
|
61
|
+
*/
|
|
62
|
+
installationId: string;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Repository ID
|
|
66
|
+
*/
|
|
67
|
+
repoId: string | number;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Repository full name (owner/repo)
|
|
71
|
+
*/
|
|
72
|
+
repoFullName: string;
|
|
73
|
+
};
|
|
74
|
+
}
|
package/src/dbScheme/project.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ObjectId } from 'bson';
|
|
2
2
|
import type { ProjectNotificationsRuleDBScheme } from '../../index.ts';
|
|
3
3
|
import type { ProjectEventGroupingPatternsDBScheme } from '../../index.ts';
|
|
4
|
+
import type { ProjectTaskManagerConfig } from '../base/project/ProjectTaskManager.ts';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Structure represents a Project in DataBase
|
|
@@ -56,4 +57,9 @@ export interface ProjectDBScheme {
|
|
|
56
57
|
* Patterns for manual event grouping
|
|
57
58
|
*/
|
|
58
59
|
eventGroupingPatterns: ProjectEventGroupingPatternsDBScheme[];
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Task Manager configuration
|
|
63
|
+
*/
|
|
64
|
+
taskManager?: ProjectTaskManagerConfig;
|
|
59
65
|
}
|