@litusarchieve18/agricore-utils 1.0.12 → 1.0.13

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.
@@ -0,0 +1,96 @@
1
+ import {
2
+ ACCESS_RANK,
3
+ ACT,
4
+ AccessLevel,
5
+ ApprovalStatus,
6
+ ApprovalType,
7
+ AuditStatus,
8
+ AuditType,
9
+ CAT,
10
+ CropCycleStatus,
11
+ DOCUMENT_MENU_MAP,
12
+ DocumentType,
13
+ ERROR_DICTIONARY,
14
+ EVERYONE,
15
+ EmitterType,
16
+ EnabledModule,
17
+ FORM_REGISTRY,
18
+ FacilityType,
19
+ HarvestMethod,
20
+ LinkedStatus,
21
+ MOD,
22
+ MODULE_LABELS,
23
+ MicroclimateZone,
24
+ MimeType,
25
+ NettingType,
26
+ NotificationMode,
27
+ OrderStatus,
28
+ PhysicalState,
29
+ PlantingMethod,
30
+ RESOURCE_MODULE_MAP,
31
+ RESOURCE_PATHS,
32
+ RESOURCE_REQUIREMENTS,
33
+ ROLE_SECTIONS_BY_KEY,
34
+ RelationshipType,
35
+ RowOrientation,
36
+ SENTINEL_UUID,
37
+ SoilTexture,
38
+ TASK_TYPE_REGISTRY,
39
+ TargetEntityType,
40
+ TaskStatus,
41
+ TaskType,
42
+ TransactionType,
43
+ TrellisType,
44
+ UserPrivilege,
45
+ UserRole,
46
+ VigorRating,
47
+ WaterSource
48
+ } from "./chunk-QI4YXI4P.mjs";
49
+ export {
50
+ ACCESS_RANK,
51
+ ACT,
52
+ AccessLevel,
53
+ ApprovalStatus,
54
+ ApprovalType,
55
+ AuditStatus,
56
+ AuditType,
57
+ CAT,
58
+ CropCycleStatus,
59
+ DOCUMENT_MENU_MAP,
60
+ DocumentType,
61
+ ERROR_DICTIONARY,
62
+ EVERYONE,
63
+ EmitterType,
64
+ EnabledModule,
65
+ FORM_REGISTRY,
66
+ FacilityType,
67
+ HarvestMethod,
68
+ LinkedStatus,
69
+ MOD,
70
+ MODULE_LABELS,
71
+ MicroclimateZone,
72
+ MimeType,
73
+ NettingType,
74
+ NotificationMode,
75
+ OrderStatus,
76
+ PhysicalState,
77
+ PlantingMethod,
78
+ RESOURCE_MODULE_MAP,
79
+ RESOURCE_PATHS,
80
+ RESOURCE_REQUIREMENTS,
81
+ ROLE_SECTIONS_BY_KEY,
82
+ RelationshipType,
83
+ RowOrientation,
84
+ SENTINEL_UUID,
85
+ SoilTexture,
86
+ TASK_TYPE_REGISTRY,
87
+ TargetEntityType,
88
+ TaskStatus,
89
+ TaskType,
90
+ TransactionType,
91
+ TrellisType,
92
+ UserPrivilege,
93
+ UserRole,
94
+ VigorRating,
95
+ WaterSource
96
+ };
package/dist/index.d.mts CHANGED
@@ -1,81 +1,5 @@
1
- type PermissionLevel = 'WRITE' | 'READ' | 'NONE';
2
- type ScopeType = 'company' | 'legalEntity' | 'facility';
3
- interface AvailableScope {
4
- authScopeId: string;
5
- base44Id: string;
6
- type: ScopeType;
7
- name: string;
8
- parentId: string | null;
9
- }
10
- interface CompanyConfig {
11
- isMultiEntity: boolean;
12
- }
13
- /**
14
- * Deep map of scope IDs to resource paths and their permission levels.
15
- * Example: { "uuid-123": { "farm.records": "WRITE" } }
16
- */
17
- interface ResourceOverrides {
18
- [scopeId: string]: Record<string, PermissionLevel>;
19
- }
20
- /**
21
- * The canonical Session object used throughout the AgriCore ecosystem.
22
- * All backend logic and frontend components should rely on THIS shape.
23
- */
24
- interface AgriCoreSession {
25
- userId: string;
26
- userName: string;
27
- userEmail: string;
28
- companyId: string;
29
- activeScopeId: string | null;
30
- companyConfig: CompanyConfig;
31
- role: string;
32
- privileges: string[];
33
- enabledModules: string[];
34
- readScopes: string[];
35
- writeScopes: string[];
36
- availableScopes: AvailableScope[];
37
- resourceOverrides: ResourceOverrides;
38
- }
39
- interface ResolvedError {
40
- title: string;
41
- text: string;
42
- module: string;
43
- moduleLabel: string;
44
- status: number;
45
- catAct: string;
46
- isSubscriptionIssue: boolean;
47
- isPermissionIssue: boolean;
48
- }
49
- interface AuthScopeFields {
50
- facilityId?: string;
51
- legalEntityId?: string;
52
- companyId?: string;
53
- }
54
- interface TabConfig {
55
- resourceId?: string;
56
- allowedRoles?: string[];
57
- requiredPrivileges?: string[];
58
- }
59
- interface FormMeta {
60
- label: string;
61
- menuUrl: string;
62
- module: string;
63
- }
64
- interface TaskTypeConfig {
65
- label: string;
66
- targetEntity: string;
67
- description: string;
68
- mimeTypes: string[];
69
- icon: string;
70
- approveAction: string;
71
- }
72
- interface InfrastructureFields {
73
- canonicalId: string;
74
- companyId: string;
75
- legalEntityId: string | null;
76
- facilityId: string | null;
77
- authScopeId: string;
78
- }
1
+ import { d as AgriCoreSession, a5 as UserRoleType, S as ResourceRequirement, c as AccessLevelType, j as AvailableScope, I as InfrastructureFields, r as FormMeta, Y as TabConfig, K as ResolvedError } from './constants-DxCjnH4L.mjs';
2
+ export { A as ACCESS_RANK, a as ACT, b as AccessLevel, e as ApprovalStatus, f as ApprovalType, g as AuditStatus, h as AuditType, i as AuthScopeFields, C as CAT, k as CompanyConfig, l as CropCycleStatus, D as DOCUMENT_MENU_MAP, m as DocumentType, E as ERROR_DICTIONARY, n as EVERYONE, o as EmitterType, p as EnabledModule, F as FORM_REGISTRY, q as FacilityType, H as HarvestMethod, L as LinkedStatus, M as MOD, s as MODULE_LABELS, t as MicroclimateZone, u as MimeType, v as ModCode, N as NettingType, w as NotificationMode, O as OrderStatus, P as PermissionLevel, x as PhysicalState, y as PlantingMethod, R as RESOURCE_MODULE_MAP, z as RESOURCE_PATHS, B as RESOURCE_REQUIREMENTS, G as ROLE_SECTIONS_BY_KEY, J as RelationshipType, Q as ResourceOverrides, T as RowOrientation, U as SENTINEL_UUID, V as ScopeType, W as SoilTexture, X as TASK_TYPE_REGISTRY, Z as TargetEntityType, _ as TaskStatus, $ as TaskType, a0 as TaskTypeConfig, a1 as TransactionType, a2 as TrellisType, a3 as UserPrivilege, a4 as UserRole, a6 as VigorRating, a7 as WaterSource } from './constants-DxCjnH4L.mjs';
79
3
 
