@hed-hog/operations 0.0.303 → 0.0.304

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 (166) hide show
  1. package/README.md +200 -43
  2. package/dist/controllers/operations-approvals.controller.d.ts +9 -0
  3. package/dist/controllers/operations-approvals.controller.d.ts.map +1 -0
  4. package/dist/controllers/operations-approvals.controller.js +64 -0
  5. package/dist/controllers/operations-approvals.controller.js.map +1 -0
  6. package/dist/controllers/operations-collaborators.controller.d.ts +223 -0
  7. package/dist/controllers/operations-collaborators.controller.d.ts.map +1 -0
  8. package/dist/controllers/operations-collaborators.controller.js +96 -0
  9. package/dist/controllers/operations-collaborators.controller.js.map +1 -0
  10. package/dist/controllers/operations-contracts.controller.d.ts +683 -0
  11. package/dist/controllers/operations-contracts.controller.d.ts.map +1 -0
  12. package/dist/controllers/operations-contracts.controller.js +198 -0
  13. package/dist/controllers/operations-contracts.controller.js.map +1 -0
  14. package/dist/controllers/operations-org-structure.controller.d.ts +108 -0
  15. package/dist/controllers/operations-org-structure.controller.d.ts.map +1 -0
  16. package/dist/controllers/operations-org-structure.controller.js +143 -0
  17. package/dist/controllers/operations-org-structure.controller.js.map +1 -0
  18. package/dist/controllers/operations-projects.controller.d.ts +169 -0
  19. package/dist/controllers/operations-projects.controller.d.ts.map +1 -0
  20. package/dist/controllers/operations-projects.controller.js +87 -0
  21. package/dist/controllers/operations-projects.controller.js.map +1 -0
  22. package/dist/controllers/operations-tasks.controller.d.ts +54 -0
  23. package/dist/controllers/operations-tasks.controller.d.ts.map +1 -0
  24. package/dist/controllers/operations-tasks.controller.js +79 -0
  25. package/dist/controllers/operations-tasks.controller.js.map +1 -0
  26. package/dist/controllers/operations-timesheets.controller.d.ts +99 -0
  27. package/dist/controllers/operations-timesheets.controller.d.ts.map +1 -0
  28. package/dist/controllers/operations-timesheets.controller.js +154 -0
  29. package/dist/controllers/operations-timesheets.controller.js.map +1 -0
  30. package/dist/dto/create-collaborator-type.dto.d.ts +10 -0
  31. package/dist/dto/create-collaborator-type.dto.d.ts.map +1 -0
  32. package/dist/dto/create-collaborator-type.dto.js +56 -0
  33. package/dist/dto/create-collaborator-type.dto.js.map +1 -0
  34. package/dist/dto/create-collaborator.dto.d.ts +42 -0
  35. package/dist/dto/create-collaborator.dto.d.ts.map +1 -0
  36. package/dist/dto/create-collaborator.dto.js +228 -0
  37. package/dist/dto/create-collaborator.dto.js.map +1 -0
  38. package/dist/dto/create-schedule-adjustment-request.dto.d.ts +17 -0
  39. package/dist/dto/create-schedule-adjustment-request.dto.d.ts.map +1 -0
  40. package/dist/dto/create-schedule-adjustment-request.dto.js +89 -0
  41. package/dist/dto/create-schedule-adjustment-request.dto.js.map +1 -0
  42. package/dist/dto/create-task.dto.d.ts +8 -0
  43. package/dist/dto/create-task.dto.d.ts.map +1 -0
  44. package/dist/dto/create-task.dto.js +50 -0
  45. package/dist/dto/create-task.dto.js.map +1 -0
  46. package/dist/dto/create-time-off-request.dto.d.ts +9 -0
  47. package/dist/dto/create-time-off-request.dto.d.ts.map +1 -0
  48. package/dist/dto/create-time-off-request.dto.js +54 -0
  49. package/dist/dto/create-time-off-request.dto.js.map +1 -0
  50. package/dist/dto/create-timesheet-entry.dto.d.ts +12 -0
  51. package/dist/dto/create-timesheet-entry.dto.d.ts.map +1 -0
  52. package/dist/dto/create-timesheet-entry.dto.js +75 -0
  53. package/dist/dto/create-timesheet-entry.dto.js.map +1 -0
  54. package/dist/dto/list-collaborator-types.dto.d.ts +4 -0
  55. package/dist/dto/list-collaborator-types.dto.d.ts.map +1 -0
  56. package/dist/dto/list-collaborator-types.dto.js +29 -0
  57. package/dist/dto/list-collaborator-types.dto.js.map +1 -0
  58. package/dist/dto/list-collaborators.dto.d.ts +8 -0
  59. package/dist/dto/list-collaborators.dto.d.ts.map +1 -0
  60. package/dist/dto/list-collaborators.dto.js +42 -0
  61. package/dist/dto/list-collaborators.dto.js.map +1 -0
  62. package/dist/dto/list-project-options.dto.d.ts +4 -0
  63. package/dist/dto/list-project-options.dto.d.ts.map +1 -0
  64. package/dist/dto/list-project-options.dto.js +8 -0
  65. package/dist/dto/list-project-options.dto.js.map +1 -0
  66. package/dist/dto/list-tasks.dto.d.ts +7 -0
  67. package/dist/dto/list-tasks.dto.d.ts.map +1 -0
  68. package/dist/dto/list-tasks.dto.js +38 -0
  69. package/dist/dto/list-tasks.dto.js.map +1 -0
  70. package/dist/dto/list-timesheet-entries.dto.d.ts +10 -0
  71. package/dist/dto/list-timesheet-entries.dto.d.ts.map +1 -0
  72. package/dist/dto/list-timesheet-entries.dto.js +54 -0
  73. package/dist/dto/list-timesheet-entries.dto.js.map +1 -0
  74. package/dist/dto/update-collaborator-type.dto.d.ts +4 -0
  75. package/dist/dto/update-collaborator-type.dto.d.ts.map +1 -0
  76. package/dist/dto/update-collaborator-type.dto.js +8 -0
  77. package/dist/dto/update-collaborator-type.dto.js.map +1 -0
  78. package/dist/dto/update-collaborator.dto.d.ts +4 -0
  79. package/dist/dto/update-collaborator.dto.d.ts.map +1 -0
  80. package/dist/dto/update-collaborator.dto.js +8 -0
  81. package/dist/dto/update-collaborator.dto.js.map +1 -0
  82. package/dist/dto/update-task.dto.d.ts +8 -0
  83. package/dist/dto/update-task.dto.d.ts.map +1 -0
  84. package/dist/dto/update-task.dto.js +51 -0
  85. package/dist/dto/update-task.dto.js.map +1 -0
  86. package/dist/operations.controller.d.ts +0 -1045
  87. package/dist/operations.controller.d.ts.map +1 -1
  88. package/dist/operations.controller.js +0 -429
  89. package/dist/operations.controller.js.map +1 -1
  90. package/dist/operations.module.d.ts.map +1 -1
  91. package/dist/operations.module.js +23 -2
  92. package/dist/operations.module.js.map +1 -1
  93. package/dist/operations.service.d.ts +373 -8
  94. package/dist/operations.service.d.ts.map +1 -1
  95. package/dist/operations.service.js +1598 -111
  96. package/dist/operations.service.js.map +1 -1
  97. package/dist/operations.service.spec.js +315 -1
  98. package/dist/operations.service.spec.js.map +1 -1
  99. package/dist/services/shared/operations-access.service.d.ts +16 -0
  100. package/dist/services/shared/operations-access.service.d.ts.map +1 -0
  101. package/dist/services/shared/operations-access.service.js +48 -0
  102. package/dist/services/shared/operations-access.service.js.map +1 -0
  103. package/hedhog/data/dashboard.yaml +20 -0
  104. package/hedhog/data/dashboard_component.yaml +274 -0
  105. package/hedhog/data/dashboard_component_role.yaml +174 -0
  106. package/hedhog/data/dashboard_item.yaml +299 -0
  107. package/hedhog/data/dashboard_role.yaml +20 -0
  108. package/hedhog/data/menu.yaml +30 -13
  109. package/hedhog/data/operations_collaborator_type.yaml +76 -0
  110. package/hedhog/data/route.yaml +183 -0
  111. package/hedhog/frontend/app/_components/async-options-combobox.tsx.ejs +231 -0
  112. package/hedhog/frontend/app/_components/collaborator-details-screen.tsx.ejs +134 -49
  113. package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +772 -93
  114. package/hedhog/frontend/app/_components/department-select-with-create.tsx.ejs +38 -16
  115. package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +875 -632
  116. package/hedhog/frontend/app/_components/timesheet-task-create-sheet.tsx.ejs +213 -0
  117. package/hedhog/frontend/app/_lib/api.ts.ejs +30 -1
  118. package/hedhog/frontend/app/_lib/types.ts.ejs +142 -39
  119. package/hedhog/frontend/app/_lib/utils/format.ts.ejs +33 -2
  120. package/hedhog/frontend/app/approvals/page.tsx.ejs +116 -98
  121. package/hedhog/frontend/app/collaborator-types/page.tsx.ejs +502 -0
  122. package/hedhog/frontend/app/collaborators/page.tsx.ejs +109 -68
  123. package/hedhog/frontend/app/contracts/templates/page.tsx.ejs +11 -9
  124. package/hedhog/frontend/app/departments/page.tsx.ejs +1 -1
  125. package/hedhog/frontend/app/projects/page.tsx.ejs +5 -1
  126. package/hedhog/frontend/app/schedule-adjustments/page.tsx.ejs +244 -120
  127. package/hedhog/frontend/app/team/page.tsx.ejs +15 -2
  128. package/hedhog/frontend/app/time-off/page.tsx.ejs +158 -82
  129. package/hedhog/frontend/app/timesheets/page.tsx.ejs +814 -357
  130. package/hedhog/frontend/messages/en.json +243 -51
  131. package/hedhog/frontend/messages/pt.json +458 -268
  132. package/hedhog/table/operations_collaborator.yaml +26 -13
  133. package/hedhog/table/operations_collaborator_equity_participation.yaml +43 -0
  134. package/hedhog/table/operations_collaborator_type.yaml +33 -0
  135. package/hedhog/table/operations_job_title.yaml +24 -0
  136. package/hedhog/table/operations_project_assignment.yaml +9 -0
  137. package/hedhog/table/operations_project_role.yaml +39 -0
  138. package/hedhog/table/operations_task.yaml +30 -0
  139. package/hedhog/table/operations_timesheet_entry.yaml +12 -0
  140. package/package.json +6 -6
  141. package/src/controllers/operations-approvals.controller.ts +24 -0
  142. package/src/controllers/operations-collaborators.controller.ts +60 -0
  143. package/src/controllers/operations-contracts.controller.ts +138 -0
  144. package/src/controllers/operations-org-structure.controller.ts +92 -0
  145. package/src/controllers/operations-projects.controller.ts +50 -0
  146. package/src/controllers/operations-tasks.controller.ts +52 -0
  147. package/src/controllers/operations-timesheets.controller.ts +100 -0
  148. package/src/dto/create-collaborator-type.dto.ts +43 -0
  149. package/src/dto/create-collaborator.dto.ts +223 -0
  150. package/src/dto/create-schedule-adjustment-request.dto.ts +91 -0
  151. package/src/dto/create-task.dto.ts +35 -0
  152. package/src/dto/create-time-off-request.dto.ts +53 -0
  153. package/src/dto/create-timesheet-entry.dto.ts +67 -0
  154. package/src/dto/list-collaborator-types.dto.ts +15 -0
  155. package/src/dto/list-collaborators.dto.ts +30 -0
  156. package/src/dto/list-project-options.dto.ts +3 -0
  157. package/src/dto/list-tasks.dto.ts +25 -0
  158. package/src/dto/list-timesheet-entries.dto.ts +40 -0
  159. package/src/dto/update-collaborator-type.dto.ts +3 -0
  160. package/src/dto/update-collaborator.dto.ts +3 -0
  161. package/src/dto/update-task.dto.ts +36 -0
  162. package/src/operations.controller.ts +1 -278
  163. package/src/operations.module.ts +23 -2
  164. package/src/operations.service.spec.ts +450 -0
  165. package/src/operations.service.ts +4641 -2163
  166. package/src/services/shared/operations-access.service.ts +52 -0
