@platform-modules/foreign-ministry 1.3.351 → 1.3.355

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 (72) hide show
  1. package/dist/helpers/sla-request-status.helper.d.ts +3 -0
  2. package/dist/helpers/sla-request-status.helper.js +36 -0
  3. package/dist/models/EmbassyEvaluationDepartmentSettingModel.d.ts +14 -0
  4. package/dist/models/EmbassyEvaluationDepartmentSettingModel.js +56 -0
  5. package/dist/models/EvaluationMastersModel.d.ts +16 -0
  6. package/dist/models/EvaluationMastersModel.js +67 -0
  7. package/dist/models/EvaluationQuestionMasterModel.d.ts +10 -0
  8. package/dist/models/EvaluationQuestionMasterModel.js +42 -0
  9. package/dist/models/EvaluationSectionMasterModel.d.ts +7 -0
  10. package/dist/models/EvaluationSectionMasterModel.js +36 -0
  11. package/dist/models/EvaluationWorkflowModel.d.ts +60 -0
  12. package/dist/models/EvaluationWorkflowModel.js +215 -0
  13. package/dist/models/IneligibleForEvaluationModel.d.ts +8 -0
  14. package/dist/models/IneligibleForEvaluationModel.js +44 -0
  15. package/dist/models/MissionTravelClassConfigModel.d.ts +10 -0
  16. package/dist/models/MissionTravelClassConfigModel.js +50 -0
  17. package/dist/models/MissionTravelPerdiemModel.d.ts +10 -0
  18. package/dist/models/MissionTravelPerdiemModel.js +54 -0
  19. package/dist/models/SlaApprovalsViewModel.js +54 -54
  20. package/dist/models/SlaMyRequestsViewModel.d.ts +3 -0
  21. package/dist/models/SlaMyRequestsViewModel.js +73 -53
  22. package/dist/models/UuidAuditModel.d.ts +9 -0
  23. package/dist/models/UuidAuditModel.js +41 -0
  24. package/package.json +1 -1
  25. package/scripts/check-column-types.js +38 -38
  26. package/scripts/check-service-tables.js +42 -42
  27. package/scripts/sync-sla-reports-sql.js +92 -92
  28. package/sql/sla-reports-sync.manifest.json +9 -9
  29. package/sql/sla_reports_admin_procedures.sql +322 -322
  30. package/sql/sla_reports_approvals_workbook.sql +430 -430
  31. package/sql/sla_reports_procedures.sql +886 -886
  32. package/sql/sla_requests_status_to_varchar.sql +28 -28
  33. package/sql/vw_sla_approvals.sql +115 -115
  34. package/sql/vw_sla_my_requests.sql +60 -55
  35. package/src/helpers/evaluation-eligibility.utils.ts +126 -126
  36. package/src/models/DiplomaticAcademyRequestModel.ts +80 -80
  37. package/src/models/DocumentationFileModel.ts +40 -40
  38. package/src/models/EmbassyEvaluationCycleModel.ts +45 -45
  39. package/src/models/EmbassyEvaluationRequestModel.ts +59 -59
  40. package/src/models/EmployeeEvaluationAnswerModel.ts +26 -26
  41. package/src/models/EvaluationEligibilitySettingModel.ts +51 -51
  42. package/src/models/EvaluationFormModel.ts +44 -44
  43. package/src/models/LanguageCourseRequestModel.ts +67 -67
  44. package/src/models/LeaveApprovalsModel.ts +66 -66
  45. package/src/models/LeaveConfigModel.ts +71 -71
  46. package/src/models/MissionTravelApprovalModel.ts +101 -101
  47. package/src/models/MissionTravelAttachmentModel.ts +56 -56
  48. package/src/models/MissionTravelChatModel.ts +52 -52
  49. package/src/models/MissionTravelPersonModel.ts +105 -105
  50. package/src/models/MissionTravelWorkflowModel.ts +54 -54
  51. package/src/models/ProjectContactsModel.ts +51 -51
  52. package/src/models/ProjectFaqModel.ts +36 -36
  53. package/src/models/ProjectInvoicesModel.ts +41 -41
  54. package/src/models/ProjectModel.ts +75 -75
  55. package/src/models/ProjectTasksModel.ts +75 -75
  56. package/src/models/ServiceSlaApprovalModel.ts +63 -63
  57. package/src/models/ServicesNotificationConfigsModel.ts +55 -55
  58. package/src/models/SlaApprovalsViewModel.ts +142 -142
  59. package/src/models/SlaMyRequestsViewModel.ts +192 -172
  60. package/src/models/SlaRequestModel.ts +57 -57
  61. package/src/sla-report-views.ts +3 -3
  62. package/dist/auth/authenticate-jwt-session.d.ts +0 -19
  63. package/dist/auth/authenticate-jwt-session.js +0 -35
  64. package/dist/auth/jwt-token.helper.d.ts +0 -18
  65. package/dist/auth/jwt-token.helper.js +0 -58
  66. package/dist/auth/user-session-validation.d.ts +0 -42
  67. package/dist/auth/user-session-validation.js +0 -95
  68. package/dist/i18n/workflow-chat-i18n.d.ts +0 -5
  69. package/dist/i18n/workflow-chat-i18n.js +0 -21
  70. package/dist/i18n/workflow-chat-i18n.json +0 -320
  71. package/dist/i18n/workflow-chat-message.builder.d.ts +0 -325
  72. package/dist/i18n/workflow-chat-message.builder.js +0 -924
