@litusarchieve18/agricore-utils 1.0.31 → 1.0.32
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 +2 -0
- package/dist/{chunk-OSHR422C.mjs → chunk-U332M2N6.mjs} +6 -1
- package/dist/{constants-KqcPqiCa.d.mts → constants-x8gYRJIw.d.mts} +62 -1
- package/dist/{constants-KqcPqiCa.d.ts → constants-x8gYRJIw.d.ts} +62 -1
- package/dist/constants.d.mts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +10 -0
- package/dist/constants.mjs +11 -1
- package/dist/index.d.mts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +22 -8
- package/dist/index.mjs +21 -9
- package/package.json +1 -1
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.32 — generalize sanitizeSiteName and added export to procurement related object, and generateSystemFolderPath
|
|
187
|
+
|
|
186
188
|
V1.0.31 — Added Receival menu path, moving some procurement enum to library, and added a functional calculatePaymentDueDate function
|
|
187
189
|
|
|
188
190
|
V1.0.30 — altered authscoped Id to receive a list of string not a single string
|
|
@@ -1092,5 +1092,10 @@ export {
|
|
|
1092
1092
|
ProductUnit,
|
|
1093
1093
|
CatalogSyncStatus,
|
|
1094
1094
|
StoragePhases,
|
|
1095
|
-
StockPolicyTier
|
|
1095
|
+
StockPolicyTier,
|
|
1096
|
+
PRODUCT_TYPE_TO_BUDGET_CATEGORY,
|
|
1097
|
+
TERM_RESOLUTION_MODES,
|
|
1098
|
+
REQUISITION_STATUSES,
|
|
1099
|
+
PO_STATUSES,
|
|
1100
|
+
PREFLIGHT_CHECK_STATUSES
|
|
1096
1101
|
};
|
|
@@ -832,5 +832,66 @@ declare const StockPolicyTier: {
|
|
|
832
832
|
readonly BY_STORAGE_PHASE: 2;
|
|
833
833
|
readonly BY_LOCATION: 3;
|
|
834
834
|
};
|
|
835
|
+
/**
|
|
836
|
+
* PRODUCT_TYPE_TO_BUDGET_CATEGORY
|
|
837
|
+
* Maps CompanyProduct.productType → BudgetAllocation.budgetCategory.
|
|
838
|
+
* Used by the preflight and submit service to evaluate budget impacts.
|
|
839
|
+
* Anti-splitting rule: ALL lines in a cart escalate to the highest category found.
|
|
840
|
+
*/
|
|
841
|
+
declare const PRODUCT_TYPE_TO_BUDGET_CATEGORY: Readonly<{
|
|
842
|
+
carton: "packaging";
|
|
843
|
+
tray: "packaging";
|
|
844
|
+
liner: "packaging";
|
|
845
|
+
label: "packaging";
|
|
846
|
+
tape: "packaging";
|
|
847
|
+
strapping: "packaging";
|
|
848
|
+
pallet: "packaging";
|
|
849
|
+
stretch_wrap: "packaging";
|
|
850
|
+
other: "general";
|
|
851
|
+
}>;
|
|
852
|
+
/**
|
|
853
|
+
* TERM_RESOLUTION_MODES
|
|
854
|
+
* Controls whether payment terms are resolved at the supplier level or per-product.
|
|
855
|
+
* Mirrors CompanyConnection.termResolutionMode schema values.
|
|
856
|
+
*/
|
|
857
|
+
declare const TERM_RESOLUTION_MODES: Readonly<{
|
|
858
|
+
SUPPLIER_LEVEL: "SUPPLIER_LEVEL";
|
|
859
|
+
PRODUCT_LEVEL: "PRODUCT_LEVEL";
|
|
860
|
+
}>;
|
|
861
|
+
/**
|
|
862
|
+
* REQUISITION_STATUSES
|
|
863
|
+
* Valid status values for InternalPurchaseRequisition.
|
|
864
|
+
* Mirrors the entity schema enum exactly.
|
|
865
|
+
*/
|
|
866
|
+
declare const REQUISITION_STATUSES: Readonly<{
|
|
867
|
+
DRAFT: "draft";
|
|
868
|
+
PENDING_FINANCE: "pending_finance";
|
|
869
|
+
APPROVED: "approved";
|
|
870
|
+
REJECTED: "rejected";
|
|
871
|
+
ORDERED: "ordered";
|
|
872
|
+
}>;
|
|
873
|
+
/**
|
|
874
|
+
* PO_STATUSES
|
|
875
|
+
* Valid status values for B2BPurchaseOrderHeader / B2BSalesOrderHeader.
|
|
876
|
+
* Mirrors the entity schema enum exactly.
|
|
877
|
+
* On submit → PO is always 'new' (no tier-based approval gating).
|
|
878
|
+
*/
|
|
879
|
+
declare const PO_STATUSES: Readonly<{
|
|
880
|
+
NEW: "new";
|
|
881
|
+
ACKNOWLEDGED: "acknowledged";
|
|
882
|
+
IN_PROGRESS: "in_progress";
|
|
883
|
+
SHIPPED: "shipped";
|
|
884
|
+
RECEIVED: "received";
|
|
885
|
+
CANCELLED: "cancelled";
|
|
886
|
+
}>;
|
|
887
|
+
/**
|
|
888
|
+
* PREFLIGHT_CHECK_STATUSES
|
|
889
|
+
* Traffic-light status values returned in preflight response checks.
|
|
890
|
+
*/
|
|
891
|
+
declare const PREFLIGHT_CHECK_STATUSES: Readonly<{
|
|
892
|
+
OK: "ok";
|
|
893
|
+
WARNING: "warning";
|
|
894
|
+
BLOCKED: "blocked";
|
|
895
|
+
}>;
|
|
835
896
|
|
|
836
|
-
export { MOD as $, ACCESS_RANK as A, BarcodeNamespace as B, CAR_SUPPORTED_EVIDENCE_MIME_TYPES as C, type CatalogSyncStatusType as D, type CompanyConfig as E, type CorrectiveActionCompileTaskMetadata as F, type CorrectiveActionGenerationSource as G, type CorrectiveActionStatus as H, type CreditDaysWindow as I, CropCycleStatus as J, DOCUMENT_DISPLAY_INFO as K, DOCUMENT_MENU_MAP as L, DocumentCategory as M, DocumentType as N, ERROR_DICTIONARY as O, EVERYONE as P, EmitterType as Q, EnabledModule as R, FORM_REGISTRY as S, FacilityType as T, type FileUploadTaskType as U, type FormMeta as V, type ForwardOrderingContractWindow as W, HarvestMethod as X, type InfrastructureFields as Y, type InstallmentWindow as Z, LinkedStatus as _, ACT as a, MODULE_LABELS as a0, type MatrixRow as a1, MicroclimateZone as a2, MimeType as a3, type ModCode as a4, NettingType as a5, type NormalizedSignatureValue as a6, NotificationMode as a7, OrderStatus as a8,
|
|
897
|
+
export { MOD as $, ACCESS_RANK as A, BarcodeNamespace as B, CAR_SUPPORTED_EVIDENCE_MIME_TYPES as C, type CatalogSyncStatusType as D, type CompanyConfig as E, type CorrectiveActionCompileTaskMetadata as F, type CorrectiveActionGenerationSource as G, type CorrectiveActionStatus as H, type CreditDaysWindow as I, CropCycleStatus as J, DOCUMENT_DISPLAY_INFO as K, DOCUMENT_MENU_MAP as L, DocumentCategory as M, DocumentType as N, ERROR_DICTIONARY as O, EVERYONE as P, EmitterType as Q, EnabledModule as R, FORM_REGISTRY as S, FacilityType as T, type FileUploadTaskType as U, type FormMeta as V, type ForwardOrderingContractWindow as W, HarvestMethod as X, type InfrastructureFields as Y, type InstallmentWindow as Z, LinkedStatus as _, ACT as a, type UserRoleAssignment as a$, MODULE_LABELS as a0, type MatrixRow as a1, MicroclimateZone as a2, MimeType as a3, type ModCode as a4, NettingType as a5, type NormalizedSignatureValue as a6, NotificationMode as a7, OrderStatus as a8, PO_STATUSES as a9, SENTINEL_UUID as aA, SESSION_SCHEMA as aB, SIGNATURE_MODES as aC, type SchemaField as aD, type ScopeType as aE, type ShadowedCleanMatch as aF, type SignatureInput as aG, type SignatureMode as aH, SoilTexture as aI, StockPolicyTier as aJ, type StockPolicyTierType as aK, StoragePhases as aL, type StorageType as aM, TASK_TYPE_REGISTRY as aN, TERM_RESOLUTION_MODES as aO, type TabConfig as aP, TargetEntityType as aQ, TaskStatus as aR, TaskType as aS, type TaskTypeConfig as aT, type TemplateScopeLevel as aU, type Tier as aV, TransactionType as aW, TrellisType as aX, UserPrivilege as aY, type UserPrivilegeType as aZ, UserRole as a_, PREFLIGHT_CHECK_STATUSES as aa, PRODUCT_TYPE_TO_BUDGET_CATEGORY as ab, type PaymentTerm as ac, type PermissionLevel as ad, PhysicalState as ae, PlantingMethod as af, type PriceConflictCandidate as ag, type PriceResolutionResult as ah, type PricingContext as ai, type PricingDataSource as aj, ProductType as ak, type ProductTypeType as al, ProductUnit as am, type ProductUnitType as an, REQUISITION_STATUSES as ao, RESOURCE_MODULE_MAP as ap, RESOURCE_PATHS as aq, RESOURCE_REQUIREMENTS as ar, ROLE_SECTIONS_BY_KEY as as, RelationshipType as at, type ResolvedError as au, type ResourceOverrides as av, type ResourceRequirement as aw, type RoleAssignment as ax, RowOrientation as ay, SCOPE_LEVELS as az, AccessLevel as b, type UserRoleType as b0, VigorRating as b1, WaterSource as b2, type WireSession as b3, 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, type BarcodeNamespaceType as k, BarcodeType as l, type BarcodeTypeType as m, type Base44Id as n, type BaseProductRow as o, CAR_SUPPORTED_SIGNATURE_MIME_TYPES as p, CAT as q, CATEGORY_TABS as r, CORRECTIVE_ACTION_GENERATION_SOURCES as s, CORRECTIVE_ACTION_STATUSES as t, type CalculatePaymentDueDateInput as u, type CanonicalId as v, type CarSupportedEvidenceMimeType as w, type CarSupportedSignatureMimeType as x, type CarTemplateFileMetadata as y, CatalogSyncStatus as z };
|
|
@@ -832,5 +832,66 @@ declare const StockPolicyTier: {
|
|
|
832
832
|
readonly BY_STORAGE_PHASE: 2;
|
|
833
833
|
readonly BY_LOCATION: 3;
|
|
834
834
|
};
|
|
835
|
+
/**
|
|
836
|
+
* PRODUCT_TYPE_TO_BUDGET_CATEGORY
|
|
837
|
+
* Maps CompanyProduct.productType → BudgetAllocation.budgetCategory.
|
|
838
|
+
* Used by the preflight and submit service to evaluate budget impacts.
|
|
839
|
+
* Anti-splitting rule: ALL lines in a cart escalate to the highest category found.
|
|
840
|
+
*/
|
|
841
|
+
declare const PRODUCT_TYPE_TO_BUDGET_CATEGORY: Readonly<{
|
|
842
|
+
carton: "packaging";
|
|
843
|
+
tray: "packaging";
|
|
844
|
+
liner: "packaging";
|
|
845
|
+
label: "packaging";
|
|
846
|
+
tape: "packaging";
|
|
847
|
+
strapping: "packaging";
|
|
848
|
+
pallet: "packaging";
|
|
849
|
+
stretch_wrap: "packaging";
|
|
850
|
+
other: "general";
|
|
851
|
+
}>;
|
|
852
|
+
/**
|
|
853
|
+
* TERM_RESOLUTION_MODES
|
|
854
|
+
* Controls whether payment terms are resolved at the supplier level or per-product.
|
|
855
|
+
* Mirrors CompanyConnection.termResolutionMode schema values.
|
|
856
|
+
*/
|
|
857
|
+
declare const TERM_RESOLUTION_MODES: Readonly<{
|
|
858
|
+
SUPPLIER_LEVEL: "SUPPLIER_LEVEL";
|
|
859
|
+
PRODUCT_LEVEL: "PRODUCT_LEVEL";
|
|
860
|
+
}>;
|
|
861
|
+
/**
|
|
862
|
+
* REQUISITION_STATUSES
|
|
863
|
+
* Valid status values for InternalPurchaseRequisition.
|
|
864
|
+
* Mirrors the entity schema enum exactly.
|
|
865
|
+
*/
|
|
866
|
+
declare const REQUISITION_STATUSES: Readonly<{
|
|
867
|
+
DRAFT: "draft";
|
|
868
|
+
PENDING_FINANCE: "pending_finance";
|
|
869
|
+
APPROVED: "approved";
|
|
870
|
+
REJECTED: "rejected";
|
|
871
|
+
ORDERED: "ordered";
|
|
872
|
+
}>;
|
|
873
|
+
/**
|
|
874
|
+
* PO_STATUSES
|
|
875
|
+
* Valid status values for B2BPurchaseOrderHeader / B2BSalesOrderHeader.
|
|
876
|
+
* Mirrors the entity schema enum exactly.
|
|
877
|
+
* On submit → PO is always 'new' (no tier-based approval gating).
|
|
878
|
+
*/
|
|
879
|
+
declare const PO_STATUSES: Readonly<{
|
|
880
|
+
NEW: "new";
|
|
881
|
+
ACKNOWLEDGED: "acknowledged";
|
|
882
|
+
IN_PROGRESS: "in_progress";
|
|
883
|
+
SHIPPED: "shipped";
|
|
884
|
+
RECEIVED: "received";
|
|
885
|
+
CANCELLED: "cancelled";
|
|
886
|
+
}>;
|
|
887
|
+
/**
|
|
888
|
+
* PREFLIGHT_CHECK_STATUSES
|
|
889
|
+
* Traffic-light status values returned in preflight response checks.
|
|
890
|
+
*/
|
|
891
|
+
declare const PREFLIGHT_CHECK_STATUSES: Readonly<{
|
|
892
|
+
OK: "ok";
|
|
893
|
+
WARNING: "warning";
|
|
894
|
+
BLOCKED: "blocked";
|
|
895
|
+
}>;
|
|
835
896
|
|
|
836
|
-
export { MOD as $, ACCESS_RANK as A, BarcodeNamespace as B, CAR_SUPPORTED_EVIDENCE_MIME_TYPES as C, type CatalogSyncStatusType as D, type CompanyConfig as E, type CorrectiveActionCompileTaskMetadata as F, type CorrectiveActionGenerationSource as G, type CorrectiveActionStatus as H, type CreditDaysWindow as I, CropCycleStatus as J, DOCUMENT_DISPLAY_INFO as K, DOCUMENT_MENU_MAP as L, DocumentCategory as M, DocumentType as N, ERROR_DICTIONARY as O, EVERYONE as P, EmitterType as Q, EnabledModule as R, FORM_REGISTRY as S, FacilityType as T, type FileUploadTaskType as U, type FormMeta as V, type ForwardOrderingContractWindow as W, HarvestMethod as X, type InfrastructureFields as Y, type InstallmentWindow as Z, LinkedStatus as _, ACT as a, MODULE_LABELS as a0, type MatrixRow as a1, MicroclimateZone as a2, MimeType as a3, type ModCode as a4, NettingType as a5, type NormalizedSignatureValue as a6, NotificationMode as a7, OrderStatus as a8,
|
|
897
|
+
export { MOD as $, ACCESS_RANK as A, BarcodeNamespace as B, CAR_SUPPORTED_EVIDENCE_MIME_TYPES as C, type CatalogSyncStatusType as D, type CompanyConfig as E, type CorrectiveActionCompileTaskMetadata as F, type CorrectiveActionGenerationSource as G, type CorrectiveActionStatus as H, type CreditDaysWindow as I, CropCycleStatus as J, DOCUMENT_DISPLAY_INFO as K, DOCUMENT_MENU_MAP as L, DocumentCategory as M, DocumentType as N, ERROR_DICTIONARY as O, EVERYONE as P, EmitterType as Q, EnabledModule as R, FORM_REGISTRY as S, FacilityType as T, type FileUploadTaskType as U, type FormMeta as V, type ForwardOrderingContractWindow as W, HarvestMethod as X, type InfrastructureFields as Y, type InstallmentWindow as Z, LinkedStatus as _, ACT as a, type UserRoleAssignment as a$, MODULE_LABELS as a0, type MatrixRow as a1, MicroclimateZone as a2, MimeType as a3, type ModCode as a4, NettingType as a5, type NormalizedSignatureValue as a6, NotificationMode as a7, OrderStatus as a8, PO_STATUSES as a9, SENTINEL_UUID as aA, SESSION_SCHEMA as aB, SIGNATURE_MODES as aC, type SchemaField as aD, type ScopeType as aE, type ShadowedCleanMatch as aF, type SignatureInput as aG, type SignatureMode as aH, SoilTexture as aI, StockPolicyTier as aJ, type StockPolicyTierType as aK, StoragePhases as aL, type StorageType as aM, TASK_TYPE_REGISTRY as aN, TERM_RESOLUTION_MODES as aO, type TabConfig as aP, TargetEntityType as aQ, TaskStatus as aR, TaskType as aS, type TaskTypeConfig as aT, type TemplateScopeLevel as aU, type Tier as aV, TransactionType as aW, TrellisType as aX, UserPrivilege as aY, type UserPrivilegeType as aZ, UserRole as a_, PREFLIGHT_CHECK_STATUSES as aa, PRODUCT_TYPE_TO_BUDGET_CATEGORY as ab, type PaymentTerm as ac, type PermissionLevel as ad, PhysicalState as ae, PlantingMethod as af, type PriceConflictCandidate as ag, type PriceResolutionResult as ah, type PricingContext as ai, type PricingDataSource as aj, ProductType as ak, type ProductTypeType as al, ProductUnit as am, type ProductUnitType as an, REQUISITION_STATUSES as ao, RESOURCE_MODULE_MAP as ap, RESOURCE_PATHS as aq, RESOURCE_REQUIREMENTS as ar, ROLE_SECTIONS_BY_KEY as as, RelationshipType as at, type ResolvedError as au, type ResourceOverrides as av, type ResourceRequirement as aw, type RoleAssignment as ax, RowOrientation as ay, SCOPE_LEVELS as az, AccessLevel as b, type UserRoleType as b0, VigorRating as b1, WaterSource as b2, type WireSession as b3, 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, type BarcodeNamespaceType as k, BarcodeType as l, type BarcodeTypeType as m, type Base44Id as n, type BaseProductRow as o, CAR_SUPPORTED_SIGNATURE_MIME_TYPES as p, CAT as q, CATEGORY_TABS as r, CORRECTIVE_ACTION_GENERATION_SOURCES as s, CORRECTIVE_ACTION_STATUSES as t, type CalculatePaymentDueDateInput as u, type CanonicalId as v, type CarSupportedEvidenceMimeType as w, type CarSupportedSignatureMimeType as x, type CarTemplateFileMetadata as y, CatalogSyncStatus as z };
|
package/dist/constants.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as ACCESS_RANK, a as ACT, b as AccessLevel, e as ApprovalStatus, f as ApprovalType, g as AuditStatus, h as AuditType, B as BarcodeNamespace, l as BarcodeType, C as CAR_SUPPORTED_EVIDENCE_MIME_TYPES, p as CAR_SUPPORTED_SIGNATURE_MIME_TYPES, q as CAT, r as CATEGORY_TABS, s as CORRECTIVE_ACTION_GENERATION_SOURCES, t as CORRECTIVE_ACTION_STATUSES, z as CatalogSyncStatus, J as CropCycleStatus, K as DOCUMENT_DISPLAY_INFO, L as DOCUMENT_MENU_MAP, M as DocumentCategory, N as DocumentType, O as ERROR_DICTIONARY, P as EVERYONE, Q as EmitterType, R as EnabledModule, S as FORM_REGISTRY, T as FacilityType, X as HarvestMethod, _ as LinkedStatus, $ as MOD, a0 as MODULE_LABELS, a2 as MicroclimateZone, a3 as MimeType, a4 as ModCode, a5 as NettingType, a7 as NotificationMode, a8 as OrderStatus, ab as PhysicalState,
|
|
1
|
+
export { A as ACCESS_RANK, a as ACT, b as AccessLevel, e as ApprovalStatus, f as ApprovalType, g as AuditStatus, h as AuditType, B as BarcodeNamespace, l as BarcodeType, C as CAR_SUPPORTED_EVIDENCE_MIME_TYPES, p as CAR_SUPPORTED_SIGNATURE_MIME_TYPES, q as CAT, r as CATEGORY_TABS, s as CORRECTIVE_ACTION_GENERATION_SOURCES, t as CORRECTIVE_ACTION_STATUSES, z as CatalogSyncStatus, J as CropCycleStatus, K as DOCUMENT_DISPLAY_INFO, L as DOCUMENT_MENU_MAP, M as DocumentCategory, N as DocumentType, O as ERROR_DICTIONARY, P as EVERYONE, Q as EmitterType, R as EnabledModule, S as FORM_REGISTRY, T as FacilityType, X as HarvestMethod, _ as LinkedStatus, $ as MOD, a0 as MODULE_LABELS, a2 as MicroclimateZone, a3 as MimeType, a4 as ModCode, a5 as NettingType, a7 as NotificationMode, a8 as OrderStatus, a9 as PO_STATUSES, aa as PREFLIGHT_CHECK_STATUSES, ab as PRODUCT_TYPE_TO_BUDGET_CATEGORY, ae as PhysicalState, af as PlantingMethod, ak as ProductType, am as ProductUnit, ao as REQUISITION_STATUSES, ap as RESOURCE_MODULE_MAP, aq as RESOURCE_PATHS, ar as RESOURCE_REQUIREMENTS, as as ROLE_SECTIONS_BY_KEY, at as RelationshipType, aw as ResourceRequirement, ay as RowOrientation, az as SCOPE_LEVELS, aA as SENTINEL_UUID, aB as SESSION_SCHEMA, aC as SIGNATURE_MODES, aI as SoilTexture, aJ as StockPolicyTier, aL as StoragePhases, aN as TASK_TYPE_REGISTRY, aO as TERM_RESOLUTION_MODES, aQ as TargetEntityType, aR as TaskStatus, aS as TaskType, aW as TransactionType, aX as TrellisType, aY as UserPrivilege, a_ as UserRole, b1 as VigorRating, b2 as WaterSource } from './constants-x8gYRJIw.mjs';
|
package/dist/constants.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as ACCESS_RANK, a as ACT, b as AccessLevel, e as ApprovalStatus, f as ApprovalType, g as AuditStatus, h as AuditType, B as BarcodeNamespace, l as BarcodeType, C as CAR_SUPPORTED_EVIDENCE_MIME_TYPES, p as CAR_SUPPORTED_SIGNATURE_MIME_TYPES, q as CAT, r as CATEGORY_TABS, s as CORRECTIVE_ACTION_GENERATION_SOURCES, t as CORRECTIVE_ACTION_STATUSES, z as CatalogSyncStatus, J as CropCycleStatus, K as DOCUMENT_DISPLAY_INFO, L as DOCUMENT_MENU_MAP, M as DocumentCategory, N as DocumentType, O as ERROR_DICTIONARY, P as EVERYONE, Q as EmitterType, R as EnabledModule, S as FORM_REGISTRY, T as FacilityType, X as HarvestMethod, _ as LinkedStatus, $ as MOD, a0 as MODULE_LABELS, a2 as MicroclimateZone, a3 as MimeType, a4 as ModCode, a5 as NettingType, a7 as NotificationMode, a8 as OrderStatus, ab as PhysicalState,
|
|
1
|
+
export { A as ACCESS_RANK, a as ACT, b as AccessLevel, e as ApprovalStatus, f as ApprovalType, g as AuditStatus, h as AuditType, B as BarcodeNamespace, l as BarcodeType, C as CAR_SUPPORTED_EVIDENCE_MIME_TYPES, p as CAR_SUPPORTED_SIGNATURE_MIME_TYPES, q as CAT, r as CATEGORY_TABS, s as CORRECTIVE_ACTION_GENERATION_SOURCES, t as CORRECTIVE_ACTION_STATUSES, z as CatalogSyncStatus, J as CropCycleStatus, K as DOCUMENT_DISPLAY_INFO, L as DOCUMENT_MENU_MAP, M as DocumentCategory, N as DocumentType, O as ERROR_DICTIONARY, P as EVERYONE, Q as EmitterType, R as EnabledModule, S as FORM_REGISTRY, T as FacilityType, X as HarvestMethod, _ as LinkedStatus, $ as MOD, a0 as MODULE_LABELS, a2 as MicroclimateZone, a3 as MimeType, a4 as ModCode, a5 as NettingType, a7 as NotificationMode, a8 as OrderStatus, a9 as PO_STATUSES, aa as PREFLIGHT_CHECK_STATUSES, ab as PRODUCT_TYPE_TO_BUDGET_CATEGORY, ae as PhysicalState, af as PlantingMethod, ak as ProductType, am as ProductUnit, ao as REQUISITION_STATUSES, ap as RESOURCE_MODULE_MAP, aq as RESOURCE_PATHS, ar as RESOURCE_REQUIREMENTS, as as ROLE_SECTIONS_BY_KEY, at as RelationshipType, aw as ResourceRequirement, ay as RowOrientation, az as SCOPE_LEVELS, aA as SENTINEL_UUID, aB as SESSION_SCHEMA, aC as SIGNATURE_MODES, aI as SoilTexture, aJ as StockPolicyTier, aL as StoragePhases, aN as TASK_TYPE_REGISTRY, aO as TERM_RESOLUTION_MODES, aQ as TargetEntityType, aR as TaskStatus, aS as TaskType, aW as TransactionType, aX as TrellisType, aY as UserPrivilege, a_ as UserRole, b1 as VigorRating, b2 as WaterSource } from './constants-x8gYRJIw.js';
|
package/dist/constants.js
CHANGED
|
@@ -56,10 +56,14 @@ __export(constants_exports, {
|
|
|
56
56
|
NettingType: () => NettingType,
|
|
57
57
|
NotificationMode: () => NotificationMode,
|
|
58
58
|
OrderStatus: () => OrderStatus,
|
|
59
|
+
PO_STATUSES: () => PO_STATUSES,
|
|
60
|
+
PREFLIGHT_CHECK_STATUSES: () => PREFLIGHT_CHECK_STATUSES,
|
|
61
|
+
PRODUCT_TYPE_TO_BUDGET_CATEGORY: () => PRODUCT_TYPE_TO_BUDGET_CATEGORY,
|
|
59
62
|
PhysicalState: () => PhysicalState,
|
|
60
63
|
PlantingMethod: () => PlantingMethod,
|
|
61
64
|
ProductType: () => ProductType,
|
|
62
65
|
ProductUnit: () => ProductUnit,
|
|
66
|
+
REQUISITION_STATUSES: () => REQUISITION_STATUSES,
|
|
63
67
|
RESOURCE_MODULE_MAP: () => RESOURCE_MODULE_MAP,
|
|
64
68
|
RESOURCE_PATHS: () => RESOURCE_PATHS,
|
|
65
69
|
RESOURCE_REQUIREMENTS: () => RESOURCE_REQUIREMENTS,
|
|
@@ -74,6 +78,7 @@ __export(constants_exports, {
|
|
|
74
78
|
StockPolicyTier: () => StockPolicyTier,
|
|
75
79
|
StoragePhases: () => StoragePhases,
|
|
76
80
|
TASK_TYPE_REGISTRY: () => TASK_TYPE_REGISTRY,
|
|
81
|
+
TERM_RESOLUTION_MODES: () => TERM_RESOLUTION_MODES,
|
|
77
82
|
TargetEntityType: () => TargetEntityType,
|
|
78
83
|
TaskStatus: () => TaskStatus,
|
|
79
84
|
TaskType: () => TaskType,
|
|
@@ -1152,10 +1157,14 @@ var PREFLIGHT_CHECK_STATUSES = Object.freeze({
|
|
|
1152
1157
|
NettingType,
|
|
1153
1158
|
NotificationMode,
|
|
1154
1159
|
OrderStatus,
|
|
1160
|
+
PO_STATUSES,
|
|
1161
|
+
PREFLIGHT_CHECK_STATUSES,
|
|
1162
|
+
PRODUCT_TYPE_TO_BUDGET_CATEGORY,
|
|
1155
1163
|
PhysicalState,
|
|
1156
1164
|
PlantingMethod,
|
|
1157
1165
|
ProductType,
|
|
1158
1166
|
ProductUnit,
|
|
1167
|
+
REQUISITION_STATUSES,
|
|
1159
1168
|
RESOURCE_MODULE_MAP,
|
|
1160
1169
|
RESOURCE_PATHS,
|
|
1161
1170
|
RESOURCE_REQUIREMENTS,
|
|
@@ -1170,6 +1179,7 @@ var PREFLIGHT_CHECK_STATUSES = Object.freeze({
|
|
|
1170
1179
|
StockPolicyTier,
|
|
1171
1180
|
StoragePhases,
|
|
1172
1181
|
TASK_TYPE_REGISTRY,
|
|
1182
|
+
TERM_RESOLUTION_MODES,
|
|
1173
1183
|
TargetEntityType,
|
|
1174
1184
|
TaskStatus,
|
|
1175
1185
|
TaskType,
|
package/dist/constants.mjs
CHANGED
|
@@ -35,10 +35,14 @@ import {
|
|
|
35
35
|
NettingType,
|
|
36
36
|
NotificationMode,
|
|
37
37
|
OrderStatus,
|
|
38
|
+
PO_STATUSES,
|
|
39
|
+
PREFLIGHT_CHECK_STATUSES,
|
|
40
|
+
PRODUCT_TYPE_TO_BUDGET_CATEGORY,
|
|
38
41
|
PhysicalState,
|
|
39
42
|
PlantingMethod,
|
|
40
43
|
ProductType,
|
|
41
44
|
ProductUnit,
|
|
45
|
+
REQUISITION_STATUSES,
|
|
42
46
|
RESOURCE_MODULE_MAP,
|
|
43
47
|
RESOURCE_PATHS,
|
|
44
48
|
RESOURCE_REQUIREMENTS,
|
|
@@ -53,6 +57,7 @@ import {
|
|
|
53
57
|
StockPolicyTier,
|
|
54
58
|
StoragePhases,
|
|
55
59
|
TASK_TYPE_REGISTRY,
|
|
60
|
+
TERM_RESOLUTION_MODES,
|
|
56
61
|
TargetEntityType,
|
|
57
62
|
TaskStatus,
|
|
58
63
|
TaskType,
|
|
@@ -62,7 +67,7 @@ import {
|
|
|
62
67
|
UserRole,
|
|
63
68
|
VigorRating,
|
|
64
69
|
WaterSource
|
|
65
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-U332M2N6.mjs";
|
|
66
71
|
export {
|
|
67
72
|
ACCESS_RANK,
|
|
68
73
|
ACT,
|
|
@@ -100,10 +105,14 @@ export {
|
|
|
100
105
|
NettingType,
|
|
101
106
|
NotificationMode,
|
|
102
107
|
OrderStatus,
|
|
108
|
+
PO_STATUSES,
|
|
109
|
+
PREFLIGHT_CHECK_STATUSES,
|
|
110
|
+
PRODUCT_TYPE_TO_BUDGET_CATEGORY,
|
|
103
111
|
PhysicalState,
|
|
104
112
|
PlantingMethod,
|
|
105
113
|
ProductType,
|
|
106
114
|
ProductUnit,
|
|
115
|
+
REQUISITION_STATUSES,
|
|
107
116
|
RESOURCE_MODULE_MAP,
|
|
108
117
|
RESOURCE_PATHS,
|
|
109
118
|
RESOURCE_REQUIREMENTS,
|
|
@@ -118,6 +127,7 @@ export {
|
|
|
118
127
|
StockPolicyTier,
|
|
119
128
|
StoragePhases,
|
|
120
129
|
TASK_TYPE_REGISTRY,
|
|
130
|
+
TERM_RESOLUTION_MODES,
|
|
121
131
|
TargetEntityType,
|
|
122
132
|
TaskStatus,
|
|
123
133
|
TaskType,
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as AgriCoreSession,
|
|
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 BarcodeNamespace, k as BarcodeNamespaceType, l as BarcodeType, m as BarcodeTypeType, n as Base44Id, o as BaseProductRow, C as CAR_SUPPORTED_EVIDENCE_MIME_TYPES, p as CAR_SUPPORTED_SIGNATURE_MIME_TYPES, q as CAT, r as CATEGORY_TABS, s as CORRECTIVE_ACTION_GENERATION_SOURCES, t as CORRECTIVE_ACTION_STATUSES, v as CanonicalId, w as CarSupportedEvidenceMimeType, x as CarSupportedSignatureMimeType, y as CarTemplateFileMetadata, z as CatalogSyncStatus, D as CatalogSyncStatusType, E as CompanyConfig, F as CorrectiveActionCompileTaskMetadata, G as CorrectiveActionGenerationSource, H as CorrectiveActionStatus, I as CreditDaysWindow, J as CropCycleStatus, K as DOCUMENT_DISPLAY_INFO, L as DOCUMENT_MENU_MAP, M as DocumentCategory, N as DocumentType, O as ERROR_DICTIONARY, P as EVERYONE, Q as EmitterType, R as EnabledModule, S as FORM_REGISTRY, T as FacilityType, U as FileUploadTaskType, W as ForwardOrderingContractWindow, X as HarvestMethod, Z as InstallmentWindow, _ as LinkedStatus, $ as MOD, a0 as MODULE_LABELS, a1 as MatrixRow, a2 as MicroclimateZone, a3 as MimeType, a4 as ModCode, a5 as NettingType, a6 as NormalizedSignatureValue, a7 as NotificationMode, a8 as OrderStatus, a9 as
|
|
1
|
+
import { d as AgriCoreSession, a$ as UserRoleAssignment, aV as Tier, ag as PriceConflictCandidate, aF as ShadowedCleanMatch, aj as PricingDataSource, ai as PricingContext, ah as PriceResolutionResult, u as CalculatePaymentDueDateInput, aE as ScopeType, b3 as WireSession, aw as ResourceRequirement, c as AccessLevelType, j as AvailableScope, Y as InfrastructureFields, V as FormMeta, aP as TabConfig, au as ResolvedError } from './constants-x8gYRJIw.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 BarcodeNamespace, k as BarcodeNamespaceType, l as BarcodeType, m as BarcodeTypeType, n as Base44Id, o as BaseProductRow, C as CAR_SUPPORTED_EVIDENCE_MIME_TYPES, p as CAR_SUPPORTED_SIGNATURE_MIME_TYPES, q as CAT, r as CATEGORY_TABS, s as CORRECTIVE_ACTION_GENERATION_SOURCES, t as CORRECTIVE_ACTION_STATUSES, v as CanonicalId, w as CarSupportedEvidenceMimeType, x as CarSupportedSignatureMimeType, y as CarTemplateFileMetadata, z as CatalogSyncStatus, D as CatalogSyncStatusType, E as CompanyConfig, F as CorrectiveActionCompileTaskMetadata, G as CorrectiveActionGenerationSource, H as CorrectiveActionStatus, I as CreditDaysWindow, J as CropCycleStatus, K as DOCUMENT_DISPLAY_INFO, L as DOCUMENT_MENU_MAP, M as DocumentCategory, N as DocumentType, O as ERROR_DICTIONARY, P as EVERYONE, Q as EmitterType, R as EnabledModule, S as FORM_REGISTRY, T as FacilityType, U as FileUploadTaskType, W as ForwardOrderingContractWindow, X as HarvestMethod, Z as InstallmentWindow, _ as LinkedStatus, $ as MOD, a0 as MODULE_LABELS, a1 as MatrixRow, a2 as MicroclimateZone, a3 as MimeType, a4 as ModCode, a5 as NettingType, a6 as NormalizedSignatureValue, a7 as NotificationMode, a8 as OrderStatus, a9 as PO_STATUSES, aa as PREFLIGHT_CHECK_STATUSES, ab as PRODUCT_TYPE_TO_BUDGET_CATEGORY, ac as PaymentTerm, ad as PermissionLevel, ae as PhysicalState, af as PlantingMethod, ak as ProductType, al as ProductTypeType, am as ProductUnit, an as ProductUnitType, ao as REQUISITION_STATUSES, ap as RESOURCE_MODULE_MAP, aq as RESOURCE_PATHS, ar as RESOURCE_REQUIREMENTS, as as ROLE_SECTIONS_BY_KEY, at as RelationshipType, av as ResourceOverrides, ax as RoleAssignment, ay as RowOrientation, az as SCOPE_LEVELS, aA as SENTINEL_UUID, aB as SESSION_SCHEMA, aC as SIGNATURE_MODES, aD as SchemaField, aG as SignatureInput, aH as SignatureMode, aI as SoilTexture, aJ as StockPolicyTier, aK as StockPolicyTierType, aL as StoragePhases, aM as StorageType, aN as TASK_TYPE_REGISTRY, aO as TERM_RESOLUTION_MODES, aQ as TargetEntityType, aR as TaskStatus, aS as TaskType, aT as TaskTypeConfig, aU as TemplateScopeLevel, aW as TransactionType, aX as TrellisType, aY as UserPrivilege, aZ as UserPrivilegeType, a_ as UserRole, b0 as UserRoleType, b1 as VigorRating, b2 as WaterSource } from './constants-x8gYRJIw.mjs';
|
|
3
3
|
|
|
4
4
|
declare const AgriLogger: {
|
|
5
5
|
log(level: "INFO" | "WARN" | "ERROR", message: string, meta: any): void;
|
|
@@ -246,6 +246,7 @@ declare const getApproveAction: (taskType: string) => string | null;
|
|
|
246
246
|
* Static: {SiteName}/_CORE/{DocumentType}
|
|
247
247
|
* Dynamic: {SiteName}/_SEASONAL/{Year}/{DocumentType}/{Crop}
|
|
248
248
|
*/
|
|
249
|
+
declare function sanitizeSiteName(name: string): string;
|
|
249
250
|
declare function generateDocumentPath(params: {
|
|
250
251
|
siteName: string;
|
|
251
252
|
docType: DocumentType;
|
|
@@ -253,10 +254,11 @@ declare function generateDocumentPath(params: {
|
|
|
253
254
|
year?: number | string;
|
|
254
255
|
crop?: string;
|
|
255
256
|
}): string;
|
|
257
|
+
declare function generateSystemFolderPath(siteName: string, systemFolderKey: string): string;
|
|
256
258
|
declare function calculateFileMetadataMatch(criteria: {
|
|
257
259
|
mustMatch: Record<string, any>;
|
|
258
260
|
mustMatchContext?: string[];
|
|
259
261
|
contextMatch?: string[];
|
|
260
262
|
}, fileMetadata: Record<string, any>, auditContext: Record<string, any>): number;
|
|
261
263
|
|
|
262
|
-
export { AccessLevelType, AggregatePriceAmbiguityError, AgriCoreSession, AgriLogger, AppError, AvailableScope, CalculatePaymentDueDateInput, Converter, ErrorFactory, FormMeta, InfrastructureFields, type OverlapCheckScope, PriceAmbiguityError, PriceConflictCandidate, PriceResolutionResult, type PricingAdapterScope, PricingContext, PricingDataSource, ResolvedError, ResourceRequirement, ScopeType, ShadowedCleanMatch, TabConfig, Tier, UserRoleAssignment, Validator, WireSession, assertTenantBoundary, calculateFileMetadataMatch, calculatePaymentDueDate, createBase44PricingAdapter, decodeSession, encodeSession, evaluateBaseAccess, extractAppCode, findOverlappingPriceWindows, findSpecificOverride, generateCanonicalId, generateDocumentPath, generateInfrastructureFields, getAcceptedMimeTypes, getApproveAction, getFormMeta, getFormsGroupedByModule, getPrivilegesAt, getRoleAt, getScopeAncestry, getTaskTypeOptions, handleAppErrorResponse, hasPrivilegeAt, hasRoleAt, isDueDatePending, isInstallmentSchedule, isSingleDueDate, isTabVisible, isTabWritable, resolveAccess, resolveAppError, resolveEffectiveAccess, resolveError, resolvePrice, transformRoleAssignments, verifyAndExtractSession, withAgriLogging };
|
|
264
|
+
export { AccessLevelType, AggregatePriceAmbiguityError, AgriCoreSession, AgriLogger, AppError, AvailableScope, CalculatePaymentDueDateInput, Converter, ErrorFactory, FormMeta, InfrastructureFields, type OverlapCheckScope, PriceAmbiguityError, PriceConflictCandidate, PriceResolutionResult, type PricingAdapterScope, PricingContext, PricingDataSource, ResolvedError, ResourceRequirement, ScopeType, ShadowedCleanMatch, TabConfig, Tier, UserRoleAssignment, Validator, WireSession, assertTenantBoundary, calculateFileMetadataMatch, calculatePaymentDueDate, createBase44PricingAdapter, decodeSession, encodeSession, evaluateBaseAccess, extractAppCode, findOverlappingPriceWindows, findSpecificOverride, generateCanonicalId, generateDocumentPath, generateInfrastructureFields, generateSystemFolderPath, getAcceptedMimeTypes, getApproveAction, getFormMeta, getFormsGroupedByModule, getPrivilegesAt, getRoleAt, getScopeAncestry, getTaskTypeOptions, handleAppErrorResponse, hasPrivilegeAt, hasRoleAt, isDueDatePending, isInstallmentSchedule, isSingleDueDate, isTabVisible, isTabWritable, resolveAccess, resolveAppError, resolveEffectiveAccess, resolveError, resolvePrice, sanitizeSiteName, transformRoleAssignments, verifyAndExtractSession, withAgriLogging };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as AgriCoreSession,
|
|
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 BarcodeNamespace, k as BarcodeNamespaceType, l as BarcodeType, m as BarcodeTypeType, n as Base44Id, o as BaseProductRow, C as CAR_SUPPORTED_EVIDENCE_MIME_TYPES, p as CAR_SUPPORTED_SIGNATURE_MIME_TYPES, q as CAT, r as CATEGORY_TABS, s as CORRECTIVE_ACTION_GENERATION_SOURCES, t as CORRECTIVE_ACTION_STATUSES, v as CanonicalId, w as CarSupportedEvidenceMimeType, x as CarSupportedSignatureMimeType, y as CarTemplateFileMetadata, z as CatalogSyncStatus, D as CatalogSyncStatusType, E as CompanyConfig, F as CorrectiveActionCompileTaskMetadata, G as CorrectiveActionGenerationSource, H as CorrectiveActionStatus, I as CreditDaysWindow, J as CropCycleStatus, K as DOCUMENT_DISPLAY_INFO, L as DOCUMENT_MENU_MAP, M as DocumentCategory, N as DocumentType, O as ERROR_DICTIONARY, P as EVERYONE, Q as EmitterType, R as EnabledModule, S as FORM_REGISTRY, T as FacilityType, U as FileUploadTaskType, W as ForwardOrderingContractWindow, X as HarvestMethod, Z as InstallmentWindow, _ as LinkedStatus, $ as MOD, a0 as MODULE_LABELS, a1 as MatrixRow, a2 as MicroclimateZone, a3 as MimeType, a4 as ModCode, a5 as NettingType, a6 as NormalizedSignatureValue, a7 as NotificationMode, a8 as OrderStatus, a9 as
|
|
1
|
+
import { d as AgriCoreSession, a$ as UserRoleAssignment, aV as Tier, ag as PriceConflictCandidate, aF as ShadowedCleanMatch, aj as PricingDataSource, ai as PricingContext, ah as PriceResolutionResult, u as CalculatePaymentDueDateInput, aE as ScopeType, b3 as WireSession, aw as ResourceRequirement, c as AccessLevelType, j as AvailableScope, Y as InfrastructureFields, V as FormMeta, aP as TabConfig, au as ResolvedError } from './constants-x8gYRJIw.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 BarcodeNamespace, k as BarcodeNamespaceType, l as BarcodeType, m as BarcodeTypeType, n as Base44Id, o as BaseProductRow, C as CAR_SUPPORTED_EVIDENCE_MIME_TYPES, p as CAR_SUPPORTED_SIGNATURE_MIME_TYPES, q as CAT, r as CATEGORY_TABS, s as CORRECTIVE_ACTION_GENERATION_SOURCES, t as CORRECTIVE_ACTION_STATUSES, v as CanonicalId, w as CarSupportedEvidenceMimeType, x as CarSupportedSignatureMimeType, y as CarTemplateFileMetadata, z as CatalogSyncStatus, D as CatalogSyncStatusType, E as CompanyConfig, F as CorrectiveActionCompileTaskMetadata, G as CorrectiveActionGenerationSource, H as CorrectiveActionStatus, I as CreditDaysWindow, J as CropCycleStatus, K as DOCUMENT_DISPLAY_INFO, L as DOCUMENT_MENU_MAP, M as DocumentCategory, N as DocumentType, O as ERROR_DICTIONARY, P as EVERYONE, Q as EmitterType, R as EnabledModule, S as FORM_REGISTRY, T as FacilityType, U as FileUploadTaskType, W as ForwardOrderingContractWindow, X as HarvestMethod, Z as InstallmentWindow, _ as LinkedStatus, $ as MOD, a0 as MODULE_LABELS, a1 as MatrixRow, a2 as MicroclimateZone, a3 as MimeType, a4 as ModCode, a5 as NettingType, a6 as NormalizedSignatureValue, a7 as NotificationMode, a8 as OrderStatus, a9 as PO_STATUSES, aa as PREFLIGHT_CHECK_STATUSES, ab as PRODUCT_TYPE_TO_BUDGET_CATEGORY, ac as PaymentTerm, ad as PermissionLevel, ae as PhysicalState, af as PlantingMethod, ak as ProductType, al as ProductTypeType, am as ProductUnit, an as ProductUnitType, ao as REQUISITION_STATUSES, ap as RESOURCE_MODULE_MAP, aq as RESOURCE_PATHS, ar as RESOURCE_REQUIREMENTS, as as ROLE_SECTIONS_BY_KEY, at as RelationshipType, av as ResourceOverrides, ax as RoleAssignment, ay as RowOrientation, az as SCOPE_LEVELS, aA as SENTINEL_UUID, aB as SESSION_SCHEMA, aC as SIGNATURE_MODES, aD as SchemaField, aG as SignatureInput, aH as SignatureMode, aI as SoilTexture, aJ as StockPolicyTier, aK as StockPolicyTierType, aL as StoragePhases, aM as StorageType, aN as TASK_TYPE_REGISTRY, aO as TERM_RESOLUTION_MODES, aQ as TargetEntityType, aR as TaskStatus, aS as TaskType, aT as TaskTypeConfig, aU as TemplateScopeLevel, aW as TransactionType, aX as TrellisType, aY as UserPrivilege, aZ as UserPrivilegeType, a_ as UserRole, b0 as UserRoleType, b1 as VigorRating, b2 as WaterSource } from './constants-x8gYRJIw.js';
|
|
3
3
|
|
|
4
4
|
declare const AgriLogger: {
|
|
5
5
|
log(level: "INFO" | "WARN" | "ERROR", message: string, meta: any): void;
|
|
@@ -246,6 +246,7 @@ declare const getApproveAction: (taskType: string) => string | null;
|
|
|
246
246
|
* Static: {SiteName}/_CORE/{DocumentType}
|
|
247
247
|
* Dynamic: {SiteName}/_SEASONAL/{Year}/{DocumentType}/{Crop}
|
|
248
248
|
*/
|
|
249
|
+
declare function sanitizeSiteName(name: string): string;
|
|
249
250
|
declare function generateDocumentPath(params: {
|
|
250
251
|
siteName: string;
|
|
251
252
|
docType: DocumentType;
|
|
@@ -253,10 +254,11 @@ declare function generateDocumentPath(params: {
|
|
|
253
254
|
year?: number | string;
|
|
254
255
|
crop?: string;
|
|
255
256
|
}): string;
|
|
257
|
+
declare function generateSystemFolderPath(siteName: string, systemFolderKey: string): string;
|
|
256
258
|
declare function calculateFileMetadataMatch(criteria: {
|
|
257
259
|
mustMatch: Record<string, any>;
|
|
258
260
|
mustMatchContext?: string[];
|
|
259
261
|
contextMatch?: string[];
|
|
260
262
|
}, fileMetadata: Record<string, any>, auditContext: Record<string, any>): number;
|
|
261
263
|
|
|
262
|
-
export { AccessLevelType, AggregatePriceAmbiguityError, AgriCoreSession, AgriLogger, AppError, AvailableScope, CalculatePaymentDueDateInput, Converter, ErrorFactory, FormMeta, InfrastructureFields, type OverlapCheckScope, PriceAmbiguityError, PriceConflictCandidate, PriceResolutionResult, type PricingAdapterScope, PricingContext, PricingDataSource, ResolvedError, ResourceRequirement, ScopeType, ShadowedCleanMatch, TabConfig, Tier, UserRoleAssignment, Validator, WireSession, assertTenantBoundary, calculateFileMetadataMatch, calculatePaymentDueDate, createBase44PricingAdapter, decodeSession, encodeSession, evaluateBaseAccess, extractAppCode, findOverlappingPriceWindows, findSpecificOverride, generateCanonicalId, generateDocumentPath, generateInfrastructureFields, getAcceptedMimeTypes, getApproveAction, getFormMeta, getFormsGroupedByModule, getPrivilegesAt, getRoleAt, getScopeAncestry, getTaskTypeOptions, handleAppErrorResponse, hasPrivilegeAt, hasRoleAt, isDueDatePending, isInstallmentSchedule, isSingleDueDate, isTabVisible, isTabWritable, resolveAccess, resolveAppError, resolveEffectiveAccess, resolveError, resolvePrice, transformRoleAssignments, verifyAndExtractSession, withAgriLogging };
|
|
264
|
+
export { AccessLevelType, AggregatePriceAmbiguityError, AgriCoreSession, AgriLogger, AppError, AvailableScope, CalculatePaymentDueDateInput, Converter, ErrorFactory, FormMeta, InfrastructureFields, type OverlapCheckScope, PriceAmbiguityError, PriceConflictCandidate, PriceResolutionResult, type PricingAdapterScope, PricingContext, PricingDataSource, ResolvedError, ResourceRequirement, ScopeType, ShadowedCleanMatch, TabConfig, Tier, UserRoleAssignment, Validator, WireSession, assertTenantBoundary, calculateFileMetadataMatch, calculatePaymentDueDate, createBase44PricingAdapter, decodeSession, encodeSession, evaluateBaseAccess, extractAppCode, findOverlappingPriceWindows, findSpecificOverride, generateCanonicalId, generateDocumentPath, generateInfrastructureFields, generateSystemFolderPath, getAcceptedMimeTypes, getApproveAction, getFormMeta, getFormsGroupedByModule, getPrivilegesAt, getRoleAt, getScopeAncestry, getTaskTypeOptions, handleAppErrorResponse, hasPrivilegeAt, hasRoleAt, isDueDatePending, isInstallmentSchedule, isSingleDueDate, isTabVisible, isTabWritable, resolveAccess, resolveAppError, resolveEffectiveAccess, resolveError, resolvePrice, sanitizeSiteName, transformRoleAssignments, verifyAndExtractSession, withAgriLogging };
|
package/dist/index.js
CHANGED
|
@@ -61,11 +61,15 @@ __export(index_exports, {
|
|
|
61
61
|
NettingType: () => NettingType,
|
|
62
62
|
NotificationMode: () => NotificationMode,
|
|
63
63
|
OrderStatus: () => OrderStatus,
|
|
64
|
+
PO_STATUSES: () => PO_STATUSES,
|
|
65
|
+
PREFLIGHT_CHECK_STATUSES: () => PREFLIGHT_CHECK_STATUSES,
|
|
66
|
+
PRODUCT_TYPE_TO_BUDGET_CATEGORY: () => PRODUCT_TYPE_TO_BUDGET_CATEGORY,
|
|
64
67
|
PhysicalState: () => PhysicalState,
|
|
65
68
|
PlantingMethod: () => PlantingMethod,
|
|
66
69
|
PriceAmbiguityError: () => PriceAmbiguityError,
|
|
67
70
|
ProductType: () => ProductType,
|
|
68
71
|
ProductUnit: () => ProductUnit,
|
|
72
|
+
REQUISITION_STATUSES: () => REQUISITION_STATUSES,
|
|
69
73
|
RESOURCE_MODULE_MAP: () => RESOURCE_MODULE_MAP,
|
|
70
74
|
RESOURCE_PATHS: () => RESOURCE_PATHS,
|
|
71
75
|
RESOURCE_REQUIREMENTS: () => RESOURCE_REQUIREMENTS,
|
|
@@ -80,6 +84,7 @@ __export(index_exports, {
|
|
|
80
84
|
StockPolicyTier: () => StockPolicyTier,
|
|
81
85
|
StoragePhases: () => StoragePhases,
|
|
82
86
|
TASK_TYPE_REGISTRY: () => TASK_TYPE_REGISTRY,
|
|
87
|
+
TERM_RESOLUTION_MODES: () => TERM_RESOLUTION_MODES,
|
|
83
88
|
TargetEntityType: () => TargetEntityType,
|
|
84
89
|
TaskStatus: () => TaskStatus,
|
|
85
90
|
TaskType: () => TaskType,
|
|
@@ -103,6 +108,7 @@ __export(index_exports, {
|
|
|
103
108
|
generateCanonicalId: () => generateCanonicalId,
|
|
104
109
|
generateDocumentPath: () => generateDocumentPath,
|
|
105
110
|
generateInfrastructureFields: () => generateInfrastructureFields,
|
|
111
|
+
generateSystemFolderPath: () => generateSystemFolderPath,
|
|
106
112
|
getAcceptedMimeTypes: () => getAcceptedMimeTypes,
|
|
107
113
|
getApproveAction: () => getApproveAction,
|
|
108
114
|
getFormMeta: () => getFormMeta,
|
|
@@ -124,6 +130,7 @@ __export(index_exports, {
|
|
|
124
130
|
resolveEffectiveAccess: () => resolveEffectiveAccess,
|
|
125
131
|
resolveError: () => resolveError,
|
|
126
132
|
resolvePrice: () => resolvePrice,
|
|
133
|
+
sanitizeSiteName: () => sanitizeSiteName,
|
|
127
134
|
transformRoleAssignments: () => transformRoleAssignments,
|
|
128
135
|
verifyAndExtractSession: () => verifyAndExtractSession,
|
|
129
136
|
withAgriLogging: () => withAgriLogging
|
|
@@ -2157,15 +2164,15 @@ var getAcceptedMimeTypes = (taskType) => {
|
|
|
2157
2164
|
var getApproveAction = (taskType) => {
|
|
2158
2165
|
return TASK_TYPE_REGISTRY[taskType]?.approveAction ?? null;
|
|
2159
2166
|
};
|
|
2167
|
+
function sanitizeSiteName(name) {
|
|
2168
|
+
return name.replace(/[^a-z0-9]/gi, "_");
|
|
2169
|
+
}
|
|
2160
2170
|
function generateDocumentPath(params) {
|
|
2161
|
-
const
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
const folderCrop = params.crop ? `/${params.crop.toUpperCase()}` : "";
|
|
2167
|
-
return `${sanitizedName}/_SEASONAL/${folderYear}/${params.docType}${folderCrop}`;
|
|
2168
|
-
}
|
|
2171
|
+
const sanitized = sanitizeSiteName(params.siteName);
|
|
2172
|
+
return params.isStatic ? `${sanitized}/_CORE/${params.docType}` : `${sanitized}/_SEASONAL/${params.year || (/* @__PURE__ */ new Date()).getUTCFullYear()}/${params.docType}${params.crop ? `/${params.crop.toUpperCase()}` : ""}`;
|
|
2173
|
+
}
|
|
2174
|
+
function generateSystemFolderPath(siteName, systemFolderKey) {
|
|
2175
|
+
return `${sanitizeSiteName(siteName)}/.system/${systemFolderKey}`;
|
|
2169
2176
|
}
|
|
2170
2177
|
function isValueMatch(fileValue, expectedValue) {
|
|
2171
2178
|
if (Array.isArray(expectedValue)) return expectedValue.includes(fileValue);
|
|
@@ -2237,11 +2244,15 @@ function calculateFileMetadataMatch(criteria, fileMetadata, auditContext) {
|
|
|
2237
2244
|
NettingType,
|
|
2238
2245
|
NotificationMode,
|
|
2239
2246
|
OrderStatus,
|
|
2247
|
+
PO_STATUSES,
|
|
2248
|
+
PREFLIGHT_CHECK_STATUSES,
|
|
2249
|
+
PRODUCT_TYPE_TO_BUDGET_CATEGORY,
|
|
2240
2250
|
PhysicalState,
|
|
2241
2251
|
PlantingMethod,
|
|
2242
2252
|
PriceAmbiguityError,
|
|
2243
2253
|
ProductType,
|
|
2244
2254
|
ProductUnit,
|
|
2255
|
+
REQUISITION_STATUSES,
|
|
2245
2256
|
RESOURCE_MODULE_MAP,
|
|
2246
2257
|
RESOURCE_PATHS,
|
|
2247
2258
|
RESOURCE_REQUIREMENTS,
|
|
@@ -2256,6 +2267,7 @@ function calculateFileMetadataMatch(criteria, fileMetadata, auditContext) {
|
|
|
2256
2267
|
StockPolicyTier,
|
|
2257
2268
|
StoragePhases,
|
|
2258
2269
|
TASK_TYPE_REGISTRY,
|
|
2270
|
+
TERM_RESOLUTION_MODES,
|
|
2259
2271
|
TargetEntityType,
|
|
2260
2272
|
TaskStatus,
|
|
2261
2273
|
TaskType,
|
|
@@ -2279,6 +2291,7 @@ function calculateFileMetadataMatch(criteria, fileMetadata, auditContext) {
|
|
|
2279
2291
|
generateCanonicalId,
|
|
2280
2292
|
generateDocumentPath,
|
|
2281
2293
|
generateInfrastructureFields,
|
|
2294
|
+
generateSystemFolderPath,
|
|
2282
2295
|
getAcceptedMimeTypes,
|
|
2283
2296
|
getApproveAction,
|
|
2284
2297
|
getFormMeta,
|
|
@@ -2300,6 +2313,7 @@ function calculateFileMetadataMatch(criteria, fileMetadata, auditContext) {
|
|
|
2300
2313
|
resolveEffectiveAccess,
|
|
2301
2314
|
resolveError,
|
|
2302
2315
|
resolvePrice,
|
|
2316
|
+
sanitizeSiteName,
|
|
2303
2317
|
transformRoleAssignments,
|
|
2304
2318
|
verifyAndExtractSession,
|
|
2305
2319
|
withAgriLogging
|
package/dist/index.mjs
CHANGED
|
@@ -35,10 +35,14 @@ import {
|
|
|
35
35
|
NettingType,
|
|
36
36
|
NotificationMode,
|
|
37
37
|
OrderStatus,
|
|
38
|
+
PO_STATUSES,
|
|
39
|
+
PREFLIGHT_CHECK_STATUSES,
|
|
40
|
+
PRODUCT_TYPE_TO_BUDGET_CATEGORY,
|
|
38
41
|
PhysicalState,
|
|
39
42
|
PlantingMethod,
|
|
40
43
|
ProductType,
|
|
41
44
|
ProductUnit,
|
|
45
|
+
REQUISITION_STATUSES,
|
|
42
46
|
RESOURCE_MODULE_MAP,
|
|
43
47
|
RESOURCE_PATHS,
|
|
44
48
|
RESOURCE_REQUIREMENTS,
|
|
@@ -53,6 +57,7 @@ import {
|
|
|
53
57
|
StockPolicyTier,
|
|
54
58
|
StoragePhases,
|
|
55
59
|
TASK_TYPE_REGISTRY,
|
|
60
|
+
TERM_RESOLUTION_MODES,
|
|
56
61
|
TargetEntityType,
|
|
57
62
|
TaskStatus,
|
|
58
63
|
TaskType,
|
|
@@ -62,7 +67,7 @@ import {
|
|
|
62
67
|
UserRole,
|
|
63
68
|
VigorRating,
|
|
64
69
|
WaterSource
|
|
65
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-U332M2N6.mjs";
|
|
66
71
|
|
|
67
72
|
// src/index.ts
|
|
68
73
|
import { jwtVerify } from "jose";
|
|
@@ -1062,15 +1067,15 @@ var getAcceptedMimeTypes = (taskType) => {
|
|
|
1062
1067
|
var getApproveAction = (taskType) => {
|
|
1063
1068
|
return TASK_TYPE_REGISTRY[taskType]?.approveAction ?? null;
|
|
1064
1069
|
};
|
|
1070
|
+
function sanitizeSiteName(name) {
|
|
1071
|
+
return name.replace(/[^a-z0-9]/gi, "_");
|
|
1072
|
+
}
|
|
1065
1073
|
function generateDocumentPath(params) {
|
|
1066
|
-
const
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
const folderCrop = params.crop ? `/${params.crop.toUpperCase()}` : "";
|
|
1072
|
-
return `${sanitizedName}/_SEASONAL/${folderYear}/${params.docType}${folderCrop}`;
|
|
1073
|
-
}
|
|
1074
|
+
const sanitized = sanitizeSiteName(params.siteName);
|
|
1075
|
+
return params.isStatic ? `${sanitized}/_CORE/${params.docType}` : `${sanitized}/_SEASONAL/${params.year || (/* @__PURE__ */ new Date()).getUTCFullYear()}/${params.docType}${params.crop ? `/${params.crop.toUpperCase()}` : ""}`;
|
|
1076
|
+
}
|
|
1077
|
+
function generateSystemFolderPath(siteName, systemFolderKey) {
|
|
1078
|
+
return `${sanitizeSiteName(siteName)}/.system/${systemFolderKey}`;
|
|
1074
1079
|
}
|
|
1075
1080
|
function isValueMatch(fileValue, expectedValue) {
|
|
1076
1081
|
if (Array.isArray(expectedValue)) return expectedValue.includes(fileValue);
|
|
@@ -1141,11 +1146,15 @@ export {
|
|
|
1141
1146
|
NettingType,
|
|
1142
1147
|
NotificationMode,
|
|
1143
1148
|
OrderStatus,
|
|
1149
|
+
PO_STATUSES,
|
|
1150
|
+
PREFLIGHT_CHECK_STATUSES,
|
|
1151
|
+
PRODUCT_TYPE_TO_BUDGET_CATEGORY,
|
|
1144
1152
|
PhysicalState,
|
|
1145
1153
|
PlantingMethod,
|
|
1146
1154
|
PriceAmbiguityError,
|
|
1147
1155
|
ProductType,
|
|
1148
1156
|
ProductUnit,
|
|
1157
|
+
REQUISITION_STATUSES,
|
|
1149
1158
|
RESOURCE_MODULE_MAP,
|
|
1150
1159
|
RESOURCE_PATHS,
|
|
1151
1160
|
RESOURCE_REQUIREMENTS,
|
|
@@ -1160,6 +1169,7 @@ export {
|
|
|
1160
1169
|
StockPolicyTier,
|
|
1161
1170
|
StoragePhases,
|
|
1162
1171
|
TASK_TYPE_REGISTRY,
|
|
1172
|
+
TERM_RESOLUTION_MODES,
|
|
1163
1173
|
TargetEntityType,
|
|
1164
1174
|
TaskStatus,
|
|
1165
1175
|
TaskType,
|
|
@@ -1183,6 +1193,7 @@ export {
|
|
|
1183
1193
|
generateCanonicalId,
|
|
1184
1194
|
generateDocumentPath,
|
|
1185
1195
|
generateInfrastructureFields,
|
|
1196
|
+
generateSystemFolderPath,
|
|
1186
1197
|
getAcceptedMimeTypes,
|
|
1187
1198
|
getApproveAction,
|
|
1188
1199
|
getFormMeta,
|
|
@@ -1204,6 +1215,7 @@ export {
|
|
|
1204
1215
|
resolveEffectiveAccess,
|
|
1205
1216
|
resolveError,
|
|
1206
1217
|
resolvePrice,
|
|
1218
|
+
sanitizeSiteName,
|
|
1207
1219
|
transformRoleAssignments,
|
|
1208
1220
|
verifyAndExtractSession,
|
|
1209
1221
|
withAgriLogging
|