@buildery/ts-api-kit 6.2.1 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (359) hide show
  1. package/dist/Api.d.ts +21 -21
  2. package/dist/Api.js +38 -42
  3. package/dist/Api.js.map +1 -1
  4. package/dist/ApiConfigs.js +12 -16
  5. package/dist/ApiConfigs.js.map +1 -1
  6. package/dist/compose/index.d.ts +1 -1
  7. package/dist/compose/index.js +1 -17
  8. package/dist/compose/index.js.map +1 -1
  9. package/dist/compose/useSingleton.d.ts +1 -1
  10. package/dist/compose/useSingleton.js +6 -10
  11. package/dist/compose/useSingleton.js.map +1 -1
  12. package/dist/constants.d.ts +1 -1
  13. package/dist/constants.js +8 -11
  14. package/dist/constants.js.map +1 -1
  15. package/dist/features/api/AbstractApi.d.ts +1 -1
  16. package/dist/features/api/AbstractApi.js +4 -9
  17. package/dist/features/api/AbstractApi.js.map +1 -1
  18. package/dist/features/api/index.d.ts +1 -1
  19. package/dist/features/api/index.js +1 -17
  20. package/dist/features/api/index.js.map +1 -1
  21. package/dist/features/auth/errors/AuthError.js +1 -5
  22. package/dist/features/auth/errors/AuthError.js.map +1 -1
  23. package/dist/features/auth/errors/index.d.ts +1 -1
  24. package/dist/features/auth/errors/index.js +1 -17
  25. package/dist/features/auth/errors/index.js.map +1 -1
  26. package/dist/features/auth/index.d.ts +3 -3
  27. package/dist/features/auth/index.js +3 -19
  28. package/dist/features/auth/index.js.map +1 -1
  29. package/dist/features/auth/services/AuthAxiosService.js +10 -15
  30. package/dist/features/auth/services/AuthAxiosService.js.map +1 -1
  31. package/dist/features/auth/services/AuthService.d.ts +2 -2
  32. package/dist/features/auth/services/AuthService.js +5 -9
  33. package/dist/features/auth/services/AuthService.js.map +1 -1
  34. package/dist/features/auth/services/AuthTokensService.d.ts +5 -5
  35. package/dist/features/auth/services/AuthTokensService.js +14 -18
  36. package/dist/features/auth/services/AuthTokensService.js.map +1 -1
  37. package/dist/features/auth/services/index.d.ts +3 -3
  38. package/dist/features/auth/services/index.js +3 -19
  39. package/dist/features/auth/services/index.js.map +1 -1
  40. package/dist/features/auth/types/AuthActivateUser.js +1 -2
  41. package/dist/features/auth/types/AuthApiTokens.js +1 -2
  42. package/dist/features/auth/types/AuthChangePassword.js +1 -2
  43. package/dist/features/auth/types/AuthCode.js +1 -2
  44. package/dist/features/auth/types/AuthConfirmResetPassword.js +1 -2
  45. package/dist/features/auth/types/AuthSignIn.js +1 -2
  46. package/dist/features/auth/types/AuthUserJWT.js +1 -2
  47. package/dist/features/auth/types/index.d.ts +7 -7
  48. package/dist/features/auth/types/index.js +7 -23
  49. package/dist/features/auth/types/index.js.map +1 -1
  50. package/dist/features/callout/Callout.d.ts +2 -2
  51. package/dist/features/callout/Callout.js +11 -14
  52. package/dist/features/callout/Callout.js.map +1 -1
  53. package/dist/features/callout/CalloutMiddlewareService.d.ts +2 -2
  54. package/dist/features/callout/CalloutMiddlewareService.js +6 -10
  55. package/dist/features/callout/CalloutMiddlewareService.js.map +1 -1
  56. package/dist/features/callout/CalloutMiddlewares.d.ts +1 -1
  57. package/dist/features/callout/CalloutMiddlewares.js +9 -13
  58. package/dist/features/callout/CalloutMiddlewares.js.map +1 -1
  59. package/dist/features/callout/Calloutable.d.ts +2 -2
  60. package/dist/features/callout/Calloutable.js +6 -10
  61. package/dist/features/callout/Calloutable.js.map +1 -1
  62. package/dist/features/callout/index.d.ts +5 -5
  63. package/dist/features/callout/index.js +5 -21
  64. package/dist/features/callout/index.js.map +1 -1
  65. package/dist/features/callout/types.d.ts +2 -2
  66. package/dist/features/callout/types.js +1 -2
  67. package/dist/features/crud/index.d.ts +2 -2
  68. package/dist/features/crud/index.js +2 -18
  69. package/dist/features/crud/index.js.map +1 -1
  70. package/dist/features/crud/operations/abstract/AbstractCRUDApi.d.ts +2 -2
  71. package/dist/features/crud/operations/abstract/AbstractCRUDApi.js +3 -6
  72. package/dist/features/crud/operations/abstract/AbstractCRUDApi.js.map +1 -1
  73. package/dist/features/crud/operations/abstract/index.d.ts +1 -1
  74. package/dist/features/crud/operations/abstract/index.js +1 -17
  75. package/dist/features/crud/operations/abstract/index.js.map +1 -1
  76. package/dist/features/crud/operations/index.d.ts +2 -2
  77. package/dist/features/crud/operations/index.js +2 -18
  78. package/dist/features/crud/operations/index.js.map +1 -1
  79. package/dist/features/crud/operations/operations/Create.d.ts +1 -1
  80. package/dist/features/crud/operations/operations/Create.js +5 -10
  81. package/dist/features/crud/operations/operations/Create.js.map +1 -1
  82. package/dist/features/crud/operations/operations/CreateBulk.d.ts +1 -1
  83. package/dist/features/crud/operations/operations/CreateBulk.js +5 -9
  84. package/dist/features/crud/operations/operations/CreateBulk.js.map +1 -1
  85. package/dist/features/crud/operations/operations/DeleteByFilters.d.ts +1 -1
  86. package/dist/features/crud/operations/operations/DeleteByFilters.js +5 -9
  87. package/dist/features/crud/operations/operations/DeleteByFilters.js.map +1 -1
  88. package/dist/features/crud/operations/operations/DeleteById.d.ts +1 -1
  89. package/dist/features/crud/operations/operations/DeleteById.js +6 -10
  90. package/dist/features/crud/operations/operations/DeleteById.js.map +1 -1
  91. package/dist/features/crud/operations/operations/DeleteByIds.d.ts +1 -1
  92. package/dist/features/crud/operations/operations/DeleteByIds.js +7 -11
  93. package/dist/features/crud/operations/operations/DeleteByIds.js.map +1 -1
  94. package/dist/features/crud/operations/operations/GetAll.d.ts +1 -1
  95. package/dist/features/crud/operations/operations/GetAll.js +6 -10
  96. package/dist/features/crud/operations/operations/GetAll.js.map +1 -1
  97. package/dist/features/crud/operations/operations/GetByFilters.d.ts +2 -2
  98. package/dist/features/crud/operations/operations/GetByFilters.js +6 -10
  99. package/dist/features/crud/operations/operations/GetByFilters.js.map +1 -1
  100. package/dist/features/crud/operations/operations/GetById.d.ts +1 -1
  101. package/dist/features/crud/operations/operations/GetById.js +6 -10
  102. package/dist/features/crud/operations/operations/GetById.js.map +1 -1
  103. package/dist/features/crud/operations/operations/GetByIds.d.ts +1 -1
  104. package/dist/features/crud/operations/operations/GetByIds.js +6 -10
  105. package/dist/features/crud/operations/operations/GetByIds.js.map +1 -1
  106. package/dist/features/crud/operations/operations/Update.d.ts +1 -1
  107. package/dist/features/crud/operations/operations/Update.js +6 -10
  108. package/dist/features/crud/operations/operations/Update.js.map +1 -1
  109. package/dist/features/crud/operations/operations/UpdateBulk.d.ts +1 -1
  110. package/dist/features/crud/operations/operations/UpdateBulk.js +6 -10
  111. package/dist/features/crud/operations/operations/UpdateBulk.js.map +1 -1
  112. package/dist/features/crud/operations/operations/Upsert.d.ts +1 -1
  113. package/dist/features/crud/operations/operations/Upsert.js +6 -10
  114. package/dist/features/crud/operations/operations/Upsert.js.map +1 -1
  115. package/dist/features/crud/operations/operations/UpsertBulk.d.ts +1 -1
  116. package/dist/features/crud/operations/operations/UpsertBulk.js +6 -10
  117. package/dist/features/crud/operations/operations/UpsertBulk.js.map +1 -1
  118. package/dist/features/crud/operations/operations/index.d.ts +13 -13
  119. package/dist/features/crud/operations/operations/index.js +13 -29
  120. package/dist/features/crud/operations/operations/index.js.map +1 -1
  121. package/dist/features/crud/sync/compose/index.d.ts +1 -1
  122. package/dist/features/crud/sync/compose/index.js +1 -17
  123. package/dist/features/crud/sync/compose/index.js.map +1 -1
  124. package/dist/features/crud/sync/compose/useCrudSync.d.ts +4 -4
  125. package/dist/features/crud/sync/compose/useCrudSync.js +34 -33
  126. package/dist/features/crud/sync/compose/useCrudSync.js.map +1 -1
  127. package/dist/features/crud/sync/constants/CrudSyncAction.js +2 -5
  128. package/dist/features/crud/sync/constants/CrudSyncAction.js.map +1 -1
  129. package/dist/features/crud/sync/constants/CrudSyncConstants.js +1 -4
  130. package/dist/features/crud/sync/constants/CrudSyncConstants.js.map +1 -1
  131. package/dist/features/crud/sync/constants/index.d.ts +2 -2
  132. package/dist/features/crud/sync/constants/index.js +2 -18
  133. package/dist/features/crud/sync/constants/index.js.map +1 -1
  134. package/dist/features/crud/sync/error/CrudSyncError.js +1 -5
  135. package/dist/features/crud/sync/error/CrudSyncError.js.map +1 -1
  136. package/dist/features/crud/sync/error/index.d.ts +1 -1
  137. package/dist/features/crud/sync/error/index.js +1 -17
  138. package/dist/features/crud/sync/error/index.js.map +1 -1
  139. package/dist/features/crud/sync/index.d.ts +6 -6
  140. package/dist/features/crud/sync/index.js +6 -22
  141. package/dist/features/crud/sync/index.js.map +1 -1
  142. package/dist/features/crud/sync/middlewares/PushCrudEvent.d.ts +3 -3
  143. package/dist/features/crud/sync/middlewares/PushCrudEvent.js +6 -10
  144. package/dist/features/crud/sync/middlewares/PushCrudEvent.js.map +1 -1
  145. package/dist/features/crud/sync/middlewares/index.d.ts +1 -1
  146. package/dist/features/crud/sync/middlewares/index.js +1 -17
  147. package/dist/features/crud/sync/middlewares/index.js.map +1 -1
  148. package/dist/features/crud/sync/services/CrudSyncService.d.ts +1 -1
  149. package/dist/features/crud/sync/services/CrudSyncService.js +3 -7
  150. package/dist/features/crud/sync/services/CrudSyncService.js.map +1 -1
  151. package/dist/features/crud/sync/services/index.d.ts +1 -1
  152. package/dist/features/crud/sync/services/index.js +1 -17
  153. package/dist/features/crud/sync/services/index.js.map +1 -1
  154. package/dist/features/crud/sync/sync/CrudSyncCreate.d.ts +2 -2
  155. package/dist/features/crud/sync/sync/CrudSyncCreate.js +6 -10
  156. package/dist/features/crud/sync/sync/CrudSyncCreate.js.map +1 -1
  157. package/dist/features/crud/sync/sync/CrudSyncDelete.d.ts +2 -2
  158. package/dist/features/crud/sync/sync/CrudSyncDelete.js +6 -10
  159. package/dist/features/crud/sync/sync/CrudSyncDelete.js.map +1 -1
  160. package/dist/features/crud/sync/sync/CrudSyncUpdate.d.ts +2 -2
  161. package/dist/features/crud/sync/sync/CrudSyncUpdate.js +6 -10
  162. package/dist/features/crud/sync/sync/CrudSyncUpdate.js.map +1 -1
  163. package/dist/features/crud/sync/sync/CrudSyncUpsert.d.ts +2 -2
  164. package/dist/features/crud/sync/sync/CrudSyncUpsert.js +5 -9
  165. package/dist/features/crud/sync/sync/CrudSyncUpsert.js.map +1 -1
  166. package/dist/features/crud/sync/sync/abstract/AbstractCrudSync.d.ts +1 -1
  167. package/dist/features/crud/sync/sync/abstract/AbstractCrudSync.js +4 -8
  168. package/dist/features/crud/sync/sync/abstract/AbstractCrudSync.js.map +1 -1
  169. package/dist/features/crud/sync/sync/abstract/index.d.ts +1 -1
  170. package/dist/features/crud/sync/sync/abstract/index.js +1 -17
  171. package/dist/features/crud/sync/sync/abstract/index.js.map +1 -1
  172. package/dist/features/crud/sync/sync/index.d.ts +5 -5
  173. package/dist/features/crud/sync/sync/index.js +5 -21
  174. package/dist/features/crud/sync/sync/index.js.map +1 -1
  175. package/dist/features/index.d.ts +4 -4
  176. package/dist/features/index.js +4 -20
  177. package/dist/features/index.js.map +1 -1
  178. package/dist/index.d.ts +8 -8
  179. package/dist/index.js +14 -33
  180. package/dist/index.js.map +1 -1
  181. package/dist/main.d.ts +1 -0
  182. package/dist/main.js +1 -0
  183. package/dist/micro/auth/AuthApi.d.ts +1 -1
  184. package/dist/micro/auth/AuthApi.js +20 -24
  185. package/dist/micro/auth/AuthApi.js.map +1 -1
  186. package/dist/micro/auth/WorkspaceApi.d.ts +1 -1
  187. package/dist/micro/auth/WorkspaceApi.js +6 -10
  188. package/dist/micro/auth/WorkspaceApi.js.map +1 -1
  189. package/dist/micro/auth/index.d.ts +2 -2
  190. package/dist/micro/auth/index.js +2 -18
  191. package/dist/micro/auth/index.js.map +1 -1
  192. package/dist/micro/auth/types/InitWorkspace.d.ts +1 -1
  193. package/dist/micro/auth/types/InitWorkspace.js +1 -2
  194. package/dist/micro/auth/types/index.d.ts +1 -1
  195. package/dist/micro/auth/types/index.js +1 -17
  196. package/dist/micro/auth/types/index.js.map +1 -1
  197. package/dist/micro/blueprint/types.js +1 -2
  198. package/dist/micro/index.d.ts +4 -4
  199. package/dist/micro/index.js +4 -20
  200. package/dist/micro/index.js.map +1 -1
  201. package/dist/micro/query/FieldApi.d.ts +2 -2
  202. package/dist/micro/query/FieldApi.js +7 -11
  203. package/dist/micro/query/FieldApi.js.map +1 -1
  204. package/dist/micro/query/SObjectApi.d.ts +1 -1
  205. package/dist/micro/query/SObjectApi.js +4 -8
  206. package/dist/micro/query/SObjectApi.js.map +1 -1
  207. package/dist/micro/query/error/ObjectApiError.js +1 -5
  208. package/dist/micro/query/error/ObjectApiError.js.map +1 -1
  209. package/dist/micro/query/error/index.d.ts +1 -1
  210. package/dist/micro/query/error/index.js +1 -17
  211. package/dist/micro/query/error/index.js.map +1 -1
  212. package/dist/micro/query/index.d.ts +4 -4
  213. package/dist/micro/query/index.js +4 -20
  214. package/dist/micro/query/index.js.map +1 -1
  215. package/dist/micro/query/types/FieldType.js +2 -5
  216. package/dist/micro/query/types/FieldType.js.map +1 -1
  217. package/dist/micro/query/types/PicklistValue.js +1 -2
  218. package/dist/micro/query/types/SObject.d.ts +1 -1
  219. package/dist/micro/query/types/SObject.js +1 -2
  220. package/dist/micro/query/types/SObjectField.d.ts +3 -3
  221. package/dist/micro/query/types/SObjectField.js +1 -2
  222. package/dist/micro/query/types/index.d.ts +4 -4
  223. package/dist/micro/query/types/index.js +4 -20
  224. package/dist/micro/query/types/index.js.map +1 -1
  225. package/dist/micro/security/PermissionApi.d.ts +2 -2
  226. package/dist/micro/security/PermissionApi.js +7 -11
  227. package/dist/micro/security/PermissionApi.js.map +1 -1
  228. package/dist/micro/security/PermissionCategoryApi.d.ts +1 -1
  229. package/dist/micro/security/PermissionCategoryApi.js +4 -8
  230. package/dist/micro/security/PermissionCategoryApi.js.map +1 -1
  231. package/dist/micro/security/PermissionSetApi.d.ts +2 -2
  232. package/dist/micro/security/PermissionSetApi.js +6 -10
  233. package/dist/micro/security/PermissionSetApi.js.map +1 -1
  234. package/dist/micro/security/TeamApi.d.ts +2 -2
  235. package/dist/micro/security/TeamApi.js +6 -10
  236. package/dist/micro/security/TeamApi.js.map +1 -1
  237. package/dist/micro/security/index.d.ts +5 -5
  238. package/dist/micro/security/index.js +5 -21
  239. package/dist/micro/security/index.js.map +1 -1
  240. package/dist/micro/security/types/CalculatedPermissionAssignment.js +1 -2
  241. package/dist/micro/security/types/Permission.js +1 -2
  242. package/dist/micro/security/types/PermissionAssignment.js +1 -2
  243. package/dist/micro/security/types/PermissionCategory.js +1 -2
  244. package/dist/micro/security/types/PermissionDefinition.js +1 -2
  245. package/dist/micro/security/types/PermissionGroup.js +1 -2
  246. package/dist/micro/security/types/PermissionSet.d.ts +1 -1
  247. package/dist/micro/security/types/PermissionSet.js +1 -2
  248. package/dist/micro/security/types/PermissionSetAssignment.js +1 -2
  249. package/dist/micro/security/types/Team.d.ts +1 -1
  250. package/dist/micro/security/types/Team.js +1 -2
  251. package/dist/micro/security/types/TeamAssignment.js +1 -2
  252. package/dist/micro/security/types/index.d.ts +10 -10
  253. package/dist/micro/security/types/index.js +10 -26
  254. package/dist/micro/security/types/index.js.map +1 -1
  255. package/dist/micro/workspace/ModuleApi.d.ts +2 -2
  256. package/dist/micro/workspace/ModuleApi.js +7 -11
  257. package/dist/micro/workspace/ModuleApi.js.map +1 -1
  258. package/dist/micro/workspace/index.d.ts +2 -2
  259. package/dist/micro/workspace/index.js +2 -18
  260. package/dist/micro/workspace/index.js.map +1 -1
  261. package/dist/micro/workspace/types/CreateUser.js +1 -2
  262. package/dist/micro/workspace/types/EUserStatus.js +2 -5
  263. package/dist/micro/workspace/types/EUserStatus.js.map +1 -1
  264. package/dist/micro/workspace/types/Module.d.ts +1 -1
  265. package/dist/micro/workspace/types/Module.js +1 -2
  266. package/dist/micro/workspace/types/ModuleAction.js +1 -2
  267. package/dist/micro/workspace/types/User.d.ts +3 -3
  268. package/dist/micro/workspace/types/User.js +1 -2
  269. package/dist/micro/workspace/types/index.d.ts +5 -5
  270. package/dist/micro/workspace/types/index.js +5 -21
  271. package/dist/micro/workspace/types/index.js.map +1 -1
  272. package/dist/services/MapService.js +2 -6
  273. package/dist/services/MapService.js.map +1 -1
  274. package/dist/services/ResponseService.d.ts +1 -1
  275. package/dist/services/ResponseService.js +5 -12
  276. package/dist/services/ResponseService.js.map +1 -1
  277. package/dist/services/UrlService.d.ts +1 -1
  278. package/dist/services/UrlService.js +5 -10
  279. package/dist/services/UrlService.js.map +1 -1
  280. package/dist/services/index.d.ts +3 -3
  281. package/dist/services/index.js +3 -19
  282. package/dist/services/index.js.map +1 -1
  283. package/dist/types.d.ts +1 -1
  284. package/dist/types.js +4 -7
  285. package/dist/types.js.map +1 -1
  286. package/package.json +15 -12
  287. package/dist/features/callout/decorators/Calloutable.d.ts +0 -3
  288. package/dist/features/callout/decorators/Calloutable.js +0 -20
  289. package/dist/features/callout/decorators/Calloutable.js.map +0 -1
  290. package/dist/features/callout/decorators/index.d.ts +0 -1
  291. package/dist/features/callout/decorators/index.js +0 -18
  292. package/dist/features/callout/decorators/index.js.map +0 -1
  293. package/dist/features/callout/types/ApiCalloutMiddleware.d.ts +0 -2
  294. package/dist/features/callout/types/ApiCalloutMiddleware.js +0 -3
  295. package/dist/features/callout/types/ApiCalloutMiddleware.js.map +0 -1
  296. package/dist/features/callout/types/index.d.ts +0 -1
  297. package/dist/features/callout/types/index.js +0 -18
  298. package/dist/features/callout/types/index.js.map +0 -1
  299. package/dist/micro/security/types/IPermission.d.ts +0 -10
  300. package/dist/micro/security/types/IPermission.js +0 -3
  301. package/dist/micro/security/types/IPermission.js.map +0 -1
  302. package/dist/micro/security/types/IPermissionAssignment.d.ts +0 -6
  303. package/dist/micro/security/types/IPermissionAssignment.js +0 -3
  304. package/dist/micro/security/types/IPermissionAssignment.js.map +0 -1
  305. package/dist/micro/security/types/IPermissionCategory.d.ts +0 -5
  306. package/dist/micro/security/types/IPermissionCategory.js +0 -3
  307. package/dist/micro/security/types/IPermissionCategory.js.map +0 -1
  308. package/dist/micro/security/types/IPermissionDefinition.d.ts +0 -6
  309. package/dist/micro/security/types/IPermissionDefinition.js +0 -3
  310. package/dist/micro/security/types/IPermissionDefinition.js.map +0 -1
  311. package/dist/micro/security/types/IPermissionGroup.d.ts +0 -4
  312. package/dist/micro/security/types/IPermissionGroup.js +0 -3
  313. package/dist/micro/security/types/IPermissionGroup.js.map +0 -1
  314. package/dist/micro/security/types/IPermissionSet.d.ts +0 -6
  315. package/dist/micro/security/types/IPermissionSet.js +0 -3
  316. package/dist/micro/security/types/IPermissionSet.js.map +0 -1
  317. package/dist/tsconfig.build.tsbuildinfo +0 -1
  318. package/dist/types/ApiQueryOptions.d.ts +0 -14
  319. package/dist/types/ApiQueryOptions.js +0 -3
  320. package/dist/types/ApiQueryOptions.js.map +0 -1
  321. package/dist/types/Constructable.d.ts +0 -3
  322. package/dist/types/Constructable.js +0 -3
  323. package/dist/types/Constructable.js.map +0 -1
  324. package/dist/types/Constructor.d.ts +0 -1
  325. package/dist/types/Constructor.js +0 -3
  326. package/dist/types/Constructor.js.map +0 -1
  327. package/dist/types/HasApiName.d.ts +0 -3
  328. package/dist/types/HasApiName.js +0 -3
  329. package/dist/types/HasApiName.js.map +0 -1
  330. package/dist/types/HasCallouts.d.ts +0 -4
  331. package/dist/types/HasCallouts.js +0 -3
  332. package/dist/types/HasCallouts.js.map +0 -1
  333. package/dist/types/HasDBId.d.ts +0 -3
  334. package/dist/types/HasDBId.js +0 -3
  335. package/dist/types/HasDBId.js.map +0 -1
  336. package/dist/types/HasDescription.d.ts +0 -3
  337. package/dist/types/HasDescription.js +0 -3
  338. package/dist/types/HasDescription.js.map +0 -1
  339. package/dist/types/HasEmail.d.ts +0 -3
  340. package/dist/types/HasEmail.js +0 -3
  341. package/dist/types/HasEmail.js.map +0 -1
  342. package/dist/types/HasId.d.ts +0 -3
  343. package/dist/types/HasId.js +0 -3
  344. package/dist/types/HasId.js.map +0 -1
  345. package/dist/types/HasLabel.d.ts +0 -3
  346. package/dist/types/HasLabel.js +0 -3
  347. package/dist/types/HasLabel.js.map +0 -1
  348. package/dist/types/HasMode.d.ts +0 -3
  349. package/dist/types/HasMode.js +0 -3
  350. package/dist/types/HasMode.js.map +0 -1
  351. package/dist/types/HasNamespace.d.ts +0 -3
  352. package/dist/types/HasNamespace.js +0 -3
  353. package/dist/types/HasNamespace.js.map +0 -1
  354. package/dist/types/HasOrder.d.ts +0 -3
  355. package/dist/types/HasOrder.js +0 -3
  356. package/dist/types/HasOrder.js.map +0 -1
  357. package/dist/types/index.d.ts +0 -11
  358. package/dist/types/index.js +0 -28
  359. package/dist/types/index.js.map +0 -1