80
4
  declare const AgriLogger: {
81
5
  log(level: "INFO" | "WARN" | "ERROR", message: string, meta: any): void;
@@ -147,36 +71,6 @@ declare const Converter: {
147
71
  kgToLbs: (kg: number, precision?: number) => number;
148
72
  };
149
73
 
150
- declare const MOD: {
151
- readonly OPERATIONS: "OPR";
152
- readonly EQUIPMENT: "EQP";
153
- readonly PACKHOUSE: "PCK";
154
- readonly FARM: "FRM";
155
- readonly SAFETY: "SAF";
156
- readonly TEAM_HR: "THR";
157
- readonly RECORDS: "REC";
158
- readonly ADMIN: "ADM";
159
- readonly DOCUMENTS: "DOC";
160
- readonly ALERTS: "ALT";
161
- readonly INFRA: "INF";
162
- readonly SESSION: "SES";
163
- };
164
- type ModCode = typeof MOD[keyof typeof MOD];
165
- declare const CAT: {
166
- readonly SUBSCRIPTION: "1";
167
- readonly PERMISSION: "2";
168
- readonly VALIDATION: "3";
169
- readonly INTEGRITY: "4";
170
- };
171
- declare const ACT: {
172
- readonly GENERIC: "00";
173
- readonly VIEW: "01";
174
- readonly CREATE: "02";
175
- readonly EDIT: "03";
176
- readonly DELETE: "04";
177
- readonly UPLOAD: "05";
178
- };
179
- declare const SENTINEL_UUID = "00000000-0000-0000-0000-000000000000";
180
74
  declare class AppError extends Error {
181
75
  status: number;
182
76
  appCode: string;
@@ -194,11 +88,6 @@ declare const ErrorFactory: {
194
88
  internal: (mod: string, msg?: string) => AppError;
195
89
  };
196
90
  declare const handleAppErrorResponse: (error: unknown, mod?: string) => Response;
197
- declare const MODULE_LABELS: Record<string, string>;
198
- declare const ERROR_DICTIONARY: Record<string, {
199
- title: string;
200
- text: string;
201
- }>;
202
91
  declare const resolveAppError: (appCode: string) => ResolvedError;
203
92
  declare const extractAppCode: (error: unknown) => string | null;
204
93
  declare const resolveError: (error: unknown) => ResolvedError;
@@ -235,269 +124,6 @@ declare function resolveAccess(session: AgriCoreSession, activeScopeId: string,
235
124
  declare function resolveMenuVisibility(session: AgriCoreSession, authScopeId: string, resourcePath: string): 'hidden' | 'read_only' | 'active';
236
125
  declare function isTabVisible(session: AgriCoreSession, activeScopeId: string, tabConfig: TabConfig): boolean;
237
126
  declare function isTabWritable(session: AgriCoreSession, activeScopeId: string, tabConfig: TabConfig): boolean;
238
- declare const UserRole: {
239
- readonly OWNER: "owner";
240
- readonly MANAGER: "manager";
241
- readonly SUPERVISOR: "supervisor";
242
- readonly LEADING_HAND: "leadingHand";
243
- readonly WORKER: "worker";
244
- };
245
- type UserRoleType = typeof UserRole[keyof typeof UserRole];
246
- declare const UserPrivilege: {
247
- readonly FINANCE: "finance";
248
- readonly HR: "hr";
249
- readonly MECHANIC: "mechanic";
250
- readonly AUDIT_COMPLIANCE: "auditCompliance";
251
- readonly ADMIN: "admin";
252
- };
253
- declare const AccessLevel: {
254
- readonly NONE: "NONE";
255
- readonly READ: "READ";
256
- readonly WRITE: "WRITE";
257
- };
258
- type AccessLevelType = keyof typeof AccessLevel;
259
- declare const EnabledModule: {
260
- readonly FARM_MANAGEMENT: "farm_management";
261
- readonly PACKHOUSE: "packhouse";
262
- readonly ACCOMMODATION: "accommodation";
263
- };
264
- declare const FacilityType: {
265
- readonly FARM: "farm";
266
- readonly PACKHOUSE: "packhouse";
267
- readonly ACCOMMODATION: "accommodation";
268
- };
269
- declare const LinkedStatus: {
270
- readonly NOT_LINKED: "not_linked";
271
- readonly PENDING_LINK: "pending_link";
272
- readonly LINKED: "linked";
273
- };
274
- declare const RelationshipType: {
275
- readonly SUPPLIER: "supplier";
276
- readonly CUSTOMER: "customer";
277
- readonly BOTH: "both";
278
- };
279
- declare const ApprovalType: {
280
- readonly ROLE: "role";
281
- readonly PRIVILEGE: "privilege";
282
- readonly SPECIFIC_USERS: "specific_users";
283
- };
284
- declare const TransactionType: {
285
- readonly PURCHASE_ORDER: "purchase_order";
286
- readonly SALES_ORDER: "sales_order";
287
- readonly REPAIR: "repair";
288
- readonly FUEL: "fuel";
289
- readonly OTHER: "other";
290
- };
291
- declare const ApprovalStatus: {
292
- readonly PENDING: "pending";
293
- readonly APPROVED: "approved";
294
- readonly REJECTED: "rejected";
295
- };
296
- declare const OrderStatus: {
297
- readonly DRAFT: "draft";
298
- readonly PENDING_FINANCE: "pending_finance";
299
- readonly NEW: "new";
300
- readonly ACKNOWLEDGED: "acknowledged";
301
- readonly IN_PROGRESS: "in_progress";
302
- readonly SHIPPED: "shipped";
303
- readonly RECEIVED: "received";
304
- readonly CANCELLED: "cancelled";
305
- };
306
- declare const NotificationMode: {
307
- readonly INTERNAL: "internal";
308
- readonly EXTERNAL_EMAIL: "external_email";
309
- readonly NONE: "none";
310
- };
311
- declare const TaskType: {
312
- readonly KML_PARSE: "KML_PARSE";
313
- readonly INVOICE_OCR: "INVOICE_OCR";
314
- readonly AUDIT_UPLOAD: "AUDIT_UPLOAD";
315
- readonly REPORT_GEN: "REPORT_GEN";
316
- };
317
- declare const TaskStatus: {
318
- readonly PENDING: "PENDING";
319
- readonly PROCESSING: "PROCESSING";
320
- readonly COMPLETED: "COMPLETED";
321
- readonly FAILED: "FAILED";
322
- readonly AWAITING_REVIEW: "AWAITING_REVIEW";
323
- readonly VERIFIED: "VERIFIED";
324
- readonly REJECTED: "REJECTED";
325
- };
326
- declare const MimeType: {
327
- readonly KML: "application/vnd.google-earth.kml+xml";
328
- readonly KMZ: "application/vnd.google-earth.kmz";
329
- readonly PDF: "application/pdf";
330
- readonly XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
331
- readonly XLS: "application/vnd.ms-excel";
332
- readonly JPEG: "image/jpeg";
333
- readonly PNG: "image/png";
334
- };
335
- declare const TargetEntityType: {
336
- readonly FARM: "FARM";
337
- readonly ZONE: "ZONE";
338
- readonly BLOCK: "BLOCK";
339
- readonly INFRASTRUCTURE: "INFRASTRUCTURE";
340
- readonly AUTO: "AUTO";
341
- };
342
- declare const AuditType: {
343
- readonly FRESHCARE: "Freshcare";
344
- readonly HACCP: "HACCP";
345
- readonly WHS: "WHS";
346
- readonly CUSTOM: "Custom";
347
- };
348
- declare const AuditStatus: {
349
- readonly DRAFT: "DRAFT";
350
- readonly IN_REVIEW: "IN_REVIEW";
351
- readonly FINALIZED: "FINALIZED";
352
- };
353
- declare const SoilTexture: {
354
- readonly SAND: "SAND";
355
- readonly LOAMY_SAND: "LOAMY_SAND";
356
- readonly SANDY_LOAM: "SANDY_LOAM";
357
- readonly LOAM: "LOAM";
358
- readonly SILT_LOAM: "SILT_LOAM";
359
- readonly SILT: "SILT";
360
- readonly SANDY_CLAY_LOAM: "SANDY_CLAY_LOAM";
361
- readonly CLAY_LOAM: "CLAY_LOAM";
362
- readonly SILTY_CLAY_LOAM: "SILTY_CLAY_LOAM";
363
- readonly SANDY_CLAY: "SANDY_CLAY";
364
- readonly SILTY_CLAY: "SILTY_CLAY";
365
- readonly CLAY: "CLAY";
366
- };
367
- declare const MicroclimateZone: {
368
- readonly STANDARD: "STANDARD";
369
- readonly FROST_POCKET: "FROST_POCKET";
370
- readonly WIND_CORRIDOR: "WIND_CORRIDOR";
371
- readonly EXPOSED_RIDGE: "EXPOSED_RIDGE";
372
- readonly HEAT_TRAP: "HEAT_TRAP";
373
- readonly RIPARIAN: "RIPARIAN";
374
- };
375
- declare const PlantingMethod: {
376
- readonly SQUARE: "SQUARE";
377
- readonly RECTANGULAR: "RECTANGULAR";
378
- readonly HEXAGONAL: "HEXAGONAL";
379
- readonly QUINCUNX: "QUINCUNX";
380
- readonly CONTOUR: "CONTOUR";
381
- };
382
- declare const RowOrientation: {
383
- readonly NORTH_SOUTH: "NORTH_SOUTH";
384
- readonly EAST_WEST: "EAST_WEST";
385
- readonly NORTHEAST_SOUTHWEST: "NORTHEAST_SOUTHWEST";
386
- readonly NORTHWEST_SOUTHEAST: "NORTHWEST_SOUTHEAST";
387
- };
388
- declare const EmitterType: {
389
- readonly SURFACE_DRIP: "SURFACE_DRIP";
390
- readonly SUBSURFACE_DRIP: "SUBSURFACE_DRIP";
391
- readonly MICRO_SPRINKLER: "MICRO_SPRINKLER";
392
- readonly JET_SPRAY: "JET_SPRAY";
393
- readonly INLINE_DRIPPER: "INLINE_DRIPPER";
394
- readonly PRESSURE_COMPENSATED: "PRESSURE_COMPENSATED";
395
- };
396
- declare const TrellisType: {
397
- readonly NONE: "NONE";
398
- readonly VERTICAL_AXIS: "VERTICAL_AXIS";
399
- readonly TWO_D_PLANE: "2D_PLANE";
400
- readonly V_TRELLIS: "V_TRELLIS";
401
- readonly T_BAR: "T_BAR";
402
- readonly PERGOLA: "PERGOLA";
403
- readonly Y_TRELLIS: "Y_TRELLIS";
404
- };
405
- declare const NettingType: {
406
- readonly NONE: "NONE";
407
- readonly OVERHEAD_HAIL: "OVERHEAD_HAIL";
408
- readonly SIDE_BIRD: "SIDE_BIRD";
409
- readonly FULL_EXCLUSION: "FULL_EXCLUSION";
410
- readonly SHADE_30: "SHADE_30";
411
- readonly SHADE_50: "SHADE_50";
412
- readonly CROSS_OVER: "CROSS_OVER";
413
- };
414
- declare const HarvestMethod: {
415
- readonly HAND: "HAND";
416
- readonly MACHINE: "MACHINE";
417
- };
418
- declare const VigorRating: {
419
- readonly VERY_LOW: "VERY_LOW";
420
- readonly LOW: "LOW";
421
- readonly MODERATE: "MODERATE";
422
- readonly HIGH: "HIGH";
423
- readonly VERY_HIGH: "VERY_HIGH";
424
- };
425
- declare const CropCycleStatus: {
426
- readonly NEW: "NEW";
427
- readonly CONFIRMED: "CONFIRMED";
428
- readonly ACTIVE: "ACTIVE";
429
- readonly COMPLETED: "COMPLETED";
430
- };
431
- declare const WaterSource: {
432
- readonly BORE_WELL: "BORE_WELL";
433
- readonly RIVER_STREAM: "RIVER_STREAM";
434
- readonly ON_FARM_DAM: "ON_FARM_DAM";
435
- readonly IRRIGATION_SCHEME: "IRRIGATION_SCHEME";
436
- readonly MUNICIPAL: "MUNICIPAL";
437
- readonly RECLAIMED_WASTE: "RECLAIMED_WASTE";
438
- readonly RAINWATER: "RAINWATER";
439
- };
440
- declare const PhysicalState: {
441
- readonly LIQUID: "LIQUID";
442
- readonly GAS: "GAS";
443
- };
444
- declare const FORM_REGISTRY: Record<string, FormMeta>;
445
- declare function getFormMeta(componentId: string): FormMeta | null;
446
- declare function getFormsGroupedByModule(): Record<string, Array<{
447
- id: string;
448
- } & FormMeta>>;
449
- declare const TASK_TYPE_REGISTRY: Record<string, TaskTypeConfig>;
450
- declare const getTaskTypeOptions: () => {
451
- value: string;
452
- label: string;
453
- description: string;
454
- mimeTypes: string[];
455
- icon: string;
456
- }[];
457
- declare const getAcceptedMimeTypes: (taskType: string) => string;
458
- declare const getApproveAction: (taskType: string) => string | null;
459
- declare const RESOURCE_PATHS: {
460
- dashboard: string;
461
- operations: string;
462
- equipment: string;
463
- safety: string;
464
- team: string;
465
- records: string;
466
- adminSettings: string;
467
- documentHub: string;
468
- documentHubTemplates: string;
469
- documentHubFolder: string;
470
- documentHubExtraction: string;
471
- documentHubQueue: string;
472
- analytics: string;
473
- adminUserRoster: string;
474
- adminRolesPermissions: string;
475
- adminBlueprintsSites: string;
476
- adminCompanySettings: string;
477
- farmManagement: string;
478
- packhouse: string;
479
- accommodation: string;
480
- equipPreStart: string;
481
- equipMaintenance: string;
482
- equipFuelRegister: string;
483
- equipCalibration: string;
484
- equipFleet: string;
485
- safetyAuditing: string;
486
- safetyFood: string;
487
- safetyWhs: string;
488
- safetyCleaning: string;
489
- teamStaff: string;
490
- teamTraining: string;
491
- };
492
- declare const RESOURCE_MODULE_MAP: Record<string, string[]>;
493
- declare const ACCESS_RANK: Record<AccessLevelType, number>;
494
- declare const ROLE_SECTIONS_BY_KEY: Record<string, UserRoleType[]>;
495
- interface ResourceRequirement {
496
- allowedRoles?: UserRoleType[];
497
- requiredPrivileges?: string[];
498
- }
499
- declare const EVERYONE: ("owner" | "manager" | "supervisor" | "leadingHand" | "worker")[];
500
- declare const RESOURCE_REQUIREMENTS: Record<string, ResourceRequirement>;
501
127
  declare function evaluateBaseAccess(resourcePath: string, session: {
502
128
  role?: UserRoleType;
503
129
  privileges?: string[];
@@ -508,11 +134,6 @@ declare function evaluateBaseAccess(resourcePath: string, session: {
508
134
  */
509
135
  declare function resolveEffectiveAccess(base: AccessLevelType, override?: AccessLevelType | null): AccessLevelType;
510
136
  declare function findSpecificOverride(session: AgriCoreSession, activeScopeId: string, resourcePath: string): AccessLevelType | null;
511
- /**
512
- * Tenant Boundary Guard (Backend Only)
513
- * Note: db is typed as 'any' here because Base44 SDK types vary,
514
- * but you can refine this with your internal SDK types.
515
- */
516
137
  declare function assertTenantBoundary(db: any, session: AgriCoreSession, // Pass the JWT session instead of just requesterCompanyId
517
138
  targets: {
518
139
  targetUserId?: string;
@@ -520,41 +141,19 @@ targets: {
520
141
  expectedScopeType?: 'company' | 'legalEntity' | 'facility';
521
142
  }): Promise<boolean>;
522
143
  declare function verifyAndExtractSession(token: string, secret: string): Promise<AgriCoreSession>;
523
- declare enum DocumentType {
524
- SPRAY_RECORD = "SPRAY_RECORD",
525
- FERTIGATION_RECORD = "FERTIGATION_RECORD",
526
- FERTILIZER_RECORD = "FERTILIZER_RECORD",
527
- QA = "QA",
528
- CLEANING = "CLEANING",
529
- PEST = "PEST",
530
- EQUIPMENT_CALIBRATION_RECORD = "EQUIPMENT_CALIBRATION_RECORD",
531
- INVENTORY_CONSUMABLES = "INVENTORY_CONSUMABLES",
532
- INVENTORY_BOX_CARTON = "INVENTORY_BOX_CARTON",
533
- INVENTORY_CHEMICALS = "INVENTORY_CHEMICALS",
534
- STOCKTAKE = "STOCKTAKE",
535
- STOCKTAKE_MSDS = "STOCKTAKE_MSDS",
536
- MAPPING_FARM_MAPS = "MAPPING_FARM_MAPS",
537
- MAPPING_TRAFIC_MANAGEMENT = "MAPPING_TRAFIC_MANAGEMENT",
538
- MAPPING_EMERGENCY = "MAPPING_EMERGENCY",
539
- INCIDENT_REPORT = "INCIDENT_REPORT",
540
- TRAINING_RECORDS = "TRAINING_RECORDS",
541
- SOPS = "SOPS",
542
- RISK_ASSESSMENTS = "RISK_ASSESSMENTS",
543
- SERVICING_MAINTENANCE = "SERVICING_MAINTENANCE",
544
- SOIL_TEST = "SOIL_TEST",
545
- LEAF_TEST = "LEAF_TEST",
546
- WATER_TEST = "WATER_TEST",
547
- MRL_TESTING = "MRL_TESTING",
548
- HEAVY_METAL = "HEAVY_METAL",
549
- MICROBIAL = "MICROBIAL",
550
- HARVEST_LOG = "HARVEST_LOG",
551
- PACKHOUSE_INSPECTION = "PACKHOUSE_INSPECTION",
552
- TRAINING_CERTIFICATE = "TRAINING_CERTIFICATE",
553
- INVOICE = "INVOICE",
554
- LEGAL_CONTRACT = "LEGAL_CONTRACT",
555
- AUDIT_REPORT = "AUDIT_REPORT",
556
- SENSITIVE_IDENTITY = "SENSITIVE_IDENTITY"
557
- }
144
+ declare function getFormMeta(componentId: string): FormMeta | null;
145
+ declare function getFormsGroupedByModule(): Record<string, Array<{
146
+ id: string;
147
+ } & FormMeta>>;
148
+ declare const getTaskTypeOptions: () => {
149
+ value: string;
150
+ label: string;
151
+ description: string;
152
+ mimeTypes: string[];
153
+ icon: string;
154
+ }[];
155
+ declare const getAcceptedMimeTypes: (taskType: string) => string;
156
+ declare const getApproveAction: (taskType: string) => string | null;
558
157
  /**
559
158
  * Generates a full folder path matching strict business requirements.
560
159
  * Static: {SiteName}/_CORE/{DocumentType}
@@ -573,4 +172,4 @@ declare function calculateFileMetadataMatch(criteria: {
573
172
  contextMatch?: string[];
574
173
  }, fileMetadata: Record<string, any>, auditContext: Record<string, any>): number;
575
174
 
576
- export { ACCESS_RANK, ACT, AccessLevel, type AccessLevelType, type AgriCoreSession, AgriLogger, AppError, ApprovalStatus, ApprovalType, AuditStatus, AuditType, type AuthScopeFields, type AvailableScope, CAT, type CompanyConfig, Converter, CropCycleStatus, DocumentType, ERROR_DICTIONARY, EVERYONE, EmitterType, EnabledModule, ErrorFactory, FORM_REGISTRY, FacilityType, type FormMeta, HarvestMethod, type InfrastructureFields, LinkedStatus, MOD, MODULE_LABELS, MicroclimateZone, MimeType, type ModCode, NettingType, NotificationMode, OrderStatus, type PermissionLevel, PhysicalState, PlantingMethod, RESOURCE_MODULE_MAP, RESOURCE_PATHS, RESOURCE_REQUIREMENTS, ROLE_SECTIONS_BY_KEY, RelationshipType, type ResolvedError, type ResourceOverrides, type ResourceRequirement, RowOrientation, SENTINEL_UUID, type ScopeType, SoilTexture, TASK_TYPE_REGISTRY, type TabConfig, TargetEntityType, TaskStatus, TaskType, type TaskTypeConfig, TransactionType, TrellisType, UserPrivilege, UserRole, type UserRoleType, Validator, VigorRating, WaterSource, assertCanWrite, assertTenantBoundary, buildRlsFilter, calculateFileMetadataMatch, canRead, canWrite, evaluateBaseAccess, extractAppCode, findSpecificOverride, generateCanonicalId, generateDocumentPath, generateInfrastructureFields, getAcceptedMimeTypes, getApproveAction, getFormMeta, getFormsGroupedByModule, getTaskTypeOptions, handleAppErrorResponse, isTabVisible, isTabWritable, resolveAccess, resolveAppError, resolveEffectiveAccess, resolveError, resolveMenuVisibility, verifyAndExtractSession, withAgriLogging };
175
+ export { AccessLevelType, AgriCoreSession, AgriLogger, AppError, AvailableScope, Converter, ErrorFactory, FormMeta, InfrastructureFields, ResolvedError, ResourceRequirement, TabConfig, UserRoleType, Validator, assertCanWrite, assertTenantBoundary, buildRlsFilter, calculateFileMetadataMatch, canRead, canWrite, evaluateBaseAccess, extractAppCode, findSpecificOverride, generateCanonicalId, generateDocumentPath, generateInfrastructureFields, getAcceptedMimeTypes, getApproveAction, getFormMeta, getFormsGroupedByModule, getTaskTypeOptions, handleAppErrorResponse, isTabVisible, isTabWritable, resolveAccess, resolveAppError, resolveEffectiveAccess, resolveError, resolveMenuVisibility, verifyAndExtractSession, withAgriLogging };