@striae-org/striae 3.2.1 → 3.2.2

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 (81) hide show
  1. package/app/components/actions/case-export/core-export.ts +2 -2
  2. package/app/components/actions/case-export/data-processing.ts +19 -4
  3. package/app/components/actions/case-export/download-handlers.ts +6 -5
  4. package/app/components/actions/case-export/metadata-helpers.ts +1 -1
  5. package/app/components/actions/case-import/annotation-import.ts +2 -2
  6. package/app/components/actions/case-import/confirmation-import.ts +3 -3
  7. package/app/components/actions/case-import/image-operations.ts +1 -1
  8. package/app/components/actions/case-import/orchestrator.ts +4 -4
  9. package/app/components/actions/case-import/storage-operations.ts +7 -7
  10. package/app/components/actions/case-import/validation.ts +3 -3
  11. package/app/components/actions/case-import/zip-processing.ts +3 -3
  12. package/app/components/actions/case-manage.ts +3 -3
  13. package/app/components/actions/confirm-export.ts +3 -3
  14. package/app/components/actions/generate-pdf.ts +3 -3
  15. package/app/components/actions/image-manage.ts +3 -3
  16. package/app/components/actions/notes-manage.ts +3 -3
  17. package/app/components/actions/signout.tsx +1 -1
  18. package/app/components/audit/user-audit-viewer.tsx +2 -3
  19. package/app/components/auth/auth-provider.tsx +2 -2
  20. package/app/components/auth/mfa-enrollment.tsx +3 -3
  21. package/app/components/auth/mfa-verification.tsx +4 -4
  22. package/app/components/canvas/box-annotations/box-annotations.tsx +2 -2
  23. package/app/components/canvas/canvas.tsx +1 -1
  24. package/app/components/canvas/confirmation/confirmation.tsx +1 -1
  25. package/app/components/sidebar/case-import/case-import.tsx +2 -2
  26. package/app/components/sidebar/case-import/components/CasePreviewSection.tsx +1 -1
  27. package/app/components/sidebar/case-import/components/ConfirmationDialog.tsx +1 -1
  28. package/app/components/sidebar/case-import/hooks/useFilePreview.ts +3 -3
  29. package/app/components/sidebar/case-import/hooks/useImportExecution.ts +2 -2
  30. package/app/components/sidebar/cases/case-sidebar.tsx +5 -4
  31. package/app/components/sidebar/cases/cases-modal.tsx +1 -1
  32. package/app/components/sidebar/files/files-modal.tsx +3 -2
  33. package/app/components/sidebar/notes/notes-sidebar.tsx +3 -3
  34. package/app/components/sidebar/sidebar-container.tsx +4 -3
  35. package/app/components/sidebar/sidebar.tsx +2 -2
  36. package/app/components/sidebar/upload/image-upload-zone.tsx +2 -2
  37. package/app/components/theme-provider/theme-provider.tsx +1 -1
  38. package/app/components/user/delete-account.tsx +1 -1
  39. package/app/components/user/manage-profile.tsx +2 -2
  40. package/app/components/user/mfa-phone-update.tsx +2 -2
  41. package/app/contexts/auth.context.ts +1 -1
  42. package/app/routes/auth/emailActionHandler.tsx +2 -2
  43. package/app/routes/auth/emailVerification.tsx +2 -2
  44. package/app/routes/auth/login.tsx +5 -5
  45. package/app/routes/auth/passwordReset.tsx +2 -2
  46. package/app/routes/striae/striae.tsx +2 -2
  47. package/app/services/audit/audit-console-logger.ts +46 -0
  48. package/app/services/audit/audit-export-csv.ts +126 -0
  49. package/app/services/audit/audit-export-report.ts +174 -0
  50. package/app/services/audit/audit-export-signing.ts +85 -0
  51. package/app/services/audit/audit-export.service.ts +334 -0
  52. package/app/services/audit/audit-file-type.ts +13 -0
  53. package/app/services/audit/audit-query-helpers.ts +88 -0
  54. package/app/services/audit/audit-worker-client.ts +95 -0
  55. package/app/services/audit/audit.service.ts +990 -0
  56. package/app/services/audit/builders/audit-entry-builder.ts +32 -0
  57. package/app/services/audit/builders/audit-event-builders-annotation.ts +150 -0
  58. package/app/services/audit/builders/audit-event-builders-case-file.ts +249 -0
  59. package/app/services/audit/builders/audit-event-builders-user-security.ts +449 -0
  60. package/app/services/audit/builders/audit-event-builders-workflow.ts +272 -0
  61. package/app/services/audit/builders/index.ts +40 -0
  62. package/app/services/audit/index.ts +2 -0
  63. package/app/types/case.ts +2 -2
  64. package/app/types/exceljs-bare.d.ts +3 -1
  65. package/app/types/user.ts +1 -1
  66. package/app/utils/audit-export-signature.ts +2 -2
  67. package/app/utils/confirmation-signature.ts +3 -3
  68. package/app/utils/data-operations.ts +5 -5
  69. package/app/utils/mfa-phone.ts +1 -1
  70. package/app/utils/mfa.ts +1 -1
  71. package/app/utils/permissions.ts +2 -2
  72. package/package.json +7 -8
  73. package/worker-configuration.d.ts +4435 -562
  74. package/workers/data-worker/src/data-worker.example.ts +3 -3
  75. package/workers/pdf-worker/src/{generated-assets.ts → assets/generated-assets.ts} +117 -117
  76. package/workers/pdf-worker/src/{format-striae.ts → formats/format-striae.ts} +535 -535
  77. package/workers/pdf-worker/src/pdf-worker.example.ts +1 -1
  78. package/app/services/audit-export.service.ts +0 -755
  79. package/app/services/audit.service.ts +0 -1474
  80. /package/app/services/{firebase-errors.ts → firebase/errors.ts} +0 -0
  81. /package/app/services/{firebase.ts → firebase/index.ts} +0 -0
