@zerocarbon/erp-config-sdk 1.0.15 → 1.0.16

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
@@ -144,7 +144,7 @@ interface ApiEndpointConfig {
144
144
  description: string;
145
145
  mappingFunction: (data: StrapiItem<any>[]) => ProcessedEmissionItem[];
146
146
  }
147
- interface IndustryConfig {
147
+ interface IndustryConfig$1 {
148
148
  industry: string;
149
149
  displayName: string;
150
150
  apiEndpoints: ApiEndpointConfig[];
@@ -900,35 +900,50 @@ 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
+ type EmissionItem$l = {
904
+ item: string;
905
+ emissionFactor: number;
906
+ unit: string;
907
+ };
908
+ type EquipmentCategory$7 = {
909
+ category: string;
910
+ items: EmissionItem$l[];
911
+ };
912
+ type Scope3Item$3 = {
913
+ name: string;
914
+ displayName: string;
915
+ icon: any;
916
+ scope: string;
917
+ unit: string;
918
+ subProducts: EquipmentCategory$7[];
919
+ desc: string;
920
+ };
921
+ declare const ALL_SCOPES_3_RCO: Scope3Item$3[];
922
+ declare const getRCOConfigByName: (name: string) => Scope3Item$3 | undefined;
923
+
903
924
  declare const getUserNameScopeConfig: <T = any>(scopeKey: "scope1" | "scope2" | "scope3" | "waterManagement", username?: string, defaultScope?: T) => T;
904
- declare const INDUSTRIES_CONFIG: {
905
- [key: string]: {
906
- scope1: Scope[];
907
- scope2: Scope[];
908
- scope3: Scope3Item$2[];
909
- additionalScopes?: {
910
- [key: string]: Array<{
911
- type: "scope1" | "scope2" | "scope3";
912
- route: string;
913
- name: string;
914
- scope: Scope | Scope3Item$2;
915
- }>;
916
- };
917
- };
925
+ type IndustryAdditionalScopeItem = {
926
+ type: "scope1" | "scope2" | "scope3";
927
+ route: string;
928
+ name: string;
929
+ scope: Scope | Scope3Item$2;
918
930
  };
919
- declare const getIndustryConfig$1: (industry: string, username?: string) => {
931
+ type IndustryConfig = {
920
932
  scope1: Scope[];
921
933
  scope2: Scope[];
922
934
  scope3: Scope3Item$2[];
935
+ rco?: Scope3Item$2[];
923
936
  additionalScopes?: {
924
- [key: string]: Array<{
925
- type: "scope1" | "scope2" | "scope3";
926
- route: string;
927
- name: string;
928
- scope: Scope | Scope3Item$2;
929
- }>;
937
+ [key: string]: IndustryAdditionalScopeItem[];
930
938
  };
931
939
  };
940
+ declare const INDUSTRIES_CONFIG: {
941
+ [key: string]: IndustryConfig;
942
+ };
943
+ type IndustryConfigWithRCO = IndustryConfig & {
944
+ rco: Scope3Item$2[];
945
+ };
946
+ declare const getIndustryConfig$1: (industry: string, username?: string) => IndustryConfigWithRCO;
932
947
  type Product = {
933
948
  name: string;
934
949
  unit: string;
@@ -1013,6 +1028,7 @@ type BackendIndustryConfig = {
1013
1028
  scope1: BackendScope[];
1014
1029
  scope2: BackendScope[];
1015
1030
  scope3: BackendScope3Item[];
1031
+ rco: BackendScope3Item[];
1016
1032
  additionalScopes?: {
1017
1033
  [key: string]: BackendAdditionalScopeItem[];
1018
1034
  };
@@ -2563,8 +2579,8 @@ declare const WATER_MANAGEMENT_SCOPE: {
2563
2579
  }[];
2564
2580
  desc: string;
2565
2581
  };
2566
- declare const CEMENT_INDUSTRY_CONFIG: IndustryConfig;
2567
- declare const getIndustryConfig: (industry: string) => IndustryConfig | null;
2582
+ declare const CEMENT_INDUSTRY_CONFIG: IndustryConfig$1;
2583
+ declare const getIndustryConfig: (industry: string) => IndustryConfig$1 | null;
2568
2584
  declare const getEndpointConfig: (industry: string, endpointName: string) => ApiEndpointConfig | undefined;
2569
2585
 
2570
2586
  type EmissionItem$f = {
@@ -3813,6 +3829,7 @@ declare const index_ALL_SCOPES_3_PACKAGING: typeof ALL_SCOPES_3_PACKAGING;
3813
3829
  declare const index_ALL_SCOPES_3_PETRO_CHEMICAL: typeof ALL_SCOPES_3_PETRO_CHEMICAL;
3814
3830
  declare const index_ALL_SCOPES_3_PHARMA: typeof ALL_SCOPES_3_PHARMA;
3815
3831
  declare const index_ALL_SCOPES_3_POLYMER: typeof ALL_SCOPES_3_POLYMER;
3832
+ declare const index_ALL_SCOPES_3_RCO: typeof ALL_SCOPES_3_RCO;
3816
3833
  declare const index_ALL_SCOPES_3_REAL_ESTATE: typeof ALL_SCOPES_3_REAL_ESTATE;
3817
3834
  declare const index_ALL_SCOPES_3_SHIPPING: typeof ALL_SCOPES_3_SHIPPING;
3818
3835
  declare const index_ALL_SCOPES_3_STEEL: typeof ALL_SCOPES_3_STEEL;
@@ -3942,6 +3959,7 @@ declare const index_WATER_USAGE_PRODUCTS: typeof WATER_USAGE_PRODUCTS;
3942
3959
  declare const index_WELDING_PRODUCTS_GAS_LAB: typeof WELDING_PRODUCTS_GAS_LAB;
3943
3960
  declare const index_getEndpointConfig: typeof getEndpointConfig;
3944
3961
  declare const index_getIndustryConfig: typeof getIndustryConfig;
3962
+ declare const index_getRCOConfigByName: typeof getRCOConfigByName;
3945
3963
  declare namespace index {
3946
3964
  export {
3947
3965
  index_ALLSCOPES_ALLOY as ALLSCOPES_ALLOY,
@@ -3976,6 +3994,7 @@ declare namespace index {
3976
3994
  index_ALL_SCOPES_3_PETRO_CHEMICAL as ALL_SCOPES_3_PETRO_CHEMICAL,
3977
3995
  index_ALL_SCOPES_3_PHARMA as ALL_SCOPES_3_PHARMA,
3978
3996
  index_ALL_SCOPES_3_POLYMER as ALL_SCOPES_3_POLYMER,
3997
+ index_ALL_SCOPES_3_RCO as ALL_SCOPES_3_RCO,
3979
3998
  index_ALL_SCOPES_3_REAL_ESTATE as ALL_SCOPES_3_REAL_ESTATE,
3980
3999
  index_ALL_SCOPES_3_SHIPPING as ALL_SCOPES_3_SHIPPING,
3981
4000
  index_ALL_SCOPES_3_STEEL as ALL_SCOPES_3_STEEL,
@@ -4105,8 +4124,9 @@ declare namespace index {
4105
4124
  index_WELDING_PRODUCTS_GAS_LAB as WELDING_PRODUCTS_GAS_LAB,
4106
4125
  index_getEndpointConfig as getEndpointConfig,
4107
4126
  index_getIndustryConfig as getIndustryConfig,
4127
+ index_getRCOConfigByName as getRCOConfigByName,
4108
4128
  };
4109
4129
  }
4110
4130
 
4111
- 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, getCombinedBackendConfig, getIndustryBackendConfig, getIndustryConfig$1 as getIndustryConfig, getIndustryFieldConfig, getIntensityFormulas, getPlantNameConfig, getScope3ConfigByName, getUserNameBackendConfig, getUserNameScopeConfig, hasIntensities, isUIFeatureEnabled, mapIndustryToApiType, sanitizeNumber, supportsIntensityCalculations, validateCarbonIntensityData };
4112
- export type { AllConfigurations, AlloyRequest, AlloyResponse, AluminiumRequest, AluminiumResponse, ApiEndpointConfig, ApiResponse, AutomobileRequest, AutomobileResponse, AviationRequest, AviationResponse, BackendAdditionalScopeItem, BackendEmissionItem, BackendEmissions, BackendEquipmentCategory, BackendIndustries, BackendIndustryConfig, BackendProduct, BackendScope, BackendScope3Item, BackendUserConfig, BackendUserConfigs, 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 };
4131
+ export { ALL_SCOPES_3_RCO, 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, getCombinedBackendConfig, getIndustryBackendConfig, getIndustryConfig$1 as getIndustryConfig, getIndustryFieldConfig, getIntensityFormulas, getPlantNameConfig, getRCOConfigByName, getScope3ConfigByName, getUserNameBackendConfig, getUserNameScopeConfig, hasIntensities, isUIFeatureEnabled, mapIndustryToApiType, sanitizeNumber, supportsIntensityCalculations, validateCarbonIntensityData };
4132
+ export type { AllConfigurations, AlloyRequest, AlloyResponse, AluminiumRequest, AluminiumResponse, ApiEndpointConfig, ApiResponse, AutomobileRequest, AutomobileResponse, AviationRequest, AviationResponse, BackendAdditionalScopeItem, BackendEmissionItem, BackendEmissions, BackendEquipmentCategory, BackendIndustries, BackendIndustryConfig, BackendProduct, BackendScope, BackendScope3Item, BackendUserConfig, BackendUserConfigs, 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$1 as 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 };