@@ -1,92 +1,92 @@
1
- /**
2
- * Applies SLA report views + stored procedures to PostgreSQL (idempotent CREATE OR REPLACE).
3
- *
4
- * Env from shared_models/.env only:
5
- * DB_HOST / TYPEORM_HOST
6
- * DB_PORT / TYPEORM_PORT
7
- * DB_USER / TYPEORM_USERNAME
8
- * DB_PASS / TYPEORM_PASSWORD
9
- * DB_NAME / TYPEORM_DATABASE
10
- *
11
- * Usage:
12
- * node scripts/sync-sla-reports-sql.js
13
- * npm run sync:sla-sql (from shared_models)
14
- */
15
-
16
- const fs = require('fs');
17
- const path = require('path');
18
- const { Client } = require('pg');
19
-
20
- function loadEnvFiles() {
21
- const dotenv = require('dotenv');
22
- const packageRoot = path.resolve(__dirname, '..');
23
- const packageEnv = path.join(packageRoot, '.env');
24
-
25
- if (!fs.existsSync(packageEnv)) {
26
- throw new Error(`Missing env file: ${packageEnv}`);
27
- }
28
-
29
- dotenv.config({ path: packageEnv, override: true });
30
- }
31
-
32
- function getDbConfig() {
33
- const host = (process.env.DB_HOST || process.env.TYPEORM_HOST || '').trim();
34
- const port = parseInt(process.env.DB_PORT || process.env.TYPEORM_PORT || '5432', 10);
35
- const user = (process.env.DB_USER || process.env.TYPEORM_USERNAME || '').trim();
36
- const password = process.env.DB_PASS || process.env.TYPEORM_PASSWORD || '';
37
- const database = (process.env.DB_NAME || process.env.TYPEORM_DATABASE || '').trim();
38
-
39
- if (!host || !user || !database) {
40
- throw new Error(
41
- 'Missing DB config. Set DB_HOST, DB_USER, DB_NAME (and DB_PASS) in shared_models/.env'
42
- );
43
- }
44
-
45
- return { host, port, user, password, database };
46
- }
47
-
48
- async function main() {
49
- const skipSync = process.argv.includes('--skip');
50
- if (skipSync || process.env.SKIP_SLA_SQL_SYNC === 'true') {
51
- console.log('[sync-sla-reports-sql] skipped (SKIP_SLA_SQL_SYNC or --skip)');
52
- return;
53
- }
54
-
55
- loadEnvFiles();
56
- const config = getDbConfig();
57
- const sqlDir = path.join(__dirname, '..', 'sql');
58
- const manifestPath = path.join(sqlDir, 'sla-reports-sync.manifest.json');
59
-
60
- if (!fs.existsSync(manifestPath)) {
61
- throw new Error(`Manifest not found: ${manifestPath}`);
62
- }
63
-
64
- const files = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
65
- if (!Array.isArray(files) || files.length === 0) {
66
- throw new Error('sla-reports-sync.manifest.json must be a non-empty array');
67
- }
68
-
69
- const client = new Client(config);
70
- await client.connect();
71
- console.log(`[sync-sla-reports-sql] connected to ${config.host}/${config.database}`);
72
-
73
- try {
74
- for (const file of files) {
75
- const filePath = path.join(sqlDir, file);
76
- if (!fs.existsSync(filePath)) {
77
- throw new Error(`SQL file missing: ${filePath}`);
78
- }
79
- const sql = fs.readFileSync(filePath, 'utf8');
80
- await client.query(sql);
81
- console.log(`[sync-sla-reports-sql] applied ${file}`);
82
- }
83
- console.log('[sync-sla-reports-sql] done');
84
- } finally {
85
- await client.end();
86
- }
87
- }
88
-
89
- main().catch((err) => {
90
- console.error('[sync-sla-reports-sql] failed:', err.message);
91
- process.exit(1);
92
- });
1
+ /**
2
+ * Applies SLA report views + stored procedures to PostgreSQL (idempotent CREATE OR REPLACE).
3
+ *
4
+ * Env from shared_models/.env only:
5
+ * DB_HOST / TYPEORM_HOST
6
+ * DB_PORT / TYPEORM_PORT
7
+ * DB_USER / TYPEORM_USERNAME
8
+ * DB_PASS / TYPEORM_PASSWORD
9
+ * DB_NAME / TYPEORM_DATABASE
10
+ *
11
+ * Usage:
12
+ * node scripts/sync-sla-reports-sql.js
13
+ * npm run sync:sla-sql (from shared_models)
14
+ */
15
+
16
+ const fs = require('fs');
17
+ const path = require('path');
18
+ const { Client } = require('pg');
19
+
20
+ function loadEnvFiles() {
21
+ const dotenv = require('dotenv');
22
+ const packageRoot = path.resolve(__dirname, '..');
23
+ const packageEnv = path.join(packageRoot, '.env');
24
+
25
+ if (!fs.existsSync(packageEnv)) {
26
+ throw new Error(`Missing env file: ${packageEnv}`);
27
+ }
28
+
29
+ dotenv.config({ path: packageEnv, override: true });
30
+ }
31
+
32
+ function getDbConfig() {
33
+ const host = (process.env.DB_HOST || process.env.TYPEORM_HOST || '').trim();
34
+ const port = parseInt(process.env.DB_PORT || process.env.TYPEORM_PORT || '5432', 10);
35
+ const user = (process.env.DB_USER || process.env.TYPEORM_USERNAME || '').trim();
36
+ const password = process.env.DB_PASS || process.env.TYPEORM_PASSWORD || '';
37
+ const database = (process.env.DB_NAME || process.env.TYPEORM_DATABASE || '').trim();
38
+
39
+ if (!host || !user || !database) {
40
+ throw new Error(
41
+ 'Missing DB config. Set DB_HOST, DB_USER, DB_NAME (and DB_PASS) in shared_models/.env'
42
+ );
43
+ }
44
+
45
+ return { host, port, user, password, database };
46
+ }
47
+
48
+ async function main() {
49
+ const skipSync = process.argv.includes('--skip');
50
+ if (skipSync || process.env.SKIP_SLA_SQL_SYNC === 'true') {
51
+ console.log('[sync-sla-reports-sql] skipped (SKIP_SLA_SQL_SYNC or --skip)');
52
+ return;
53
+ }
54
+
55
+ loadEnvFiles();
56
+ const config = getDbConfig();
57
+ const sqlDir = path.join(__dirname, '..', 'sql');
58
+ const manifestPath = path.join(sqlDir, 'sla-reports-sync.manifest.json');
59
+
60
+ if (!fs.existsSync(manifestPath)) {
61
+ throw new Error(`Manifest not found: ${manifestPath}`);
62
+ }
63
+
64
+ const files = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
65
+ if (!Array.isArray(files) || files.length === 0) {
66
+ throw new Error('sla-reports-sync.manifest.json must be a non-empty array');
67
+ }
68
+
69
+ const client = new Client(config);
70
+ await client.connect();
71
+ console.log(`[sync-sla-reports-sql] connected to ${config.host}/${config.database}`);
72
+
73
+ try {
74
+ for (const file of files) {
75
+ const filePath = path.join(sqlDir, file);
76
+ if (!fs.existsSync(filePath)) {
77
+ throw new Error(`SQL file missing: ${filePath}`);
78
+ }
79
+ const sql = fs.readFileSync(filePath, 'utf8');
80
+ await client.query(sql);
81
+ console.log(`[sync-sla-reports-sql] applied ${file}`);
82
+ }
83
+ console.log('[sync-sla-reports-sql] done');
84
+ } finally {
85
+ await client.end();
86
+ }
87
+ }
88
+
89
+ main().catch((err) => {
90
+ console.error('[sync-sla-reports-sql] failed:', err.message);
91
+ process.exit(1);
92
+ });
@@ -1,9 +1,9 @@
1
- [
2
- "sla_requests_status_to_varchar.sql",
3
- "sla_requests_status_data_fix.sql",
4
- "vw_sla_my_requests.sql",
5
- "vw_sla_approvals.sql",
6
- "sla_reports_procedures.sql",
7
- "sla_reports_approvals_workbook.sql",
8
- "sla_reports_admin_procedures.sql"
9
- ]
1
+ [
2
+ "sla_requests_status_to_varchar.sql",
3
+ "sla_requests_status_data_fix.sql",
4
+ "vw_sla_my_requests.sql",
5
+ "vw_sla_approvals.sql",
6
+ "sla_reports_procedures.sql",
7
+ "sla_reports_approvals_workbook.sql",
8
+ "sla_reports_admin_procedures.sql"
9
+ ]