@buildery/ts-api-kit 4.7.0 → 4.8.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 (293) hide show
  1. package/dist/ApiConfigs.d.ts +6 -0
  2. package/dist/ApiConfigs.js +7 -0
  3. package/dist/ApiConfigs.js.map +1 -0
  4. package/dist/RawApi.d.ts +1 -1
  5. package/dist/RawApi.js +13 -13
  6. package/dist/RawApi.js.map +1 -1
  7. package/dist/entities/auth/config/AuthApi.d.ts +10 -0
  8. package/dist/entities/auth/config/AuthApi.js +57 -0
  9. package/dist/entities/auth/config/AuthApi.js.map +1 -0
  10. package/dist/entities/auth/config/index.d.ts +1 -0
  11. package/dist/entities/auth/config/index.js +18 -0
  12. package/dist/entities/auth/config/index.js.map +1 -0
  13. package/dist/entities/auth/index.d.ts +2 -0
  14. package/dist/entities/auth/index.js +19 -0
  15. package/dist/entities/auth/index.js.map +1 -0
  16. package/dist/entities/auth/services/AuthAxiosService.d.ts +7 -0
  17. package/dist/entities/auth/services/AuthAxiosService.js +39 -0
  18. package/dist/entities/auth/services/AuthAxiosService.js.map +1 -0
  19. package/dist/entities/auth/services/AuthError.d.ts +3 -0
  20. package/dist/entities/auth/services/AuthError.js +10 -0
  21. package/dist/entities/auth/services/AuthError.js.map +1 -0
  22. package/dist/entities/auth/services/AuthService.d.ts +4 -0
  23. package/dist/entities/auth/services/AuthService.js +24 -0
  24. package/dist/entities/auth/services/AuthService.js.map +1 -0
  25. package/dist/entities/auth/services/AuthTokensService.d.ts +11 -0
  26. package/dist/entities/auth/services/AuthTokensService.js +36 -0
  27. package/dist/entities/auth/services/AuthTokensService.js.map +1 -0
  28. package/dist/entities/auth/services/index.d.ts +3 -0
  29. package/dist/entities/auth/services/index.js +20 -0
  30. package/dist/entities/auth/services/index.js.map +1 -0
  31. package/dist/entities/auth/types/AuthActivateUser.d.ts +5 -0
  32. package/dist/entities/auth/types/AuthActivateUser.js +3 -0
  33. package/dist/entities/auth/types/AuthActivateUser.js.map +1 -0
  34. package/dist/entities/auth/types/AuthApiTokens.d.ts +4 -0
  35. package/dist/entities/auth/types/AuthApiTokens.js +3 -0
  36. package/dist/entities/auth/types/AuthApiTokens.js.map +1 -0
  37. package/dist/entities/auth/types/AuthChangePassword.d.ts +5 -0
  38. package/dist/entities/auth/types/AuthChangePassword.js +3 -0
  39. package/dist/entities/auth/types/AuthChangePassword.js.map +1 -0
  40. package/dist/entities/auth/types/AuthCode.d.ts +4 -0
  41. package/dist/entities/auth/types/AuthCode.js +3 -0
  42. package/dist/entities/auth/types/AuthCode.js.map +1 -0
  43. package/dist/entities/auth/types/AuthSignIn.d.ts +4 -0
  44. package/dist/entities/auth/types/AuthSignIn.js +3 -0
  45. package/dist/entities/auth/types/AuthSignIn.js.map +1 -0
  46. package/dist/entities/auth/types/AuthUserJWT.d.ts +8 -0
  47. package/dist/entities/auth/types/AuthUserJWT.js +3 -0
  48. package/dist/entities/auth/types/AuthUserJWT.js.map +1 -0
  49. package/dist/entities/auth/types/index.d.ts +6 -0
  50. package/dist/entities/auth/types/index.js +23 -0
  51. package/dist/entities/auth/types/index.js.map +1 -0
  52. package/dist/entities/index.d.ts +6 -0
  53. package/dist/entities/index.js +23 -0
  54. package/dist/entities/index.js.map +1 -0
  55. package/dist/entities/module/config/ModuleApi.d.ts +10 -0
  56. package/dist/entities/module/config/ModuleApi.js +44 -0
  57. package/dist/entities/module/config/ModuleApi.js.map +1 -0
  58. package/dist/entities/module/config/index.d.ts +1 -0
  59. package/dist/entities/module/config/index.js +18 -0
  60. package/dist/entities/module/config/index.js.map +1 -0
  61. package/dist/entities/module/index.d.ts +2 -0
  62. package/dist/entities/module/index.js +19 -0
  63. package/dist/entities/module/index.js.map +1 -0
  64. package/dist/entities/module/types/IModule.d.ts +12 -0
  65. package/dist/entities/module/types/IModule.js +3 -0
  66. package/dist/entities/module/types/IModule.js.map +1 -0
  67. package/dist/entities/module/types/ModuleObjectNames.d.ts +3 -0
  68. package/dist/entities/module/types/ModuleObjectNames.js +7 -0
  69. package/dist/entities/module/types/ModuleObjectNames.js.map +1 -0
  70. package/dist/entities/module/types/index.d.ts +2 -0
  71. package/dist/entities/module/types/index.js +19 -0
  72. package/dist/entities/module/types/index.js.map +1 -0
  73. package/dist/entities/schema/config/FieldApi.d.ts +12 -0
  74. package/dist/entities/schema/config/FieldApi.js +44 -0
  75. package/dist/entities/schema/config/FieldApi.js.map +1 -0
  76. package/dist/entities/schema/config/ObjectApi.d.ts +6 -0
  77. package/dist/entities/schema/config/ObjectApi.js +21 -0
  78. package/dist/entities/schema/config/ObjectApi.js.map +1 -0
  79. package/dist/entities/schema/config/index.d.ts +2 -0
  80. package/dist/entities/schema/config/index.js +19 -0
  81. package/dist/entities/schema/config/index.js.map +1 -0
  82. package/dist/entities/schema/index.d.ts +2 -0
  83. package/dist/entities/schema/index.js +19 -0
  84. package/dist/entities/schema/index.js.map +1 -0
  85. package/dist/entities/schema/types/FieldType.d.ts +9 -0
  86. package/dist/entities/schema/types/FieldType.js +14 -0
  87. package/dist/entities/schema/types/FieldType.js.map +1 -0
  88. package/dist/entities/schema/types/PicklistValue.d.ts +4 -0
  89. package/dist/entities/schema/types/PicklistValue.js +3 -0
  90. package/dist/entities/schema/types/PicklistValue.js.map +1 -0
  91. package/dist/entities/schema/types/SObject.d.ts +7 -0
  92. package/dist/entities/schema/types/SObject.js +3 -0
  93. package/dist/entities/schema/types/SObject.js.map +1 -0
  94. package/dist/entities/schema/types/SObjectField.d.ts +32 -0
  95. package/dist/entities/schema/types/SObjectField.js +3 -0
  96. package/dist/entities/schema/types/SObjectField.js.map +1 -0
  97. package/dist/entities/schema/types/SchemaObjectNames.d.ts +4 -0
  98. package/dist/entities/schema/types/SchemaObjectNames.js +8 -0
  99. package/dist/entities/schema/types/SchemaObjectNames.js.map +1 -0
  100. package/dist/entities/schema/types/index.d.ts +5 -0
  101. package/dist/entities/schema/types/index.js +22 -0
  102. package/dist/entities/schema/types/index.js.map +1 -0
  103. package/dist/entities/security/config/PermissionApi.d.ts +9 -0
  104. package/dist/entities/security/config/PermissionApi.js +36 -0
  105. package/dist/entities/security/config/PermissionApi.js.map +1 -0
  106. package/dist/entities/security/config/PermissionAssignmentApi.d.ts +6 -0
  107. package/dist/entities/security/config/PermissionAssignmentApi.js +21 -0
  108. package/dist/entities/security/config/PermissionAssignmentApi.js.map +1 -0
  109. package/dist/entities/security/config/PermissionCategoryApi.d.ts +8 -0
  110. package/dist/entities/security/config/PermissionCategoryApi.js +38 -0
  111. package/dist/entities/security/config/PermissionCategoryApi.js.map +1 -0
  112. package/dist/entities/security/config/PermissionDefinitionApi.d.ts +6 -0
  113. package/dist/entities/security/config/PermissionDefinitionApi.js +21 -0
  114. package/dist/entities/security/config/PermissionDefinitionApi.js.map +1 -0
  115. package/dist/entities/security/config/PermissionGroupApi.d.ts +6 -0
  116. package/dist/entities/security/config/PermissionGroupApi.js +21 -0
  117. package/dist/entities/security/config/PermissionGroupApi.js.map +1 -0
  118. package/dist/entities/security/config/PermissionSetApi.d.ts +6 -0
  119. package/dist/entities/security/config/PermissionSetApi.js +21 -0
  120. package/dist/entities/security/config/PermissionSetApi.js.map +1 -0
  121. package/dist/entities/security/config/index.d.ts +6 -0
  122. package/dist/entities/security/config/index.js +23 -0
  123. package/dist/entities/security/config/index.js.map +1 -0
  124. package/dist/entities/security/index.d.ts +2 -0
  125. package/dist/entities/security/index.js +19 -0
  126. package/dist/entities/security/index.js.map +1 -0
  127. package/dist/entities/security/types/IPermission.d.ts +10 -0
  128. package/dist/entities/security/types/IPermission.js +3 -0
  129. package/dist/entities/security/types/IPermission.js.map +1 -0
  130. package/dist/entities/security/types/IPermissionAssignment.d.ts +6 -0
  131. package/dist/entities/security/types/IPermissionAssignment.js +3 -0
  132. package/dist/entities/security/types/IPermissionAssignment.js.map +1 -0
  133. package/dist/entities/security/types/IPermissionCategory.d.ts +5 -0
  134. package/dist/entities/security/types/IPermissionCategory.js +3 -0
  135. package/dist/entities/security/types/IPermissionCategory.js.map +1 -0
  136. package/dist/entities/security/types/IPermissionDefinition.d.ts +6 -0
  137. package/dist/entities/security/types/IPermissionDefinition.js +3 -0
  138. package/dist/entities/security/types/IPermissionDefinition.js.map +1 -0
  139. package/dist/entities/security/types/IPermissionGroup.d.ts +4 -0
  140. package/dist/entities/security/types/IPermissionGroup.js +3 -0
  141. package/dist/entities/security/types/IPermissionGroup.js.map +1 -0
  142. package/dist/entities/security/types/IPermissionSet.d.ts +6 -0
  143. package/dist/entities/security/types/IPermissionSet.js +3 -0
  144. package/dist/entities/security/types/IPermissionSet.js.map +1 -0
  145. package/dist/entities/security/types/SecurityObjectNames.d.ts +8 -0
  146. package/dist/entities/security/types/SecurityObjectNames.js +12 -0
  147. package/dist/entities/security/types/SecurityObjectNames.js.map +1 -0
  148. package/dist/entities/security/types/index.d.ts +7 -0
  149. package/dist/entities/security/types/index.js +24 -0
  150. package/dist/entities/security/types/index.js.map +1 -0
  151. package/dist/entities/user/config/UserApi.d.ts +6 -0
  152. package/dist/entities/user/config/UserApi.js +21 -0
  153. package/dist/entities/user/config/UserApi.js.map +1 -0
  154. package/dist/entities/user/config/index.d.ts +1 -0
  155. package/dist/entities/user/config/index.js +18 -0
  156. package/dist/entities/user/config/index.js.map +1 -0
  157. package/dist/entities/user/index.d.ts +2 -0
  158. package/dist/entities/user/index.js +19 -0
  159. package/dist/entities/user/index.js.map +1 -0
  160. package/dist/entities/user/types/CreateUser.d.ts +5 -0
  161. package/dist/entities/user/types/CreateUser.js +3 -0
  162. package/dist/entities/user/types/CreateUser.js.map +1 -0
  163. package/dist/entities/user/types/IUser.d.ts +6 -0
  164. package/dist/entities/user/types/IUser.js +3 -0
  165. package/dist/entities/user/types/IUser.js.map +1 -0
  166. package/dist/entities/user/types/index.d.ts +2 -0
  167. package/dist/entities/user/types/index.js +19 -0
  168. package/dist/entities/user/types/index.js.map +1 -0
  169. package/dist/entities/workspace/config/WorkspaceApi.d.ts +10 -0
  170. package/dist/entities/workspace/config/WorkspaceApi.js +27 -0
  171. package/dist/entities/workspace/config/WorkspaceApi.js.map +1 -0
  172. package/dist/entities/workspace/config/index.d.ts +1 -0
  173. package/dist/entities/workspace/config/index.js +18 -0
  174. package/dist/entities/workspace/config/index.js.map +1 -0
  175. package/dist/entities/workspace/index.d.ts +2 -0
  176. package/dist/entities/workspace/index.js +19 -0
  177. package/dist/entities/workspace/index.js.map +1 -0
  178. package/dist/entities/workspace/types/InitWorkspace.d.ts +6 -0
  179. package/dist/entities/workspace/types/InitWorkspace.js +3 -0
  180. package/dist/entities/workspace/types/InitWorkspace.js.map +1 -0
  181. package/dist/entities/workspace/types/index.d.ts +1 -0
  182. package/dist/entities/workspace/types/index.js +18 -0
  183. package/dist/entities/workspace/types/index.js.map +1 -0
  184. package/dist/features/bind-this/BindThis.d.ts +3 -0
  185. package/dist/features/bind-this/BindThis.js +9 -0
  186. package/dist/features/bind-this/BindThis.js.map +1 -0
  187. package/dist/features/bind-this/index.d.ts +1 -0
  188. package/dist/features/bind-this/index.js +18 -0
  189. package/dist/features/bind-this/index.js.map +1 -0
  190. package/dist/features/callout/Calloutable.d.ts +4 -0
  191. package/dist/features/callout/Calloutable.js +28 -0
  192. package/dist/features/callout/Calloutable.js.map +1 -0
  193. package/dist/features/callout/index.d.ts +1 -0
  194. package/dist/features/callout/index.js +18 -0
  195. package/dist/features/callout/index.js.map +1 -0
  196. package/dist/features/crud/abstract/AbstractCRUDRequest.d.ts +5 -0
  197. package/dist/features/crud/abstract/AbstractCRUDRequest.js +8 -0
  198. package/dist/features/crud/abstract/AbstractCRUDRequest.js.map +1 -0
  199. package/dist/features/crud/abstract/index.d.ts +1 -0
  200. package/dist/features/crud/abstract/index.js +18 -0
  201. package/dist/features/crud/abstract/index.js.map +1 -0
  202. package/dist/features/crud/index.d.ts +3 -0
  203. package/dist/features/crud/index.js +20 -0
  204. package/dist/features/crud/index.js.map +1 -0
  205. package/dist/features/crud/operations/Create.d.ts +5 -0
  206. package/dist/features/crud/operations/Create.js +17 -0
  207. package/dist/features/crud/operations/Create.js.map +1 -0
  208. package/dist/features/crud/operations/CreateBulk.d.ts +5 -0
  209. package/dist/features/crud/operations/CreateBulk.js +17 -0
  210. package/dist/features/crud/operations/CreateBulk.js.map +1 -0
  211. package/dist/features/crud/operations/DeleteById.d.ts +5 -0
  212. package/dist/features/crud/operations/DeleteById.js +16 -0
  213. package/dist/features/crud/operations/DeleteById.js.map +1 -0
  214. package/dist/features/crud/operations/DeleteByIds.d.ts +5 -0
  215. package/dist/features/crud/operations/DeleteByIds.js +16 -0
  216. package/dist/features/crud/operations/DeleteByIds.js.map +1 -0
  217. package/dist/features/crud/operations/GetAll.d.ts +5 -0
  218. package/dist/features/crud/operations/GetAll.js +16 -0
  219. package/dist/features/crud/operations/GetAll.js.map +1 -0
  220. package/dist/features/crud/operations/GetById.d.ts +5 -0
  221. package/dist/features/crud/operations/GetById.js +16 -0
  222. package/dist/features/crud/operations/GetById.js.map +1 -0
  223. package/dist/features/crud/operations/GetByIds.d.ts +5 -0
  224. package/dist/features/crud/operations/GetByIds.js +17 -0
  225. package/dist/features/crud/operations/GetByIds.js.map +1 -0
  226. package/dist/features/crud/operations/Update.d.ts +5 -0
  227. package/dist/features/crud/operations/Update.js +17 -0
  228. package/dist/features/crud/operations/Update.js.map +1 -0
  229. package/dist/features/crud/operations/UpdateBulk.d.ts +5 -0
  230. package/dist/features/crud/operations/UpdateBulk.js +17 -0
  231. package/dist/features/crud/operations/UpdateBulk.js.map +1 -0
  232. package/dist/features/crud/operations/Upsert.d.ts +5 -0
  233. package/dist/features/crud/operations/Upsert.js +17 -0
  234. package/dist/features/crud/operations/Upsert.js.map +1 -0
  235. package/dist/features/crud/operations/UpsertBulk.d.ts +5 -0
  236. package/dist/features/crud/operations/UpsertBulk.js +17 -0
  237. package/dist/features/crud/operations/UpsertBulk.js.map +1 -0
  238. package/dist/features/crud/operations/index.d.ts +11 -0
  239. package/dist/features/crud/operations/index.js +28 -0
  240. package/dist/features/crud/operations/index.js.map +1 -0
  241. package/dist/features/crud/templates/FullCRUD.d.ts +8 -0
  242. package/dist/features/crud/templates/FullCRUD.js +12 -0
  243. package/dist/features/crud/templates/FullCRUD.js.map +1 -0
  244. package/dist/features/crud/templates/FullCreate.d.ts +6 -0
  245. package/dist/features/crud/templates/FullCreate.js +10 -0
  246. package/dist/features/crud/templates/FullCreate.js.map +1 -0
  247. package/dist/features/crud/templates/FullDelete.d.ts +6 -0
  248. package/dist/features/crud/templates/FullDelete.js +10 -0
  249. package/dist/features/crud/templates/FullDelete.js.map +1 -0
  250. package/dist/features/crud/templates/FullQuery.d.ts +7 -0
  251. package/dist/features/crud/templates/FullQuery.js +11 -0
  252. package/dist/features/crud/templates/FullQuery.js.map +1 -0
  253. package/dist/features/crud/templates/FullUpdate.d.ts +6 -0
  254. package/dist/features/crud/templates/FullUpdate.js +10 -0
  255. package/dist/features/crud/templates/FullUpdate.js.map +1 -0
  256. package/dist/features/crud/templates/FullUpsert.d.ts +6 -0
  257. package/dist/features/crud/templates/FullUpsert.js +10 -0
  258. package/dist/features/crud/templates/FullUpsert.js.map +1 -0
  259. package/dist/features/crud/templates/index.d.ts +6 -0
  260. package/dist/features/crud/templates/index.js +23 -0
  261. package/dist/features/crud/templates/index.js.map +1 -0
  262. package/dist/features/index.d.ts +3 -0
  263. package/dist/features/index.js +20 -0
  264. package/dist/features/index.js.map +1 -0
  265. package/dist/index.d.ts +2 -3
  266. package/dist/index.js +2 -3
  267. package/dist/index.js.map +1 -1
  268. package/dist/tsconfig.build.tsbuildinfo +1 -1
  269. package/dist/types/Constructable.d.ts +3 -0
  270. package/dist/types/Constructable.js +3 -0
  271. package/dist/types/Constructable.js.map +1 -0
  272. package/dist/types/HasDBId.d.ts +3 -0
  273. package/dist/types/HasDBId.js +3 -0
  274. package/dist/types/HasDBId.js.map +1 -0
  275. package/dist/types/HasEmail.d.ts +3 -0
  276. package/dist/types/HasEmail.js +3 -0
  277. package/dist/types/HasEmail.js.map +1 -0
  278. package/dist/types/HasId.d.ts +3 -0
  279. package/dist/types/HasId.js +3 -0
  280. package/dist/types/HasId.js.map +1 -0
  281. package/dist/types/HasLabel.d.ts +3 -0
  282. package/dist/types/HasLabel.js +3 -0
  283. package/dist/types/HasLabel.js.map +1 -0
  284. package/dist/types/HasMode.d.ts +3 -0
  285. package/dist/types/HasMode.js +3 -0
  286. package/dist/types/HasMode.js.map +1 -0
  287. package/dist/types/HasOrder.d.ts +3 -0
  288. package/dist/types/HasOrder.js +3 -0
  289. package/dist/types/HasOrder.js.map +1 -0
  290. package/dist/types/index.d.ts +6 -1
  291. package/dist/types/index.js +6 -1
  292. package/dist/types/index.js.map +1 -1
  293. package/package.json +2 -1