@@ -0,0 +1,40 @@
1
+ export { buildValidationAuditEntry } from './audit-entry-builder';
2
+
3
+ export {
4
+ buildCaseExportAuditParams,
5
+ buildCaseImportAuditParams,
6
+ buildConfirmationCreationAuditParams,
7
+ buildConfirmationExportAuditParams,
8
+ buildConfirmationImportAuditParams
9
+ } from './audit-event-builders-workflow';
10
+
11
+ export {
12
+ buildCaseCreationAuditParams,
13
+ buildCaseDeletionAuditParams,
14
+ buildCaseRenameAuditParams,
15
+ buildFileAccessAuditParams,
16
+ buildFileDeletionAuditParams,
17
+ buildFileUploadAuditParams,
18
+ buildPDFGenerationAuditParams
19
+ } from './audit-event-builders-case-file';
20
+
21
+ export {
22
+ buildAnnotationCreateAuditParams,
23
+ buildAnnotationDeleteAuditParams,
24
+ buildAnnotationEditAuditParams
25
+ } from './audit-event-builders-annotation';
26
+
27
+ export {
28
+ buildAccountDeletionAuditParams,
29
+ buildEmailVerificationAuditParams,
30
+ buildEmailVerificationByEmailAuditParams,
31
+ buildMarkEmailVerificationSuccessfulAuditParams,
32
+ buildMfaAuthenticationAuditParams,
33
+ buildMfaEnrollmentAuditParams,
34
+ buildPasswordResetAuditParams,
35
+ buildSecurityViolationAuditParams,
36
+ buildUserLoginAuditParams,
37
+ buildUserLogoutAuditParams,
38
+ buildUserProfileUpdateAuditParams,
39
+ buildUserRegistrationAuditParams
40
+ } from './audit-event-builders-user-security';
@@ -0,0 +1,2 @@
1
+ export { AuditService, auditService } from './audit.service';
2
+ export { AuditExportService, auditExportService } from './audit-export.service';
package/app/types/case.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { FileData } from './file';
2
- import { AnnotationData, ConfirmationData } from './annotations';
1
+ import { type FileData } from './file';
2
+ import { type AnnotationData, type ConfirmationData } from './annotations';
3
3
 
4
4
  // Case-related types and interfaces
5
5
 
@@ -1,6 +1,8 @@
1
+ import type * as ExcelJSModule from 'exceljs';
2
+
1
3
  declare global {
2
4
  interface Window {
3
- ExcelJS?: typeof import('exceljs');
5
+ ExcelJS?: typeof ExcelJSModule;
4
6
  }
5
7
  }
6
8
 
package/app/types/user.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // User-related types and interfaces
2
2
 
3
- import { ReadOnlyCaseMetadata } from './import';
3
+ import { type ReadOnlyCaseMetadata } from './import';
4
4
 
