@oneuptime/common 9.2.12 → 9.2.14

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.
Files changed (190) hide show
  1. package/Models/DatabaseModels/AlertInternalNote.ts +29 -0
  2. package/Models/DatabaseModels/IncidentInternalNote.ts +29 -0
  3. package/Models/DatabaseModels/IncidentPublicNote.ts +29 -0
  4. package/Models/DatabaseModels/Index.ts +3 -11
  5. package/Models/DatabaseModels/{CopilotPullRequest.ts → LlmProvider.ts} +243 -248
  6. package/Models/DatabaseModels/ScheduledMaintenanceInternalNote.ts +29 -0
  7. package/Models/DatabaseModels/ScheduledMaintenancePublicNote.ts +29 -0
  8. package/Server/API/LlmProviderAPI.ts +57 -0
  9. package/Server/API/MicrosoftTeamsAPI.ts +2 -146
  10. package/Server/API/SlackAPI.ts +105 -0
  11. package/Server/API/StatusPageAPI.ts +6 -0
  12. package/Server/Infrastructure/Postgres/SchemaMigrations/1765477339178-MigrationName.ts +71 -0
  13. package/Server/Infrastructure/Postgres/SchemaMigrations/1765540325149-MigrationName.ts +45 -0
  14. package/Server/Infrastructure/Postgres/SchemaMigrations/1765540549739-MigrationName.ts +61 -0
  15. package/Server/Infrastructure/Postgres/SchemaMigrations/1765544010078-MigrationName.ts +35 -0
  16. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +8 -0
  17. package/Server/Middleware/SlackAuthorization.ts +4 -1
  18. package/Server/Services/AlertInternalNoteService.ts +26 -0
  19. package/Server/Services/IncidentInternalNoteService.ts +26 -0
  20. package/Server/Services/IncidentPublicNoteService.ts +26 -0
  21. package/Server/Services/Index.ts +2 -11
  22. package/Server/Services/LlmProviderService.ts +100 -0
  23. package/Server/Services/ScheduledMaintenanceInternalNoteService.ts +26 -0
  24. package/Server/Services/ScheduledMaintenancePublicNoteService.ts +26 -0
  25. package/Server/Services/StatusPageService.ts +3 -0
  26. package/Server/Utils/Express.ts +1 -0
  27. package/Server/Utils/StartServer.ts +5 -0
  28. package/Server/Utils/StatusPageResource.ts +89 -0
  29. package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +96 -55
  30. package/Server/Utils/Workspace/Slack/Actions/ActionTypes.ts +16 -0
  31. package/Server/Utils/Workspace/Slack/Actions/Alert.ts +184 -1
  32. package/Server/Utils/Workspace/Slack/Actions/Incident.ts +224 -1
  33. package/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.ts +232 -1
  34. package/Server/Utils/Workspace/Slack/Slack.ts +113 -0
  35. package/Server/Utils/Workspace/Slack/app-manifest.json +13 -2
  36. package/Tests/Server/Utils/StatusPageResource.test.ts +161 -0
  37. package/Types/Icon/IconProp.ts +1 -0
  38. package/Types/LLM/Index.ts +4 -0
  39. package/Types/LLM/LlmType.ts +7 -0
  40. package/Types/Permission.ts +38 -113
  41. package/UI/Components/Icon/Icon.tsx +8 -0
  42. package/UI/Components/Link/Link.tsx +5 -1
  43. package/build/dist/Models/DatabaseModels/AlertInternalNote.js +30 -0
  44. package/build/dist/Models/DatabaseModels/AlertInternalNote.js.map +1 -1
  45. package/build/dist/Models/DatabaseModels/IncidentInternalNote.js +30 -0
  46. package/build/dist/Models/DatabaseModels/IncidentInternalNote.js.map +1 -1
  47. package/build/dist/Models/DatabaseModels/IncidentPublicNote.js +30 -0
  48. package/build/dist/Models/DatabaseModels/IncidentPublicNote.js.map +1 -1
  49. package/build/dist/Models/DatabaseModels/Index.js +2 -10
  50. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  51. package/build/dist/Models/DatabaseModels/{CopilotPullRequest.js → LlmProvider.js} +263 -255
  52. package/build/dist/Models/DatabaseModels/LlmProvider.js.map +1 -0
  53. package/build/dist/Models/DatabaseModels/ScheduledMaintenanceInternalNote.js +30 -0
  54. package/build/dist/Models/DatabaseModels/ScheduledMaintenanceInternalNote.js.map +1 -1
  55. package/build/dist/Models/DatabaseModels/ScheduledMaintenancePublicNote.js +30 -0
  56. package/build/dist/Models/DatabaseModels/ScheduledMaintenancePublicNote.js.map +1 -1
  57. package/build/dist/Server/API/LlmProviderAPI.js +36 -0
  58. package/build/dist/Server/API/LlmProviderAPI.js.map +1 -0
  59. package/build/dist/Server/API/MicrosoftTeamsAPI.js +2 -91
  60. package/build/dist/Server/API/MicrosoftTeamsAPI.js.map +1 -1
  61. package/build/dist/Server/API/SlackAPI.js +74 -0
  62. package/build/dist/Server/API/SlackAPI.js.map +1 -1
  63. package/build/dist/Server/API/StatusPageAPI.js +6 -0
  64. package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
  65. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1765477339178-MigrationName.js +30 -0
  66. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1765477339178-MigrationName.js.map +1 -0
  67. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1765540325149-MigrationName.js +22 -0
  68. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1765540325149-MigrationName.js.map +1 -0
  69. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1765540549739-MigrationName.js +39 -0
  70. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1765540549739-MigrationName.js.map +1 -0
  71. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1765544010078-MigrationName.js +18 -0
  72. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1765544010078-MigrationName.js.map +1 -0
  73. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +8 -0
  74. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  75. package/build/dist/Server/Middleware/SlackAuthorization.js +4 -1
  76. package/build/dist/Server/Middleware/SlackAuthorization.js.map +1 -1
  77. package/build/dist/Server/Services/AlertInternalNoteService.js +24 -0
  78. package/build/dist/Server/Services/AlertInternalNoteService.js.map +1 -1
  79. package/build/dist/Server/Services/IncidentInternalNoteService.js +24 -0
  80. package/build/dist/Server/Services/IncidentInternalNoteService.js.map +1 -1
  81. package/build/dist/Server/Services/IncidentPublicNoteService.js +24 -0
  82. package/build/dist/Server/Services/IncidentPublicNoteService.js.map +1 -1
  83. package/build/dist/Server/Services/Index.js +2 -10
  84. package/build/dist/Server/Services/Index.js.map +1 -1
  85. package/build/dist/Server/Services/LlmProviderService.js +85 -0
  86. package/build/dist/Server/Services/LlmProviderService.js.map +1 -0
  87. package/build/dist/Server/Services/ScheduledMaintenanceInternalNoteService.js +24 -0
  88. package/build/dist/Server/Services/ScheduledMaintenanceInternalNoteService.js.map +1 -1
  89. package/build/dist/Server/Services/ScheduledMaintenancePublicNoteService.js +24 -0
  90. package/build/dist/Server/Services/ScheduledMaintenancePublicNoteService.js.map +1 -1
  91. package/build/dist/Server/Services/StatusPageService.js +3 -0
  92. package/build/dist/Server/Services/StatusPageService.js.map +1 -1
  93. package/build/dist/Server/Utils/Express.js.map +1 -1
  94. package/build/dist/Server/Utils/StartServer.js +5 -0
  95. package/build/dist/Server/Utils/StartServer.js.map +1 -1
  96. package/build/dist/Server/Utils/StatusPageResource.js +68 -0
  97. package/build/dist/Server/Utils/StatusPageResource.js.map +1 -0
  98. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +73 -42
  99. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
  100. package/build/dist/Server/Utils/Workspace/Slack/Actions/ActionTypes.js +13 -0
  101. package/build/dist/Server/Utils/Workspace/Slack/Actions/ActionTypes.js.map +1 -1
  102. package/build/dist/Server/Utils/Workspace/Slack/Actions/Alert.js +143 -1
  103. package/build/dist/Server/Utils/Workspace/Slack/Actions/Alert.js.map +1 -1
  104. package/build/dist/Server/Utils/Workspace/Slack/Actions/Incident.js +173 -1
  105. package/build/dist/Server/Utils/Workspace/Slack/Actions/Incident.js.map +1 -1
  106. package/build/dist/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.js +173 -1
  107. package/build/dist/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.js.map +1 -1
  108. package/build/dist/Server/Utils/Workspace/Slack/Slack.js +92 -0
  109. package/build/dist/Server/Utils/Workspace/Slack/Slack.js.map +1 -1
  110. package/build/dist/Server/Utils/Workspace/Slack/app-manifest.json +12 -2
  111. package/build/dist/Tests/Server/Utils/StatusPageResource.test.js +122 -0
  112. package/build/dist/Tests/Server/Utils/StatusPageResource.test.js.map +1 -0
  113. package/build/dist/Types/Icon/IconProp.js +1 -0
  114. package/build/dist/Types/Icon/IconProp.js.map +1 -1
  115. package/build/dist/Types/LLM/Index.js +4 -0
  116. package/build/dist/Types/LLM/Index.js.map +1 -0
  117. package/build/dist/Types/LLM/LlmType.js +8 -0
  118. package/build/dist/Types/LLM/LlmType.js.map +1 -0
  119. package/build/dist/Types/Permission.js +32 -97
  120. package/build/dist/Types/Permission.js.map +1 -1
  121. package/build/dist/UI/Components/Icon/Icon.js +3 -0
  122. package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
  123. package/build/dist/UI/Components/Link/Link.js +4 -1
  124. package/build/dist/UI/Components/Link/Link.js.map +1 -1
  125. package/package.json +5 -1
  126. package/Models/DatabaseModels/CopilotAction.ts +0 -772
  127. package/Models/DatabaseModels/CopilotActionTypePriority.ts +0 -340
  128. package/Models/DatabaseModels/CopilotCodeRepository.ts +0 -637
  129. package/Models/DatabaseModels/ServiceCopilotCodeRepository.ts +0 -544
  130. package/Server/API/CopilotActionAPI.ts +0 -418
  131. package/Server/API/CopilotCodeRepositoryAPI.ts +0 -127
  132. package/Server/API/CopilotPullRequestAPI.ts +0 -243
  133. package/Server/Docs/CodeRepository.md +0 -43
  134. package/Server/Middleware/CodeRepositoryAuthorization.ts +0 -50
  135. package/Server/Services/CopilotActionService.ts +0 -10
  136. package/Server/Services/CopilotActionTypePriorityService.ts +0 -67
  137. package/Server/Services/CopilotCodeRepositoryService.ts +0 -62
  138. package/Server/Services/CopilotPullRequestService.ts +0 -10
  139. package/Server/Services/ServiceCopilotCodeRepositoryService.ts +0 -10
  140. package/Types/Copilot/CopilotActionProps/DirectoryActionProp.ts +0 -3
  141. package/Types/Copilot/CopilotActionProps/ExceptionActionProp.ts +0 -4
  142. package/Types/Copilot/CopilotActionProps/FileActionProp.ts +0 -7
  143. package/Types/Copilot/CopilotActionProps/FunctionActionProp.ts +0 -5
  144. package/Types/Copilot/CopilotActionProps/Index.ts +0 -96
  145. package/Types/Copilot/CopilotActionProps/SpanActionProp.ts +0 -4
  146. package/Types/Copilot/CopilotActionStatus.ts +0 -114
  147. package/Types/Copilot/CopilotActionType.ts +0 -212
  148. package/build/dist/Models/DatabaseModels/CopilotAction.js +0 -793
  149. package/build/dist/Models/DatabaseModels/CopilotAction.js.map +0 -1
  150. package/build/dist/Models/DatabaseModels/CopilotActionTypePriority.js +0 -358
  151. package/build/dist/Models/DatabaseModels/CopilotActionTypePriority.js.map +0 -1
  152. package/build/dist/Models/DatabaseModels/CopilotCodeRepository.js +0 -656
  153. package/build/dist/Models/DatabaseModels/CopilotCodeRepository.js.map +0 -1
  154. package/build/dist/Models/DatabaseModels/CopilotPullRequest.js.map +0 -1
  155. package/build/dist/Models/DatabaseModels/ServiceCopilotCodeRepository.js +0 -561
  156. package/build/dist/Models/DatabaseModels/ServiceCopilotCodeRepository.js.map +0 -1
  157. package/build/dist/Server/API/CopilotActionAPI.js +0 -295
  158. package/build/dist/Server/API/CopilotActionAPI.js.map +0 -1
  159. package/build/dist/Server/API/CopilotCodeRepositoryAPI.js +0 -91
  160. package/build/dist/Server/API/CopilotCodeRepositoryAPI.js.map +0 -1
  161. package/build/dist/Server/API/CopilotPullRequestAPI.js +0 -166
  162. package/build/dist/Server/API/CopilotPullRequestAPI.js.map +0 -1
  163. package/build/dist/Server/Middleware/CodeRepositoryAuthorization.js +0 -48
  164. package/build/dist/Server/Middleware/CodeRepositoryAuthorization.js.map +0 -1
  165. package/build/dist/Server/Services/CopilotActionService.js +0 -9
  166. package/build/dist/Server/Services/CopilotActionService.js.map +0 -1
  167. package/build/dist/Server/Services/CopilotActionTypePriorityService.js +0 -61
  168. package/build/dist/Server/Services/CopilotActionTypePriorityService.js.map +0 -1
  169. package/build/dist/Server/Services/CopilotCodeRepositoryService.js +0 -61
  170. package/build/dist/Server/Services/CopilotCodeRepositoryService.js.map +0 -1
  171. package/build/dist/Server/Services/CopilotPullRequestService.js +0 -9
  172. package/build/dist/Server/Services/CopilotPullRequestService.js.map +0 -1
  173. package/build/dist/Server/Services/ServiceCopilotCodeRepositoryService.js +0 -9
  174. package/build/dist/Server/Services/ServiceCopilotCodeRepositoryService.js.map +0 -1
  175. package/build/dist/Types/Copilot/CopilotActionProps/DirectoryActionProp.js +0 -2
  176. package/build/dist/Types/Copilot/CopilotActionProps/DirectoryActionProp.js.map +0 -1
  177. package/build/dist/Types/Copilot/CopilotActionProps/ExceptionActionProp.js +0 -2
  178. package/build/dist/Types/Copilot/CopilotActionProps/ExceptionActionProp.js.map +0 -1
  179. package/build/dist/Types/Copilot/CopilotActionProps/FileActionProp.js +0 -2
  180. package/build/dist/Types/Copilot/CopilotActionProps/FileActionProp.js.map +0 -1
  181. package/build/dist/Types/Copilot/CopilotActionProps/FunctionActionProp.js +0 -2
  182. package/build/dist/Types/Copilot/CopilotActionProps/FunctionActionProp.js.map +0 -1
  183. package/build/dist/Types/Copilot/CopilotActionProps/Index.js +0 -64
  184. package/build/dist/Types/Copilot/CopilotActionProps/Index.js.map +0 -1
  185. package/build/dist/Types/Copilot/CopilotActionProps/SpanActionProp.js +0 -2
  186. package/build/dist/Types/Copilot/CopilotActionProps/SpanActionProp.js.map +0 -1
  187. package/build/dist/Types/Copilot/CopilotActionStatus.js +0 -96
  188. package/build/dist/Types/Copilot/CopilotActionStatus.js.map +0 -1
  189. package/build/dist/Types/Copilot/CopilotActionType.js +0 -175
  190. package/build/dist/Types/Copilot/CopilotActionType.js.map +0 -1
