@colijnit/ioneconnector 3.1.18 → 3.1.19

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.
Files changed (344) hide show
  1. package/build/connector.d.ts +30 -29
  2. package/build/connector.js +67 -64
  3. package/build/connector.js.map +1 -1
  4. package/build/connector.unit.test.d.ts +1 -1
  5. package/build/connector.unit.test.js +108 -108
  6. package/build/enum/activate-user-account-status.enum.d.ts +6 -6
  7. package/build/enum/activate-user-account-status.enum.js +10 -10
  8. package/build/enum/address-format.enum.d.ts +4 -4
  9. package/build/enum/address-format.enum.js +8 -8
  10. package/build/enum/backend-language-code.enum.d.ts +6 -6
  11. package/build/enum/backend-language-code.enum.js +10 -10
  12. package/build/enum/backend-service-name.enum.d.ts +7 -6
  13. package/build/enum/backend-service-name.enum.js +11 -10
  14. package/build/enum/backend-service-name.enum.js.map +1 -1
  15. package/build/enum/communication-type.enum.d.ts +8 -8
  16. package/build/enum/communication-type.enum.js +12 -12
  17. package/build/enum/datasession-service-method.enum.d.ts +13 -13
  18. package/build/enum/datasession-service-method.enum.js +17 -17
  19. package/build/enum/db-boolean-value-type.enum.d.ts +12 -12
  20. package/build/enum/db-boolean-value-type.enum.js +32 -32
  21. package/build/enum/end-point.enum.d.ts +4 -4
  22. package/build/enum/end-point.enum.js +8 -8
  23. package/build/enum/file-type-internal.enum.d.ts +11 -11
  24. package/build/enum/file-type-internal.enum.js +15 -15
  25. package/build/enum/file-type.enum.d.ts +5 -5
  26. package/build/enum/file-type.enum.js +9 -9
  27. package/build/enum/filter-type.enum.d.ts +4 -4
  28. package/build/enum/filter-type.enum.js +8 -8
  29. package/build/enum/health-service-method.enum.d.ts +3 -3
  30. package/build/enum/health-service-method.enum.js +7 -7
  31. package/build/enum/language-code.enum.d.ts +7 -7
  32. package/build/enum/language-code.enum.js +11 -11
  33. package/build/enum/login-service-method.enum.d.ts +24 -24
  34. package/build/enum/login-service-method.enum.js +28 -28
  35. package/build/enum/login-status.enum.d.ts +20 -20
  36. package/build/enum/login-status.enum.js +24 -24
  37. package/build/enum/message-type.enum.d.ts +6 -6
  38. package/build/enum/message-type.enum.js +10 -10
  39. package/build/enum/object-config-kind.d.ts +9 -9
  40. package/build/enum/object-config-kind.js +13 -13
  41. package/build/enum/object-configuration-data-type.enum.d.ts +7 -7
  42. package/build/enum/object-configuration-data-type.enum.js +11 -11
  43. package/build/enum/object-configuration-value-type.enum.d.ts +10 -10
  44. package/build/enum/object-configuration-value-type.enum.js +14 -14
  45. package/build/enum/object-right-type.enum.d.ts +5 -5
  46. package/build/enum/object-right-type.enum.js +9 -9
  47. package/build/enum/one-zero-bool-db-type.enum.d.ts +5 -5
  48. package/build/enum/one-zero-bool-db-type.enum.js +20 -20
  49. package/build/enum/public-service-method.enum.d.ts +5 -5
  50. package/build/enum/public-service-method.enum.js +9 -9
  51. package/build/enum/reset-password-status.enum.d.ts +5 -5
  52. package/build/enum/reset-password-status.enum.js +9 -9
  53. package/build/enum/screen-config-subcategory.enum.d.ts +2 -2
  54. package/build/enum/screen-config-subcategory.enum.js +2 -2
  55. package/build/enum/search-data-type.enum.d.ts +4 -4
  56. package/build/enum/search-data-type.enum.js +8 -8
  57. package/build/enum/search-property-state.enum.d.ts +5 -5
  58. package/build/enum/search-property-state.enum.js +9 -9
  59. package/build/enum/sort-direction.d.ts +5 -5
  60. package/build/enum/sort-direction.js +12 -12
  61. package/build/enum/sort-type.enum.d.ts +6 -6
  62. package/build/enum/sort-type.enum.js +10 -10
  63. package/build/enum/true-false-db-type.enum.d.ts +5 -5
  64. package/build/enum/true-false-db-type.enum.js +20 -20
  65. package/build/enum/user-info-service-method.enum.d.ts +3 -0
  66. package/build/enum/user-info-service-method.enum.js +8 -0
  67. package/build/enum/user-info-service-method.enum.js.map +1 -0
  68. package/build/enum/user-right-type.enum.d.ts +7 -7
  69. package/build/enum/user-right-type.enum.js +11 -11
  70. package/build/enum/user-role-type.enum.d.ts +17 -17
  71. package/build/enum/user-role-type.enum.js +21 -21
  72. package/build/enum/value-comparison-type.enum.d.ts +15 -15
  73. package/build/enum/value-comparison-type.enum.js +31 -31
  74. package/build/enum/yes-no-db-type.enum.d.ts +5 -5
  75. package/build/enum/yes-no-db-type.enum.js +20 -20
  76. package/build/factory/business-object-serializer.d.ts +11 -11
  77. package/build/factory/business-object-serializer.js +145 -145
  78. package/build/factory/decorators/bo-factory-step.decorator.d.ts +4 -4
  79. package/build/factory/decorators/bo-factory-step.decorator.js +16 -16
  80. package/build/factory/decorators/bo-serializer-step.decorator.d.ts +4 -4
  81. package/build/factory/decorators/bo-serializer-step.decorator.js +16 -16
  82. package/build/factory/decorators/boolean.decorator.d.ts +12 -12
  83. package/build/factory/decorators/boolean.decorator.js +73 -73
  84. package/build/factory/decorators/business-object-data.decorator.d.ts +23 -23
  85. package/build/factory/decorators/business-object-data.decorator.js +87 -87
  86. package/build/factory/decorators/co-inject.decorator.d.ts +7 -7
  87. package/build/factory/decorators/co-inject.decorator.js +54 -54
  88. package/build/factory/decorators/complex-array.decorator.d.ts +6 -6
  89. package/build/factory/decorators/complex-array.decorator.js +37 -37
  90. package/build/factory/decorators/complex-field.decorator.d.ts +6 -6
  91. package/build/factory/decorators/complex-field.decorator.js +37 -37
  92. package/build/factory/decorators/date-field.decorator.d.ts +6 -6
  93. package/build/factory/decorators/date-field.decorator.js +27 -27
  94. package/build/factory/decorators/db-field-alias.decorator.d.ts +6 -6
  95. package/build/factory/decorators/db-field-alias.decorator.js +40 -40
  96. package/build/factory/decorators/db-method-value.decorator.d.ts +5 -5
  97. package/build/factory/decorators/db-method-value.decorator.js +19 -19
  98. package/build/factory/decorators/db-number.decorator.d.ts +6 -6
  99. package/build/factory/decorators/db-number.decorator.js +35 -35
  100. package/build/factory/decorators/default-send-value.decorator.d.ts +7 -7
  101. package/build/factory/decorators/default-send-value.decorator.js +53 -53
  102. package/build/factory/decorators/exclude-when-empty-string.decorator.d.ts +5 -5
  103. package/build/factory/decorators/exclude-when-empty-string.decorator.js +19 -19
  104. package/build/factory/decorators/json.decorator.d.ts +6 -6
  105. package/build/factory/decorators/json.decorator.js +26 -26
  106. package/build/factory/decorators/map-property.decorator.d.ts +6 -6
  107. package/build/factory/decorators/map-property.decorator.js +29 -29
  108. package/build/factory/decorators/no-db-field.decorator.d.ts +5 -5
  109. package/build/factory/decorators/no-db-field.decorator.js +34 -34
  110. package/build/factory/decorators/number-string.decorator.d.ts +6 -6
  111. package/build/factory/decorators/number-string.decorator.js +23 -23
  112. package/build/factory/decorators/simple-method-tag.decorator.d.ts +6 -6
  113. package/build/factory/decorators/simple-method-tag.decorator.js +31 -31
  114. package/build/factory/decorators/simple-property-tag.decorator.d.ts +6 -6
  115. package/build/factory/decorators/simple-property-tag.decorator.js +38 -38
  116. package/build/factory/decorators/string-number.decorator.d.ts +7 -7
  117. package/build/factory/decorators/string-number.decorator.js +30 -30
  118. package/build/factory/decorators/validate.decorator.d.ts +11 -11
  119. package/build/factory/decorators/validate.decorator.js +55 -55
  120. package/build/interface/address-common-shape.interface.d.ts +14 -14
  121. package/build/interface/address-common-shape.interface.js +2 -2
  122. package/build/interface/business-object-data-shape.d.ts +19 -19
  123. package/build/interface/business-object-data-shape.js +2 -2
  124. package/build/interface/check-precision-and-scale-result.d.ts +4 -4
  125. package/build/interface/check-precision-and-scale-result.js +2 -2
  126. package/build/interface/check-within-stepped-bounds-result.d.ts +4 -4
  127. package/build/interface/check-within-stepped-bounds-result.js +2 -2
  128. package/build/interface/filter-property.d.ts +9 -9
  129. package/build/interface/filter-property.js +2 -2
  130. package/build/interface/login-storage-data.interface.d.ts +10 -10
  131. package/build/interface/login-storage-data.interface.js +2 -2
  132. package/build/interface/precision-scale-object.d.ts +4 -4
  133. package/build/interface/precision-scale-object.js +2 -2
  134. package/build/interface/search-property.d.ts +11 -11
  135. package/build/interface/search-property.js +2 -2
  136. package/build/interface/sort-property.d.ts +11 -11
  137. package/build/interface/sort-property.js +2 -2
  138. package/build/interface/text-part.d.ts +4 -4
  139. package/build/interface/text-part.js +2 -2
  140. package/build/interface/value-comparison-type-view-wrapper.d.ts +6 -6
  141. package/build/interface/value-comparison-type-view-wrapper.js +2 -2
  142. package/build/model/business-object.d.ts +13 -13
  143. package/build/model/business-object.js +34 -34
  144. package/build/model/company.bo.d.ts +9 -9
  145. package/build/model/company.bo.js +13 -13
  146. package/build/model/constant/java-constants.d.ts +2 -2
  147. package/build/model/constant/java-constants.js +5 -5
  148. package/build/model/country.bo.d.ts +11 -11
  149. package/build/model/country.bo.js +11 -11
  150. package/build/model/data-service-data.d.ts +15 -15
  151. package/build/model/data-service-data.js +6 -6
  152. package/build/model/data-service-response-data.d.ts +19 -19
  153. package/build/model/data-service-response-data.interface.d.ts +9 -9
  154. package/build/model/data-service-response-data.interface.js +2 -2
  155. package/build/model/data-service-response-data.js +57 -57
  156. package/build/model/data-service-response-exception.d.ts +29 -29
  157. package/build/model/data-service-response-exception.js +2 -2
  158. package/build/model/data-service-response-root.d.ts +7 -7
  159. package/build/model/data-service-response-root.js +2 -2
  160. package/build/model/default-all-scr-cfg-subcategory.d.ts +2 -2
  161. package/build/model/default-all-scr-cfg-subcategory.js +4 -4
  162. package/build/model/default-get-object-configurations-params.d.ts +2 -2
  163. package/build/model/default-get-object-configurations-params.js +5 -5
  164. package/build/model/field-validation.d.ts +11 -11
  165. package/build/model/field-validation.interface.d.ts +6 -6
  166. package/build/model/field-validation.interface.js +2 -2
  167. package/build/model/field-validation.js +76 -76
  168. package/build/model/field-validations-object.d.ts +4 -4
  169. package/build/model/field-validations-object.interface.d.ts +4 -4
  170. package/build/model/field-validations-object.interface.js +2 -2
  171. package/build/model/field-validations-object.js +2 -2
  172. package/build/model/ione-local-storage-root-object.d.ts +5 -5
  173. package/build/model/ione-local-storage-root-object.js +9 -9
  174. package/build/model/keycloak-parameters.bo.d.ts +5 -5
  175. package/build/model/keycloak-parameters.bo.js +7 -7
  176. package/build/model/local-storage-root-object.d.ts +4 -4
  177. package/build/model/local-storage-root-object.js +9 -9
  178. package/build/model/local-storage-schema-object.d.ts +7 -7
  179. package/build/model/local-storage-schema-object.js +9 -9
  180. package/build/model/local-storage-user-object.d.ts +7 -7
  181. package/build/model/local-storage-user-object.js +6 -6
  182. package/build/model/login-request.d.ts +15 -15
  183. package/build/model/login-request.interface.d.ts +12 -12
  184. package/build/model/login-request.interface.js +2 -2
  185. package/build/model/login-request.js +6 -6
  186. package/build/model/login-response.d.ts +36 -36
  187. package/build/model/login-response.interface.d.ts +22 -22
  188. package/build/model/login-response.interface.js +2 -2
  189. package/build/model/login-response.js +57 -57
  190. package/build/model/login-service-request-data.d.ts +17 -17
  191. package/build/model/login-service-request-data.js +2 -2
  192. package/build/model/login.d.ts +16 -16
  193. package/build/model/login.js +35 -35
  194. package/build/model/menu-content.bo.d.ts +13 -13
  195. package/build/model/menu-content.bo.js +13 -13
  196. package/build/model/object-configuration.d.ts +53 -53
  197. package/build/model/object-configuration.js +200 -200
  198. package/build/model/options.d.ts +26 -24
  199. package/build/model/options.js +16 -16
  200. package/build/model/options.js.map +1 -1
  201. package/build/model/paging-parameters.d.ts +15 -15
  202. package/build/model/paging-parameters.interface.d.ts +6 -6
  203. package/build/model/paging-parameters.interface.js +6 -6
  204. package/build/model/paging-parameters.js +37 -37
  205. package/build/model/public-service-request-data.d.ts +5 -5
  206. package/build/model/public-service-request-data.js +2 -2
  207. package/build/model/server-response-data.d.ts +5 -5
  208. package/build/model/server-response-data.js +2 -2
  209. package/build/model/server-stack-trace-element.d.ts +7 -7
  210. package/build/model/server-stack-trace-element.js +2 -2
  211. package/build/model/session-storage-root-object.d.ts +4 -4
  212. package/build/model/session-storage-root-object.js +9 -9
  213. package/build/model/session-storage-schema-object.d.ts +7 -7
  214. package/build/model/session-storage-schema-object.js +9 -9
  215. package/build/model/session-storage-user-object.d.ts +6 -6
  216. package/build/model/session-storage-user-object.js +10 -10
  217. package/build/model/session.d.ts +6 -6
  218. package/build/model/session.js +6 -6
  219. package/build/model/token-response.bo.d.ts +5 -5
  220. package/build/model/token-response.bo.js +7 -7
  221. package/build/model/user-parameters-values.bo.d.ts +8 -8
  222. package/build/model/user-parameters-values.bo.js +7 -7
  223. package/build/model/validation-message.d.ts +13 -13
  224. package/build/model/validation-message.interface.d.ts +6 -6
  225. package/build/model/validation-message.interface.js +2 -2
  226. package/build/model/validation-message.js +48 -48
  227. package/build/model/validation-result.d.ts +34 -34
  228. package/build/model/validation-result.interface.d.ts +14 -14
  229. package/build/model/validation-result.interface.js +2 -2
  230. package/build/model/validation-result.js +192 -192
  231. package/build/provider/ajax.service.d.ts +33 -32
  232. package/build/provider/ajax.service.js +280 -275
  233. package/build/provider/ajax.service.js.map +1 -1
  234. package/build/provider/base-backend-connection.service.d.ts +44 -43
  235. package/build/provider/base-backend-connection.service.js +154 -144
  236. package/build/provider/base-backend-connection.service.js.map +1 -1
  237. package/build/service/business-object-factory.d.ts +8 -8
  238. package/build/service/business-object-factory.js +119 -119
  239. package/build/service/datasession.service.d.ts +9 -9
  240. package/build/service/datasession.service.js +26 -26
  241. package/build/service/encrypt.service.d.ts +6 -6
  242. package/build/service/encrypt.service.js +30 -30
  243. package/build/service/encrypt.service.unit.test.d.ts +1 -1
  244. package/build/service/encrypt.service.unit.test.js +14 -14
  245. package/build/service/external-jwt-token.service.d.ts +10 -0
  246. package/build/service/external-jwt-token.service.js +22 -0
  247. package/build/service/external-jwt-token.service.js.map +1 -0
  248. package/build/service/health.service.d.ts +10 -10
  249. package/build/service/health.service.js +34 -34
  250. package/build/service/internal-jwt-token.service.d.ts +11 -0
  251. package/build/service/internal-jwt-token.service.js +41 -0
  252. package/build/service/internal-jwt-token.service.js.map +1 -0
  253. package/build/service/jwt-token.service.d.ts +12 -12
  254. package/build/service/jwt-token.service.js +32 -62
  255. package/build/service/jwt-token.service.js.map +1 -1
  256. package/build/service/local-storage.service.d.ts +27 -28
  257. package/build/service/local-storage.service.js +147 -154
  258. package/build/service/local-storage.service.js.map +1 -1
  259. package/build/service/login.service.d.ts +45 -45
  260. package/build/service/login.service.js +312 -312
  261. package/build/service/public.service.d.ts +12 -12
  262. package/build/service/public.service.js +36 -36
  263. package/build/service/session-storage.service.d.ts +18 -18
  264. package/build/service/session-storage.service.js +116 -116
  265. package/build/service/user-info.service.d.ts +9 -0
  266. package/build/service/user-info.service.js +34 -0
  267. package/build/service/user-info.service.js.map +1 -0
  268. package/build/tests/int/connector.int.test.d.ts +1 -1
  269. package/build/tests/int/connector.int.test.js +12 -12
  270. package/build/type/business-object-id-type.d.ts +4 -4
  271. package/build/type/business-object-id-type.js +13 -13
  272. package/build/type/object-configuration-default-value-type.d.ts +1 -1
  273. package/build/type/object-configuration-default-value-type.js +2 -2
  274. package/build/utils/array-utils.d.ts +38 -38
  275. package/build/utils/array-utils.js +375 -375
  276. package/build/utils/business-object-utils.d.ts +20 -20
  277. package/build/utils/business-object-utils.js +198 -198
  278. package/build/utils/date-utils.d.ts +5 -5
  279. package/build/utils/date-utils.js +24 -24
  280. package/build/utils/file-utils.d.ts +6 -6
  281. package/build/utils/file-utils.js +66 -66
  282. package/build/utils/function/any-nill.function.d.ts +1 -1
  283. package/build/utils/function/any-nill.function.js +16 -16
  284. package/build/utils/function/is-nill.function.d.ts +1 -1
  285. package/build/utils/function/is-nill.function.js +7 -7
  286. package/build/utils/function/not-nill.function.d.ts +1 -1
  287. package/build/utils/function/not-nill.function.js +7 -7
  288. package/build/utils/function-utils.d.ts +4 -4
  289. package/build/utils/function-utils.js +31 -31
  290. package/build/utils/image-utils.d.ts +4 -4
  291. package/build/utils/image-utils.js +28 -28
  292. package/build/utils/map-utils.d.ts +4 -4
  293. package/build/utils/map-utils.js +31 -31
  294. package/build/utils/number-utils.d.ts +39 -39
  295. package/build/utils/number-utils.js +268 -268
  296. package/build/utils/object-utils.d.ts +21 -21
  297. package/build/utils/object-utils.js +247 -247
  298. package/build/utils/parameter-value-conversion-utils.d.ts +3 -3
  299. package/build/utils/parameter-value-conversion-utils.js +19 -19
  300. package/build/utils/promise-utils.d.ts +6 -6
  301. package/build/utils/promise-utils.js +22 -22
  302. package/build/utils/ref-code-utils.d.ts +4 -4
  303. package/build/utils/ref-code-utils.js +19 -19
  304. package/build/utils/sort-utils.d.ts +12 -12
  305. package/build/utils/sort-utils.js +120 -120
  306. package/build/utils/string-utils.d.ts +25 -25
  307. package/build/utils/string-utils.js +212 -212
  308. package/build/utils/url-utils.d.ts +4 -4
  309. package/build/utils/url-utils.js +33 -33
  310. package/build/validators/communication-type.validator.d.ts +1 -1
  311. package/build/validators/communication-type.validator.js +16 -16
  312. package/build/validators/email.validator.d.ts +2 -2
  313. package/build/validators/email.validator.js +9 -9
  314. package/build/validators/empty-address.validator.d.ts +3 -3
  315. package/build/validators/empty-address.validator.js +12 -12
  316. package/build/validators/empty-array.validator.d.ts +2 -2
  317. package/build/validators/empty-array.validator.js +14 -14
  318. package/build/validators/end-date-equal.validator.d.ts +1 -1
  319. package/build/validators/end-date-equal.validator.js +17 -17
  320. package/build/validators/end-date.validator.d.ts +1 -1
  321. package/build/validators/end-date.validator.js +17 -17
  322. package/build/validators/equal.validator.d.ts +2 -2
  323. package/build/validators/equal.validator.js +14 -14
  324. package/build/validators/max-string-length.validator.d.ts +2 -2
  325. package/build/validators/max-string-length.validator.js +13 -13
  326. package/build/validators/nl-post-code.validator.d.ts +3 -3
  327. package/build/validators/nl-post-code.validator.js +14 -14
  328. package/build/validators/password.validator.d.ts +3 -3
  329. package/build/validators/password.validator.js +33 -33
  330. package/build/validators/postal-code-function.validator.d.ts +2 -2
  331. package/build/validators/postal-code-function.validator.js +19 -19
  332. package/build/validators/postal-code.validator.d.ts +1 -1
  333. package/build/validators/postal-code.validator.js +21 -21
  334. package/build/validators/precision-scale.validator.d.ts +2 -2
  335. package/build/validators/precision-scale.validator.js +14 -14
  336. package/build/validators/required.validator.d.ts +2 -2
  337. package/build/validators/required.validator.js +8 -8
  338. package/build/validators/social-security-number.validator.d.ts +2 -2
  339. package/build/validators/social-security-number.validator.js +28 -28
  340. package/build/validators/space-trim.validator.d.ts +2 -2
  341. package/build/validators/space-trim.validator.js +12 -12
  342. package/build/validators/true.validator.d.ts +2 -2
  343. package/build/validators/true.validator.js +8 -8
  344. package/package.json +64 -64