@@ -0,0 +1,683 @@
1
+ import { OperationsService } from '../operations.service';
2
+ export declare class OperationsContractsController {
3
+ private readonly operationsService;
4
+ constructor(operationsService: OperationsService);
5
+ listContractTemplates(user: any): Promise<Record<string, unknown>[]>;
6
+ getContractTemplate(user: any, id: number): Promise<{
7
+ id: number;
8
+ slug: string;
9
+ code: string | null;
10
+ name: string;
11
+ description: string | null;
12
+ contractCategory: string | null;
13
+ contractType: string | null;
14
+ billingModel: string | null;
15
+ signatureStatus: string | null;
16
+ isActive: boolean;
17
+ status: string | null;
18
+ contentHtml: string | null;
19
+ usageCount: number;
20
+ createdAt: Date;
21
+ updatedAt: Date;
22
+ }>;
23
+ createContractTemplate(user: any, data: any): Promise<{
24
+ id: number;
25
+ slug: string;
26
+ code: string | null;
27
+ name: string;
28
+ description: string | null;
29
+ contractCategory: string | null;
30
+ contractType: string | null;
31
+ billingModel: string | null;
32
+ signatureStatus: string | null;
33
+ isActive: boolean;
34
+ status: string | null;
35
+ contentHtml: string | null;
36
+ usageCount: number;
37
+ createdAt: Date;
38
+ updatedAt: Date;
39
+ }>;
40
+ updateContractTemplate(user: any, id: number, data: any): Promise<{
41
+ id: number;
42
+ slug: string;
43
+ code: string | null;
44
+ name: string;
45
+ description: string | null;
46
+ contractCategory: string | null;
47
+ contractType: string | null;
48
+ billingModel: string | null;
49
+ signatureStatus: string | null;
50
+ isActive: boolean;
51
+ status: string | null;
52
+ contentHtml: string | null;
53
+ usageCount: number;
54
+ createdAt: Date;
55
+ updatedAt: Date;
56
+ }>;
57
+ listContracts(user: any): Promise<Record<string, unknown>[]>;
58
+ getContract(user: any, id: number): Promise<{
59
+ id: number;
60
+ code: string;
61
+ name: string | null;
62
+ contractCategory: "other" | "client" | "internal" | "employee" | "contractor" | "supplier" | "vendor" | "partner";
63
+ contractType: "other" | "clt" | "pj" | "freelancer_agreement" | "service_agreement" | "fixed_term" | "recurring_service" | "nda" | "amendment" | "addendum";
64
+ clientName: string | null;
65
+ signatureStatus: "pending" | "expired" | "not_started" | "partially_signed" | "signed";
66
+ isActive: boolean;
67
+ billingModel: "time_and_material" | "monthly_retainer" | "fixed_price";
68
+ accountManagerCollaboratorId: number | null;
69
+ relatedCollaboratorId: number | null;
70
+ contractTemplateId: number | null;
71
+ contractTemplateName: string | null;
72
+ contractTemplateSlug: string | null;
73
+ contractTemplateCode: string | null;
74
+ originType: "manual" | "employee_hiring" | "client_project" | "crm_proposal";
75
+ originId: number | null;
76
+ startDate: string | null;
77
+ endDate: string | null;
78
+ signedAt: string | null;
79
+ effectiveDate: string | null;
80
+ budgetAmount: number | null;
81
+ monthlyHourCap: number | null;
82
+ status: "active" | "draft" | "expired" | "archived" | "closed" | "under_review" | "renewal";
83
+ creationMode: ("blank" | "template" | "upload" | "duplicate") | null;
84
+ wizardStep: number | null;
85
+ description: string | null;
86
+ contentHtml: string | null;
87
+ accountManagerName: string | null;
88
+ relatedCollaboratorName: string | null;
89
+ } & {
90
+ mainRelatedPartyName: string | null;
91
+ projects: {
92
+ id: number;
93
+ code: string;
94
+ name: string;
95
+ status: string;
96
+ }[];
97
+ scheduleSummary: {
98
+ weekday: string;
99
+ isWorkingDay: boolean;
100
+ startTime: string | null;
101
+ endTime: string | null;
102
+ breakMinutes: number | null;
103
+ }[];
104
+ parties: NonNullable<{
105
+ partyRole?: "employee" | "employer" | "client" | "supplier" | "vendor" | "partner" | "witness" | "internal_owner" | "other";
106
+ partyType?: "individual" | "company" | "internal_team" | "other";
107
+ displayName: string;
108
+ documentNumber?: string | null;
109
+ email?: string | null;
110
+ phone?: string | null;
111
+ isPrimary?: boolean;
112
+ }[]>;
113
+ signatures: NonNullable<{
114
+ signerName: string;
115
+ signerRole?: string | null;
116
+ signerEmail?: string | null;
117
+ status?: "pending" | "signed" | "rejected";
118
+ signedAt?: string | null;
119
+ }[]>;
120
+ financialTerms: NonNullable<{
121
+ termType?: "value" | "payment" | "revenue" | "fine" | "other";
122
+ label: string;
123
+ amount: number;
124
+ recurrence?: "one_time" | "monthly" | "quarterly" | "yearly" | "other";
125
+ dueDay?: number | null;
126
+ notes?: string | null;
127
+ }[]>;
128
+ documents: {
129
+ id: number;
130
+ documentType: "other" | "source_upload" | "generated_pdf" | "attachment";
131
+ fileId: number | null;
132
+ fileName: string;
133
+ mimeType: string;
134
+ fileContentBase64: string | null;
135
+ isCurrent: boolean;
136
+ extractionStatus: ("pending" | "processing" | "failed" | "completed" | "skipped") | null;
137
+ extractionSummary: string | null;
138
+ notes: string | null;
139
+ createdAt: string;
140
+ }[];
141
+ revisions: NonNullable<{
142
+ revisionType?: "amendment" | "renewal" | "revision" | "addendum" | "other";
143
+ title: string;
144
+ effectiveDate?: string | null;
145
+ status?: "draft" | "active" | "completed" | "cancelled";
146
+ summary?: string | null;
147
+ }[]>;
148
+ history: {
149
+ id: number;
150
+ actorUserId: number | null;
151
+ action: string;
152
+ note: string | null;
153
+ metadataJson: string | null;
154
+ createdAt: string;
155
+ }[];
156
+ }>;
157
+ createContractDraft(user: any, data: any): Promise<{
158
+ id: number;
159
+ code: string;
160
+ name: string | null;
161
+ contractCategory: "other" | "client" | "internal" | "employee" | "contractor" | "supplier" | "vendor" | "partner";
162
+ contractType: "other" | "clt" | "pj" | "freelancer_agreement" | "service_agreement" | "fixed_term" | "recurring_service" | "nda" | "amendment" | "addendum";
163
+ clientName: string | null;
164
+ signatureStatus: "pending" | "expired" | "not_started" | "partially_signed" | "signed";
165
+ isActive: boolean;
166
+ billingModel: "time_and_material" | "monthly_retainer" | "fixed_price";
167
+ accountManagerCollaboratorId: number | null;
168
+ relatedCollaboratorId: number | null;
169
+ contractTemplateId: number | null;
170
+ contractTemplateName: string | null;
171
+ contractTemplateSlug: string | null;
172
+ contractTemplateCode: string | null;
173
+ originType: "manual" | "employee_hiring" | "client_project" | "crm_proposal";
174
+ originId: number | null;
175
+ startDate: string | null;
176
+ endDate: string | null;
177
+ signedAt: string | null;
178
+ effectiveDate: string | null;
179
+ budgetAmount: number | null;
180
+ monthlyHourCap: number | null;
181
+ status: "active" | "draft" | "expired" | "archived" | "closed" | "under_review" | "renewal";
182
+ creationMode: ("blank" | "template" | "upload" | "duplicate") | null;
183
+ wizardStep: number | null;
184
+ description: string | null;
185
+ contentHtml: string | null;
186
+ accountManagerName: string | null;
187
+ relatedCollaboratorName: string | null;
188
+ } & {
189
+ mainRelatedPartyName: string | null;
190
+ projects: {
191
+ id: number;
192
+ code: string;
193
+ name: string;
194
+ status: string;
195
+ }[];
196
+ scheduleSummary: {
197
+ weekday: string;
198
+ isWorkingDay: boolean;
199
+ startTime: string | null;
200
+ endTime: string | null;
201
+ breakMinutes: number | null;
202
+ }[];
203
+ parties: NonNullable<{
204
+ partyRole?: "employee" | "employer" | "client" | "supplier" | "vendor" | "partner" | "witness" | "internal_owner" | "other";
205
+ partyType?: "individual" | "company" | "internal_team" | "other";
206
+ displayName: string;
207
+ documentNumber?: string | null;
208
+ email?: string | null;
209
+ phone?: string | null;
210
+ isPrimary?: boolean;
211
+ }[]>;
212
+ signatures: NonNullable<{
213
+ signerName: string;
214
+ signerRole?: string | null;
215
+ signerEmail?: string | null;
216
+ status?: "pending" | "signed" | "rejected";
217
+ signedAt?: string | null;
218
+ }[]>;
219
+ financialTerms: NonNullable<{
220
+ termType?: "value" | "payment" | "revenue" | "fine" | "other";
221
+ label: string;
222
+ amount: number;
223
+ recurrence?: "one_time" | "monthly" | "quarterly" | "yearly" | "other";
224
+ dueDay?: number | null;
225
+ notes?: string | null;
226
+ }[]>;
227
+ documents: {
228
+ id: number;
229
+ documentType: "other" | "source_upload" | "generated_pdf" | "attachment";
230
+ fileId: number | null;
231
+ fileName: string;
232
+ mimeType: string;
233
+ fileContentBase64: string | null;
234
+ isCurrent: boolean;
235
+ extractionStatus: ("pending" | "processing" | "failed" | "completed" | "skipped") | null;
236
+ extractionSummary: string | null;
237
+ notes: string | null;
238
+ createdAt: string;
239
+ }[];
240
+ revisions: NonNullable<{
241
+ revisionType?: "amendment" | "renewal" | "revision" | "addendum" | "other";
242
+ title: string;
243
+ effectiveDate?: string | null;
244
+ status?: "draft" | "active" | "completed" | "cancelled";
245
+ summary?: string | null;
246
+ }[]>;
247
+ history: {
248
+ id: number;
249
+ actorUserId: number | null;
250
+ action: string;
251
+ note: string | null;
252
+ metadataJson: string | null;
253
+ createdAt: string;
254
+ }[];
255
+ }>;
256
+ createContract(user: any, data: any): Promise<{
257
+ id: number;
258
+ code: string;
259
+ name: string | null;
260
+ contractCategory: "other" | "client" | "internal" | "employee" | "contractor" | "supplier" | "vendor" | "partner";
261
+ contractType: "other" | "clt" | "pj" | "freelancer_agreement" | "service_agreement" | "fixed_term" | "recurring_service" | "nda" | "amendment" | "addendum";
262
+ clientName: string | null;
263
+ signatureStatus: "pending" | "expired" | "not_started" | "partially_signed" | "signed";
264
+ isActive: boolean;
265
+ billingModel: "time_and_material" | "monthly_retainer" | "fixed_price";
266
+ accountManagerCollaboratorId: number | null;
267
+ relatedCollaboratorId: number | null;
268
+ contractTemplateId: number | null;
269
+ contractTemplateName: string | null;
270
+ contractTemplateSlug: string | null;
271
+ contractTemplateCode: string | null;
272
+ originType: "manual" | "employee_hiring" | "client_project" | "crm_proposal";
273
+ originId: number | null;
274
+ startDate: string | null;
275
+ endDate: string | null;
276
+ signedAt: string | null;
277
+ effectiveDate: string | null;
278
+ budgetAmount: number | null;
279
+ monthlyHourCap: number | null;
280
+ status: "active" | "draft" | "expired" | "archived" | "closed" | "under_review" | "renewal";
281
+ creationMode: ("blank" | "template" | "upload" | "duplicate") | null;
282
+ wizardStep: number | null;
283
+ description: string | null;
284
+ contentHtml: string | null;
285
+ accountManagerName: string | null;
286
+ relatedCollaboratorName: string | null;
287
+ } & {
288
+ mainRelatedPartyName: string | null;
289
+ projects: {
290
+ id: number;
291
+ code: string;
292
+ name: string;
293
+ status: string;
294
+ }[];
295
+ scheduleSummary: {
296
+ weekday: string;
297
+ isWorkingDay: boolean;
298
+ startTime: string | null;
299
+ endTime: string | null;
300
+ breakMinutes: number | null;
301
+ }[];
302
+ parties: NonNullable<{
303
+ partyRole?: "employee" | "employer" | "client" | "supplier" | "vendor" | "partner" | "witness" | "internal_owner" | "other";
304
+ partyType?: "individual" | "company" | "internal_team" | "other";
305
+ displayName: string;
306
+ documentNumber?: string | null;
307
+ email?: string | null;
308
+ phone?: string | null;
309
+ isPrimary?: boolean;
310
+ }[]>;
311
+ signatures: NonNullable<{
312
+ signerName: string;
313
+ signerRole?: string | null;
314
+ signerEmail?: string | null;
315
+ status?: "pending" | "signed" | "rejected";
316
+ signedAt?: string | null;
317
+ }[]>;
318
+ financialTerms: NonNullable<{
319
+ termType?: "value" | "payment" | "revenue" | "fine" | "other";
320
+ label: string;
321
+ amount: number;
322
+ recurrence?: "one_time" | "monthly" | "quarterly" | "yearly" | "other";
323
+ dueDay?: number | null;
324
+ notes?: string | null;
325
+ }[]>;
326
+ documents: {
327
+ id: number;
328
+ documentType: "other" | "source_upload" | "generated_pdf" | "attachment";
329
+ fileId: number | null;
330
+ fileName: string;
331
+ mimeType: string;
332
+ fileContentBase64: string | null;
333
+ isCurrent: boolean;
334
+ extractionStatus: ("pending" | "processing" | "failed" | "completed" | "skipped") | null;
335
+ extractionSummary: string | null;
336
+ notes: string | null;
337
+ createdAt: string;
338
+ }[];
339
+ revisions: NonNullable<{
340
+ revisionType?: "amendment" | "renewal" | "revision" | "addendum" | "other";
341
+ title: string;
342
+ effectiveDate?: string | null;
343
+ status?: "draft" | "active" | "completed" | "cancelled";
344
+ summary?: string | null;
345
+ }[]>;
346
+ history: {
347
+ id: number;
348
+ actorUserId: number | null;
349
+ action: string;
350
+ note: string | null;
351
+ metadataJson: string | null;
352
+ createdAt: string;
353
+ }[];
354
+ }>;
355
+ extractContractDraft(user: any, data: any): Promise<{
356
+ warnings: string[];
357
+ summary: string;
358
+ missingFields: string[];
359
+ code: string;
360
+ name: string;
361
+ clientName: string;
362
+ contractCategory: "other" | "client" | "internal" | "employee" | "contractor" | "supplier" | "vendor" | "partner";
363
+ contractType: "other" | "clt" | "pj" | "freelancer_agreement" | "service_agreement" | "fixed_term" | "recurring_service" | "nda" | "amendment" | "addendum";
364
+ signatureStatus: "pending" | "expired" | "not_started" | "partially_signed" | "signed";
365
+ isActive: boolean;
366
+ billingModel: "time_and_material" | "monthly_retainer" | "fixed_price";
367
+ originType: "manual" | "employee_hiring" | "client_project" | "crm_proposal";
368
+ originId: string;
369
+ startDate: string;
370
+ endDate: string;
371
+ signedAt: string;
372
+ effectiveDate: string;
373
+ budgetAmount: string | number;
374
+ monthlyHourCap: string | number;
375
+ status: "active" | "draft" | "expired" | "archived" | "closed" | "under_review" | "renewal";
376
+ description: string;
377
+ contentHtml: string;
378
+ parties: {
379
+ displayName: string;
380
+ partyRole: "other" | "client" | "employee" | "supplier" | "vendor" | "partner" | "employer" | "witness" | "internal_owner";
381
+ partyType: "other" | "individual" | "company" | "internal_team";
382
+ documentNumber: string;
383
+ email: string;
384
+ phone: string;
385
+ isPrimary: boolean;
386
+ }[];
387
+ signatures: {
388
+ signerName: string;
389
+ signerRole: string;
390
+ signerEmail: string;
391
+ status: "rejected" | "pending" | "signed";
392
+ signedAt: string;
393
+ }[];
394
+ financialTerms: {
395
+ label: string;
396
+ termType: "value" | "other" | "revenue" | "payment" | "fine";
397
+ amount: string | number;
398
+ recurrence: "other" | "one_time" | "monthly" | "quarterly" | "yearly";
399
+ dueDay: string | number;
400
+ notes: string;
401
+ }[];
402
+ revisions: {
403
+ title: string;
404
+ revisionType: "other" | "amendment" | "addendum" | "renewal" | "revision";
405
+ effectiveDate: string;
406
+ status: "active" | "draft" | "completed" | "cancelled";
407
+ summary: string;
408
+ }[];
409
+ }>;
410
+ extractContractSource(user: any, id: number, data: any): Promise<{
411
+ warnings: string[];
412
+ summary: string;
413
+ missingFields: string[];
414
+ code: string;
415
+ name: string;
416
+ clientName: string;
417
+ contractCategory: "other" | "client" | "internal" | "employee" | "contractor" | "supplier" | "vendor" | "partner";
418
+ contractType: "other" | "clt" | "pj" | "freelancer_agreement" | "service_agreement" | "fixed_term" | "recurring_service" | "nda" | "amendment" | "addendum";
419
+ signatureStatus: "pending" | "expired" | "not_started" | "partially_signed" | "signed";
420
+ isActive: boolean;
421
+ billingModel: "time_and_material" | "monthly_retainer" | "fixed_price";
422
+ originType: "manual" | "employee_hiring" | "client_project" | "crm_proposal";
423
+ originId: string;
424
+ startDate: string;
425
+ endDate: string;
426
+ signedAt: string;
427
+ effectiveDate: string;
428
+ budgetAmount: string | number;
429
+ monthlyHourCap: string | number;
430
+ status: "active" | "draft" | "expired" | "archived" | "closed" | "under_review" | "renewal";
431
+ description: string;
432
+ contentHtml: string;
433
+ parties: {
434
+ displayName: string;
435
+ partyRole: "other" | "client" | "employee" | "supplier" | "vendor" | "partner" | "employer" | "witness" | "internal_owner";
436
+ partyType: "other" | "individual" | "company" | "internal_team";
437
+ documentNumber: string;
438
+ email: string;
439
+ phone: string;
440
+ isPrimary: boolean;
441
+ }[];
442
+ signatures: {
443
+ signerName: string;
444
+ signerRole: string;
445
+ signerEmail: string;
446
+ status: "rejected" | "pending" | "signed";
447
+ signedAt: string;
448
+ }[];
449
+ financialTerms: {
450
+ label: string;
451
+ termType: "value" | "other" | "revenue" | "payment" | "fine";
452
+ amount: string | number;
453
+ recurrence: "other" | "one_time" | "monthly" | "quarterly" | "yearly";
454
+ dueDay: string | number;
455
+ notes: string;
456
+ }[];
457
+ revisions: {
458
+ title: string;
459
+ revisionType: "other" | "amendment" | "addendum" | "renewal" | "revision";
460
+ effectiveDate: string;
461
+ status: "active" | "draft" | "completed" | "cancelled";
462
+ summary: string;
463
+ }[];
464
+ }>;
465
+ generateContractContent(user: any, id: number, data: any): Promise<{
466
+ id: number;
467
+ code: string;
468
+ name: string | null;
469
+ contractCategory: "other" | "client" | "internal" | "employee" | "contractor" | "supplier" | "vendor" | "partner";
470
+ contractType: "other" | "clt" | "pj" | "freelancer_agreement" | "service_agreement" | "fixed_term" | "recurring_service" | "nda" | "amendment" | "addendum";
471
+ clientName: string | null;
472
+ signatureStatus: "pending" | "expired" | "not_started" | "partially_signed" | "signed";
473
+ isActive: boolean;
474
+ billingModel: "time_and_material" | "monthly_retainer" | "fixed_price";
475
+ accountManagerCollaboratorId: number | null;
476
+ relatedCollaboratorId: number | null;
477
+ contractTemplateId: number | null;
478
+ contractTemplateName: string | null;
479
+ contractTemplateSlug: string | null;
480
+ contractTemplateCode: string | null;
481
+ originType: "manual" | "employee_hiring" | "client_project" | "crm_proposal";
482
+ originId: number | null;
483
+ startDate: string | null;
484
+ endDate: string | null;
485
+ signedAt: string | null;
486
+ effectiveDate: string | null;
487
+ budgetAmount: number | null;
488
+ monthlyHourCap: number | null;
489
+ status: "active" | "draft" | "expired" | "archived" | "closed" | "under_review" | "renewal";
490
+ creationMode: ("blank" | "template" | "upload" | "duplicate") | null;
491
+ wizardStep: number | null;
492
+ description: string | null;
493
+ contentHtml: string | null;
494
+ accountManagerName: string | null;
495
+ relatedCollaboratorName: string | null;
496
+ } & {
497
+ mainRelatedPartyName: string | null;
498
+ projects: {
499
+ id: number;
500
+ code: string;
501
+ name: string;
502
+ status: string;
503
+ }[];
504
+ scheduleSummary: {
505
+ weekday: string;
506
+ isWorkingDay: boolean;
507
+ startTime: string | null;
508
+ endTime: string | null;
509
+ breakMinutes: number | null;
510
+ }[];
511
+ parties: NonNullable<{
512
+ partyRole?: "employee" | "employer" | "client" | "supplier" | "vendor" | "partner" | "witness" | "internal_owner" | "other";
513
+ partyType?: "individual" | "company" | "internal_team" | "other";
514
+ displayName: string;
515
+ documentNumber?: string | null;
516
+ email?: string | null;
517
+ phone?: string | null;
518
+ isPrimary?: boolean;
519
+ }[]>;
520
+ signatures: NonNullable<{
521
+ signerName: string;
522
+ signerRole?: string | null;
523
+ signerEmail?: string | null;
524
+ status?: "pending" | "signed" | "rejected";
525
+ signedAt?: string | null;
526
+ }[]>;
527
+ financialTerms: NonNullable<{
528
+ termType?: "value" | "payment" | "revenue" | "fine" | "other";
529
+ label: string;
530
+ amount: number;
531
+ recurrence?: "one_time" | "monthly" | "quarterly" | "yearly" | "other";
532
+ dueDay?: number | null;
533
+ notes?: string | null;
534
+ }[]>;
535
+ documents: {
536
+ id: number;
537
+ documentType: "other" | "source_upload" | "generated_pdf" | "attachment";
538
+ fileId: number | null;
539
+ fileName: string;
540
+ mimeType: string;
541
+ fileContentBase64: string | null;
542
+ isCurrent: boolean;
543
+ extractionStatus: ("pending" | "processing" | "failed" | "completed" | "skipped") | null;
544
+ extractionSummary: string | null;
545
+ notes: string | null;
546
+ createdAt: string;
547
+ }[];
548
+ revisions: NonNullable<{
549
+ revisionType?: "amendment" | "renewal" | "revision" | "addendum" | "other";
550
+ title: string;
551
+ effectiveDate?: string | null;
552
+ status?: "draft" | "active" | "completed" | "cancelled";
553
+ summary?: string | null;
554
+ }[]>;
555
+ history: {
556
+ id: number;
557
+ actorUserId: number | null;
558
+ action: string;
559
+ note: string | null;
560
+ metadataJson: string | null;
561
+ createdAt: string;
562
+ }[];
563
+ }>;
564
+ reviewContractLegally(user: any, id: number, data: any): Promise<{
565
+ summary: string;
566
+ missingFields: string[];
567
+ warnings: string[];
568
+ checklist: string[];
569
+ status: "ready_for_revision" | "attention_required";
570
+ reviewedAt: string;
571
+ }>;
572
+ updateContract(user: any, id: number, data: any): Promise<{
573
+ id: number;
574
+ code: string;
575
+ name: string | null;
576
+ contractCategory: "other" | "client" | "internal" | "employee" | "contractor" | "supplier" | "vendor" | "partner";
577
+ contractType: "other" | "clt" | "pj" | "freelancer_agreement" | "service_agreement" | "fixed_term" | "recurring_service" | "nda" | "amendment" | "addendum";
578
+ clientName: string | null;
579
+ signatureStatus: "pending" | "expired" | "not_started" | "partially_signed" | "signed";
580
+ isActive: boolean;
581
+ billingModel: "time_and_material" | "monthly_retainer" | "fixed_price";
582
+ accountManagerCollaboratorId: number | null;
583
+ relatedCollaboratorId: number | null;
584
+ contractTemplateId: number | null;
585
+ contractTemplateName: string | null;
586
+ contractTemplateSlug: string | null;
587
+ contractTemplateCode: string | null;
588
+ originType: "manual" | "employee_hiring" | "client_project" | "crm_proposal";
589
+ originId: number | null;
590
+ startDate: string | null;
591
+ endDate: string | null;
592
+ signedAt: string | null;
593
+ effectiveDate: string | null;
594
+ budgetAmount: number | null;
595
+ monthlyHourCap: number | null;
596
+ status: "active" | "draft" | "expired" | "archived" | "closed" | "under_review" | "renewal";
597
+ creationMode: ("blank" | "template" | "upload" | "duplicate") | null;
598
+ wizardStep: number | null;
599
+ description: string | null;
600
+ contentHtml: string | null;
601
+ accountManagerName: string | null;
602
+ relatedCollaboratorName: string | null;
603
+ } & {
604
+ mainRelatedPartyName: string | null;
605
+ projects: {
606
+ id: number;
607
+ code: string;
608
+ name: string;
609
+ status: string;
610
+ }[];
611
+ scheduleSummary: {
612
+ weekday: string;
613
+ isWorkingDay: boolean;
614
+ startTime: string | null;
615
+ endTime: string | null;
616
+ breakMinutes: number | null;
617
+ }[];
618
+ parties: NonNullable<{
619
+ partyRole?: "employee" | "employer" | "client" | "supplier" | "vendor" | "partner" | "witness" | "internal_owner" | "other";
620
+ partyType?: "individual" | "company" | "internal_team" | "other";
621
+ displayName: string;
622
+ documentNumber?: string | null;
623
+ email?: string | null;
624
+ phone?: string | null;
625
+ isPrimary?: boolean;
626
+ }[]>;
627
+ signatures: NonNullable<{
628
+ signerName: string;
629
+ signerRole?: string | null;
630
+ signerEmail?: string | null;
631
+ status?: "pending" | "signed" | "rejected";
632
+ signedAt?: string | null;
633
+ }[]>;
634
+ financialTerms: NonNullable<{
635
+ termType?: "value" | "payment" | "revenue" | "fine" | "other";
636
+ label: string;
637
+ amount: number;
638
+ recurrence?: "one_time" | "monthly" | "quarterly" | "yearly" | "other";
639
+ dueDay?: number | null;
640
+ notes?: string | null;
641
+ }[]>;
642
+ documents: {
643
+ id: number;
644
+ documentType: "other" | "source_upload" | "generated_pdf" | "attachment";
645
+ fileId: number | null;
646
+ fileName: string;
647
+ mimeType: string;
648
+ fileContentBase64: string | null;
649
+ isCurrent: boolean;
650
+ extractionStatus: ("pending" | "processing" | "failed" | "completed" | "skipped") | null;
651
+ extractionSummary: string | null;
652
+ notes: string | null;
653
+ createdAt: string;
654
+ }[];
655
+ revisions: NonNullable<{
656
+ revisionType?: "amendment" | "renewal" | "revision" | "addendum" | "other";
657
+ title: string;
658
+ effectiveDate?: string | null;
659
+ status?: "draft" | "active" | "completed" | "cancelled";
660
+ summary?: string | null;
661
+ }[]>;
662
+ history: {
663
+ id: number;
664
+ actorUserId: number | null;
665
+ action: string;
666
+ note: string | null;
667
+ metadataJson: string | null;
668
+ createdAt: string;
669
+ }[];
670
+ }>;
671
+ removeContract(user: any, id: number): Promise<{
672
+ success: boolean;
673
+ }>;
674
+ generateContractPdf(user: any, id: number): Promise<{
675
+ contractId: number;
676
+ fileId: number;
677
+ fileName: string;
678
+ mimeType: string;
679
+ documentType: string;
680
+ downloadUrl: string;
681
+ }>;
682
+ }
683
+ //# sourceMappingURL=operations-contracts.controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations-contracts.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/operations-contracts.controller.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,qBAEa,6BAA6B;IAC5B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,iBAAiB;IAGjE,qBAAqB,CAAS,IAAI,KAAA;IAKlC,mBAAmB,CAAS,IAAI,KAAA,EAA6B,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;IAQvE,sBAAsB,CAAS,IAAI,KAAA,EAAU,IAAI,KAAA;;;;;;;;;;;;;;;;;IAQjD,sBAAsB,CACZ,IAAI,KAAA,EACe,EAAE,EAAE,MAAM,EAC7B,IAAI,KAAA;;;;;;;;;;;;;;;;;IAUd,aAAa,CAAS,IAAI,KAAA;IAK1B,WAAW,CAAS,IAAI,KAAA,EAA6B,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAK/D,mBAAmB,CAAS,IAAI,KAAA,EAAU,IAAI,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAK9C,cAAc,CAAS,IAAI,KAAA,EAAU,IAAI,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKzC,oBAAoB,CAAS,IAAI,KAAA,EAAU,IAAI,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAQ/C,qBAAqB,CACX,IAAI,KAAA,EACe,EAAE,EAAE,MAAM,EAC7B,IAAI,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUd,uBAAuB,CACb,IAAI,KAAA,EACe,EAAE,EAAE,MAAM,EAC7B,IAAI,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUd,qBAAqB,CACX,IAAI,KAAA,EACe,EAAE,EAAE,MAAM,EAC7B,IAAI,KAAA;;;;;;;;IAUd,cAAc,CACJ,IAAI,KAAA,EACe,EAAE,EAAE,MAAM,EAC7B,IAAI,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMd,cAAc,CAAS,IAAI,KAAA,EAA6B,EAAE,EAAE,MAAM;;;IAKlE,mBAAmB,CAAS,IAAI,KAAA,EAA6B,EAAE,EAAE,MAAM;;;;;;;;CAGxE"}