@litusarchieve18/agricore-utils 1.0.14 → 1.0.15

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/README.md CHANGED
@@ -183,6 +183,8 @@ Run the publish command:
183
183
  Bash
184
184
  npm publish --access public
185
185
  📝 Version History
186
+ V1.0.15 — add some standardized enum and types for CAR
187
+
186
188
  V1.0.14 — add DOCUMENT_DISPLAY_INFO do manage the grouping and a little description for UI
187
189
 
188
190
  V1.0.13 — add DocumentMenuMap and refactoring library code to export enum
@@ -140,7 +140,10 @@ var TaskType = {
140
140
  KML_PARSE: "KML_PARSE",
141
141
  INVOICE_OCR: "INVOICE_OCR",
142
142
  AUDIT_UPLOAD: "AUDIT_UPLOAD",
143
- REPORT_GEN: "REPORT_GEN"
143
+ REPORT_GEN: "REPORT_GEN",
144
+ PDF_STAMPING: "PDF_STAMPING",
145
+ CAR_TEMPLATE_UPLOAD: "CAR_TEMPLATE_UPLOAD",
146
+ CORRECTIVE_ACTION_COMPILE: "CORRECTIVE_ACTION_COMPILE"
144
147
  };
145
148
  var TaskStatus = {
146
149
  PENDING: "PENDING",
@@ -722,6 +725,36 @@ var DOCUMENT_MENU_MAP = {
722
725
  ["AUDIT_REPORT" /* AUDIT_REPORT */]: [RESOURCE_PATHS.safetyAuditing, RESOURCE_PATHS.dashboard],
723
726
  ["SENSITIVE_IDENTITY" /* SENSITIVE_IDENTITY */]: [RESOURCE_PATHS.adminUserRoster]
724
727
  };
728
+ var SIGNATURE_MODES = {
729
+ TYPED_NAME: "typed_name",
730
+ DRAWN_IMAGE: "drawn_image",
731
+ UPLOADED_IMAGE: "uploaded_image"
732
+ };
733
+ var CORRECTIVE_ACTION_STATUSES = {
734
+ DRAFT: "draft",
735
+ GENERATED: "generated",
736
+ REVIEWED: "reviewed",
737
+ CLOSED: "closed",
738
+ FAILED: "failed"
739
+ };
740
+ var TEMPLATE_SCOPE_LEVELS = {
741
+ FACILITY: "facility",
742
+ LEGAL_ENTITY: "legalEntity",
743
+ COMPANY: "company"
744
+ };
745
+ var CORRECTIVE_ACTION_GENERATION_SOURCES = {
746
+ CREATE: "CREATE",
747
+ RECREATE: "RECREATE"
748
+ };
749
+ var CAR_SUPPORTED_EVIDENCE_MIME_TYPES = [
750
+ "application/pdf",
751
+ "image/png",
752
+ "image/jpeg"
753
+ ];
754
+ var CAR_SUPPORTED_SIGNATURE_MIME_TYPES = [
755
+ "image/png",
756
+ "image/jpeg"
757
+ ];
725
758
 
726
759
  export {
727
760
  MOD,
@@ -772,5 +805,11 @@ export {
772
805
  DocumentCategory,
773
806
  DOCUMENT_DISPLAY_INFO,
774
807
  CATEGORY_TABS,
775
- DOCUMENT_MENU_MAP
808
+ DOCUMENT_MENU_MAP,
809
+ SIGNATURE_MODES,
810
+ CORRECTIVE_ACTION_STATUSES,
811
+ TEMPLATE_SCOPE_LEVELS,
812
+ CORRECTIVE_ACTION_GENERATION_SOURCES,
813
+ CAR_SUPPORTED_EVIDENCE_MIME_TYPES,
814
+ CAR_SUPPORTED_SIGNATURE_MIME_TYPES
776
815
  };
@@ -76,6 +76,82 @@ interface InfrastructureFields {
76
76
  facilityId: string | null;
77
77
  authScopeId: string;
78
78
  }
79
+ /**
80
+ * Base44 ID alias for readability only.
81
+ * Still just string at runtime.
82
+ */
83
+ type Base44Id = string;
84
+ /**
85
+ * Canonical UUID alias for readability only.
86
+ */
87
+ type CanonicalId = string;
88
+ /**
89
+ * Derived union types from constants.
90
+ */
91
+ type SignatureMode = typeof SIGNATURE_MODES[keyof typeof SIGNATURE_MODES];
92
+ type CorrectiveActionStatus = typeof CORRECTIVE_ACTION_STATUSES[keyof typeof CORRECTIVE_ACTION_STATUSES];
93
+ type FileUploadTaskType = typeof TaskType[keyof typeof TaskType];
94
+ type TemplateScopeLevel = typeof TEMPLATE_SCOPE_LEVELS[keyof typeof TEMPLATE_SCOPE_LEVELS];
95
+ type CorrectiveActionGenerationSource = typeof CORRECTIVE_ACTION_GENERATION_SOURCES[keyof typeof CORRECTIVE_ACTION_GENERATION_SOURCES];
96
+ type CarSupportedEvidenceMimeType = typeof CAR_SUPPORTED_EVIDENCE_MIME_TYPES[number];
97
+ type CarSupportedSignatureMimeType = typeof CAR_SUPPORTED_SIGNATURE_MIME_TYPES[number];
98
+ /**
99
+ * Shared signature payload used by create/preview CAR requests.
100
+ * typed_name stores text only.
101
+ * drawn_image / uploaded_image store a FileAsset Base44 ID.
102
+ */
103
+ type SignatureInput = {
104
+ mode: typeof SIGNATURE_MODES.TYPED_NAME;
105
+ typedName: string;
106
+ fileAssetId?: null;
107
+ } | {
108
+ mode: typeof SIGNATURE_MODES.DRAWN_IMAGE | typeof SIGNATURE_MODES.UPLOADED_IMAGE;
109
+ typedName?: null;
110
+ fileAssetId: Base44Id;
111
+ };
112
+ /**
113
+ * Optional normalized signature value that can also be reused inside entities later.
114
+ * Useful if you want one stable shape for mapped/flattened signature data.
115
+ */
116
+ type NormalizedSignatureValue = {
117
+ mode: SignatureMode;
118
+ typedName?: string | null;
119
+ fileAssetId?: Base44Id | null;
120
+ };
121
+ /**
122
+ * Metadata stored inside FileUploadTask for CAR compilation.
123
+ * Keep this lean: execution references only, not full form content.
124
+ */
125
+ type CorrectiveActionCompileTaskMetadata = {
126
+ correctiveActionId: Base44Id;
127
+ companyAuditDetailResponseId: Base44Id;
128
+ companyAuditHeaderId: Base44Id;
129
+ templateAssetId: Base44Id;
130
+ resolvedTemplateScopeLevel: TemplateScopeLevel;
131
+ operationalSettingsId: Base44Id;
132
+ supportingEvidenceFileIds: Base44Id[];
133
+ appendSupportingEvidenceInOrder: true;
134
+ linkCompiledPdfToResponseEvidence: true;
135
+ linkOriginalSupportingEvidenceToResponseEvidence: true;
136
+ generationSource: CorrectiveActionGenerationSource;
137
+ previousCorrectiveActionId: Base44Id | null;
138
+ };
139
+ /**
140
+ * FileAsset.metadata shape for CAR templates.
141
+ * Stored on the uploaded template PDF asset.
142
+ */
143
+ type CarTemplateFileMetadata = {
144
+ templateType: 'CAR';
145
+ stampingZone: {
146
+ xPct: number;
147
+ yPct: number;
148
+ wPct: number;
149
+ hPct: number;
150
+ };
151
+ pageNumber: number;
152
+ applyToAllPages: boolean;
153
+ promotedAt?: string;
154
+ };
79
155
 
80
156
  declare const MOD: {
81
157
  readonly OPERATIONS: "OPR";
@@ -185,11 +261,18 @@ declare const NotificationMode: {
185
261
  readonly EXTERNAL_EMAIL: "external_email";
186
262
  readonly NONE: "none";
187
263
  };
264
+ /**
265
+ * FileUploadTask type for CAR compilation worker.
266
+ * Reused between service layer and async worker.
267
+ */
188
268
  declare const TaskType: {
189
269
  readonly KML_PARSE: "KML_PARSE";
190
270
  readonly INVOICE_OCR: "INVOICE_OCR";
191
271
  readonly AUDIT_UPLOAD: "AUDIT_UPLOAD";
192
272
  readonly REPORT_GEN: "REPORT_GEN";
273
+ readonly PDF_STAMPING: "PDF_STAMPING";
274
+ readonly CAR_TEMPLATE_UPLOAD: "CAR_TEMPLATE_UPLOAD";
275
+ readonly CORRECTIVE_ACTION_COMPILE: "CORRECTIVE_ACTION_COMPILE";
193
276
  };
194
277
  declare const TaskStatus: {
195
278
  readonly PENDING: "PENDING";
@@ -413,5 +496,57 @@ declare const DOCUMENT_DISPLAY_INFO: Record<DocumentType, {
413
496
  }>;
414
497
  declare const CATEGORY_TABS: string[];
415
498
  declare const DOCUMENT_MENU_MAP: Record<DocumentType, string[]>;
499
+ /**
500
+ * Signature modes supported by CAR and similar official document flows.
501
+ * Use this for both frontend UI selectors and backend validation.
502
+ */
503
+ declare const SIGNATURE_MODES: {
504
+ readonly TYPED_NAME: "typed_name";
505
+ readonly DRAWN_IMAGE: "drawn_image";
506
+ readonly UPLOADED_IMAGE: "uploaded_image";
507
+ };
508
+ /**
509
+ * Corrective Action lifecycle states.
510
+ * draft = record created, generation not finalized yet
511
+ * generated = compiled PDF created and linked successfully
512
+ * reviewed = optional later review completed
513
+ * closed = final business closure
514
+ * failed = generation failed
515
+ */
516
+ declare const CORRECTIVE_ACTION_STATUSES: {
517
+ readonly DRAFT: "draft";
518
+ readonly GENERATED: "generated";
519
+ readonly REVIEWED: "reviewed";
520
+ readonly CLOSED: "closed";
521
+ readonly FAILED: "failed";
522
+ };
523
+ /**
524
+ * Scope level used when resolving templates from OperationalSettings.
525
+ * Resolution precedence is facility -> legalEntity -> company.
526
+ */
527
+ declare const TEMPLATE_SCOPE_LEVELS: {
528
+ readonly FACILITY: "facility";
529
+ readonly LEGAL_ENTITY: "legalEntity";
530
+ readonly COMPANY: "company";
531
+ };
532
+ /**
533
+ * Generation source for CAR creation.
534
+ * CREATE = fresh new CAR
535
+ * RECREATE = new CAR created from a failed prior CAR
536
+ */
537
+ declare const CORRECTIVE_ACTION_GENERATION_SOURCES: {
538
+ readonly CREATE: "CREATE";
539
+ readonly RECREATE: "RECREATE";
540
+ };
541
+ /**
542
+ * Allowed supporting evidence mime types for CAR.
543
+ * Used by frontend upload filter and backend validation.
544
+ */
545
+ declare const CAR_SUPPORTED_EVIDENCE_MIME_TYPES: readonly ["application/pdf", "image/png", "image/jpeg"];
546
+ /**
547
+ * Allowed mime types for signature file uploads.
548
+ * Drawn signatures usually become PNG; uploaded signatures should stay image-only.
549
+ */
550
+ declare const CAR_SUPPORTED_SIGNATURE_MIME_TYPES: readonly ["image/png", "image/jpeg"];
416
551
 
417
- export { type TabConfig as $, ACCESS_RANK as A, PhysicalState as B, CAT as C, DOCUMENT_DISPLAY_INFO as D, ERROR_DICTIONARY as E, FORM_REGISTRY as F, PlantingMethod as G, HarvestMethod as H, type InfrastructureFields as I, RESOURCE_PATHS as J, RESOURCE_REQUIREMENTS as K, LinkedStatus as L, MOD as M, NettingType as N, OrderStatus as O, type PermissionLevel as P, ROLE_SECTIONS_BY_KEY as Q, RESOURCE_MODULE_MAP as R, RelationshipType as S, type ResolvedError as T, type ResourceOverrides as U, type ResourceRequirement as V, RowOrientation as W, SENTINEL_UUID as X, type ScopeType as Y, SoilTexture as Z, TASK_TYPE_REGISTRY as _, ACT as a, TargetEntityType as a0, TaskStatus as a1, TaskType as a2, type TaskTypeConfig as a3, TransactionType as a4, TrellisType as a5, UserPrivilege as a6, UserRole as a7, type UserRoleType as a8, VigorRating as a9, WaterSource as aa, AccessLevel as b, type AccessLevelType as c, type AgriCoreSession as d, ApprovalStatus as e, ApprovalType as f, AuditStatus as g, AuditType as h, type AuthScopeFields as i, type AvailableScope as j, CATEGORY_TABS as k, type CompanyConfig as l, CropCycleStatus as m, DOCUMENT_MENU_MAP as n, DocumentCategory as o, DocumentType as p, EVERYONE as q, EmitterType as r, EnabledModule as s, FacilityType as t, type FormMeta as u, MODULE_LABELS as v, MicroclimateZone as w, MimeType as x, type ModCode as y, NotificationMode as z };
552
+ export { PlantingMethod as $, ACCESS_RANK as A, type Base44Id as B, CAR_SUPPORTED_EVIDENCE_MIME_TYPES as C, DOCUMENT_DISPLAY_INFO as D, DocumentType as E, ERROR_DICTIONARY as F, EVERYONE as G, EmitterType as H, EnabledModule as I, FORM_REGISTRY as J, FacilityType as K, type FileUploadTaskType as L, type FormMeta as M, HarvestMethod as N, type InfrastructureFields as O, LinkedStatus as P, MOD as Q, MODULE_LABELS as R, MicroclimateZone as S, MimeType as T, type ModCode as U, NettingType as V, type NormalizedSignatureValue as W, NotificationMode as X, OrderStatus as Y, type PermissionLevel as Z, PhysicalState as _, ACT as a, RESOURCE_MODULE_MAP as a0, RESOURCE_PATHS as a1, RESOURCE_REQUIREMENTS as a2, ROLE_SECTIONS_BY_KEY as a3, RelationshipType as a4, type ResolvedError as a5, type ResourceOverrides as a6, type ResourceRequirement as a7, RowOrientation as a8, SENTINEL_UUID as a9, SIGNATURE_MODES as aa, type ScopeType as ab, type SignatureInput as ac, type SignatureMode as ad, SoilTexture as ae, TASK_TYPE_REGISTRY as af, TEMPLATE_SCOPE_LEVELS as ag, type TabConfig as ah, TargetEntityType as ai, TaskStatus as aj, TaskType as ak, type TaskTypeConfig as al, type TemplateScopeLevel as am, TransactionType as an, TrellisType as ao, UserPrivilege as ap, UserRole as aq, type UserRoleType as ar, VigorRating as as, WaterSource as at, AccessLevel as b, type AccessLevelType as c, type AgriCoreSession as d, ApprovalStatus as e, ApprovalType as f, AuditStatus as g, AuditType as h, type AuthScopeFields as i, type AvailableScope as j, CAR_SUPPORTED_SIGNATURE_MIME_TYPES as k, CAT as l, CATEGORY_TABS as m, CORRECTIVE_ACTION_GENERATION_SOURCES as n, CORRECTIVE_ACTION_STATUSES as o, type CanonicalId as p, type CarSupportedEvidenceMimeType as q, type CarSupportedSignatureMimeType as r, type CarTemplateFileMetadata as s, type CompanyConfig as t, type CorrectiveActionCompileTaskMetadata as u, type CorrectiveActionGenerationSource as v, type CorrectiveActionStatus as w, CropCycleStatus as x, DOCUMENT_MENU_MAP as y, DocumentCategory as z };
@@ -76,6 +76,82 @@ interface InfrastructureFields {
76
76
  facilityId: string | null;
77
77
  authScopeId: string;
78
78
  }
79
+ /**
80
+ * Base44 ID alias for readability only.
81
+ * Still just string at runtime.
82
+ */
83
+ type Base44Id = string;
84
+ /**
85
+ * Canonical UUID alias for readability only.
86
+ */
87
+ type CanonicalId = string;
88
+ /**
89
+ * Derived union types from constants.
90
+ */
91
+ type SignatureMode = typeof SIGNATURE_MODES[keyof typeof SIGNATURE_MODES];
92
+ type CorrectiveActionStatus = typeof CORRECTIVE_ACTION_STATUSES[keyof typeof CORRECTIVE_ACTION_STATUSES];
93
+ type FileUploadTaskType = typeof TaskType[keyof typeof TaskType];
94
+ type TemplateScopeLevel = typeof TEMPLATE_SCOPE_LEVELS[keyof typeof TEMPLATE_SCOPE_LEVELS];
95
+ type CorrectiveActionGenerationSource = typeof CORRECTIVE_ACTION_GENERATION_SOURCES[keyof typeof CORRECTIVE_ACTION_GENERATION_SOURCES];
96
+ type CarSupportedEvidenceMimeType = typeof CAR_SUPPORTED_EVIDENCE_MIME_TYPES[number];
97
+ type CarSupportedSignatureMimeType = typeof CAR_SUPPORTED_SIGNATURE_MIME_TYPES[number];
98
+ /**
99
+ * Shared signature payload used by create/preview CAR requests.
100
+ * typed_name stores text only.
101
+ * drawn_image / uploaded_image store a FileAsset Base44 ID.
102
+ */
103
+ type SignatureInput = {
104
+ mode: typeof SIGNATURE_MODES.TYPED_NAME;
105
+ typedName: string;
106
+ fileAssetId?: null;
107
+ } | {
108
+ mode: typeof SIGNATURE_MODES.DRAWN_IMAGE | typeof SIGNATURE_MODES.UPLOADED_IMAGE;
109
+ typedName?: null;
110
+ fileAssetId: Base44Id;
111
+ };
112
+ /**
113
+ * Optional normalized signature value that can also be reused inside entities later.
114
+ * Useful if you want one stable shape for mapped/flattened signature data.
115
+ */
116
+ type NormalizedSignatureValue = {
117
+ mode: SignatureMode;
118
+ typedName?: string | null;
119
+ fileAssetId?: Base44Id | null;
120
+ };
121
+ /**
122
+ * Metadata stored inside FileUploadTask for CAR compilation.
123
+ * Keep this lean: execution references only, not full form content.
124
+ */
125
+ type CorrectiveActionCompileTaskMetadata = {
126
+ correctiveActionId: Base44Id;
127
+ companyAuditDetailResponseId: Base44Id;
128
+ companyAuditHeaderId: Base44Id;
129
+ templateAssetId: Base44Id;
130
+ resolvedTemplateScopeLevel: TemplateScopeLevel;
131
+ operationalSettingsId: Base44Id;
132
+ supportingEvidenceFileIds: Base44Id[];
133
+ appendSupportingEvidenceInOrder: true;
134
+ linkCompiledPdfToResponseEvidence: true;
135
+ linkOriginalSupportingEvidenceToResponseEvidence: true;
136
+ generationSource: CorrectiveActionGenerationSource;
137
+ previousCorrectiveActionId: Base44Id | null;
138
+ };
139
+ /**
140
+ * FileAsset.metadata shape for CAR templates.
141
+ * Stored on the uploaded template PDF asset.
142
+ */
143
+ type CarTemplateFileMetadata = {
144
+ templateType: 'CAR';
145
+ stampingZone: {
146
+ xPct: number;
147
+ yPct: number;
148
+ wPct: number;
149
+ hPct: number;
150
+ };
151
+ pageNumber: number;
152
+ applyToAllPages: boolean;
153
+ promotedAt?: string;
154
+ };
79
155
 
80
156
  declare const MOD: {
81
157
  readonly OPERATIONS: "OPR";
@@ -185,11 +261,18 @@ declare const NotificationMode: {
185
261
  readonly EXTERNAL_EMAIL: "external_email";
186
262
  readonly NONE: "none";
187
263
  };
264
+ /**
265
+ * FileUploadTask type for CAR compilation worker.
266
+ * Reused between service layer and async worker.
267
+ */
188
268
  declare const TaskType: {
189
269
  readonly KML_PARSE: "KML_PARSE";
190
270
  readonly INVOICE_OCR: "INVOICE_OCR";
191
271
  readonly AUDIT_UPLOAD: "AUDIT_UPLOAD";
192
272
  readonly REPORT_GEN: "REPORT_GEN";
273
+ readonly PDF_STAMPING: "PDF_STAMPING";
274
+ readonly CAR_TEMPLATE_UPLOAD: "CAR_TEMPLATE_UPLOAD";
275
+ readonly CORRECTIVE_ACTION_COMPILE: "CORRECTIVE_ACTION_COMPILE";
193
276
  };
194
277
  declare const TaskStatus: {
195
278
  readonly PENDING: "PENDING";
@@ -413,5 +496,57 @@ declare const DOCUMENT_DISPLAY_INFO: Record<DocumentType, {
413
496
  }>;
414
497
  declare const CATEGORY_TABS: string[];
415
498
  declare const DOCUMENT_MENU_MAP: Record<DocumentType, string[]>;
499
+ /**
500
+ * Signature modes supported by CAR and similar official document flows.
501
+ * Use this for both frontend UI selectors and backend validation.
502
+ */
503
+ declare const SIGNATURE_MODES: {
504
+ readonly TYPED_NAME: "typed_name";
505
+ readonly DRAWN_IMAGE: "drawn_image";
506
+ readonly UPLOADED_IMAGE: "uploaded_image";
507
+ };
508
+ /**
509
+ * Corrective Action lifecycle states.
510
+ * draft = record created, generation not finalized yet
511
+ * generated = compiled PDF created and linked successfully
512
+ * reviewed = optional later review completed
513
+ * closed = final business closure
514
+ * failed = generation failed
515
+ */
516
+ declare const CORRECTIVE_ACTION_STATUSES: {
517
+ readonly DRAFT: "draft";
518
+ readonly GENERATED: "generated";
519
+ readonly REVIEWED: "reviewed";
520
+ readonly CLOSED: "closed";
521
+ readonly FAILED: "failed";
522
+ };
523
+ /**
524
+ * Scope level used when resolving templates from OperationalSettings.
525
+ * Resolution precedence is facility -> legalEntity -> company.
526
+ */
527
+ declare const TEMPLATE_SCOPE_LEVELS: {
528
+ readonly FACILITY: "facility";
529
+ readonly LEGAL_ENTITY: "legalEntity";
530
+ readonly COMPANY: "company";
531
+ };
532
+ /**
533
+ * Generation source for CAR creation.
534
+ * CREATE = fresh new CAR
535
+ * RECREATE = new CAR created from a failed prior CAR
536
+ */
537
+ declare const CORRECTIVE_ACTION_GENERATION_SOURCES: {
538
+ readonly CREATE: "CREATE";
539
+ readonly RECREATE: "RECREATE";
540
+ };
541
+ /**
542
+ * Allowed supporting evidence mime types for CAR.
543
+ * Used by frontend upload filter and backend validation.
544
+ */
545
+ declare const CAR_SUPPORTED_EVIDENCE_MIME_TYPES: readonly ["application/pdf", "image/png", "image/jpeg"];
546
+ /**
547
+ * Allowed mime types for signature file uploads.
548
+ * Drawn signatures usually become PNG; uploaded signatures should stay image-only.
549
+ */
550
+ declare const CAR_SUPPORTED_SIGNATURE_MIME_TYPES: readonly ["image/png", "image/jpeg"];
416
551
 
417
- export { type TabConfig as $, ACCESS_RANK as A, PhysicalState as B, CAT as C, DOCUMENT_DISPLAY_INFO as D, ERROR_DICTIONARY as E, FORM_REGISTRY as F, PlantingMethod as G, HarvestMethod as H, type InfrastructureFields as I, RESOURCE_PATHS as J, RESOURCE_REQUIREMENTS as K, LinkedStatus as L, MOD as M, NettingType as N, OrderStatus as O, type PermissionLevel as P, ROLE_SECTIONS_BY_KEY as Q, RESOURCE_MODULE_MAP as R, RelationshipType as S, type ResolvedError as T, type ResourceOverrides as U, type ResourceRequirement as V, RowOrientation as W, SENTINEL_UUID as X, type ScopeType as Y, SoilTexture as Z, TASK_TYPE_REGISTRY as _, ACT as a, TargetEntityType as a0, TaskStatus as a1, TaskType as a2, type TaskTypeConfig as a3, TransactionType as a4, TrellisType as a5, UserPrivilege as a6, UserRole as a7, type UserRoleType as a8, VigorRating as a9, WaterSource as aa, AccessLevel as b, type AccessLevelType as c, type AgriCoreSession as d, ApprovalStatus as e, ApprovalType as f, AuditStatus as g, AuditType as h, type AuthScopeFields as i, type AvailableScope as j, CATEGORY_TABS as k, type CompanyConfig as l, CropCycleStatus as m, DOCUMENT_MENU_MAP as n, DocumentCategory as o, DocumentType as p, EVERYONE as q, EmitterType as r, EnabledModule as s, FacilityType as t, type FormMeta as u, MODULE_LABELS as v, MicroclimateZone as w, MimeType as x, type ModCode as y, NotificationMode as z };
552
+ export { PlantingMethod as $, ACCESS_RANK as A, type Base44Id as B, CAR_SUPPORTED_EVIDENCE_MIME_TYPES as C, DOCUMENT_DISPLAY_INFO as D, DocumentType as E, ERROR_DICTIONARY as F, EVERYONE as G, EmitterType as H, EnabledModule as I, FORM_REGISTRY as J, FacilityType as K, type FileUploadTaskType as L, type FormMeta as M, HarvestMethod as N, type InfrastructureFields as O, LinkedStatus as P, MOD as Q, MODULE_LABELS as R, MicroclimateZone as S, MimeType as T, type ModCode as U, NettingType as V, type NormalizedSignatureValue as W, NotificationMode as X, OrderStatus as Y, type PermissionLevel as Z, PhysicalState as _, ACT as a, RESOURCE_MODULE_MAP as a0, RESOURCE_PATHS as a1, RESOURCE_REQUIREMENTS as a2, ROLE_SECTIONS_BY_KEY as a3, RelationshipType as a4, type ResolvedError as a5, type ResourceOverrides as a6, type ResourceRequirement as a7, RowOrientation as a8, SENTINEL_UUID as a9, SIGNATURE_MODES as aa, type ScopeType as ab, type SignatureInput as ac, type SignatureMode as ad, SoilTexture as ae, TASK_TYPE_REGISTRY as af, TEMPLATE_SCOPE_LEVELS as ag, type TabConfig as ah, TargetEntityType as ai, TaskStatus as aj, TaskType as ak, type TaskTypeConfig as al, type TemplateScopeLevel as am, TransactionType as an, TrellisType as ao, UserPrivilege as ap, UserRole as aq, type UserRoleType as ar, VigorRating as as, WaterSource as at, AccessLevel as b, type AccessLevelType as c, type AgriCoreSession as d, ApprovalStatus as e, ApprovalType as f, AuditStatus as g, AuditType as h, type AuthScopeFields as i, type AvailableScope as j, CAR_SUPPORTED_SIGNATURE_MIME_TYPES as k, CAT as l, CATEGORY_TABS as m, CORRECTIVE_ACTION_GENERATION_SOURCES as n, CORRECTIVE_ACTION_STATUSES as o, type CanonicalId as p, type CarSupportedEvidenceMimeType as q, type CarSupportedSignatureMimeType as r, type CarTemplateFileMetadata as s, type CompanyConfig as t, type CorrectiveActionCompileTaskMetadata as u, type CorrectiveActionGenerationSource as v, type CorrectiveActionStatus as w, CropCycleStatus as x, DOCUMENT_MENU_MAP as y, DocumentCategory as z };
@@ -1 +1 @@
1
- export { A as ACCESS_RANK, a as ACT, b as AccessLevel, c as AccessLevelType, e as ApprovalStatus, f as ApprovalType, g as AuditStatus, h as AuditType, C as CAT, k as CATEGORY_TABS, m as CropCycleStatus, D as DOCUMENT_DISPLAY_INFO, n as DOCUMENT_MENU_MAP, o as DocumentCategory, p as DocumentType, E as ERROR_DICTIONARY, q as EVERYONE, r as EmitterType, s as EnabledModule, F as FORM_REGISTRY, t as FacilityType, H as HarvestMethod, L as LinkedStatus, M as MOD, v as MODULE_LABELS, w as MicroclimateZone, x as MimeType, y as ModCode, N as NettingType, z as NotificationMode, O as OrderStatus, B as PhysicalState, G as PlantingMethod, R as RESOURCE_MODULE_MAP, J as RESOURCE_PATHS, K as RESOURCE_REQUIREMENTS, Q as ROLE_SECTIONS_BY_KEY, S as RelationshipType, V as ResourceRequirement, W as RowOrientation, X as SENTINEL_UUID, Z as SoilTexture, _ as TASK_TYPE_REGISTRY, a0 as TargetEntityType, a1 as TaskStatus, a2 as TaskType, a4 as TransactionType, a5 as TrellisType, a6 as UserPrivilege, a7 as UserRole, a8 as UserRoleType, a9 as VigorRating, aa as WaterSource } from './constants-DVuhM7rv.mjs';
1
+ export { A as ACCESS_RANK, a as ACT, b as AccessLevel, c as AccessLevelType, e as ApprovalStatus, f as ApprovalType, g as AuditStatus, h as AuditType, C as CAR_SUPPORTED_EVIDENCE_MIME_TYPES, k as CAR_SUPPORTED_SIGNATURE_MIME_TYPES, l as CAT, m as CATEGORY_TABS, n as CORRECTIVE_ACTION_GENERATION_SOURCES, o as CORRECTIVE_ACTION_STATUSES, x as CropCycleStatus, D as DOCUMENT_DISPLAY_INFO, y as DOCUMENT_MENU_MAP, z as DocumentCategory, E as DocumentType, F as ERROR_DICTIONARY, G as EVERYONE, H as EmitterType, I as EnabledModule, J as FORM_REGISTRY, K as FacilityType, N as HarvestMethod, P as LinkedStatus, Q as MOD, R as MODULE_LABELS, S as MicroclimateZone, T as MimeType, U as ModCode, V as NettingType, X as NotificationMode, Y as OrderStatus, _ as PhysicalState, $ as PlantingMethod, a0 as RESOURCE_MODULE_MAP, a1 as RESOURCE_PATHS, a2 as RESOURCE_REQUIREMENTS, a3 as ROLE_SECTIONS_BY_KEY, a4 as RelationshipType, a7 as ResourceRequirement, a8 as RowOrientation, a9 as SENTINEL_UUID, aa as SIGNATURE_MODES, ae as SoilTexture, af as TASK_TYPE_REGISTRY, ag as TEMPLATE_SCOPE_LEVELS, ai as TargetEntityType, aj as TaskStatus, ak as TaskType, an as TransactionType, ao as TrellisType, ap as UserPrivilege, aq as UserRole, ar as UserRoleType, as as VigorRating, at as WaterSource } from './constants-DOmJizGn.mjs';
@@ -1 +1 @@
1
- export { A as ACCESS_RANK, a as ACT, b as AccessLevel, c as AccessLevelType, e as ApprovalStatus, f as ApprovalType, g as AuditStatus, h as AuditType, C as CAT, k as CATEGORY_TABS, m as CropCycleStatus, D as DOCUMENT_DISPLAY_INFO, n as DOCUMENT_MENU_MAP, o as DocumentCategory, p as DocumentType, E as ERROR_DICTIONARY, q as EVERYONE, r as EmitterType, s as EnabledModule, F as FORM_REGISTRY, t as FacilityType, H as HarvestMethod, L as LinkedStatus, M as MOD, v as MODULE_LABELS, w as MicroclimateZone, x as MimeType, y as ModCode, N as NettingType, z as NotificationMode, O as OrderStatus, B as PhysicalState, G as PlantingMethod, R as RESOURCE_MODULE_MAP, J as RESOURCE_PATHS, K as RESOURCE_REQUIREMENTS, Q as ROLE_SECTIONS_BY_KEY, S as RelationshipType, V as ResourceRequirement, W as RowOrientation, X as SENTINEL_UUID, Z as SoilTexture, _ as TASK_TYPE_REGISTRY, a0 as TargetEntityType, a1 as TaskStatus, a2 as TaskType, a4 as TransactionType, a5 as TrellisType, a6 as UserPrivilege, a7 as UserRole, a8 as UserRoleType, a9 as VigorRating, aa as WaterSource } from './constants-DVuhM7rv.js';
1
+ export { A as ACCESS_RANK, a as ACT, b as AccessLevel, c as AccessLevelType, e as ApprovalStatus, f as ApprovalType, g as AuditStatus, h as AuditType, C as CAR_SUPPORTED_EVIDENCE_MIME_TYPES, k as CAR_SUPPORTED_SIGNATURE_MIME_TYPES, l as CAT, m as CATEGORY_TABS, n as CORRECTIVE_ACTION_GENERATION_SOURCES, o as CORRECTIVE_ACTION_STATUSES, x as CropCycleStatus, D as DOCUMENT_DISPLAY_INFO, y as DOCUMENT_MENU_MAP, z as DocumentCategory, E as DocumentType, F as ERROR_DICTIONARY, G as EVERYONE, H as EmitterType, I as EnabledModule, J as FORM_REGISTRY, K as FacilityType, N as HarvestMethod, P as LinkedStatus, Q as MOD, R as MODULE_LABELS, S as MicroclimateZone, T as MimeType, U as ModCode, V as NettingType, X as NotificationMode, Y as OrderStatus, _ as PhysicalState, $ as PlantingMethod, a0 as RESOURCE_MODULE_MAP, a1 as RESOURCE_PATHS, a2 as RESOURCE_REQUIREMENTS, a3 as ROLE_SECTIONS_BY_KEY, a4 as RelationshipType, a7 as ResourceRequirement, a8 as RowOrientation, a9 as SENTINEL_UUID, aa as SIGNATURE_MODES, ae as SoilTexture, af as TASK_TYPE_REGISTRY, ag as TEMPLATE_SCOPE_LEVELS, ai as TargetEntityType, aj as TaskStatus, ak as TaskType, an as TransactionType, ao as TrellisType, ap as UserPrivilege, aq as UserRole, ar as UserRoleType, as as VigorRating, at as WaterSource } from './constants-DOmJizGn.js';
package/dist/constants.js CHANGED
@@ -27,8 +27,12 @@ __export(constants_exports, {
27
27
  ApprovalType: () => ApprovalType,
28
28
  AuditStatus: () => AuditStatus,
29
29
  AuditType: () => AuditType,
30
+ CAR_SUPPORTED_EVIDENCE_MIME_TYPES: () => CAR_SUPPORTED_EVIDENCE_MIME_TYPES,
31
+ CAR_SUPPORTED_SIGNATURE_MIME_TYPES: () => CAR_SUPPORTED_SIGNATURE_MIME_TYPES,
30
32
  CAT: () => CAT,
31
33
  CATEGORY_TABS: () => CATEGORY_TABS,
34
+ CORRECTIVE_ACTION_GENERATION_SOURCES: () => CORRECTIVE_ACTION_GENERATION_SOURCES,
35
+ CORRECTIVE_ACTION_STATUSES: () => CORRECTIVE_ACTION_STATUSES,
32
36
  CropCycleStatus: () => CropCycleStatus,
33
37
  DOCUMENT_DISPLAY_INFO: () => DOCUMENT_DISPLAY_INFO,
34
38
  DOCUMENT_MENU_MAP: () => DOCUMENT_MENU_MAP,
@@ -58,8 +62,10 @@ __export(constants_exports, {
58
62
  RelationshipType: () => RelationshipType,
59
63
  RowOrientation: () => RowOrientation,
60
64
  SENTINEL_UUID: () => SENTINEL_UUID,
65
+ SIGNATURE_MODES: () => SIGNATURE_MODES,
61
66
  SoilTexture: () => SoilTexture,
62
67
  TASK_TYPE_REGISTRY: () => TASK_TYPE_REGISTRY,
68
+ TEMPLATE_SCOPE_LEVELS: () => TEMPLATE_SCOPE_LEVELS,
63
69
  TargetEntityType: () => TargetEntityType,
64
70
  TaskStatus: () => TaskStatus,
65
71
  TaskType: () => TaskType,
@@ -212,7 +218,10 @@ var TaskType = {
212
218
  KML_PARSE: "KML_PARSE",
213
219
  INVOICE_OCR: "INVOICE_OCR",
214
220
  AUDIT_UPLOAD: "AUDIT_UPLOAD",
215
- REPORT_GEN: "REPORT_GEN"
221
+ REPORT_GEN: "REPORT_GEN",
222
+ PDF_STAMPING: "PDF_STAMPING",
223
+ CAR_TEMPLATE_UPLOAD: "CAR_TEMPLATE_UPLOAD",
224
+ CORRECTIVE_ACTION_COMPILE: "CORRECTIVE_ACTION_COMPILE"
216
225
  };
217
226
  var TaskStatus = {
218
227
  PENDING: "PENDING",
@@ -794,6 +803,36 @@ var DOCUMENT_MENU_MAP = {
794
803
  ["AUDIT_REPORT" /* AUDIT_REPORT */]: [RESOURCE_PATHS.safetyAuditing, RESOURCE_PATHS.dashboard],
795
804
  ["SENSITIVE_IDENTITY" /* SENSITIVE_IDENTITY */]: [RESOURCE_PATHS.adminUserRoster]
796
805
  };
806
+ var SIGNATURE_MODES = {
807
+ TYPED_NAME: "typed_name",
808
+ DRAWN_IMAGE: "drawn_image",
809
+ UPLOADED_IMAGE: "uploaded_image"
810
+ };
811
+ var CORRECTIVE_ACTION_STATUSES = {
812
+ DRAFT: "draft",
813
+ GENERATED: "generated",
814
+ REVIEWED: "reviewed",
815
+ CLOSED: "closed",
816
+ FAILED: "failed"
817
+ };
818
+ var TEMPLATE_SCOPE_LEVELS = {
819
+ FACILITY: "facility",
820
+ LEGAL_ENTITY: "legalEntity",
821
+ COMPANY: "company"
822
+ };
823
+ var CORRECTIVE_ACTION_GENERATION_SOURCES = {
824
+ CREATE: "CREATE",
825
+ RECREATE: "RECREATE"
826
+ };
827
+ var CAR_SUPPORTED_EVIDENCE_MIME_TYPES = [
828
+ "application/pdf",
829
+ "image/png",
830
+ "image/jpeg"
831
+ ];
832
+ var CAR_SUPPORTED_SIGNATURE_MIME_TYPES = [
833
+ "image/png",
834
+ "image/jpeg"
835
+ ];
797
836
  // Annotate the CommonJS export names for ESM import in node:
798
837
  0 && (module.exports = {
799
838
  ACCESS_RANK,
@@ -803,8 +842,12 @@ var DOCUMENT_MENU_MAP = {
803
842
  ApprovalType,
804
843
  AuditStatus,
805
844
  AuditType,
845
+ CAR_SUPPORTED_EVIDENCE_MIME_TYPES,
846
+ CAR_SUPPORTED_SIGNATURE_MIME_TYPES,
806
847
  CAT,
807
848
  CATEGORY_TABS,
849
+ CORRECTIVE_ACTION_GENERATION_SOURCES,
850
+ CORRECTIVE_ACTION_STATUSES,
808
851
  CropCycleStatus,
809
852
  DOCUMENT_DISPLAY_INFO,
810
853
  DOCUMENT_MENU_MAP,
@@ -834,8 +877,10 @@ var DOCUMENT_MENU_MAP = {
834
877
  RelationshipType,
835
878
  RowOrientation,
836
879
  SENTINEL_UUID,
880
+ SIGNATURE_MODES,
837
881
  SoilTexture,
838
882
  TASK_TYPE_REGISTRY,
883
+ TEMPLATE_SCOPE_LEVELS,
839
884
  TargetEntityType,
840
885
  TaskStatus,
841
886
  TaskType,
@@ -6,8 +6,12 @@ import {
6
6
  ApprovalType,
7
7
  AuditStatus,
8
8
  AuditType,
9
+ CAR_SUPPORTED_EVIDENCE_MIME_TYPES,
10
+ CAR_SUPPORTED_SIGNATURE_MIME_TYPES,
9
11
  CAT,
10
12
  CATEGORY_TABS,
13
+ CORRECTIVE_ACTION_GENERATION_SOURCES,
14
+ CORRECTIVE_ACTION_STATUSES,
11
15
  CropCycleStatus,
12
16
  DOCUMENT_DISPLAY_INFO,
13
17
  DOCUMENT_MENU_MAP,
@@ -37,8 +41,10 @@ import {
37
41
  RelationshipType,
38
42
  RowOrientation,
39
43
  SENTINEL_UUID,
44
+ SIGNATURE_MODES,
40
45
  SoilTexture,
41
46
  TASK_TYPE_REGISTRY,
47
+ TEMPLATE_SCOPE_LEVELS,
42
48
  TargetEntityType,
43
49
  TaskStatus,
44
50
  TaskType,
@@ -48,7 +54,7 @@ import {
48
54
  UserRole,
49
55
  VigorRating,
50
56
  WaterSource
51
- } from "./chunk-LGEV4MBQ.mjs";
57
+ } from "./chunk-LYIT2TMM.mjs";
52
58
  export {
53
59
  ACCESS_RANK,
54
60
  ACT,
@@ -57,8 +63,12 @@ export {
57
63
  ApprovalType,
58
64
  AuditStatus,
59
65
  AuditType,
66
+ CAR_SUPPORTED_EVIDENCE_MIME_TYPES,
67
+ CAR_SUPPORTED_SIGNATURE_MIME_TYPES,
60
68
  CAT,
61
69
  CATEGORY_TABS,
70
+ CORRECTIVE_ACTION_GENERATION_SOURCES,
71
+ CORRECTIVE_ACTION_STATUSES,
62
72
  CropCycleStatus,
63
73
  DOCUMENT_DISPLAY_INFO,
64
74
  DOCUMENT_MENU_MAP,
@@ -88,8 +98,10 @@ export {
88
98
  RelationshipType,
89
99
  RowOrientation,
90
100
  SENTINEL_UUID,
101
+ SIGNATURE_MODES,
91
102
  SoilTexture,
92
103
  TASK_TYPE_REGISTRY,
104
+ TEMPLATE_SCOPE_LEVELS,
93
105
  TargetEntityType,
94
106
  TaskStatus,
95
107
  TaskType,
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { d as AgriCoreSession, a8 as UserRoleType, V as ResourceRequirement, c as AccessLevelType, j as AvailableScope, I as InfrastructureFields, u as FormMeta, $ as TabConfig, T as ResolvedError } from './constants-DVuhM7rv.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 CATEGORY_TABS, l as CompanyConfig, m as CropCycleStatus, D as DOCUMENT_DISPLAY_INFO, n as DOCUMENT_MENU_MAP, o as DocumentCategory, p as DocumentType, E as ERROR_DICTIONARY, q as EVERYONE, r as EmitterType, s as EnabledModule, F as FORM_REGISTRY, t as FacilityType, H as HarvestMethod, L as LinkedStatus, M as MOD, v as MODULE_LABELS, w as MicroclimateZone, x as MimeType, y as ModCode, N as NettingType, z as NotificationMode, O as OrderStatus, P as PermissionLevel, B as PhysicalState, G as PlantingMethod, R as RESOURCE_MODULE_MAP, J as RESOURCE_PATHS, K as RESOURCE_REQUIREMENTS, Q as ROLE_SECTIONS_BY_KEY, S as RelationshipType, U as ResourceOverrides, W as RowOrientation, X as SENTINEL_UUID, Y as ScopeType, Z as SoilTexture, _ as TASK_TYPE_REGISTRY, a0 as TargetEntityType, a1 as TaskStatus, a2 as TaskType, a3 as TaskTypeConfig, a4 as TransactionType, a5 as TrellisType, a6 as UserPrivilege, a7 as UserRole, a9 as VigorRating, aa as WaterSource } from './constants-DVuhM7rv.mjs';
1
+ import { d as AgriCoreSession, ar as UserRoleType, a7 as ResourceRequirement, c as AccessLevelType, j as AvailableScope, O as InfrastructureFields, M as FormMeta, ah as TabConfig, a5 as ResolvedError } from './constants-DOmJizGn.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, B as Base44Id, C as CAR_SUPPORTED_EVIDENCE_MIME_TYPES, k as CAR_SUPPORTED_SIGNATURE_MIME_TYPES, l as CAT, m as CATEGORY_TABS, n as CORRECTIVE_ACTION_GENERATION_SOURCES, o as CORRECTIVE_ACTION_STATUSES, p as CanonicalId, q as CarSupportedEvidenceMimeType, r as CarSupportedSignatureMimeType, s as CarTemplateFileMetadata, t as CompanyConfig, u as CorrectiveActionCompileTaskMetadata, v as CorrectiveActionGenerationSource, w as CorrectiveActionStatus, x as CropCycleStatus, D as DOCUMENT_DISPLAY_INFO, y as DOCUMENT_MENU_MAP, z as DocumentCategory, E as DocumentType, F as ERROR_DICTIONARY, G as EVERYONE, H as EmitterType, I as EnabledModule, J as FORM_REGISTRY, K as FacilityType, L as FileUploadTaskType, N as HarvestMethod, P as LinkedStatus, Q as MOD, R as MODULE_LABELS, S as MicroclimateZone, T as MimeType, U as ModCode, V as NettingType, W as NormalizedSignatureValue, X as NotificationMode, Y as OrderStatus, Z as PermissionLevel, _ as PhysicalState, $ as PlantingMethod, a0 as RESOURCE_MODULE_MAP, a1 as RESOURCE_PATHS, a2 as RESOURCE_REQUIREMENTS, a3 as ROLE_SECTIONS_BY_KEY, a4 as RelationshipType, a6 as ResourceOverrides, a8 as RowOrientation, a9 as SENTINEL_UUID, aa as SIGNATURE_MODES, ab as ScopeType, ac as SignatureInput, ad as SignatureMode, ae as SoilTexture, af as TASK_TYPE_REGISTRY, ag as TEMPLATE_SCOPE_LEVELS, ai as TargetEntityType, aj as TaskStatus, ak as TaskType, al as TaskTypeConfig, am as TemplateScopeLevel, an as TransactionType, ao as TrellisType, ap as UserPrivilege, aq as UserRole, as as VigorRating, at as WaterSource } from './constants-DOmJizGn.mjs';
3
3
 
4
4
  declare const AgriLogger: {
5
5
  log(level: "INFO" | "WARN" | "ERROR", message: string, meta: any): void;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { d as AgriCoreSession, a8 as UserRoleType, V as ResourceRequirement, c as AccessLevelType, j as AvailableScope, I as InfrastructureFields, u as FormMeta, $ as TabConfig, T as ResolvedError } from './constants-DVuhM7rv.js';
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 CATEGORY_TABS, l as CompanyConfig, m as CropCycleStatus, D as DOCUMENT_DISPLAY_INFO, n as DOCUMENT_MENU_MAP, o as DocumentCategory, p as DocumentType, E as ERROR_DICTIONARY, q as EVERYONE, r as EmitterType, s as EnabledModule, F as FORM_REGISTRY, t as FacilityType, H as HarvestMethod, L as LinkedStatus, M as MOD, v as MODULE_LABELS, w as MicroclimateZone, x as MimeType, y as ModCode, N as NettingType, z as NotificationMode, O as OrderStatus, P as PermissionLevel, B as PhysicalState, G as PlantingMethod, R as RESOURCE_MODULE_MAP, J as RESOURCE_PATHS, K as RESOURCE_REQUIREMENTS, Q as ROLE_SECTIONS_BY_KEY, S as RelationshipType, U as ResourceOverrides, W as RowOrientation, X as SENTINEL_UUID, Y as ScopeType, Z as SoilTexture, _ as TASK_TYPE_REGISTRY, a0 as TargetEntityType, a1 as TaskStatus, a2 as TaskType, a3 as TaskTypeConfig, a4 as TransactionType, a5 as TrellisType, a6 as UserPrivilege, a7 as UserRole, a9 as VigorRating, aa as WaterSource } from './constants-DVuhM7rv.js';
1
+ import { d as AgriCoreSession, ar as UserRoleType, a7 as ResourceRequirement, c as AccessLevelType, j as AvailableScope, O as InfrastructureFields, M as FormMeta, ah as TabConfig, a5 as ResolvedError } from './constants-DOmJizGn.js';
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, B as Base44Id, C as CAR_SUPPORTED_EVIDENCE_MIME_TYPES, k as CAR_SUPPORTED_SIGNATURE_MIME_TYPES, l as CAT, m as CATEGORY_TABS, n as CORRECTIVE_ACTION_GENERATION_SOURCES, o as CORRECTIVE_ACTION_STATUSES, p as CanonicalId, q as CarSupportedEvidenceMimeType, r as CarSupportedSignatureMimeType, s as CarTemplateFileMetadata, t as CompanyConfig, u as CorrectiveActionCompileTaskMetadata, v as CorrectiveActionGenerationSource, w as CorrectiveActionStatus, x as CropCycleStatus, D as DOCUMENT_DISPLAY_INFO, y as DOCUMENT_MENU_MAP, z as DocumentCategory, E as DocumentType, F as ERROR_DICTIONARY, G as EVERYONE, H as EmitterType, I as EnabledModule, J as FORM_REGISTRY, K as FacilityType, L as FileUploadTaskType, N as HarvestMethod, P as LinkedStatus, Q as MOD, R as MODULE_LABELS, S as MicroclimateZone, T as MimeType, U as ModCode, V as NettingType, W as NormalizedSignatureValue, X as NotificationMode, Y as OrderStatus, Z as PermissionLevel, _ as PhysicalState, $ as PlantingMethod, a0 as RESOURCE_MODULE_MAP, a1 as RESOURCE_PATHS, a2 as RESOURCE_REQUIREMENTS, a3 as ROLE_SECTIONS_BY_KEY, a4 as RelationshipType, a6 as ResourceOverrides, a8 as RowOrientation, a9 as SENTINEL_UUID, aa as SIGNATURE_MODES, ab as ScopeType, ac as SignatureInput, ad as SignatureMode, ae as SoilTexture, af as TASK_TYPE_REGISTRY, ag as TEMPLATE_SCOPE_LEVELS, ai as TargetEntityType, aj as TaskStatus, ak as TaskType, al as TaskTypeConfig, am as TemplateScopeLevel, an as TransactionType, ao as TrellisType, ap as UserPrivilege, aq as UserRole, as as VigorRating, at as WaterSource } from './constants-DOmJizGn.js';
3
3
 
4
4
  declare const AgriLogger: {
5
5
  log(level: "INFO" | "WARN" | "ERROR", message: string, meta: any): void;
package/dist/index.js CHANGED
@@ -29,8 +29,12 @@ __export(index_exports, {
29
29
  ApprovalType: () => ApprovalType,
30
30
  AuditStatus: () => AuditStatus,
31
31
  AuditType: () => AuditType,
32
+ CAR_SUPPORTED_EVIDENCE_MIME_TYPES: () => CAR_SUPPORTED_EVIDENCE_MIME_TYPES,
33
+ CAR_SUPPORTED_SIGNATURE_MIME_TYPES: () => CAR_SUPPORTED_SIGNATURE_MIME_TYPES,
32
34
  CAT: () => CAT,
33
35
  CATEGORY_TABS: () => CATEGORY_TABS,
36
+ CORRECTIVE_ACTION_GENERATION_SOURCES: () => CORRECTIVE_ACTION_GENERATION_SOURCES,
37
+ CORRECTIVE_ACTION_STATUSES: () => CORRECTIVE_ACTION_STATUSES,
34
38
  Converter: () => Converter,
35
39
  CropCycleStatus: () => CropCycleStatus,
36
40
  DOCUMENT_DISPLAY_INFO: () => DOCUMENT_DISPLAY_INFO,
@@ -62,8 +66,10 @@ __export(index_exports, {
62
66
  RelationshipType: () => RelationshipType,
63
67
  RowOrientation: () => RowOrientation,
64
68
  SENTINEL_UUID: () => SENTINEL_UUID,
69
+ SIGNATURE_MODES: () => SIGNATURE_MODES,
65
70
  SoilTexture: () => SoilTexture,
66
71
  TASK_TYPE_REGISTRY: () => TASK_TYPE_REGISTRY,
72
+ TEMPLATE_SCOPE_LEVELS: () => TEMPLATE_SCOPE_LEVELS,
67
73
  TargetEntityType: () => TargetEntityType,
68
74
  TaskStatus: () => TaskStatus,
69
75
  TaskType: () => TaskType,
@@ -433,7 +439,10 @@ var TaskType = {
433
439
  KML_PARSE: "KML_PARSE",
434
440
  INVOICE_OCR: "INVOICE_OCR",
435
441
  AUDIT_UPLOAD: "AUDIT_UPLOAD",
436
- REPORT_GEN: "REPORT_GEN"
442
+ REPORT_GEN: "REPORT_GEN",
443
+ PDF_STAMPING: "PDF_STAMPING",
444
+ CAR_TEMPLATE_UPLOAD: "CAR_TEMPLATE_UPLOAD",
445
+ CORRECTIVE_ACTION_COMPILE: "CORRECTIVE_ACTION_COMPILE"
437
446
  };
438
447
  var TaskStatus = {
439
448
  PENDING: "PENDING",
@@ -1015,6 +1024,36 @@ var DOCUMENT_MENU_MAP = {
1015
1024
  ["AUDIT_REPORT" /* AUDIT_REPORT */]: [RESOURCE_PATHS.safetyAuditing, RESOURCE_PATHS.dashboard],
1016
1025
  ["SENSITIVE_IDENTITY" /* SENSITIVE_IDENTITY */]: [RESOURCE_PATHS.adminUserRoster]
1017
1026
  };
1027
+ var SIGNATURE_MODES = {
1028
+ TYPED_NAME: "typed_name",
1029
+ DRAWN_IMAGE: "drawn_image",
1030
+ UPLOADED_IMAGE: "uploaded_image"
1031
+ };
1032
+ var CORRECTIVE_ACTION_STATUSES = {
1033
+ DRAFT: "draft",
1034
+ GENERATED: "generated",
1035
+ REVIEWED: "reviewed",
1036
+ CLOSED: "closed",
1037
+ FAILED: "failed"
1038
+ };
1039
+ var TEMPLATE_SCOPE_LEVELS = {
1040
+ FACILITY: "facility",
1041
+ LEGAL_ENTITY: "legalEntity",
1042
+ COMPANY: "company"
1043
+ };
1044
+ var CORRECTIVE_ACTION_GENERATION_SOURCES = {
1045
+ CREATE: "CREATE",
1046
+ RECREATE: "RECREATE"
1047
+ };
1048
+ var CAR_SUPPORTED_EVIDENCE_MIME_TYPES = [
1049
+ "application/pdf",
1050
+ "image/png",
1051
+ "image/jpeg"
1052
+ ];
1053
+ var CAR_SUPPORTED_SIGNATURE_MIME_TYPES = [
1054
+ "image/png",
1055
+ "image/jpeg"
1056
+ ];
1018
1057
 
1019
1058
  // src/index.ts
1020
1059
  var AppError = class extends Error {
@@ -1344,8 +1383,12 @@ function calculateFileMetadataMatch(criteria, fileMetadata, auditContext) {
1344
1383
  ApprovalType,
1345
1384
  AuditStatus,
1346
1385
  AuditType,
1386
+ CAR_SUPPORTED_EVIDENCE_MIME_TYPES,
1387
+ CAR_SUPPORTED_SIGNATURE_MIME_TYPES,
1347
1388
  CAT,
1348
1389
  CATEGORY_TABS,
1390
+ CORRECTIVE_ACTION_GENERATION_SOURCES,
1391
+ CORRECTIVE_ACTION_STATUSES,
1349
1392
  Converter,
1350
1393
  CropCycleStatus,
1351
1394
  DOCUMENT_DISPLAY_INFO,
@@ -1377,8 +1420,10 @@ function calculateFileMetadataMatch(criteria, fileMetadata, auditContext) {
1377
1420
  RelationshipType,
1378
1421
  RowOrientation,
1379
1422
  SENTINEL_UUID,
1423
+ SIGNATURE_MODES,
1380
1424
  SoilTexture,
1381
1425
  TASK_TYPE_REGISTRY,
1426
+ TEMPLATE_SCOPE_LEVELS,
1382
1427
  TargetEntityType,
1383
1428
  TaskStatus,
1384
1429
  TaskType,
package/dist/index.mjs CHANGED
@@ -6,8 +6,12 @@ import {
6
6
  ApprovalType,
7
7
  AuditStatus,
8
8
  AuditType,
9
+ CAR_SUPPORTED_EVIDENCE_MIME_TYPES,
10
+ CAR_SUPPORTED_SIGNATURE_MIME_TYPES,
9
11
  CAT,
10
12
  CATEGORY_TABS,
13
+ CORRECTIVE_ACTION_GENERATION_SOURCES,
14
+ CORRECTIVE_ACTION_STATUSES,
11
15
  CropCycleStatus,
12
16
  DOCUMENT_DISPLAY_INFO,
13
17
  DOCUMENT_MENU_MAP,
@@ -37,8 +41,10 @@ import {
37
41
  RelationshipType,
38
42
  RowOrientation,
39
43
  SENTINEL_UUID,
44
+ SIGNATURE_MODES,
40
45
  SoilTexture,
41
46
  TASK_TYPE_REGISTRY,
47
+ TEMPLATE_SCOPE_LEVELS,
42
48
  TargetEntityType,
43
49
  TaskStatus,
44
50
  TaskType,
@@ -48,7 +54,7 @@ import {
48
54
  UserRole,
49
55
  VigorRating,
50
56
  WaterSource
51
- } from "./chunk-LGEV4MBQ.mjs";
57
+ } from "./chunk-LYIT2TMM.mjs";
52
58
 
53
59
  // src/index.ts
54
60
  import { jwtVerify } from "jose";
@@ -566,8 +572,12 @@ export {
566
572
  ApprovalType,
567
573
  AuditStatus,
568
574
  AuditType,
575
+ CAR_SUPPORTED_EVIDENCE_MIME_TYPES,
576
+ CAR_SUPPORTED_SIGNATURE_MIME_TYPES,
569
577
  CAT,
570
578
  CATEGORY_TABS,
579
+ CORRECTIVE_ACTION_GENERATION_SOURCES,
580
+ CORRECTIVE_ACTION_STATUSES,
571
581
  Converter,
572
582
  CropCycleStatus,
573
583
  DOCUMENT_DISPLAY_INFO,
@@ -599,8 +609,10 @@ export {
599
609
  RelationshipType,
600
610
  RowOrientation,
601
611
  SENTINEL_UUID,
612
+ SIGNATURE_MODES,
602
613
  SoilTexture,
603
614
  TASK_TYPE_REGISTRY,
615
+ TEMPLATE_SCOPE_LEVELS,
604
616
  TargetEntityType,
605
617
  TaskStatus,
606
618
  TaskType,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@litusarchieve18/agricore-utils",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "Canonical Backend Utility Library for AgriCore",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",