@@ -0,0 +1,6 @@
1
+ export declare class ApiConfigs {
2
+ static workspaceUrl: string;
3
+ static initURL: string;
4
+ static queryUrl: string;
5
+ static authUrl: string;
6
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApiConfigs = void 0;
4
+ class ApiConfigs {
5
+ }
6
+ exports.ApiConfigs = ApiConfigs;
7
+ //# sourceMappingURL=ApiConfigs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiConfigs.js","sourceRoot":"","sources":["../src/ApiConfigs.ts"],"names":[],"mappings":";;;AAAA,MAAa,UAAU;CAKtB;AALD,gCAKC"}
package/dist/RawApi.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { FieldApi, ModuleApi, ObjectApi, PermissionApi, PermissionAssignmentApi, PermissionCategoryApi, PermissionDefinitionApi, PermissionGroupApi, PermissionSetApi, UserApi, AuthApi, WorkspaceApi } from "./configs";
1
+ import { FieldApi, ModuleApi, ObjectApi, PermissionApi, PermissionAssignmentApi, PermissionCategoryApi, PermissionDefinitionApi, PermissionGroupApi, PermissionSetApi, UserApi, AuthApi, WorkspaceApi } from "./entities";
2
2
  export declare const RawApi: {
3
3
  readonly permission: PermissionApi;
4
4
  readonly permissionGroup: PermissionGroupApi;
package/dist/RawApi.js CHANGED
@@ -1,19 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RawApi = void 0;
4
- const configs_1 = require("./configs");
4
+ const entities_1 = require("./entities");
5
5
  exports.RawApi = {
6
- permission: new configs_1.PermissionApi(),
7
- permissionGroup: new configs_1.PermissionGroupApi(),
8
- permissionDefinition: new configs_1.PermissionDefinitionApi(),
9
- permissionCategory: new configs_1.PermissionCategoryApi(),
10
- permissionSet: new configs_1.PermissionSetApi(),
11
- permissionAssignment: new configs_1.PermissionAssignmentApi(),
12
- user: new configs_1.UserApi,
13
- module: new configs_1.ModuleApi(),
14
- object: new configs_1.ObjectApi(),
15
- field: new configs_1.FieldApi(),
16
- auth: new configs_1.AuthApi(),
17
- workspace: new configs_1.WorkspaceApi(),
6
+ permission: new entities_1.PermissionApi(),
7
+ permissionGroup: new entities_1.PermissionGroupApi(),
8
+ permissionDefinition: new entities_1.PermissionDefinitionApi(),
9
+ permissionCategory: new entities_1.PermissionCategoryApi(),
10
+ permissionSet: new entities_1.PermissionSetApi(),
11
+ permissionAssignment: new entities_1.PermissionAssignmentApi(),
12
+ user: new entities_1.UserApi,
13
+ module: new entities_1.ModuleApi(),
14
+ object: new entities_1.ObjectApi(),
15
+ field: new entities_1.FieldApi(),
16
+ auth: new entities_1.AuthApi(),
17
+ workspace: new entities_1.WorkspaceApi(),
18
18
  };
19
19
  //# sourceMappingURL=RawApi.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RawApi.js","sourceRoot":"","sources":["../src/RawApi.ts"],"names":[],"mappings":";;;AAAA,uCAamB;AAEN,QAAA,MAAM,GAAG;IACpB,UAAU,EAAE,IAAI,uBAAa,EAAE;IAC/B,eAAe,EAAE,IAAI,4BAAkB,EAAE;IACzC,oBAAoB,EAAE,IAAI,iCAAuB,EAAE;IACnD,kBAAkB,EAAE,IAAI,+BAAqB,EAAE;IAC/C,aAAa,EAAE,IAAI,0BAAgB,EAAE;IACrC,oBAAoB,EAAE,IAAI,iCAAuB,EAAE;IACnD,IAAI,EAAE,IAAI,iBAAO;IACjB,MAAM,EAAE,IAAI,mBAAS,EAAE;IACvB,MAAM,EAAE,IAAI,mBAAS,EAAE;IACvB,KAAK,EAAE,IAAI,kBAAQ,EAAE;IACrB,IAAI,EAAE,IAAI,iBAAO,EAAE;IACnB,SAAS,EAAE,IAAI,sBAAY,EAAE;CACrB,CAAC"}
1
+ {"version":3,"file":"RawApi.js","sourceRoot":"","sources":["../src/RawApi.ts"],"names":[],"mappings":";;;AAAA,yCAaoB;AAEP,QAAA,MAAM,GAAG;IACpB,UAAU,EAAE,IAAI,wBAAa,EAAE;IAC/B,eAAe,EAAE,IAAI,6BAAkB,EAAE;IACzC,oBAAoB,EAAE,IAAI,kCAAuB,EAAE;IACnD,kBAAkB,EAAE,IAAI,gCAAqB,EAAE;IAC/C,aAAa,EAAE,IAAI,2BAAgB,EAAE;IACrC,oBAAoB,EAAE,IAAI,kCAAuB,EAAE;IACnD,IAAI,EAAE,IAAI,kBAAO;IACjB,MAAM,EAAE,IAAI,oBAAS,EAAE;IACvB,MAAM,EAAE,IAAI,oBAAS,EAAE;IACvB,KAAK,EAAE,IAAI,mBAAQ,EAAE;IACrB,IAAI,EAAE,IAAI,kBAAO,EAAE;IACnB,SAAS,EAAE,IAAI,uBAAY,EAAE;CACrB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { AxiosRequestConfig } from "axios";
2
+ import { BindThis } from "../../../features";
3
+ import { AuthSignIn, AuthActivateUser } from "../types";
4
+ export declare class AuthApi extends BindThis {
5
+ getTokensByCredentials(user: AuthSignIn): AxiosRequestConfig<any>;
6
+ getAuthCodeByCredentials(user: AuthSignIn): AxiosRequestConfig<any>;
7
+ getTokensByAuthCode(code: string): AxiosRequestConfig<any>;
8
+ activate(user: AuthActivateUser): AxiosRequestConfig<any>;
9
+ refresh(refreshToken: string): AxiosRequestConfig<any>;
10
+ }
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.AuthApi = void 0;
10
+ const features_1 = require("../../../features");
11
+ const ApiConfigs_1 = require("../../../ApiConfigs");
12
+ let AuthApi = class AuthApi extends features_1.BindThis {
13
+ getTokensByCredentials(user) {
14
+ return {
15
+ baseURL: ApiConfigs_1.ApiConfigs.authUrl,
16
+ url: '/user/signin',
17
+ method: 'POST',
18
+ data: user
19
+ };
20
+ }
21
+ getAuthCodeByCredentials(user) {
22
+ return {
23
+ baseURL: ApiConfigs_1.ApiConfigs.authUrl,
24
+ url: '/user/signin/code',
25
+ method: 'POST',
26
+ data: user
27
+ };
28
+ }
29
+ getTokensByAuthCode(code) {
30
+ return {
31
+ baseURL: ApiConfigs_1.ApiConfigs.authUrl,
32
+ url: `/user/signin/code/${code}`,
33
+ method: 'GET',
34
+ };
35
+ }
36
+ activate(user) {
37
+ return {
38
+ baseURL: ApiConfigs_1.ApiConfigs.authUrl,
39
+ url: '/user/signup',
40
+ method: 'POST',
41
+ data: user
42
+ };
43
+ }
44
+ refresh(refreshToken) {
45
+ return {
46
+ baseURL: ApiConfigs_1.ApiConfigs.authUrl,
47
+ url: '/refresh',
48
+ method: 'POST',
49
+ data: { refreshToken }
50
+ };
51
+ }
52
+ };
53
+ AuthApi = __decorate([
54
+ (0, features_1.Calloutable)()
55
+ ], AuthApi);
56
+ exports.AuthApi = AuthApi;
57
+ //# sourceMappingURL=AuthApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthApi.js","sourceRoot":"","sources":["../../../../src/entities/auth/config/AuthApi.ts"],"names":[],"mappings":";;;;;;;;;AACA,gDAAwD;AAExD,oDAA+C;AAGxC,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,mBAAQ;IAE5B,sBAAsB,CAAC,IAAgB;QAC5C,OAAO;YACL,OAAO,EAAE,uBAAU,CAAC,OAAO;YAC3B,GAAG,EAAE,cAAc;YACnB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACW,CAAA;IACzB,CAAC;IAEM,wBAAwB,CAAC,IAAgB;QAC9C,OAAO;YACL,OAAO,EAAE,uBAAU,CAAC,OAAO;YAC3B,GAAG,EAAE,mBAAmB;YACxB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACW,CAAA;IACzB,CAAC;IAEM,mBAAmB,CAAC,IAAY;QACrC,OAAO;YACL,OAAO,EAAE,uBAAU,CAAC,OAAO;YAC3B,GAAG,EAAE,qBAAqB,IAAI,EAAE;YAChC,MAAM,EAAE,KAAK;SACQ,CAAA;IACzB,CAAC;IAEM,QAAQ,CAAC,IAAsB;QACpC,OAAO;YACL,OAAO,EAAE,uBAAU,CAAC,OAAO;YAC3B,GAAG,EAAE,cAAc;YACnB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACW,CAAA;IACzB,CAAC;IAEM,OAAO,CAAC,YAAoB;QACjC,OAAO;YACL,OAAO,EAAE,uBAAU,CAAC,OAAO;YAC3B,GAAG,EAAE,UAAU;YACf,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,YAAY,EAAE;SACD,CAAA;IACzB,CAAC;CAEF,CAAA;AA9CY,OAAO;IADnB,IAAA,sBAAW,GAAE;GACD,OAAO,CA8CnB;AA9CY,0BAAO"}
@@ -0,0 +1 @@
1
+ export * from './AuthApi';
@@ -0,0 +1,18 @@
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("./AuthApi"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/entities/auth/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B"}
@@ -0,0 +1,2 @@
1
+ export * from './config';
2
+ export * from './types';
@@ -0,0 +1,19 @@
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("./config"), exports);
18
+ __exportStar(require("./types"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,0CAAwB"}
@@ -0,0 +1,7 @@
1
+ import { InternalAxiosRequestConfig } from "axios";
2
+ export declare class AuthAxiosService {
3
+ static getAxiosInstance(): import("axios").AxiosInstance;
4
+ static setTokenHeader(config: InternalAxiosRequestConfig): InternalAxiosRequestConfig<any>;
5
+ static refreshTokens(error: any): Promise<any>;
6
+ static redirectToSignIn(): void;
7
+ }
@@ -0,0 +1,39 @@
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 {
8
+ static getAxiosInstance() {
9
+ const instance = axios_1.default.create();
10
+ instance.interceptors.request.use(AuthAxiosService.setTokenHeader, error => Promise.reject(error));
11
+ instance.interceptors.response.use(response => response, AuthAxiosService.refreshTokens);
12
+ return instance;
13
+ }
14
+ static setTokenHeader(config) {
15
+ const accessToken = AuthTokensService_1.AuthTokensService.getAccessToken();
16
+ if (!accessToken)
17
+ return config;
18
+ config.headers.Authorization = config ? `Bearer ${accessToken}` : '';
19
+ return config;
20
+ }
21
+ static async refreshTokens(error) {
22
+ if (error.response.status !== 403)
23
+ return Promise.reject(error);
24
+ await AuthService_1.AuthService.refresh();
25
+ if (!AuthTokensService_1.AuthTokensService.isTokensExists()) {
26
+ AuthAxiosService.redirectToSignIn();
27
+ return error;
28
+ }
29
+ return (0, axios_1.default)(error.config);
30
+ }
31
+ static redirectToSignIn() {
32
+ const loginURL = `http://auth.localhost`;
33
+ const redirectURL = window.location.href;
34
+ const url = `${loginURL}?redirect=${redirectURL}`;
35
+ window.location.replace(url);
36
+ }
37
+ }
38
+ exports.AuthAxiosService = AuthAxiosService;
39
+ //# sourceMappingURL=AuthAxiosService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthAxiosService.js","sourceRoot":"","sources":["../../../../src/entities/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,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACnG,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAEzF,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,KAAK,CAAC,QAAQ,CAAC,MAAM,KAAK,GAAG;YAAE,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAEhE,MAAM,yBAAW,CAAC,OAAO,EAAE,CAAC;QAE5B,IAAI,CAAC,qCAAiB,CAAC,cAAc,EAAE,EAAE;YACvC,gBAAgB,CAAC,gBAAgB,EAAE,CAAC;YAEpC,OAAO,KAAK,CAAC;SACd;QAED,OAAO,IAAA,eAAK,EAAC,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;AA3CD,4CA2CC"}
@@ -0,0 +1,3 @@
1
+ export declare class AuthError extends Error {
2
+ constructor(message: string);
3
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthError = void 0;
4
+ class AuthError extends Error {
5
+ constructor(message) {
6
+ super(message);
7
+ }
8
+ }
9
+ exports.AuthError = AuthError;
10
+ //# sourceMappingURL=AuthError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthError.js","sourceRoot":"","sources":["../../../../src/entities/auth/services/AuthError.ts"],"names":[],"mappings":";;;AAAA,MAAa,SAAU,SAAQ,KAAK;IAClC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CACF;AAJD,8BAIC"}
@@ -0,0 +1,4 @@
1
+ export declare class AuthService {
2
+ static signInByCode(code: string): Promise<import("..").AuthApiTokens>;
3
+ static refresh(): Promise<any>;
4
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthService = void 0;
4
+ const Api_1 = require("../../../Api");
5
+ const AuthTokensService_1 = require("./AuthTokensService");
6
+ class AuthService {
7
+ static async signInByCode(code) {
8
+ var _a;
9
+ if (!code)
10
+ return;
11
+ const tokens = (_a = (await Api_1.Api.auth.getTokensByAuthCodeCallout.invoke(code))) === null || _a === void 0 ? void 0 : _a.data;
12
+ return AuthTokensService_1.AuthTokensService.setTokens(tokens);
13
+ }
14
+ static async refresh() {
15
+ const refreshToken = AuthTokensService_1.AuthTokensService.getRefreshToken();
16
+ if (!refreshToken)
17
+ return;
18
+ const tokens = (await Api_1.Api.auth.refreshCallout.invoke(refreshToken)).data;
19
+ AuthTokensService_1.AuthTokensService.setTokens(tokens);
20
+ return tokens;
21
+ }
22
+ }
23
+ exports.AuthService = AuthService;
24
+ //# sourceMappingURL=AuthService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthService.js","sourceRoot":"","sources":["../../../../src/entities/auth/services/AuthService.ts"],"names":[],"mappings":";;;AAAA,sCAAiC;AACjC,2DAAsD;AAEtD,MAAa,WAAW;IAEtB,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,IAAY;;QACpC,IAAI,CAAC,IAAI;YAAE,OAAO;QAElB,MAAM,MAAM,GAAG,MAAA,CAAC,MAAM,SAAG,CAAC,IAAI,CAAC,0BAA0B,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,0CAAE,IAAI,CAAC;QAE9E,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;QAE1B,MAAM,MAAM,GAAG,CAAC,MAAM,SAAG,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC;QAEzE,qCAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAEpC,OAAO,MAAM,CAAC;IAChB,CAAC;CAEF;AAtBD,kCAsBC"}
@@ -0,0 +1,11 @@
1
+ import { AuthApiTokens } from "../../index";
2
+ export declare const ACCESS_TOKEN_KEY = "access_token";
3
+ export declare const REFRESH_TOKEN_KEY = "refresh_token";
4
+ export declare class AuthTokensService {
5
+ static getAccessToken(): string;
6
+ static setAccessToken(token: string): void;
7
+ static getRefreshToken(): string;
8
+ static setRefreshToken(token: string): void;
9
+ static setTokens(tokens: AuthApiTokens | undefined): AuthApiTokens;
10
+ static isTokensExists(): string;
11
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthTokensService = exports.REFRESH_TOKEN_KEY = exports.ACCESS_TOKEN_KEY = void 0;
4
+ const AuthError_1 = require("./AuthError");
5
+ exports.ACCESS_TOKEN_KEY = 'access_token';
6
+ exports.REFRESH_TOKEN_KEY = 'refresh_token';
7
+ class AuthTokensService {
8
+ static getAccessToken() {
9
+ return localStorage.getItem(exports.ACCESS_TOKEN_KEY);
10
+ }
11
+ static setAccessToken(token) {
12
+ if (!token)
13
+ throw new AuthError_1.AuthError('Access token is not defined during saving');
14
+ localStorage.setItem(exports.ACCESS_TOKEN_KEY, token);
15
+ }
16
+ static getRefreshToken() {
17
+ return localStorage.getItem(exports.REFRESH_TOKEN_KEY);
18
+ }
19
+ static setRefreshToken(token) {
20
+ if (!token)
21
+ throw new AuthError_1.AuthError('Refresh token is not defined during saving');
22
+ localStorage.setItem(exports.REFRESH_TOKEN_KEY, token);
23
+ }
24
+ static setTokens(tokens) {
25
+ if (!tokens)
26
+ return;
27
+ this.setAccessToken(tokens.accessToken);
28
+ this.setRefreshToken(tokens.refreshToken);
29
+ return tokens;
30
+ }
31
+ static isTokensExists() {
32
+ return AuthTokensService.getAccessToken() && AuthTokensService.getRefreshToken();
33
+ }
34
+ }
35
+ exports.AuthTokensService = AuthTokensService;
36
+ //# sourceMappingURL=AuthTokensService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthTokensService.js","sourceRoot":"","sources":["../../../../src/entities/auth/services/AuthTokensService.ts"],"names":[],"mappings":";;;AACA,2CAAsC;AAEzB,QAAA,gBAAgB,GAAG,cAAc,CAAC;AAClC,QAAA,iBAAiB,GAAG,eAAe,CAAC;AAEjD,MAAa,iBAAiB;IAE5B,MAAM,CAAC,cAAc;QACnB,OAAO,YAAY,CAAC,OAAO,CAAC,wBAAgB,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,KAAa;QACjC,IAAI,CAAC,KAAK;YAAE,MAAM,IAAI,qBAAS,CAAC,2CAA2C,CAAC,CAAC;QAE7E,YAAY,CAAC,OAAO,CAAC,wBAAgB,EAAE,KAAK,CAAC,CAAC;IAChD,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,qBAAS,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;AAlCD,8CAkCC"}
@@ -0,0 +1,3 @@
1
+ export * from './AuthTokensService';
2
+ export * from './AuthService';
3
+ export * from './AuthAxiosService';
@@ -0,0 +1,20 @@
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);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/entities/auth/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,gDAA8B;AAC9B,qDAAmC"}
@@ -0,0 +1,5 @@
1
+ export type AuthActivateUser = {
2
+ username: string;
3
+ password: string;
4
+ token: string;
5
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=AuthActivateUser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthActivateUser.js","sourceRoot":"","sources":["../../../../src/entities/auth/types/AuthActivateUser.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export type AuthApiTokens = {
2
+ accessToken: string;
3
+ refreshToken: string;
4
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=AuthApiTokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthApiTokens.js","sourceRoot":"","sources":["../../../../src/entities/auth/types/AuthApiTokens.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export type AuthChangePassword = {
2
+ username: string;
3
+ oldPassword: string;
4
+ newPassword: string;
5
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=AuthChangePassword.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthChangePassword.js","sourceRoot":"","sources":["../../../../src/entities/auth/types/AuthChangePassword.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export type AuthCode = {
2
+ code: string;
3
+ domain: string;
4
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=AuthCode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthCode.js","sourceRoot":"","sources":["../../../../src/entities/auth/types/AuthCode.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export type AuthSignIn = {
2
+ username: string;
3
+ password: string;
4
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=AuthSignIn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthSignIn.js","sourceRoot":"","sources":["../../../../src/entities/auth/types/AuthSignIn.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export type AuthUserJWT = {
2
+ userId: string;
3
+ email: string;
4
+ username: string;
5
+ domain: string;
6
+ iat: number;
7
+ exp: number;
8
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=AuthUserJWT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthUserJWT.js","sourceRoot":"","sources":["../../../../src/entities/auth/types/AuthUserJWT.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export * from './AuthUserJWT';
2
+ export * from './AuthApiTokens';
3
+ export * from './AuthActivateUser';
4
+ export * from './AuthChangePassword';
5
+ export * from './AuthSignIn';
6
+ export * from './AuthCode';
@@ -0,0 +1,23 @@
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
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/entities/auth/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,kDAAgC;AAChC,qDAAmC;AACnC,uDAAqC;AACrC,+CAA6B;AAC7B,6CAA2B"}
@@ -0,0 +1,6 @@
1
+ export * from './module';
2
+ export * from './schema';
3
+ export * from './security';
4
+ export * from './user';
5
+ export * from './auth';
6
+ export * from './workspace';
@@ -0,0 +1,23 @@
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("./module"), exports);
18
+ __exportStar(require("./schema"), exports);
19
+ __exportStar(require("./security"), exports);
20
+ __exportStar(require("./user"), exports);
21
+ __exportStar(require("./auth"), exports);
22
+ __exportStar(require("./workspace"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,6CAA2B;AAC3B,yCAAuB;AACvB,yCAAuB;AACvB,8CAA4B"}
@@ -0,0 +1,10 @@
1
+ import { FullCRUD } from "../../../features";
2
+ import { AxiosRequestConfig } from "axios";
3
+ import { IModule, IModuleAction } from "../types";
4
+ export declare class ModuleApi extends FullCRUD<IModule> {
5
+ getApiUrl(): string;
6
+ getObjectName(): string;
7
+ createAction(moduleId: string, action: IModuleAction): AxiosRequestConfig<any>;
8
+ updateAction(moduleId: string, actionName: string, action: IModuleAction): AxiosRequestConfig<any>;
9
+ deleteAction(moduleId: string, actionName: string): AxiosRequestConfig<any>;
10
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.ModuleApi = void 0;
10
+ const features_1 = require("../../../features");
11
+ const features_2 = require("../../../features");
12
+ const ApiConfigs_1 = require("../../../ApiConfigs");
13
+ let ModuleApi = class ModuleApi extends features_1.FullCRUD {
14
+ getApiUrl() { return ApiConfigs_1.ApiConfigs.workspaceUrl; }
15
+ getObjectName() { return 'module'; }
16
+ createAction(moduleId, action) {
17
+ return {
18
+ baseURL: this.getApiUrl(),
19
+ url: `/${this.getObjectName()}/${moduleId}/action`,
20
+ method: 'POST',
21
+ data: action
22
+ };
23
+ }
24
+ updateAction(moduleId, actionName, action) {
25
+ return {
26
+ baseURL: this.getApiUrl(),
27
+ url: `/${this.getObjectName()}/${moduleId}/action/${actionName}`,
28
+ method: 'PATCH',
29
+ data: action
30
+ };
31
+ }
32
+ deleteAction(moduleId, actionName) {
33
+ return {
34
+ baseURL: this.getApiUrl(),
35
+ url: `/${this.getObjectName()}/${moduleId}/action/${actionName}`,
36
+ method: 'DELETE',
37
+ };
38
+ }
39
+ };
40
+ ModuleApi = __decorate([
41
+ (0, features_2.Calloutable)()
42
+ ], ModuleApi);
43
+ exports.ModuleApi = ModuleApi;
44
+ //# sourceMappingURL=ModuleApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModuleApi.js","sourceRoot":"","sources":["../../../../src/entities/module/config/ModuleApi.ts"],"names":[],"mappings":";;;;;;;;;AAAA,gDAA2C;AAC3C,gDAA8C;AAG9C,oDAA+C;AAGxC,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,mBAAiB;IAE9B,SAAS,KAAK,OAAO,uBAAU,CAAC,YAAY,CAAA,CAAC,CAAC;IAE9C,aAAa,KAAK,OAAO,QAAQ,CAAA,CAAC,CAAC;IAE5C,YAAY,CAAC,QAAgB,EAAE,MAAqB;QACzD,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE;YACzB,GAAG,EAAE,IAAI,IAAI,CAAC,aAAa,EAAE,IAAI,QAAQ,SAAS;YAClD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,MAAM;SACS,CAAA;IACzB,CAAC;IAEM,YAAY,CAAC,QAAgB,EAAE,UAAkB,EAAE,MAAqB;QAC7E,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE;YACzB,GAAG,EAAE,IAAI,IAAI,CAAC,aAAa,EAAE,IAAI,QAAQ,WAAW,UAAU,EAAE;YAChE,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,MAAM;SACS,CAAA;IACzB,CAAC;IAEM,YAAY,CAAC,QAAgB,EAAE,UAAkB;QACtD,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE;YACzB,GAAG,EAAE,IAAI,IAAI,CAAC,aAAa,EAAE,IAAI,QAAQ,WAAW,UAAU,EAAE;YAChE,MAAM,EAAE,QAAQ;SACK,CAAA;IACzB,CAAC;CACF,CAAA;AA/BY,SAAS;IADrB,IAAA,sBAAW,GAAE;GACD,SAAS,CA+BrB;AA/BY,8BAAS"}