@buildery/ts-api-kit 4.12.3 → 5.0.1

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 (217) hide show
  1. package/dist/Api.d.ts +8 -6
  2. package/dist/Api.js.map +1 -1
  3. package/dist/compose/useSingleton.d.ts +2 -1
  4. package/dist/compose/useSingleton.js.map +1 -1
  5. package/dist/config/ApiConfigs.d.ts +10 -6
  6. package/dist/config/ApiConfigs.js +10 -0
  7. package/dist/config/ApiConfigs.js.map +1 -1
  8. package/dist/config/RawApi.d.ts +32 -14
  9. package/dist/config/RawApi.js +35 -14
  10. package/dist/config/RawApi.js.map +1 -1
  11. package/dist/features/api/abstract/AbstractApi.d.ts +6 -0
  12. package/dist/features/api/abstract/AbstractApi.js +20 -0
  13. package/dist/features/api/abstract/AbstractApi.js.map +1 -0
  14. package/dist/features/auth/services/AuthService.js +2 -4
  15. package/dist/features/auth/services/AuthService.js.map +1 -1
  16. package/dist/features/callout/decorators/Calloutable.d.ts +3 -4
  17. package/dist/features/callout/decorators/Calloutable.js +10 -42
  18. package/dist/features/callout/decorators/Calloutable.js.map +1 -1
  19. package/dist/features/callout/decorators/index.d.ts +0 -1
  20. package/dist/features/callout/decorators/index.js +0 -1
  21. package/dist/features/callout/decorators/index.js.map +1 -1
  22. package/dist/features/callout/types/ApiCalloutMiddleware.d.ts +1 -1
  23. package/dist/features/crud/operations/abstract/AbstractCRUDApi.d.ts +5 -3
  24. package/dist/features/crud/operations/abstract/AbstractCRUDApi.js +11 -5
  25. package/dist/features/crud/operations/abstract/AbstractCRUDApi.js.map +1 -1
  26. package/dist/features/crud/operations/index.d.ts +0 -1
  27. package/dist/features/crud/operations/index.js +0 -1
  28. package/dist/features/crud/operations/index.js.map +1 -1
  29. package/dist/features/crud/operations/operations/Create.d.ts +2 -2
  30. package/dist/features/crud/operations/operations/Create.js +4 -5
  31. package/dist/features/crud/operations/operations/Create.js.map +1 -1
  32. package/dist/features/crud/operations/operations/CreateBulk.d.ts +2 -2
  33. package/dist/features/crud/operations/operations/CreateBulk.js +4 -5
  34. package/dist/features/crud/operations/operations/CreateBulk.js.map +1 -1
  35. package/dist/features/crud/operations/operations/DeleteById.d.ts +1 -1
  36. package/dist/features/crud/operations/operations/DeleteById.js +4 -5
  37. package/dist/features/crud/operations/operations/DeleteById.js.map +1 -1
  38. package/dist/features/crud/operations/operations/DeleteByIds.d.ts +1 -1
  39. package/dist/features/crud/operations/operations/DeleteByIds.js +3 -3
  40. package/dist/features/crud/operations/operations/DeleteByIds.js.map +1 -1
  41. package/dist/features/crud/operations/operations/GetAll.d.ts +1 -1
  42. package/dist/features/crud/operations/operations/GetAll.js +3 -3
  43. package/dist/features/crud/operations/operations/GetAll.js.map +1 -1
  44. package/dist/features/crud/operations/operations/GetByFilters.d.ts +6 -0
  45. package/dist/features/crud/operations/operations/GetByFilters.js +34 -0
  46. package/dist/features/crud/operations/operations/GetByFilters.js.map +1 -0
  47. package/dist/features/crud/operations/operations/GetById.d.ts +1 -1
  48. package/dist/features/crud/operations/operations/GetById.js +3 -3
  49. package/dist/features/crud/operations/operations/GetById.js.map +1 -1
  50. package/dist/features/crud/operations/operations/GetByIds.d.ts +1 -1
  51. package/dist/features/crud/operations/operations/GetByIds.js +3 -3
  52. package/dist/features/crud/operations/operations/GetByIds.js.map +1 -1
  53. package/dist/features/crud/operations/operations/Update.d.ts +2 -2
  54. package/dist/features/crud/operations/operations/Update.js +4 -5
  55. package/dist/features/crud/operations/operations/Update.js.map +1 -1
  56. package/dist/features/crud/operations/operations/UpdateBulk.d.ts +2 -2
  57. package/dist/features/crud/operations/operations/UpdateBulk.js +4 -5
  58. package/dist/features/crud/operations/operations/UpdateBulk.js.map +1 -1
  59. package/dist/features/crud/operations/operations/Upsert.d.ts +2 -2
  60. package/dist/features/crud/operations/operations/Upsert.js +4 -5
  61. package/dist/features/crud/operations/operations/Upsert.js.map +1 -1
  62. package/dist/features/crud/operations/operations/UpsertBulk.d.ts +2 -2
  63. package/dist/features/crud/operations/operations/UpsertBulk.js +4 -5
  64. package/dist/features/crud/operations/operations/UpsertBulk.js.map +1 -1
  65. package/dist/features/crud/operations/operations/index.d.ts +1 -0
  66. package/dist/features/crud/operations/operations/index.js +1 -0
  67. package/dist/features/crud/operations/operations/index.js.map +1 -1
  68. package/dist/features/crud/operations/templates/FullQuery.d.ts +2 -1
  69. package/dist/features/crud/operations/templates/FullQuery.js +2 -1
  70. package/dist/features/crud/operations/templates/FullQuery.js.map +1 -1
  71. package/dist/features/crud/sync/compose/useCrudSync.js +5 -5
  72. package/dist/features/crud/sync/compose/useCrudSync.js.map +1 -1
  73. package/dist/features/crud/sync/middlewares/PushCrudEvent.js +2 -2
  74. package/dist/features/crud/sync/middlewares/PushCrudEvent.js.map +1 -1
  75. package/dist/index.d.ts +1 -1
  76. package/dist/index.js +1 -1
  77. package/dist/index.js.map +1 -1
  78. package/dist/main.d.ts +1 -0
  79. package/dist/main.js +8 -0
  80. package/dist/main.js.map +1 -1
  81. package/dist/micro/auth/AuthApi.d.ts +22 -0
  82. package/dist/micro/auth/AuthApi.js +128 -0
  83. package/dist/micro/auth/AuthApi.js.map +1 -0
  84. package/dist/micro/auth/WorkspaceApi.d.ts +10 -0
  85. package/dist/micro/auth/WorkspaceApi.js +32 -0
  86. package/dist/micro/auth/WorkspaceApi.js.map +1 -0
  87. package/dist/micro/auth/index.d.ts +1 -0
  88. package/dist/micro/auth/index.js +18 -0
  89. package/dist/micro/auth/index.js.map +1 -0
  90. package/dist/micro/auth/types/InitWorkspace.d.ts +8 -0
  91. package/dist/micro/auth/types/InitWorkspace.js +3 -0
  92. package/dist/micro/auth/types/InitWorkspace.js.map +1 -0
  93. package/dist/micro/auth/types/index.d.ts +1 -0
  94. package/dist/micro/auth/types/index.js +18 -0
  95. package/dist/micro/auth/types/index.js.map +1 -0
  96. package/dist/micro/index.d.ts +4 -0
  97. package/dist/micro/index.js +21 -0
  98. package/dist/micro/index.js.map +1 -0
  99. package/dist/micro/init/WorkspaceApi.d.ts +10 -0
  100. package/dist/micro/init/WorkspaceApi.js +27 -0
  101. package/dist/micro/init/WorkspaceApi.js.map +1 -0
  102. package/dist/micro/init/types/InitWorkspace.d.ts +8 -0
  103. package/dist/micro/init/types/InitWorkspace.js +3 -0
  104. package/dist/micro/init/types/InitWorkspace.js.map +1 -0
  105. package/dist/micro/query/FieldApi.d.ts +12 -0
  106. package/dist/micro/query/FieldApi.js +69 -0
  107. package/dist/micro/query/FieldApi.js.map +1 -0
  108. package/dist/micro/query/RecordApi.d.ts +16 -0
  109. package/dist/micro/query/RecordApi.js +24 -0
  110. package/dist/micro/query/RecordApi.js.map +1 -0
  111. package/dist/micro/query/SObjectApi.d.ts +8 -0
  112. package/dist/micro/query/SObjectApi.js +30 -0
  113. package/dist/micro/query/SObjectApi.js.map +1 -0
  114. package/dist/micro/query/error/ObjectApiError.d.ts +3 -0
  115. package/dist/micro/query/error/ObjectApiError.js +10 -0
  116. package/dist/micro/query/error/ObjectApiError.js.map +1 -0
  117. package/dist/micro/query/error/index.d.ts +1 -0
  118. package/dist/micro/query/error/index.js +18 -0
  119. package/dist/micro/query/error/index.js.map +1 -0
  120. package/dist/micro/query/index.d.ts +1 -0
  121. package/dist/micro/query/index.js +18 -0
  122. package/dist/micro/query/index.js.map +1 -0
  123. package/dist/micro/query/record/index.d.ts +2 -0
  124. package/dist/micro/query/record/index.js +19 -0
  125. package/dist/micro/query/record/index.js.map +1 -0
  126. package/dist/micro/query/types/FieldType.d.ts +9 -0
  127. package/dist/micro/query/types/FieldType.js +14 -0
  128. package/dist/micro/query/types/FieldType.js.map +1 -0
  129. package/dist/micro/query/types/PicklistValue.d.ts +4 -0
  130. package/dist/micro/query/types/PicklistValue.js +3 -0
  131. package/dist/micro/query/types/PicklistValue.js.map +1 -0
  132. package/dist/micro/query/types/SObject.d.ts +7 -0
  133. package/dist/micro/query/types/SObject.js +3 -0
  134. package/dist/micro/query/types/SObject.js.map +1 -0
  135. package/dist/micro/query/types/SObjectField.d.ts +30 -0
  136. package/dist/micro/query/types/SObjectField.js +3 -0
  137. package/dist/micro/query/types/SObjectField.js.map +1 -0
  138. package/dist/micro/query/types/SchemaObjectNames.d.ts +4 -0
  139. package/dist/micro/query/types/SchemaObjectNames.js +8 -0
  140. package/dist/micro/query/types/SchemaObjectNames.js.map +1 -0
  141. package/dist/micro/query/types/index.d.ts +4 -0
  142. package/dist/micro/query/types/index.js +21 -0
  143. package/dist/micro/query/types/index.js.map +1 -0
  144. package/dist/micro/security/PermissionApi.d.ts +6 -0
  145. package/dist/micro/security/PermissionApi.js +44 -0
  146. package/dist/micro/security/PermissionApi.js.map +1 -0
  147. package/dist/micro/security/PermissionCategoryApi.d.ts +5 -0
  148. package/dist/micro/security/PermissionCategoryApi.js +30 -0
  149. package/dist/micro/security/PermissionCategoryApi.js.map +1 -0
  150. package/dist/micro/security/TeamApi.d.ts +7 -0
  151. package/dist/micro/security/TeamApi.js +45 -0
  152. package/dist/micro/security/TeamApi.js.map +1 -0
  153. package/dist/micro/security/index.d.ts +1 -0
  154. package/dist/micro/security/index.js +18 -0
  155. package/dist/micro/security/index.js.map +1 -0
  156. package/dist/micro/security/types/IPermission.d.ts +10 -0
  157. package/dist/micro/security/types/IPermission.js +3 -0
  158. package/dist/micro/security/types/IPermission.js.map +1 -0
  159. package/dist/micro/security/types/IPermissionAssignment.d.ts +6 -0
  160. package/dist/micro/security/types/IPermissionAssignment.js +3 -0
  161. package/dist/micro/security/types/IPermissionAssignment.js.map +1 -0
  162. package/dist/micro/security/types/IPermissionCategory.d.ts +5 -0
  163. package/dist/micro/security/types/IPermissionCategory.js +3 -0
  164. package/dist/micro/security/types/IPermissionCategory.js.map +1 -0
  165. package/dist/micro/security/types/IPermissionDefinition.d.ts +6 -0
  166. package/dist/micro/security/types/IPermissionDefinition.js +3 -0
  167. package/dist/micro/security/types/IPermissionDefinition.js.map +1 -0
  168. package/dist/micro/security/types/IPermissionGroup.d.ts +4 -0
  169. package/dist/micro/security/types/IPermissionGroup.js +3 -0
  170. package/dist/micro/security/types/IPermissionGroup.js.map +1 -0
  171. package/dist/micro/security/types/IPermissionSet.d.ts +6 -0
  172. package/dist/micro/security/types/IPermissionSet.js +3 -0
  173. package/dist/micro/security/types/IPermissionSet.js.map +1 -0
  174. package/dist/micro/security/types/SecurityObjectNames.d.ts +8 -0
  175. package/dist/micro/security/types/SecurityObjectNames.js +12 -0
  176. package/dist/micro/security/types/SecurityObjectNames.js.map +1 -0
  177. package/dist/micro/security/types/Team.d.ts +7 -0
  178. package/dist/micro/security/types/Team.js +3 -0
  179. package/dist/micro/security/types/Team.js.map +1 -0
  180. package/dist/micro/security/types/TeamAssignment.d.ts +4 -0
  181. package/dist/micro/security/types/TeamAssignment.js +3 -0
  182. package/dist/micro/security/types/TeamAssignment.js.map +1 -0
  183. package/dist/micro/security/types/index.d.ts +8 -0
  184. package/dist/micro/security/types/index.js +25 -0
  185. package/dist/micro/security/types/index.js.map +1 -0
  186. package/dist/micro/workspace/ModuleApi.d.ts +8 -0
  187. package/dist/micro/workspace/ModuleApi.js +58 -0
  188. package/dist/micro/workspace/ModuleApi.js.map +1 -0
  189. package/dist/micro/workspace/index.d.ts +1 -0
  190. package/dist/micro/workspace/index.js +18 -0
  191. package/dist/micro/workspace/index.js.map +1 -0
  192. package/dist/micro/workspace/types/CreateUser.d.ts +5 -0
  193. package/dist/micro/workspace/types/CreateUser.js +3 -0
  194. package/dist/micro/workspace/types/CreateUser.js.map +1 -0
  195. package/dist/micro/workspace/types/EUserStatus.d.ts +5 -0
  196. package/dist/micro/workspace/types/EUserStatus.js +10 -0
  197. package/dist/micro/workspace/types/EUserStatus.js.map +1 -0
  198. package/dist/micro/workspace/types/Module.d.ts +9 -0
  199. package/dist/micro/workspace/types/Module.js +3 -0
  200. package/dist/micro/workspace/types/Module.js.map +1 -0
  201. package/dist/micro/workspace/types/ModuleAction.d.ts +4 -0
  202. package/dist/micro/workspace/types/ModuleAction.js +3 -0
  203. package/dist/micro/workspace/types/ModuleAction.js.map +1 -0
  204. package/dist/micro/workspace/types/User.d.ts +8 -0
  205. package/dist/micro/workspace/types/User.js +3 -0
  206. package/dist/micro/workspace/types/User.js.map +1 -0
  207. package/dist/micro/workspace/types/index.d.ts +5 -0
  208. package/dist/micro/workspace/types/index.js +22 -0
  209. package/dist/micro/workspace/types/index.js.map +1 -0
  210. package/dist/tsconfig.build.tsbuildinfo +1 -1
  211. package/dist/types/Constructor.d.ts +1 -0
  212. package/dist/types/Constructor.js +3 -0
  213. package/dist/types/Constructor.js.map +1 -0
  214. package/dist/types/index.d.ts +1 -0
  215. package/dist/types/index.js +1 -0
  216. package/dist/types/index.js.map +1 -1
  217. package/package.json +3 -5