@@ -1,29 +1,30 @@
1
- import { Options } from './model/options';
2
- import { Subject } from 'rxjs';
3
- import { DataServiceData } from './model/data-service-data';
4
- import { ServerResponseData } from './model/server-response-data';
5
- import { PublicServiceRequestData } from './model/public-service-request-data';
6
- import { LoginRequest } from './model/login-request';
7
- import { LoginResponse } from './model/login-response';
8
- export declare class Connector {
9
- private readonly subs;
10
- private connection;
11
- readonly showLoader: Subject<boolean>;
12
- readonly connectionAborted: Subject<void>;
13
- readonly connectionResetInactivity: Subject<void>;
14
- constructor(options?: Options);
15
- connect(): Promise<LoginResponse>;
16
- hasSession(): boolean;
17
- logIn(request: LoginRequest, encrypt?: boolean): Promise<LoginResponse>;
18
- confirmCode(upId: number, userName: string, confirmationCode: string, clientDeviceFingerprint: string, clientDeviceDescription: string, rememberClientDeviceForMFA: boolean): Promise<ServerResponseData>;
19
- resetGoogleAuth(upId: number, userName: string): Promise<ServerResponseData>;
20
- changePassword(password: string, securityCode: string, upId: number): Promise<ServerResponseData>;
21
- changePasswordAndActivateUser(password: string, securityCode: string, upId: number, reCaptchaResponse?: string): Promise<ServerResponseData>;
22
- sendResetPasswordOrInviteMessage(upId: number, userName: string, reCaptchaResponse: string): Promise<ServerResponseData>;
23
- getUserNameBySecurityCode(securityCode: string, upId: number): Promise<ServerResponseData>;
24
- logOut(): Promise<ServerResponseData>;
25
- getPublicKey(): Promise<ServerResponseData>;
26
- call(method: string, data: DataServiceData | PublicServiceRequestData, showLoader: boolean, service: string, endPoint?: string, ownMessage?: {}): Promise<ServerResponseData>;
27
- private _handleConnectionReset;
28
- private _applicationClose;
29
- }
1
+ import { Options } from './model/options';
2
+ import { Subject } from 'rxjs';
3
+ import { DataServiceData } from './model/data-service-data';
4
+ import { ServerResponseData } from './model/server-response-data';
5
+ import { PublicServiceRequestData } from './model/public-service-request-data';
6
+ import { LoginRequest } from './model/login-request';
7
+ import { LoginResponse } from './model/login-response';
8
+ export declare class Connector {
9
+ private readonly subs;
10
+ private connection;
11
+ readonly showLoader: Subject<boolean>;
12
+ readonly connectionAborted: Subject<void>;
13
+ readonly connectionResetInactivity: Subject<void>;
14
+ constructor(options?: Options);
15
+ connect(): Promise<LoginResponse>;
16
+ hasSession(): boolean;
17
+ isPublicSession(): boolean;
18
+ logIn(request: LoginRequest, encrypt?: boolean): Promise<LoginResponse>;
19
+ confirmCode(upId: number, userName: string, confirmationCode: string, clientDeviceFingerprint: string, clientDeviceDescription: string, rememberClientDeviceForMFA: boolean): Promise<ServerResponseData>;
20
+ resetGoogleAuth(upId: number, userName: string): Promise<ServerResponseData>;
21
+ changePassword(password: string, securityCode: string, upId: number): Promise<ServerResponseData>;
22
+ changePasswordAndActivateUser(password: string, securityCode: string, upId: number, reCaptchaResponse?: string): Promise<ServerResponseData>;
23
+ sendResetPasswordOrInviteMessage(upId: number, userName: string, reCaptchaResponse: string): Promise<ServerResponseData>;
24
+ getUserNameBySecurityCode(securityCode: string, upId: number): Promise<ServerResponseData>;
25
+ logOut(): Promise<ServerResponseData>;
26
+ getPublicKey(): Promise<ServerResponseData>;
27
+ call(method: string, data: DataServiceData | PublicServiceRequestData, showLoader: boolean, service: string, endPoint?: string, ownMessage?: {}): Promise<ServerResponseData>;
28
+ private _handleConnectionReset;
29
+ private _applicationClose;
30
+ }
@@ -1,65 +1,68 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Connector = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const ajax_service_1 = require("./provider/ajax.service");
6
- class Connector {
7
- constructor(options) {
8
- this.subs = [];
9
- this.showLoader = new rxjs_1.Subject();
10
- this.connectionAborted = new rxjs_1.Subject();
11
- this.connectionResetInactivity = new rxjs_1.Subject();
12
- this._applicationClose = () => {
13
- this.connection.close();
14
- this.subs.forEach(s => s.unsubscribe());
15
- window.removeEventListener('beforeunload', this._applicationClose);
16
- return null;
17
- };
18
- this.connection = new ajax_service_1.AjaxService(options);
19
- this.subs.push(this.connection.showLoader.subscribe(value => this.showLoader.next(value)), this.connection.connectionAborted.subscribe(() => this.connectionAborted.next()), this.connection.connectionResetInactivity.subscribe(() => this._handleConnectionReset()));
20
- if (options.logoutWhenRefresh) {
21
- window.addEventListener('beforeunload', this._applicationClose);
22
- }
23
- }
24
- async connect() {
25
- return this.connection.connect();
26
- }
27
- hasSession() {
28
- return this.connection.hasSession();
29
- }
30
- async logIn(request, encrypt = true) {
31
- return this.connection.login(request, encrypt);
32
- }
33
- async confirmCode(upId, userName, confirmationCode, clientDeviceFingerprint, clientDeviceDescription, rememberClientDeviceForMFA) {
34
- return this.connection.confirmCode(upId, userName, confirmationCode, clientDeviceFingerprint, clientDeviceDescription, rememberClientDeviceForMFA);
35
- }
36
- async resetGoogleAuth(upId, userName) {
37
- return this.connection.resetGoogleAuth(upId, userName);
38
- }
39
- async changePassword(password, securityCode, upId) {
40
- return this.connection.changePassword(password, securityCode, upId);
41
- }
42
- async changePasswordAndActivateUser(password, securityCode, upId, reCaptchaResponse) {
43
- return this.connection.changePasswordAndActivateUser(password, securityCode, upId, reCaptchaResponse);
44
- }
45
- async sendResetPasswordOrInviteMessage(upId, userName, reCaptchaResponse) {
46
- return this.connection.sendResetPasswordOrInviteMessage(upId, userName, reCaptchaResponse);
47
- }
48
- async getUserNameBySecurityCode(securityCode, upId) {
49
- return this.connection.getUserNameBySecurityCode(securityCode, upId);
50
- }
51
- async logOut() {
52
- return this.connection.close();
53
- }
54
- async getPublicKey() {
55
- return this.connection.getPublicKey();
56
- }
57
- async call(method, data, showLoader, service, endPoint, ownMessage) {
58
- return await this.connection.call(method, data, showLoader, service, endPoint, false, ownMessage);
59
- }
60
- _handleConnectionReset() {
61
- this.connectionResetInactivity.next();
62
- }
63
- }
64
- exports.Connector = Connector;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Connector = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const ajax_service_1 = require("./provider/ajax.service");
6
+ class Connector {
7
+ constructor(options) {
8
+ this.subs = [];
9
+ this.showLoader = new rxjs_1.Subject();
10
+ this.connectionAborted = new rxjs_1.Subject();
11
+ this.connectionResetInactivity = new rxjs_1.Subject();
12
+ this._applicationClose = () => {
13
+ this.connection.close();
14
+ this.subs.forEach(s => s.unsubscribe());
15
+ window.removeEventListener('beforeunload', this._applicationClose);
16
+ return null;
17
+ };
18
+ this.connection = new ajax_service_1.AjaxService(options);
19
+ this.subs.push(this.connection.showLoader.subscribe(value => this.showLoader.next(value)), this.connection.connectionAborted.subscribe(() => this.connectionAborted.next()), this.connection.connectionResetInactivity.subscribe(() => this._handleConnectionReset()));
20
+ if (options.logoutWhenRefresh) {
21
+ window.addEventListener('beforeunload', this._applicationClose);
22
+ }
23
+ }
24
+ async connect() {
25
+ return this.connection.connect();
26
+ }
27
+ hasSession() {
28
+ return this.connection.hasSession();
29
+ }
30
+ isPublicSession() {
31
+ return this.connection.isPublicSession();
32
+ }
33
+ async logIn(request, encrypt = true) {
34
+ return this.connection.login(request, encrypt);
35
+ }
36
+ async confirmCode(upId, userName, confirmationCode, clientDeviceFingerprint, clientDeviceDescription, rememberClientDeviceForMFA) {
37
+ return this.connection.confirmCode(upId, userName, confirmationCode, clientDeviceFingerprint, clientDeviceDescription, rememberClientDeviceForMFA);
38
+ }
39
+ async resetGoogleAuth(upId, userName) {
40
+ return this.connection.resetGoogleAuth(upId, userName);
41
+ }
42
+ async changePassword(password, securityCode, upId) {
43
+ return this.connection.changePassword(password, securityCode, upId);
44
+ }
45
+ async changePasswordAndActivateUser(password, securityCode, upId, reCaptchaResponse) {
46
+ return this.connection.changePasswordAndActivateUser(password, securityCode, upId, reCaptchaResponse);
47
+ }
48
+ async sendResetPasswordOrInviteMessage(upId, userName, reCaptchaResponse) {
49
+ return this.connection.sendResetPasswordOrInviteMessage(upId, userName, reCaptchaResponse);
50
+ }
51
+ async getUserNameBySecurityCode(securityCode, upId) {
52
+ return this.connection.getUserNameBySecurityCode(securityCode, upId);
53
+ }
54
+ async logOut() {
55
+ return this.connection.close();
56
+ }
57
+ async getPublicKey() {
58
+ return this.connection.getPublicKey();
59
+ }
60
+ async call(method, data, showLoader, service, endPoint, ownMessage) {
61
+ return await this.connection.call(method, data, showLoader, service, endPoint, false, ownMessage);
62
+ }
63
+ _handleConnectionReset() {
64
+ this.connectionResetInactivity.next();
65
+ }
66
+ }
67
+ exports.Connector = Connector;
65
68
  //# sourceMappingURL=connector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"connector.js","sourceRoot":"","sources":["../src/connector.ts"],"names":[],"mappings":";;;AACA,+BAA2C;AAC3C,0DAAoD;AAQpD,MAAa,SAAS;IAWlB,YAAY,OAAiB;QATZ,SAAI,GAAmB,EAAE,CAAC;QAK3B,eAAU,GAAqB,IAAI,cAAO,EAAW,CAAC;QACtD,sBAAiB,GAAkB,IAAI,cAAO,EAAQ,CAAC;QACvD,8BAAyB,GAAkB,IAAI,cAAO,EAAQ,CAAC;QA6EvE,sBAAiB,GAAG,GAAG,EAAE;YAC7B,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;YACxB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;YACxC,MAAM,CAAC,mBAAmB,CAAC,cAAc,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;YACnE,OAAO,IAAI,CAAC;QAChB,CAAC,CAAA;QA/EG,IAAI,CAAC,UAAU,GAAG,IAAI,0BAAW,CAAC,OAAO,CAAC,CAAC;QAE3C,IAAI,CAAC,IAAI,CAAC,IAAI,CACV,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EA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E,IAAY;QACrE,OAAO,IAAI,CAAC,UAAU,CAAC,yBAAyB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IACzE,CAAC;IAEM,KAAK,CAAC,MAAM;QACf,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IACnC,CAAC;IAEM,KAAK,CAAC,YAAY;QACrB,OAAO,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC;IAC1C,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,MAAc,EAAE,IAAgD,EAC9E,UAAmB,EAAE,OAAe,EAAE,QAAiB,EAAE,UAAe;QACxE,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;IACtG,CAAC;IAEO,sBAAsB;QAC1B,IAAI,CAAC,yBAAyB,CAAC,IAAI,EAAE,CAAC;IAC1C,CAAC;CAQJ;AAhGD,8BAgGC"}
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,109 +1,109 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const connector_1 = require("./connector");
4
- const login_request_1 = require("./model/login-request");
5
- const login_status_enum_1 = require("./enum/login-status.enum");
6
- const optionsPrivate = {
7
- url: 'http://localhost:8080/ione',
8
- schema: '815',
9
- version: '252',
10
- useLoginEncryption: true,
11
- username: 'patrick',
12
- password: 'vankeulen1234567890!'
13
- };
14
- const optionsPrivateEmpty = {
15
- url: 'http://localhost:8080/ione',
16
- jwtEnabled: false
17
- };
18
- const optionsPublic = {
19
- url: 'http://localhost:8080/ione',
20
- schema: '815',
21
- version: '252'
22
- };
23
- const optionsKeycloak = {
24
- url: 'http://130.62.7.57:8894/ione-branch/',
25
- schema: '815',
26
- version: '253'
27
- };
28
- describe("Connector", () => {
29
- let connectorPrivate;
30
- let connectorPrivateEmpty;
31
- let connectorPublic;
32
- let connectorKeycloak;
33
- beforeEach(() => {
34
- connectorPrivate = new connector_1.Connector(optionsPrivate);
35
- connectorPrivateEmpty = new connector_1.Connector(optionsPrivateEmpty);
36
- connectorPublic = new connector_1.Connector(optionsPublic);
37
- connectorKeycloak = new connector_1.Connector(optionsKeycloak);
38
- });
39
- it('shouldReturnSomeDataPrivateMode', async () => {
40
- const data = {
41
- methodName: 'articleQuickSel',
42
- moduleName: 'Articles',
43
- refCursorAsArray: true,
44
- parameterValues: {
45
- goodId: '7497142',
46
- branchNr: '1'
47
- }
48
- };
49
- jest.setTimeout(30000);
50
- return connectorPrivate.call('executeMethod', data, false, 'dataservice', 'ajaxservice').then((response) => {
51
- expect(response.validationResult.success).toBeTruthy();
52
- });
53
- });
54
- it('shouldReturnSomeDataPublicMode', async () => {
55
- const data = {
56
- parameterValues: {
57
- goodId: '7497142',
58
- branchNr: '1'
59
- }
60
- };
61
- jest.setTimeout(30000);
62
- return connectorPublic.call('articleQuickSel', data, false, undefined, 'publicservice').then((response) => {
63
- expect(response.validationResult.success).toBeTruthy();
64
- });
65
- });
66
- it('shouldWaitForLogin', async () => {
67
- const firstCallData = {
68
- objectName: 'ArticleCategory',
69
- moduleName: 'Articles',
70
- refCursorAsArray: true,
71
- parameterValues: {
72
- publicationCode: 64
73
- }
74
- };
75
- const secondCallData = {
76
- objectName: 'CatalogDefinition',
77
- moduleName: 'simpleBaseData',
78
- refCursorAsArray: true,
79
- parameterValues: {
80
- publicationCode: 64
81
- }
82
- };
83
- jest.setTimeout(30000);
84
- const promises = [];
85
- connectorPrivate.call('selectMultipleObjects', firstCallData, false, 'dataservice', 'ajaxservice'),
86
- connectorPrivate.call('selectMultipleObjects', secondCallData, false, 'dataservice', 'ajaxservice');
87
- Promise.all(promises).then((responses) => {
88
- });
89
- });
90
- it('login', async () => {
91
- const loginRequest = new login_request_1.LoginRequest();
92
- loginRequest.upId = 815;
93
- loginRequest.userName = 'patrick';
94
- loginRequest.userPassword = 'patricksdfg';
95
- loginRequest.clientVersion = '252';
96
- loginRequest.clientLanguage = 'nl';
97
- const response = await connectorPrivateEmpty.logIn(loginRequest);
98
- expect(response.loginStatus === login_status_enum_1.LoginStatus.SUCCESS).toBeTruthy();
99
- });
100
- it('logout', async () => {
101
- const response = await connectorPrivateEmpty.logOut();
102
- expect(response.validationResult.success).toBeTruthy();
103
- });
104
- it('connect', async () => {
105
- const response = await connectorKeycloak.connect();
106
- expect(response && response.loginStatus === login_status_enum_1.LoginStatus.SUCCESS).toBeTruthy();
107
- });
108
- });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const connector_1 = require("./connector");
4
+ const login_request_1 = require("./model/login-request");
5
+ const login_status_enum_1 = require("./enum/login-status.enum");
6
+ const optionsPrivate = {
7
+ url: 'http://localhost:8080/ione',
8
+ schema: '815',
9
+ version: '252',
10
+ useLoginEncryption: true,
11
+ username: 'patrick',
12
+ password: 'vankeulen1234567890!'
13
+ };
14
+ const optionsPrivateEmpty = {
15
+ url: 'http://localhost:8080/ione',
16
+ jwtEnabled: false
17
+ };
18
+ const optionsPublic = {
19
+ url: 'http://localhost:8080/ione',
20
+ schema: '815',
21
+ version: '252'
22
+ };
23
+ const optionsKeycloak = {
24
+ url: 'http://130.62.7.57:8894/ione-branch/',
25
+ schema: '815',
26
+ version: '253'
27
+ };
28
+ describe("Connector", () => {
29
+ let connectorPrivate;
30
+ let connectorPrivateEmpty;
31
+ let connectorPublic;
32
+ let connectorKeycloak;
33
+ beforeEach(() => {
34
+ connectorPrivate = new connector_1.Connector(optionsPrivate);
35
+ connectorPrivateEmpty = new connector_1.Connector(optionsPrivateEmpty);
36
+ connectorPublic = new connector_1.Connector(optionsPublic);
37
+ connectorKeycloak = new connector_1.Connector(optionsKeycloak);
38
+ });
39
+ it('shouldReturnSomeDataPrivateMode', async () => {
40
+ const data = {
41
+ methodName: 'articleQuickSel',
42
+ moduleName: 'Articles',
43
+ refCursorAsArray: true,
44
+ parameterValues: {
45
+ goodId: '7497142',
46
+ branchNr: '1'
47
+ }
48
+ };
49
+ jest.setTimeout(30000);
50
+ return connectorPrivate.call('executeMethod', data, false, 'dataservice', 'ajaxservice').then((response) => {
51
+ expect(response.validationResult.success).toBeTruthy();
52
+ });
53
+ });
54
+ it('shouldReturnSomeDataPublicMode', async () => {
55
+ const data = {
56
+ parameterValues: {
57
+ goodId: '7497142',
58
+ branchNr: '1'
59
+ }
60
+ };
61
+ jest.setTimeout(30000);
62
+ return connectorPublic.call('articleQuickSel', data, false, undefined, 'publicservice').then((response) => {
63
+ expect(response.validationResult.success).toBeTruthy();
64
+ });
65
+ });
66
+ it('shouldWaitForLogin', async () => {
67
+ const firstCallData = {
68
+ objectName: 'ArticleCategory',
69
+ moduleName: 'Articles',
70
+ refCursorAsArray: true,
71
+ parameterValues: {
72
+ publicationCode: 64
73
+ }
74
+ };
75
+ const secondCallData = {
76
+ objectName: 'CatalogDefinition',
77
+ moduleName: 'simpleBaseData',
78
+ refCursorAsArray: true,
79
+ parameterValues: {
80
+ publicationCode: 64
81
+ }
82
+ };
83
+ jest.setTimeout(30000);
84
+ const promises = [];
85
+ connectorPrivate.call('selectMultipleObjects', firstCallData, false, 'dataservice', 'ajaxservice'),
86
+ connectorPrivate.call('selectMultipleObjects', secondCallData, false, 'dataservice', 'ajaxservice');
87
+ Promise.all(promises).then((responses) => {
88
+ });
89
+ });
90
+ it('login', async () => {
91
+ const loginRequest = new login_request_1.LoginRequest();
92
+ loginRequest.upId = 815;
93
+ loginRequest.userName = 'patrick';
94
+ loginRequest.userPassword = 'patricksdfg';
95
+ loginRequest.clientVersion = '252';
96
+ loginRequest.clientLanguage = 'nl';
97
+ const response = await connectorPrivateEmpty.logIn(loginRequest);
98
+ expect(response.loginStatus === login_status_enum_1.LoginStatus.SUCCESS).toBeTruthy();
99
+ });
100
+ it('logout', async () => {
101
+ const response = await connectorPrivateEmpty.logOut();
102
+ expect(response.validationResult.success).toBeTruthy();
103
+ });
104
+ it('connect', async () => {
105
+ const response = await connectorKeycloak.connect();
106
+ expect(response && response.loginStatus === login_status_enum_1.LoginStatus.SUCCESS).toBeTruthy();
107
+ });
108
+ });
109
109
  //# sourceMappingURL=connector.unit.test.js.map