@@ -1,12 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AuthAxiosService = void 0;
4
- const axios_1 = require("axios");
5
- const AuthTokensService_1 = require("./AuthTokensService");
6
- const AuthService_1 = require("./AuthService");
7
- class AuthAxiosService {
1
+ import axios from "axios";
2
+ import { AuthTokensService } from "./AuthTokensService.js";
3
+ import { AuthService } from "./AuthService.js";
4
+ export class AuthAxiosService {
8
5
  static getAxiosInstance() {
9
- const instance = axios_1.default.create();
6
+ const instance = axios.create();
10
7
  if (typeof window !== "undefined") {
11
8
  instance.interceptors.request.use(AuthAxiosService.setTokenHeader, error => Promise.reject(error));
12
9
  instance.interceptors.response.use(response => response, AuthAxiosService.refreshTokens);
@@ -14,22 +11,21 @@ class AuthAxiosService {
14
11
  return instance;
15
12
  }
16
13
  static setTokenHeader(config) {
17
- const accessToken = AuthTokensService_1.AuthTokensService.getAccessToken();
14
+ const accessToken = AuthTokensService.getAccessToken();
18
15
  if (!accessToken)
19
16
  return config;
20
17
  config.headers.Authorization = config ? `Bearer ${accessToken}` : '';
21
18
  return config;
22
19
  }
23
20
  static async refreshTokens(error) {
24
- var _a;
25
- if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) !== 401)
21
+ if (error.response?.status !== 401)
26
22
  return Promise.reject(error);
27
- await AuthService_1.AuthService.refresh();
28
- if (!AuthTokensService_1.AuthTokensService.isTokensExists()) {
23
+ await AuthService.refresh();
24
+ if (!AuthTokensService.isTokensExists()) {
29
25
  AuthAxiosService.redirectToSignIn();
30
26
  return error;
31
27
  }
32
- return (0, axios_1.default)(error.config);
28
+ return axios(error.config);
33
29
  }
34
30
  static redirectToSignIn() {
35
31
  const loginURL = `http://auth.localhost`;
@@ -38,5 +34,4 @@ class AuthAxiosService {
38
34
  window.location.replace(url);
39
35
  }
40
36
  }
41
- exports.AuthAxiosService = AuthAxiosService;
42
37
  //# sourceMappingURL=AuthAxiosService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AuthAxiosService.js","sourceRoot":"","sources":["../../../../src/features/auth/services/AuthAxiosService.ts"],"names":[],"mappings":";;;AAAA,iCAAwD;AACxD,2DAAsD;AACtD,+CAA0C;AAE1C,MAAa,gBAAgB;IAC1B,MAAM,CAAC,gBAAgB;QACtB,MAAM,QAAQ,GAAG,eAAK,CAAC,MAAM,EAAE,CAAC;QAEhC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;YAChC,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YACnG,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAC7F,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,MAAkC;QACtD,MAAM,WAAW,GAAG,qCAAiB,CAAC,cAAc,EAAE,CAAC;QAEvD,IAAI,CAAC,WAAW;YAAE,OAAO,MAAM,CAAC;QAEhC,MAAM,CAAC,OAAO,CAAC,aAAa,GAAG,MAAM,CAAC,CAAC,CAAC,UAAU,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAErE,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,KAAU;;QACnC,IAAI,CAAA,MAAA,KAA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C,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAC7F,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,MAAkC;QACtD,MAAM,WAAW,GAAG,iBAAiB,CAAC,cAAc,EAAE,CAAC;QAEvD,IAAI,CAAC,WAAW;YAAE,OAAO,MAAM,CAAC;QAEhC,MAAM,CAAC,OAAO,CAAC,aAAa,GAAG,MAAM,CAAC,CAAC,CAAC,UAAU,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAErE,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,KAAU;QACnC,IAAI,KAAK,CAAC,QAAQ,EAAE,MAAM,KAAK,GAAG;YAAE,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAEjE,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC;QAE5B,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE,EAAE,CAAC;YACxC,gBAAgB,CAAC,gBAAgB,EAAE,CAAC;YAEpC,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,gBAAgB;QACpB,MAAM,QAAQ,GAAG,uBAAuB,CAAC;QACzC,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QAEzC,MAAM,GAAG,GAAG,GAAG,QAAQ,aAAa,WAAW,EAAE,CAAC;QAElD,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;CAEF"}
@@ -1,4 +1,4 @@
1
1
  export declare class AuthService {
2
- static signInByCode(code: string): Promise<import("..").AuthApiTokens>;
3
- static refresh(): Promise<any>;
2
+ static signInByCode(code: string): Promise<import("../index.js").AuthApiTokens | undefined>;
3
+ static refresh(): Promise<null | undefined>;
4
4
  }
@@ -1,22 +1,18 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AuthService = void 0;
4
- const AuthTokensService_1 = require("./AuthTokensService");
5
- class AuthService {
1
+ import { AuthTokensService } from "./AuthTokensService.js";
2
+ export class AuthService {
6
3
  static async signInByCode(code) {
7
4
  if (!code)
8
5
  return;
9
6
  const tokens = null;
10
- return AuthTokensService_1.AuthTokensService.setTokens(tokens);
7
+ return AuthTokensService.setTokens(tokens);
11
8
  }
12
9
  static async refresh() {
13
- const refreshToken = AuthTokensService_1.AuthTokensService.getRefreshToken();
10
+ const refreshToken = AuthTokensService.getRefreshToken();
14
11
  if (!refreshToken)
15
12
  return;
16
13
  const tokens = null;
17
- AuthTokensService_1.AuthTokensService.setTokens(tokens);
14
+ AuthTokensService.setTokens(tokens);
18
15
  return tokens;
19
16
  }
20
17
  }
21
- exports.AuthService = AuthService;
22
18
  //# sourceMappingURL=AuthService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AuthService.js","sourceRoot":"","sources":["../../../../src/features/auth/services/AuthService.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AAGtD,MAAa,WAAW;IAKtB,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,IAAY;QACpC,IAAI,CAAC,IAAI;YAAE,OAAO;QAGlB,MAAM,MAAM,GAAG,IAAI,CAAA;QAEnB,OAAO,qCAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,OAAO;QAClB,MAAM,YAAY,GAAG,qCAAiB,CAAC,eAAe,EAAE,CAAC;QAEzD,IAAI,CAAC,YAAY;YAAE,OAAO;QAG1B,MAAM,MAAM,GAAG,IAAI,CAAA;QAEnB,qCAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAEpC,OAAO,MAAM,CAAC;IAChB,CAAC;CAEF;AA3BD,kCA2BC"}
1
+ {"version":3,"file":"AuthService.js","sourceRoot":"","sources":["../../../../src/features/auth/services/AuthService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AAGzD,MAAM,OAAO,WAAW;IAKtB,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,IAAY;QACpC,IAAI,CAAC,IAAI;YAAE,OAAO;QAGlB,MAAM,MAAM,GAAG,IAAI,CAAA;QAGnB,OAAO,iBAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,OAAO;QAClB,MAAM,YAAY,GAAG,iBAAiB,CAAC,eAAe,EAAE,CAAC;QAEzD,IAAI,CAAC,YAAY;YAAE,OAAO;QAG1B,MAAM,MAAM,GAAG,IAAI,CAAA;QAGnB,iBAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAEpC,OAAO,MAAM,CAAC;IAChB,CAAC;CAEF"}
@@ -1,13 +1,13 @@
1
- import { AuthApiTokens, AuthUserJWT } from "../types";
1
+ import { AuthApiTokens, AuthUserJWT } from "../types/index.js";
2
2
  export declare const ACCESS_TOKEN_KEY = "access_token";
3
3
  export declare const REFRESH_TOKEN_KEY = "refresh_token";
4
4
  export declare const ACCESS_TOKEN_DECODED_KEY = "access_token_decoded";
5
5
  export declare class AuthTokensService {
6
- static getAccessToken(): string;
6
+ static getAccessToken(): string | null;
7
7
  static getDecodedAccessToken(): AuthUserJWT;
8
8
  static setAccessToken(token: string): void;
9
- static getRefreshToken(): string;
9
+ static getRefreshToken(): string | null;
10
10
  static setRefreshToken(token: string): void;
11
- static setTokens(tokens: AuthApiTokens | undefined): AuthApiTokens;
12
- static isTokensExists(): string;
11
+ static setTokens(tokens: AuthApiTokens | undefined): AuthApiTokens | undefined;
12
+ static isTokensExists(): string | null;
13
13
  }
@@ -1,31 +1,28 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AuthTokensService = exports.ACCESS_TOKEN_DECODED_KEY = exports.REFRESH_TOKEN_KEY = exports.ACCESS_TOKEN_KEY = void 0;
4
- const errors_1 = require("../errors");
5
- const jwt_decode_1 = require("jwt-decode");
6
- exports.ACCESS_TOKEN_KEY = 'access_token';
7
- exports.REFRESH_TOKEN_KEY = 'refresh_token';
8
- exports.ACCESS_TOKEN_DECODED_KEY = 'access_token_decoded';
9
- class AuthTokensService {
1
+ import { AuthError } from "../errors/index.js";
2
+ import { jwtDecode } from "jwt-decode";
3
+ export const ACCESS_TOKEN_KEY = 'access_token';
4
+ export const REFRESH_TOKEN_KEY = 'refresh_token';
5
+ export const ACCESS_TOKEN_DECODED_KEY = 'access_token_decoded';
6
+ export class AuthTokensService {
10
7
  static getAccessToken() {
11
- return localStorage.getItem(exports.ACCESS_TOKEN_KEY);
8
+ return localStorage.getItem(ACCESS_TOKEN_KEY);
12
9
  }
13
10
  static getDecodedAccessToken() {
14
- return JSON.parse(localStorage.getItem(exports.ACCESS_TOKEN_DECODED_KEY));
11
+ return JSON.parse(localStorage.getItem(ACCESS_TOKEN_DECODED_KEY));
15
12
  }
16
13
  static setAccessToken(token) {
17
14
  if (!token)
18
- throw new errors_1.AuthError('Access token is not defined during saving');
19
- localStorage.setItem(exports.ACCESS_TOKEN_KEY, token);
20
- localStorage.setItem(exports.ACCESS_TOKEN_DECODED_KEY, JSON.stringify((0, jwt_decode_1.jwtDecode)(token)));
15
+ throw new AuthError('Access token is not defined during saving');
16
+ localStorage.setItem(ACCESS_TOKEN_KEY, token);
17
+ localStorage.setItem(ACCESS_TOKEN_DECODED_KEY, JSON.stringify(jwtDecode(token)));
21
18
  }
22
19
  static getRefreshToken() {
23
- return localStorage.getItem(exports.REFRESH_TOKEN_KEY);
20
+ return localStorage.getItem(REFRESH_TOKEN_KEY);
24
21
  }
25
22
  static setRefreshToken(token) {
26
23
  if (!token)
27
- throw new errors_1.AuthError('Refresh token is not defined during saving');
28
- localStorage.setItem(exports.REFRESH_TOKEN_KEY, token);
24
+ throw new AuthError('Refresh token is not defined during saving');
25
+ localStorage.setItem(REFRESH_TOKEN_KEY, token);
29
26
  }
30
27
  static setTokens(tokens) {
31
28
  if (!tokens)
@@ -38,5 +35,4 @@ class AuthTokensService {
38
35
  return AuthTokensService.getAccessToken() && AuthTokensService.getRefreshToken();
39
36
  }
40
37
  }
41
- exports.AuthTokensService = AuthTokensService;
42
38
  //# sourceMappingURL=AuthTokensService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AuthTokensService.js","sourceRoot":"","sources":["../../../../src/features/auth/services/AuthTokensService.ts"],"names":[],"mappings":";;;AAAA,sCAAoC;AAEpC,2CAAqC;AAExB,QAAA,gBAAgB,GAAG,cAAc,CAAC;AAClC,QAAA,iBAAiB,GAAG,eAAe,CAAC;AACpC,QAAA,wBAAwB,GAAG,sBAAsB,CAAC;AAE/D,MAAa,iBAAiB;IAE5B,MAAM,CAAC,cAAc;QACnB,OAAO,YAAY,CAAC,OAAO,CAAC,wBAAgB,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,CAAC,qBAAqB;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,gCAAwB,CAAC,CAAC,CAAC;IACpE,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,KAAa;QACjC,IAAI,CAAC,KAAK;YAAE,MAAM,IAAI,kBAAS,CAAC,2CAA2C,CAAC,CAAC;QAE7E,YAAY,CAAC,OAAO,CAAC,wBAAgB,EAAE,KAAK,CAAC,CAAC;QAC9C,YAAY,CAAC,OAAO,CAAC,gCAAwB,EAAE,IAAI,CAAC,SAAS,CAAC,IAAA,sBAAS,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnF,CAAC;IAED,MAAM,CAAC,eAAe;QACpB,OAAO,YAAY,CAAC,OAAO,CAAC,yBAAiB,CAAC,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,KAAa;QAClC,IAAI,CAAC,KAAK;YAAE,MAAM,IAAI,kBAAS,CAAC,4CAA4C,CAAC,CAAC;QAE9E,YAAY,CAAC,OAAO,CAAC,yBAAiB,EAAE,KAAK,CAAC,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,MAAiC;QAChD,IAAI,CAAC,MAAM;YAAE,OAAO;QAEpB,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QACxC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAE1C,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,cAAc;QACnB,OAAO,iBAAiB,CAAC,cAAc,EAAE,IAAI,iBAAiB,CAAC,eAAe,EAAE,CAAC;IACnF,CAAC;CACF;AAvCD,8CAuCC"}
1
+ {"version":3,"file":"AuthTokensService.js","sourceRoot":"","sources":["../../../../src/features/auth/services/AuthTokensService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AAErC,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAC/C,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC;AACjD,MAAM,CAAC,MAAM,wBAAwB,GAAG,sBAAsB,CAAC;AAE/D,MAAM,OAAO,iBAAiB;IAE5B,MAAM,CAAC,cAAc;QACnB,OAAO,YAAY,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,CAAC,qBAAqB;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,wBAAwB,CAAW,CAAC,CAAC;IAC9E,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,KAAa;QACjC,IAAI,CAAC,KAAK;YAAE,MAAM,IAAI,SAAS,CAAC,2CAA2C,CAAC,CAAC;QAE7E,YAAY,CAAC,OAAO,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;QAC9C,YAAY,CAAC,OAAO,CAAC,wBAAwB,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnF,CAAC;IAED,MAAM,CAAC,eAAe;QACpB,OAAO,YAAY,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,KAAa;QAClC,IAAI,CAAC,KAAK;YAAE,MAAM,IAAI,SAAS,CAAC,4CAA4C,CAAC,CAAC;QAE9E,YAAY,CAAC,OAAO,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,MAAiC;QAChD,IAAI,CAAC,MAAM;YAAE,OAAO;QAEpB,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QACxC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAE1C,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,cAAc;QACnB,OAAO,iBAAiB,CAAC,cAAc,EAAE,IAAI,iBAAiB,CAAC,eAAe,EAAE,CAAC;IACnF,CAAC;CACF"}
@@ -1,3 +1,3 @@
1
- export * from './AuthTokensService';
2
- export * from './AuthService';
3
- export * from './AuthAxiosService';
1
+ export * from './AuthTokensService.js';
2
+ export * from './AuthService.js';
3
+ export * from './AuthAxiosService.js';
@@ -1,20 +1,4 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./AuthTokensService"), exports);
18
- __exportStar(require("./AuthService"), exports);
19
- __exportStar(require("./AuthAxiosService"), exports);
1
+ export * from './AuthTokensService.js';
2
+ export * from './AuthService.js';
3
+ export * from './AuthAxiosService.js';
20
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/auth/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,gDAA8B;AAC9B,qDAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/auth/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC"}
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=AuthActivateUser.js.map
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=AuthApiTokens.js.map
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=AuthChangePassword.js.map
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=AuthCode.js.map
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=AuthConfirmResetPassword.js.map
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=AuthSignIn.js.map
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=AuthUserJWT.js.map
@@ -1,7 +1,7 @@
1
- export * from './AuthUserJWT';
2
- export * from './AuthApiTokens';
3
- export * from './AuthActivateUser';
4
- export * from './AuthChangePassword';
5
- export * from './AuthSignIn';
6
- export * from './AuthCode';
7
- export * from './AuthConfirmResetPassword';
1
+ export * from './AuthUserJWT.js';
2
+ export * from './AuthApiTokens.js';
3
+ export * from './AuthActivateUser.js';
4
+ export * from './AuthChangePassword.js';
5
+ export * from './AuthSignIn.js';
6
+ export * from './AuthCode.js';
7
+ export * from './AuthConfirmResetPassword.js';
@@ -1,24 +1,8 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./AuthUserJWT"), exports);
18
- __exportStar(require("./AuthApiTokens"), exports);
19
- __exportStar(require("./AuthActivateUser"), exports);
20
- __exportStar(require("./AuthChangePassword"), exports);
21
- __exportStar(require("./AuthSignIn"), exports);
22
- __exportStar(require("./AuthCode"), exports);
23
- __exportStar(require("./AuthConfirmResetPassword"), exports);
1
+ export * from './AuthUserJWT.js';
2
+ export * from './AuthApiTokens.js';
3
+ export * from './AuthActivateUser.js';
4
+ export * from './AuthChangePassword.js';
5
+ export * from './AuthSignIn.js';
6
+ export * from './AuthCode.js';
7
+ export * from './AuthConfirmResetPassword.js';
24
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/auth/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,kDAAgC;AAChC,qDAAmC;AACnC,uDAAqC;AACrC,+CAA6B;AAC7B,6CAA2B;AAC3B,6DAA2C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/auth/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,+BAA+B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from "axios";
2
- import { CalloutMiddleware, CalloutState } from "./types";
2
+ import { CalloutMiddleware, CalloutState } from "./types.js";
3
3
  export declare class Callout<Params extends any[], ResponseType> {
4
4
  private readonly _axiosInstance;
5
5
  private readonly _configFunction;
@@ -8,7 +8,7 @@ export declare class Callout<Params extends any[], ResponseType> {
8
8
  private _message;
9
9
  get getState(): CalloutState;
10
10
  get isLoading(): boolean;
11
- get getMessage(): string;
11
+ get getMessage(): string | null | undefined;
12
12
  get getConfigFunction(): (...params: Params) => AxiosRequestConfig;
13
13
  constructor(configFunction: () => AxiosRequestConfig, axiosInstance?: AxiosInstance | null);
14
14
  setMessage(message: string | undefined): this;
@@ -1,19 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Callout = void 0;
4
- const axios_1 = require("axios");
5
- class Callout {
1
+ import axios from "axios";
2
+ export class Callout {
3
+ _axiosInstance = axios;
4
+ _configFunction;
5
+ _state = { isLoading: false, message: null };
6
+ _middlewares = [];
7
+ _message = 'Loading...';
6
8
  get getState() { return this._state; }
7
- get isLoading() { return this._state.isLoading; }
9
+ get isLoading() { return Boolean(this._state.isLoading); }
8
10
  get getMessage() { return this._state.message; }
9
11
  get getConfigFunction() { return this._configFunction; }
10
12
  constructor(configFunction, axiosInstance = null) {
11
- this._axiosInstance = axios_1.default;
12
- this._state = { isLoading: false, message: null };
13
- this._middlewares = [];
14
- this._message = 'Loading...';
15
13
  this._configFunction = configFunction;
16
- this._axiosInstance = axiosInstance !== null && axiosInstance !== void 0 ? axiosInstance : this._getAxiosInstance();
14
+ this._axiosInstance = axiosInstance ?? this._getAxiosInstance();
17
15
  }
18
16
  setMessage(message) {
19
17
  this._message = message;
@@ -28,7 +26,7 @@ class Callout {
28
26
  response = await this._axiosInstance(config);
29
27
  }
30
28
  catch (e) {
31
- response = e === null || e === void 0 ? void 0 : e.response;
29
+ response = e?.response;
32
30
  error = e;
33
31
  }
34
32
  await this._invokeMiddlewares(response, params, error);
@@ -45,7 +43,7 @@ class Callout {
45
43
  this._middlewares.splice(index, 1);
46
44
  }
47
45
  _getAxiosInstance() {
48
- return axios_1.default.create();
46
+ return axios.create();
49
47
  }
50
48
  _invokeStart() {
51
49
  this._state.isLoading = true;
@@ -62,5 +60,4 @@ class Callout {
62
60
  }
63
61
  }
64
62
  }
65
- exports.Callout = Callout;
66
63
  //# sourceMappingURL=Callout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Callout.js","sourceRoot":"","sources":["../../../src/features/callout/Callout.ts"],"names":[],"mappings":";;;AAAA,iCAA0F;AAG1F,MAAa,OAAO;IAahB,IAAI,QAAQ,KAAK,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAEtC,IAAI,SAAS,KAAc,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IAE1D,IAAI,UAAU,KAAK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"./types";
2
+ import { CalloutMiddlewareConditions } from "./types.js";
3
3
  export declare class CalloutMiddlewareService {
4
- static isMeetConditions(response: AxiosResponse, conditions: CalloutMiddlewareConditions): boolean;
4
+ static isMeetConditions(response?: AxiosResponse, conditions?: CalloutMiddlewareConditions): boolean;
5
5
  }
@@ -1,17 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CalloutMiddlewareService = void 0;
4
- const services_1 = require("../../services");
5
- class CalloutMiddlewareService {
1
+ import { ResponseService } from "../../services/index.js";
2
+ export class CalloutMiddlewareService {
6
3
  static isMeetConditions(response, conditions) {
7
4
  if (!conditions)
8
5
  return true;
9
- const isHTTPIncludeMeet = !conditions.forHTTPCodes || services_1.ResponseService.isInHttpCodeRange(response, conditions.forHTTPCodes);
10
- const isHTTPExcludeMeet = !conditions.excludeHTTPCodes || !services_1.ResponseService.isInHttpCodeRange(response, conditions.excludeHTTPCodes);
11
- const isServerIncludeMeet = !conditions.forServerCodes || services_1.ResponseService.isInServerCodeRange(response, conditions.forServerCodes);
12
- const isServerExcludeMeet = !conditions.excludeServerCodes || !services_1.ResponseService.isInServerCodeRange(response, conditions.excludeServerCodes);
6
+ const isHTTPIncludeMeet = !conditions.forHTTPCodes || ResponseService.isInHttpCodeRange(response, conditions.forHTTPCodes);
7
+ const isHTTPExcludeMeet = !conditions.excludeHTTPCodes || !ResponseService.isInHttpCodeRange(response, conditions.excludeHTTPCodes);
8
+ const isServerIncludeMeet = !conditions.forServerCodes || ResponseService.isInServerCodeRange(response, conditions.forServerCodes);
9
+ const isServerExcludeMeet = !conditions.excludeServerCodes || !ResponseService.isInServerCodeRange(response, conditions.excludeServerCodes);
13
10
  return isHTTPIncludeMeet && isHTTPExcludeMeet && isServerIncludeMeet && isServerExcludeMeet;
14
11
  }
15
12
  }
16
- exports.CalloutMiddlewareService = CalloutMiddlewareService;
17
13
  //# sourceMappingURL=CalloutMiddlewareService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CalloutMiddlewareService.js","sourceRoot":"","sources":["../../../src/features/callout/CalloutMiddlewareService.ts"],"names":[],"mappings":";;;AAEA,6CAA+C;AAE/C,MAAa,wBAAwB;IACjC,MAAM,CAAC,gBAAgB,CAAC,QAAuB,EAAE,UAAuC;QACpF,IAAI,CAAC,UAAU;YAAE,OAAO,IAAI,CAAC;QAE7B,MAAM,iBAAiB,GAAG,CAAC,UAAU,CAAC,YAAY,IAAI,0BAAe,CAAC,iBAAiB,CAAC,QAAQ,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;QAC3H,MAAM,iBAAiB,GAAG,CAAC,UAAU,CAAC,gBAAgB,IAAI,CAAC,0BAAe,CAAC,iBAAiB,CAAC,QAAQ,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;QAEpI,MAAM,mBAAmB,GAAG,CAAC,UAAU,CAAC,cAAc,IAAI,0BAAe,CAAC,mBAAmB,CAAC,QAAQ,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;QACnI,MAAM,mBAAmB,GAAG,CAAC,UAAU,CAAC,kBAAkB,IAAI,CAAC,0BAAe,CAAC,mBAAmB,CAAC,QAAQ,EAAE,UAAU,CAAC,kBAAkB,CAAC,CAAC;QAE5I,OAAO,iBAAiB,IAAI,iBAAiB,IAAI,mBAAmB,IAAI,mBAAmB,CAAC;IAChG,CAAC;CAEJ;AAbD,4DAaC"}
1
+ {"version":3,"file":"CalloutMiddlewareService.js","sourceRoot":"","sources":["../../../src/features/callout/CalloutMiddlewareService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAExD,MAAM,OAAO,wBAAwB;IACjC,MAAM,CAAC,gBAAgB,CAAC,QAAwB,EAAE,UAAwC;QACtF,IAAI,CAAC,UAAU;YAAE,OAAO,IAAI,CAAC;QAE7B,MAAM,iBAAiB,GAAG,CAAC,UAAU,CAAC,YAAY,IAAI,eAAe,CAAC,iBAAiB,CAAC,QAAiB,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;QACpI,MAAM,iBAAiB,GAAG,CAAC,UAAU,CAAC,gBAAgB,IAAI,CAAC,eAAe,CAAC,iBAAiB,CAAC,QAAiB,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;QAE7I,MAAM,mBAAmB,GAAG,CAAC,UAAU,CAAC,cAAc,IAAI,eAAe,CAAC,mBAAmB,CAAC,QAAiB,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;QAC5I,MAAM,mBAAmB,GAAG,CAAC,UAAU,CAAC,kBAAkB,IAAI,CAAC,eAAe,CAAC,mBAAmB,CAAC,QAAiB,EAAE,UAAU,CAAC,kBAAkB,CAAC,CAAC;QAErJ,OAAO,iBAAiB,IAAI,iBAAiB,IAAI,mBAAmB,IAAI,mBAAmB,CAAC;IAChG,CAAC;CAEJ"}
@@ -1,4 +1,4 @@
1
- import { CalloutMiddleware, CalloutMiddlewareConditions } from "./types";
1
+ import { CalloutMiddleware, CalloutMiddlewareConditions } from "./types.js";
2
2
  export declare class CalloutMiddlewares {
3
3
  static throwException: (message?: string, conditions?: CalloutMiddlewareConditions) => CalloutMiddleware<any, any>;
4
4
  }
@@ -1,15 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CalloutMiddlewares = void 0;
4
- const CalloutMiddlewareService_1 = require("./CalloutMiddlewareService");
5
- class CalloutMiddlewares {
1
+ import { CalloutMiddlewareService } from "./CalloutMiddlewareService.js";
2
+ export class CalloutMiddlewares {
3
+ static throwException = (message, conditions) => ({ callout, response, error }) => {
4
+ if (!CalloutMiddlewareService.isMeetConditions(response, conditions))
5
+ return;
6
+ callout.getState.isLoading = false;
7
+ callout.getState.message = undefined;
8
+ throw new Error(message ?? `${error?.name}: ${error?.message}`);
9
+ };
6
10
  }
7
- exports.CalloutMiddlewares = CalloutMiddlewares;
8
- CalloutMiddlewares.throwException = (message, conditions) => ({ callout, response, error }) => {
9
- if (!CalloutMiddlewareService_1.CalloutMiddlewareService.isMeetConditions(response, conditions))
10
- return;
11
- callout.getState.isLoading = false;
12
- callout.getState.message = undefined;
13
- throw new Error(message !== null && message !== void 0 ? message : `${error === null || error === void 0 ? void 0 : error.name}: ${error === null || error === void 0 ? void 0 : error.message}`);
14
- };
15
11
  //# sourceMappingURL=CalloutMiddlewares.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CalloutMiddlewares.js","sourceRoot":"","sources":["../../../src/features/callout/CalloutMiddlewares.ts"],"names":[],"mappings":";;;AACA,yEAAoE;AAEpE,MAAa,kBAAkB;;AAA/B,gDASC;AARU,iCAAc,GAAG,CAAC,OAAgB,EAAE,UAAwC,EAA+B,EAAE,CAAC,CAAC,EAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAC,EAAE,EAAE;IAChJ,IAAI,CAAC,mDAAwB,CAAC,gBAAgB,CAAC,QAAQ,EAAE,UAAU,CAAC;QAAE,OAAO;IAE7E,OAAO,CAAC,QAAQ,CAAC,SAAS,GAAG,KAAK,CAAC;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO,GAAG,SAAS,CAAC;IAErC,MAAM,IAAI,KAAK,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,GAAG,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,KAAK,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,EAAE,CAAC,CAAC;AACpE,CAAC,CAAA"}
1
+ {"version":3,"file":"CalloutMiddlewares.js","sourceRoot":"","sources":["../../../src/features/callout/CalloutMiddlewares.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,wBAAwB,EAAC,MAAM,+BAA+B,CAAC;AAEvE,MAAM,OAAO,kBAAkB;IACpB,MAAM,CAAC,cAAc,GAAG,CAAC,OAAgB,EAAE,UAAwC,EAA+B,EAAE,CAAC,CAAC,EAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAC,EAAE,EAAE;QACvJ,IAAI,CAAC,wBAAwB,CAAC,gBAAgB,CAAC,QAAQ,EAAE,UAAU,CAAC;YAAE,OAAO;QAE7E,OAAO,CAAC,QAAQ,CAAC,SAAS,GAAG,KAAK,CAAC;QACnC,OAAO,CAAC,QAAQ,CAAC,OAAO,GAAG,SAAS,CAAC;QAErC,MAAM,IAAI,KAAK,CAAC,OAAO,IAAI,GAAG,KAAK,EAAE,IAAI,KAAK,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC,CAAA"}
@@ -1,3 +1,3 @@
1
- import { ApiCalloutMiddleware } from "./types";
2
- import type { AbstractCRUDApi } from "../crud";
1
+ import { ApiCalloutMiddleware } from "./types.js";
2
+ import type { AbstractCRUDApi } from "../crud/index.js";
3
3
  export declare const Calloutable: (...apiMiddlewares: Array<ApiCalloutMiddleware<AbstractCRUDApi>>) => (target: any, method: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
@@ -1,13 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Calloutable = void 0;
4
- const auth_1 = require("../auth");
5
- const Callout_1 = require("./Callout");
6
- const Calloutable = (...apiMiddlewares) => (target, method, descriptor) => {
1
+ import { AuthAxiosService } from "../auth/index.js";
2
+ import { Callout } from "./Callout.js";
3
+ export const Calloutable = (...apiMiddlewares) => (target, method, descriptor) => {
7
4
  target[`${method}Callout`] = function () {
8
- const callout = new Callout_1.Callout(descriptor.value.bind(this), auth_1.AuthAxiosService.getAxiosInstance());
9
- apiMiddlewares === null || apiMiddlewares === void 0 ? void 0 : apiMiddlewares.map(apiMiddleware => {
10
- const calloutMiddleware = apiMiddleware === null || apiMiddleware === void 0 ? void 0 : apiMiddleware(this);
5
+ const callout = new Callout(descriptor.value.bind(this), AuthAxiosService.getAxiosInstance());
6
+ apiMiddlewares?.map(apiMiddleware => {
7
+ const calloutMiddleware = apiMiddleware?.(this);
11
8
  if (!calloutMiddleware)
12
9
  return;
13
10
  callout.addMiddleware(calloutMiddleware);
@@ -16,5 +13,4 @@ const Calloutable = (...apiMiddlewares) => (target, method, descriptor) => {
16
13
  };
17
14
  return descriptor;
18
15
  };
19
- exports.Calloutable = Calloutable;
20
16
  //# sourceMappingURL=Calloutable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Calloutable.js","sourceRoot":"","sources":["../../../src/features/callout/Calloutable.ts"],"names":[],"mappings":";;;AACA,kCAAyC;AAEzC,uCAAkC;AAE3B,MAAM,WAAW,GAAG,CAAC,GAAG,cAA4D,EAAE,EAAE,CAAC,CAAC,MAAW,EAAE,MAAc,EAAE,UAA8B,EAAE,EAAE;IAC9J,MAAM,CAAC,GAAG,MAAM,SAAS,CAAC,GAAG;QAG3B,MAAM,OAAO,GAAG,IAAI,iBAAO,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,uBAAgB,CAAC,gBAAgB,EAAE,CAAC,CAAC;QAE9F,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,GAAG,CAAC,aAAa,CAAC,EAAE;YAClC,MAAM,iBAAiB,GAAG,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAG,IAAI,CAAC,CAAC;YAEhD,IAAI,CAAC,iBAAiB;gBAAE,OAAO;YAE/B,OAAO,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC;IAEF,OAAO,UAAU,CAAC;AACpB,CAAC,CAAA;AAlBY,QAAA,WAAW,eAkBvB"}
1
+ {"version":3,"file":"Calloutable.js","sourceRoot":"","sources":["../../../src/features/callout/Calloutable.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AAErC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAG,cAA4D,EAAE,EAAE,CAAC,CAAC,MAAW,EAAE,MAAc,EAAE,UAA8B,EAAE,EAAE;IAC9J,MAAM,CAAC,GAAG,MAAM,SAAS,CAAC,GAAG;QAG3B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,EAAE,CAAC,CAAC;QAE9F,cAAc,EAAE,GAAG,CAAC,aAAa,CAAC,EAAE;YAClC,MAAM,iBAAiB,GAAG,aAAa,EAAE,CAAC,IAAI,CAAC,CAAC;YAEhD,IAAI,CAAC,iBAAiB;gBAAE,OAAO;YAE/B,OAAO,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC;IAEF,OAAO,UAAU,CAAC;AACpB,CAAC,CAAA"}
@@ -1,5 +1,5 @@
1
- export * from './types';
2
- export * from './Callout';
3
- export * from './Calloutable';
4
- export * from './CalloutMiddlewareService';
5
- export * from './CalloutMiddlewares';
1
+ export * from './types.js';
2
+ export * from './Callout.js';
3
+ export * from './Calloutable.js';
4
+ export * from './CalloutMiddlewareService.js';
5
+ export * from './CalloutMiddlewares.js';
@@ -1,22 +1,6 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./types"), exports);
18
- __exportStar(require("./Callout"), exports);
19
- __exportStar(require("./Calloutable"), exports);
20
- __exportStar(require("./CalloutMiddlewareService"), exports);
21
- __exportStar(require("./CalloutMiddlewares"), exports);
1
+ export * from './types.js';
2
+ export * from './Callout.js';
3
+ export * from './Calloutable.js';
4
+ export * from './CalloutMiddlewareService.js';
5
+ export * from './CalloutMiddlewares.js';
22
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/features/callout/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,4CAA0B;AAC1B,gDAA8B;AAC9B,6DAA2C;AAC3C,uDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/features/callout/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { AxiosError, AxiosResponse } from "axios";
2
- import { Callout } from "./Callout";
2
+ import { Callout } from "./Callout.js";
3
3
  export type ApiCalloutMiddleware<T> = (apiInstance: T) => CalloutMiddleware<any, any>;
4
4
  export type CalloutMiddleware<P extends Array<any>, T> = (params: CalloutMiddlewareParams<P, T>) => any;
5
5
  export type CalloutMiddlewareParams<Params extends any[], ResponseType> = {
@@ -11,7 +11,7 @@ export type CalloutMiddlewareParams<Params extends any[], ResponseType> = {
11
11
  };
12
12
  export type CalloutState = {
13
13
  isLoading: boolean | undefined;
14
- message: string | undefined;
14
+ message: string | null | undefined;
15
15
  };
16
16
  export type CalloutMiddlewareConditions = {
17
17
  forHTTPCodes?: Array<number>;
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=types.js.map
@@ -1,2 +1,2 @@
1
- export * from './operations';
2
- export * from './sync';
1
+ export * from './operations/index.js';
2
+ export * from './sync/index.js';