@@ -1,5 +1,5 @@
1
1
  import { AbstractCRUDApi } from "../abstract";
2
2
  import { AxiosRequestConfig } from "axios";
3
- export declare abstract class GetAll extends AbstractCRUDApi {
3
+ export declare class GetAll extends AbstractCRUDApi {
4
4
  getAll(): AxiosRequestConfig;
5
5
  }
@@ -16,15 +16,15 @@ const sync_1 = require("../../sync");
16
16
  class GetAll extends abstract_1.AbstractCRUDApi {
17
17
  getAll() {
18
18
  return {
19
- baseURL: this.getApiUrl(),
20
- url: `/${this.getObjectName()}`,
19
+ baseURL: this.apiUrl,
20
+ url: `/${this.objectName}`,
21
21
  method: 'GET'
22
22
  };
23
23
  }
24
24
  ;
25
25
  }
26
26
  __decorate([
27
- (0, callout_1.AddCalloutMiddleware)((0, sync_1.PushCrudEvent)(sync_1.CrudSyncAction.QueryBulk)),
27
+ (0, callout_1.Calloutable)((0, sync_1.PushCrudEvent)(sync_1.CrudSyncAction.QueryBulk)),
28
28
  __metadata("design:type", Function),
29
29
  __metadata("design:paramtypes", []),
30
30
  __metadata("design:returntype", Object)
@@ -1 +1 @@
1
- {"version":3,"file":"GetAll.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/GetAll.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA4C;AAE5C,8CAAsD;AACtD,qCAAyD;AAEzD,MAAsB,MAAO,SAAQ,0BAAe;IAG3C,MAAM;QACX,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE;YACzB,GAAG,EAAE,IAAI,IAAI,CAAC,aAAa,EAAE,EAAE;YAC/B,MAAM,EAAE,KAAK;SACd,CAAA;IACH,CAAC;IAAA,CAAC;CAEH;AATC;IAAC,IAAA,8BAAoB,EAAC,IAAA,oBAAa,EAAC,qBAAc,CAAC,SAAS,CAAC,CAAC;;;;oCAO7D;AATH,wBAWC"}
1
+ {"version":3,"file":"GetAll.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/GetAll.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA4C;AAE5C,8CAA6C;AAC7C,qCAAyD;AAEzD,MAAa,MAAO,SAAQ,0BAAe;IAGlC,MAAM;QACX,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,MAAM;YACpB,GAAG,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE;YAC1B,MAAM,EAAE,KAAK;SACd,CAAA;IACH,CAAC;IAAA,CAAC;CAEH;AATC;IAAC,IAAA,qBAAW,EAAC,IAAA,oBAAa,EAAC,qBAAc,CAAC,SAAS,CAAC,CAAC;;;;oCAOpD;AATH,wBAWC"}
@@ -0,0 +1,6 @@
1
+ import { AbstractCRUDApi } from "../abstract";
2
+ import { AxiosRequestConfig } from "axios";
3
+ import { Filter } from "mongodb";
4
+ export declare class GetByFilters<T> extends AbstractCRUDApi {
5
+ getByFilters<T>(filter?: Filter<T>, options?: any): AxiosRequestConfig;
6
+ }
@@ -0,0 +1,34 @@
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
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.GetByFilters = void 0;
13
+ const abstract_1 = require("../abstract");
14
+ const callout_1 = require("../../../callout");
15
+ const sync_1 = require("../../sync");
16
+ class GetByFilters extends abstract_1.AbstractCRUDApi {
17
+ getByFilters(filter, options) {
18
+ return {
19
+ baseURL: this.apiUrl,
20
+ url: `/object/${this.objectName}/get/o`,
21
+ method: 'POST',
22
+ data: { filter, options }
23
+ };
24
+ }
25
+ ;
26
+ }
27
+ __decorate([
28
+ (0, callout_1.Calloutable)((0, sync_1.PushCrudEvent)(sync_1.CrudSyncAction.QueryBulk)),
29
+ __metadata("design:type", Function),
30
+ __metadata("design:paramtypes", [Object, Object]),
31
+ __metadata("design:returntype", Object)
32
+ ], GetByFilters.prototype, "getByFilters", null);
33
+ exports.GetByFilters = GetByFilters;
34
+ //# sourceMappingURL=GetByFilters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetByFilters.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/GetByFilters.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA4C;AAE5C,8CAA6C;AAC7C,qCAAyD;AAGzD,MAAa,YAAgB,SAAQ,0BAAe;IAG3C,YAAY,CAAI,MAAkB,EAAE,OAAa;QACtD,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,MAAM;YACpB,GAAG,EAAE,WAAW,IAAI,CAAC,UAAU,QAAQ;YACvC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAC,MAAM,EAAE,OAAO,EAAC;SACxB,CAAA;IACH,CAAC;IAAA,CAAC;CAEH;AAVC;IAAC,IAAA,qBAAW,EAAC,IAAA,oBAAa,EAAC,qBAAc,CAAC,SAAS,CAAC,CAAC;;;;gDAQpD;AAVH,oCAYC"}
@@ -1,5 +1,5 @@
1
1
  import { AbstractCRUDApi } from "../abstract";
2
2
  import { AxiosRequestConfig } from "axios";
3
- export declare abstract class GetById extends AbstractCRUDApi {
3
+ export declare class GetById extends AbstractCRUDApi {
4
4
  getById(entityId: string): AxiosRequestConfig;
5
5
  }
@@ -16,15 +16,15 @@ const sync_1 = require("../../sync");
16
16
  class GetById extends abstract_1.AbstractCRUDApi {
17
17
  getById(entityId) {
18
18
  return {
19
- baseURL: this.getApiUrl(),
20
- url: `/${this.getObjectName()}/${entityId}`,
19
+ baseURL: this.apiUrl,
20
+ url: `/${this.objectName}/${entityId}`,
21
21
  method: 'GET',
22
22
  };
23
23
  }
24
24
  ;
25
25
  }
26
26
  __decorate([
27
- (0, callout_1.AddCalloutMiddleware)((0, sync_1.PushCrudEvent)(sync_1.CrudSyncAction.Query)),
27
+ (0, callout_1.Calloutable)((0, sync_1.PushCrudEvent)(sync_1.CrudSyncAction.Query)),
28
28
  __metadata("design:type", Function),
29
29
  __metadata("design:paramtypes", [String]),
30
30
  __metadata("design:returntype", Object)
@@ -1 +1 @@
1
- {"version":3,"file":"GetById.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/GetById.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA4C;AAE5C,8CAAsD;AACtD,qCAAyD;AAEzD,MAAsB,OAAQ,SAAQ,0BAAe;IAG5C,OAAO,CAAC,QAAgB;QAC7B,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE;YACzB,GAAG,EAAE,IAAI,IAAI,CAAC,aAAa,EAAE,IAAI,QAAQ,EAAE;YAC3C,MAAM,EAAE,KAAK;SACd,CAAA;IACH,CAAC;IAAA,CAAC;CAEH;AATC;IAAC,IAAA,8BAAoB,EAAC,IAAA,oBAAa,EAAC,qBAAc,CAAC,KAAK,CAAC,CAAC;;;;sCAOzD;AATH,0BAWC"}
1
+ {"version":3,"file":"GetById.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/GetById.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA4C;AAE5C,8CAA6C;AAC7C,qCAAyD;AAEzD,MAAa,OAAQ,SAAQ,0BAAe;IAGnC,OAAO,CAAC,QAAgB;QAC7B,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,MAAM;YACpB,GAAG,EAAE,IAAI,IAAI,CAAC,UAAU,IAAI,QAAQ,EAAE;YACtC,MAAM,EAAE,KAAK;SACd,CAAA;IACH,CAAC;IAAA,CAAC;CAEH;AATC;IAAC,IAAA,qBAAW,EAAC,IAAA,oBAAa,EAAC,qBAAc,CAAC,KAAK,CAAC,CAAC;;;;sCAOhD;AATH,0BAWC"}
@@ -1,5 +1,5 @@
1
1
  import { AbstractCRUDApi } from "../abstract";
2
2
  import { AxiosRequestConfig } from "axios";
3
- export declare abstract class GetByIds extends AbstractCRUDApi {
3
+ export declare class GetByIds extends AbstractCRUDApi {
4
4
  getByIds(entityIds: Array<string>): AxiosRequestConfig;
5
5
  }
@@ -16,8 +16,8 @@ const sync_1 = require("../../sync");
16
16
  class GetByIds extends abstract_1.AbstractCRUDApi {
17
17
  getByIds(entityIds) {
18
18
  return {
19
- baseURL: this.getApiUrl(),
20
- url: `/${this.getObjectName()}/ids`,
19
+ baseURL: this.apiUrl,
20
+ url: `/${this.objectName}/ids`,
21
21
  method: 'POST',
22
22
  data: entityIds
23
23
  };
@@ -25,7 +25,7 @@ class GetByIds extends abstract_1.AbstractCRUDApi {
25
25
  ;
26
26
  }
27
27
  __decorate([
28
- (0, callout_1.AddCalloutMiddleware)((0, sync_1.PushCrudEvent)(sync_1.CrudSyncAction.QueryBulk)),
28
+ (0, callout_1.Calloutable)((0, sync_1.PushCrudEvent)(sync_1.CrudSyncAction.QueryBulk)),
29
29
  __metadata("design:type", Function),
30
30
  __metadata("design:paramtypes", [Array]),
31
31
  __metadata("design:returntype", Object)
@@ -1 +1 @@
1
- {"version":3,"file":"GetByIds.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/GetByIds.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA4C;AAE5C,8CAAsD;AACtD,qCAAyD;AAEzD,MAAsB,QAAS,SAAQ,0BAAe;IAG7C,QAAQ,CAAC,SAAwB;QACtC,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE;YACzB,GAAG,EAAE,IAAI,IAAI,CAAC,aAAa,EAAE,MAAM;YACnC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,SAAS;SAChB,CAAA;IACH,CAAC;IAAA,CAAC;CAEH;AAVC;IAAC,IAAA,8BAAoB,EAAC,IAAA,oBAAa,EAAC,qBAAc,CAAC,SAAS,CAAC,CAAC;;qCACnC,KAAK;;wCAO/B;AAVH,4BAYC"}
1
+ {"version":3,"file":"GetByIds.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/GetByIds.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA4C;AAE5C,8CAA6C;AAC7C,qCAAyD;AAEzD,MAAa,QAAS,SAAQ,0BAAe;IAGpC,QAAQ,CAAC,SAAwB;QACtC,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,MAAM;YACpB,GAAG,EAAE,IAAI,IAAI,CAAC,UAAU,MAAM;YAC9B,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,SAAS;SAChB,CAAA;IACH,CAAC;IAAA,CAAC;CAEH;AAVC;IAAC,IAAA,qBAAW,EAAC,IAAA,oBAAa,EAAC,qBAAc,CAAC,SAAS,CAAC,CAAC;;qCAC1B,KAAK;;wCAO/B;AAVH,4BAYC"}
@@ -1,5 +1,5 @@
1
1
  import { AbstractCRUDApi } from "../abstract";
2
2
  import { AxiosRequestConfig } from "axios";
3
- export declare abstract class Update extends AbstractCRUDApi {
4
- update(entity: any): AxiosRequestConfig;
3
+ export declare class Update<T> extends AbstractCRUDApi {
4
+ update(entity: T): AxiosRequestConfig<T>;
5
5
  }
@@ -12,13 +12,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Update = void 0;
13
13
  const abstract_1 = require("../abstract");
14
14
  const callout_1 = require("../../../callout");
15
- const middlewares_1 = require("../../sync/middlewares");
16
- const constants_1 = require("../../sync/constants");
15
+ const sync_1 = require("../../sync");
17
16
  class Update extends abstract_1.AbstractCRUDApi {
18
17
  update(entity) {
19
18
  return {
20
- baseURL: this.getApiUrl(),
21
- url: `/${this.getObjectName()}`,
19
+ baseURL: this.apiUrl,
20
+ url: `/${this.objectName}`,
22
21
  method: 'PATCH',
23
22
  data: entity
24
23
  };
@@ -26,7 +25,7 @@ class Update extends abstract_1.AbstractCRUDApi {
26
25
  ;
27
26
  }
28
27
  __decorate([
29
- (0, callout_1.AddCalloutMiddleware)((0, middlewares_1.PushCrudEvent)(constants_1.CrudSyncAction.Update)),
28
+ (0, callout_1.Calloutable)((0, sync_1.PushCrudEvent)(sync_1.CrudSyncAction.Update)),
30
29
  __metadata("design:type", Function),
31
30
  __metadata("design:paramtypes", [Object]),
32
31
  __metadata("design:returntype", Object)
@@ -1 +1 @@
1
- {"version":3,"file":"Update.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/Update.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA4C;AAE5C,8CAAsD;AACtD,wDAAqD;AACrD,oDAAoD;AAEpD,MAAsB,MAAO,SAAQ,0BAAe;IAG3C,MAAM,CAAC,MAAW;QACvB,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE;YACzB,GAAG,EAAE,IAAI,IAAI,CAAC,aAAa,EAAE,EAAE;YAC/B,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,MAAM;SACb,CAAA;IACH,CAAC;IAAA,CAAC;CAEH;AAVC;IAAC,IAAA,8BAAoB,EAAC,IAAA,2BAAa,EAAC,0BAAc,CAAC,MAAM,CAAC,CAAC;;;;oCAQ1D;AAVH,wBAYC"}
1
+ {"version":3,"file":"Update.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/Update.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA4C;AAE5C,8CAA6C;AAC7C,qCAAyD;AAEzD,MAAa,MAAU,SAAQ,0BAAe;IAGrC,MAAM,CAAC,MAAS;QACrB,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,MAAM;YACpB,GAAG,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE;YAC1B,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,MAAM;SACb,CAAA;IACH,CAAC;IAAA,CAAC;CAEH;AAVC;IAAC,IAAA,qBAAW,EAAC,IAAA,oBAAa,EAAC,qBAAc,CAAC,MAAM,CAAC,CAAC;;;;oCAQjD;AAVH,wBAYC"}
@@ -1,5 +1,5 @@
1
1
  import { AbstractCRUDApi } from "../abstract";
2
2
  import { AxiosRequestConfig } from "axios";
3
- export declare abstract class UpdateBulk extends AbstractCRUDApi {
4
- updateBulk(entities: Array<any>): AxiosRequestConfig;
3
+ export declare class UpdateBulk<T> extends AbstractCRUDApi {
4
+ updateBulk(entities: Array<T>): AxiosRequestConfig<Array<T>>;
5
5
  }
@@ -12,13 +12,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.UpdateBulk = void 0;
13
13
  const abstract_1 = require("../abstract");
14
14
  const callout_1 = require("../../../callout");
15
- const middlewares_1 = require("../../sync/middlewares");
16
- const constants_1 = require("../../sync/constants");
15
+ const sync_1 = require("../../sync");
17
16
  class UpdateBulk extends abstract_1.AbstractCRUDApi {
18
17
  updateBulk(entities) {
19
18
  return {
20
- baseURL: this.getApiUrl(),
21
- url: `/${this.getObjectName()}/bulk`,
19
+ baseURL: this.apiUrl,
20
+ url: `/${this.objectName}/bulk`,
22
21
  method: 'PATCH',
23
22
  data: entities
24
23
  };
@@ -26,7 +25,7 @@ class UpdateBulk extends abstract_1.AbstractCRUDApi {
26
25
  ;
27
26
  }
28
27
  __decorate([
29
- (0, callout_1.AddCalloutMiddleware)((0, middlewares_1.PushCrudEvent)(constants_1.CrudSyncAction.UpdateBulk)),
28
+ (0, callout_1.Calloutable)((0, sync_1.PushCrudEvent)(sync_1.CrudSyncAction.UpdateBulk)),
30
29
  __metadata("design:type", Function),
31
30
  __metadata("design:paramtypes", [Array]),
32
31
  __metadata("design:returntype", Object)
@@ -1 +1 @@
1
- {"version":3,"file":"UpdateBulk.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/UpdateBulk.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA4C;AAE5C,8CAAsD;AACtD,wDAAqD;AACrD,oDAAoD;AAEpD,MAAsB,UAAW,SAAQ,0BAAe;IAG/C,UAAU,CAAC,QAAoB;QACpC,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE;YACzB,GAAG,EAAE,IAAI,IAAI,CAAC,aAAa,EAAE,OAAO;YACpC,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,QAAQ;SACf,CAAA;IACH,CAAC;IAAA,CAAC;CAEH;AAVC;IAAC,IAAA,8BAAoB,EAAC,IAAA,2BAAa,EAAC,0BAAc,CAAC,UAAU,CAAC,CAAC;;qCACnC,KAAK;;4CAOhC;AAVH,gCAYC"}
1
+ {"version":3,"file":"UpdateBulk.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/UpdateBulk.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA4C;AAE5C,8CAA6C;AAC7C,qCAAyD;AAEzD,MAAa,UAAc,SAAQ,0BAAe;IAGzC,UAAU,CAAC,QAAkB;QAClC,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,MAAM;YACpB,GAAG,EAAE,IAAI,IAAI,CAAC,UAAU,OAAO;YAC/B,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,QAAQ;SACf,CAAA;IACH,CAAC;IAAA,CAAC;CAEH;AAVC;IAAC,IAAA,qBAAW,EAAC,IAAA,oBAAa,EAAC,qBAAc,CAAC,UAAU,CAAC,CAAC;;qCAC1B,KAAK;;4CAOhC;AAVH,gCAYC"}
@@ -1,5 +1,5 @@
1
1
  import { AbstractCRUDApi } from "../abstract";
2
2
  import { AxiosRequestConfig } from "axios";
3
- export declare abstract class Upsert extends AbstractCRUDApi {
4
- upsert(entity: any): AxiosRequestConfig;
3
+ export declare class Upsert<T> extends AbstractCRUDApi {
4
+ upsert(entity: T): AxiosRequestConfig<T>;
5
5
  }
@@ -12,13 +12,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Upsert = void 0;
13
13
  const abstract_1 = require("../abstract");
14
14
  const callout_1 = require("../../../callout");
15
- const middlewares_1 = require("../../sync/middlewares");
16
- const constants_1 = require("../../sync/constants");
15
+ const sync_1 = require("../../sync");
17
16
  class Upsert extends abstract_1.AbstractCRUDApi {
18
17
  upsert(entity) {
19
18
  return {
20
- baseURL: this.getApiUrl(),
21
- url: `/${this.getObjectName()}`,
19
+ baseURL: this.apiUrl,
20
+ url: `/${this.objectName}`,
22
21
  method: 'PUT',
23
22
  data: entity
24
23
  };
@@ -26,7 +25,7 @@ class Upsert extends abstract_1.AbstractCRUDApi {
26
25
  ;
27
26
  }
28
27
  __decorate([
29
- (0, callout_1.AddCalloutMiddleware)((0, middlewares_1.PushCrudEvent)(constants_1.CrudSyncAction.Upsert)),
28
+ (0, callout_1.Calloutable)((0, sync_1.PushCrudEvent)(sync_1.CrudSyncAction.Upsert)),
30
29
  __metadata("design:type", Function),
31
30
  __metadata("design:paramtypes", [Object]),
32
31
  __metadata("design:returntype", Object)
@@ -1 +1 @@
1
- {"version":3,"file":"Upsert.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/Upsert.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA4C;AAE5C,8CAAsD;AACtD,wDAAqD;AACrD,oDAAoD;AAEpD,MAAsB,MAAO,SAAQ,0BAAe;IAG3C,MAAM,CAAC,MAAW;QACvB,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE;YACzB,GAAG,EAAE,IAAI,IAAI,CAAC,aAAa,EAAE,EAAE;YAC/B,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,MAAM;SACb,CAAA;IACH,CAAC;IAAA,CAAC;CAEH;AAVC;IAAC,IAAA,8BAAoB,EAAC,IAAA,2BAAa,EAAC,0BAAc,CAAC,MAAM,CAAC,CAAC;;;;oCAQ1D;AAVH,wBAYC"}
1
+ {"version":3,"file":"Upsert.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/Upsert.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA4C;AAE5C,8CAA6C;AAC7C,qCAAyD;AAEzD,MAAa,MAAU,SAAQ,0BAAe;IAGrC,MAAM,CAAC,MAAS;QACrB,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,MAAM;YACpB,GAAG,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE;YAC1B,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,MAAM;SACb,CAAA;IACH,CAAC;IAAA,CAAC;CAEH;AAVC;IAAC,IAAA,qBAAW,EAAC,IAAA,oBAAa,EAAC,qBAAc,CAAC,MAAM,CAAC,CAAC;;;;oCAQjD;AAVH,wBAYC"}
@@ -1,5 +1,5 @@
1
1
  import { AbstractCRUDApi } from "../abstract";
2
2
  import { AxiosRequestConfig } from "axios";
3
- export declare abstract class UpsertBulk extends AbstractCRUDApi {
4
- upsertBulk(entities: Array<any>): AxiosRequestConfig;
3
+ export declare class UpsertBulk<T> extends AbstractCRUDApi {
4
+ upsertBulk(entities: Array<T>): AxiosRequestConfig<Array<T>>;
5
5
  }
@@ -12,13 +12,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.UpsertBulk = void 0;
13
13
  const abstract_1 = require("../abstract");
14
14
  const callout_1 = require("../../../callout");
15
- const middlewares_1 = require("../../sync/middlewares");
16
- const constants_1 = require("../../sync/constants");
15
+ const sync_1 = require("../../sync");
17
16
  class UpsertBulk extends abstract_1.AbstractCRUDApi {
18
17
  upsertBulk(entities) {
19
18
  return {
20
- baseURL: this.getApiUrl(),
21
- url: `/${this.getObjectName()}/bulk`,
19
+ baseURL: this.apiUrl,
20
+ url: `/${this.objectName}/bulk`,
22
21
  method: 'PUT',
23
22
  data: entities
24
23
  };
@@ -26,7 +25,7 @@ class UpsertBulk extends abstract_1.AbstractCRUDApi {
26
25
  ;
27
26
  }
28
27
  __decorate([
29
- (0, callout_1.AddCalloutMiddleware)((0, middlewares_1.PushCrudEvent)(constants_1.CrudSyncAction.UpsertBulk)),
28
+ (0, callout_1.Calloutable)((0, sync_1.PushCrudEvent)(sync_1.CrudSyncAction.UpsertBulk)),
30
29
  __metadata("design:type", Function),
31
30
  __metadata("design:paramtypes", [Array]),
32
31
  __metadata("design:returntype", Object)
@@ -1 +1 @@
1
- {"version":3,"file":"UpsertBulk.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/UpsertBulk.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA4C;AAE5C,8CAAsD;AACtD,wDAAqD;AACrD,oDAAoD;AAEpD,MAAsB,UAAW,SAAQ,0BAAe;IAG/C,UAAU,CAAC,QAAoB;QACpC,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE;YACzB,GAAG,EAAE,IAAI,IAAI,CAAC,aAAa,EAAE,OAAO;YACpC,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,QAAQ;SACf,CAAA;IACH,CAAC;IAAA,CAAC;CAEH;AAVC;IAAC,IAAA,8BAAoB,EAAC,IAAA,2BAAa,EAAC,0BAAc,CAAC,UAAU,CAAC,CAAC;;qCACnC,KAAK;;4CAOhC;AAVH,gCAYC"}
1
+ {"version":3,"file":"UpsertBulk.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/UpsertBulk.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA4C;AAE5C,8CAA6C;AAC7C,qCAAyD;AAEzD,MAAa,UAAc,SAAQ,0BAAe;IAGzC,UAAU,CAAC,QAAkB;QAClC,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,MAAM;YACpB,GAAG,EAAE,IAAI,IAAI,CAAC,UAAU,OAAO;YAC/B,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,QAAQ;SACf,CAAA;IACH,CAAC;IAAA,CAAC;CAEH;AAVC;IAAC,IAAA,qBAAW,EAAC,IAAA,oBAAa,EAAC,qBAAc,CAAC,UAAU,CAAC,CAAC;;qCAC1B,KAAK;;4CAOhC;AAVH,gCAYC"}
@@ -5,6 +5,7 @@ export * from './DeleteByIds';
5
5
  export * from './GetAll';
6
6
  export * from './GetById';
7
7
  export * from './GetByIds';
8
+ export * from './GetByFilters';
8
9
  export * from './Update';
9
10
  export * from './UpdateBulk';
10
11
  export * from './Upsert';
@@ -21,6 +21,7 @@ __exportStar(require("./DeleteByIds"), exports);
21
21
  __exportStar(require("./GetAll"), exports);
22
22
  __exportStar(require("./GetById"), exports);
23
23
  __exportStar(require("./GetByIds"), exports);
24
+ __exportStar(require("./GetByFilters"), exports);
24
25
  __exportStar(require("./Update"), exports);
25
26
  __exportStar(require("./UpdateBulk"), exports);
26
27
  __exportStar(require("./Upsert"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,+CAA6B;AAC7B,+CAA6B;AAC7B,gDAA8B;AAC9B,2CAAyB;AACzB,4CAA0B;AAC1B,6CAA2B;AAC3B,2CAAyB;AACzB,+CAA6B;AAC7B,2CAAyB;AACzB,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,+CAA6B;AAC7B,+CAA6B;AAC7B,gDAA8B;AAC9B,2CAAyB;AACzB,4CAA0B;AAC1B,6CAA2B;AAC3B,iDAA+B;AAC/B,2CAAyB;AACzB,+CAA6B;AAC7B,2CAAyB;AACzB,+CAA6B"}
@@ -1,7 +1,8 @@
1
1
  import { GetAll } from "../operations";
2
2
  import { GetById } from "../operations";
3
3
  import { GetByIds } from "../operations";
4
- declare const FullQuery_base: import("ts-mixer/dist/types/types").Class<any[], GetAll & GetById & GetByIds, typeof GetAll & typeof GetById & typeof GetByIds, false>;
4
+ import { GetByFilters } from "../operations/GetByFilters";
5
+ declare const FullQuery_base: import("ts-mixer/dist/types/types").Class<any[], GetAll & GetById & GetByIds & GetByFilters, typeof GetAll & typeof GetById & typeof GetByIds & typeof GetByFilters, false>;
5
6
  export declare abstract class FullQuery extends FullQuery_base {
6
7
  }
7
8
  export {};
@@ -5,7 +5,8 @@ const ts_mixer_1 = require("ts-mixer");
5
5
  const operations_1 = require("../operations");
6
6
  const operations_2 = require("../operations");
7
7
  const operations_3 = require("../operations");
8
- class FullQuery extends (0, ts_mixer_1.Mixin)(operations_1.GetAll, operations_2.GetById, operations_3.GetByIds) {
8
+ const GetByFilters_1 = require("../operations/GetByFilters");
9
+ class FullQuery extends (0, ts_mixer_1.Mixin)(operations_1.GetAll, operations_2.GetById, operations_3.GetByIds, GetByFilters_1.GetByFilters) {
9
10
  }
10
11
  exports.FullQuery = FullQuery;
11
12
  //# sourceMappingURL=FullQuery.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FullQuery.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/templates/FullQuery.ts"],"names":[],"mappings":";;;AAAA,uCAA+B;AAC/B,8CAAqC;AACrC,8CAAsC;AACtC,8CAAuC;AAEvC,MAAsB,SAAU,SAAQ,IAAA,gBAAK,EAAC,mBAAM,EAAE,oBAAO,EAAE,qBAAQ,CAAC;CAAG;AAA3E,8BAA2E"}
1
+ {"version":3,"file":"FullQuery.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/templates/FullQuery.ts"],"names":[],"mappings":";;;AAAA,uCAA+B;AAC/B,8CAAqC;AACrC,8CAAsC;AACtC,8CAAuC;AACvC,6DAAwD;AAExD,MAAsB,SAAU,SAAQ,IAAA,gBAAK,EAAC,mBAAM,EAAE,oBAAO,EAAE,qBAAQ,EAAE,2BAAY,CAAC;CAAG;AAAzF,8BAAyF"}
@@ -18,9 +18,9 @@ const ALL_ACTIONS = [
18
18
  constants_1.CrudSyncAction.UpsertBulk,
19
19
  ];
20
20
  function useSyncCrud(api, actions = ALL_ACTIONS) {
21
- if (!(api && api.getObjectName() && actions))
21
+ if (!(api && api.objectName && actions))
22
22
  return;
23
- if (!config_1.ApiConfigs.eventBus) {
23
+ if (!config_1.ApiConfigs.event.eventBus) {
24
24
  throw new error_1.CrudSyncError('Event bus not defined in the ApiConfigs');
25
25
  }
26
26
  const channelName = getChannelName(api);
@@ -35,10 +35,10 @@ function useSyncCrud(api, actions = ALL_ACTIONS) {
35
35
  function subscribe(action, service, target) {
36
36
  const handler = (response) => service.sync(target, response);
37
37
  eventHandlerByAction.set(action, handler);
38
- config_1.ApiConfigs.eventBus.subscribe(channelName, action, handler);
38
+ config_1.ApiConfigs.event.eventBus.subscribe(channelName, action, handler);
39
39
  }
40
40
  function unsubscribe(handler, action) {
41
- config_1.ApiConfigs.eventBus.unsubscribe(channelName, action, handler);
41
+ config_1.ApiConfigs.event.eventBus.unsubscribe(channelName, action, handler);
42
42
  }
43
43
  return {
44
44
  subscribeSyncCrud,
@@ -47,7 +47,7 @@ function useSyncCrud(api, actions = ALL_ACTIONS) {
47
47
  }
48
48
  exports.useSyncCrud = useSyncCrud;
49
49
  function getChannelName(api) {
50
- return services_1.CrudSyncService.getObjectChannel(api.getObjectName());
50
+ return services_1.CrudSyncService.getObjectChannel(api.objectName);
51
51
  }
52
52
  function getSyncService(action) {
53
53
  if (action === constants_1.CrudSyncAction.Delete || action === constants_1.CrudSyncAction.DeleteBulk) {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AA8B;IACxD,MAAM,EAAC,WAAW,EAAC,GAAG,IAAA,sBAAY,GAAE,CAAC;IAErC,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CACxB,MAAM,CAAC,EAAE,CAAC;QACR,MAAM;QACN,WAAW,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;KACpC,CACF,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"useCrudSync.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/compose/useCrudSync.ts"],"names":[],"mappings":";;;AAEA,+CAA8C;AAC9C,oCAAuC;AACvC,4CAA4C;AAC5C,0CAA4C;AAC5C,kCAAyG;AACzG,iDAAiD;AAGjD,MAAM,WAAW,GAAG;IAClB,0BAAc,CAAC,MAAM;IACrB,0BAAc,CAAC,MAAM;IACrB,0BAAc,CAAC,MAAM;IACrB,0BAAc,CAAC,MAAM;IACrB,0BAAc,CAAC,UAAU;IACzB,0BAAc,CAAC,UAAU;IACzB,0BAAc,CAAC,UAAU;IACzB,0BAAc,CAAC,UAAU;CAC1B,CAAA;AAED,SAAgB,WAAW,CAAC,GAAoB,EAAE,UAAiC,WAAW;IAC5F,IAAI,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,UAAU,IAAI,OAAO,CAAC;QAAE,OAAO;IAEhD,IAAI,CAAC,mBAAU,CAAC,KAAK,CAAC,QAAQ,EAAE;QAC9B,MAAM,IAAI,qBAAa,CAAC,yCAAyC,CAAC,CAAC;KACpE;IAED,MAAM,WAAW,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;IAExC,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAExD,MAAM,oBAAoB,GAAG,IAAI,GAAG,EAAE,CAAC;IAEvC,SAAS,iBAAiB,CAAC,MAAgC;QACzD,mBAAmB,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,C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I,MAAM,KAAK,0BAAc,CAAC,UAAU,IAAI,MAAM,KAAK,0BAAc,CAAC,KAAK,IAAI,MAAM,KAAK,0BAAc,CAAC,SAAS,EAAE;QACtJ,OAAO,qBAAc,CAAC;KACvB;IAED,MAAM,IAAI,qBAAa,CAAC,yCAAyC,MAAM,EAAE,CAAC,CAAC;AAC7E,CAAC;AAED,SAAS,kBAAkB,CAAC,OAA8B;IACxD,MAAM,EAAC,WAAW,EAAC,GAAG,IAAA,sBAAY,GAAE,CAAC;IAErC,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CACxB,MAAM,CAAC,EAAE,CAAC;QACR,MAAM;QACN,WAAW,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;KACpC,CACF,CAAC,CAAC;AACL,CAAC"}
@@ -4,9 +4,9 @@ exports.PushCrudEvent = void 0;
4
4
  const config_1 = require("../../../../config");
5
5
  const services_1 = require("../services");
6
6
  const PushCrudEvent = (action) => (apiInstance) => {
7
- if (!config_1.ApiConfigs.eventBus)
7
+ if (!config_1.ApiConfigs.event.eventBus)
8
8
  return;
9
- return (response) => config_1.ApiConfigs.eventBus.publish(services_1.CrudSyncService.getObjectChannel(apiInstance.getObjectName()), action, response === null || response === void 0 ? void 0 : response.data);
9
+ return (response) => config_1.ApiConfigs.event.eventBus.publish(services_1.CrudSyncService.getObjectChannel(apiInstance.apiUrl), action, response === null || response === void 0 ? void 0 : response.data);
10
10
  };
11
11
  exports.PushCrudEvent = PushCrudEvent;
12
12
  //# sourceMappingURL=PushCrudEvent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PushCrudEvent.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/middlewares/PushCrudEvent.ts"],"names":[],"mappings":";;;AAEA,+CAA8C;AAG9C,0CAA4C;AAErC,MAAM,aAAa,GAAG,CAAC,MAAsB,EAAwC,EAAE,CAAC,CAAC,WAAW,EAAoB,EAAE;IAC/H,IAAI,CAAC,mBAAU,CAAC,QAAQ;QAAE,OAAO;IAEjC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,mBAAU,CAAC,QAAQ,CAAC,OAAO,CAC9C,0BAAe,CAAC,gBAAgB,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC,EAC7D,MAAM,EACN,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,CACf,CAAC;AACJ,CAAC,CAAA;AARY,QAAA,aAAa,iBAQzB"}
1
+ {"version":3,"file":"PushCrudEvent.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/middlewares/PushCrudEvent.ts"],"names":[],"mappings":";;;AAEA,+CAA8C;AAG9C,0CAA4C;AAErC,MAAM,aAAa,GAAG,CAAC,MAAsB,EAAwC,EAAE,CAAC,CAAC,WAAW,EAA8B,EAAE;IACzI,IAAI,CAAC,mBAAU,CAAC,KAAK,CAAC,QAAQ;QAAE,OAAO;IAEvC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,mBAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CACpD,0BAAe,CAAC,gBAAgB,CAAC,WAAW,CAAC,MAAM,CAAC,EACpD,MAAM,EACN,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,CACf,CAAC;AACJ,CAAC,CAAA;AARY,QAAA,aAAa,iBAQzB"}
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ export * from './api';
2
2
  export * from './features';
3
3
  export * from './Api';
4
4
  export * from './types';
5
- export * from './entities';
5
+ export * from './micro';
6
6
  export * from './config';
7
7
  export * from './compose';
8
8
  export * from './services';
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ __exportStar(require("./api"), exports);
18
18
  __exportStar(require("./features"), exports);
19
19
  __exportStar(require("./Api"), exports);
20
20
  __exportStar(require("./types"), exports);
21
- __exportStar(require("./entities"), exports);
21
+ __exportStar(require("./micro"), exports);
22
22
  __exportStar(require("./config"), exports);
23
23
  __exportStar(require("./compose"), exports);
24
24
  __exportStar(require("./services"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,6CAA2B;AAC3B,wCAAsB;AACtB,0CAAwB;AACxB,6CAA2B;AAC3B,2CAAyB;AACzB,4CAA0B;AAC1B,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,6CAA2B;AAC3B,wCAAsB;AACtB,0CAAwB;AACxB,0CAAwB;AACxB,2CAAyB;AACzB,4CAA0B;AAC1B,6CAA2B"}
package/dist/main.d.ts CHANGED
@@ -0,0 +1 @@
1
+ export {};
package/dist/main.js CHANGED
@@ -1 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const Api_1 = require("./Api");
4
+ const config_1 = require("./config");
5
+ const event_bus_1 = require("@buildery/event-bus");
6
+ config_1.ApiConfigs.event.eventBus = new event_bus_1.EventBus();
7
+ config_1.ApiConfigs.api.securityUrl = 'http://localhost:3000/security';
8
+ console.log(Api_1.Api.security.team().getById('123'));
1
9
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;AAAA,+BAA0B;AAC1B,qCAAoC;AACpC,mDAA6C;AAE7C,mBAAU,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,oBAAQ,EAAE,CAAC;AAC3C,mBAAU,CAAC,GAAG,CAAC,WAAW,GAAG,gCAAgC,CAAC;AAG9D,OAAO,CAAC,GAAG,CAAC,SAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA"}
@@ -0,0 +1,22 @@
1
+ import { AxiosRequestConfig } from "axios";
2
+ import { BindThis } from "../../features";
3
+ import { AuthSignIn, AuthActivateUser, AuthChangePassword, AuthConfirmResetPassword } from "../../features";
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
+ resetPassword(userId: string): {
11
+ baseURL: string;
12
+ url: string;
13
+ method: string;
14
+ };
15
+ resetPasswordConfirm(confirm: AuthConfirmResetPassword): {
16
+ baseURL: string;
17
+ url: string;
18
+ method: string;
19
+ data: AuthConfirmResetPassword;
20
+ };
21
+ changePassword(user: AuthChangePassword): AxiosRequestConfig<any>;
22
+ }