@colijnit/ioneconnector 262.1.0 → 262.1.2
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 +5 -5
- package/build/enum/public-service-method.enum.js +9 -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 +186 -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 +311 -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 +9 -9
|
@@ -1,382 +1,436 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AjaxService = void 0;
|
|
4
|
-
const backend_service_name_enum_1 = require("../enum/backend-service-name.enum");
|
|
5
|
-
const base_backend_connection_service_1 = require("./base-backend-connection.service");
|
|
6
|
-
const axios_1 = require("axios");
|
|
7
|
-
const url_utils_1 = require("../utils/url-utils");
|
|
8
|
-
const datasession_service_method_enum_1 = require("../enum/datasession-service-method.enum");
|
|
9
|
-
const end_point_enum_1 = require("../enum/end-point.enum");
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
this.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
window.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if (
|
|
60
|
-
const publicLogin = new login_response_1.LoginResponse();
|
|
61
|
-
publicLogin.loginStatus =
|
|
62
|
-
return publicLogin;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return this.storageService.localLoginResponse;
|
|
81
|
-
}
|
|
82
|
-
try {
|
|
83
|
-
if (this.storageService.schema !== this.storageService.localLoginResponse.upId.toString()) {
|
|
84
|
-
this.storageService.schema = this.storageService.localLoginResponse.upId.toString();
|
|
85
|
-
}
|
|
86
|
-
if (this.storageService.username !== this.storageService.localLoginResponse.userName) {
|
|
87
|
-
this.storageService.username = this.storageService.localLoginResponse.userName;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
catch (e) {
|
|
91
|
-
}
|
|
92
|
-
return this.storageService.localLoginResponse;
|
|
93
|
-
}
|
|
94
|
-
response = await this.checkAndPrepareKeycloak();
|
|
95
|
-
if (response) {
|
|
96
|
-
return response;
|
|
97
|
-
}
|
|
98
|
-
response = await this._nativeLogin(url, schema, version);
|
|
99
|
-
return response;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
hasSession() {
|
|
103
|
-
return this.storageService.localSessionId !== undefined;
|
|
104
|
-
}
|
|
105
|
-
getSessionId() {
|
|
106
|
-
return this.storageService.localSessionId;
|
|
107
|
-
}
|
|
108
|
-
getDataSessionId() {
|
|
109
|
-
return this.storageService.localDataSessionId;
|
|
110
|
-
}
|
|
111
|
-
isPublicSession() {
|
|
112
|
-
return this.usePublicToken;
|
|
113
|
-
}
|
|
114
|
-
async call(method, data = {}, showLoader = true, service = undefined, endPoint = end_point_enum_1.EndPoint.AjaxService, isPublicService = false, ownMessage, url) {
|
|
115
|
-
if (!service) {
|
|
116
|
-
if (!this.usePublicToken) {
|
|
117
|
-
service = backend_service_name_enum_1.BackendServiceName.LoginService;
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
service = backend_service_name_enum_1.BackendServiceName.PublicService;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
if (this.usePublicToken || (service === backend_service_name_enum_1.BackendServiceName.PublicService ||
|
|
124
|
-
service === backend_service_name_enum_1.BackendServiceName.LoginService ||
|
|
125
|
-
service === backend_service_name_enum_1.BackendServiceName.DatasessionService)) {
|
|
126
|
-
return this._doCall(method, data, showLoader, service, endPoint, isPublicService, ownMessage, url)
|
|
127
|
-
.catch(() => {
|
|
128
|
-
return false;
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
return this._doCall(method, data, showLoader, service, endPoint, isPublicService, ownMessage, url)
|
|
133
|
-
.catch(() => {
|
|
134
|
-
return false;
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
async callBeacon(method, data = {}, service = undefined, endPoint = end_point_enum_1.EndPoint.AjaxService) {
|
|
139
|
-
if (!service) {
|
|
140
|
-
if (!this.usePublicToken) {
|
|
141
|
-
service = backend_service_name_enum_1.BackendServiceName.LoginService;
|
|
142
|
-
}
|
|
143
|
-
else {
|
|
144
|
-
service = backend_service_name_enum_1.BackendServiceName.PublicService;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
if (navigator.sendBeacon) {
|
|
148
|
-
let messageToSend = JSON.stringify({
|
|
149
|
-
service: service,
|
|
150
|
-
method: method,
|
|
151
|
-
id: this.callId,
|
|
152
|
-
data: data,
|
|
153
|
-
dataSessionId: this.session ? this.session.dataSessionId :
|
|
154
|
-
sessionId: this.session ? this.session.id :
|
|
155
|
-
});
|
|
156
|
-
navigator.sendBeacon(url_utils_1.UrlUtils.createReadableUrl(method, data, this.url, endPoint), messageToSend);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
async login(request, encrypt) {
|
|
160
|
-
const response = await this.loginService.loginAndCreateDataSession(request, encrypt);
|
|
161
|
-
if (typeof response !== 'boolean') {
|
|
162
|
-
return response;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
async confirmCode(upId, userName, password, confirmationCode, clientDeviceFingerprint, clientDeviceDescription, rememberClientDeviceForMFA) {
|
|
166
|
-
return this.loginService.confirmCode(upId, userName, password, confirmationCode, clientDeviceFingerprint, clientDeviceDescription, rememberClientDeviceForMFA);
|
|
167
|
-
}
|
|
168
|
-
async resetGoogleAuth(upId, userName) {
|
|
169
|
-
return this.loginService.resetGoogleAuth(upId, userName);
|
|
170
|
-
}
|
|
171
|
-
async changePassword(password, securityCode, upId) {
|
|
172
|
-
return this.loginService.changePassword(password, securityCode, upId);
|
|
173
|
-
}
|
|
174
|
-
async changePasswordAndActivateUser(password, securityCode, upId, reCaptchaResponse) {
|
|
175
|
-
return this.loginService.changePasswordAndActivateUser(password, securityCode, upId, reCaptchaResponse);
|
|
176
|
-
}
|
|
177
|
-
async sendResetPasswordOrInviteMessage(upId, userName, reCaptchaResponse) {
|
|
178
|
-
return this.loginService.sendResetPasswordOrInviteMessage(upId, userName, reCaptchaResponse);
|
|
179
|
-
}
|
|
180
|
-
async getUserNameBySecurityCode(securityCode, upId) {
|
|
181
|
-
return this.loginService.getUserNameBySecurityCode(securityCode, upId);
|
|
182
|
-
}
|
|
183
|
-
async getPublicKey() {
|
|
184
|
-
return this.loginService.getPublicKey();
|
|
185
|
-
}
|
|
186
|
-
clearStorageAndLogout() {
|
|
187
|
-
if (this.usePublicToken) {
|
|
188
|
-
this.storageService.clear();
|
|
189
|
-
this.storageService.setSessionPublicToken(undefined);
|
|
190
|
-
this.callBeacon(datasession_service_method_enum_1.DatasessionServiceMethod.ClosePublicSession, {}, backend_service_name_enum_1.BackendServiceName.PublicService);
|
|
191
|
-
}
|
|
192
|
-
else {
|
|
193
|
-
this.storageService.clear();
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
close() {
|
|
197
|
-
if (this.usePublicToken) {
|
|
198
|
-
this.storageService.clear();
|
|
199
|
-
this.storageService.setSessionPublicToken(undefined);
|
|
200
|
-
return this._doCall(datasession_service_method_enum_1.DatasessionServiceMethod.ClosePublicSession, {}, false, backend_service_name_enum_1.BackendServiceName.PublicService)
|
|
201
|
-
.catch(() => {
|
|
202
|
-
return null;
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
206
|
-
return this.closeDataSession();
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
_doCall(method, data = {}, showLoader = true, service = undefined, endPoint = end_point_enum_1.EndPoint.AjaxService, isPublicService = false, ownMessage, url) {
|
|
210
|
-
if (!
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
service = backend_service_name_enum_1.BackendServiceName.
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
if (this.usePublicToken && !isPublicService) {
|
|
230
|
-
message = JSON.stringify({
|
|
231
|
-
method: method,
|
|
232
|
-
data: data,
|
|
233
|
-
token: this.session.publicToken
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
else {
|
|
237
|
-
message = JSON.stringify({
|
|
238
|
-
service: service,
|
|
239
|
-
method: method,
|
|
240
|
-
id: this.callId,
|
|
241
|
-
data: data,
|
|
242
|
-
dataSessionId: this.session ? this.session.dataSessionId :
|
|
243
|
-
windowSessionId: this.session ? this.session.windowsId : 1,
|
|
244
|
-
sessionId: this.session ? this.session.id :
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
let headers = {
|
|
249
|
-
|
|
250
|
-
};
|
|
251
|
-
const authorize =
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
method: 'post',
|
|
257
|
-
url: readableUrl,
|
|
258
|
-
data: message,
|
|
259
|
-
withCredentials: authorize,
|
|
260
|
-
timeout: this._timeout,
|
|
261
|
-
headers: headers
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
if (
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AjaxService = void 0;
|
|
4
|
+
const backend_service_name_enum_1 = require("../enum/backend-service-name.enum");
|
|
5
|
+
const base_backend_connection_service_1 = require("./base-backend-connection.service");
|
|
6
|
+
const axios_1 = require("axios");
|
|
7
|
+
const url_utils_1 = require("../utils/url-utils");
|
|
8
|
+
const datasession_service_method_enum_1 = require("../enum/datasession-service-method.enum");
|
|
9
|
+
const end_point_enum_1 = require("../enum/end-point.enum");
|
|
10
|
+
const login_request_1 = require("../model/login-request");
|
|
11
|
+
const login_response_1 = require("../model/login-response");
|
|
12
|
+
const SUCCESS_LOGIN_STATUS = 'SUCCESS';
|
|
13
|
+
class AjaxService extends base_backend_connection_service_1.BaseBackendConnectionService {
|
|
14
|
+
constructor(options) {
|
|
15
|
+
super(options);
|
|
16
|
+
this._showLoaderRequests = 0;
|
|
17
|
+
this._timeout = 180000;
|
|
18
|
+
if (options && options.timeoutInMs) {
|
|
19
|
+
this._timeout = options.timeoutInMs;
|
|
20
|
+
}
|
|
21
|
+
this._axiosInstance = axios_1.default.create();
|
|
22
|
+
this._registerInterceptors();
|
|
23
|
+
}
|
|
24
|
+
async checkAndPrepareKeycloak() {
|
|
25
|
+
await this.loginService.getKeycloakParams();
|
|
26
|
+
await this.loginService.getCompanies();
|
|
27
|
+
const keycloakCode = this._getParameter('code');
|
|
28
|
+
const keycloakState = this._getParameter('state');
|
|
29
|
+
if (keycloakCode && keycloakState) {
|
|
30
|
+
let url = window.location.href;
|
|
31
|
+
url = url.replace('#', '?');
|
|
32
|
+
const uri = url.split('?')[0];
|
|
33
|
+
window.history.replaceState(null, '', uri);
|
|
34
|
+
this.usePublicToken = false;
|
|
35
|
+
return this.loginService.loginByKeycloakCode(keycloakCode, keycloakState, uri);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
if (this.loginService.keycloakParams && this.loginService.keycloakParams.isIdentityServerEnabled) {
|
|
39
|
+
this._redirectToIdentityServerRealm();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
async connect(url, schema, version, reConnect) {
|
|
44
|
+
if (reConnect === undefined || reConnect === null) {
|
|
45
|
+
reConnect = false;
|
|
46
|
+
}
|
|
47
|
+
const keycloakLoginData = this.storageService.getSessionKeycloakLoginData();
|
|
48
|
+
if (keycloakLoginData) {
|
|
49
|
+
const userNameFromKeycloak = keycloakLoginData.userName;
|
|
50
|
+
const userObject = this.storageService.getLocalUserObject(userNameFromKeycloak);
|
|
51
|
+
if (userObject && userObject.loginResponse) {
|
|
52
|
+
this.session.dataSessionId = userObject.dataSessionId;
|
|
53
|
+
this.session.id = userObject.sessionId;
|
|
54
|
+
this.usePublicToken = false;
|
|
55
|
+
return userObject.loginResponse;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (this.usePublicToken) {
|
|
59
|
+
if (this.storageService.sessionPublicToken && !reConnect) {
|
|
60
|
+
const publicLogin = new login_response_1.LoginResponse();
|
|
61
|
+
publicLogin.loginStatus = SUCCESS_LOGIN_STATUS;
|
|
62
|
+
return publicLogin;
|
|
63
|
+
}
|
|
64
|
+
const tokenResponse = await this.createPublicSession();
|
|
65
|
+
if (tokenResponse) {
|
|
66
|
+
const publicLogin = new login_response_1.LoginResponse();
|
|
67
|
+
publicLogin.loginStatus = SUCCESS_LOGIN_STATUS;
|
|
68
|
+
return publicLogin;
|
|
69
|
+
}
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
let response;
|
|
74
|
+
if (this.storageService.localSessionId) {
|
|
75
|
+
if (!this.storageService.localLoginResponse || reConnect) {
|
|
76
|
+
response = reConnect
|
|
77
|
+
? await this._tryNativeLoginWithRequest(url, schema, version)
|
|
78
|
+
: await this._getLoginResponseFromActiveUserOrNativeLogin(url, schema, version);
|
|
79
|
+
this._storeSuccessfulLoginResponse(response);
|
|
80
|
+
return this.storageService.localLoginResponse;
|
|
81
|
+
}
|
|
82
|
+
try {
|
|
83
|
+
if (this.storageService.schema !== this.storageService.localLoginResponse.upId.toString()) {
|
|
84
|
+
this.storageService.schema = this.storageService.localLoginResponse.upId.toString();
|
|
85
|
+
}
|
|
86
|
+
if (this.storageService.username !== this.storageService.localLoginResponse.userName) {
|
|
87
|
+
this.storageService.username = this.storageService.localLoginResponse.userName;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
catch (e) {
|
|
91
|
+
}
|
|
92
|
+
return this.storageService.localLoginResponse;
|
|
93
|
+
}
|
|
94
|
+
response = await this.checkAndPrepareKeycloak();
|
|
95
|
+
if (response) {
|
|
96
|
+
return response;
|
|
97
|
+
}
|
|
98
|
+
response = await this._nativeLogin(url, schema, version);
|
|
99
|
+
return response;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
hasSession() {
|
|
103
|
+
return this.storageService.localSessionId !== undefined;
|
|
104
|
+
}
|
|
105
|
+
getSessionId() {
|
|
106
|
+
return this.storageService.localSessionId;
|
|
107
|
+
}
|
|
108
|
+
getDataSessionId() {
|
|
109
|
+
return this.storageService.localDataSessionId;
|
|
110
|
+
}
|
|
111
|
+
isPublicSession() {
|
|
112
|
+
return this.usePublicToken;
|
|
113
|
+
}
|
|
114
|
+
async call(method, data = {}, showLoader = true, service = undefined, endPoint = end_point_enum_1.EndPoint.AjaxService, isPublicService = false, ownMessage, url) {
|
|
115
|
+
if (!service) {
|
|
116
|
+
if (!this.usePublicToken) {
|
|
117
|
+
service = backend_service_name_enum_1.BackendServiceName.LoginService;
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
service = backend_service_name_enum_1.BackendServiceName.PublicService;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
if (this.usePublicToken || (service === backend_service_name_enum_1.BackendServiceName.PublicService ||
|
|
124
|
+
service === backend_service_name_enum_1.BackendServiceName.LoginService ||
|
|
125
|
+
service === backend_service_name_enum_1.BackendServiceName.DatasessionService)) {
|
|
126
|
+
return this._doCall(method, data, showLoader, service, endPoint, isPublicService, ownMessage, url)
|
|
127
|
+
.catch(() => {
|
|
128
|
+
return false;
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
return this._doCall(method, data, showLoader, service, endPoint, isPublicService, ownMessage, url)
|
|
133
|
+
.catch(() => {
|
|
134
|
+
return false;
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
async callBeacon(method, data = {}, service = undefined, endPoint = end_point_enum_1.EndPoint.AjaxService) {
|
|
139
|
+
if (!service) {
|
|
140
|
+
if (!this.usePublicToken) {
|
|
141
|
+
service = backend_service_name_enum_1.BackendServiceName.LoginService;
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
service = backend_service_name_enum_1.BackendServiceName.PublicService;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
if (navigator.sendBeacon) {
|
|
148
|
+
let messageToSend = JSON.stringify({
|
|
149
|
+
service: service,
|
|
150
|
+
method: method,
|
|
151
|
+
id: this.callId,
|
|
152
|
+
data: data,
|
|
153
|
+
dataSessionId: this.session ? this.session.dataSessionId : '',
|
|
154
|
+
sessionId: this.session ? this.session.id : ''
|
|
155
|
+
});
|
|
156
|
+
navigator.sendBeacon(url_utils_1.UrlUtils.createReadableUrl(method, data, this.url, endPoint), messageToSend);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
async login(request, encrypt) {
|
|
160
|
+
const response = await this.loginService.loginAndCreateDataSession(request, encrypt);
|
|
161
|
+
if (typeof response !== 'boolean') {
|
|
162
|
+
return response;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
async confirmCode(upId, userName, password, confirmationCode, clientDeviceFingerprint, clientDeviceDescription, rememberClientDeviceForMFA) {
|
|
166
|
+
return this.loginService.confirmCode(upId, userName, password, confirmationCode, clientDeviceFingerprint, clientDeviceDescription, rememberClientDeviceForMFA);
|
|
167
|
+
}
|
|
168
|
+
async resetGoogleAuth(upId, userName) {
|
|
169
|
+
return this.loginService.resetGoogleAuth(upId, userName);
|
|
170
|
+
}
|
|
171
|
+
async changePassword(password, securityCode, upId) {
|
|
172
|
+
return this.loginService.changePassword(password, securityCode, upId);
|
|
173
|
+
}
|
|
174
|
+
async changePasswordAndActivateUser(password, securityCode, upId, reCaptchaResponse) {
|
|
175
|
+
return this.loginService.changePasswordAndActivateUser(password, securityCode, upId, reCaptchaResponse);
|
|
176
|
+
}
|
|
177
|
+
async sendResetPasswordOrInviteMessage(upId, userName, reCaptchaResponse) {
|
|
178
|
+
return this.loginService.sendResetPasswordOrInviteMessage(upId, userName, reCaptchaResponse);
|
|
179
|
+
}
|
|
180
|
+
async getUserNameBySecurityCode(securityCode, upId) {
|
|
181
|
+
return this.loginService.getUserNameBySecurityCode(securityCode, upId);
|
|
182
|
+
}
|
|
183
|
+
async getPublicKey() {
|
|
184
|
+
return this.loginService.getPublicKey();
|
|
185
|
+
}
|
|
186
|
+
clearStorageAndLogout() {
|
|
187
|
+
if (this.usePublicToken) {
|
|
188
|
+
this.storageService.clear();
|
|
189
|
+
this.storageService.setSessionPublicToken(undefined);
|
|
190
|
+
this.callBeacon(datasession_service_method_enum_1.DatasessionServiceMethod.ClosePublicSession, {}, backend_service_name_enum_1.BackendServiceName.PublicService);
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
this.storageService.clear();
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
close() {
|
|
197
|
+
if (this.usePublicToken) {
|
|
198
|
+
this.storageService.clear();
|
|
199
|
+
this.storageService.setSessionPublicToken(undefined);
|
|
200
|
+
return this._doCall(datasession_service_method_enum_1.DatasessionServiceMethod.ClosePublicSession, {}, false, backend_service_name_enum_1.BackendServiceName.PublicService)
|
|
201
|
+
.catch(() => {
|
|
202
|
+
return null;
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
return this.closeDataSession();
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
_doCall(method, data = {}, showLoader = true, service = undefined, endPoint = end_point_enum_1.EndPoint.AjaxService, isPublicService = false, ownMessage, url) {
|
|
210
|
+
if (!navigator.onLine) {
|
|
211
|
+
return Promise.reject('No internet connection');
|
|
212
|
+
}
|
|
213
|
+
if (!service) {
|
|
214
|
+
if (!this.usePublicToken) {
|
|
215
|
+
service = backend_service_name_enum_1.BackendServiceName.LoginService;
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
service = backend_service_name_enum_1.BackendServiceName.PublicService;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
this.setShowLoaderRequests(this._showLoaderRequests + 1, showLoader);
|
|
222
|
+
return new Promise(async (resolve, reject) => {
|
|
223
|
+
const readableUrl = url_utils_1.UrlUtils.createReadableUrl(method, data, url ? url : this.url, endPoint);
|
|
224
|
+
let message;
|
|
225
|
+
if (ownMessage) {
|
|
226
|
+
message = JSON.stringify(ownMessage);
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
if (this.usePublicToken && !isPublicService) {
|
|
230
|
+
message = JSON.stringify({
|
|
231
|
+
method: method,
|
|
232
|
+
data: data,
|
|
233
|
+
token: this.session.publicToken
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
message = JSON.stringify({
|
|
238
|
+
service: service,
|
|
239
|
+
method: method,
|
|
240
|
+
id: this.callId,
|
|
241
|
+
data: data,
|
|
242
|
+
dataSessionId: this.session ? this.session.dataSessionId : '',
|
|
243
|
+
windowSessionId: this.session ? this.session.windowsId : 1,
|
|
244
|
+
sessionId: this.session ? this.session.id : ''
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
let headers = {
|
|
249
|
+
'Content-Type': 'application/json; charset=utf-8'
|
|
250
|
+
};
|
|
251
|
+
const authorize = this._methodNeedsAccessToken(method) &&
|
|
252
|
+
service !== backend_service_name_enum_1.BackendServiceName.LoginService &&
|
|
253
|
+
service !== backend_service_name_enum_1.BackendServiceName.PublicService;
|
|
254
|
+
const needsToken = this._methodNeedsAccessToken(method) && this.usePublicToken;
|
|
255
|
+
this._axiosInstance({
|
|
256
|
+
method: 'post',
|
|
257
|
+
url: readableUrl,
|
|
258
|
+
data: message,
|
|
259
|
+
withCredentials: authorize,
|
|
260
|
+
timeout: this._timeout,
|
|
261
|
+
headers: headers,
|
|
262
|
+
authorize: authorize,
|
|
263
|
+
needsToken: needsToken
|
|
264
|
+
}).then(response => {
|
|
265
|
+
if (response.data) {
|
|
266
|
+
if (response.data.exception) {
|
|
267
|
+
this.setShowLoaderRequests(this._showLoaderRequests - 1, showLoader);
|
|
268
|
+
resolve(response.data.exception);
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
this.setShowLoaderRequests(this._showLoaderRequests - 1, showLoader);
|
|
272
|
+
resolve(response.data.data);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}).catch(error => {
|
|
276
|
+
this.setShowLoaderRequests(0, showLoader);
|
|
277
|
+
if (error.code === 'ECONNABORTED') {
|
|
278
|
+
if (this.connectionAborted && !this.connectionAborted.closed) {
|
|
279
|
+
this.connectionAborted.next();
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
console.error(error);
|
|
283
|
+
reject();
|
|
284
|
+
});
|
|
285
|
+
}).then(response => {
|
|
286
|
+
this.setShowLoaderRequests(this._showLoaderRequests - 1, showLoader);
|
|
287
|
+
return new Promise((resolve) => {
|
|
288
|
+
return resolve(response);
|
|
289
|
+
});
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
_registerInterceptors() {
|
|
293
|
+
this._axiosInstance.interceptors.request.use(async (config) => {
|
|
294
|
+
const authorize = config.authorize === true;
|
|
295
|
+
const needsPublicToken = config.needsToken === true;
|
|
296
|
+
if (!authorize && !needsPublicToken) {
|
|
297
|
+
return config;
|
|
298
|
+
}
|
|
299
|
+
if (this.jwtService.retrievingToken) {
|
|
300
|
+
await this._waitForAccessToken();
|
|
301
|
+
}
|
|
302
|
+
else {
|
|
303
|
+
const hasToken = await this.jwtService.getAccessToken(needsPublicToken);
|
|
304
|
+
if (!hasToken) {
|
|
305
|
+
await this._reLoginAndRenewToken();
|
|
306
|
+
}
|
|
307
|
+
if (needsPublicToken) {
|
|
308
|
+
this.session.publicToken = this.jwtService.jwt;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
if (authorize) {
|
|
312
|
+
config.headers = {
|
|
313
|
+
...(config.headers || {}),
|
|
314
|
+
Authorization: `Bearer ${this.jwtService.jwt}`
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
return config;
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
async _reLoginAndRenewToken() {
|
|
321
|
+
this.jwtService.setBusy(true);
|
|
322
|
+
await this.connect(this.url ? this.url : undefined, this.schema ? this.schema : undefined, this.version ? this.version.toString() : undefined, true);
|
|
323
|
+
}
|
|
324
|
+
_nativeLogin(url, schema, version) {
|
|
325
|
+
if (this.externalSourceId) {
|
|
326
|
+
return this.loginService.loginToExternalSource(this.externalSourceId, url, schema, version);
|
|
327
|
+
}
|
|
328
|
+
else {
|
|
329
|
+
return this.loginService.loginAndCreateDataSession();
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
_tryNativeLoginWithRequest(url, schema, version) {
|
|
333
|
+
if (this.externalSourceId) {
|
|
334
|
+
return this.loginService.loginToExternalSource(this.externalSourceId, url, schema, version);
|
|
335
|
+
}
|
|
336
|
+
else {
|
|
337
|
+
const request = new login_request_1.LoginRequest();
|
|
338
|
+
request.userName = this.options.username;
|
|
339
|
+
request.pw = this.options.password;
|
|
340
|
+
request.upId = parseInt(this.options.schema, 10);
|
|
341
|
+
request.clientVersion = this.version.toString();
|
|
342
|
+
request.clientLanguage = this.options.languageCode;
|
|
343
|
+
return this.loginService.loginAndCreateDataSession(request);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
async _getLoginResponseFromActiveUserOrNativeLogin(url, schema, version) {
|
|
347
|
+
const activeUserResponse = await this.userInfoService.getActiveUserInfo();
|
|
348
|
+
if (activeUserResponse && activeUserResponse.upId && activeUserResponse.loginStatus === SUCCESS_LOGIN_STATUS) {
|
|
349
|
+
return activeUserResponse;
|
|
350
|
+
}
|
|
351
|
+
return this._tryNativeLoginWithRequest(url, schema, version);
|
|
352
|
+
}
|
|
353
|
+
_storeSuccessfulLoginResponse(loginResponse) {
|
|
354
|
+
if (loginResponse && loginResponse.upId && loginResponse.loginStatus === SUCCESS_LOGIN_STATUS) {
|
|
355
|
+
this.storageService.setLoginResponse(loginResponse);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
_methodNeedsAccessToken(method) {
|
|
359
|
+
return this.methodWithoutAccessToken.indexOf(method) < 0;
|
|
360
|
+
}
|
|
361
|
+
async _waitForAccessToken() {
|
|
362
|
+
return new Promise((resolve) => {
|
|
363
|
+
if (window.hasOwnProperty('tokenRetrieved')) {
|
|
364
|
+
window.tokenRetrieved.subscribe(() => {
|
|
365
|
+
resolve(true);
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
else {
|
|
369
|
+
resolve(true);
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
setShowLoaderRequests(amount, showLoader) {
|
|
374
|
+
if (!showLoader) {
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
this._showLoaderRequests = Math.max(0, amount);
|
|
378
|
+
if (this._showLoaderRequests > 0) {
|
|
379
|
+
if (this.showLoader && !this.showLoader.closed) {
|
|
380
|
+
this.showLoader.next(true);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
else {
|
|
384
|
+
if (this.showLoader && !this.showLoader.closed) {
|
|
385
|
+
this.showLoader.next(false);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
_redirectToIdentityServerRealm() {
|
|
390
|
+
if (this.loginService.company && this.loginService.company.realmId && (this.loginService.company.clientId || this.options.keycloakClientId)) {
|
|
391
|
+
let state = this.storageService.localKeycloakState;
|
|
392
|
+
if (!state) {
|
|
393
|
+
state = this._createGuid();
|
|
394
|
+
this.storageService.setLocalKeycloakState(state);
|
|
395
|
+
}
|
|
396
|
+
const redirectUrl = window.location.href;
|
|
397
|
+
const query = {
|
|
398
|
+
state: state,
|
|
399
|
+
client_id: this.options.keycloakClientId ? this.options.keycloakClientId : this.loginService.company.clientId,
|
|
400
|
+
response_type: 'code',
|
|
401
|
+
response_mode: 'fragment',
|
|
402
|
+
redirect_uri: redirectUrl
|
|
403
|
+
};
|
|
404
|
+
const queryUrl = new URLSearchParams(query).toString();
|
|
405
|
+
const fullUrl = this.loginService.keycloakParams.keycloakUrl + '/realms/' + this.loginService.company.realmId + '/protocol/openid-connect/auth' + '?' + queryUrl;
|
|
406
|
+
window.location.href = fullUrl;
|
|
407
|
+
setTimeout(() => {
|
|
408
|
+
}, 500);
|
|
409
|
+
}
|
|
410
|
+
else {
|
|
411
|
+
console.error('Identity server information is not defined for the selected company');
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
_getParameter(parameterName) {
|
|
415
|
+
let url = window.location.href;
|
|
416
|
+
url = url.replace('#', '?');
|
|
417
|
+
parameterName = parameterName.replace(/[\[\]]/g, '\\$&');
|
|
418
|
+
const regex = new RegExp('[?&]' + parameterName + '(=([^&#]*)|&|#|$)');
|
|
419
|
+
const results = regex.exec(url);
|
|
420
|
+
if (!results) {
|
|
421
|
+
return null;
|
|
422
|
+
}
|
|
423
|
+
else if (!results[2]) {
|
|
424
|
+
return '';
|
|
425
|
+
}
|
|
426
|
+
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
|
427
|
+
}
|
|
428
|
+
_createGuid() {
|
|
429
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
|
430
|
+
const r = Math.random() * 16 | 0;
|
|
431
|
+
return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16);
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
exports.AjaxService = AjaxService;
|
|
382
436
|
//# sourceMappingURL=ajax.service.js.map
|