@smartdcc/duis-templates 0.3.0 → 0.5.0
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 +106 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/load.d.ts.map +1 -1
- package/dist/load.js +2 -0
- package/dist/load.js.map +1 -1
- package/dist/search.d.ts +3 -3
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js.map +1 -1
- package/dist/tariff.d.ts +18 -0
- package/dist/tariff.d.ts.map +1 -0
- package/dist/tariff.dto.d.ts +124 -0
- package/dist/tariff.dto.d.ts.map +1 -0
- package/dist/tariff.dto.js +35 -0
- package/dist/tariff.dto.js.map +1 -0
- package/dist/tariff.is.d.ts +27 -0
- package/dist/tariff.is.d.ts.map +1 -0
- package/dist/tariff.is.js +228 -0
- package/dist/tariff.is.js.map +1 -0
- package/dist/tariff.js +178 -0
- package/dist/tariff.js.map +1 -0
- package/package.json +15 -10
- package/templates/12.2_DEVICE_PRE_NOTIFICATION_REQUEST_DUIS.XML +1 -1
- package/templates/8.13_RETURN_LOCAL_COMMAND_RESPONSE_CS06_REQUEST_DUIS.XML +1 -1
- package/templates/8.14.1_COMMUNICATIONS_HUB_STATUS_UPDATE_INSTALL_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/8.14.2_COMMUNICATIONS_HUB_STATUS_UPDATE_INSTALL_NO_SM_WAN_REQUEST_DUIS.XML +1 -1
- package/templates/8.14.3_COMMUNICATIONS_HUB_STATUS_UPDATE_FAULT_RETURN_REQUEST_DUIS.XML +1 -1
- package/templates/8.14.4_COMMUNICATIONS_HUB_STATUS_UPDATE_NO_FAULT_RETURN_REQUEST_DUIS.XML +1 -1
- package/templates/8.2_READ_INVENTORY_REQUEST_DUIS.XML +1 -1
- package/templates/8.3_DECOMMISSION_DEVICE_REQUEST_DUIS.XML +1 -1
- package/templates/8.4_UPDATE_INVENTORY_REQUEST_DUIS.XML +1 -1
- package/templates/8.6_SERVICE_OPTIN_REQUEST_DUIS.XML +1 -1
- package/templates/CCS01_8.11_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CCS02_8.11_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CCS03_8.12.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CCS05CCS04_8.9_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CCS06_8.9_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CCS07_8.9_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS01a_2.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS01b_2.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS02aMAC_6.24.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS02bACBByACB_8.5_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS02bNOByNOHandover_6.21_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS02bNOByNO_6.15.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS02bSupplierBySupplierHandover_6.21_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS02bSupplierBySupplier_6.15.1_CANCELLATION_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS02bSupplierBySupplier_6.15.1_FUTURE_DATED_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS02bSupplierBySupplier_6.15.1_IMMEDIATE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS02bSupplierByTransCoS_6.23_CANCELLATION_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS02bSupplierByTransCoS_6.23_FUTURE_DATED_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS02bSupplierByTransCoS_6.23_IMMEDIATE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS02c_6.17_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS02d_6.15.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS02e_6.24.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS02fMAC_6.24.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS02gLoadControllerBySupplier_6.15.1_CANCELLATION_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS02gLoadControllerBySupplier_6.15.1_FUTURE_DATED_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS02gLoadControllerBySupplier_6.15.1_IMMEDIATE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS03A1_8.7.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS03A2Critical_8.7.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS03A2NonCritical_8.7.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS03B_8.7.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS03CCritical_8.7.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS03CNonCritical_8.7.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS04ACCritical_8.8.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS04ACNonCritical_8.8.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS04B_8.8.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS06_11.3_CANCELLATION_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS06_11.3_FUTURE_DATED_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS06_11.3_IMMEDIATE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS07_8.9_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS08_11.2_SUCCESS_REQUEST_DUIS.XML +2 -2
- package/templates/CS10a_6.13_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS10b_6.13_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/CS11_3.3_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/DBCH01_6.31_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/DBCH02_6.32_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/DBCH03_6.30_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/DBCH04_6.28_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/DBCH05_6.29_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS01a_1.1.1_CANCELLATION_TOU_BLOCK_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS01a_1.1.1_FUTURE_DATED_TOU_BLOCK_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS01a_1.1.1_IMMEDIATE_BLOCK_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS01a_1.1.1_IMMEDIATE_TOU_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS01b_1.2.1_CANCELLATION_TOU_BLOCK_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS01b_1.2.1_FUTURE_DATED_TOU_BLOCK_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS01b_1.2.1_IMMEDIATE_BLOCK_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS01b_1.2.1_IMMEDIATE_TOU_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS01c_1.1.2_CANCELLATION_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS01c_1.1.2_FUTURE_DATED_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS01c_1.1.2_IMMEDIATE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS01d_1.2.2_CANCELLATION_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS01d_1.2.2_FUTURE_DATED_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS01d_1.2.2_IMMEDIATE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS02_1.6_CANCELLATION_TWIN_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS02_1.6_FUTURE_DATED_TWIN_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS02_1.6_IMMEDIATE_SINGLE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS03_1.6_CANCELLATION_TWIN_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS03_1.6_FUTURE_DATED_TWIN_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS03_1.6_IMMEDIATE_SINGLE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS04a_1.5_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS04b_1.5_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS05_1.7_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS07_2.3_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS08_2.1_CANCELLATION_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS08_2.1_FUTURE_DATED_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS08_2.1_IMMEDIATE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS08a_2.1_CANCELLATION_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS08a_2.1_FUTURE_DATED_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS08a_2.1_IMMEDIATE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS09_2.5_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS10_3.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS12_3.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS14_3.5_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS15a_3.3_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS15c_3.3_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS16_3.4_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS17a_4.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS17b_4.1.1_DSP_FUTURE_DATED_REQUEST_DUIS.XML +1 -1
- package/templates/ECS17b_4.1.1_REQUEST_DUIS.XML +1 -1
- package/templates/ECS17b_4.1.1_SINGLE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS17b_4.1.1_TWIN_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS17c_4.16_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS17d_4.1.2_SINGLE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS17d_4.1.2_TWIN_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS17e_4.1.3_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS18a_4.12.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS18b_4.12.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS19_4.3_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS20a_4.4.4_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS20b_4.4.2_SINGLE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS20b_4.4.2_TWIN_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS20c_4.4.3_SINGLE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS20c_4.4.3_TWIN_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS20d_4.4.5_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS21a_4.6.1_SINGLE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS21a_4.6.1_TWIN_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS21a_5.1._DCC_SCHEDULED_REQUEST_DUIS.XML +1 -1
- package/templates/ECS21b_4.14_KRP_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS21b_4.14_URP_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS21c_4.6.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS22a_4.8.3_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS22b_4.8.1_SINGLE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS22b_4.8.1_TWIN_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS22c_4.8.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS23_4.10_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS23b_4.10_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS24_4.11.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS24b_4.11.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS25a1_6.22_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS25a2_6.22_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS25a3_6.22_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS25a_6.22_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS25b3_6.22_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS25b_6.22_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS25r1_6.2.10_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS25r2_6.2.10_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS26a_4.13_SINGLE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS26a_4.13_TWIN_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS26b_6.2.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS26c_6.2.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS26d_6.2.3_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS26e_6.2.4_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS26f_6.2.5_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS26i_6.2.4_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS26j_6.2.9_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS26k_6.2.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS26l_6.2.3_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS26m_6.2.4_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS26n_6.2.4_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS27_4.15_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS28a_6.4.1_CANCELLATION_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS28a_6.4.1_FUTURE_DATED_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS28a_6.4.1_IMMEDIATE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS28b_6.4.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS29a_6.5_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS29b_6.5_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS29c_6.5_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS29d_6.5_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS29e_6.27_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS29f_6.27_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS30_6.8_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS30a_6.8_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS34_6.12_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS35a_6.13_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS35b_6.13_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS35c_6.13_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS35d_6.13_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS35e_6.13_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS35f_6.13_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS35g_6.13_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS37_6.18.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS38_7.12_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS39a_6.20.1_SINGLE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS39a_6.20.1_TWIN_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS39b_6.20.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS40_6.2.7_SINGLE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS40_6.2.7_TWIN_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS42_7.1_REQUEST_DUIS.XML +1 -1
- package/templates/ECS42_7.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS43_7.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS44_7.3_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS45_7.4_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS46a_6.14.1_ALL_OPTIONALS_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS46a_6.14.1_SOME_OPTIONALS_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS46c_6.14.2_CANCELLATION_ALL_OPTIONALS_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS46c_6.14.2_FUTURE_DATED_ALL_OPTIONALS_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS46c_6.14.2_IMMEDIATE_SOME_OPTIONALS_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS46d_6.14.3_CANCELLATION_APC_OUTPUT_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS46d_6.14.3_FUTURE_DATED_APC_OUTPUT_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS46d_6.14.3_IMMEDIATE_ALCS_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS46d_6.14.3_IMMEDIATE_APC_INPUT_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS46d_6.14.3_IMMEDIATE_APC_OUTPUT_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS47Activate_7.5_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS47Deactivate_7.6_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS47Reset_7.8_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS47a_7.13_ALCS_ACTIVATE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS47a_7.13_ALCS_DEACTIVATE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS47a_7.13_APC_INPUT_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS47a_7.13_APC_OUTPUT_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS47e_7.16_APC_INPUT_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS47e_7.16_APC_OUTPUT_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS48_6.26_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS50_9.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS52_11.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS57_6.18.2_ALL_OPTIONALS_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS57_6.18.2_SOME_OPTIONALS_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS61a_7.7_ALL_OPTIONALS_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS61c_7.11_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS61d_7.14_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS61e_7.15_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS62Add_7.9_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS62Remove_7.10_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS66_4.17_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS70Commission_8.1.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS70_6.11_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS81_6.25_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/ECS82_4.18_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS01a_1.1.1_CANCELLATION_BLOCK_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS01a_1.1.1_FUTURE_DATED_BLOCK_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS01a_1.1.1_IMMEDIATE_TOU_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS01b_1.2.1_CANCELLATION_BLOCK_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS01b_1.2.1_FUTURE_DATED_BLOCK_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS01b_1.2.1_IMMEDIATE_TOU_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS02_1.6_CANCELLATION_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS02_1.6_FUTURE_DATED_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS02_1.6_IMMEDIATE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS03_1.6_CANCELLATION_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS03_1.6_FUTURE_DATED_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS03_1.6_IMMEDIATE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS04_2.3_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS05_2.1_CANCELLATION_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS05_2.1_FUTURE_DATED_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS05_2.1_IMMEDIATE_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS06_2.5_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS07_3.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS09_3.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS11_3.5_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS13a_4.1.1_SUCCESS_RELIABLE_GPF_REQUEST_DUIS.XML +1 -1
- package/templates/GCS13a_4.1.1_SUCCESS_RELIABLE_GSME_REQUEST_DUIS.XML +1 -1
- package/templates/GCS13a_4.1.1_SUCCESS_UNRELIABLE_REQUEST_DUIS.XML +1 -1
- package/templates/GCS13b_4.1.4_SUCCESS_RELIABLE_GPF_REQUEST_DUIS.XML +1 -1
- package/templates/GCS13b_4.1.4_SUCCESS_RELIABLE_GSME_REQUEST_DUIS.XML +1 -1
- package/templates/GCS13b_4.1.4_SUCCESS_UNRELIABLE_REQUEST_DUIS.XML +1 -1
- package/templates/GCS13c_4.1.2_SUCCESS_RELIABLE_GPF_REQUEST_DUIS.XML +1 -1
- package/templates/GCS13c_4.1.2_SUCCESS_RELIABLE_GSME_REQUEST_DUIS.XML +1 -1
- package/templates/GCS13c_4.1.2_SUCCESS_UNRELIABLE_REQUEST_DUIS.XML +1 -1
- package/templates/GCS14_4.3_SUCCESS_RELIABLE_GPF_REQUEST_DUIS.XML +1 -1
- package/templates/GCS14_4.3_SUCCESS_RELIABLE_GSME_REQUEST_DUIS.XML +1 -1
- package/templates/GCS14_4.3_SUCCESS_UNRELIABLE_REQUEST_DUIS.XML +1 -1
- package/templates/GCS15b_4.4.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS15c_4.4.3_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS15d_4.4.4_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS15e_4.4.5_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS16a_4.6.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS16b_4.14_KRP_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS16b_4.14_URP_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS17_4.8.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS18_4.10_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS20_6.22_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS20r_6.2.10_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS21a_6.2.8_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS21b_4.13_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS21d_6.2.3_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS21e_6.2.4_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS21f_4.11.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS21j_6.2.9_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS21k_6.2.3_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS21m_6.2.4_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS23_6.6_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS24_6.7_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS24a_6.7_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS25_6.8_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS25a_6.8_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS28Commission_8.1.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS28_6.11_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS31_14.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS32_7.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS33_7.4_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS36_9.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS38_11.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS39_7.3_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS40a_1.5_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS40b_1.5_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS40c_1.5_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS40d_1.5_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS41_6.20.1_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS44_3.4_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS46_6.2.7_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS59_8.12.2_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS60_4.18_SUCCESS_REQUEST_DUIS.XML +1 -1
- package/templates/GCS60a_4.18_SUCCESS_RELIABLE_GPF_REQUEST_DUIS.XML +1 -1
- package/templates/GCS60a_4.18_SUCCESS_RELIABLE_GSME_REQUEST_DUIS.XML +1 -1
- package/templates/GCS60a_4.18_SUCCESS_UNRELIABLE_GSME_REQUEST_DUIS.XML +1 -1
- package/templates/GCS61_4.17_SUCCESS_REQUEST_DUIS.XML +1 -1
package/README.md
CHANGED
|
@@ -14,6 +14,12 @@ the templates from `XML` into `JSON` is managed by the
|
|
|
14
14
|
[Fuse.js][fusejs] library to easily search the templates, e.g. by *GBCS Use
|
|
15
15
|
Case*, *Service Request Variant*, *Service Request Name*.
|
|
16
16
|
|
|
17
|
+
## Tariff Builder
|
|
18
|
+
|
|
19
|
+
Tariff data within GB smart metering is complex and directly building a tariff
|
|
20
|
+
from a template is non-trivial. To help reduce the burden, a tariff builder is
|
|
21
|
+
provided within this library. See example below.
|
|
22
|
+
|
|
17
23
|
## Usage
|
|
18
24
|
|
|
19
25
|
Developed and tested against `node 16`. Install from `npm`:
|
|
@@ -204,6 +210,105 @@ Which might return:
|
|
|
204
210
|
}
|
|
205
211
|
```
|
|
206
212
|
|
|
213
|
+
## Build ESME Tariff
|
|
214
|
+
|
|
215
|
+
The library includes utility functions to help build a service request `1.1.1` -
|
|
216
|
+
*Update Import Tariff (Primary Element)* for an ESME.
|
|
217
|
+
|
|
218
|
+
This consists of two parts, first a TypeScript [definition of a
|
|
219
|
+
tariff](./src/tariff.dto.ts) and then a [utility function](./src/tariff.ts) to
|
|
220
|
+
convert this into a DUIS request. They TypeScript definition of a tariff
|
|
221
|
+
attempts to be as close as possible to the underlying DUIS request, so an
|
|
222
|
+
understanding of service request `1.1.1` is required, which can be found in
|
|
223
|
+
[dugids][dugids].
|
|
224
|
+
|
|
225
|
+
A simple tariff which is £0.55/day standing charge and £0.20/kWh can be defined
|
|
226
|
+
as follows:
|
|
227
|
+
|
|
228
|
+
```ts
|
|
229
|
+
import { Tariff } from '@smartdcc/duis-parser'
|
|
230
|
+
|
|
231
|
+
const tariff: Tariff = {
|
|
232
|
+
seasons: [
|
|
233
|
+
{
|
|
234
|
+
name: 'all',
|
|
235
|
+
weekProfile: 1
|
|
236
|
+
},
|
|
237
|
+
],
|
|
238
|
+
weekProfiles: [[1, 1, 1, 1, 1, 1, 1]],
|
|
239
|
+
dayProfiles: [
|
|
240
|
+
[
|
|
241
|
+
{
|
|
242
|
+
mode: 'tou',
|
|
243
|
+
startTime: 0,
|
|
244
|
+
action: 1,
|
|
245
|
+
},
|
|
246
|
+
],
|
|
247
|
+
],
|
|
248
|
+
specialDays: [],
|
|
249
|
+
tous: [20],
|
|
250
|
+
blocks: [
|
|
251
|
+
{
|
|
252
|
+
prices: [0, 0],
|
|
253
|
+
thresholds: [ 0],
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
prices: [0, 0],
|
|
257
|
+
thresholds: [0],
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
prices: [0, 0],
|
|
261
|
+
thresholds: [0],
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
prices: [0, 0],
|
|
265
|
+
thresholds: [0],
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
prices: [0, 0],
|
|
269
|
+
thresholds: [0],
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
prices: [0, 0],
|
|
273
|
+
thresholds: [0],
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
prices: [0, 0],
|
|
277
|
+
thresholds: [0],
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
prices: [0, 0],
|
|
281
|
+
thresholds: [0],
|
|
282
|
+
},
|
|
283
|
+
],
|
|
284
|
+
pricing: {
|
|
285
|
+
priceScale: -2,
|
|
286
|
+
standingCharge: 55,
|
|
287
|
+
standingChargeScale: -2,
|
|
288
|
+
},
|
|
289
|
+
}
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
This would then be constructed into a DUIS request as follows:
|
|
293
|
+
|
|
294
|
+
```ts
|
|
295
|
+
import {SimplifiedDuisOutputRequest, buildUpdateImportTariff_PrimaryElement} from '@smartdcc/duis-templates'
|
|
296
|
+
|
|
297
|
+
const req: SimplifiedDuisOutputRequest = buildUpdateImportTariff_PrimaryElement(
|
|
298
|
+
simpleToUTariff,
|
|
299
|
+
{
|
|
300
|
+
counter: BigInt(1006),
|
|
301
|
+
originatorId: '90-b3-d5-1f-30-01-00-00',
|
|
302
|
+
targetId: '00-db-12-34-56-78-90-a0',
|
|
303
|
+
},
|
|
304
|
+
)
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
This can be used in the same way as the *templates* discussed
|
|
308
|
+
[above](#template-usage).
|
|
309
|
+
|
|
310
|
+
For more examples of tariffs, see the [test script](./test/tariff.test.ts).
|
|
311
|
+
|
|
207
312
|
## Contributing
|
|
208
313
|
|
|
209
314
|
Contributions are welcome!
|
|
@@ -231,3 +336,4 @@ Copyright 2022, Smart DCC Limited, All rights reserved. Project is licensed unde
|
|
|
231
336
|
[duis-parser]: https://github.com/SmartDCCInnovation/duis-parser "DUIS Parser"
|
|
232
337
|
[boxed]: https://www.smartdcc.co.uk/our-smart-network/network-products-services/dcc-boxed/ "DCC Boxed"
|
|
233
338
|
[fusejs]: https://fusejs.io/ "Fuse.js"
|
|
339
|
+
[dugids]: https://smartenergycodecompany.co.uk/document-download-centre/download-info/dugids-3-1a-operational-dugids-november-2019/ "DUGIDS"
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export { loadTemplates, lookupGBCS, GBCSRecord, Template, TemplateDirectory, } from './load';
|
|
2
2
|
export { search, searchGBCS } from './search';
|
|
3
|
+
export { buildUpdateImportTariff_PrimaryElement } from './tariff';
|
|
4
|
+
export type * from './tariff.dto';
|
|
5
|
+
export { isTariff } from './tariff.is';
|
|
3
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,aAAa,EACb,UAAU,EACV,UAAU,EACV,QAAQ,EACR,iBAAiB,GAClB,MAAM,QAAQ,CAAA;AACf,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,aAAa,EACb,UAAU,EACV,UAAU,EACV,QAAQ,EACR,iBAAiB,GAClB,MAAM,QAAQ,CAAA;AACf,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,EAAE,sCAAsC,EAAE,MAAM,UAAU,CAAA;AACjE,mBAAmB,cAAc,CAAA;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -18,11 +18,15 @@
|
|
|
18
18
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.searchGBCS = exports.search = exports.lookupGBCS = exports.loadTemplates = void 0;
|
|
21
|
+
exports.isTariff = exports.buildUpdateImportTariff_PrimaryElement = exports.searchGBCS = exports.search = exports.lookupGBCS = exports.loadTemplates = void 0;
|
|
22
22
|
var load_1 = require("./load");
|
|
23
23
|
Object.defineProperty(exports, "loadTemplates", { enumerable: true, get: function () { return load_1.loadTemplates; } });
|
|
24
24
|
Object.defineProperty(exports, "lookupGBCS", { enumerable: true, get: function () { return load_1.lookupGBCS; } });
|
|
25
25
|
var search_1 = require("./search");
|
|
26
26
|
Object.defineProperty(exports, "search", { enumerable: true, get: function () { return search_1.search; } });
|
|
27
27
|
Object.defineProperty(exports, "searchGBCS", { enumerable: true, get: function () { return search_1.searchGBCS; } });
|
|
28
|
+
var tariff_1 = require("./tariff");
|
|
29
|
+
Object.defineProperty(exports, "buildUpdateImportTariff_PrimaryElement", { enumerable: true, get: function () { return tariff_1.buildUpdateImportTariff_PrimaryElement; } });
|
|
30
|
+
var tariff_is_1 = require("./tariff.is");
|
|
31
|
+
Object.defineProperty(exports, "isTariff", { enumerable: true, get: function () { return tariff_is_1.isTariff; } });
|
|
28
32
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAEH,+BAMe;AALb,qGAAA,aAAa,OAAA;AACb,kGAAA,UAAU,OAAA;AAKZ,mCAA6C;AAApC,gGAAA,MAAM,OAAA;AAAE,oGAAA,UAAU,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAEH,+BAMe;AALb,qGAAA,aAAa,OAAA;AACb,kGAAA,UAAU,OAAA;AAKZ,mCAA6C;AAApC,gGAAA,MAAM,OAAA;AAAE,oGAAA,UAAU,OAAA;AAC3B,mCAAiE;AAAxD,gIAAA,sCAAsC,OAAA;AAE/C,yCAAsC;AAA7B,qGAAA,QAAQ,OAAA"}
|
package/dist/load.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../src/load.ts"],"names":[],"mappings":"AAmBA,OAAO,EAEL,OAAO,EACP,2BAA2B,EAC3B,uBAAuB,EAGxB,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../src/load.ts"],"names":[],"mappings":"AAmBA,OAAO,EAEL,OAAO,EACP,2BAA2B,EAC3B,uBAAuB,EAGxB,MAAM,uBAAuB,CAAA;AAQ9B,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,OAAO,CAAA;IACf,UAAU,EAAE,2BAA2B,CAAA;IACvC,uBAAuB,EAAE,uBAAuB,CAAA;IAChD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAIjE;AAED,MAAM,WAAW,UAAU;IACzB,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB,EAAE,MAAM,CAAA;IACxB,cAAc,EAAE,MAAM,CAAA;IACtB,sBAAsB,EAAE,MAAM,CAAA;IAC9B,6BAA6B,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5C,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAA;CACnC;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAE/D;AAED,wBAAsB,YAAY,CAChC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,EAC7B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,IAAI,CAAC,CAkDpC;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;OAGG;IACH,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B;AAED,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;AAExD,wBAAsB,aAAa,CACjC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,iBAAiB,CAAC,CAqB5B"}
|
package/dist/load.js
CHANGED
|
@@ -28,6 +28,7 @@ const node_path_1 = require("node:path");
|
|
|
28
28
|
const promises_1 = require("node:fs/promises");
|
|
29
29
|
const gbcs_mapping_table_json_1 = __importDefault(require("./gbcs-mapping-table.json"));
|
|
30
30
|
const node_path_2 = require("node:path");
|
|
31
|
+
const node_util_1 = require("node:util");
|
|
31
32
|
function parseFileTag(tag) {
|
|
32
33
|
return tag.match(/(?:(?<gbcs>[A-Z]+\d+(?:(?:[a-z]|[A-Z]{1,2})\d?)?|CCS05CCS04)(?<gbcsvariant>(?:[A-Z][a-z]+|NO|ACB|MAC|S)+)?_)?(?<srv>\d+(?:\.\d+)+)(?:_(?<variant>[A-Za-z_]*))?/);
|
|
33
34
|
}
|
|
@@ -66,6 +67,7 @@ async function loadTemplate(logger, fileName) {
|
|
|
66
67
|
const template_buffer = await (0, promises_1.readFile)(fileName);
|
|
67
68
|
const simplified = (0, duis_parser_1.parseDuis)('simplified', template_buffer);
|
|
68
69
|
if (!(0, duis_parser_1.isSimplifiedDuisOutputRequest)(simplified)) {
|
|
70
|
+
console.log((0, node_util_1.inspect)(simplified, false, 10));
|
|
69
71
|
logger(`not loading duis template ${fileName} its not a request`);
|
|
70
72
|
return null;
|
|
71
73
|
}
|
package/dist/load.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.js","sourceRoot":"","sources":["../src/load.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;AAEH,uDAO8B;AAC9B,+BAA2B;AAC3B,yCAA6C;AAC7C,+CAA2C;AAC3C,wFAAoD;AACpD,yCAAgC;
|
|
1
|
+
{"version":3,"file":"load.js","sourceRoot":"","sources":["../src/load.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;AAEH,uDAO8B;AAC9B,+BAA2B;AAC3B,yCAA6C;AAC7C,+CAA2C;AAC3C,wFAAoD;AACpD,yCAAgC;AAChC,yCAAmC;AAanC,SAAgB,YAAY,CAAC,GAAW;IACtC,OAAO,GAAG,CAAC,KAAK,CACd,gKAAgK,CACjK,CAAA;AACH,CAAC;AAJD,oCAIC;AAWD,SAAgB,UAAU,CAAC,IAAY;IACrC,OA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ACjC,CAAC,MAAM,CAAC,IAAA,gBAAI,EAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC,CAC3C,EACD,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAC/B,CAAA;IAED,MAAM,EAAE,GAAG,CACT,MAAM,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CACjE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAyB,CAAA;IAEzD,OAAO,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;AAC/B,CAAC;AAvBD,sCAuBC"}
|
package/dist/search.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Fuse from 'fuse.js';
|
|
1
|
+
import Fuse, { IFuseOptions } from 'fuse.js';
|
|
2
2
|
import { GBCSRecord, Template, TemplateDirectory } from './load';
|
|
3
3
|
/**
|
|
4
4
|
* Builds a Fuse searcher instance with some default parameters set for duis
|
|
@@ -8,7 +8,7 @@ import { GBCSRecord, Template, TemplateDirectory } from './load';
|
|
|
8
8
|
* @param options override default options - avoid setting "keys"
|
|
9
9
|
* @returns Fuse
|
|
10
10
|
*/
|
|
11
|
-
export declare function search(td: TemplateDirectory, options?:
|
|
11
|
+
export declare function search(td: TemplateDirectory, options?: IFuseOptions<[string, Template]>): Fuse<[string, Template]>;
|
|
12
12
|
/**
|
|
13
13
|
* Builds a Fuse searcher instance with some default parameters set for gbcs/use
|
|
14
14
|
* cases.
|
|
@@ -16,5 +16,5 @@ export declare function search(td: TemplateDirectory, options?: Fuse.IFuseOption
|
|
|
16
16
|
* @param options override default options - avoid setting "keys"
|
|
17
17
|
* @returns Fuse
|
|
18
18
|
*/
|
|
19
|
-
export declare function searchGBCS(options?:
|
|
19
|
+
export declare function searchGBCS(options?: IFuseOptions<[string, GBCSRecord]>): Fuse<[string, GBCSRecord]>;
|
|
20
20
|
//# sourceMappingURL=search.d.ts.map
|
package/dist/search.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../src/search.ts"],"names":[],"mappings":"AAmBA,OAAO,IAAI,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../src/search.ts"],"names":[],"mappings":"AAmBA,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAA;AAGhE;;;;;;;GAOG;AACH,wBAAgB,MAAM,CACpB,EAAE,EAAE,iBAAiB,EACrB,OAAO,CAAC,EAAE,YAAY,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,GACzC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAgB1B;AAID;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,OAAO,CAAC,EAAE,YAAY,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,GAC3C,IAAI,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAkB5B"}
|
package/dist/search.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../src/search.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;AAEH,
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../src/search.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;AAEH,sDAA4C;AAE5C,wFAAoD;AAEpD;;;;;;;GAOG;AACH,SAAgB,MAAM,CACpB,EAAqB,EACrB,OAA0C;IAE1C,OAAO,IAAI,iBAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;QAClC,IAAI,EAAE;YACJ,GAAG;YACH,gDAAgD;YAChD,qDAAqD;YACrD,QAAQ;YACR,eAAe;YACf,aAAa;YACb,QAAQ;SACT;QACD,QAAQ,EAAE,GAAG;QACb,SAAS,EAAE,GAAG;QACd,cAAc,EAAE,IAAI;QACpB,GAAG,OAAO;KACX,CAAC,CAAA;AACJ,CAAC;AAnBD,wBAmBC;AAED,IAAI,OAA+B,CAAA;AAEnC;;;;;;GAMG;AACH,SAAgB,UAAU,CACxB,OAA4C;IAE5C,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,GAAG,iCAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;IAChD,CAAC;IACD,OAAO,IAAI,iBAAI,CAAC,OAAO,EAAE;QACvB,IAAI,EAAE;YACJ,GAAG;YACH,iBAAiB;YACjB,kBAAkB;YAClB,gBAAgB;YAChB,wBAAwB;YACxB,qBAAqB;SACtB;QACD,QAAQ,EAAE,GAAG;QACb,SAAS,EAAE,GAAG;QACd,cAAc,EAAE,IAAI;QACpB,GAAG,OAAO;KACX,CAAC,CAAA;AACJ,CAAC;AApBD,gCAoBC"}
|
package/dist/tariff.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { RequestId, SimplifiedDuisOutputRequest, XMLData } from '@smartdcc/duis-parser';
|
|
2
|
+
import { Tariff } from './tariff.dto';
|
|
3
|
+
export declare function singlify(d: XMLData[]): XMLData[] | XMLData;
|
|
4
|
+
export declare function buildDate(d: {
|
|
5
|
+
year?: number;
|
|
6
|
+
month?: number;
|
|
7
|
+
dayOfMonth?: number;
|
|
8
|
+
dayOfWeek?: number;
|
|
9
|
+
}): XMLData;
|
|
10
|
+
/**
|
|
11
|
+
* Builds SRV 1.1.1 from a Tariff object
|
|
12
|
+
*
|
|
13
|
+
* @param t Tariff object
|
|
14
|
+
* @param requestId
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildUpdateImportTariff_PrimaryElement(t: Tariff, requestId: RequestId<bigint>): SimplifiedDuisOutputRequest;
|
|
18
|
+
//# sourceMappingURL=tariff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tariff.d.ts","sourceRoot":"","sources":["../src/tariff.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,SAAS,EACT,2BAA2B,EAC3B,OAAO,EAGR,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,GAAG,OAAO,CAK1D;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,OAAO,CAuBV;AAED;;;;;;GAMG;AACH,wBAAgB,sCAAsC,CACpD,CAAC,EAAE,MAAM,EACT,SAAS,EAAE,SAAS,CAAC,MAAM,CAAC,GAC3B,2BAA2B,CAsL7B"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
export type Tuple<T, N extends number, Q extends T[] = []> = N extends Q['length'] ? Q : Tuple<T, N, [...Q, T]>;
|
|
2
|
+
export type TupleMinMax<T, Min extends number, Max extends number, Q extends T[] = Tuple<T, Min>> = Max extends Q['length'] ? Q : Q | TupleMinMax<T, Min, Max, [...Q, T]>;
|
|
3
|
+
export interface Season {
|
|
4
|
+
name: string;
|
|
5
|
+
/**
|
|
6
|
+
* 4 digit year, or undefined for wildcard
|
|
7
|
+
*/
|
|
8
|
+
year?: number;
|
|
9
|
+
/**
|
|
10
|
+
* 1 = jan ... 12 = dec, or undefined for wildcard
|
|
11
|
+
*/
|
|
12
|
+
month?: number;
|
|
13
|
+
/**
|
|
14
|
+
* 1..31, or undefined for wildcard
|
|
15
|
+
*/
|
|
16
|
+
dayOfMonth?: number;
|
|
17
|
+
/**
|
|
18
|
+
* 1..7, or undefined for wildcard
|
|
19
|
+
*/
|
|
20
|
+
dayOfWeek?: number;
|
|
21
|
+
/**
|
|
22
|
+
* 1..4, index week profile
|
|
23
|
+
*/
|
|
24
|
+
weekProfile: number;
|
|
25
|
+
}
|
|
26
|
+
export type Seasons = TupleMinMax<Season, 1, 4>;
|
|
27
|
+
export type NumberRange<N extends number, Q extends number[] = [1]> = N extends Q['length'] ? Q['length'] : NumberRange<N, [...Q, 1]> | Q['length'];
|
|
28
|
+
export type ProfileSchedule = {
|
|
29
|
+
/**
|
|
30
|
+
* seconds from 00:00:00 UTC
|
|
31
|
+
*/
|
|
32
|
+
startTime: number;
|
|
33
|
+
} & ({
|
|
34
|
+
mode: 'tou';
|
|
35
|
+
action: NumberRange<48>;
|
|
36
|
+
} | {
|
|
37
|
+
mode: 'block';
|
|
38
|
+
action: NumberRange<8>;
|
|
39
|
+
});
|
|
40
|
+
export type DayProfile = TupleMinMax<ProfileSchedule, 1, 48>;
|
|
41
|
+
export type DayProfiles = TupleMinMax<DayProfile, 1, 16>;
|
|
42
|
+
export type DayProfileName = NumberRange<16>;
|
|
43
|
+
export type WeekProfile = [
|
|
44
|
+
DayProfileName,
|
|
45
|
+
DayProfileName,
|
|
46
|
+
DayProfileName,
|
|
47
|
+
DayProfileName,
|
|
48
|
+
DayProfileName,
|
|
49
|
+
DayProfileName,
|
|
50
|
+
DayProfileName
|
|
51
|
+
];
|
|
52
|
+
export type WeekProfiles = TupleMinMax<WeekProfile, 1, 4>;
|
|
53
|
+
export type BlockAction = {
|
|
54
|
+
thresholds: [number];
|
|
55
|
+
prices: [number, number];
|
|
56
|
+
} | {
|
|
57
|
+
thresholds: [number, number];
|
|
58
|
+
prices: [number, number, number];
|
|
59
|
+
} | {
|
|
60
|
+
thresholds: [number, number, number];
|
|
61
|
+
prices: [number, number, number, number];
|
|
62
|
+
};
|
|
63
|
+
export type Blocks = Tuple<BlockAction, 8>;
|
|
64
|
+
export type TOUAction = number;
|
|
65
|
+
export type TOUs = TupleMinMax<TOUAction, 1, 48> | [];
|
|
66
|
+
export declare function scheduleSize(dp: DayProfile, ps: ProfileSchedule): number;
|
|
67
|
+
export interface Pricing {
|
|
68
|
+
/**
|
|
69
|
+
* positive integer
|
|
70
|
+
* */
|
|
71
|
+
standingCharge: number;
|
|
72
|
+
/**
|
|
73
|
+
* positive integer
|
|
74
|
+
*
|
|
75
|
+
* scale applied to standingCharge, e.g. 0 sets standingCharge to pounds and
|
|
76
|
+
* -2 sets standingCharge to pence.
|
|
77
|
+
*
|
|
78
|
+
* standingCharge * 10^standingChargeScale
|
|
79
|
+
*/
|
|
80
|
+
standingChargeScale: number;
|
|
81
|
+
/**
|
|
82
|
+
* positive integer
|
|
83
|
+
*
|
|
84
|
+
* scale applied to tou and block tariff elements, e.g. 0 sets to pounds and
|
|
85
|
+
* -2 sets to pence.
|
|
86
|
+
*/
|
|
87
|
+
priceScale: number;
|
|
88
|
+
}
|
|
89
|
+
export interface SpecialDay {
|
|
90
|
+
/**
|
|
91
|
+
* 4 digit year, or undefined for wildcard
|
|
92
|
+
*/
|
|
93
|
+
year?: number;
|
|
94
|
+
/**
|
|
95
|
+
* 1 = jan ... 12 = dec, or undefined for wildcard
|
|
96
|
+
*/
|
|
97
|
+
month?: number;
|
|
98
|
+
/**
|
|
99
|
+
* 1..31, or undefined for wildcard
|
|
100
|
+
*/
|
|
101
|
+
dayOfMonth?: number;
|
|
102
|
+
/**
|
|
103
|
+
* 1..7, or undefined for wildcard
|
|
104
|
+
*/
|
|
105
|
+
dayOfWeek?: number;
|
|
106
|
+
/**
|
|
107
|
+
* 1..16, index day profile
|
|
108
|
+
*/
|
|
109
|
+
dayProfile: number;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* 0 to 50 SpecialDays
|
|
113
|
+
*/
|
|
114
|
+
export type SpecialDays = SpecialDay[];
|
|
115
|
+
export interface Tariff {
|
|
116
|
+
seasons: Seasons;
|
|
117
|
+
weekProfiles: WeekProfiles;
|
|
118
|
+
dayProfiles: DayProfiles;
|
|
119
|
+
specialDays: SpecialDays;
|
|
120
|
+
blocks: Blocks;
|
|
121
|
+
tous: TOUs;
|
|
122
|
+
pricing: Pricing;
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=tariff.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tariff.dto.d.ts","sourceRoot":"","sources":["../src/tariff.dto.ts"],"names":[],"mappings":"AAmBA,MAAM,MAAM,KAAK,CACf,CAAC,EACD,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,IAChB,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AAItD,MAAM,MAAM,WAAW,CACrB,CAAC,EACD,GAAG,SAAS,MAAM,EAClB,GAAG,SAAS,MAAM,EAClB,CAAC,SAAS,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,IAC3B,GAAG,SAAS,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AAEzE,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB;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Y,CAAA;IAC1B,WAAW,EAAE,WAAW,CAAA;IACxB,WAAW,EAAE,WAAW,CAAA;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,IAAI,CAAA;IACV,OAAO,EAAE,OAAO,CAAA;CACjB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Created on Thu Jul 20 2023
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) 2023 Smart DCC Limited
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU General Public License
|
|
18
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.scheduleSize = void 0;
|
|
22
|
+
function scheduleSize(dp, ps) {
|
|
23
|
+
const start = Math.floor(ps.startTime / 1800);
|
|
24
|
+
let end = 48;
|
|
25
|
+
const i = dp.indexOf(ps);
|
|
26
|
+
if (i < 0) {
|
|
27
|
+
return 0;
|
|
28
|
+
}
|
|
29
|
+
if (dp.length > i + 1) {
|
|
30
|
+
end = Math.floor(dp[i + 1].startTime / 1800);
|
|
31
|
+
}
|
|
32
|
+
return end - start;
|
|
33
|
+
}
|
|
34
|
+
exports.scheduleSize = scheduleSize;
|
|
35
|
+
//# sourceMappingURL=tariff.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tariff.dto.js","sourceRoot":"","sources":["../src/tariff.dto.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAuGH,SAAgB,YAAY,CAAC,EAAc,EAAE,EAAmB;IAC9D,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,SAAS,GAAG,IAAI,CAAC,CAAA;IAC7C,IAAI,GAAG,GAAG,EAAE,CAAA;IAEZ,MAAM,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IACxB,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACV,OAAO,CAAC,CAAA;IACV,CAAC;IAED,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;QACtB,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC,CAAA;IAC9C,CAAC;IACD,OAAO,GAAG,GAAG,KAAK,CAAA;AACpB,CAAC;AAbD,oCAaC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { BlockAction, DayProfiles, NumberRange, Pricing, ProfileSchedule, Season, SpecialDay, SpecialDays, TOUs, Tariff, Tuple, TupleMinMax, WeekProfile, WeekProfiles } from './tariff.dto';
|
|
2
|
+
export declare function isTuple<T, N extends number, Q extends T[] = []>(x: unknown, n: N, isT: (x: unknown) => x is T): x is Tuple<T, N, Q>;
|
|
3
|
+
export declare function isTupleMinMax<T, Min extends number, Max extends number, Q extends T[] = Tuple<T, Min>>(x: unknown, min: Min, max: Max, isT: (x: unknown) => x is T): x is TupleMinMax<T, Min, Max, Q>;
|
|
4
|
+
export declare function isSeason(x: unknown): x is Season;
|
|
5
|
+
export declare const isSeasons: (x: unknown) => x is [Season] | [Season, Season] | [Season, Season, Season] | [Season, Season, Season, Season];
|
|
6
|
+
export declare function isNumberRange<N extends number>(x: unknown, n: N): x is NumberRange<N>;
|
|
7
|
+
export declare function isProfileSchedule(x: unknown): x is ProfileSchedule;
|
|
8
|
+
export declare const isDayProfile: (x: unknown) => x is [ProfileSchedule] | [ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule] | [ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule, ProfileSchedule];
|
|
9
|
+
export declare const isDayProfiles: (x: unknown) => x is DayProfiles;
|
|
10
|
+
export declare const isDayProfileName: (x: unknown) => x is 2 | 10 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | 16;
|
|
11
|
+
export declare const isWeekProfile: (x: unknown) => x is WeekProfile;
|
|
12
|
+
export declare const isWeekProfiles: (x: unknown) => x is WeekProfiles;
|
|
13
|
+
export declare function isBlockAction(x: unknown): x is BlockAction;
|
|
14
|
+
export declare const isBlocks: (x: unknown) => x is [BlockAction, BlockAction, BlockAction, BlockAction, BlockAction, BlockAction, BlockAction, BlockAction];
|
|
15
|
+
export declare const isTOUs: (x: unknown) => x is TOUs;
|
|
16
|
+
export declare function isPricing(x: unknown): x is Pricing;
|
|
17
|
+
export declare function isSpecialDay(x: unknown): x is SpecialDay;
|
|
18
|
+
export declare const isSpecialDays: (x: unknown) => x is SpecialDays;
|
|
19
|
+
export declare function isTariff(x: unknown): x is Tariff;
|
|
20
|
+
/**
|
|
21
|
+
* Determine if parameter is a valid tariff. This is a restriction on isTariff
|
|
22
|
+
* by also checking items which are not enforced by the type system.
|
|
23
|
+
*
|
|
24
|
+
* @param x a Tariff object
|
|
25
|
+
*/
|
|
26
|
+
export declare function isValidTariff(x: unknown): x is Tariff;
|
|
27
|
+
//# sourceMappingURL=tariff.is.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tariff.is.d.ts","sourceRoot":"","sources":["../src/tariff.is.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EACV,WAAW,EAIX,WAAW,EACX,WAAW,EACX,OAAO,EACP,eAAe,EACf,MAAM,EAEN,UAAU,EACV,WAAW,EACX,IAAI,EACJ,MAAM,EACN,KAAK,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACb,MAAM,cAAc,CAAA;AAErB,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,EAC7D,CAAC,EAAE,OAAO,EACV,CAAC,EAAE,CAAC,EACJ,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,IAAI,CAAC,GAC1B,CAAC,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAMrB;AAID,wBAAgB,aAAa,CAC3B,CAAC,EACD,GAAG,SAAS,MAAM,EAClB,GAAG,SAAS,MAAM,EAClB,CAAC,SAAS,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAE7B,CAAC,EAAE,OAAO,EACV,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,IAAI,CAAC,GAC1B,CAAC,IAAI,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAYlC;AAED,wBAAgB,QAAQ,CAAC,CAA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