@@ -1,340 +0,0 @@
1
- import CodeRepository from "./CopilotCodeRepository";
2
- import Project from "./Project";
3
- import User from "./User";
4
- import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
5
- import Route from "../../Types/API/Route";
6
- import CopilotActionType from "../../Types/Copilot/CopilotActionType";
7
- import ColumnAccessControl from "../../Types/Database/AccessControl/ColumnAccessControl";
8
- import TableAccessControl from "../../Types/Database/AccessControl/TableAccessControl";
9
- import CanAccessIfCanReadOn from "../../Types/Database/CanAccessIfCanReadOn";
10
- import ColumnType from "../../Types/Database/ColumnType";
11
- import CrudApiEndpoint from "../../Types/Database/CrudApiEndpoint";
12
- import EnableDocumentation from "../../Types/Database/EnableDocumentation";
13
- import EnableWorkflow from "../../Types/Database/EnableWorkflow";
14
- import TableColumn from "../../Types/Database/TableColumn";
15
- import TableColumnType from "../../Types/Database/TableColumnType";
16
- import TableMetadata from "../../Types/Database/TableMetadata";
17
- import TenantColumn from "../../Types/Database/TenantColumn";
18
- import IconProp from "../../Types/Icon/IconProp";
19
- import ObjectID from "../../Types/ObjectID";
20
- import Permission from "../../Types/Permission";
21
- import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
22
- import ColumnLength from "../../Types/Database/ColumnLength";
23
-
24
- @CanAccessIfCanReadOn("codeRepository")
25
- @EnableDocumentation()
26
- @TenantColumn("projectId")
27
- @TableAccessControl({
28
- create: [
29
- Permission.ProjectOwner,
30
- Permission.ProjectAdmin,
31
- Permission.ProjectMember,
32
- Permission.CreateCopilotAction,
33
- ],
34
- read: [
35
- Permission.ProjectOwner,
36
- Permission.ProjectAdmin,
37
- Permission.ProjectMember,
38
- Permission.ReadCopilotAction,
39
- ],
40
- delete: [
41
- Permission.ProjectOwner,
42
- Permission.ProjectAdmin,
43
- Permission.ProjectMember,
44
- Permission.DeleteCopilotAction,
45
- ],
46
- update: [
47
- Permission.ProjectOwner,
48
- Permission.ProjectAdmin,
49
- Permission.ProjectMember,
50
- Permission.EditCopilotAction,
51
- ],
52
- })
53
- @EnableWorkflow({
54
- create: true,
55
- delete: false,
56
- update: true,
57
- })
58
- @CrudApiEndpoint(new Route("/copilot-action-type-prority"))
59
- @TableMetadata({
60
- tableName: "CopilotActionType",
61
- singularName: "Copilot Action Priority",
62
- pluralName: "Copilot Action Priorities",
63
- icon: IconProp.Bolt,
64
- tableDescription: "Priority of Copilot Actions",
65
- })
66
- @Entity({
67
- name: "CopilotActionTypePriority",
68
- })
69
- export default class CopilotActionTypePriority extends BaseModel {
70
- @ColumnAccessControl({
71
- create: [],
72
- read: [
73
- Permission.ProjectOwner,
74
- Permission.ProjectAdmin,
75
- Permission.ProjectMember,
76
- Permission.ReadCopilotAction,
77
- ],
78
- update: [],
79
- })
80
- @TableColumn({
81
- manyToOneRelationColumn: "projectId",
82
- type: TableColumnType.Entity,
83
- modelType: Project,
84
- title: "Project",
85
- description: "Relation to Project Resource in which this object belongs",
86
- })
87
- @ManyToOne(
88
- () => {
89
- return Project;
90
- },
91
- {
92
- eager: false,
93
- nullable: false,
94
- onDelete: "CASCADE",
95
- orphanedRowAction: "nullify",
96
- },
97
- )
98
- @JoinColumn({ name: "projectId" })
99
- public project?: Project = undefined;
100
-
101
- @ColumnAccessControl({
102
- create: [],
103
- read: [
104
- Permission.ProjectOwner,
105
- Permission.ProjectAdmin,
106
- Permission.ProjectMember,
107
- Permission.ReadCopilotAction,
108
- ],
109
- update: [],
110
- })
111
- @Index()
112
- @TableColumn({
113
- type: TableColumnType.ObjectID,
114
- required: true,
115
- canReadOnRelationQuery: true,
116
- title: "Project ID",
117
- description: "ID of your OneUptime Project in which this object belongs",
118
- })
119
- @Column({
120
- type: ColumnType.ObjectID,
121
- nullable: false,
122
- transformer: ObjectID.getDatabaseTransformer(),
123
- })
124
- public projectId?: ObjectID = undefined;
125
-
126
- @ColumnAccessControl({
127
- create: [],
128
- read: [
129
- Permission.ProjectOwner,
130
- Permission.ProjectAdmin,
131
- Permission.ProjectMember,
132
- Permission.ReadCopilotAction,
133
- ],
134
- update: [],
135
- })
136
- @TableColumn({
137
- manyToOneRelationColumn: "codeRepositoryId",
138
- type: TableColumnType.Entity,
139
- modelType: CodeRepository,
140
- title: "Code Repository",
141
- description:
142
- "Relation to CodeRepository Resource in which this object belongs",
143
- })
144
- @ManyToOne(
145
- () => {
146
- return CodeRepository;
147
- },
148
- {
149
- eager: false,
150
- nullable: true,
151
- onDelete: "CASCADE",
152
- orphanedRowAction: "nullify",
153
- },
154
- )
155
- @JoinColumn({ name: "codeRepositoryId" })
156
- public codeRepository?: CodeRepository = undefined;
157
-
158
- @ColumnAccessControl({
159
- create: [],
160
- read: [
161
- Permission.ProjectOwner,
162
- Permission.ProjectAdmin,
163
- Permission.ProjectMember,
164
- Permission.ReadCopilotAction,
165
- ],
166
- update: [],
167
- })
168
- @Index()
169
- @TableColumn({
170
- type: TableColumnType.ObjectID,
171
- required: true,
172
- canReadOnRelationQuery: true,
173
- title: "Code Repository ID",
174
- description:
175
- "ID of your OneUptime Code Repository in which this object belongs",
176
- })
177
- @Column({
178
- type: ColumnType.ObjectID,
179
- nullable: false,
180
- transformer: ObjectID.getDatabaseTransformer(),
181
- })
182
- public codeRepositoryId?: ObjectID = undefined;
183
-
184
- @ColumnAccessControl({
185
- create: [],
186
- read: [
187
- Permission.ProjectOwner,
188
- Permission.ProjectAdmin,
189
- Permission.ProjectMember,
190
- Permission.ReadCopilotAction,
191
- ],
192
- update: [],
193
- })
194
- @TableColumn({
195
- manyToOneRelationColumn: "createdByUserId",
196
- type: TableColumnType.Entity,
197
- modelType: User,
198
- title: "Created by User",
199
- description:
200
- "Relation to User who created this object (if this object was created by a User)",
201
- })
202
- @ManyToOne(
203
- () => {
204
- return User;
205
- },
206
- {
207
- eager: false,
208
- nullable: true,
209
- onDelete: "SET NULL",
210
- orphanedRowAction: "nullify",
211
- },
212
- )
213
- @JoinColumn({ name: "createdByUserId" })
214
- public createdByUser?: User = undefined;
215
-
216
- @ColumnAccessControl({
217
- create: [],
218
- read: [
219
- Permission.ProjectOwner,
220
- Permission.ProjectAdmin,
221
- Permission.ProjectMember,
222
- Permission.ReadCopilotAction,
223
- ],
224
- update: [],
225
- })
226
- @TableColumn({
227
- type: TableColumnType.ObjectID,
228
- title: "Created by User ID",
229
- description:
230
- "User ID who created this object (if this object was created by a User)",
231
- })
232
- @Column({
233
- type: ColumnType.ObjectID,
234
- nullable: true,
235
- transformer: ObjectID.getDatabaseTransformer(),
236
- })
237
- public createdByUserId?: ObjectID = undefined;
238
-
239
- @ColumnAccessControl({
240
- create: [],
241
- read: [
242
- Permission.ProjectOwner,
243
- Permission.ProjectAdmin,
244
- Permission.ProjectMember,
245
- Permission.ReadCopilotAction,
246
- ],
247
- update: [],
248
- })
249
- @TableColumn({
250
- manyToOneRelationColumn: "deletedByUserId",
251
- type: TableColumnType.Entity,
252
- title: "Deleted by User",
253
- modelType: User,
254
- description:
255
- "Relation to User who deleted this object (if this object was deleted by a User)",
256
- })
257
- @ManyToOne(
258
- () => {
259
- return User;
260
- },
261
- {
262
- cascade: false,
263
- eager: false,
264
- nullable: true,
265
- onDelete: "SET NULL",
266
- orphanedRowAction: "nullify",
267
- },
268
- )
269
- @JoinColumn({ name: "deletedByUserId" })
270
- public deletedByUser?: User = undefined;
271
-
272
- @ColumnAccessControl({
273
- create: [],
274
- read: [
275
- Permission.ProjectOwner,
276
- Permission.ProjectAdmin,
277
- Permission.ProjectMember,
278
- Permission.ReadCopilotAction,
279
- ],
280
- update: [],
281
- })
282
- @TableColumn({
283
- type: TableColumnType.ObjectID,
284
- title: "Deleted by User ID",
285
- description:
286
- "User ID who deleted this object (if this object was deleted by a User)",
287
- })
288
- @Column({
289
- type: ColumnType.ObjectID,
290
- nullable: true,
291
- transformer: ObjectID.getDatabaseTransformer(),
292
- })
293
- public deletedByUserId?: ObjectID = undefined;
294
-
295
- @ColumnAccessControl({
296
- create: [],
297
- read: [
298
- Permission.ProjectOwner,
299
- Permission.ProjectAdmin,
300
- Permission.ProjectMember,
301
- Permission.ReadCopilotAction,
302
- ],
303
- update: [],
304
- })
305
- @TableColumn({
306
- type: TableColumnType.ShortText,
307
- title: "Copilot Action Type",
308
- required: true,
309
- description: "Copilot Action Type for this Code Repository",
310
- })
311
- @Column({
312
- type: ColumnType.ShortText,
313
- length: ColumnLength.ShortText,
314
- nullable: false,
315
- })
316
- public actionType?: CopilotActionType = undefined;
317
-
318
- @ColumnAccessControl({
319
- create: [],
320
- read: [
321
- Permission.ProjectOwner,
322
- Permission.ProjectAdmin,
323
- Permission.ProjectMember,
324
- Permission.ReadCopilotAction,
325
- ],
326
- update: [],
327
- })
328
- @TableColumn({
329
- type: TableColumnType.Number,
330
- title: "Priority",
331
- required: true,
332
- description: "Priority of Copilot Action Type for this Code Repository",
333
- })
334
- @Column({
335
- type: ColumnType.Number,
336
- nullable: false,
337
- default: 1,
338
- })
339
- public priority?: number = undefined;
340
- }