@@ -1,6 +1,6 @@
1
- export declare enum ActivateUserAccountStatus {
2
- SUCCESS = "SUCCESS",
3
- ACCOUNT_IS_ALREADY_ACTIVE = "ACCOUNT_IS_ALREADY_ACTIVE",
4
- ACCOUNT_IS_DEACTIVATED = "ACCOUNT_IS_DEACTIVATED",
5
- NOT_VALID_SECURITY_CODE = "NOT_VALID_SECURITY_CODE"
6
- }
1
+ export declare enum ActivateUserAccountStatus {
2
+ SUCCESS = "SUCCESS",
3
+ ACCOUNT_IS_ALREADY_ACTIVE = "ACCOUNT_IS_ALREADY_ACTIVE",
4
+ ACCOUNT_IS_DEACTIVATED = "ACCOUNT_IS_DEACTIVATED",
5
+ NOT_VALID_SECURITY_CODE = "NOT_VALID_SECURITY_CODE"
6
+ }
@@ -1,11 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ActivateUserAccountStatus = void 0;
4
- var ActivateUserAccountStatus;
5
- (function (ActivateUserAccountStatus) {
6
- ActivateUserAccountStatus["SUCCESS"] = "SUCCESS";
7
- ActivateUserAccountStatus["ACCOUNT_IS_ALREADY_ACTIVE"] = "ACCOUNT_IS_ALREADY_ACTIVE";
8
- ActivateUserAccountStatus["ACCOUNT_IS_DEACTIVATED"] = "ACCOUNT_IS_DEACTIVATED";
9
- ActivateUserAccountStatus["NOT_VALID_SECURITY_CODE"] = "NOT_VALID_SECURITY_CODE";
10
- })(ActivateUserAccountStatus = exports.ActivateUserAccountStatus || (exports.ActivateUserAccountStatus = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActivateUserAccountStatus = void 0;
4
+ var ActivateUserAccountStatus;
5
+ (function (ActivateUserAccountStatus) {
6
+ ActivateUserAccountStatus["SUCCESS"] = "SUCCESS";
7
+ ActivateUserAccountStatus["ACCOUNT_IS_ALREADY_ACTIVE"] = "ACCOUNT_IS_ALREADY_ACTIVE";
8
+ ActivateUserAccountStatus["ACCOUNT_IS_DEACTIVATED"] = "ACCOUNT_IS_DEACTIVATED";
9
+ ActivateUserAccountStatus["NOT_VALID_SECURITY_CODE"] = "NOT_VALID_SECURITY_CODE";
10
+ })(ActivateUserAccountStatus = exports.ActivateUserAccountStatus || (exports.ActivateUserAccountStatus = {}));
11
11
  //# sourceMappingURL=activate-user-account-status.enum.js.map
@@ -1,4 +1,4 @@
1
- export declare enum AddressFormat {
2
- Standard = "1",
3
- VS = "2"
4
- }
1
+ export declare enum AddressFormat {
2
+ Standard = "1",
3
+ VS = "2"
4
+ }
@@ -1,9 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AddressFormat = void 0;
4
- var AddressFormat;
5
- (function (AddressFormat) {
6
- AddressFormat["Standard"] = "1";
7
- AddressFormat["VS"] = "2";
8
- })(AddressFormat = exports.AddressFormat || (exports.AddressFormat = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AddressFormat = void 0;
4
+ var AddressFormat;
5
+ (function (AddressFormat) {
6
+ AddressFormat["Standard"] = "1";
7
+ AddressFormat["VS"] = "2";
8
+ })(AddressFormat = exports.AddressFormat || (exports.AddressFormat = {}));
9
9
  //# sourceMappingURL=address-format.enum.js.map
@@ -1,6 +1,6 @@
1
- export declare enum BackendLanguageCode {
2
- Dutch = "nl",
3
- English = "en",
4
- German = "de",
5
- French = "fr"
6
- }
1
+ export declare enum BackendLanguageCode {
2
+ Dutch = "nl",
3
+ English = "en",
4
+ German = "de",
5
+ French = "fr"
6
+ }
@@ -1,11 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BackendLanguageCode = void 0;
4
- var BackendLanguageCode;
5
- (function (BackendLanguageCode) {
6
- BackendLanguageCode["Dutch"] = "nl";
7
- BackendLanguageCode["English"] = "en";
8
- BackendLanguageCode["German"] = "de";
9
- BackendLanguageCode["French"] = "fr";
10
- })(BackendLanguageCode = exports.BackendLanguageCode || (exports.BackendLanguageCode = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BackendLanguageCode = void 0;
4
+ var BackendLanguageCode;
5
+ (function (BackendLanguageCode) {
6
+ BackendLanguageCode["Dutch"] = "nl";
7
+ BackendLanguageCode["English"] = "en";
8
+ BackendLanguageCode["German"] = "de";
9
+ BackendLanguageCode["French"] = "fr";
10
+ })(BackendLanguageCode = exports.BackendLanguageCode || (exports.BackendLanguageCode = {}));
11
11
  //# sourceMappingURL=backend-language-code.enum.js.map
@@ -1,6 +1,7 @@
1
- export declare enum BackendServiceName {
2
- LoginService = "login",
3
- DatasessionService = "datasessionservice",
4
- PublicService = "publicservice",
5
- HealthService = "healthservice"
6
- }
1
+ export declare enum BackendServiceName {
2
+ LoginService = "login",
3
+ DatasessionService = "datasessionservice",
4
+ PublicService = "publicservice",
5
+ HealthService = "healthservice",
6
+ UserInfoService = "userinfoservice"
7
+ }
@@ -1,11 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BackendServiceName = void 0;
4
- var BackendServiceName;
5
- (function (BackendServiceName) {
6
- BackendServiceName["LoginService"] = "login";
7
- BackendServiceName["DatasessionService"] = "datasessionservice";
8
- BackendServiceName["PublicService"] = "publicservice";
9
- BackendServiceName["HealthService"] = "healthservice";
10
- })(BackendServiceName = exports.BackendServiceName || (exports.BackendServiceName = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BackendServiceName = void 0;
4
+ var BackendServiceName;
5
+ (function (BackendServiceName) {
6
+ BackendServiceName["LoginService"] = "login";
7
+ BackendServiceName["DatasessionService"] = "datasessionservice";
8
+ BackendServiceName["PublicService"] = "publicservice";
9
+ BackendServiceName["HealthService"] = "healthservice";
10
+ BackendServiceName["UserInfoService"] = "userinfoservice";
11
+ })(BackendServiceName = exports.BackendServiceName || (exports.BackendServiceName = {}));
11
12
  //# sourceMappingURL=backend-service-name.enum.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"backend-service-name.enum.js","sourceRoot":"","sources":["../../src/enum/backend-service-name.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC1B,4CAAsB,CAAA;IACtB,+DAAyC,CAAA;IACzC,qDAA+B,CAAA;IAC/B,qDAA+B,CAAA;AACnC,CAAC,EALW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAK7B"}
1
+ {"version":3,"file":"backend-service-name.enum.js","sourceRoot":"","sources":["../../src/enum/backend-service-name.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC1B,4CAAsB,CAAA;IACtB,+DAAyC,CAAA;IACzC,qDAA+B,CAAA;IAC/B,qDAA+B,CAAA;IAC/B,yDAAmC,CAAA;AACvC,CAAC,EANW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAM7B"}
@@ -1,8 +1,8 @@
1
- export declare enum CommunicationType {
2
- Chat = "C",
3
- Email = "E",
4
- Fax = "F",
5
- Mobile = "G",
6
- Telephone = "T",
7
- Website = "W"
8
- }
1
+ export declare enum CommunicationType {
2
+ Chat = "C",
3
+ Email = "E",
4
+ Fax = "F",
5
+ Mobile = "G",
6
+ Telephone = "T",
7
+ Website = "W"
8
+ }
@@ -1,13 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CommunicationType = void 0;
4
- var CommunicationType;
5
- (function (CommunicationType) {
6
- CommunicationType["Chat"] = "C";
7
- CommunicationType["Email"] = "E";
8
- CommunicationType["Fax"] = "F";
9
- CommunicationType["Mobile"] = "G";
10
- CommunicationType["Telephone"] = "T";
11
- CommunicationType["Website"] = "W";
12
- })(CommunicationType = exports.CommunicationType || (exports.CommunicationType = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CommunicationType = void 0;
4
+ var CommunicationType;
5
+ (function (CommunicationType) {
6
+ CommunicationType["Chat"] = "C";
7
+ CommunicationType["Email"] = "E";
8
+ CommunicationType["Fax"] = "F";
9
+ CommunicationType["Mobile"] = "G";
10
+ CommunicationType["Telephone"] = "T";
11
+ CommunicationType["Website"] = "W";
12
+ })(CommunicationType = exports.CommunicationType || (exports.CommunicationType = {}));
13
13
  //# sourceMappingURL=communication-type.enum.js.map