@zerocarbon/erp-config-sdk 1.0.13 → 1.0.14

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/dist/index.d.ts CHANGED
@@ -900,6 +900,7 @@ interface ErrorResponse {
900
900
  declare function hasIntensities(response: any): response is DetailedCarbonIntensityResponse;
901
901
  declare const INTENSITY_FIELD_LABELS: Record<string, string>;
902
902
 
903
+ declare const getUserNameScopeConfig: <T = any>(scopeKey: "scope1" | "scope2" | "scope3" | "waterManagement", username?: string, defaultScope?: T) => T;
903
904
  declare const INDUSTRIES_CONFIG: {
904
905
  [key: string]: {
905
906
  scope1: Scope[];
@@ -915,7 +916,6 @@ declare const INDUSTRIES_CONFIG: {
915
916
  };
916
917
  };
917
918
  };
918
- declare const getUserNameWaterManagementConfig: (username?: string, defaultWaterManagement?: any) => any;
919
919
  declare const getIndustryConfig$1: (industry: string, username?: string) => {
920
920
  scope1: Scope[];
921
921
  scope2: Scope[];
@@ -966,6 +966,39 @@ type Scope3Item$2 = {
966
966
  subProducts: Emissions$i;
967
967
  desc: string;
968
968
  };
969
+ type BackendScope = Omit<Scope, 'icon'> & {
970
+ icon?: string;
971
+ };
972
+ type BackendScope3Item = Omit<Scope3Item$2, 'icon'> & {
973
+ icon?: string;
974
+ };
975
+ type BackendIndustryConfig = {
976
+ scope1: BackendScope[];
977
+ scope2: BackendScope[];
978
+ scope3: BackendScope3Item[];
979
+ additionalScopes?: {
980
+ [key: string]: Array<{
981
+ type: "scope1" | "scope2" | "scope3";
982
+ route: string;
983
+ name: string;
984
+ scope: BackendScope | BackendScope3Item;
985
+ }>;
986
+ };
987
+ };
988
+ type AllConfigurations = {
989
+ industries: {
990
+ [key: string]: BackendIndustryConfig;
991
+ };
992
+ userConfigs: {
993
+ [key: string]: any;
994
+ };
995
+ };
996
+ /**
997
+ * Get all configurations for backend consumption without React icons
998
+ * This function returns all industry configurations and user configurations
999
+ * in a format that can be safely consumed by backend applications
1000
+ */
1001
+ declare function getAllConfig(): AllConfigurations;
969
1002
 
970
1003
  interface BillFilterOptions {
971
1004
  category?: string;
@@ -2418,9 +2451,6 @@ type Scope3Item$1 = {
2418
2451
  desc: string;
2419
2452
  };
2420
2453
  declare const ALL_SCOPES_3_CEMENT: Scope3Item$1[];
2421
- declare const getUserNameScope1Config: (username?: string, defaultScope1?: any[]) => any[];
2422
- declare const getUserNameScope2Config: (username?: string, defaultScope2?: any[]) => any[];
2423
- declare const getUserNameScope3Config: (username?: string, defaultScope3?: Scope3Item$1[]) => Scope3Item$1[];
2424
2454
  declare const FUEL_PRODUCTS: {
2425
2455
  name: string;
2426
2456
  unit: string;
@@ -3852,9 +3882,6 @@ declare const index_WATER_USAGE_PRODUCTS: typeof WATER_USAGE_PRODUCTS;
3852
3882
  declare const index_WELDING_PRODUCTS_GAS_LAB: typeof WELDING_PRODUCTS_GAS_LAB;
3853
3883
  declare const index_getEndpointConfig: typeof getEndpointConfig;
3854
3884
  declare const index_getIndustryConfig: typeof getIndustryConfig;
3855
- declare const index_getUserNameScope1Config: typeof getUserNameScope1Config;
3856
- declare const index_getUserNameScope2Config: typeof getUserNameScope2Config;
3857
- declare const index_getUserNameScope3Config: typeof getUserNameScope3Config;
3858
3885
  declare namespace index {
3859
3886
  export {
3860
3887
  index_ALLSCOPES_ALLOY as ALLSCOPES_ALLOY,
@@ -4018,11 +4045,8 @@ declare namespace index {
4018
4045
  index_WELDING_PRODUCTS_GAS_LAB as WELDING_PRODUCTS_GAS_LAB,
4019
4046
  index_getEndpointConfig as getEndpointConfig,
4020
4047
  index_getIndustryConfig as getIndustryConfig,
4021
- index_getUserNameScope1Config as getUserNameScope1Config,
4022
- index_getUserNameScope2Config as getUserNameScope2Config,
4023
- index_getUserNameScope3Config as getUserNameScope3Config,
4024
4048
  };
4025
4049
  }
4026
4050
 
4027
- export { API_ENDPOINTS, API_SCOPE3_CEMENT_CONFIG, BILL_CALCULATION_CONFIGS, BillManager, CCTS_ALLSCOPES_CEMENT, CCTS_CALCINATION_PRODUCTS, CCTS_ELECTRICITY_PRODUCTS, CCTS_FIRE_EXTINGUISHER_PRODUCTS, CCTS_FUEL_COMBUSTION_PRODUCTS, CCTS_LPG_PRODUCTS, CCTS_MINING_OPERATIONS_PRODUCTS, CCTS_ONSITE_POWER_PRODUCTS, CCTS_PURCHASED_ELECTRICITY, CCTS_REFRIGERANTS, CCTS_SCOPE1_CEMENT, CCTS_SCOPE2_CEMENT, CCTS_SF6_PRODUCTS, CCTS_TABLE_COLUMNS, DEFAULT_BILL_MATCHING_CONFIG, EmissionSourceGenerator, FRONTEND_INDUSTRY_CONFIGS, HTTP_STATUS, INDUSTRIES_CONFIG, INDUSTRY_MAPPING, INDUSTRY_SPECIFIC_FIELDS, INTENSITY_FIELD_LABELS, ISO_CATEGORIES_PACKAGING, index as Industries, UI_FEATURES, WATER_PRODUCTS, calculateCCTSEmission, calculateIntensityMetrics, categorizeApiItem, cleanValue, createBillManager, createCapitalizedMonthMapping, createEmissionSourceGenerator, createMonthMapping, debugCarbonIntensityMapping, extractCarbonIntensityData, formatEmissionValue, formatIntensityValue, formatKPIEmission, formatMonthlyEmission, formatPercentage, getApiIndustryType, getAvailableFieldsForIndustry, getIndustryConfig$1 as getIndustryConfig, getIndustryFieldConfig, getIntensityFormulas, getPlantNameConfig, getScope3ConfigByName, getUserNameWaterManagementConfig, hasIntensities, isUIFeatureEnabled, mapIndustryToApiType, sanitizeNumber, supportsIntensityCalculations, validateCarbonIntensityData };
4028
- export type { AlloyRequest, AlloyResponse, AluminiumRequest, AluminiumResponse, ApiEndpointConfig, ApiResponse, AutomobileRequest, AutomobileResponse, AviationRequest, AviationResponse, BaseRequest, BaseResponse, Bill, BillCalculationConfig, BillFilterOptions, BillMatchingConfig, BusinessTravelEmission, BusinessTravelEmissionAttributes, BusinessTravelEmissionsResponse, BillsAnalyzed$1 as CarbonIntensityBillsAnalyzed, Calculations$1 as CarbonIntensityCalculations, EmissionData$2 as CarbonIntensityEmissionData, ErrorResponse$1 as CarbonIntensityErrorResponse, CarbonIntensityRequest, CarbonIntensityResponse, ChemicalRequest, ChemicalResponse, DetailedCarbonIntensityResponse, EditableItem, EmissionData$3 as EmissionData, EmissionSource, Emissions$j as Emissions, EmissionsDataAttributes, EmissionsDataResponse, FieldConfig, FoodBeveragesRequest, FoodBeveragesResponse, FormData, FormValidationResult, FrontendIndustryConfig, HospitalityRequest, HospitalityResponse, IndustryConfig, EmissionData as IndustryEmissionData, IndustryFieldConfig, IndustryFieldSection, ProductionData as IndustryProductionData, IndustryType, IntensityCalculation, IntensityValue, LogisticsRequest, LogisticsResponse, ManufacturingRequest, ManufacturingResponse, Meta, MetalEnergyRequest, MetalEnergyResponse, PackagingRequest, PackagingResponse, Pagination, PetrochemicalRequest, PetrochemicalResponse, PharmaRequest, PharmaResponse, PlantNameConfig, ProcessedEmissionCategory, ProcessedEmissionItem, ProcessedScope3Data, RealEstateRequest, RealEstateResponse, BillsAnalyzed as ResponseBillsAnalyzed, Calculations as ResponseCalculations, EmissionData$1 as ResponseEmissionData, ErrorResponse as ResponseErrorResponse, ScopeConfig, ScopeProduct, ShippingRequest, ShippingResponse, SteelRequest, SteelResponse, StrapiItem, StrapiResponse, TelecommunicationRequest, TelecommunicationResponse, TextileRequest, TextileResponse, TransportationEmission, TransportationEmissionAttributes, TransportationEmissionsResponse, UserData, UtilitiesRequest, UtilitiesResponse, ValidationError, VehicleEmission, VehicleEmissionAttributes, VehicleEmissionsResponse };
4051
+ export { API_ENDPOINTS, API_SCOPE3_CEMENT_CONFIG, BILL_CALCULATION_CONFIGS, BillManager, CCTS_ALLSCOPES_CEMENT, CCTS_CALCINATION_PRODUCTS, CCTS_ELECTRICITY_PRODUCTS, CCTS_FIRE_EXTINGUISHER_PRODUCTS, CCTS_FUEL_COMBUSTION_PRODUCTS, CCTS_LPG_PRODUCTS, CCTS_MINING_OPERATIONS_PRODUCTS, CCTS_ONSITE_POWER_PRODUCTS, CCTS_PURCHASED_ELECTRICITY, CCTS_REFRIGERANTS, CCTS_SCOPE1_CEMENT, CCTS_SCOPE2_CEMENT, CCTS_SF6_PRODUCTS, CCTS_TABLE_COLUMNS, DEFAULT_BILL_MATCHING_CONFIG, EmissionSourceGenerator, FRONTEND_INDUSTRY_CONFIGS, HTTP_STATUS, INDUSTRIES_CONFIG, INDUSTRY_MAPPING, INDUSTRY_SPECIFIC_FIELDS, INTENSITY_FIELD_LABELS, ISO_CATEGORIES_PACKAGING, index as Industries, UI_FEATURES, WATER_PRODUCTS, calculateCCTSEmission, calculateIntensityMetrics, categorizeApiItem, cleanValue, createBillManager, createCapitalizedMonthMapping, createEmissionSourceGenerator, createMonthMapping, debugCarbonIntensityMapping, extractCarbonIntensityData, formatEmissionValue, formatIntensityValue, formatKPIEmission, formatMonthlyEmission, formatPercentage, getAllConfig, getApiIndustryType, getAvailableFieldsForIndustry, getIndustryConfig$1 as getIndustryConfig, getIndustryFieldConfig, getIntensityFormulas, getPlantNameConfig, getScope3ConfigByName, getUserNameScopeConfig, hasIntensities, isUIFeatureEnabled, mapIndustryToApiType, sanitizeNumber, supportsIntensityCalculations, validateCarbonIntensityData };
4052
+ export type { AllConfigurations, AlloyRequest, AlloyResponse, AluminiumRequest, AluminiumResponse, ApiEndpointConfig, ApiResponse, AutomobileRequest, AutomobileResponse, AviationRequest, AviationResponse, BackendIndustryConfig, BackendScope, BackendScope3Item, BaseRequest, BaseResponse, Bill, BillCalculationConfig, BillFilterOptions, BillMatchingConfig, BusinessTravelEmission, BusinessTravelEmissionAttributes, BusinessTravelEmissionsResponse, BillsAnalyzed$1 as CarbonIntensityBillsAnalyzed, Calculations$1 as CarbonIntensityCalculations, EmissionData$2 as CarbonIntensityEmissionData, ErrorResponse$1 as CarbonIntensityErrorResponse, CarbonIntensityRequest, CarbonIntensityResponse, ChemicalRequest, ChemicalResponse, DetailedCarbonIntensityResponse, EditableItem, EmissionData$3 as EmissionData, EmissionSource, Emissions$j as Emissions, EmissionsDataAttributes, EmissionsDataResponse, FieldConfig, FoodBeveragesRequest, FoodBeveragesResponse, FormData, FormValidationResult, FrontendIndustryConfig, HospitalityRequest, HospitalityResponse, IndustryConfig, EmissionData as IndustryEmissionData, IndustryFieldConfig, IndustryFieldSection, ProductionData as IndustryProductionData, IndustryType, IntensityCalculation, IntensityValue, LogisticsRequest, LogisticsResponse, ManufacturingRequest, ManufacturingResponse, Meta, MetalEnergyRequest, MetalEnergyResponse, PackagingRequest, PackagingResponse, Pagination, PetrochemicalRequest, PetrochemicalResponse, PharmaRequest, PharmaResponse, PlantNameConfig, ProcessedEmissionCategory, ProcessedEmissionItem, ProcessedScope3Data, RealEstateRequest, RealEstateResponse, BillsAnalyzed as ResponseBillsAnalyzed, Calculations as ResponseCalculations, EmissionData$1 as ResponseEmissionData, ErrorResponse as ResponseErrorResponse, ScopeConfig, ScopeProduct, ShippingRequest, ShippingResponse, SteelRequest, SteelResponse, StrapiItem, StrapiResponse, TelecommunicationRequest, TelecommunicationResponse, TextileRequest, TextileResponse, TransportationEmission, TransportationEmissionAttributes, TransportationEmissionsResponse, UserData, UtilitiesRequest, UtilitiesResponse, ValidationError, VehicleEmission, VehicleEmissionAttributes, VehicleEmissionsResponse };