5
5
  export interface UserData {
6
6
  uid: string;
@@ -1,7 +1,7 @@
1
1
  import {
2
- ForensicManifestSignature,
2
+ type ForensicManifestSignature,
3
3
  FORENSIC_MANIFEST_SIGNATURE_ALGORITHM,
4
- ManifestSignatureVerificationResult
4
+ type ManifestSignatureVerificationResult
5
5
  } from './SHA256';
6
6
  import { verifySignaturePayload } from './signature-utils';
7
7
 
@@ -1,8 +1,8 @@
1
- import { ConfirmationImportData } from '~/types';
1
+ import { type ConfirmationImportData } from '~/types';
2
2
  import {
3
- ForensicManifestSignature,
3
+ type ForensicManifestSignature,
4
4
  FORENSIC_MANIFEST_SIGNATURE_ALGORITHM,
5
- ManifestSignatureVerificationResult
5
+ type ManifestSignatureVerificationResult
6
6
  } from './SHA256';
7
7
  import { verifySignaturePayload } from './signature-utils';
8
8
 
@@ -4,20 +4,20 @@
4
4
  * for all interactions with the data worker microservice
5
5
  */
6
6
 
7
- import { User } from 'firebase/auth';
8
- import { CaseData, AnnotationData, ConfirmationImportData } from '~/types';
7
+ import type { User } from 'firebase/auth';
8
+ import { type CaseData, type AnnotationData, type ConfirmationImportData } from '~/types';
9
9
  import paths from '~/config/config.json';
10
10
  import { getDataApiKey } from './auth';
11
11
  import { validateUserSession, canAccessCase, canModifyCase } from './permissions';
12
12
  import {
13
- ForensicManifestData,
14
- ForensicManifestSignature,
13
+ type ForensicManifestData,
14
+ type ForensicManifestSignature,
15
15
  FORENSIC_MANIFEST_VERSION
16
16
  } from './SHA256';
17
17
  import { CONFIRMATION_SIGNATURE_VERSION } from './confirmation-signature';
18
18
  import {
19
19
  AUDIT_EXPORT_SIGNATURE_VERSION,
20
- AuditExportSigningPayload,
20
+ type AuditExportSigningPayload,
21
21
  isValidAuditExportSigningPayload
22
22
  } from './audit-export-signature';
23
23
 
@@ -1,5 +1,5 @@
1
1
  import type { MultiFactorInfo } from 'firebase/auth';
2
- import { getValidationError } from '~/services/firebase-errors';
2
+ import { getValidationError } from '~/services/firebase/errors';
3
3
 
4
4
  export interface PhoneValidationResult {
5
5
  isValid: boolean;
package/app/utils/mfa.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // MFA Configuration Helper
2
2
  // This file contains utilities and documentation for managing MFA in your Firebase project
3
3
 
4
- import { multiFactor, User } from 'firebase/auth';
4
+ import { multiFactor, type User } from 'firebase/auth';
5
5
 
6
6
  /**
7
7
  * Check if a user has MFA enrolled
@@ -1,5 +1,5 @@
1
- import { User } from 'firebase/auth';
2
- import { UserData, ExtendedUserData, UserLimits, ReadOnlyCaseMetadata } from '~/types';
1
+ import type { User } from 'firebase/auth';
2
+ import type { UserData, ExtendedUserData, UserLimits, ReadOnlyCaseMetadata } from '~/types';
3
3
  import paths from '~/config/config.json';
4
4
  import { getUserApiKey } from './auth';
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@striae-org/striae",
3
- "version": "3.2.1",
3
+ "version": "3.2.2",
4
4
  "private": false,
5
5
  "description": "Striae is a cloud-native forensic annotation application for firearms identification, built with React Router and Cloudflare Workers.",
6
6
  "license": "Apache-2.0",
@@ -9,14 +9,10 @@
9
9
  "type": "git",
10
10
  "url": "https://github.com/striae-org/striae.git"
11
11
  },
12
- "funding": [
13
- {
14
- "type": "github",
15
- "url": "https://github.com/sponsors/striae-org"
16
- },
12
+ "funding": [
17
13
  {
18
14
  "type": "patreon",
19
- "url": "https://join.striae.org"
15
+ "url": "https://www.patreon.com/striae"
20
16
  }
21
17
  ],
22
18
  "bugs": {
@@ -55,8 +51,11 @@
55
51
  "workers/*/src/*.example.ts",
56
52
  "workers/*/src/*.example.js",
57
53
  "workers/*/src/*.ts",
54
+ "workers/*/src/assets/*.ts",
55
+ "workers/*/src/formats/*.ts",
58
56
  "!workers/*/src/*worker.ts",
59
- "workers/pdf-worker/src/format-striae.ts",
57
+ "workers/pdf-worker/src/assets/generated-assets.ts",
58
+ "workers/pdf-worker/src/formats/format-striae.ts",
60
59
  "workers/pdf-worker/src/report-types.ts",
61
60
  "workers/*/wrangler.jsonc.example",
62
61
  ".env.example",