@colijnit/ioneconnector 261.1.4 → 261.1.6
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/build/connector.d.ts +33 -33
- package/build/connector.js +79 -79
- package/build/connector.js.map +1 -1
- package/build/connector.unit.test.d.ts +1 -1
- package/build/connector.unit.test.js +108 -108
- package/build/enum/activate-user-account-status.enum.d.ts +6 -6
- package/build/enum/activate-user-account-status.enum.js +10 -10
- package/build/enum/activate-user-account-status.enum.js.map +1 -1
- package/build/enum/address-format.enum.d.ts +4 -4
- package/build/enum/address-format.enum.js +8 -8
- package/build/enum/address-format.enum.js.map +1 -1
- package/build/enum/backend-language-code.enum.d.ts +6 -6
- package/build/enum/backend-language-code.enum.js +10 -10
- package/build/enum/backend-language-code.enum.js.map +1 -1
- package/build/enum/backend-service-name.enum.d.ts +7 -7
- package/build/enum/backend-service-name.enum.js +11 -11
- package/build/enum/backend-service-name.enum.js.map +1 -1
- package/build/enum/communication-type.enum.d.ts +8 -8
- package/build/enum/communication-type.enum.js +12 -12
- package/build/enum/communication-type.enum.js.map +1 -1
- package/build/enum/datasession-service-method.enum.d.ts +13 -13
- package/build/enum/datasession-service-method.enum.js +17 -17
- package/build/enum/datasession-service-method.enum.js.map +1 -1
- package/build/enum/db-boolean-value-type.enum.d.ts +12 -12
- package/build/enum/db-boolean-value-type.enum.js +32 -32
- package/build/enum/db-boolean-value-type.enum.js.map +1 -1
- package/build/enum/end-point.enum.d.ts +4 -4
- package/build/enum/end-point.enum.js +8 -8
- package/build/enum/end-point.enum.js.map +1 -1
- package/build/enum/external-method.enum.d.ts +22 -22
- package/build/enum/external-method.enum.js +26 -26
- package/build/enum/external-method.enum.js.map +1 -1
- package/build/enum/file-type-internal.enum.d.ts +11 -11
- package/build/enum/file-type-internal.enum.js +15 -15
- package/build/enum/file-type-internal.enum.js.map +1 -1
- package/build/enum/file-type.enum.d.ts +5 -5
- package/build/enum/file-type.enum.js +9 -9
- package/build/enum/file-type.enum.js.map +1 -1
- package/build/enum/filter-type.enum.d.ts +4 -4
- package/build/enum/filter-type.enum.js +8 -8
- package/build/enum/filter-type.enum.js.map +1 -1
- package/build/enum/health-service-method.enum.d.ts +3 -3
- package/build/enum/health-service-method.enum.js +7 -7
- package/build/enum/health-service-method.enum.js.map +1 -1
- package/build/enum/language-code.enum.d.ts +7 -7
- package/build/enum/language-code.enum.js +11 -11
- package/build/enum/language-code.enum.js.map +1 -1
- package/build/enum/login-service-method.enum.d.ts +25 -25
- package/build/enum/login-service-method.enum.js +29 -29
- package/build/enum/login-service-method.enum.js.map +1 -1
- package/build/enum/login-status.enum.d.ts +20 -20
- package/build/enum/login-status.enum.js +24 -24
- package/build/enum/login-status.enum.js.map +1 -1
- package/build/enum/message-type.enum.d.ts +6 -6
- package/build/enum/message-type.enum.js +10 -10
- package/build/enum/message-type.enum.js.map +1 -1
- package/build/enum/object-config-kind.d.ts +9 -9
- package/build/enum/object-config-kind.js +13 -13
- package/build/enum/object-config-kind.js.map +1 -1
- package/build/enum/object-configuration-data-type.enum.d.ts +7 -7
- package/build/enum/object-configuration-data-type.enum.js +11 -11
- package/build/enum/object-configuration-data-type.enum.js.map +1 -1
- package/build/enum/object-configuration-value-type.enum.d.ts +10 -10
- package/build/enum/object-configuration-value-type.enum.js +14 -14
- package/build/enum/object-configuration-value-type.enum.js.map +1 -1
- package/build/enum/object-right-type.enum.d.ts +5 -5
- package/build/enum/object-right-type.enum.js +9 -9
- package/build/enum/object-right-type.enum.js.map +1 -1
- package/build/enum/one-zero-bool-db-type.enum.d.ts +5 -5
- package/build/enum/one-zero-bool-db-type.enum.js +20 -20
- package/build/enum/one-zero-bool-db-type.enum.js.map +1 -1
- package/build/enum/public-service-method.enum.d.ts +6 -5
- package/build/enum/public-service-method.enum.js +10 -9
- package/build/enum/public-service-method.enum.js.map +1 -1
- package/build/enum/reset-password-status.enum.d.ts +5 -5
- package/build/enum/reset-password-status.enum.js +9 -9
- package/build/enum/reset-password-status.enum.js.map +1 -1
- package/build/enum/screen-config-subcategory.enum.d.ts +2 -2
- package/build/enum/screen-config-subcategory.enum.js +2 -2
- package/build/enum/search-data-type.enum.d.ts +4 -4
- package/build/enum/search-data-type.enum.js +8 -8
- package/build/enum/search-data-type.enum.js.map +1 -1
- package/build/enum/search-property-state.enum.d.ts +5 -5
- package/build/enum/search-property-state.enum.js +9 -9
- package/build/enum/search-property-state.enum.js.map +1 -1
- package/build/enum/sort-direction.d.ts +5 -5
- package/build/enum/sort-direction.js +12 -12
- package/build/enum/sort-direction.js.map +1 -1
- package/build/enum/sort-type.enum.d.ts +6 -6
- package/build/enum/sort-type.enum.js +10 -10
- package/build/enum/sort-type.enum.js.map +1 -1
- package/build/enum/true-false-db-type.enum.d.ts +5 -5
- package/build/enum/true-false-db-type.enum.js +20 -20
- package/build/enum/true-false-db-type.enum.js.map +1 -1
- package/build/enum/user-info-service-method.enum.d.ts +3 -3
- package/build/enum/user-info-service-method.enum.js +7 -7
- package/build/enum/user-info-service-method.enum.js.map +1 -1
- package/build/enum/user-right-type.enum.d.ts +7 -7
- package/build/enum/user-right-type.enum.js +11 -11
- package/build/enum/user-right-type.enum.js.map +1 -1
- package/build/enum/user-role-type.enum.d.ts +17 -17
- package/build/enum/user-role-type.enum.js +21 -21
- package/build/enum/user-role-type.enum.js.map +1 -1
- package/build/enum/value-comparison-type.enum.d.ts +15 -15
- package/build/enum/value-comparison-type.enum.js +31 -31
- package/build/enum/value-comparison-type.enum.js.map +1 -1
- package/build/enum/yes-no-db-type.enum.d.ts +5 -5
- package/build/enum/yes-no-db-type.enum.js +20 -20
- package/build/enum/yes-no-db-type.enum.js.map +1 -1
- package/build/factory/business-object-serializer.d.ts +11 -11
- package/build/factory/business-object-serializer.js +145 -145
- package/build/factory/business-object-serializer.js.map +1 -1
- package/build/factory/decorators/bo-factory-step.decorator.d.ts +4 -4
- package/build/factory/decorators/bo-factory-step.decorator.js +16 -16
- package/build/factory/decorators/bo-factory-step.decorator.js.map +1 -1
- package/build/factory/decorators/bo-serializer-step.decorator.d.ts +4 -4
- package/build/factory/decorators/bo-serializer-step.decorator.js +16 -16
- package/build/factory/decorators/bo-serializer-step.decorator.js.map +1 -1
- package/build/factory/decorators/boolean.decorator.d.ts +12 -12
- package/build/factory/decorators/boolean.decorator.js +73 -73
- package/build/factory/decorators/boolean.decorator.js.map +1 -1
- package/build/factory/decorators/business-object-data.decorator.d.ts +23 -23
- package/build/factory/decorators/business-object-data.decorator.js +87 -87
- package/build/factory/decorators/business-object-data.decorator.js.map +1 -1
- package/build/factory/decorators/co-inject.decorator.d.ts +7 -7
- package/build/factory/decorators/co-inject.decorator.js +54 -54
- package/build/factory/decorators/co-inject.decorator.js.map +1 -1
- package/build/factory/decorators/complex-array.decorator.d.ts +6 -6
- package/build/factory/decorators/complex-array.decorator.js +37 -37
- package/build/factory/decorators/complex-array.decorator.js.map +1 -1
- package/build/factory/decorators/complex-field.decorator.d.ts +6 -6
- package/build/factory/decorators/complex-field.decorator.js +37 -37
- package/build/factory/decorators/complex-field.decorator.js.map +1 -1
- package/build/factory/decorators/date-field.decorator.d.ts +6 -6
- package/build/factory/decorators/date-field.decorator.js +27 -27
- package/build/factory/decorators/date-field.decorator.js.map +1 -1
- package/build/factory/decorators/db-field-alias.decorator.d.ts +6 -6
- package/build/factory/decorators/db-field-alias.decorator.js +40 -40
- package/build/factory/decorators/db-field-alias.decorator.js.map +1 -1
- package/build/factory/decorators/db-method-value.decorator.d.ts +5 -5
- package/build/factory/decorators/db-method-value.decorator.js +19 -19
- package/build/factory/decorators/db-method-value.decorator.js.map +1 -1
- package/build/factory/decorators/db-number.decorator.d.ts +6 -6
- package/build/factory/decorators/db-number.decorator.js +35 -35
- package/build/factory/decorators/db-number.decorator.js.map +1 -1
- package/build/factory/decorators/default-send-value.decorator.d.ts +7 -7
- package/build/factory/decorators/default-send-value.decorator.js +53 -53
- package/build/factory/decorators/default-send-value.decorator.js.map +1 -1
- package/build/factory/decorators/exclude-when-empty-string.decorator.d.ts +5 -5
- package/build/factory/decorators/exclude-when-empty-string.decorator.js +19 -19
- package/build/factory/decorators/exclude-when-empty-string.decorator.js.map +1 -1
- package/build/factory/decorators/json.decorator.d.ts +6 -6
- package/build/factory/decorators/json.decorator.js +26 -26
- package/build/factory/decorators/json.decorator.js.map +1 -1
- package/build/factory/decorators/map-property.decorator.d.ts +6 -6
- package/build/factory/decorators/map-property.decorator.js +29 -29
- package/build/factory/decorators/map-property.decorator.js.map +1 -1
- package/build/factory/decorators/no-db-field.decorator.d.ts +5 -5
- package/build/factory/decorators/no-db-field.decorator.js +34 -34
- package/build/factory/decorators/no-db-field.decorator.js.map +1 -1
- package/build/factory/decorators/number-string.decorator.d.ts +6 -6
- package/build/factory/decorators/number-string.decorator.js +23 -23
- package/build/factory/decorators/number-string.decorator.js.map +1 -1
- package/build/factory/decorators/simple-method-tag.decorator.d.ts +6 -6
- package/build/factory/decorators/simple-method-tag.decorator.js +31 -31
- package/build/factory/decorators/simple-method-tag.decorator.js.map +1 -1
- package/build/factory/decorators/simple-property-tag.decorator.d.ts +6 -6
- package/build/factory/decorators/simple-property-tag.decorator.js +38 -38
- package/build/factory/decorators/simple-property-tag.decorator.js.map +1 -1
- package/build/factory/decorators/string-number.decorator.d.ts +7 -7
- package/build/factory/decorators/string-number.decorator.js +30 -30
- package/build/factory/decorators/string-number.decorator.js.map +1 -1
- package/build/factory/decorators/validate.decorator.d.ts +11 -11
- package/build/factory/decorators/validate.decorator.js +55 -55
- package/build/factory/decorators/validate.decorator.js.map +1 -1
- package/build/interface/address-common-shape.interface.d.ts +14 -14
- package/build/interface/address-common-shape.interface.js +2 -2
- package/build/interface/authorized-axios-request-config.interface.d.ts +5 -0
- package/build/interface/authorized-axios-request-config.interface.js +3 -0
- package/build/interface/authorized-axios-request-config.interface.js.map +1 -0
- package/build/interface/business-object-data-shape.d.ts +19 -19
- package/build/interface/business-object-data-shape.js +2 -2
- package/build/interface/check-precision-and-scale-result.d.ts +4 -4
- package/build/interface/check-precision-and-scale-result.js +2 -2
- package/build/interface/check-within-stepped-bounds-result.d.ts +4 -4
- package/build/interface/check-within-stepped-bounds-result.js +2 -2
- package/build/interface/filter-property.d.ts +9 -9
- package/build/interface/filter-property.js +2 -2
- package/build/interface/login-storage-data.interface.d.ts +12 -12
- package/build/interface/login-storage-data.interface.js +2 -2
- package/build/interface/precision-scale-object.d.ts +4 -4
- package/build/interface/precision-scale-object.js +2 -2
- package/build/interface/search-property.d.ts +11 -11
- package/build/interface/search-property.js +2 -2
- package/build/interface/sort-property.d.ts +11 -11
- package/build/interface/sort-property.js +2 -2
- package/build/interface/text-part.d.ts +4 -4
- package/build/interface/text-part.js +2 -2
- package/build/interface/value-comparison-type-view-wrapper.d.ts +6 -6
- package/build/interface/value-comparison-type-view-wrapper.js +2 -2
- package/build/model/business-object.d.ts +13 -13
- package/build/model/business-object.js +34 -34
- package/build/model/company.bo.d.ts +9 -9
- package/build/model/company.bo.js +13 -13
- package/build/model/constant/java-constants.d.ts +2 -2
- package/build/model/constant/java-constants.js +5 -5
- package/build/model/country.bo.d.ts +11 -11
- package/build/model/country.bo.js +11 -11
- package/build/model/data-service-data.d.ts +15 -15
- package/build/model/data-service-data.js +6 -6
- package/build/model/data-service-response-data.d.ts +19 -19
- package/build/model/data-service-response-data.interface.d.ts +9 -9
- package/build/model/data-service-response-data.interface.js +2 -2
- package/build/model/data-service-response-data.js +57 -57
- package/build/model/data-service-response-data.js.map +1 -1
- package/build/model/data-service-response-exception.d.ts +29 -29
- package/build/model/data-service-response-exception.js +2 -2
- package/build/model/data-service-response-root.d.ts +7 -7
- package/build/model/data-service-response-root.js +2 -2
- package/build/model/default-all-scr-cfg-subcategory.d.ts +2 -2
- package/build/model/default-all-scr-cfg-subcategory.js +4 -4
- package/build/model/default-get-object-configurations-params.d.ts +2 -2
- package/build/model/default-get-object-configurations-params.js +5 -5
- package/build/model/field-validation.d.ts +11 -11
- package/build/model/field-validation.interface.d.ts +6 -6
- package/build/model/field-validation.interface.js +2 -2
- package/build/model/field-validation.js +76 -76
- package/build/model/field-validation.js.map +1 -1
- package/build/model/field-validations-object.d.ts +4 -4
- package/build/model/field-validations-object.interface.d.ts +4 -4
- package/build/model/field-validations-object.interface.js +2 -2
- package/build/model/field-validations-object.js +2 -2
- package/build/model/ione-local-storage-root-object.d.ts +5 -5
- package/build/model/ione-local-storage-root-object.js +9 -9
- package/build/model/keycloak-parameters.bo.d.ts +5 -5
- package/build/model/keycloak-parameters.bo.js +7 -7
- package/build/model/local-storage-root-object.d.ts +4 -4
- package/build/model/local-storage-root-object.js +9 -9
- package/build/model/local-storage-schema-object.d.ts +6 -6
- package/build/model/local-storage-schema-object.js +9 -9
- package/build/model/local-storage-user-object.d.ts +12 -11
- package/build/model/local-storage-user-object.js +9 -9
- package/build/model/local-storage-user-object.js.map +1 -1
- package/build/model/login-request.d.ts +17 -16
- package/build/model/login-request.interface.d.ts +12 -12
- package/build/model/login-request.interface.js +2 -2
- package/build/model/login-request.js +6 -6
- package/build/model/login-request.js.map +1 -1
- package/build/model/login-response.d.ts +36 -36
- package/build/model/login-response.interface.d.ts +22 -22
- package/build/model/login-response.interface.js +2 -2
- package/build/model/login-response.js +57 -57
- package/build/model/login-response.js.map +1 -1
- package/build/model/login-service-request-data.d.ts +17 -17
- package/build/model/login-service-request-data.js +2 -2
- package/build/model/login.d.ts +16 -16
- package/build/model/login.js +35 -35
- package/build/model/menu-content.bo.d.ts +13 -13
- package/build/model/menu-content.bo.js +13 -13
- package/build/model/object-configuration.d.ts +53 -53
- package/build/model/object-configuration.js +200 -200
- package/build/model/object-configuration.js.map +1 -1
- package/build/model/options.d.ts +29 -29
- package/build/model/options.js +16 -16
- package/build/model/paging-parameters.d.ts +15 -15
- package/build/model/paging-parameters.interface.d.ts +6 -6
- package/build/model/paging-parameters.interface.js +6 -6
- package/build/model/paging-parameters.js +37 -37
- package/build/model/paging-parameters.js.map +1 -1
- package/build/model/public-service-request-data.d.ts +5 -5
- package/build/model/public-service-request-data.js +2 -2
- package/build/model/server-response-data.d.ts +5 -5
- package/build/model/server-response-data.js +2 -2
- package/build/model/server-stack-trace-element.d.ts +7 -7
- package/build/model/server-stack-trace-element.js +2 -2
- package/build/model/session.d.ts +6 -6
- package/build/model/session.js +6 -6
- package/build/model/token-response.bo.d.ts +5 -5
- package/build/model/token-response.bo.js +7 -7
- package/build/model/user-parameters-values.bo.d.ts +8 -8
- package/build/model/user-parameters-values.bo.js +7 -7
- package/build/model/validation-message.d.ts +13 -13
- package/build/model/validation-message.interface.d.ts +6 -6
- package/build/model/validation-message.interface.js +2 -2
- package/build/model/validation-message.js +48 -48
- package/build/model/validation-message.js.map +1 -1
- package/build/model/validation-result.d.ts +34 -34
- package/build/model/validation-result.interface.d.ts +14 -14
- package/build/model/validation-result.interface.js +2 -2
- package/build/model/validation-result.js +192 -192
- package/build/model/validation-result.js.map +1 -1
- package/build/provider/ajax.service.d.ts +44 -38
- package/build/provider/ajax.service.js +435 -381
- package/build/provider/ajax.service.js.map +1 -1
- package/build/provider/base-backend-connection.service.d.ts +47 -47
- package/build/provider/base-backend-connection.service.js +187 -188
- package/build/provider/base-backend-connection.service.js.map +1 -1
- package/build/service/business-object-factory.d.ts +13 -13
- package/build/service/business-object-factory.js +235 -235
- package/build/service/business-object-factory.js.map +1 -1
- package/build/service/datasession.service.d.ts +9 -9
- package/build/service/datasession.service.js +26 -26
- package/build/service/datasession.service.js.map +1 -1
- package/build/service/encrypt.service.d.ts +6 -6
- package/build/service/encrypt.service.js +30 -30
- package/build/service/encrypt.service.js.map +1 -1
- package/build/service/encrypt.service.unit.test.d.ts +1 -1
- package/build/service/encrypt.service.unit.test.js +14 -14
- package/build/service/external-jwt-token.service.d.ts +8 -7
- package/build/service/external-jwt-token.service.js +21 -17
- package/build/service/external-jwt-token.service.js.map +1 -1
- package/build/service/health.service.d.ts +10 -10
- package/build/service/health.service.js +36 -34
- package/build/service/health.service.js.map +1 -1
- package/build/service/internal-jwt-token.service.d.ts +11 -8
- package/build/service/internal-jwt-token.service.js +57 -40
- package/build/service/internal-jwt-token.service.js.map +1 -1
- package/build/service/jwt-token.service.d.ts +15 -12
- package/build/service/jwt-token.service.js +45 -32
- package/build/service/jwt-token.service.js.map +1 -1
- package/build/service/local-storage.service.d.ts +39 -37
- package/build/service/local-storage.service.js +261 -248
- package/build/service/local-storage.service.js.map +1 -1
- package/build/service/login.service.d.ts +50 -50
- package/build/service/login.service.js +312 -321
- package/build/service/login.service.js.map +1 -1
- package/build/service/public.service.d.ts +12 -12
- package/build/service/public.service.js +33 -36
- package/build/service/public.service.js.map +1 -1
- package/build/service/storage.service.d.ts +35 -33
- package/build/service/storage.service.js +100 -94
- package/build/service/storage.service.js.map +1 -1
- package/build/service/user-info.service.d.ts +9 -9
- package/build/service/user-info.service.js +34 -33
- package/build/service/user-info.service.js.map +1 -1
- package/build/tests/int/connector.int.test.d.ts +1 -1
- package/build/tests/int/connector.int.test.js +12 -12
- package/build/type/business-object-id-type.d.ts +4 -4
- package/build/type/business-object-id-type.js +13 -13
- package/build/type/business-object-id-type.js.map +1 -1
- package/build/type/object-configuration-default-value-type.d.ts +1 -1
- package/build/type/object-configuration-default-value-type.js +2 -2
- package/build/utils/array-utils.d.ts +38 -38
- package/build/utils/array-utils.js +375 -375
- package/build/utils/array-utils.js.map +1 -1
- package/build/utils/business-object-utils.d.ts +20 -20
- package/build/utils/business-object-utils.js +198 -198
- package/build/utils/business-object-utils.js.map +1 -1
- package/build/utils/date-utils.d.ts +5 -5
- package/build/utils/date-utils.js +24 -24
- package/build/utils/date-utils.js.map +1 -1
- package/build/utils/file-utils.d.ts +6 -6
- package/build/utils/file-utils.js +66 -66
- package/build/utils/file-utils.js.map +1 -1
- package/build/utils/function/any-nill.function.d.ts +1 -1
- package/build/utils/function/any-nill.function.js +15 -16
- package/build/utils/function/any-nill.function.js.map +1 -1
- package/build/utils/function/is-nill.function.d.ts +1 -1
- package/build/utils/function/is-nill.function.js +6 -7
- package/build/utils/function/is-nill.function.js.map +1 -1
- package/build/utils/function/not-nill.function.d.ts +1 -1
- package/build/utils/function/not-nill.function.js +6 -7
- package/build/utils/function/not-nill.function.js.map +1 -1
- package/build/utils/function-utils.d.ts +4 -4
- package/build/utils/function-utils.js +31 -31
- package/build/utils/function-utils.js.map +1 -1
- package/build/utils/image-utils.d.ts +4 -4
- package/build/utils/image-utils.js +28 -28
- package/build/utils/image-utils.js.map +1 -1
- package/build/utils/map-utils.d.ts +4 -4
- package/build/utils/map-utils.js +31 -31
- package/build/utils/map-utils.js.map +1 -1
- package/build/utils/number-utils.d.ts +39 -39
- package/build/utils/number-utils.js +268 -268
- package/build/utils/number-utils.js.map +1 -1
- package/build/utils/object-utils.d.ts +21 -21
- package/build/utils/object-utils.js +247 -247
- package/build/utils/object-utils.js.map +1 -1
- package/build/utils/parameter-value-conversion-utils.d.ts +3 -3
- package/build/utils/parameter-value-conversion-utils.js +19 -19
- package/build/utils/parameter-value-conversion-utils.js.map +1 -1
- package/build/utils/promise-utils.d.ts +6 -6
- package/build/utils/promise-utils.js +22 -22
- package/build/utils/promise-utils.js.map +1 -1
- package/build/utils/ref-code-utils.d.ts +4 -4
- package/build/utils/ref-code-utils.js +19 -19
- package/build/utils/ref-code-utils.js.map +1 -1
- package/build/utils/sort-utils.d.ts +12 -12
- package/build/utils/sort-utils.js +120 -120
- package/build/utils/sort-utils.js.map +1 -1
- package/build/utils/string-utils.d.ts +25 -25
- package/build/utils/string-utils.js +212 -212
- package/build/utils/string-utils.js.map +1 -1
- package/build/utils/url-utils.d.ts +4 -4
- package/build/utils/url-utils.js +33 -33
- package/build/utils/url-utils.js.map +1 -1
- package/build/validators/communication-type.validator.d.ts +1 -1
- package/build/validators/communication-type.validator.js +15 -16
- package/build/validators/communication-type.validator.js.map +1 -1
- package/build/validators/email.validator.d.ts +2 -2
- package/build/validators/email.validator.js +8 -9
- package/build/validators/email.validator.js.map +1 -1
- package/build/validators/empty-address.validator.d.ts +3 -3
- package/build/validators/empty-address.validator.js +11 -12
- package/build/validators/empty-address.validator.js.map +1 -1
- package/build/validators/empty-array.validator.d.ts +2 -2
- package/build/validators/empty-array.validator.js +13 -14
- package/build/validators/empty-array.validator.js.map +1 -1
- package/build/validators/end-date-equal.validator.d.ts +1 -1
- package/build/validators/end-date-equal.validator.js +16 -17
- package/build/validators/end-date-equal.validator.js.map +1 -1
- package/build/validators/end-date.validator.d.ts +1 -1
- package/build/validators/end-date.validator.js +16 -17
- package/build/validators/end-date.validator.js.map +1 -1
- package/build/validators/equal.validator.d.ts +2 -2
- package/build/validators/equal.validator.js +13 -14
- package/build/validators/equal.validator.js.map +1 -1
- package/build/validators/max-string-length.validator.d.ts +2 -2
- package/build/validators/max-string-length.validator.js +12 -13
- package/build/validators/max-string-length.validator.js.map +1 -1
- package/build/validators/nl-post-code.validator.d.ts +3 -3
- package/build/validators/nl-post-code.validator.js +13 -14
- package/build/validators/nl-post-code.validator.js.map +1 -1
- package/build/validators/password.validator.d.ts +3 -3
- package/build/validators/password.validator.js +32 -33
- package/build/validators/password.validator.js.map +1 -1
- package/build/validators/postal-code-function.validator.d.ts +2 -2
- package/build/validators/postal-code-function.validator.js +18 -19
- package/build/validators/postal-code-function.validator.js.map +1 -1
- package/build/validators/postal-code.validator.d.ts +1 -1
- package/build/validators/postal-code.validator.js +20 -21
- package/build/validators/postal-code.validator.js.map +1 -1
- package/build/validators/precision-scale.validator.d.ts +2 -2
- package/build/validators/precision-scale.validator.js +13 -14
- package/build/validators/precision-scale.validator.js.map +1 -1
- package/build/validators/required.validator.d.ts +2 -2
- package/build/validators/required.validator.js +7 -8
- package/build/validators/required.validator.js.map +1 -1
- package/build/validators/social-security-number.validator.d.ts +2 -2
- package/build/validators/social-security-number.validator.js +27 -28
- package/build/validators/social-security-number.validator.js.map +1 -1
- package/build/validators/space-trim.validator.d.ts +2 -2
- package/build/validators/space-trim.validator.js +11 -12
- package/build/validators/space-trim.validator.js.map +1 -1
- package/build/validators/true.validator.d.ts +2 -2
- package/build/validators/true.validator.js +7 -8
- package/build/validators/true.validator.js.map +1 -1
- package/package.json +8 -8
|
@@ -1,236 +1,236 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BusinessObjectFactory = void 0;
|
|
4
|
-
const complex_field_decorator_1 = require("../factory/decorators/complex-field.decorator");
|
|
5
|
-
const complex_array_decorator_1 = require("../factory/decorators/complex-array.decorator");
|
|
6
|
-
const boolean_decorator_1 = require("../factory/decorators/boolean.decorator");
|
|
7
|
-
const date_field_decorator_1 = require("../factory/decorators/date-field.decorator");
|
|
8
|
-
const string_number_decorator_1 = require("../factory/decorators/string-number.decorator");
|
|
9
|
-
const is_nill_function_1 = require("../utils/function/is-nill.function");
|
|
10
|
-
const array_utils_1 = require("../utils/array-utils");
|
|
11
|
-
const business_object_1 = require("../model/business-object");
|
|
12
|
-
const map_property_decorator_1 = require("../factory/decorators/map-property.decorator");
|
|
13
|
-
const json_decorator_1 = require("../factory/decorators/json.decorator");
|
|
14
|
-
const number_utils_1 = require("../utils/number-utils");
|
|
15
|
-
const function_utils_1 = require("../utils/function-utils");
|
|
16
|
-
const exclude_when_empty_string_decorator_1 = require("../factory/decorators/exclude-when-empty-string.decorator");
|
|
17
|
-
const db_number_decorator_1 = require("../factory/decorators/db-number.decorator");
|
|
18
|
-
const number_string_decorator_1 = require("../factory/decorators/number-string.decorator");
|
|
19
|
-
const db_method_value_decorator_1 = require("../factory/decorators/db-method-value.decorator");
|
|
20
|
-
const bo_serializer_step_decorator_1 = require("../factory/decorators/bo-serializer-step.decorator");
|
|
21
|
-
const no_db_field_decorator_1 = require("../factory/decorators/no-db-field.decorator");
|
|
22
|
-
const db_field_alias_decorator_1 = require("../factory/decorators/db-field-alias.decorator");
|
|
23
|
-
const default_send_value_decorator_1 = require("../factory/decorators/default-send-value.decorator");
|
|
24
|
-
class BusinessObjectFactory {
|
|
25
|
-
constructor() {
|
|
26
|
-
this._recursionLimit = 90000000;
|
|
27
|
-
}
|
|
28
|
-
makeWithRawBackendData(modelClass, rawData) {
|
|
29
|
-
if (!modelClass) {
|
|
30
|
-
return undefined;
|
|
31
|
-
}
|
|
32
|
-
if (typeof modelClass !== typeof business_object_1.BusinessObject) {
|
|
33
|
-
return undefined;
|
|
34
|
-
}
|
|
35
|
-
const model = new modelClass();
|
|
36
|
-
this._copyAllPropertiesDecoratorProcessedFrom(rawData, model);
|
|
37
|
-
return model;
|
|
38
|
-
}
|
|
39
|
-
makeBOArrayFromRawBackendDataArray(modelClass, arrayOfRawDatas) {
|
|
40
|
-
if (!modelClass) {
|
|
41
|
-
return undefined;
|
|
42
|
-
}
|
|
43
|
-
const trueClientBos = [];
|
|
44
|
-
if (arrayOfRawDatas) {
|
|
45
|
-
for (let i = 0, len = arrayOfRawDatas.length; i < len; i++) {
|
|
46
|
-
trueClientBos.push(this.makeWithRawBackendData(modelClass, arrayOfRawDatas[i]));
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return trueClientBos;
|
|
50
|
-
}
|
|
51
|
-
instantiateNewBo(modelClass) {
|
|
52
|
-
return this.makeWithRawBackendData(modelClass, {});
|
|
53
|
-
}
|
|
54
|
-
prepareBusinessObjectForSend(sourceModel, recursionCur = 1) {
|
|
55
|
-
if ((0, is_nill_function_1.isNill)(sourceModel)) {
|
|
56
|
-
return undefined;
|
|
57
|
-
}
|
|
58
|
-
else if (recursionCur > this._recursionLimit) {
|
|
59
|
-
throw new Error("ERROR: BusinessObjectSerializerService.prepareBusinessObjectForSend: recursion limit of " + this._recursionLimit + " reached, server won't receive all the data from client!");
|
|
60
|
-
}
|
|
61
|
-
let sendObject = {};
|
|
62
|
-
if (number_utils_1.NumberUtils.IsNumber(sourceModel) || typeof sourceModel === "boolean" || typeof sourceModel === "string"
|
|
63
|
-
|| sourceModel instanceof Date) {
|
|
64
|
-
sendObject = sourceModel;
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
const customStepFunctionNames = bo_serializer_step_decorator_1.BoSerializerStepDecorator.GetDecoratedProperties(sourceModel);
|
|
68
|
-
if (customStepFunctionNames) {
|
|
69
|
-
customStepFunctionNames.forEach((customStepFnName) => {
|
|
70
|
-
function_utils_1.FunctionUtils.CallMethodIfExists(sourceModel[customStepFnName], sourceModel);
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
const sendProperties = this._getPropertiesOfModelToSendToDatabase(sourceModel);
|
|
74
|
-
for (let propIndex = 0, propsLen = sendProperties.length; propIndex < propsLen; propIndex++) {
|
|
75
|
-
const sendPropCur = sendProperties[propIndex];
|
|
76
|
-
if (exclude_when_empty_string_decorator_1.ExcludeWhenEmptyStringDecorator.IsExcludeWhenEmptyStringField(sourceModel, sendPropCur)) {
|
|
77
|
-
if (sourceModel[sendPropCur] === "") {
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
if (complex_field_decorator_1.ComplexFieldDecorator.IsComplexField(sourceModel, sendPropCur)) {
|
|
82
|
-
sendObject[sendPropCur] = this.prepareBusinessObjectForSend(sourceModel[sendPropCur], recursionCur);
|
|
83
|
-
recursionCur++;
|
|
84
|
-
}
|
|
85
|
-
else if (complex_array_decorator_1.ComplexArrayDecorator.IsComplexArray(sourceModel, sendPropCur)) {
|
|
86
|
-
sendObject[sendPropCur] = [];
|
|
87
|
-
for (let arrIndex = 0, arrLen = sourceModel[sendPropCur].length; arrIndex < arrLen; arrIndex++) {
|
|
88
|
-
sendObject[sendPropCur].push(this.prepareBusinessObjectForSend(sourceModel[sendPropCur][arrIndex], recursionCur));
|
|
89
|
-
recursionCur++;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
else if (boolean_decorator_1.BooleanTextDecorator.IsBooleanTextField(sourceModel, sendPropCur)) {
|
|
93
|
-
sendObject[sendPropCur] = boolean_decorator_1.BooleanTextDecorator.GetDbBooleanValue(sourceModel, sendPropCur);
|
|
94
|
-
}
|
|
95
|
-
else if (db_number_decorator_1.DbNumberDecorator.IsDbNumberField(sourceModel, sendPropCur)) {
|
|
96
|
-
sendObject[sendPropCur] = db_number_decorator_1.DbNumberDecorator.GetDbSafeNumberVal(sourceModel, sendPropCur);
|
|
97
|
-
}
|
|
98
|
-
else if (string_number_decorator_1.StringNumberDecorator.IsStringNumber(sourceModel, sendPropCur)) {
|
|
99
|
-
sendObject[sendPropCur] = string_number_decorator_1.StringNumberDecorator.NumberAsString(sourceModel[sendPropCur]);
|
|
100
|
-
}
|
|
101
|
-
else if (number_string_decorator_1.NumberStringDecorator.IsNumberString(sourceModel, sendPropCur)) {
|
|
102
|
-
sendObject[sendPropCur] = number_string_decorator_1.NumberStringDecorator.StringAsNumber(sourceModel[sendPropCur]);
|
|
103
|
-
}
|
|
104
|
-
else if (Array.isArray(sourceModel[sendPropCur])) {
|
|
105
|
-
sendObject[sendPropCur] = [];
|
|
106
|
-
for (let arrIndex = 0, arrLen = sourceModel[sendPropCur].length; arrIndex < arrLen; arrIndex++) {
|
|
107
|
-
sendObject[sendPropCur].push(sourceModel[sendPropCur][arrIndex]);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
sendObject[sendPropCur] = sourceModel[sendPropCur];
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
db_method_value_decorator_1.DbMethodValueDecorator.GetDecoratedProperties(sourceModel)
|
|
115
|
-
.filter(method => typeof sourceModel[method] === "function")
|
|
116
|
-
.forEach(method => sendObject[method] = sourceModel[method]());
|
|
117
|
-
this._ensureDefaultsSet(sourceModel, sendObject);
|
|
118
|
-
this._renameDbFieldAliases(sourceModel, sendObject);
|
|
119
|
-
}
|
|
120
|
-
return sendObject;
|
|
121
|
-
}
|
|
122
|
-
_copyAllPropertiesDecoratorProcessedFrom(sourceData, destinationModel) {
|
|
123
|
-
if (!sourceData || !destinationModel) {
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
for (let srcPropKey in sourceData) {
|
|
127
|
-
if (!sourceData.hasOwnProperty(srcPropKey)) {
|
|
128
|
-
continue;
|
|
129
|
-
}
|
|
130
|
-
let srcPropVal = sourceData[srcPropKey];
|
|
131
|
-
for (let prop in destinationModel) {
|
|
132
|
-
if (destinationModel.hasOwnProperty(prop)) {
|
|
133
|
-
if (map_property_decorator_1.MapPropertyDecorator.IsMapProperty(destinationModel, prop)) {
|
|
134
|
-
const destPropKeys = map_property_decorator_1.MapPropertyDecorator.GetMapProperty(destinationModel, prop).split(',');
|
|
135
|
-
const keyFound = destPropKeys.find(k => k.trim() === srcPropKey);
|
|
136
|
-
if (keyFound) {
|
|
137
|
-
srcPropKey = prop;
|
|
138
|
-
break;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
if (json_decorator_1.JsonFieldFieldDecorator.IsJsonField(destinationModel, srcPropKey)) {
|
|
144
|
-
srcPropVal = json_decorator_1.JsonFieldFieldDecorator.StringAsJson(srcPropVal);
|
|
145
|
-
}
|
|
146
|
-
if (complex_field_decorator_1.ComplexFieldDecorator.IsComplexField(destinationModel, srcPropKey)) {
|
|
147
|
-
const classOfField = complex_field_decorator_1.ComplexFieldDecorator.GetComplexFieldType(destinationModel, srcPropKey);
|
|
148
|
-
destinationModel[srcPropKey] = this.makeWithRawBackendData(classOfField, srcPropVal);
|
|
149
|
-
}
|
|
150
|
-
else if (complex_array_decorator_1.ComplexArrayDecorator.IsComplexArray(destinationModel, srcPropKey)) {
|
|
151
|
-
const sourceArray = srcPropVal;
|
|
152
|
-
if (!sourceArray) {
|
|
153
|
-
continue;
|
|
154
|
-
}
|
|
155
|
-
const classOfArrayItems = complex_array_decorator_1.ComplexArrayDecorator.GetComplexArrayType(destinationModel, srcPropKey);
|
|
156
|
-
const tempArray = [];
|
|
157
|
-
for (let i = 0, len = sourceArray.length; i < len; i++) {
|
|
158
|
-
tempArray.push(this.makeWithRawBackendData(classOfArrayItems, sourceArray[i]));
|
|
159
|
-
}
|
|
160
|
-
destinationModel[srcPropKey] = tempArray;
|
|
161
|
-
}
|
|
162
|
-
else if (boolean_decorator_1.BooleanTextDecorator.IsBooleanTextField(destinationModel, srcPropKey)) {
|
|
163
|
-
if (typeof srcPropVal === "boolean") {
|
|
164
|
-
destinationModel[srcPropKey] = srcPropVal;
|
|
165
|
-
}
|
|
166
|
-
else {
|
|
167
|
-
destinationModel[srcPropKey] = boolean_decorator_1.BooleanTextDecorator.GetLogicalBooleanValue(srcPropVal);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
else if (date_field_decorator_1.DateFieldFieldDecorator.IsDateField(destinationModel, srcPropKey)) {
|
|
171
|
-
destinationModel[srcPropKey] = date_field_decorator_1.DateFieldFieldDecorator.StringAsDate(srcPropVal);
|
|
172
|
-
}
|
|
173
|
-
else if (string_number_decorator_1.StringNumberDecorator.IsStringNumber(destinationModel, srcPropKey)) {
|
|
174
|
-
destinationModel[srcPropKey] = string_number_decorator_1.StringNumberDecorator.StringAsNumber(srcPropVal);
|
|
175
|
-
}
|
|
176
|
-
else {
|
|
177
|
-
if ((0, is_nill_function_1.isNill)(srcPropVal)) {
|
|
178
|
-
destinationModel[srcPropKey] = undefined;
|
|
179
|
-
}
|
|
180
|
-
else if (Array.isArray(srcPropVal)) {
|
|
181
|
-
destinationModel[srcPropKey] = array_utils_1.ArrayUtils.CloneArray(srcPropVal);
|
|
182
|
-
}
|
|
183
|
-
else if (typeof srcPropVal === "object") {
|
|
184
|
-
if (srcPropVal instanceof Map) {
|
|
185
|
-
destinationModel[srcPropKey] = srcPropVal;
|
|
186
|
-
}
|
|
187
|
-
else {
|
|
188
|
-
destinationModel[srcPropKey] = Object.assign({}, srcPropVal);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
else {
|
|
192
|
-
destinationModel[srcPropKey] = srcPropVal;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
_getPropertiesOfModelToSendToDatabase(model) {
|
|
198
|
-
let propertiesToSend;
|
|
199
|
-
const noDbProps = no_db_field_decorator_1.NoDatabaseFieldDecorator.GetDecoratedProperties(model);
|
|
200
|
-
propertiesToSend = Object.getOwnPropertyNames(model).filter((prop) => {
|
|
201
|
-
return (model.hasOwnProperty(prop) && noDbProps.indexOf(prop) === -1);
|
|
202
|
-
});
|
|
203
|
-
const dbFieldAliasProps = db_field_alias_decorator_1.DbFieldAliasDecorator.GetDecoratedProperties(model);
|
|
204
|
-
const len = dbFieldAliasProps.length;
|
|
205
|
-
for (let i = 0; i < len; i++) {
|
|
206
|
-
const aliasPropCur = dbFieldAliasProps[i];
|
|
207
|
-
if (propertiesToSend.indexOf(aliasPropCur) === -1) {
|
|
208
|
-
propertiesToSend.push(aliasPropCur);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
return propertiesToSend;
|
|
212
|
-
}
|
|
213
|
-
_ensureDefaultsSet(sourceModel, sendObject) {
|
|
214
|
-
const defaultProps = default_send_value_decorator_1.DefaultSendValueDecorator.GetAllDecoratedProperties(sourceModel);
|
|
215
|
-
const len = defaultProps.length;
|
|
216
|
-
for (let i = 0; i < len; i++) {
|
|
217
|
-
const defaultPropCur = defaultProps[i];
|
|
218
|
-
if ((0, is_nill_function_1.isNill)(sourceModel[defaultPropCur])) {
|
|
219
|
-
sendObject[defaultPropCur] = default_send_value_decorator_1.DefaultSendValueDecorator.GetDefaultValue(sourceModel, defaultPropCur);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
_renameDbFieldAliases(sourceModel, sendObject) {
|
|
224
|
-
const aliasProps = db_field_alias_decorator_1.DbFieldAliasDecorator.GetDecoratedProperties(sourceModel);
|
|
225
|
-
const len = aliasProps.length;
|
|
226
|
-
for (let i = 0; i < len; i++) {
|
|
227
|
-
const aliasPropCur = aliasProps[i];
|
|
228
|
-
const aliasName = db_field_alias_decorator_1.DbFieldAliasDecorator.GetDbAlias(sourceModel, aliasPropCur);
|
|
229
|
-
const value = sendObject[aliasPropCur];
|
|
230
|
-
delete sendObject[aliasPropCur];
|
|
231
|
-
sendObject[aliasName] = value;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
exports.BusinessObjectFactory = BusinessObjectFactory;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BusinessObjectFactory = void 0;
|
|
4
|
+
const complex_field_decorator_1 = require("../factory/decorators/complex-field.decorator");
|
|
5
|
+
const complex_array_decorator_1 = require("../factory/decorators/complex-array.decorator");
|
|
6
|
+
const boolean_decorator_1 = require("../factory/decorators/boolean.decorator");
|
|
7
|
+
const date_field_decorator_1 = require("../factory/decorators/date-field.decorator");
|
|
8
|
+
const string_number_decorator_1 = require("../factory/decorators/string-number.decorator");
|
|
9
|
+
const is_nill_function_1 = require("../utils/function/is-nill.function");
|
|
10
|
+
const array_utils_1 = require("../utils/array-utils");
|
|
11
|
+
const business_object_1 = require("../model/business-object");
|
|
12
|
+
const map_property_decorator_1 = require("../factory/decorators/map-property.decorator");
|
|
13
|
+
const json_decorator_1 = require("../factory/decorators/json.decorator");
|
|
14
|
+
const number_utils_1 = require("../utils/number-utils");
|
|
15
|
+
const function_utils_1 = require("../utils/function-utils");
|
|
16
|
+
const exclude_when_empty_string_decorator_1 = require("../factory/decorators/exclude-when-empty-string.decorator");
|
|
17
|
+
const db_number_decorator_1 = require("../factory/decorators/db-number.decorator");
|
|
18
|
+
const number_string_decorator_1 = require("../factory/decorators/number-string.decorator");
|
|
19
|
+
const db_method_value_decorator_1 = require("../factory/decorators/db-method-value.decorator");
|
|
20
|
+
const bo_serializer_step_decorator_1 = require("../factory/decorators/bo-serializer-step.decorator");
|
|
21
|
+
const no_db_field_decorator_1 = require("../factory/decorators/no-db-field.decorator");
|
|
22
|
+
const db_field_alias_decorator_1 = require("../factory/decorators/db-field-alias.decorator");
|
|
23
|
+
const default_send_value_decorator_1 = require("../factory/decorators/default-send-value.decorator");
|
|
24
|
+
class BusinessObjectFactory {
|
|
25
|
+
constructor() {
|
|
26
|
+
this._recursionLimit = 90000000;
|
|
27
|
+
}
|
|
28
|
+
makeWithRawBackendData(modelClass, rawData) {
|
|
29
|
+
if (!modelClass) {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
if (typeof modelClass !== typeof business_object_1.BusinessObject) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
const model = new modelClass();
|
|
36
|
+
this._copyAllPropertiesDecoratorProcessedFrom(rawData, model);
|
|
37
|
+
return model;
|
|
38
|
+
}
|
|
39
|
+
makeBOArrayFromRawBackendDataArray(modelClass, arrayOfRawDatas) {
|
|
40
|
+
if (!modelClass) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
const trueClientBos = [];
|
|
44
|
+
if (arrayOfRawDatas) {
|
|
45
|
+
for (let i = 0, len = arrayOfRawDatas.length; i < len; i++) {
|
|
46
|
+
trueClientBos.push(this.makeWithRawBackendData(modelClass, arrayOfRawDatas[i]));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return trueClientBos;
|
|
50
|
+
}
|
|
51
|
+
instantiateNewBo(modelClass) {
|
|
52
|
+
return this.makeWithRawBackendData(modelClass, {});
|
|
53
|
+
}
|
|
54
|
+
prepareBusinessObjectForSend(sourceModel, recursionCur = 1) {
|
|
55
|
+
if ((0, is_nill_function_1.isNill)(sourceModel)) {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
else if (recursionCur > this._recursionLimit) {
|
|
59
|
+
throw new Error("ERROR: BusinessObjectSerializerService.prepareBusinessObjectForSend: recursion limit of " + this._recursionLimit + " reached, server won't receive all the data from client!");
|
|
60
|
+
}
|
|
61
|
+
let sendObject = {};
|
|
62
|
+
if (number_utils_1.NumberUtils.IsNumber(sourceModel) || typeof sourceModel === "boolean" || typeof sourceModel === "string"
|
|
63
|
+
|| sourceModel instanceof Date) {
|
|
64
|
+
sendObject = sourceModel;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
const customStepFunctionNames = bo_serializer_step_decorator_1.BoSerializerStepDecorator.GetDecoratedProperties(sourceModel);
|
|
68
|
+
if (customStepFunctionNames) {
|
|
69
|
+
customStepFunctionNames.forEach((customStepFnName) => {
|
|
70
|
+
function_utils_1.FunctionUtils.CallMethodIfExists(sourceModel[customStepFnName], sourceModel);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
const sendProperties = this._getPropertiesOfModelToSendToDatabase(sourceModel);
|
|
74
|
+
for (let propIndex = 0, propsLen = sendProperties.length; propIndex < propsLen; propIndex++) {
|
|
75
|
+
const sendPropCur = sendProperties[propIndex];
|
|
76
|
+
if (exclude_when_empty_string_decorator_1.ExcludeWhenEmptyStringDecorator.IsExcludeWhenEmptyStringField(sourceModel, sendPropCur)) {
|
|
77
|
+
if (sourceModel[sendPropCur] === "") {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if (complex_field_decorator_1.ComplexFieldDecorator.IsComplexField(sourceModel, sendPropCur)) {
|
|
82
|
+
sendObject[sendPropCur] = this.prepareBusinessObjectForSend(sourceModel[sendPropCur], recursionCur);
|
|
83
|
+
recursionCur++;
|
|
84
|
+
}
|
|
85
|
+
else if (complex_array_decorator_1.ComplexArrayDecorator.IsComplexArray(sourceModel, sendPropCur)) {
|
|
86
|
+
sendObject[sendPropCur] = [];
|
|
87
|
+
for (let arrIndex = 0, arrLen = sourceModel[sendPropCur].length; arrIndex < arrLen; arrIndex++) {
|
|
88
|
+
sendObject[sendPropCur].push(this.prepareBusinessObjectForSend(sourceModel[sendPropCur][arrIndex], recursionCur));
|
|
89
|
+
recursionCur++;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
else if (boolean_decorator_1.BooleanTextDecorator.IsBooleanTextField(sourceModel, sendPropCur)) {
|
|
93
|
+
sendObject[sendPropCur] = boolean_decorator_1.BooleanTextDecorator.GetDbBooleanValue(sourceModel, sendPropCur);
|
|
94
|
+
}
|
|
95
|
+
else if (db_number_decorator_1.DbNumberDecorator.IsDbNumberField(sourceModel, sendPropCur)) {
|
|
96
|
+
sendObject[sendPropCur] = db_number_decorator_1.DbNumberDecorator.GetDbSafeNumberVal(sourceModel, sendPropCur);
|
|
97
|
+
}
|
|
98
|
+
else if (string_number_decorator_1.StringNumberDecorator.IsStringNumber(sourceModel, sendPropCur)) {
|
|
99
|
+
sendObject[sendPropCur] = string_number_decorator_1.StringNumberDecorator.NumberAsString(sourceModel[sendPropCur]);
|
|
100
|
+
}
|
|
101
|
+
else if (number_string_decorator_1.NumberStringDecorator.IsNumberString(sourceModel, sendPropCur)) {
|
|
102
|
+
sendObject[sendPropCur] = number_string_decorator_1.NumberStringDecorator.StringAsNumber(sourceModel[sendPropCur]);
|
|
103
|
+
}
|
|
104
|
+
else if (Array.isArray(sourceModel[sendPropCur])) {
|
|
105
|
+
sendObject[sendPropCur] = [];
|
|
106
|
+
for (let arrIndex = 0, arrLen = sourceModel[sendPropCur].length; arrIndex < arrLen; arrIndex++) {
|
|
107
|
+
sendObject[sendPropCur].push(sourceModel[sendPropCur][arrIndex]);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
sendObject[sendPropCur] = sourceModel[sendPropCur];
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
db_method_value_decorator_1.DbMethodValueDecorator.GetDecoratedProperties(sourceModel)
|
|
115
|
+
.filter(method => typeof sourceModel[method] === "function")
|
|
116
|
+
.forEach(method => sendObject[method] = sourceModel[method]());
|
|
117
|
+
this._ensureDefaultsSet(sourceModel, sendObject);
|
|
118
|
+
this._renameDbFieldAliases(sourceModel, sendObject);
|
|
119
|
+
}
|
|
120
|
+
return sendObject;
|
|
121
|
+
}
|
|
122
|
+
_copyAllPropertiesDecoratorProcessedFrom(sourceData, destinationModel) {
|
|
123
|
+
if (!sourceData || !destinationModel) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
for (let srcPropKey in sourceData) {
|
|
127
|
+
if (!sourceData.hasOwnProperty(srcPropKey)) {
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
let srcPropVal = sourceData[srcPropKey];
|
|
131
|
+
for (let prop in destinationModel) {
|
|
132
|
+
if (destinationModel.hasOwnProperty(prop)) {
|
|
133
|
+
if (map_property_decorator_1.MapPropertyDecorator.IsMapProperty(destinationModel, prop)) {
|
|
134
|
+
const destPropKeys = map_property_decorator_1.MapPropertyDecorator.GetMapProperty(destinationModel, prop).split(',');
|
|
135
|
+
const keyFound = destPropKeys.find(k => k.trim() === srcPropKey);
|
|
136
|
+
if (keyFound) {
|
|
137
|
+
srcPropKey = prop;
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
if (json_decorator_1.JsonFieldFieldDecorator.IsJsonField(destinationModel, srcPropKey)) {
|
|
144
|
+
srcPropVal = json_decorator_1.JsonFieldFieldDecorator.StringAsJson(srcPropVal);
|
|
145
|
+
}
|
|
146
|
+
if (complex_field_decorator_1.ComplexFieldDecorator.IsComplexField(destinationModel, srcPropKey)) {
|
|
147
|
+
const classOfField = complex_field_decorator_1.ComplexFieldDecorator.GetComplexFieldType(destinationModel, srcPropKey);
|
|
148
|
+
destinationModel[srcPropKey] = this.makeWithRawBackendData(classOfField, srcPropVal);
|
|
149
|
+
}
|
|
150
|
+
else if (complex_array_decorator_1.ComplexArrayDecorator.IsComplexArray(destinationModel, srcPropKey)) {
|
|
151
|
+
const sourceArray = srcPropVal;
|
|
152
|
+
if (!sourceArray) {
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
const classOfArrayItems = complex_array_decorator_1.ComplexArrayDecorator.GetComplexArrayType(destinationModel, srcPropKey);
|
|
156
|
+
const tempArray = [];
|
|
157
|
+
for (let i = 0, len = sourceArray.length; i < len; i++) {
|
|
158
|
+
tempArray.push(this.makeWithRawBackendData(classOfArrayItems, sourceArray[i]));
|
|
159
|
+
}
|
|
160
|
+
destinationModel[srcPropKey] = tempArray;
|
|
161
|
+
}
|
|
162
|
+
else if (boolean_decorator_1.BooleanTextDecorator.IsBooleanTextField(destinationModel, srcPropKey)) {
|
|
163
|
+
if (typeof srcPropVal === "boolean") {
|
|
164
|
+
destinationModel[srcPropKey] = srcPropVal;
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
destinationModel[srcPropKey] = boolean_decorator_1.BooleanTextDecorator.GetLogicalBooleanValue(srcPropVal);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
else if (date_field_decorator_1.DateFieldFieldDecorator.IsDateField(destinationModel, srcPropKey)) {
|
|
171
|
+
destinationModel[srcPropKey] = date_field_decorator_1.DateFieldFieldDecorator.StringAsDate(srcPropVal);
|
|
172
|
+
}
|
|
173
|
+
else if (string_number_decorator_1.StringNumberDecorator.IsStringNumber(destinationModel, srcPropKey)) {
|
|
174
|
+
destinationModel[srcPropKey] = string_number_decorator_1.StringNumberDecorator.StringAsNumber(srcPropVal);
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
if ((0, is_nill_function_1.isNill)(srcPropVal)) {
|
|
178
|
+
destinationModel[srcPropKey] = undefined;
|
|
179
|
+
}
|
|
180
|
+
else if (Array.isArray(srcPropVal)) {
|
|
181
|
+
destinationModel[srcPropKey] = array_utils_1.ArrayUtils.CloneArray(srcPropVal);
|
|
182
|
+
}
|
|
183
|
+
else if (typeof srcPropVal === "object") {
|
|
184
|
+
if (srcPropVal instanceof Map) {
|
|
185
|
+
destinationModel[srcPropKey] = srcPropVal;
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
destinationModel[srcPropKey] = Object.assign({}, srcPropVal);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
destinationModel[srcPropKey] = srcPropVal;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
_getPropertiesOfModelToSendToDatabase(model) {
|
|
198
|
+
let propertiesToSend;
|
|
199
|
+
const noDbProps = no_db_field_decorator_1.NoDatabaseFieldDecorator.GetDecoratedProperties(model);
|
|
200
|
+
propertiesToSend = Object.getOwnPropertyNames(model).filter((prop) => {
|
|
201
|
+
return (model.hasOwnProperty(prop) && noDbProps.indexOf(prop) === -1);
|
|
202
|
+
});
|
|
203
|
+
const dbFieldAliasProps = db_field_alias_decorator_1.DbFieldAliasDecorator.GetDecoratedProperties(model);
|
|
204
|
+
const len = dbFieldAliasProps.length;
|
|
205
|
+
for (let i = 0; i < len; i++) {
|
|
206
|
+
const aliasPropCur = dbFieldAliasProps[i];
|
|
207
|
+
if (propertiesToSend.indexOf(aliasPropCur) === -1) {
|
|
208
|
+
propertiesToSend.push(aliasPropCur);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return propertiesToSend;
|
|
212
|
+
}
|
|
213
|
+
_ensureDefaultsSet(sourceModel, sendObject) {
|
|
214
|
+
const defaultProps = default_send_value_decorator_1.DefaultSendValueDecorator.GetAllDecoratedProperties(sourceModel);
|
|
215
|
+
const len = defaultProps.length;
|
|
216
|
+
for (let i = 0; i < len; i++) {
|
|
217
|
+
const defaultPropCur = defaultProps[i];
|
|
218
|
+
if ((0, is_nill_function_1.isNill)(sourceModel[defaultPropCur])) {
|
|
219
|
+
sendObject[defaultPropCur] = default_send_value_decorator_1.DefaultSendValueDecorator.GetDefaultValue(sourceModel, defaultPropCur);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
_renameDbFieldAliases(sourceModel, sendObject) {
|
|
224
|
+
const aliasProps = db_field_alias_decorator_1.DbFieldAliasDecorator.GetDecoratedProperties(sourceModel);
|
|
225
|
+
const len = aliasProps.length;
|
|
226
|
+
for (let i = 0; i < len; i++) {
|
|
227
|
+
const aliasPropCur = aliasProps[i];
|
|
228
|
+
const aliasName = db_field_alias_decorator_1.DbFieldAliasDecorator.GetDbAlias(sourceModel, aliasPropCur);
|
|
229
|
+
const value = sendObject[aliasPropCur];
|
|
230
|
+
delete sendObject[aliasPropCur];
|
|
231
|
+
sendObject[aliasName] = value;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
exports.BusinessObjectFactory = BusinessObjectFactory;
|
|
236
236
|
//# sourceMappingURL=business-object-factory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business-object-factory.js","sourceRoot":"","sources":["../../src/service/business-object-factory.ts"],"names":[],"mappings":";;;AAAA,2FAAoF;AACpF,2FAAoF;AACpF,+EAA6E;AAC7E,qFAAmF;AACnF,2FAAoF;AACpF,yEAA0D;AAC1D,sDAAgD;AAChD,8DAAwD;AACxD,yFAAkF;AAClF,yEAA6E;AAC7E,wDAAkD;AAClD,4DAAsD;AACtD,mHAA0G;AAC1G,mFAA4E;AAC5E,2FAAoF;AACpF,+FAAuF;AACvF,qGAA6F;AAC7F,uFAAqF;AACrF,6FAAqF;AACrF,qGAA6F;AAG7F,MAAa,qBAAqB;IAE9B;QADiB,oBAAe,GAAW,QAAQ,CAAC;IAEpD,CAAC;IAUM,sBAAsB,CAAC,UAAe,EAAE,OAAe;QAC1D,IAAI,CAAC,UAAU,EAAE;
|
|
1
|
+
{"version":3,"file":"business-object-factory.js","sourceRoot":"","sources":["../../src/service/business-object-factory.ts"],"names":[],"mappings":";;;AAAA,2FAAoF;AACpF,2FAAoF;AACpF,+EAA6E;AAC7E,qFAAmF;AACnF,2FAAoF;AACpF,yEAA0D;AAC1D,sDAAgD;AAChD,8DAAwD;AACxD,yFAAkF;AAClF,yEAA6E;AAC7E,wDAAkD;AAClD,4DAAsD;AACtD,mHAA0G;AAC1G,mFAA4E;AAC5E,2FAAoF;AACpF,+FAAuF;AACvF,qGAA6F;AAC7F,uFAAqF;AACrF,6FAAqF;AACrF,qGAA6F;AAG7F,MAAa,qBAAqB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hQD,sDAgQC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { BaseBackendConnectionService } from "../provider/base-backend-connection.service";
|
|
2
|
-
import { ServerResponseData } from "../model/server-response-data";
|
|
3
|
-
export declare class DatasessionService {
|
|
4
|
-
protected backendConnection: BaseBackendConnectionService;
|
|
5
|
-
constructor(backendConnection: BaseBackendConnectionService);
|
|
6
|
-
createDataSession(id: string): Promise<ServerResponseData>;
|
|
7
|
-
commit(): Promise<ServerResponseData>;
|
|
8
|
-
private _call;
|
|
9
|
-
}
|
|
1
|
+
import { BaseBackendConnectionService } from "../provider/base-backend-connection.service";
|
|
2
|
+
import { ServerResponseData } from "../model/server-response-data";
|
|
3
|
+
export declare class DatasessionService {
|
|
4
|
+
protected backendConnection: BaseBackendConnectionService;
|
|
5
|
+
constructor(backendConnection: BaseBackendConnectionService);
|
|
6
|
+
createDataSession(id: string): Promise<ServerResponseData>;
|
|
7
|
+
commit(): Promise<ServerResponseData>;
|
|
8
|
+
private _call;
|
|
9
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DatasessionService = void 0;
|
|
4
|
-
const backend_service_name_enum_1 = require("../enum/backend-service-name.enum");
|
|
5
|
-
const datasession_service_method_enum_1 = require("../enum/datasession-service-method.enum");
|
|
6
|
-
class DatasessionService {
|
|
7
|
-
constructor(backendConnection) {
|
|
8
|
-
this.backendConnection = backendConnection;
|
|
9
|
-
}
|
|
10
|
-
createDataSession(id) {
|
|
11
|
-
return this._call(datasession_service_method_enum_1.DatasessionServiceMethod.OpenDataSession, { moduleName: id }, true);
|
|
12
|
-
}
|
|
13
|
-
async commit() {
|
|
14
|
-
return await this._call(datasession_service_method_enum_1.DatasessionServiceMethod.Commit, {}, false);
|
|
15
|
-
}
|
|
16
|
-
_call(method, data, showLoader) {
|
|
17
|
-
if (data === undefined) {
|
|
18
|
-
data = {};
|
|
19
|
-
}
|
|
20
|
-
if (showLoader === undefined) {
|
|
21
|
-
showLoader = true;
|
|
22
|
-
}
|
|
23
|
-
return this.backendConnection.call(method, data, showLoader, backend_service_name_enum_1.BackendServiceName.DatasessionService);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.DatasessionService = DatasessionService;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DatasessionService = void 0;
|
|
4
|
+
const backend_service_name_enum_1 = require("../enum/backend-service-name.enum");
|
|
5
|
+
const datasession_service_method_enum_1 = require("../enum/datasession-service-method.enum");
|
|
6
|
+
class DatasessionService {
|
|
7
|
+
constructor(backendConnection) {
|
|
8
|
+
this.backendConnection = backendConnection;
|
|
9
|
+
}
|
|
10
|
+
createDataSession(id) {
|
|
11
|
+
return this._call(datasession_service_method_enum_1.DatasessionServiceMethod.OpenDataSession, { moduleName: id }, true);
|
|
12
|
+
}
|
|
13
|
+
async commit() {
|
|
14
|
+
return await this._call(datasession_service_method_enum_1.DatasessionServiceMethod.Commit, {}, false);
|
|
15
|
+
}
|
|
16
|
+
_call(method, data, showLoader) {
|
|
17
|
+
if (data === undefined) {
|
|
18
|
+
data = {};
|
|
19
|
+
}
|
|
20
|
+
if (showLoader === undefined) {
|
|
21
|
+
showLoader = true;
|
|
22
|
+
}
|
|
23
|
+
return this.backendConnection.call(method, data, showLoader, backend_service_name_enum_1.BackendServiceName.DatasessionService);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.DatasessionService = DatasessionService;
|
|
27
27
|
//# sourceMappingURL=datasession.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datasession.service.js","sourceRoot":"","sources":["../../src/service/datasession.service.ts"],"names":[],"mappings":";;;AAAA,iFAAqE;AAErE,6FAAiF;AAIjF,MAAa,kBAAkB;IAI3B,YAAY,iBAA+C;QACvD,IAAI,CAAC,iBAAiB,GAAG,iBAAi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B,CAAC,CAAC;IACxG,CAAC;CACJ;AAzBD,gDAyBC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare class EncryptService {
|
|
2
|
-
private rsa;
|
|
3
|
-
constructor();
|
|
4
|
-
set publicKey(key: string);
|
|
5
|
-
encRsa(stringToEncrypt: string): string;
|
|
6
|
-
}
|
|
1
|
+
export declare class EncryptService {
|
|
2
|
+
private rsa;
|
|
3
|
+
constructor();
|
|
4
|
+
set publicKey(key: string);
|
|
5
|
+
encRsa(stringToEncrypt: string): string;
|
|
6
|
+
}
|