@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.
- package/dist/Api.d.ts +8 -6
- package/dist/Api.js.map +1 -1
- package/dist/compose/useSingleton.d.ts +2 -1
- package/dist/compose/useSingleton.js.map +1 -1
- package/dist/config/ApiConfigs.d.ts +10 -6
- package/dist/config/ApiConfigs.js +10 -0
- package/dist/config/ApiConfigs.js.map +1 -1
- package/dist/config/RawApi.d.ts +32 -14
- package/dist/config/RawApi.js +35 -14
- package/dist/config/RawApi.js.map +1 -1
- package/dist/features/api/abstract/AbstractApi.d.ts +6 -0
- package/dist/features/api/abstract/AbstractApi.js +20 -0
- package/dist/features/api/abstract/AbstractApi.js.map +1 -0
- package/dist/features/auth/services/AuthService.js +2 -4
- package/dist/features/auth/services/AuthService.js.map +1 -1
- package/dist/features/callout/decorators/Calloutable.d.ts +3 -4
- package/dist/features/callout/decorators/Calloutable.js +10 -42
- package/dist/features/callout/decorators/Calloutable.js.map +1 -1
- package/dist/features/callout/decorators/index.d.ts +0 -1
- package/dist/features/callout/decorators/index.js +0 -1
- package/dist/features/callout/decorators/index.js.map +1 -1
- package/dist/features/callout/types/ApiCalloutMiddleware.d.ts +1 -1
- package/dist/features/crud/operations/abstract/AbstractCRUDApi.d.ts +5 -3
- package/dist/features/crud/operations/abstract/AbstractCRUDApi.js +11 -5
- package/dist/features/crud/operations/abstract/AbstractCRUDApi.js.map +1 -1
- package/dist/features/crud/operations/index.d.ts +0 -1
- package/dist/features/crud/operations/index.js +0 -1
- package/dist/features/crud/operations/index.js.map +1 -1
- package/dist/features/crud/operations/operations/Create.d.ts +2 -2
- package/dist/features/crud/operations/operations/Create.js +4 -5
- package/dist/features/crud/operations/operations/Create.js.map +1 -1
- package/dist/features/crud/operations/operations/CreateBulk.d.ts +2 -2
- package/dist/features/crud/operations/operations/CreateBulk.js +4 -5
- package/dist/features/crud/operations/operations/CreateBulk.js.map +1 -1
- package/dist/features/crud/operations/operations/DeleteById.d.ts +1 -1
- package/dist/features/crud/operations/operations/DeleteById.js +4 -5
- package/dist/features/crud/operations/operations/DeleteById.js.map +1 -1
- package/dist/features/crud/operations/operations/DeleteByIds.d.ts +1 -1
- package/dist/features/crud/operations/operations/DeleteByIds.js +3 -3
- package/dist/features/crud/operations/operations/DeleteByIds.js.map +1 -1
- package/dist/features/crud/operations/operations/GetAll.d.ts +1 -1
- package/dist/features/crud/operations/operations/GetAll.js +3 -3
- package/dist/features/crud/operations/operations/GetAll.js.map +1 -1
- package/dist/features/crud/operations/operations/GetByFilters.d.ts +6 -0
- package/dist/features/crud/operations/operations/GetByFilters.js +34 -0
- package/dist/features/crud/operations/operations/GetByFilters.js.map +1 -0
- package/dist/features/crud/operations/operations/GetById.d.ts +1 -1
- package/dist/features/crud/operations/operations/GetById.js +3 -3
- package/dist/features/crud/operations/operations/GetById.js.map +1 -1
- package/dist/features/crud/operations/operations/GetByIds.d.ts +1 -1
- package/dist/features/crud/operations/operations/GetByIds.js +3 -3
- package/dist/features/crud/operations/operations/GetByIds.js.map +1 -1
- package/dist/features/crud/operations/operations/Update.d.ts +2 -2
- package/dist/features/crud/operations/operations/Update.js +4 -5
- package/dist/features/crud/operations/operations/Update.js.map +1 -1
- package/dist/features/crud/operations/operations/UpdateBulk.d.ts +2 -2
- package/dist/features/crud/operations/operations/UpdateBulk.js +4 -5
- package/dist/features/crud/operations/operations/UpdateBulk.js.map +1 -1
- package/dist/features/crud/operations/operations/Upsert.d.ts +2 -2
- package/dist/features/crud/operations/operations/Upsert.js +4 -5
- package/dist/features/crud/operations/operations/Upsert.js.map +1 -1
- package/dist/features/crud/operations/operations/UpsertBulk.d.ts +2 -2
- package/dist/features/crud/operations/operations/UpsertBulk.js +4 -5
- package/dist/features/crud/operations/operations/UpsertBulk.js.map +1 -1
- package/dist/features/crud/operations/operations/index.d.ts +1 -0
- package/dist/features/crud/operations/operations/index.js +1 -0
- package/dist/features/crud/operations/operations/index.js.map +1 -1
- package/dist/features/crud/operations/templates/FullQuery.d.ts +2 -1
- package/dist/features/crud/operations/templates/FullQuery.js +2 -1
- package/dist/features/crud/operations/templates/FullQuery.js.map +1 -1
- package/dist/features/crud/sync/compose/useCrudSync.js +5 -5
- package/dist/features/crud/sync/compose/useCrudSync.js.map +1 -1
- package/dist/features/crud/sync/middlewares/PushCrudEvent.js +2 -2
- package/dist/features/crud/sync/middlewares/PushCrudEvent.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.js +8 -0
- package/dist/main.js.map +1 -1
- package/dist/micro/auth/AuthApi.d.ts +22 -0
- package/dist/micro/auth/AuthApi.js +128 -0
- package/dist/micro/auth/AuthApi.js.map +1 -0
- package/dist/micro/auth/WorkspaceApi.d.ts +10 -0
- package/dist/micro/auth/WorkspaceApi.js +32 -0
- package/dist/micro/auth/WorkspaceApi.js.map +1 -0
- package/dist/micro/auth/index.d.ts +1 -0
- package/dist/micro/auth/index.js +18 -0
- package/dist/micro/auth/index.js.map +1 -0
- package/dist/micro/auth/types/InitWorkspace.d.ts +8 -0
- package/dist/micro/auth/types/InitWorkspace.js +3 -0
- package/dist/micro/auth/types/InitWorkspace.js.map +1 -0
- package/dist/micro/auth/types/index.d.ts +1 -0
- package/dist/micro/auth/types/index.js +18 -0
- package/dist/micro/auth/types/index.js.map +1 -0
- package/dist/micro/index.d.ts +4 -0
- package/dist/micro/index.js +21 -0
- package/dist/micro/index.js.map +1 -0
- package/dist/micro/init/WorkspaceApi.d.ts +10 -0
- package/dist/micro/init/WorkspaceApi.js +27 -0
- package/dist/micro/init/WorkspaceApi.js.map +1 -0
- package/dist/micro/init/types/InitWorkspace.d.ts +8 -0
- package/dist/micro/init/types/InitWorkspace.js +3 -0
- package/dist/micro/init/types/InitWorkspace.js.map +1 -0
- package/dist/micro/query/FieldApi.d.ts +12 -0
- package/dist/micro/query/FieldApi.js +69 -0
- package/dist/micro/query/FieldApi.js.map +1 -0
- package/dist/micro/query/RecordApi.d.ts +16 -0
- package/dist/micro/query/RecordApi.js +24 -0
- package/dist/micro/query/RecordApi.js.map +1 -0
- package/dist/micro/query/SObjectApi.d.ts +8 -0
- package/dist/micro/query/SObjectApi.js +30 -0
- package/dist/micro/query/SObjectApi.js.map +1 -0
- package/dist/micro/query/error/ObjectApiError.d.ts +3 -0
- package/dist/micro/query/error/ObjectApiError.js +10 -0
- package/dist/micro/query/error/ObjectApiError.js.map +1 -0
- package/dist/micro/query/error/index.d.ts +1 -0
- package/dist/micro/query/error/index.js +18 -0
- package/dist/micro/query/error/index.js.map +1 -0
- package/dist/micro/query/index.d.ts +1 -0
- package/dist/micro/query/index.js +18 -0
- package/dist/micro/query/index.js.map +1 -0
- package/dist/micro/query/record/index.d.ts +2 -0
- package/dist/micro/query/record/index.js +19 -0
- package/dist/micro/query/record/index.js.map +1 -0
- package/dist/micro/query/types/FieldType.d.ts +9 -0
- package/dist/micro/query/types/FieldType.js +14 -0
- package/dist/micro/query/types/FieldType.js.map +1 -0
- package/dist/micro/query/types/PicklistValue.d.ts +4 -0
- package/dist/micro/query/types/PicklistValue.js +3 -0
- package/dist/micro/query/types/PicklistValue.js.map +1 -0
- package/dist/micro/query/types/SObject.d.ts +7 -0
- package/dist/micro/query/types/SObject.js +3 -0
- package/dist/micro/query/types/SObject.js.map +1 -0
- package/dist/micro/query/types/SObjectField.d.ts +30 -0
- package/dist/micro/query/types/SObjectField.js +3 -0
- package/dist/micro/query/types/SObjectField.js.map +1 -0
- package/dist/micro/query/types/SchemaObjectNames.d.ts +4 -0
- package/dist/micro/query/types/SchemaObjectNames.js +8 -0
- package/dist/micro/query/types/SchemaObjectNames.js.map +1 -0
- package/dist/micro/query/types/index.d.ts +4 -0
- package/dist/micro/query/types/index.js +21 -0
- package/dist/micro/query/types/index.js.map +1 -0
- package/dist/micro/security/PermissionApi.d.ts +6 -0
- package/dist/micro/security/PermissionApi.js +44 -0
- package/dist/micro/security/PermissionApi.js.map +1 -0
- package/dist/micro/security/PermissionCategoryApi.d.ts +5 -0
- package/dist/micro/security/PermissionCategoryApi.js +30 -0
- package/dist/micro/security/PermissionCategoryApi.js.map +1 -0
- package/dist/micro/security/TeamApi.d.ts +7 -0
- package/dist/micro/security/TeamApi.js +45 -0
- package/dist/micro/security/TeamApi.js.map +1 -0
- package/dist/micro/security/index.d.ts +1 -0
- package/dist/micro/security/index.js +18 -0
- package/dist/micro/security/index.js.map +1 -0
- package/dist/micro/security/types/IPermission.d.ts +10 -0
- package/dist/micro/security/types/IPermission.js +3 -0
- package/dist/micro/security/types/IPermission.js.map +1 -0
- package/dist/micro/security/types/IPermissionAssignment.d.ts +6 -0
- package/dist/micro/security/types/IPermissionAssignment.js +3 -0
- package/dist/micro/security/types/IPermissionAssignment.js.map +1 -0
- package/dist/micro/security/types/IPermissionCategory.d.ts +5 -0
- package/dist/micro/security/types/IPermissionCategory.js +3 -0
- package/dist/micro/security/types/IPermissionCategory.js.map +1 -0
- package/dist/micro/security/types/IPermissionDefinition.d.ts +6 -0
- package/dist/micro/security/types/IPermissionDefinition.js +3 -0
- package/dist/micro/security/types/IPermissionDefinition.js.map +1 -0
- package/dist/micro/security/types/IPermissionGroup.d.ts +4 -0
- package/dist/micro/security/types/IPermissionGroup.js +3 -0
- package/dist/micro/security/types/IPermissionGroup.js.map +1 -0
- package/dist/micro/security/types/IPermissionSet.d.ts +6 -0
- package/dist/micro/security/types/IPermissionSet.js +3 -0
- package/dist/micro/security/types/IPermissionSet.js.map +1 -0
- package/dist/micro/security/types/SecurityObjectNames.d.ts +8 -0
- package/dist/micro/security/types/SecurityObjectNames.js +12 -0
- package/dist/micro/security/types/SecurityObjectNames.js.map +1 -0
- package/dist/micro/security/types/Team.d.ts +7 -0
- package/dist/micro/security/types/Team.js +3 -0
- package/dist/micro/security/types/Team.js.map +1 -0
- package/dist/micro/security/types/TeamAssignment.d.ts +4 -0
- package/dist/micro/security/types/TeamAssignment.js +3 -0
- package/dist/micro/security/types/TeamAssignment.js.map +1 -0
- package/dist/micro/security/types/index.d.ts +8 -0
- package/dist/micro/security/types/index.js +25 -0
- package/dist/micro/security/types/index.js.map +1 -0
- package/dist/micro/workspace/ModuleApi.d.ts +8 -0
- package/dist/micro/workspace/ModuleApi.js +58 -0
- package/dist/micro/workspace/ModuleApi.js.map +1 -0
- package/dist/micro/workspace/index.d.ts +1 -0
- package/dist/micro/workspace/index.js +18 -0
- package/dist/micro/workspace/index.js.map +1 -0
- package/dist/micro/workspace/types/CreateUser.d.ts +5 -0
- package/dist/micro/workspace/types/CreateUser.js +3 -0
- package/dist/micro/workspace/types/CreateUser.js.map +1 -0
- package/dist/micro/workspace/types/EUserStatus.d.ts +5 -0
- package/dist/micro/workspace/types/EUserStatus.js +10 -0
- package/dist/micro/workspace/types/EUserStatus.js.map +1 -0
- package/dist/micro/workspace/types/Module.d.ts +9 -0
- package/dist/micro/workspace/types/Module.js +3 -0
- package/dist/micro/workspace/types/Module.js.map +1 -0
- package/dist/micro/workspace/types/ModuleAction.d.ts +4 -0
- package/dist/micro/workspace/types/ModuleAction.js +3 -0
- package/dist/micro/workspace/types/ModuleAction.js.map +1 -0
- package/dist/micro/workspace/types/User.d.ts +8 -0
- package/dist/micro/workspace/types/User.js +3 -0
- package/dist/micro/workspace/types/User.js.map +1 -0
- package/dist/micro/workspace/types/index.d.ts +5 -0
- package/dist/micro/workspace/types/index.js +22 -0
- package/dist/micro/workspace/types/index.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/Constructor.d.ts +1 -0
- package/dist/types/Constructor.js +3 -0
- package/dist/types/Constructor.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/package.json +3 -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.
|
|
20
|
-
url: `/${this.
|
|
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.
|
|
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,
|
|
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"}
|
|
@@ -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.
|
|
20
|
-
url: `/${this.
|
|
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.
|
|
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,
|
|
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
|
|
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.
|
|
20
|
-
url: `/${this.
|
|
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.
|
|
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,
|
|
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
|
|
4
|
-
update(entity:
|
|
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
|
|
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.
|
|
21
|
-
url: `/${this.
|
|
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.
|
|
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,
|
|
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
|
|
4
|
-
updateBulk(entities: Array<
|
|
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
|
|
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.
|
|
21
|
-
url: `/${this.
|
|
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.
|
|
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,
|
|
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
|
|
4
|
-
upsert(entity:
|
|
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
|
|
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.
|
|
21
|
-
url: `/${this.
|
|
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.
|
|
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,
|
|
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
|
|
4
|
-
upsertBulk(entities: Array<
|
|
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
|
|
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.
|
|
21
|
-
url: `/${this.
|
|
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.
|
|
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,
|
|
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"}
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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;
|
|
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.
|
|
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.
|
|
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) {
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
1
|
+
{"version":3,"file":"useCrudSync.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/compose/useCrudSync.ts"],"names":[],"mappings":"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"}
|
|
@@ -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.
|
|
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,
|
|
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
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("./
|
|
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,
|
|
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
|
+
}
|