@striae-org/striae 3.0.5 → 3.1.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/app/components/actions/case-export/core-export.ts +1 -1
- package/app/components/actions/case-export/download-handlers.ts +10 -12
- package/app/components/actions/case-export/metadata-helpers.ts +1 -1
- package/app/components/actions/case-import/confirmation-import.ts +24 -9
- package/app/components/actions/case-import/orchestrator.ts +3 -4
- package/app/components/actions/case-import/validation.ts +3 -3
- package/app/components/actions/case-import/zip-processing.ts +12 -48
- package/app/components/actions/case-manage.ts +0 -1
- package/app/components/actions/confirm-export.ts +2 -2
- package/app/components/audit/user-audit-viewer.tsx +53 -15
- package/app/components/audit/user-audit.module.css +11 -4
- package/app/components/canvas/box-annotations/box-annotations.tsx +36 -7
- package/app/components/canvas/canvas.tsx +35 -24
- package/app/components/canvas/confirmation/confirmation.module.css +5 -2
- package/app/components/canvas/confirmation/confirmation.tsx +25 -8
- package/app/components/sidebar/case-export/case-export.module.css +194 -5
- package/app/components/sidebar/case-export/case-export.tsx +291 -11
- package/app/components/sidebar/case-import/case-import.module.css +9 -5
- package/app/components/sidebar/case-import/case-import.tsx +30 -7
- package/app/components/sidebar/case-import/components/CasePreviewSection.tsx +2 -2
- package/app/components/sidebar/case-import/components/ConfirmationDialog.tsx +1 -1
- package/app/components/sidebar/case-import/components/ExistingCaseSection.tsx +1 -1
- package/app/components/sidebar/case-import/hooks/useFilePreview.ts +34 -9
- package/app/components/sidebar/cases/case-sidebar.tsx +13 -13
- package/app/components/sidebar/cases/cases-modal.tsx +12 -2
- package/app/components/sidebar/files/files-modal.tsx +28 -8
- package/app/components/sidebar/sidebar.module.css +2 -3
- package/app/components/sidebar/sidebar.tsx +1 -16
- package/app/components/sidebar/upload/image-upload-zone.tsx +4 -4
- package/app/components/toolbar/toolbar-color-selector.tsx +3 -3
- package/app/components/toolbar/toolbar.tsx +19 -9
- package/app/components/user/delete-account.module.css +4 -1
- package/app/components/user/delete-account.tsx +22 -3
- package/app/components/user/manage-profile.tsx +0 -2
- package/app/entry.server.tsx +2 -3
- package/app/hooks/useInactivityTimeout.ts +5 -1
- package/app/routes/_index.tsx +1 -16
- package/app/routes/auth/emailVerification.tsx +1 -1
- package/app/routes/auth/route.ts +3 -12
- package/app/routes/striae/striae.tsx +1 -1
- package/app/services/audit.service.ts +29 -9
- package/app/tailwind.css +16 -1
- package/app/types/audit.ts +3 -3
- package/app/types/case.ts +1 -1
- package/app/types/import.ts +0 -2
- package/app/utils/SHA256.ts +3 -3
- package/app/utils/batch-operations.ts +6 -6
- package/app/utils/data-operations.ts +14 -7
- package/app/utils/permissions.ts +0 -2
- package/functions/[[path]].ts +0 -1
- package/package.json +1 -2
- package/public/assets/striae.jpg +0 -0
- package/scripts/run-eslint.cjs +14 -6
- package/worker-configuration.d.ts +2 -2
- package/workers/audit-worker/src/audit-worker.example.ts +9 -7
- package/workers/audit-worker/worker-configuration.d.ts +2 -2
- package/workers/audit-worker/wrangler.jsonc.example +1 -1
- package/workers/data-worker/src/data-worker.example.ts +1 -1
- package/workers/data-worker/worker-configuration.d.ts +2 -2
- package/workers/data-worker/wrangler.jsonc.example +1 -1
- package/workers/image-worker/worker-configuration.d.ts +2 -2
- package/workers/image-worker/wrangler.jsonc.example +1 -1
- package/workers/keys-worker/worker-configuration.d.ts +2 -2
- package/workers/keys-worker/wrangler.jsonc.example +1 -1
- package/workers/pdf-worker/src/pdf-worker.example.ts +3 -3
- package/workers/pdf-worker/worker-configuration.d.ts +2 -2
- package/workers/pdf-worker/wrangler.jsonc.example +1 -1
- package/workers/user-worker/src/user-worker.example.ts +10 -10
- package/workers/user-worker/worker-configuration.d.ts +2 -2
- package/workers/user-worker/wrangler.jsonc.example +1 -1
- package/wrangler.toml.example +1 -1
- package/app/components/sidebar/hash/hash-utility.module.css +0 -366
- package/app/components/sidebar/hash/hash-utility.tsx +0 -982
- package/app/routes/mobile-prevented/mobilePrevented.module.css +0 -47
- package/app/routes/mobile-prevented/mobilePrevented.tsx +0 -28
- package/app/routes/mobile-prevented/route.ts +0 -14
- package/app/utils/device-detection.ts +0 -5
- package/app/utils/html-sanitizer.ts +0 -80
|
@@ -9,8 +9,8 @@ interface BatchOperationOptions {
|
|
|
9
9
|
retryMultiplier: number;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
interface BatchResult<T> {
|
|
13
|
-
successful: Array<{ item: T; result:
|
|
12
|
+
interface BatchResult<T, R = unknown> {
|
|
13
|
+
successful: Array<{ item: T; result: R }>;
|
|
14
14
|
failed: Array<{ item: T; error: string; retryCount: number }>;
|
|
15
15
|
totalProcessed: number;
|
|
16
16
|
}
|
|
@@ -18,11 +18,11 @@ interface BatchResult<T> {
|
|
|
18
18
|
/**
|
|
19
19
|
* Execute operations in batches with exponential backoff on failures
|
|
20
20
|
*/
|
|
21
|
-
export const executeBatchOperations = async <T>(
|
|
21
|
+
export const executeBatchOperations = async <T, R = unknown>(
|
|
22
22
|
items: T[],
|
|
23
|
-
operation: (item: T) => Promise<
|
|
23
|
+
operation: (item: T) => Promise<R>,
|
|
24
24
|
options: Partial<BatchOperationOptions> = {}
|
|
25
|
-
): Promise<BatchResult<T>> => {
|
|
25
|
+
): Promise<BatchResult<T, R>> => {
|
|
26
26
|
const config = {
|
|
27
27
|
batchSize: 3,
|
|
28
28
|
baseDelay: 300,
|
|
@@ -31,7 +31,7 @@ export const executeBatchOperations = async <T>(
|
|
|
31
31
|
...options
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
const successful: Array<{ item: T; result:
|
|
34
|
+
const successful: Array<{ item: T; result: R }> = [];
|
|
35
35
|
const failed: Array<{ item: T; error: string; retryCount: number }> = [];
|
|
36
36
|
let totalProcessed = 0;
|
|
37
37
|
|
|
@@ -64,7 +64,7 @@ export interface AuditExportSigningResponse {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
// Higher-order function type for data operations
|
|
67
|
-
export type DataOperation<T> = (user: User, ...args:
|
|
67
|
+
export type DataOperation<T> = (user: User, ...args: unknown[]) => Promise<T>;
|
|
68
68
|
|
|
69
69
|
// ============================================================================
|
|
70
70
|
// CORE CASE DATA OPERATIONS
|
|
@@ -88,10 +88,12 @@ export const getCaseData = async (
|
|
|
88
88
|
throw new Error(`Session validation failed: ${sessionValidation.reason}`);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
// Validate case access
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
// Validate case access unless explicitly skipped.
|
|
92
|
+
if (options.skipValidation !== true) {
|
|
93
|
+
const accessCheck = await canAccessCase(user, caseNumber);
|
|
94
|
+
if (!accessCheck.allowed) {
|
|
95
|
+
return null; // Case doesn't exist or user doesn't have access
|
|
96
|
+
}
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
// Validate case number format
|
|
@@ -459,10 +461,15 @@ export const batchUpdateFiles = async (
|
|
|
459
461
|
throw new Error(`Batch update denied: ${modifyCheck.reason}`);
|
|
460
462
|
}
|
|
461
463
|
|
|
464
|
+
const perFileOptions: DataOperationOptions = {
|
|
465
|
+
...options,
|
|
466
|
+
skipValidation: true
|
|
467
|
+
};
|
|
468
|
+
|
|
462
469
|
// Process each file update
|
|
463
470
|
for (const update of updates) {
|
|
464
471
|
try {
|
|
465
|
-
await saveFileAnnotations(user, caseNumber, update.fileId, update.annotations);
|
|
472
|
+
await saveFileAnnotations(user, caseNumber, update.fileId, update.annotations, perFileOptions);
|
|
466
473
|
result.successful.push(update.fileId);
|
|
467
474
|
} catch (error) {
|
|
468
475
|
result.failed.push({
|
|
@@ -598,7 +605,7 @@ export const validateDataAccess = async (
|
|
|
598
605
|
*/
|
|
599
606
|
export const withDataOperation = <T>(
|
|
600
607
|
operation: DataOperation<T>
|
|
601
|
-
) => async (user: User, ...args:
|
|
608
|
+
) => async (user: User, ...args: unknown[]): Promise<T> => {
|
|
602
609
|
try {
|
|
603
610
|
// Standard session validation
|
|
604
611
|
const sessionValidation = await validateUserSession(user);
|
package/app/utils/permissions.ts
CHANGED
|
@@ -205,8 +205,6 @@ export const getLimitsDescription = async (user: User): Promise<string> => {
|
|
|
205
205
|
return `Account limits: ${MAX_CASES_REVIEW} case, ${MAX_FILES_PER_CASE_REVIEW} files per case`;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
const limits = getUserLimits(userData);
|
|
209
|
-
|
|
210
208
|
if (userData.permitted) {
|
|
211
209
|
return '';
|
|
212
210
|
} else {
|
package/functions/[[path]].ts
CHANGED
|
@@ -2,7 +2,6 @@ import { createPagesFunctionHandler } from "@remix-run/cloudflare-pages";
|
|
|
2
2
|
|
|
3
3
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
4
4
|
// @ts-ignore - the server build file is generated by `remix vite:build`
|
|
5
|
-
// eslint-disable-next-line import/no-unresolved
|
|
6
5
|
import * as build from "../build/server";
|
|
7
6
|
|
|
8
7
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@striae-org/striae",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Cloud-native forensic annotation application for firearms identification (Remix + Cloudflare Workers).",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -103,7 +103,6 @@
|
|
|
103
103
|
"@remix-run/cloudflare": "^2.17.4",
|
|
104
104
|
"@remix-run/cloudflare-pages": "^2.17.4",
|
|
105
105
|
"@remix-run/react": "^2.17.4",
|
|
106
|
-
"@types/xlsx": "^0.0.35",
|
|
107
106
|
"firebase": "^12.10.0",
|
|
108
107
|
"isbot": "^5.1.35",
|
|
109
108
|
"jszip": "^3.10.1",
|
package/public/assets/striae.jpg
CHANGED
|
Binary file
|
package/scripts/run-eslint.cjs
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
const { spawnSync } = require('node:child_process');
|
|
2
|
+
const fs = require('node:fs');
|
|
2
3
|
const path = require('node:path');
|
|
3
4
|
|
|
4
5
|
const eslintApiPath = require.resolve('eslint');
|
|
5
6
|
const eslintCliPath = path.resolve(path.dirname(eslintApiPath), '..', 'bin', 'eslint.js');
|
|
6
7
|
|
|
8
|
+
const gitignorePath = path.resolve(process.cwd(), '.gitignore');
|
|
9
|
+
const ignorePatterns = fs.existsSync(gitignorePath)
|
|
10
|
+
? fs
|
|
11
|
+
.readFileSync(gitignorePath, 'utf8')
|
|
12
|
+
.split(/\r?\n/)
|
|
13
|
+
.map((line) => line.trim())
|
|
14
|
+
.filter((line) => line && !line.startsWith('#'))
|
|
15
|
+
: [];
|
|
16
|
+
|
|
17
|
+
const ignoreArgs = ignorePatterns.flatMap((pattern) => ['--ignore-pattern', pattern]);
|
|
18
|
+
|
|
7
19
|
const defaultArgs = [
|
|
8
|
-
|
|
9
|
-
'.gitignore',
|
|
20
|
+
...ignoreArgs,
|
|
10
21
|
'--cache',
|
|
11
22
|
'--cache-location',
|
|
12
23
|
'./node_modules/.cache/eslint',
|
|
@@ -18,10 +29,7 @@ const eslintArgs = passthroughArgs.length > 0 ? passthroughArgs : defaultArgs;
|
|
|
18
29
|
|
|
19
30
|
const result = spawnSync(process.execPath, [eslintCliPath, ...eslintArgs], {
|
|
20
31
|
stdio: 'inherit',
|
|
21
|
-
env:
|
|
22
|
-
...process.env,
|
|
23
|
-
ESLINT_USE_FLAT_CONFIG: 'false',
|
|
24
|
-
},
|
|
32
|
+
env: process.env,
|
|
25
33
|
});
|
|
26
34
|
|
|
27
35
|
if (typeof result.status === 'number') {
|
|
@@ -5482,7 +5482,7 @@ type AIGatewayHeaders = {
|
|
|
5482
5482
|
[key: string]: string | number | boolean | object;
|
|
5483
5483
|
};
|
|
5484
5484
|
type AIGatewayUniversalRequest = {
|
|
5485
|
-
provider: AIGatewayProviders | string;
|
|
5485
|
+
provider: AIGatewayProviders | string;
|
|
5486
5486
|
endpoint: string;
|
|
5487
5487
|
headers: Partial<AIGatewayHeaders>;
|
|
5488
5488
|
query: unknown;
|
|
@@ -5498,7 +5498,7 @@ declare abstract class AiGateway {
|
|
|
5498
5498
|
gateway?: UniversalGatewayOptions;
|
|
5499
5499
|
extraHeaders?: object;
|
|
5500
5500
|
}): Promise<Response>;
|
|
5501
|
-
getUrl(provider?: AIGatewayProviders | string): Promise<string>;
|
|
5501
|
+
getUrl(provider?: AIGatewayProviders | string): Promise<string>;
|
|
5502
5502
|
}
|
|
5503
5503
|
interface AutoRAGInternalError extends Error {
|
|
5504
5504
|
}
|
|
@@ -8,7 +8,7 @@ interface AuditEntry {
|
|
|
8
8
|
userId: string;
|
|
9
9
|
action: string;
|
|
10
10
|
// Optional metadata fields that can be included
|
|
11
|
-
[key: string]:
|
|
11
|
+
[key: string]: unknown;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
interface SuccessResponse {
|
|
@@ -70,13 +70,15 @@ const appendAuditEntry = async (bucket: R2Bucket, filename: string, newEntry: Au
|
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
// Type guard to validate audit entry structure
|
|
73
|
-
const isValidAuditEntry = (entry:
|
|
73
|
+
const isValidAuditEntry = (entry: unknown): entry is AuditEntry => {
|
|
74
|
+
const candidate = entry as Partial<AuditEntry> | null;
|
|
75
|
+
|
|
74
76
|
return (
|
|
75
|
-
typeof
|
|
76
|
-
|
|
77
|
-
typeof
|
|
78
|
-
typeof
|
|
79
|
-
typeof
|
|
77
|
+
typeof candidate === 'object' &&
|
|
78
|
+
candidate !== null &&
|
|
79
|
+
typeof candidate.timestamp === 'string' &&
|
|
80
|
+
typeof candidate.userId === 'string' &&
|
|
81
|
+
typeof candidate.action === 'string'
|
|
80
82
|
);
|
|
81
83
|
};
|
|
82
84
|
|
|
@@ -5440,7 +5440,7 @@ type AIGatewayHeaders = {
|
|
|
5440
5440
|
[key: string]: string | number | boolean | object;
|
|
5441
5441
|
};
|
|
5442
5442
|
type AIGatewayUniversalRequest = {
|
|
5443
|
-
provider: AIGatewayProviders | string;
|
|
5443
|
+
provider: AIGatewayProviders | string;
|
|
5444
5444
|
endpoint: string;
|
|
5445
5445
|
headers: Partial<AIGatewayHeaders>;
|
|
5446
5446
|
query: unknown;
|
|
@@ -5456,7 +5456,7 @@ declare abstract class AiGateway {
|
|
|
5456
5456
|
gateway?: UniversalGatewayOptions;
|
|
5457
5457
|
extraHeaders?: object;
|
|
5458
5458
|
}): Promise<Response>;
|
|
5459
|
-
getUrl(provider?: AIGatewayProviders | string): Promise<string>;
|
|
5459
|
+
getUrl(provider?: AIGatewayProviders | string): Promise<string>;
|
|
5460
5460
|
}
|
|
5461
5461
|
interface AutoRAGInternalError extends Error {
|
|
5462
5462
|
}
|
|
@@ -30,7 +30,7 @@ interface ErrorResponse {
|
|
|
30
30
|
error: string;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
type APIResponse = SuccessResponse | ErrorResponse |
|
|
33
|
+
type APIResponse = SuccessResponse | ErrorResponse | unknown[] | Record<string, unknown>;
|
|
34
34
|
|
|
35
35
|
const corsHeaders: Record<string, string> = {
|
|
36
36
|
'Access-Control-Allow-Origin': 'PAGES_CUSTOM_DOMAIN',
|
|
@@ -5440,7 +5440,7 @@ type AIGatewayHeaders = {
|
|
|
5440
5440
|
[key: string]: string | number | boolean | object;
|
|
5441
5441
|
};
|
|
5442
5442
|
type AIGatewayUniversalRequest = {
|
|
5443
|
-
provider: AIGatewayProviders | string;
|
|
5443
|
+
provider: AIGatewayProviders | string;
|
|
5444
5444
|
endpoint: string;
|
|
5445
5445
|
headers: Partial<AIGatewayHeaders>;
|
|
5446
5446
|
query: unknown;
|
|
@@ -5456,7 +5456,7 @@ declare abstract class AiGateway {
|
|
|
5456
5456
|
gateway?: UniversalGatewayOptions;
|
|
5457
5457
|
extraHeaders?: object;
|
|
5458
5458
|
}): Promise<Response>;
|
|
5459
|
-
getUrl(provider?: AIGatewayProviders | string): Promise<string>;
|
|
5459
|
+
getUrl(provider?: AIGatewayProviders | string): Promise<string>;
|
|
5460
5460
|
}
|
|
5461
5461
|
interface AutoRAGInternalError extends Error {
|
|
5462
5462
|
}
|
|
@@ -5439,7 +5439,7 @@ type AIGatewayHeaders = {
|
|
|
5439
5439
|
[key: string]: string | number | boolean | object;
|
|
5440
5440
|
};
|
|
5441
5441
|
type AIGatewayUniversalRequest = {
|
|
5442
|
-
provider: AIGatewayProviders | string;
|
|
5442
|
+
provider: AIGatewayProviders | string;
|
|
5443
5443
|
endpoint: string;
|
|
5444
5444
|
headers: Partial<AIGatewayHeaders>;
|
|
5445
5445
|
query: unknown;
|
|
@@ -5455,7 +5455,7 @@ declare abstract class AiGateway {
|
|
|
5455
5455
|
gateway?: UniversalGatewayOptions;
|
|
5456
5456
|
extraHeaders?: object;
|
|
5457
5457
|
}): Promise<Response>;
|
|
5458
|
-
getUrl(provider?: AIGatewayProviders | string): Promise<string>;
|
|
5458
|
+
getUrl(provider?: AIGatewayProviders | string): Promise<string>;
|
|
5459
5459
|
}
|
|
5460
5460
|
interface AutoRAGInternalError extends Error {
|
|
5461
5461
|
}
|
|
@@ -5439,7 +5439,7 @@ type AIGatewayHeaders = {
|
|
|
5439
5439
|
[key: string]: string | number | boolean | object;
|
|
5440
5440
|
};
|
|
5441
5441
|
type AIGatewayUniversalRequest = {
|
|
5442
|
-
provider: AIGatewayProviders | string;
|
|
5442
|
+
provider: AIGatewayProviders | string;
|
|
5443
5443
|
endpoint: string;
|
|
5444
5444
|
headers: Partial<AIGatewayHeaders>;
|
|
5445
5445
|
query: unknown;
|
|
@@ -5455,7 +5455,7 @@ declare abstract class AiGateway {
|
|
|
5455
5455
|
gateway?: UniversalGatewayOptions;
|
|
5456
5456
|
extraHeaders?: object;
|
|
5457
5457
|
}): Promise<Response>;
|
|
5458
|
-
getUrl(provider?: AIGatewayProviders | string): Promise<string>;
|
|
5458
|
+
getUrl(provider?: AIGatewayProviders | string): Promise<string>;
|
|
5459
5459
|
}
|
|
5460
5460
|
interface AutoRAGInternalError extends Error {
|
|
5461
5461
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { launch } from "@cloudflare/puppeteer";
|
|
2
2
|
import type { PDFGenerationData, PDFGenerationRequest, ReportModule } from './report-types';
|
|
3
3
|
|
|
4
4
|
interface Env {
|
|
@@ -72,13 +72,13 @@ export default {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
if (request.method === 'POST') {
|
|
75
|
-
let browser: Awaited<ReturnType<typeof
|
|
75
|
+
let browser: Awaited<ReturnType<typeof launch>> | undefined;
|
|
76
76
|
|
|
77
77
|
try {
|
|
78
78
|
const payload = await request.json() as PDFGenerationData | PDFGenerationRequest;
|
|
79
79
|
const { reportFormat, data } = resolveReportRequest(payload);
|
|
80
80
|
|
|
81
|
-
browser = await
|
|
81
|
+
browser = await launch(env.BROWSER);
|
|
82
82
|
const page = await browser.newPage();
|
|
83
83
|
|
|
84
84
|
// Render report from module selected by report format name.
|
|
@@ -5440,7 +5440,7 @@ type AIGatewayHeaders = {
|
|
|
5440
5440
|
[key: string]: string | number | boolean | object;
|
|
5441
5441
|
};
|
|
5442
5442
|
type AIGatewayUniversalRequest = {
|
|
5443
|
-
provider: AIGatewayProviders | string;
|
|
5443
|
+
provider: AIGatewayProviders | string;
|
|
5444
5444
|
endpoint: string;
|
|
5445
5445
|
headers: Partial<AIGatewayHeaders>;
|
|
5446
5446
|
query: unknown;
|
|
@@ -5456,7 +5456,7 @@ declare abstract class AiGateway {
|
|
|
5456
5456
|
gateway?: UniversalGatewayOptions;
|
|
5457
5457
|
extraHeaders?: object;
|
|
5458
5458
|
}): Promise<Response>;
|
|
5459
|
-
getUrl(provider?: AIGatewayProviders | string): Promise<string>;
|
|
5459
|
+
getUrl(provider?: AIGatewayProviders | string): Promise<string>;
|
|
5460
5460
|
}
|
|
5461
5461
|
interface AutoRAGInternalError extends Error {
|
|
5462
5462
|
}
|
|
@@ -24,13 +24,13 @@ interface UserData {
|
|
|
24
24
|
interface CaseItem {
|
|
25
25
|
caseNumber: string;
|
|
26
26
|
caseName?: string;
|
|
27
|
-
[key: string]:
|
|
27
|
+
[key: string]: unknown;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
interface ReadOnlyCaseItem {
|
|
31
31
|
caseNumber: string;
|
|
32
32
|
caseName?: string;
|
|
33
|
-
[key: string]:
|
|
33
|
+
[key: string]: unknown;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
interface UserRequestData {
|
|
@@ -51,8 +51,8 @@ interface DeleteCasesRequest {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
interface CaseData {
|
|
54
|
-
files?: Array<{ id: string; [key: string]:
|
|
55
|
-
[key: string]:
|
|
54
|
+
files?: Array<{ id: string; [key: string]: unknown }>;
|
|
55
|
+
[key: string]: unknown;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
interface AccountDeletionProgressEvent {
|
|
@@ -247,7 +247,7 @@ async function handleGetUser(env: Env, userUid: string): Promise<Response> {
|
|
|
247
247
|
status: 200,
|
|
248
248
|
headers: corsHeaders
|
|
249
249
|
});
|
|
250
|
-
} catch
|
|
250
|
+
} catch {
|
|
251
251
|
return new Response('Failed to get user data', {
|
|
252
252
|
status: 500,
|
|
253
253
|
headers: corsHeaders
|
|
@@ -304,7 +304,7 @@ async function handleAddUser(request: Request, env: Env, userUid: string): Promi
|
|
|
304
304
|
status: value !== null ? 200 : 201,
|
|
305
305
|
headers: corsHeaders
|
|
306
306
|
});
|
|
307
|
-
} catch
|
|
307
|
+
} catch {
|
|
308
308
|
return new Response('Failed to save user data', {
|
|
309
309
|
status: 500,
|
|
310
310
|
headers: corsHeaders
|
|
@@ -346,7 +346,7 @@ async function deleteSingleCase(env: Env, userUid: string, caseNumber: string):
|
|
|
346
346
|
method: 'DELETE',
|
|
347
347
|
headers: { 'X-Custom-Auth-Key': dataApiKey }
|
|
348
348
|
});
|
|
349
|
-
} catch
|
|
349
|
+
} catch {
|
|
350
350
|
// Continue with other files
|
|
351
351
|
}
|
|
352
352
|
}
|
|
@@ -358,7 +358,7 @@ async function deleteSingleCase(env: Env, userUid: string, caseNumber: string):
|
|
|
358
358
|
headers: { 'X-Custom-Auth-Key': dataApiKey }
|
|
359
359
|
});
|
|
360
360
|
|
|
361
|
-
} catch
|
|
361
|
+
} catch {
|
|
362
362
|
// Continue with user deletion even if case deletion fails
|
|
363
363
|
}
|
|
364
364
|
}
|
|
@@ -532,7 +532,7 @@ async function handleAddCases(request: Request, env: Env, userUid: string): Prom
|
|
|
532
532
|
status: 200,
|
|
533
533
|
headers: corsHeaders
|
|
534
534
|
});
|
|
535
|
-
} catch
|
|
535
|
+
} catch {
|
|
536
536
|
return new Response('Failed to add cases', {
|
|
537
537
|
status: 500,
|
|
538
538
|
headers: corsHeaders
|
|
@@ -567,7 +567,7 @@ async function handleDeleteCases(request: Request, env: Env, userUid: string): P
|
|
|
567
567
|
status: 200,
|
|
568
568
|
headers: corsHeaders
|
|
569
569
|
});
|
|
570
|
-
} catch
|
|
570
|
+
} catch {
|
|
571
571
|
return new Response('Failed to delete cases', {
|
|
572
572
|
status: 500,
|
|
573
573
|
headers: corsHeaders
|
|
@@ -5440,7 +5440,7 @@ type AIGatewayHeaders = {
|
|
|
5440
5440
|
[key: string]: string | number | boolean | object;
|
|
5441
5441
|
};
|
|
5442
5442
|
type AIGatewayUniversalRequest = {
|
|
5443
|
-
provider: AIGatewayProviders | string;
|
|
5443
|
+
provider: AIGatewayProviders | string;
|
|
5444
5444
|
endpoint: string;
|
|
5445
5445
|
headers: Partial<AIGatewayHeaders>;
|
|
5446
5446
|
query: unknown;
|
|
@@ -5456,7 +5456,7 @@ declare abstract class AiGateway {
|
|
|
5456
5456
|
gateway?: UniversalGatewayOptions;
|
|
5457
5457
|
extraHeaders?: object;
|
|
5458
5458
|
}): Promise<Response>;
|
|
5459
|
-
getUrl(provider?: AIGatewayProviders | string): Promise<string>;
|
|
5459
|
+
getUrl(provider?: AIGatewayProviders | string): Promise<string>;
|
|
5460
5460
|
}
|
|
5461
5461
|
interface AutoRAGInternalError extends Error {
|
|
5462
5462
|
}
|
package/wrangler.toml.example
CHANGED